@axiom-lattice/pg-stores 1.0.68 → 1.0.70
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 +17 -0
- package/dist/index.d.mts +71 -2
- package/dist/index.d.ts +71 -2
- package/dist/index.js +234 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +231 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/createPgStoreConfig.ts +2 -0
- package/src/index.ts +4 -0
- package/src/migrations/a2a_api_key_migration.ts +36 -0
- package/src/migrations/add_project_config_column.ts +34 -0
- package/src/migrations/migration.ts +25 -0
- package/src/stores/PostgreSQLA2AApiKeyStore.ts +187 -0
- package/src/stores/PostgreSQLProjectStore.ts +22 -5
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.70 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
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m206.41 KB[39m
|
|
12
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m392.08 KB[39m
|
|
13
|
+
[32mESM[39m ⚡️ Build success in 530ms
|
|
14
|
+
[32mCJS[39m [1mdist/index.js [22m[32m211.69 KB[39m
|
|
15
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m392.24 KB[39m
|
|
16
|
+
[32mCJS[39m ⚡️ Build success in 532ms
|
|
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 17337ms
|
|
19
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m50.88 KB[39m
|
|
20
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m50.88 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @axiom-lattice/pg-stores
|
|
2
2
|
|
|
3
|
+
## 1.0.70
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [ec290af]
|
|
8
|
+
- @axiom-lattice/core@2.1.79
|
|
9
|
+
- @axiom-lattice/protocols@2.1.41
|
|
10
|
+
|
|
11
|
+
## 1.0.69
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- b7cd409: enhance more features a2a, cli
|
|
16
|
+
- Updated dependencies [b7cd409]
|
|
17
|
+
- @axiom-lattice/protocols@2.1.40
|
|
18
|
+
- @axiom-lattice/core@2.1.78
|
|
19
|
+
|
|
3
20
|
## 1.0.68
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, SkillStore, Skill, CreateSkillRequest } 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, SkillStore, Skill, CreateSkillRequest } from '@axiom-lattice/protocols';
|
|
4
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';
|
|
5
5
|
import { IMessageQueueStore, AddMessageParams, PendingMessage, ThreadInfo } from '@axiom-lattice/core';
|
|
6
6
|
export { AddMessageParams, PendingMessage, ThreadInfo } from '@axiom-lattice/core';
|
|
@@ -550,6 +550,10 @@ declare class PostgreSQLProjectStore implements ProjectStore {
|
|
|
550
550
|
createProject(tenantId: string, workspaceId: string, id: string, data: CreateProjectRequest): Promise<Project>;
|
|
551
551
|
/**
|
|
552
552
|
* Update an existing project
|
|
553
|
+
*
|
|
554
|
+
* @remarks
|
|
555
|
+
* - The `config` field uses **replace** semantics: if provided, it completely
|
|
556
|
+
* overwrites the existing config. To preserve the current config, omit this field.
|
|
553
557
|
*/
|
|
554
558
|
updateProject(tenantId: string, id: string, updates: UpdateProjectRequest): Promise<Project | null>;
|
|
555
559
|
/**
|
|
@@ -928,6 +932,32 @@ declare class PostgreSQLChannelInstallationStore implements ChannelInstallationS
|
|
|
928
932
|
private decryptSecrets;
|
|
929
933
|
}
|
|
930
934
|
|
|
935
|
+
interface PostgreSQLA2AApiKeyStoreOptions {
|
|
936
|
+
poolConfig: string | PoolConfig;
|
|
937
|
+
autoMigrate?: boolean;
|
|
938
|
+
}
|
|
939
|
+
declare class PostgreSQLA2AApiKeyStore implements A2AApiKeyStore {
|
|
940
|
+
private pool;
|
|
941
|
+
private migrationManager;
|
|
942
|
+
private initialized;
|
|
943
|
+
private initPromise;
|
|
944
|
+
constructor(options: PostgreSQLA2AApiKeyStoreOptions);
|
|
945
|
+
initialize(): Promise<void>;
|
|
946
|
+
private ensureInitialized;
|
|
947
|
+
findByKey(key: string): Promise<A2AApiKeyRecord | null>;
|
|
948
|
+
list(params: {
|
|
949
|
+
tenantId?: string;
|
|
950
|
+
limit?: number;
|
|
951
|
+
offset?: number;
|
|
952
|
+
}): Promise<A2AApiKeyRecord[]>;
|
|
953
|
+
create(input: CreateA2AApiKeyInput): Promise<A2AApiKeyRecord>;
|
|
954
|
+
disable(id: string): Promise<A2AApiKeyRecord>;
|
|
955
|
+
enable(id: string): Promise<A2AApiKeyRecord>;
|
|
956
|
+
rotate(id: string): Promise<A2AApiKeyRecord>;
|
|
957
|
+
delete(id: string): Promise<void>;
|
|
958
|
+
loadIntoMap(): Promise<Map<string, A2AApiKeyEntry>>;
|
|
959
|
+
}
|
|
960
|
+
|
|
931
961
|
/**
|
|
932
962
|
* PostgreSQL implementation of ScheduleStorage
|
|
933
963
|
*
|
|
@@ -1067,6 +1097,7 @@ declare function createPgStoreConfig(connectionString: string): {
|
|
|
1067
1097
|
assistant: PostgreSQLAssistantStore;
|
|
1068
1098
|
workflowTracking: PostgreSQLWorkflowTrackingStore;
|
|
1069
1099
|
threadMessageQueue: ThreadMessageQueueStore;
|
|
1100
|
+
a2aApiKey: PostgreSQLA2AApiKeyStore;
|
|
1070
1101
|
schedule: PostgreSQLScheduleStorage;
|
|
1071
1102
|
};
|
|
1072
1103
|
|
|
@@ -1147,6 +1178,31 @@ declare class PostgreSQLSkillStore implements SkillStore {
|
|
|
1147
1178
|
|
|
1148
1179
|
/**
|
|
1149
1180
|
* Migration system for database schema management
|
|
1181
|
+
*
|
|
1182
|
+
* ## Migration Version Rules
|
|
1183
|
+
*
|
|
1184
|
+
* Version numbers are globally unique across all migrations applied to the same
|
|
1185
|
+
* database. They are NOT auto-assigned — you must pick one manually.
|
|
1186
|
+
*
|
|
1187
|
+
* ### Numbering scheme
|
|
1188
|
+
*
|
|
1189
|
+
* | Range | Purpose |
|
|
1190
|
+
* |---------|--------------------------------------|
|
|
1191
|
+
* | 1–99 | Core table creation + column changes |
|
|
1192
|
+
* | 100+ | Independent feature modules |
|
|
1193
|
+
*
|
|
1194
|
+
* ### How to pick a version
|
|
1195
|
+
*
|
|
1196
|
+
* 1. Run `grep -rn "version:" src/migrations/ | sort -t: -k3 -n` to list all versions
|
|
1197
|
+
* 2. For a core column change: find the next unused number in the 1–99 range
|
|
1198
|
+
* 3. For a new feature module: find the next unused number in the 100+ range
|
|
1199
|
+
* 4. Verify your chosen version is NOT in the grep output
|
|
1200
|
+
*
|
|
1201
|
+
* @remarks
|
|
1202
|
+
* - Migrations are sorted and applied in version order on startup
|
|
1203
|
+
* - The version must be strictly greater than any migration it depends on
|
|
1204
|
+
* - Use `IF NOT EXISTS` / `IF EXISTS` in SQL to keep migrations idempotent
|
|
1205
|
+
* - A version number collision will cause one migration to be silently skipped
|
|
1150
1206
|
*/
|
|
1151
1207
|
|
|
1152
1208
|
/**
|
|
@@ -1343,6 +1399,17 @@ declare const createWorkspacesTable: Migration;
|
|
|
1343
1399
|
*/
|
|
1344
1400
|
declare const createProjectsTable: Migration;
|
|
1345
1401
|
|
|
1402
|
+
/**
|
|
1403
|
+
* Migration: Add config column to lattice_projects
|
|
1404
|
+
*
|
|
1405
|
+
* Adds a JSONB `config` column to the `lattice_projects` table for storing
|
|
1406
|
+
* application-specific project configuration. Also creates a GIN index for
|
|
1407
|
+
* efficient JSONB queries.
|
|
1408
|
+
*/
|
|
1409
|
+
|
|
1410
|
+
/** Adds config JSONB column + GIN index to lattice_projects */
|
|
1411
|
+
declare const addProjectConfigColumn: Migration;
|
|
1412
|
+
|
|
1346
1413
|
/**
|
|
1347
1414
|
* User table migrations
|
|
1348
1415
|
*/
|
|
@@ -1379,6 +1446,8 @@ declare const alterChannelInstallationsTable: Migration;
|
|
|
1379
1446
|
|
|
1380
1447
|
declare const createChannelBindingsTable: Migration;
|
|
1381
1448
|
|
|
1449
|
+
declare const createA2AApiKeysTable: Migration;
|
|
1450
|
+
|
|
1382
1451
|
/**
|
|
1383
1452
|
* PostgreSQL migrations for workflow tracking tables
|
|
1384
1453
|
*/
|
|
@@ -1476,4 +1545,4 @@ declare const createEvalRunResultsTable: Migration;
|
|
|
1476
1545
|
/** All eval migrations in version order */
|
|
1477
1546
|
declare const evalMigrations: Migration[];
|
|
1478
1547
|
|
|
1479
|
-
export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, type CreateChannelIdentityMappingInput, type Migration, MigrationManager, 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, addScheduleTenantId, addSkillTenantId, addThreadTenantId, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createAssistantsTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMetricsConfigsTable, createPgStoreConfig, createProjectsTable, createScheduledTasksTable, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, evalMigrations };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, SkillStore, Skill, CreateSkillRequest } 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, SkillStore, Skill, CreateSkillRequest } from '@axiom-lattice/protocols';
|
|
4
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';
|
|
5
5
|
import { IMessageQueueStore, AddMessageParams, PendingMessage, ThreadInfo } from '@axiom-lattice/core';
|
|
6
6
|
export { AddMessageParams, PendingMessage, ThreadInfo } from '@axiom-lattice/core';
|
|
@@ -550,6 +550,10 @@ declare class PostgreSQLProjectStore implements ProjectStore {
|
|
|
550
550
|
createProject(tenantId: string, workspaceId: string, id: string, data: CreateProjectRequest): Promise<Project>;
|
|
551
551
|
/**
|
|
552
552
|
* Update an existing project
|
|
553
|
+
*
|
|
554
|
+
* @remarks
|
|
555
|
+
* - The `config` field uses **replace** semantics: if provided, it completely
|
|
556
|
+
* overwrites the existing config. To preserve the current config, omit this field.
|
|
553
557
|
*/
|
|
554
558
|
updateProject(tenantId: string, id: string, updates: UpdateProjectRequest): Promise<Project | null>;
|
|
555
559
|
/**
|
|
@@ -928,6 +932,32 @@ declare class PostgreSQLChannelInstallationStore implements ChannelInstallationS
|
|
|
928
932
|
private decryptSecrets;
|
|
929
933
|
}
|
|
930
934
|
|
|
935
|
+
interface PostgreSQLA2AApiKeyStoreOptions {
|
|
936
|
+
poolConfig: string | PoolConfig;
|
|
937
|
+
autoMigrate?: boolean;
|
|
938
|
+
}
|
|
939
|
+
declare class PostgreSQLA2AApiKeyStore implements A2AApiKeyStore {
|
|
940
|
+
private pool;
|
|
941
|
+
private migrationManager;
|
|
942
|
+
private initialized;
|
|
943
|
+
private initPromise;
|
|
944
|
+
constructor(options: PostgreSQLA2AApiKeyStoreOptions);
|
|
945
|
+
initialize(): Promise<void>;
|
|
946
|
+
private ensureInitialized;
|
|
947
|
+
findByKey(key: string): Promise<A2AApiKeyRecord | null>;
|
|
948
|
+
list(params: {
|
|
949
|
+
tenantId?: string;
|
|
950
|
+
limit?: number;
|
|
951
|
+
offset?: number;
|
|
952
|
+
}): Promise<A2AApiKeyRecord[]>;
|
|
953
|
+
create(input: CreateA2AApiKeyInput): Promise<A2AApiKeyRecord>;
|
|
954
|
+
disable(id: string): Promise<A2AApiKeyRecord>;
|
|
955
|
+
enable(id: string): Promise<A2AApiKeyRecord>;
|
|
956
|
+
rotate(id: string): Promise<A2AApiKeyRecord>;
|
|
957
|
+
delete(id: string): Promise<void>;
|
|
958
|
+
loadIntoMap(): Promise<Map<string, A2AApiKeyEntry>>;
|
|
959
|
+
}
|
|
960
|
+
|
|
931
961
|
/**
|
|
932
962
|
* PostgreSQL implementation of ScheduleStorage
|
|
933
963
|
*
|
|
@@ -1067,6 +1097,7 @@ declare function createPgStoreConfig(connectionString: string): {
|
|
|
1067
1097
|
assistant: PostgreSQLAssistantStore;
|
|
1068
1098
|
workflowTracking: PostgreSQLWorkflowTrackingStore;
|
|
1069
1099
|
threadMessageQueue: ThreadMessageQueueStore;
|
|
1100
|
+
a2aApiKey: PostgreSQLA2AApiKeyStore;
|
|
1070
1101
|
schedule: PostgreSQLScheduleStorage;
|
|
1071
1102
|
};
|
|
1072
1103
|
|
|
@@ -1147,6 +1178,31 @@ declare class PostgreSQLSkillStore implements SkillStore {
|
|
|
1147
1178
|
|
|
1148
1179
|
/**
|
|
1149
1180
|
* Migration system for database schema management
|
|
1181
|
+
*
|
|
1182
|
+
* ## Migration Version Rules
|
|
1183
|
+
*
|
|
1184
|
+
* Version numbers are globally unique across all migrations applied to the same
|
|
1185
|
+
* database. They are NOT auto-assigned — you must pick one manually.
|
|
1186
|
+
*
|
|
1187
|
+
* ### Numbering scheme
|
|
1188
|
+
*
|
|
1189
|
+
* | Range | Purpose |
|
|
1190
|
+
* |---------|--------------------------------------|
|
|
1191
|
+
* | 1–99 | Core table creation + column changes |
|
|
1192
|
+
* | 100+ | Independent feature modules |
|
|
1193
|
+
*
|
|
1194
|
+
* ### How to pick a version
|
|
1195
|
+
*
|
|
1196
|
+
* 1. Run `grep -rn "version:" src/migrations/ | sort -t: -k3 -n` to list all versions
|
|
1197
|
+
* 2. For a core column change: find the next unused number in the 1–99 range
|
|
1198
|
+
* 3. For a new feature module: find the next unused number in the 100+ range
|
|
1199
|
+
* 4. Verify your chosen version is NOT in the grep output
|
|
1200
|
+
*
|
|
1201
|
+
* @remarks
|
|
1202
|
+
* - Migrations are sorted and applied in version order on startup
|
|
1203
|
+
* - The version must be strictly greater than any migration it depends on
|
|
1204
|
+
* - Use `IF NOT EXISTS` / `IF EXISTS` in SQL to keep migrations idempotent
|
|
1205
|
+
* - A version number collision will cause one migration to be silently skipped
|
|
1150
1206
|
*/
|
|
1151
1207
|
|
|
1152
1208
|
/**
|
|
@@ -1343,6 +1399,17 @@ declare const createWorkspacesTable: Migration;
|
|
|
1343
1399
|
*/
|
|
1344
1400
|
declare const createProjectsTable: Migration;
|
|
1345
1401
|
|
|
1402
|
+
/**
|
|
1403
|
+
* Migration: Add config column to lattice_projects
|
|
1404
|
+
*
|
|
1405
|
+
* Adds a JSONB `config` column to the `lattice_projects` table for storing
|
|
1406
|
+
* application-specific project configuration. Also creates a GIN index for
|
|
1407
|
+
* efficient JSONB queries.
|
|
1408
|
+
*/
|
|
1409
|
+
|
|
1410
|
+
/** Adds config JSONB column + GIN index to lattice_projects */
|
|
1411
|
+
declare const addProjectConfigColumn: Migration;
|
|
1412
|
+
|
|
1346
1413
|
/**
|
|
1347
1414
|
* User table migrations
|
|
1348
1415
|
*/
|
|
@@ -1379,6 +1446,8 @@ declare const alterChannelInstallationsTable: Migration;
|
|
|
1379
1446
|
|
|
1380
1447
|
declare const createChannelBindingsTable: Migration;
|
|
1381
1448
|
|
|
1449
|
+
declare const createA2AApiKeysTable: Migration;
|
|
1450
|
+
|
|
1382
1451
|
/**
|
|
1383
1452
|
* PostgreSQL migrations for workflow tracking tables
|
|
1384
1453
|
*/
|
|
@@ -1476,4 +1545,4 @@ declare const createEvalRunResultsTable: Migration;
|
|
|
1476
1545
|
/** All eval migrations in version order */
|
|
1477
1546
|
declare const evalMigrations: Migration[];
|
|
1478
1547
|
|
|
1479
|
-
export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, type CreateChannelIdentityMappingInput, type Migration, MigrationManager, 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, addScheduleTenantId, addSkillTenantId, addThreadTenantId, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createAssistantsTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMetricsConfigsTable, createPgStoreConfig, createProjectsTable, createScheduledTasksTable, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, evalMigrations };
|
|
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 };
|