@axiom-lattice/pg-stores 1.0.70 → 1.0.72

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.70 build /home/runner/work/agentic/agentic/packages/pg-stores
2
+ > @axiom-lattice/pg-stores@1.0.72 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 206.41 KB
12
- ESM dist/index.mjs.map 392.08 KB
13
- ESM ⚡️ Build success in 530ms
14
- CJS dist/index.js 211.69 KB
15
- CJS dist/index.js.map 392.24 KB
16
- CJS ⚡️ Build success in 532ms
11
+ CJS dist/index.js 231.12 KB
12
+ CJS dist/index.js.map 427.92 KB
13
+ CJS ⚡️ Build success in 658ms
14
+ ESM dist/index.mjs 225.62 KB
15
+ ESM dist/index.mjs.map 427.74 KB
16
+ ESM ⚡️ Build success in 685ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 17337ms
19
- DTS dist/index.d.ts 50.88 KB
20
- DTS dist/index.d.mts 50.88 KB
18
+ DTS ⚡️ Build success in 16427ms
19
+ DTS dist/index.d.ts 53.12 KB
20
+ DTS dist/index.d.mts 53.12 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @axiom-lattice/pg-stores
2
2
 
3
+ ## 1.0.72
4
+
5
+ ### Patch Changes
6
+
7
+ - 0c99a06: big changes
8
+ - Updated dependencies [0c99a06]
9
+ - @axiom-lattice/core@2.1.81
10
+ - @axiom-lattice/protocols@2.1.43
11
+
12
+ ## 1.0.71
13
+
14
+ ### Patch Changes
15
+
16
+ - b4bdb6c: up new
17
+ - Updated dependencies [b4bdb6c]
18
+ - @axiom-lattice/protocols@2.1.42
19
+ - @axiom-lattice/core@2.1.80
20
+
3
21
  ## 1.0.70
4
22
 
5
23
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1,9 +1,10 @@
1
1
  import { PoolConfig, PoolClient, Pool } 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, SkillStore, Skill, CreateSkillRequest } from '@axiom-lattice/protocols';
