@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.
- package/.turbo/turbo-build.log +10 -10
- package/CHANGELOG.md +18 -0
- package/dist/index.d.mts +67 -7
- package/dist/index.d.ts +67 -7
- package/dist/index.js +641 -32
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +638 -32
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -4
- package/scripts/check-migration-versions.mjs +37 -0
- package/src/createPgStoreConfig.ts +19 -16
- package/src/index.ts +6 -0
- package/src/migrations/add_workspace_project_to_queue.ts +30 -0
- package/src/migrations/assistant_owner_user_migration.ts +26 -0
- package/src/migrations/menu_items_migration.ts +38 -0
- package/src/migrations/task_migration.ts +51 -0
- package/src/migrations/workflow_tracking_migrations.ts +19 -0
- package/src/stores/MenuStore.ts +204 -0
- package/src/stores/PostgreSQLAssistantStore.ts +47 -4
- package/src/stores/PostgreSQLChannelInstallationStore.ts +26 -0
- package/src/stores/PostgreSQLTaskStore.ts +294 -0
- package/src/stores/PostgreSQLWorkflowTrackingStore.ts +29 -3
- package/src/stores/ThreadMessageQueueStore.ts +13 -9
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @axiom-lattice/pg-stores@1.0.
|
|
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
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
[34mCLI[39m Target: es2020
|
|
9
9
|
[34mCJS[39m Build start
|
|
10
10
|
[34mESM[39m Build start
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
11
|
+
[32mCJS[39m [1mdist/index.js [22m[32m231.12 KB[39m
|
|
12
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m427.92 KB[39m
|
|
13
|
+
[32mCJS[39m ⚡️ Build success in 658ms
|
|
14
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m225.62 KB[39m
|
|
15
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m427.74 KB[39m
|
|
16
|
+
[32mESM[39m ⚡️ Build success in 685ms
|
|
17
17
|
[34mDTS[39m Build start
|
|
18
|
-
[32mDTS[39m ⚡️ Build success in
|
|
19
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
20
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[
|
|
18
|
+
[32mDTS[39m ⚡️ Build success in 16427ms
|
|
19
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m53.12 KB[39m
|
|
20
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m53.12 KB[39m
|
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
|
-
*
|
|
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
|
-
|
|
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
|
-
*
|
|
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
|
-
|
|
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 };
|