4
- export { Assistant, AssistantStore, Binding, BindingRegistry, ChannelInstallation, ChannelInstallationStore, CreateAssistantRequest, CreateBindingInput, CreateChannelInstallationRequest, CreateDatabaseConfigRequest, CreateEvalCaseRequest, CreateEvalProjectRequest, CreateEvalRunRequest, CreateEvalSuiteRequest, CreateMcpServerConfigRequest, CreateMetricsServerConfigRequest, CreateProjectRequest, CreateRunStepRequest, CreateSkillRequest, CreateTenantRequest, CreateThreadRequest, CreateUserRequest, CreateUserTenantLinkRequest, CreateWorkflowRunRequest, CreateWorkspaceRequest, DatabaseConfig, DatabaseConfigEntry, DatabaseConfigStore, DatabaseType, EvalCase, EvalProject, EvalProjectReport, EvalRun, EvalRunResult, EvalStore, EvalSuite, LarkChannelInstallationConfig, McpServerConfigEntry, McpServerConfigStore, MetricsServerConfig, MetricsServerConfigEntry, MetricsServerConfigStore, Project, ProjectStore, RunStep, ScheduleExecutionType, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, 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, 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, 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, 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, RunStep, ScheduleExecutionType, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, 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
+ import { PostgresSaver } from '@langchain/langgraph-checkpoint-postgres';
7
8
 
8
9
  /**
9
10
  * PostgreSQL implementation of ThreadStore
@@ -142,6 +143,10 @@ declare class PostgreSQLAssistantStore implements AssistantStore {
142
143
  * Check if assistant exists
143
144
  */
144
145
  hasAssistant(tenantId: string, id: string): Promise<boolean>;
146
+ /**
147
+ * Get assistant by owner user ID
148
+ */
149
+ getByOwner(tenantId: string, userId: string): Promise<Assistant | null>;
145
150
  /**
146
151
  * Dispose resources and close the connection pool
147
152
  * Should be called when the store is no longer needed
@@ -698,6 +703,7 @@ declare class PostgreSQLWorkflowTrackingStore implements WorkflowTrackingStore {
698
703
  getWorkflowRunsByAssistantId(tenantId: string, assistantId: string): Promise<WorkflowRun[]>;
699
704
  getWorkflowRunsByTenantId(tenantId: string): Promise<WorkflowRun[]>;
700
705
  createRunStep(request: CreateRunStepRequest): Promise<RunStep>;
706
+ upsertRunStep(request: CreateRunStepRequest): Promise<RunStep>;
701
707
  updateRunStep(runId: string, stepId: string, updates: UpdateRunStepRequest): Promise<RunStep | null>;
702
708
  getRunSteps(runId: string): Promise<RunStep[]>;
703
709
  getRunStepsByType(runId: string, stepType: StepType): Promise<RunStep[]>;
@@ -923,6 +929,7 @@ declare class PostgreSQLChannelInstallationStore implements ChannelInstallationS
923
929
  initialize(): Promise<void>;
924
930
  getInstallationById(installationId: string): Promise<ChannelInstallation | null>;
925
931
  getInstallationsByTenant(tenantId: string, channel?: ChannelInstallationType): Promise<ChannelInstallation[]>;
932
+ getAllInstallations(channel?: ChannelInstallationType): Promise<ChannelInstallation[]>;
926
933
  createInstallation(tenantId: string, installationId: string, data: CreateChannelInstallationRequest): Promise<ChannelInstallation>;
927
934
  updateInstallation(tenantId: string, installationId: string, updates: UpdateChannelInstallationRequest): Promise<ChannelInstallation | null>;
928
935
  deleteInstallation(tenantId: string, installationId: string): Promise<boolean>;
@@ -1075,12 +1082,59 @@ declare class PostgreSQLScheduleStorage implements ScheduleStorage {
1075
1082
  }
1076
1083
 
1077
1084
  /**
1078
- * createPgStoreConfig
1079
- *
1080
- * Creates a map of all PG store instances from a single connection string,
1081
- * ready to pass directly to configureStores().
1085
+ * PostgreSQL implementation of TaskStore
1082
1086
  */
1083
1087
 
1088
+ interface PostgreSQLTaskStoreOptions {
1089
+ poolConfig: string | PoolConfig;
1090
+ autoMigrate?: boolean;
1091
+ }
1092
+ declare class PostgreSQLTaskStore implements TaskStore {
1093
+ private pool;
1094
+ private migrationManager;
1095
+ private initialized;
1096
+ private ownsPool;
1097
+ private initPromise;
1098
+ constructor(options: PostgreSQLTaskStoreOptions);
1099
+ initialize(): Promise<void>;
1100
+ create(params: CreateTaskRequest & {
1101
+ tenantId: string;
1102
+ ownerType: string;
1103
+ ownerId: string;
1104
+ }): Promise<TaskItem>;
1105
+ getById(tenantId: string, id: string): Promise<TaskItem | null>;
1106
+ list(filter: TaskListFilter): Promise<TaskItem[]>;
1107
+ update(tenantId: string, id: string, updates: UpdateTaskRequest): Promise<TaskItem | null>;
1108
+ delete(tenantId: string, id: string): Promise<boolean>;
1109
+ dispose(): Promise<void>;
1110
+ private ensureInitialized;
1111
+ }
1112
+
1113
+ interface MenuStoreOptions {
1114
+ poolConfig: string | PoolConfig;
1115
+ autoMigrate?: boolean;
1116
+ }
1117
+ declare class MenuStore implements MenuRegistry {
1118
+ private pool;
1119
+ private migrationManager;
1120
+ private initialized;
1121
+ private initPromise;
1122
+ constructor(options: MenuStoreOptions);
1123
+ initialize(): Promise<void>;
1124
+ list(params: {
1125
+ tenantId: string;
1126
+ menuTarget?: string;
1127
+ }): Promise<MenuItem[]>;
1128
+ getById(id: string): Promise<MenuItem | null>;
1129
+ create(input: CreateMenuItemInput & {
1130
+ tenantId: string;
1131
+ }): Promise<MenuItem>;
1132
+ update(id: string, patch: UpdateMenuItemInput): Promise<MenuItem>;
1133
+ delete(id: string): Promise<void>;
1134
+ private ensureInitialized;
1135
+ private mapRowToMenuItem;
1136
+ }
1137
+
1084
1138
  declare function createPgStoreConfig(connectionString: string): {
1085
1139
  workspace: PostgreSQLWorkspaceStore;
1086
1140
  project: PostgreSQLProjectStore;
@@ -1097,8 +1151,11 @@ declare function createPgStoreConfig(connectionString: string): {
1097
1151
  assistant: PostgreSQLAssistantStore;
1098
1152
  workflowTracking: PostgreSQLWorkflowTrackingStore;
1099
1153
  threadMessageQueue: ThreadMessageQueueStore;
1154
+ task: PostgreSQLTaskStore;
1100
1155
  a2aApiKey: PostgreSQLA2AApiKeyStore;
1101
1156
  schedule: PostgreSQLScheduleStorage;
1157
+ menu: MenuStore;
1158
+ checkpoint: PostgresSaver;
1102
1159
  };
1103
1160
 
1104
1161
  /**
@@ -1453,6 +1510,7 @@ declare const createA2AApiKeysTable: Migration;
1453
1510
  */
1454
1511
 
1455
1512
  declare const createWorkflowTrackingTables: Migration;
1513
+ declare const addStepThreadId: Migration;
1456
1514
 
1457
1515
  interface ChannelIdentityMappingStoreOptions {
1458
1516
  poolConfig: string | PoolConfig;
@@ -1545,4 +1603,6 @@ declare const createEvalRunResultsTable: Migration;
1545
1603
  /** All eval migrations in version order */
1546
1604
  declare const evalMigrations: Migration[];
1547
1605
 
1548
- export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, type CreateChannelIdentityMappingInput, 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, ThreadMessageQueueStore, addAssistantTenantId, addProjectConfigColumn, addScheduleTenantId, addSkillTenantId, addThreadTenantId, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAssistantsTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMetricsConfigsTable, createPgStoreConfig, createProjectsTable, createScheduledTasksTable, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, evalMigrations };
1606
+ declare const createMenuItemsTable: Migration;
1607
+
1608
+ 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, ThreadMessageQueueStore, addAssistantTenantId, 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, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, evalMigrations };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,10 @@
1
1
  import { PoolConfig, PoolClient, Pool } 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, SkillStore, Skill, CreateSkillRequest } from '@axiom-lattice/protocols';
4
- export { Assistant, AssistantStore, Binding, BindingRegistry, ChannelInstallation, ChannelInstallationStore, CreateAssistantRequest, CreateBindingInput, CreateChannelInstallationRequest, CreateDatabaseConfigRequest, CreateEvalCaseRequest, CreateEvalProjectRequest, CreateEvalRunRequest, CreateEvalSuiteRequest, CreateMcpServerConfigRequest, CreateMetricsServerConfigRequest, CreateProjectRequest, CreateRunStepRequest, CreateSkillRequest, CreateTenantRequest, CreateThreadRequest, CreateUserRequest, CreateUserTenantLinkRequest, CreateWorkflowRunRequest, CreateWorkspaceRequest, DatabaseConfig, DatabaseConfigEntry, DatabaseConfigStore, DatabaseType, EvalCase, EvalProject, EvalProjectReport, EvalRun, EvalRunResult, EvalStore, EvalSuite, LarkChannelInstallationConfig, McpServerConfigEntry, McpServerConfigStore, MetricsServerConfig, MetricsServerConfigEntry, MetricsServerConfigStore, Project, ProjectStore, RunStep, ScheduleExecutionType, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, 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, 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, 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, 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, RunStep, ScheduleExecutionType, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, 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
+ import { PostgresSaver } from '@langchain/langgraph-checkpoint-postgres';
7
8
 
8
9
  /**
9
10
  * PostgreSQL implementation of ThreadStore
@@ -142,6 +143,10 @@ declare class PostgreSQLAssistantStore implements AssistantStore {
142
143
  * Check if assistant exists
143
144
  */
144
145
  hasAssistant(tenantId: string, id: string): Promise<boolean>;
146
+ /**
147
+ * Get assistant by owner user ID
148
+ */
149
+ getByOwner(tenantId: string, userId: string): Promise<Assistant | null>;
145
150
  /**
146
151
  * Dispose resources and close the connection pool
147
152
  * Should be called when the store is no longer needed
@@ -698,6 +703,7 @@ declare class PostgreSQLWorkflowTrackingStore implements WorkflowTrackingStore {
698
703
  getWorkflowRunsByAssistantId(tenantId: string, assistantId: string): Promise<WorkflowRun[]>;
699
704
  getWorkflowRunsByTenantId(tenantId: string): Promise<WorkflowRun[]>;
700
705
  createRunStep(request: CreateRunStepRequest): Promise<RunStep>;
706
+ upsertRunStep(request: CreateRunStepRequest): Promise<RunStep>;
701
707
  updateRunStep(runId: string, stepId: string, updates: UpdateRunStepRequest): Promise<RunStep | null>;
702
708
  getRunSteps(runId: string): Promise<RunStep[]>;
703
709
  getRunStepsByType(runId: string, stepType: StepType): Promise<RunStep[]>;
@@ -923,6 +929,7 @@ declare class PostgreSQLChannelInstallationStore implements ChannelInstallationS
923
929
  initialize(): Promise<void>;
924
930
  getInstallationById(installationId: string): Promise<ChannelInstallation | null>;
925
931
  getInstallationsByTenant(tenantId: string, channel?: ChannelInstallationType): Promise<ChannelInstallation[]>;
932
+ getAllInstallations(channel?: ChannelInstallationType): Promise<ChannelInstallation[]>;
926
933
  createInstallation(tenantId: string, installationId: string, data: CreateChannelInstallationRequest): Promise<ChannelInstallation>;
927
934
  updateInstallation(tenantId: string, installationId: string, updates: UpdateChannelInstallationRequest): Promise<ChannelInstallation | null>;
928
935
  deleteInstallation(tenantId: string, installationId: string): Promise<boolean>;
@@ -1075,12 +1082,59 @@ declare class PostgreSQLScheduleStorage implements ScheduleStorage {
1075
1082
  }
1076
1083
 
1077
1084
  /**
1078
- * createPgStoreConfig
1079
- *
1080
- * Creates a map of all PG store instances from a single connection string,
1081
- * ready to pass directly to configureStores().
1085
+ * PostgreSQL implementation of TaskStore
1082
1086
  */
1083
1087
 
1088
+ interface PostgreSQLTaskStoreOptions {
1089
+ poolConfig: string | PoolConfig;
1090
+ autoMigrate?: boolean;
1091
+ }
1092
+ declare class PostgreSQLTaskStore implements TaskStore {
1093
+ private pool;
1094
+ private migrationManager;
1095
+ private initialized;
1096
+ private ownsPool;
1097
+ private initPromise;
1098
+ constructor(options: PostgreSQLTaskStoreOptions);
1099
+ initialize(): Promise<void>;
1100
+ create(params: CreateTaskRequest & {
1101
+ tenantId: string;
1102
+ ownerType: string;
1103
+ ownerId: string;
1104
+ }): Promise<TaskItem>;
1105
+ getById(tenantId: string, id: string): Promise<TaskItem | null>;
1106
+ list(filter: TaskListFilter): Promise<TaskItem[]>;
1107
+ update(tenantId: string, id: string, updates: UpdateTaskRequest): Promise<TaskItem | null>;
1108
+ delete(tenantId: string, id: string): Promise<boolean>;
1109
+ dispose(): Promise<void>;
1110
+ private ensureInitialized;
1111
+ }
1112
+
1113
+ interface MenuStoreOptions {
1114
+ poolConfig: string | PoolConfig;
1115
+ autoMigrate?: boolean;
1116
+ }
1117
+ declare class MenuStore implements MenuRegistry {
1118
+ private pool;
1119
+ private migrationManager;
1120
+ private initialized;
1121
+ private initPromise;
1122
+ constructor(options: MenuStoreOptions);
1123
+ initialize(): Promise<void>;
1124
+ list(params: {
1125
+ tenantId: string;
1126
+ menuTarget?: string;
1127
+ }): Promise<MenuItem[]>;
1128
+ getById(id: string): Promise<MenuItem | null>;
1129
+ create(input: CreateMenuItemInput & {
1130
+ tenantId: string;
1131
+ }): Promise<MenuItem>;
1132
+ update(id: string, patch: UpdateMenuItemInput): Promise<MenuItem>;
1133
+ delete(id: string): Promise<void>;
1134
+ private ensureInitialized;
1135
+ private mapRowToMenuItem;
1136
+ }
1137
+
1084
1138
  declare function createPgStoreConfig(connectionString: string): {
1085
1139
  workspace: PostgreSQLWorkspaceStore;
1086
1140
  project: PostgreSQLProjectStore;
@@ -1097,8 +1151,11 @@ declare function createPgStoreConfig(connectionString: string): {
1097
1151
  assistant: PostgreSQLAssistantStore;
1098
1152
  workflowTracking: PostgreSQLWorkflowTrackingStore;
1099
1153
  threadMessageQueue: ThreadMessageQueueStore;
1154
+ task: PostgreSQLTaskStore;
1100
1155
  a2aApiKey: PostgreSQLA2AApiKeyStore;
1101
1156
  schedule: PostgreSQLScheduleStorage;
1157
+ menu: MenuStore;
1158
+ checkpoint: PostgresSaver;
1102
1159
  };
1103
1160
 
1104
1161
  /**
@@ -1453,6 +1510,7 @@ declare const createA2AApiKeysTable: Migration;
1453
1510
  */
1454
1511
 
1455
1512
  declare const createWorkflowTrackingTables: Migration;
1513
+ declare const addStepThreadId: Migration;
1456
1514
 
1457
1515
  interface ChannelIdentityMappingStoreOptions {
1458
1516
  poolConfig: string | PoolConfig;
@@ -1545,4 +1603,6 @@ declare const createEvalRunResultsTable: Migration;
1545
1603
  /** All eval migrations in version order */
1546
1604
  declare const evalMigrations: Migration[];
1547
1605
 
1548
- export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, type CreateChannelIdentityMappingInput, 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, ThreadMessageQueueStore, addAssistantTenantId, addProjectConfigColumn, addScheduleTenantId, addSkillTenantId, addThreadTenantId, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAssistantsTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMetricsConfigsTable, createPgStoreConfig, createProjectsTable, createScheduledTasksTable, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, evalMigrations };
1606
+ declare const createMenuItemsTable: Migration;
1607
+
1608
+ 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, ThreadMessageQueueStore, addAssistantTenantId, 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, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, evalMigrations };