@axiom-lattice/pg-stores 5.1.2 → 5.2.1

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@5.1.2 build /home/runner/work/agentic/agentic/packages/pg-stores
2
+ > @axiom-lattice/pg-stores@5.2.1 build /home/runner/work/agentic/agentic/packages/pg-stores
3
3
  > tsup src/index.ts --format cjs,esm --dts --sourcemap
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -8,13 +8,13 @@
8
8
  CLI Target: es2020
9
9
  CJS Build start
10
10
  ESM Build start
11
- CJS dist/index.js 569.35 KB
12
- CJS dist/index.js.map 1.01 MB
13
- CJS ⚡️ Build success in 1291ms
14
- ESM dist/index.mjs 558.27 KB
15
- ESM dist/index.mjs.map 1.01 MB
16
- ESM ⚡️ Build success in 1389ms
11
+ CJS dist/index.js 585.57 KB
12
+ CJS dist/index.js.map 1.04 MB
13
+ CJS ⚡️ Build success in 896ms
14
+ ESM dist/index.mjs 574.26 KB
15
+ ESM dist/index.mjs.map 1.04 MB
16
+ ESM ⚡️ Build success in 900ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 15231ms
19
- DTS dist/index.d.ts 120.00 KB
20
- DTS dist/index.d.mts 120.00 KB
18
+ DTS ⚡️ Build success in 10253ms
19
+ DTS dist/index.d.ts 123.99 KB
20
+ DTS dist/index.d.mts 123.99 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,107 @@
1
1
  # @axiom-lattice/pg-stores
2
2
 
3
+ ## 5.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - b928a17: Follow up the Wiz remediation with `pnpm audit`: bump the pinned transitive
8
+ dependencies to the advisories published after the scan (shell-quote 1.11 —
9
+ critical command injection — fastify 5.12.6, @fastify/busboy 3.2.2,
10
+ @hono/node-server 2.1.3, brace-expansion 1.1.21/2.1.7/5.0.12,
11
+ body-parser 1.20.9/2.4.0, decode-uri-component 0.5.1, fast-uri 3.1.9/4.2.3,
12
+ glob 10.5/11.1/14.0.4, langsmith 0.12, picomatch 2.3.2/4.0.4,
13
+ protobufjs 7.6.5/8.8.1, source-map-js 1.2.2, undici 7.30.1, sanitize-html
14
+ 2.18.1, tar 7.5.22, tmp 0.2.7, vite 6.4.5, yaml 2.9.1, ajv 6.14/8.18,
15
+ mysql2 3.23.1, uuid 11.1, and others). Overrides are scoped per major line
16
+ where different majors are both required, and none pins below a declaring
17
+ package's range. Further zero-out pass: echarts 5.5 → 6.1 in react-sdk,
18
+ katex 0.19.1 (the patched range starts at 0.18.2), glob 14.0.4 for every
19
+ affected major line (10/11/13/14; glob 7 is outside the advisory range),
20
+ minimatch 11.0.8 for every vulnerable line, rimraf 4/5 → 6.1.4 (drops the
21
+ glob 9 dependency), ibm-cloud-sdk-core 5.9.4 (pulls file-type 21.3.4), and
22
+ fast-xml-parser 5.12.0. The client-sdk build moves from tsup 6.7 to 8.5,
23
+ clearing the last GHSA-3mv9-4h5g-vhg3 finding. Drop the unused `xlsx`
24
+ dependency from `apps/web`, which has no patched npm release.
25
+
26
+ Overrides only apply to this monorepo, so also raise the published packages'
27
+ own dependency ranges to patched versions, otherwise downstream consumers
28
+ (fina_demo) resolve the old lower bounds when they reinstall: fastify
29
+ ^5.12.6 (gateway, microsandbox-service, opensandbox-gateway), react-router
30
+ ^7.18.2, vite ^6.4.5, mysql2 ^3.23.1 (core), and uuid ^11.1.1 (core, gateway,
31
+ pg-stores, react-sdk, and the cli-a2a peer range).
32
+
33
+ - Updated dependencies [b928a17]
34
+ - @axiom-lattice/core@12.3.1
35
+
36
+ ## 5.2.0
37
+
38
+ ### Minor Changes
39
+
40
+ - 2554b78: Add personal-assistant-scoped MCP server configs in their own data domain.
41
+ Configs live in a dedicated `lattice_personal_mcp_server_configs` /
42
+ `lt_personal_mcp_configs` table (PG v220) keyed by
43
+ `(tenantId, ownerAssistantId, key)`, so tenant listings, tenant export/import,
44
+ startup restore, and older replicas never read them. A new
45
+ `/api/personal-mcp-servers` route family resolves the caller's personal
46
+ assistant server-side (no client-supplied assistant id) and returns 404 on
47
+ replicas that predate it rather than falling back to tenant CRUD.
48
+
49
+ Personal MCP tools register into a per-assistant tool bucket and are mounted
50
+ automatically only for the owning assistant, with personal keys shadowing the
51
+ same tenant key and tenant tools still available as fallback. Connections are
52
+ established lazily on the first assistant build, bounded by a sync budget, and
53
+ cross-replica invalidation rides a separate `personal-mcp-config-changed`
54
+ outbox topic that older replicas ignore. Deleting a personal assistant or an
55
+ assistant purges its personal MCP configs and runtime.
56
+
57
+ The MCP drawer now takes an `apiBasePath`, and the personal assistant page
58
+ opens it against the personal routes. Tool selection is reconciled onto the
59
+ live tool list so servers that rename tools each session no longer lose the
60
+ saved selection; the tools endpoint returns the reconciled `selectedTools`, and
61
+ the tools modal gains select-all/deselect-all controls.
62
+
63
+ - 1a4f8fa: Add an append-only platform audit foundation. Admin Center platform mutations are
64
+ captured with the real human initiator, source, route, target tenant, redacted
65
+ request/response, status, and duration. The audit store is available in InMemory, Local
66
+ SQLite, and PostgreSQL, with `GET /api/platform/audit` and client SDK methods.
67
+ - 9107769: Add role-inherited Platform Ops Agent write tools and high-risk playbooks.
68
+ Owners and admins can create/update/delete platform users, grant roles, manage
69
+ invitations/invite links/tenants/members, configure OIDC providers, resolve SSO
70
+ claims, patch settings, and update branding; auditors stay read-only, owner-role
71
+ changes require an owner, and the hidden `__platform__` tenant is protected.
72
+ Every write is audited with the human initiator and the Ops Agent
73
+ thread/tool executor. High-risk operations raise a HITL `confirm` interrupt and execute only after
74
+ the user approves them. The old private Ops thread/message/SSE routes,
75
+ `platformOpsConfirmation` store/service, PG v220 migration, confirm/cancel
76
+ routes, and custom `OpsAgentPanel`/`OpsToolCard` were removed; only
77
+ `/api/platform/ops/config` remains. The Admin Center Ops page now reuses the
78
+ standard `LatticeChat`/AgentRun stack (including the embedded chat sidebar for
79
+ New Thread and History). Platform scope only opens the standard chat route
80
+ families for the fixed `platform-ops` assistant after re-checking the live
81
+ platform role (including the legacy Admin Center `/api/users`, `/api/tenants`,
82
+ and `/api/oidc-providers` routes). Ops threads/runs use a fixed internal **sandbox** workspace/project (with filesystem middleware) inside the hidden
83
+ platform tenant, preserving normal workspace/project thread isolation. The
84
+ signed console session is the tenant authority, not a client-supplied header. A real-Gateway Playwright spec covers the
85
+ platform Ops chat, HITL confirm/resume, and the resulting playbook audit row.
86
+ Ops gains a read-only `ops_list_audit` tool with filters and bounded pagination.
87
+ List tools accept bounded `limit` values, and writes share a per-user
88
+ `platform.ops.write` rate limit (60/minute) that returns
89
+ `PLATFORM_OPS_RATE_LIMITED` and records the refusal in the audit log. Tool
90
+ failures now consistently use `{ success:false, error:{ code, message } }`.
91
+
92
+ ### Patch Changes
93
+
94
+ - Updated dependencies [e5dd58b]
95
+ - Updated dependencies [b3a3428]
96
+ - Updated dependencies [2554b78]
97
+ - Updated dependencies [1a4f8fa]
98
+ - Updated dependencies [cb411cc]
99
+ - Updated dependencies [a43e635]
100
+ - Updated dependencies [9107769]
101
+ - Updated dependencies [c9b8df8]
102
+ - @axiom-lattice/protocols@7.3.0
103
+ - @axiom-lattice/core@12.3.0
104
+
3
105
  ## 5.1.2
4
106
 
5
107
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Pool, PoolConfig, PoolClient } from 'pg';
2
2
  export { Pool, PoolConfig } from 'pg';
3
- import { ThreadStore, Thread, CreateThreadRequest, AssistantStore, Assistant, CreateAssistantRequest, DatabaseConfigStore, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, ConnectionStore, ConnectionEntry, MetricsServerConfigStore, MetricsServerConfigEntry, CreateMetricsServerConfigRequest, UpdateMetricsServerConfigRequest, McpServerConfigStore, McpServerConfigEntry, CreateMcpServerConfigRequest, UpdateMcpServerConfigRequest, WorkspaceStore, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ProjectStore, ProjectFilter, Project, CreateProjectRequest, UpdateProjectRequest, UpdateProjectCapabilityBundlesResult, UserStore, User, CreateUserRequest, UpdateUserRequest, TenantStore, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLinkStore, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, UserExternalIdentityStore, UserExternalIdentity, OidcProviderConfigStore, OidcProviderConfig, CreateOidcProviderConfigInput, UpdateOidcProviderConfigInput, PlatformMemberStore, PlatformMember, PlatformInvitationStore, PlatformInvitation, OidcIdentityClaimStore, OidcIdentityClaimStatus, OidcIdentityClaim, CreateOidcIdentityClaimInput, UpdateOidcIdentityClaimInput, OidcIdentityClaimApproval, InviteLinkStore, InviteLink, CreateInviteLinkInput, WorkflowTrackingStore, CreateWorkflowRunRequest, WorkflowRun, UpdateWorkflowRunRequest, QueryWorkflowRunsOptions, QueryWorkflowRunsResult, CreateRunStepRequest, RunStep, UpdateRunStepRequest, StepType, EvalStore, EvalProject, CreateEvalProjectRequest, EvalSuite, CreateEvalSuiteRequest, EvalCase, CreateEvalCaseRequest, EvalRun, CreateEvalRunRequest, EvalRunResult, EvalProjectReport, BindingRegistry, Binding, CreateBindingInput, BindingMutablePatch, BindingListParams, ChannelInstallationStore, ChannelInstallation, ChannelInstallationType, CreateChannelInstallationInput, UpdateChannelInstallationRequest, A2AApiKeyStore, A2AApiKeyRecord, CreateA2AApiKeyInput, UpdateA2AApiKeyInput, A2AApiKeyEntry, OpenAuditStore, OpenAuditQuery, OpenAuditRecord, OpenAuditAppendInput, AgentWebAppStore, AgentWebApp, CreateAgentWebAppInput, AgentWebAppStorePatch, AgentWebAppUpdateOptions, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TaskStore, CreateTaskRequest, TaskItem, TaskListFilter, TaskDependentListQuery, UpdateTaskRequest, TaskMutationSnapshot, TaskWorkItemStore, CreateWorkItemRequest, TaskWorkItem, CreateWorkItemIfAbsentRequest, TaskWorkItemListFilter, ProjectLifecycleEventQuery, MenuRegistry, MenuItem, CreateMenuItemInput, UpdateMenuItemInput, SharedResourceStore, ShareRecord, CreateShareRecord, CollectionStore, Collection, CreateCollectionRequest, UpdateCollectionRequest, VectorStoreProvider, VectorStoreCreateParams, CapabilityBundleStore, CapabilityBundle, InternalCreateCapabilityBundleInput, InternalUpdateCapabilityBundleInput, CapabilityBundleDeleteResult, ProjectRoomStore, ProjectRoom, ProjectMembershipStore, ProjectMembership, ProjectHumanRole, ProjectMembershipMutationResult, ProjectBotMembershipStore, ProjectBotMembership, ProjectRoomMessageStore, ProjectRoomMessage, ProjectRoomReadStateStore, ProjectRoomReadState, UserPushSubscriptionStore, UserPushSubscription, ModelProviderStore, ModelProviderEntry, CreateModelProviderRequest, UpdateModelProviderRequest, ModelProviderStatus, ModelProviderModelEntry, ProviderModelInput, LeaseStore, LeaseRecord, OutboxStore, OutboxEvent, PluginDeploymentStore, PluginDeployment, PlatformSettingsStore, PlatformSettingsRecord, PlatformSettingsDocument, ChannelReplyJobStore, CreateChannelReplyJobInput, ChannelReplyJob, CheckpointStorage, CheckpointMaintenance, ThreadCheckpointStorage, StoreProtocol, StorePutInput, StoreItem, StoreSearchInput, SkillStore, Skill, CreateSkillRequest } from '@axiom-lattice/protocols';
3
+ import { ThreadStore, Thread, CreateThreadRequest, AssistantStore, Assistant, CreateAssistantRequest, DatabaseConfigStore, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, ConnectionStore, ConnectionEntry, MetricsServerConfigStore, MetricsServerConfigEntry, CreateMetricsServerConfigRequest, UpdateMetricsServerConfigRequest, McpServerConfigStore, PersonalMcpServerConfigStore, McpServerConfigEntry, CreateMcpServerConfigRequest, UpdateMcpServerConfigRequest, PersonalMcpServerConfigEntry, WorkspaceStore, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ProjectStore, ProjectFilter, Project, CreateProjectRequest, UpdateProjectRequest, UpdateProjectCapabilityBundlesResult, UserStore, User, CreateUserRequest, UpdateUserRequest, TenantStore, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLinkStore, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, UserExternalIdentityStore, UserExternalIdentity, OidcProviderConfigStore, OidcProviderConfig, CreateOidcProviderConfigInput, UpdateOidcProviderConfigInput, PlatformMemberStore, PlatformMember, PlatformInvitationStore, PlatformInvitation, OidcIdentityClaimStore, OidcIdentityClaimStatus, OidcIdentityClaim, CreateOidcIdentityClaimInput, UpdateOidcIdentityClaimInput, OidcIdentityClaimApproval, InviteLinkStore, InviteLink, CreateInviteLinkInput, WorkflowTrackingStore, CreateWorkflowRunRequest, WorkflowRun, UpdateWorkflowRunRequest, QueryWorkflowRunsOptions, QueryWorkflowRunsResult, CreateRunStepRequest, RunStep, UpdateRunStepRequest, StepType, EvalStore, EvalProject, CreateEvalProjectRequest, EvalSuite, CreateEvalSuiteRequest, EvalCase, CreateEvalCaseRequest, EvalRun, CreateEvalRunRequest, EvalRunResult, EvalProjectReport, BindingRegistry, Binding, CreateBindingInput, BindingMutablePatch, BindingListParams, ChannelInstallationStore, ChannelInstallation, ChannelInstallationType, CreateChannelInstallationInput, UpdateChannelInstallationRequest, A2AApiKeyStore, A2AApiKeyRecord, CreateA2AApiKeyInput, UpdateA2AApiKeyInput, A2AApiKeyEntry, OpenAuditStore, OpenAuditQuery, OpenAuditRecord, OpenAuditAppendInput, AgentWebAppStore, AgentWebApp, CreateAgentWebAppInput, AgentWebAppStorePatch, AgentWebAppUpdateOptions, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TaskStore, CreateTaskRequest, TaskItem, TaskListFilter, TaskDependentListQuery, UpdateTaskRequest, TaskMutationSnapshot, TaskWorkItemStore, CreateWorkItemRequest, TaskWorkItem, CreateWorkItemIfAbsentRequest, TaskWorkItemListFilter, ProjectLifecycleEventQuery, MenuRegistry, MenuItem, CreateMenuItemInput, UpdateMenuItemInput, SharedResourceStore, ShareRecord, CreateShareRecord, CollectionStore, Collection, CreateCollectionRequest, UpdateCollectionRequest, VectorStoreProvider, VectorStoreCreateParams, CapabilityBundleStore, CapabilityBundle, InternalCreateCapabilityBundleInput, InternalUpdateCapabilityBundleInput, CapabilityBundleDeleteResult, ProjectRoomStore, ProjectRoom, ProjectMembershipStore, ProjectMembership, ProjectHumanRole, ProjectMembershipMutationResult, ProjectBotMembershipStore, ProjectBotMembership, ProjectRoomMessageStore, ProjectRoomMessage, ProjectRoomReadStateStore, ProjectRoomReadState, UserPushSubscriptionStore, UserPushSubscription, ModelProviderStore, ModelProviderEntry, CreateModelProviderRequest, UpdateModelProviderRequest, ModelProviderStatus, ModelProviderModelEntry, ProviderModelInput, LeaseStore, LeaseRecord, OutboxStore, OutboxEvent, PluginDeploymentStore, PluginDeployment, PlatformSettingsStore, PlatformSettingsRecord, PlatformSettingsDocument, PlatformAuditStore, PlatformAuditAppendInput, PlatformAuditRecord, PlatformAuditQuery, ChannelReplyJobStore, CreateChannelReplyJobInput, ChannelReplyJob, CheckpointStorage, CheckpointMaintenance, ThreadCheckpointStorage, StoreProtocol, StorePutInput, StoreItem, StoreSearchInput, SkillStore, Skill, CreateSkillRequest } from '@axiom-lattice/protocols';
4
4
  export { AgentWebApp, AgentWebAppAppearance, AgentWebAppFeatures, AgentWebAppScope, AgentWebAppStatus, AgentWebAppStore, Assistant, AssistantStore, Binding, BindingRegistry, CapabilityBundle, CapabilityBundleStore, ChannelInstallation, ChannelInstallationStore, ConnectionEntry, ConnectionStore, CreateAgentWebAppInput, CreateAssistantRequest, CreateBindingInput, CreateCapabilityBundleInput, CreateChannelInstallationInput, CreateChannelInstallationRequest, CreateDatabaseConfigRequest, CreateEvalCaseRequest, CreateEvalProjectRequest, CreateEvalRunRequest, CreateEvalSuiteRequest, CreateMcpServerConfigRequest, CreateMenuItemInput, CreateMetricsServerConfigRequest, CreateProjectRequest, CreateRunStepRequest, CreateShareRequest, CreateSkillRequest, CreateTenantRequest, CreateThreadRequest, CreateUserRequest, CreateUserTenantLinkRequest, CreateWorkflowRunRequest, CreateWorkspaceRequest, DatabaseConfig, DatabaseConfigEntry, DatabaseConfigStore, DatabaseType, EvalCase, EvalProject, EvalProjectReport, EvalRun, EvalRunResult, EvalStore, EvalSuite, LarkChannelInstallationConfig, McpServerConfigEntry, McpServerConfigStore, MenuItem, MenuRegistry, MetricsServerConfig, MetricsServerConfigEntry, MetricsServerConfigStore, Project, ProjectStore, ResourceAddress, RunStep, ScheduleExecutionType, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ShareRecord, ShareResult, ShareVisibility, SharedResourceStore, Skill, SkillStore, StorageType, Tenant, TenantStatus, TenantStore, Thread, ThreadStore, UpdateAgentWebAppInput, UpdateCapabilityBundleInput, UpdateChannelInstallationRequest, UpdateDatabaseConfigRequest, UpdateMcpServerConfigRequest, UpdateMetricsServerConfigRequest, UpdateProjectRequest, UpdateRunStepRequest, UpdateTenantRequest, UpdateUserRequest, UpdateUserTenantLinkRequest, UpdateWorkflowRunRequest, UpdateWorkspaceRequest, User, UserStore, UserTenantLink, UserTenantLinkStore, UserTenantRole, WorkflowRun, WorkflowTrackingStore, Workspace, WorkspaceStore } from '@axiom-lattice/protocols';
5
5
  import { IMessageQueueStore, AddMessageParams, PendingMessage, QueueScope, ClaimMessagesOptions, ThreadInfo, IAgentRunLedger, BeginAgentRunInput, AgentRunRecord, CreatePendingAgentRunInput, ListPendingRunsOptions, ClaimAgentRunInput, DeleteAgentRunExpected, AgentRunStatus, RollbackFailureResult, AgentRunRollbackResult, AgentRunExpiredOutcome, SettleExpiredRunOptions, AgentRunCounts, AgentRunSource, ReapedAgentRun } from '@axiom-lattice/core';
6
6
  export { AddMessageParams, PendingMessage, ThreadInfo } from '@axiom-lattice/core';
@@ -415,7 +415,7 @@ interface PostgreSQLMcpServerConfigStoreOptions {
415
415
  * - Automatic env encryption/decryption
416
416
  * - Unique constraint on (tenant_id, key)
417
417
  */
418
- declare class PostgreSQLMcpServerConfigStore implements McpServerConfigStore {
418
+ declare class PostgreSQLMcpServerConfigStore implements McpServerConfigStore, PersonalMcpServerConfigStore {
419
419
  private pool;
420
420
  private migrationManager;
421
421
  private initialized;
@@ -459,6 +459,44 @@ declare class PostgreSQLMcpServerConfigStore implements McpServerConfigStore {
459
459
  * Check if configuration exists
460
460
  */
461
461
  hasConfig(tenantId: string, id: string): Promise<boolean>;
462
+ /**
463
+ * Get all personal MCP server configurations owned by one assistant.
464
+ */
465
+ getAllConfigsForAssistant(tenantId: string, ownerAssistantId: string): Promise<PersonalMcpServerConfigEntry[]>;
466
+ /**
467
+ * Get every personal MCP server configuration across tenants.
468
+ *
469
+ * Operations/tests only; startup restoration must not call this.
470
+ */
471
+ getAllPersonalConfigsWithoutTenant(): Promise<PersonalMcpServerConfigEntry[]>;
472
+ /**
473
+ * Get one personal MCP server configuration by id.
474
+ */
475
+ getConfigByIdForAssistant(tenantId: string, ownerAssistantId: string, id: string): Promise<PersonalMcpServerConfigEntry | null>;
476
+ /**
477
+ * Get one personal MCP server configuration by business key.
478
+ */
479
+ getConfigByKeyForAssistant(tenantId: string, ownerAssistantId: string, key: string): Promise<PersonalMcpServerConfigEntry | null>;
480
+ /**
481
+ * Create a personal MCP server configuration.
482
+ */
483
+ createConfigForAssistant(tenantId: string, ownerAssistantId: string, id: string, data: CreateMcpServerConfigRequest): Promise<PersonalMcpServerConfigEntry>;
484
+ /**
485
+ * Update a personal MCP server configuration.
486
+ */
487
+ updateConfigForAssistant(tenantId: string, ownerAssistantId: string, id: string, updates: Partial<UpdateMcpServerConfigRequest>): Promise<PersonalMcpServerConfigEntry | null>;
488
+ /**
489
+ * Delete one personal MCP server configuration by id.
490
+ */
491
+ deleteConfigForAssistant(tenantId: string, ownerAssistantId: string, id: string): Promise<boolean>;
492
+ /**
493
+ * Delete every personal MCP server configuration owned by one assistant.
494
+ */
495
+ deleteConfigsForAssistant(tenantId: string, ownerAssistantId: string): Promise<number>;
496
+ /**
497
+ * Check whether a personal MCP server configuration exists.
498
+ */
499
+ hasConfigForAssistant(tenantId: string, ownerAssistantId: string, id: string): Promise<boolean>;
462
500
  /**
463
501
  * Dispose resources and close the connection pool
464
502
  */
@@ -472,6 +510,10 @@ declare class PostgreSQLMcpServerConfigStore implements McpServerConfigStore {
472
510
  * Automatically decrypts env values if present
473
511
  */
474
512
  private mapRowToEntry;
513
+ /**
514
+ * Map a personal table row, tagging the owning assistant.
515
+ */
516
+ private mapPersonalRowToEntry;
475
517
  /**
476
518
  * Encrypt env values in config before storing
477
519
  */
@@ -2231,6 +2273,36 @@ declare class PostgreSQLPlatformSettingsStore implements PlatformSettingsStore {
2231
2273
  save(document: PlatformSettingsDocument, expectedVersion: number, updatedBy?: string): Promise<PlatformSettingsRecord>;
2232
2274
  }
2233
2275
 
2276
+ /**
2277
+ * PostgreSQL implementation of {@link PlatformAuditStore}.
2278
+ *
2279
+ * Persists platform-level audit records in the append-only
2280
+ * `lattice_platform_audit` table. Records are returned newest-first by
2281
+ * `createdAt` descending, then `id` descending.
2282
+ */
2283
+ declare class PostgreSQLPlatformAuditStore implements PlatformAuditStore {
2284
+ private readonly options;
2285
+ constructor(options: {
2286
+ pool: Pool;
2287
+ });
2288
+ private get pool();
2289
+ /** Appends a record, assigning a fresh id and creation timestamp. */
2290
+ append(record: PlatformAuditAppendInput): Promise<PlatformAuditRecord>;
2291
+ /** Returns a record by id, or null when it does not exist. */
2292
+ get(id: string): Promise<PlatformAuditRecord | null>;
2293
+ /**
2294
+ * Returns matching records newest-first.
2295
+ *
2296
+ * `initiatorUserId` only matches human initiators. `from` is inclusive and
2297
+ * `to` is exclusive after both are normalized to instants; invalid or empty
2298
+ * boundaries are ignored. Records are ordered by `createdAt` descending,
2299
+ * then by `id` descending. Results are paginated with a default limit of 100;
2300
+ * non-finite `offset`/`limit` fall back to defaults, finite values are
2301
+ * truncated to integers, and negatives are clamped to 0.
2302
+ */
2303
+ query(params: PlatformAuditQuery): Promise<PlatformAuditRecord[]>;
2304
+ }
2305
+
2234
2306
  /** Options accepted by {@link PostgreSQLChannelReplyJobStore}. */
2235
2307
  interface PostgreSQLChannelReplyJobStoreOptions {
2236
2308
  /** Externally managed pool. When supplied, migrations are not run here. */
@@ -2437,6 +2509,7 @@ declare function createPgStoreConfig(connectionString: string): Promise<{
2437
2509
  oidcIdentityClaim: PostgreSQLOidcIdentityClaimStore;
2438
2510
  inviteLink: PostgreSQLInviteLinkStore;
2439
2511
  platformSettings: PostgreSQLPlatformSettingsStore;
2512
+ platformAudit: PostgreSQLPlatformAuditStore;
2440
2513
  channelBinding: ChannelBindingStore;
2441
2514
  channelInstallation: PostgreSQLChannelInstallationStore;
2442
2515
  thread: PostgreSQLThreadStore;
@@ -2656,6 +2729,9 @@ declare const addOidcIdentityClaimInviteFields: Migration;
2656
2729
  /** Creates the single-row durable platform settings table. */
2657
2730
  declare const createPlatformSettingsTable: Migration;
2658
2731
 
2732
+ /** Creates the append-only platform-level audit log table. */
2733
+ declare const createPlatformAuditTable: Migration;
2734
+
2659
2735
  /**
2660
2736
  * Thread table migrations
2661
2737
  */
@@ -2794,6 +2870,14 @@ declare const createMetricsConfigsTable: Migration;
2794
2870
  * Migration: Create MCP server configs table
2795
2871
  */
2796
2872
  declare const createMcpServerConfigsTable: Migration;
2873
+ /**
2874
+ * Migration: create the personal MCP server config table.
2875
+ *
2876
+ * Personal configs are deliberately stored outside
2877
+ * `lattice_mcp_server_configs` so tenant-only code paths (and older replicas
2878
+ * during a rolling upgrade) can never read or register them.
2879
+ */
2880
+ declare const createPersonalMcpServerConfigsTable: Migration;
2797
2881
 
2798
2882
  /**
2799
2883
  * Workspace table migrations
@@ -3049,4 +3133,4 @@ declare const createChannelReplyJobsTable: Migration;
3049
3133
  */
3050
3134
  declare const createStoreItemsTable: Migration;
3051
3135
 
3052
- export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, CheckpointBaseNotFoundError, CheckpointTargetNotEmptyError, type CreateChannelIdentityMappingInput, DuplicateProjectMembershipError, DuplicateProjectRoomMessageIdempotencyKeyError, InvalidFileShareAddressError, InvalidMcpAppShareAddressError, InvalidMcpAppShareVisibilityError, InvalidUserExternalIdentityRowError, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAgentRunLedger, type PostgreSQLAgentRunLedgerOptions, PostgreSQLAgentWebAppStore, type PostgreSQLAgentWebAppStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLCapabilityBundleStore, type PostgreSQLCapabilityBundleStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLChannelReplyJobStore, type PostgreSQLChannelReplyJobStoreOptions, PostgreSQLCheckpointStorage, PostgreSQLCollectionStore, type PostgreSQLCollectionStoreOptions, PostgreSQLConnectionStore, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLInviteLinkStore, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLModelProviderStore, type PostgreSQLModelProviderStoreOptions, PostgreSQLOidcIdentityClaimStore, PostgreSQLOidcProviderConfigStore, PostgreSQLOpenAuditStore, type PostgreSQLOpenAuditStoreOptions, PostgreSQLPlatformInvitationStore, PostgreSQLPlatformMemberStore, PostgreSQLPlatformSettingsStore, PostgreSQLPluginDeploymentStore, PostgreSQLProjectBotMembershipStore, PostgreSQLProjectMembershipStore, PostgreSQLProjectRoomMessageStore, PostgreSQLProjectRoomReadStateStore, PostgreSQLProjectRoomStore, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, PostgreSQLStore, PostgreSQLTaskWorkItemStore, type PostgreSQLTaskWorkItemStoreOptions, PostgreSQLTenantStore, type PostgreSQLTenantStoreOptions, type PostgreSQLThreadMessageQueueStoreOptions, PostgreSQLThreadStore, type PostgreSQLThreadStoreOptions, PostgreSQLUserExternalIdentityStore, PostgreSQLUserStore, type PostgreSQLUserStoreOptions, PostgreSQLUserTenantLinkStore, type PostgreSQLUserTenantLinkStoreOptions, PostgreSQLWorkflowTrackingStore, type PostgreSQLWorkflowTrackingStoreOptions, PostgreSQLWorkspaceStore, type PostgreSQLWorkspaceStoreOptions, PostgresSharedResourceStore, type PostgresSharedResourceStoreOptions, ProjectBotMembershipIdConflictError, ProjectMembershipIdConflictError, ProjectRoomMessageIdConflictError, ThreadMessageQueueStore, addAssistantTenantId, addCancelRequestedToEvalRuns, addEnvToEvalRuns, addFileContentType, addHoldoutToEvalRuns, addInterruptColumnsToEval, addInterruptPolicyToEvalCases, addMcpAppContentType, addOidcIdentityClaimInviteFields, addProjectConfigColumn, addScheduleTenantId, addShareKind, addSkillTenantId, addStepThreadId, addTaskIdToEvalRuns, addThreadExpiresAt, addThreadTenantId, addWorkflowRunsTenantStatusUpdatedIndex, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAgentRunLedgerTable, createAgentWebAppsTable, createAssistantsTable, createCapabilityBundlesTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createChannelReplyJobsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createInviteLinksTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createOidcIdentityClaimsTable, createOidcProviderConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createPlatformInvitationsTable, createPlatformMembersTable, createPlatformSettingsTable, createPluginDeployments, createProjectRoomReadStates, createProjectRoomTables, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createStoreItemsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUserEmailLowerUniqueIndex, createUserExternalIdentityTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, dropPluginDeploymentAuthToken, enforceUniqueEvalProjectName, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
3136
+ export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, CheckpointBaseNotFoundError, CheckpointTargetNotEmptyError, type CreateChannelIdentityMappingInput, DuplicateProjectMembershipError, DuplicateProjectRoomMessageIdempotencyKeyError, InvalidFileShareAddressError, InvalidMcpAppShareAddressError, InvalidMcpAppShareVisibilityError, InvalidUserExternalIdentityRowError, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAgentRunLedger, type PostgreSQLAgentRunLedgerOptions, PostgreSQLAgentWebAppStore, type PostgreSQLAgentWebAppStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLCapabilityBundleStore, type PostgreSQLCapabilityBundleStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLChannelReplyJobStore, type PostgreSQLChannelReplyJobStoreOptions, PostgreSQLCheckpointStorage, PostgreSQLCollectionStore, type PostgreSQLCollectionStoreOptions, PostgreSQLConnectionStore, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLInviteLinkStore, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLModelProviderStore, type PostgreSQLModelProviderStoreOptions, PostgreSQLOidcIdentityClaimStore, PostgreSQLOidcProviderConfigStore, PostgreSQLOpenAuditStore, type PostgreSQLOpenAuditStoreOptions, PostgreSQLPlatformAuditStore, PostgreSQLPlatformInvitationStore, PostgreSQLPlatformMemberStore, PostgreSQLPlatformSettingsStore, PostgreSQLPluginDeploymentStore, PostgreSQLProjectBotMembershipStore, PostgreSQLProjectMembershipStore, PostgreSQLProjectRoomMessageStore, PostgreSQLProjectRoomReadStateStore, PostgreSQLProjectRoomStore, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, PostgreSQLStore, PostgreSQLTaskWorkItemStore, type PostgreSQLTaskWorkItemStoreOptions, PostgreSQLTenantStore, type PostgreSQLTenantStoreOptions, type PostgreSQLThreadMessageQueueStoreOptions, PostgreSQLThreadStore, type PostgreSQLThreadStoreOptions, PostgreSQLUserExternalIdentityStore, PostgreSQLUserStore, type PostgreSQLUserStoreOptions, PostgreSQLUserTenantLinkStore, type PostgreSQLUserTenantLinkStoreOptions, PostgreSQLWorkflowTrackingStore, type PostgreSQLWorkflowTrackingStoreOptions, PostgreSQLWorkspaceStore, type PostgreSQLWorkspaceStoreOptions, PostgresSharedResourceStore, type PostgresSharedResourceStoreOptions, ProjectBotMembershipIdConflictError, ProjectMembershipIdConflictError, ProjectRoomMessageIdConflictError, ThreadMessageQueueStore, addAssistantTenantId, addCancelRequestedToEvalRuns, addEnvToEvalRuns, addFileContentType, addHoldoutToEvalRuns, addInterruptColumnsToEval, addInterruptPolicyToEvalCases, addMcpAppContentType, addOidcIdentityClaimInviteFields, addProjectConfigColumn, addScheduleTenantId, addShareKind, addSkillTenantId, addStepThreadId, addTaskIdToEvalRuns, addThreadExpiresAt, addThreadTenantId, addWorkflowRunsTenantStatusUpdatedIndex, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAgentRunLedgerTable, createAgentWebAppsTable, createAssistantsTable, createCapabilityBundlesTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createChannelReplyJobsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createInviteLinksTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createOidcIdentityClaimsTable, createOidcProviderConfigsTable, createPGVectorStoreProvider, createPersonalMcpServerConfigsTable, createPgStoreConfig, createPlatformAuditTable, createPlatformInvitationsTable, createPlatformMembersTable, createPlatformSettingsTable, createPluginDeployments, createProjectRoomReadStates, createProjectRoomTables, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createStoreItemsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUserEmailLowerUniqueIndex, createUserExternalIdentityTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, dropPluginDeploymentAuthToken, enforceUniqueEvalProjectName, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Pool, PoolConfig, PoolClient } from 'pg';
2
2
  export { Pool, PoolConfig } from 'pg';
3
- import { ThreadStore, Thread, CreateThreadRequest, AssistantStore, Assistant, CreateAssistantRequest, DatabaseConfigStore, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, ConnectionStore, ConnectionEntry, MetricsServerConfigStore, MetricsServerConfigEntry, CreateMetricsServerConfigRequest, UpdateMetricsServerConfigRequest, McpServerConfigStore, McpServerConfigEntry, CreateMcpServerConfigRequest, UpdateMcpServerConfigRequest, WorkspaceStore, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ProjectStore, ProjectFilter, Project, CreateProjectRequest, UpdateProjectRequest, UpdateProjectCapabilityBundlesResult, UserStore, User, CreateUserRequest, UpdateUserRequest, TenantStore, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLinkStore, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, UserExternalIdentityStore, UserExternalIdentity, OidcProviderConfigStore, OidcProviderConfig, CreateOidcProviderConfigInput, UpdateOidcProviderConfigInput, PlatformMemberStore, PlatformMember, PlatformInvitationStore, PlatformInvitation, OidcIdentityClaimStore, OidcIdentityClaimStatus, OidcIdentityClaim, CreateOidcIdentityClaimInput, UpdateOidcIdentityClaimInput, OidcIdentityClaimApproval, InviteLinkStore, InviteLink, CreateInviteLinkInput, WorkflowTrackingStore, CreateWorkflowRunRequest, WorkflowRun, UpdateWorkflowRunRequest, QueryWorkflowRunsOptions, QueryWorkflowRunsResult, CreateRunStepRequest, RunStep, UpdateRunStepRequest, StepType, EvalStore, EvalProject, CreateEvalProjectRequest, EvalSuite, CreateEvalSuiteRequest, EvalCase, CreateEvalCaseRequest, EvalRun, CreateEvalRunRequest, EvalRunResult, EvalProjectReport, BindingRegistry, Binding, CreateBindingInput, BindingMutablePatch, BindingListParams, ChannelInstallationStore, ChannelInstallation, ChannelInstallationType, CreateChannelInstallationInput, UpdateChannelInstallationRequest, A2AApiKeyStore, A2AApiKeyRecord, CreateA2AApiKeyInput, UpdateA2AApiKeyInput, A2AApiKeyEntry, OpenAuditStore, OpenAuditQuery, OpenAuditRecord, OpenAuditAppendInput, AgentWebAppStore, AgentWebApp, CreateAgentWebAppInput, AgentWebAppStorePatch, AgentWebAppUpdateOptions, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TaskStore, CreateTaskRequest, TaskItem, TaskListFilter, TaskDependentListQuery, UpdateTaskRequest, TaskMutationSnapshot, TaskWorkItemStore, CreateWorkItemRequest, TaskWorkItem, CreateWorkItemIfAbsentRequest, TaskWorkItemListFilter, ProjectLifecycleEventQuery, MenuRegistry, MenuItem, CreateMenuItemInput, UpdateMenuItemInput, SharedResourceStore, ShareRecord, CreateShareRecord, CollectionStore, Collection, CreateCollectionRequest, UpdateCollectionRequest, VectorStoreProvider, VectorStoreCreateParams, CapabilityBundleStore, CapabilityBundle, InternalCreateCapabilityBundleInput, InternalUpdateCapabilityBundleInput, CapabilityBundleDeleteResult, ProjectRoomStore, ProjectRoom, ProjectMembershipStore, ProjectMembership, ProjectHumanRole, ProjectMembershipMutationResult, ProjectBotMembershipStore, ProjectBotMembership, ProjectRoomMessageStore, ProjectRoomMessage, ProjectRoomReadStateStore, ProjectRoomReadState, UserPushSubscriptionStore, UserPushSubscription, ModelProviderStore, ModelProviderEntry, CreateModelProviderRequest, UpdateModelProviderRequest, ModelProviderStatus, ModelProviderModelEntry, ProviderModelInput, LeaseStore, LeaseRecord, OutboxStore, OutboxEvent, PluginDeploymentStore, PluginDeployment, PlatformSettingsStore, PlatformSettingsRecord, PlatformSettingsDocument, ChannelReplyJobStore, CreateChannelReplyJobInput, ChannelReplyJob, CheckpointStorage, CheckpointMaintenance, ThreadCheckpointStorage, StoreProtocol, StorePutInput, StoreItem, StoreSearchInput, SkillStore, Skill, CreateSkillRequest } from '@axiom-lattice/protocols';
3
+ import { ThreadStore, Thread, CreateThreadRequest, AssistantStore, Assistant, CreateAssistantRequest, DatabaseConfigStore, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, ConnectionStore, ConnectionEntry, MetricsServerConfigStore, MetricsServerConfigEntry, CreateMetricsServerConfigRequest, UpdateMetricsServerConfigRequest, McpServerConfigStore, PersonalMcpServerConfigStore, McpServerConfigEntry, CreateMcpServerConfigRequest, UpdateMcpServerConfigRequest, PersonalMcpServerConfigEntry, WorkspaceStore, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ProjectStore, ProjectFilter, Project, CreateProjectRequest, UpdateProjectRequest, UpdateProjectCapabilityBundlesResult, UserStore, User, CreateUserRequest, UpdateUserRequest, TenantStore, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLinkStore, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, UserExternalIdentityStore, UserExternalIdentity, OidcProviderConfigStore, OidcProviderConfig, CreateOidcProviderConfigInput, UpdateOidcProviderConfigInput, PlatformMemberStore, PlatformMember, PlatformInvitationStore, PlatformInvitation, OidcIdentityClaimStore, OidcIdentityClaimStatus, OidcIdentityClaim, CreateOidcIdentityClaimInput, UpdateOidcIdentityClaimInput, OidcIdentityClaimApproval, InviteLinkStore, InviteLink, CreateInviteLinkInput, WorkflowTrackingStore, CreateWorkflowRunRequest, WorkflowRun, UpdateWorkflowRunRequest, QueryWorkflowRunsOptions, QueryWorkflowRunsResult, CreateRunStepRequest, RunStep, UpdateRunStepRequest, StepType, EvalStore, EvalProject, CreateEvalProjectRequest, EvalSuite, CreateEvalSuiteRequest, EvalCase, CreateEvalCaseRequest, EvalRun, CreateEvalRunRequest, EvalRunResult, EvalProjectReport, BindingRegistry, Binding, CreateBindingInput, BindingMutablePatch, BindingListParams, ChannelInstallationStore, ChannelInstallation, ChannelInstallationType, CreateChannelInstallationInput, UpdateChannelInstallationRequest, A2AApiKeyStore, A2AApiKeyRecord, CreateA2AApiKeyInput, UpdateA2AApiKeyInput, A2AApiKeyEntry, OpenAuditStore, OpenAuditQuery, OpenAuditRecord, OpenAuditAppendInput, AgentWebAppStore, AgentWebApp, CreateAgentWebAppInput, AgentWebAppStorePatch, AgentWebAppUpdateOptions, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TaskStore, CreateTaskRequest, TaskItem, TaskListFilter, TaskDependentListQuery, UpdateTaskRequest, TaskMutationSnapshot, TaskWorkItemStore, CreateWorkItemRequest, TaskWorkItem, CreateWorkItemIfAbsentRequest, TaskWorkItemListFilter, ProjectLifecycleEventQuery, MenuRegistry, MenuItem, CreateMenuItemInput, UpdateMenuItemInput, SharedResourceStore, ShareRecord, CreateShareRecord, CollectionStore, Collection, CreateCollectionRequest, UpdateCollectionRequest, VectorStoreProvider, VectorStoreCreateParams, CapabilityBundleStore, CapabilityBundle, InternalCreateCapabilityBundleInput, InternalUpdateCapabilityBundleInput, CapabilityBundleDeleteResult, ProjectRoomStore, ProjectRoom, ProjectMembershipStore, ProjectMembership, ProjectHumanRole, ProjectMembershipMutationResult, ProjectBotMembershipStore, ProjectBotMembership, ProjectRoomMessageStore, ProjectRoomMessage, ProjectRoomReadStateStore, ProjectRoomReadState, UserPushSubscriptionStore, UserPushSubscription, ModelProviderStore, ModelProviderEntry, CreateModelProviderRequest, UpdateModelProviderRequest, ModelProviderStatus, ModelProviderModelEntry, ProviderModelInput, LeaseStore, LeaseRecord, OutboxStore, OutboxEvent, PluginDeploymentStore, PluginDeployment, PlatformSettingsStore, PlatformSettingsRecord, PlatformSettingsDocument, PlatformAuditStore, PlatformAuditAppendInput, PlatformAuditRecord, PlatformAuditQuery, ChannelReplyJobStore, CreateChannelReplyJobInput, ChannelReplyJob, CheckpointStorage, CheckpointMaintenance, ThreadCheckpointStorage, StoreProtocol, StorePutInput, StoreItem, StoreSearchInput, SkillStore, Skill, CreateSkillRequest } from '@axiom-lattice/protocols';
4
4
  export { AgentWebApp, AgentWebAppAppearance, AgentWebAppFeatures, AgentWebAppScope, AgentWebAppStatus, AgentWebAppStore, Assistant, AssistantStore, Binding, BindingRegistry, CapabilityBundle, CapabilityBundleStore, ChannelInstallation, ChannelInstallationStore, ConnectionEntry, ConnectionStore, CreateAgentWebAppInput, CreateAssistantRequest, CreateBindingInput, CreateCapabilityBundleInput, CreateChannelInstallationInput, CreateChannelInstallationRequest, CreateDatabaseConfigRequest, CreateEvalCaseRequest, CreateEvalProjectRequest, CreateEvalRunRequest, CreateEvalSuiteRequest, CreateMcpServerConfigRequest, CreateMenuItemInput, CreateMetricsServerConfigRequest, CreateProjectRequest, CreateRunStepRequest, CreateShareRequest, CreateSkillRequest, CreateTenantRequest, CreateThreadRequest, CreateUserRequest, CreateUserTenantLinkRequest, CreateWorkflowRunRequest, CreateWorkspaceRequest, DatabaseConfig, DatabaseConfigEntry, DatabaseConfigStore, DatabaseType, EvalCase, EvalProject, EvalProjectReport, EvalRun, EvalRunResult, EvalStore, EvalSuite, LarkChannelInstallationConfig, McpServerConfigEntry, McpServerConfigStore, MenuItem, MenuRegistry, MetricsServerConfig, MetricsServerConfigEntry, MetricsServerConfigStore, Project, ProjectStore, ResourceAddress, RunStep, ScheduleExecutionType, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ShareRecord, ShareResult, ShareVisibility, SharedResourceStore, Skill, SkillStore, StorageType, Tenant, TenantStatus, TenantStore, Thread, ThreadStore, UpdateAgentWebAppInput, UpdateCapabilityBundleInput, UpdateChannelInstallationRequest, UpdateDatabaseConfigRequest, UpdateMcpServerConfigRequest, UpdateMetricsServerConfigRequest, UpdateProjectRequest, UpdateRunStepRequest, UpdateTenantRequest, UpdateUserRequest, UpdateUserTenantLinkRequest, UpdateWorkflowRunRequest, UpdateWorkspaceRequest, User, UserStore, UserTenantLink, UserTenantLinkStore, UserTenantRole, WorkflowRun, WorkflowTrackingStore, Workspace, WorkspaceStore } from '@axiom-lattice/protocols';
5
5
  import { IMessageQueueStore, AddMessageParams, PendingMessage, QueueScope, ClaimMessagesOptions, ThreadInfo, IAgentRunLedger, BeginAgentRunInput, AgentRunRecord, CreatePendingAgentRunInput, ListPendingRunsOptions, ClaimAgentRunInput, DeleteAgentRunExpected, AgentRunStatus, RollbackFailureResult, AgentRunRollbackResult, AgentRunExpiredOutcome, SettleExpiredRunOptions, AgentRunCounts, AgentRunSource, ReapedAgentRun } from '@axiom-lattice/core';
6
6
  export { AddMessageParams, PendingMessage, ThreadInfo } from '@axiom-lattice/core';
@@ -415,7 +415,7 @@ interface PostgreSQLMcpServerConfigStoreOptions {
415
415
  * - Automatic env encryption/decryption
416
416
  * - Unique constraint on (tenant_id, key)
417
417
  */
418
- declare class PostgreSQLMcpServerConfigStore implements McpServerConfigStore {
418
+ declare class PostgreSQLMcpServerConfigStore implements McpServerConfigStore, PersonalMcpServerConfigStore {
419
419
  private pool;
420
420
  private migrationManager;
421
421
  private initialized;
@@ -459,6 +459,44 @@ declare class PostgreSQLMcpServerConfigStore implements McpServerConfigStore {
459
459
  * Check if configuration exists
460
460
  */
461
461
  hasConfig(tenantId: string, id: string): Promise<boolean>;
462
+ /**
463
+ * Get all personal MCP server configurations owned by one assistant.
464
+ */
465
+ getAllConfigsForAssistant(tenantId: string, ownerAssistantId: string): Promise<PersonalMcpServerConfigEntry[]>;
466
+ /**
467
+ * Get every personal MCP server configuration across tenants.
468
+ *
469
+ * Operations/tests only; startup restoration must not call this.
470
+ */
471
+ getAllPersonalConfigsWithoutTenant(): Promise<PersonalMcpServerConfigEntry[]>;
472
+ /**
473
+ * Get one personal MCP server configuration by id.
474
+ */
475
+ getConfigByIdForAssistant(tenantId: string, ownerAssistantId: string, id: string): Promise<PersonalMcpServerConfigEntry | null>;
476
+ /**
477
+ * Get one personal MCP server configuration by business key.
478
+ */
479
+ getConfigByKeyForAssistant(tenantId: string, ownerAssistantId: string, key: string): Promise<PersonalMcpServerConfigEntry | null>;
480
+ /**
481
+ * Create a personal MCP server configuration.
482
+ */
483
+ createConfigForAssistant(tenantId: string, ownerAssistantId: string, id: string, data: CreateMcpServerConfigRequest): Promise<PersonalMcpServerConfigEntry>;
484
+ /**
485
+ * Update a personal MCP server configuration.
486
+ */
487
+ updateConfigForAssistant(tenantId: string, ownerAssistantId: string, id: string, updates: Partial<UpdateMcpServerConfigRequest>): Promise<PersonalMcpServerConfigEntry | null>;
488
+ /**
489
+ * Delete one personal MCP server configuration by id.
490
+ */
491
+ deleteConfigForAssistant(tenantId: string, ownerAssistantId: string, id: string): Promise<boolean>;
492
+ /**
493
+ * Delete every personal MCP server configuration owned by one assistant.
494
+ */
495
+ deleteConfigsForAssistant(tenantId: string, ownerAssistantId: string): Promise<number>;
496
+ /**
497
+ * Check whether a personal MCP server configuration exists.
498
+ */
499
+ hasConfigForAssistant(tenantId: string, ownerAssistantId: string, id: string): Promise<boolean>;
462
500
  /**
463
501
  * Dispose resources and close the connection pool
464
502
  */
@@ -472,6 +510,10 @@ declare class PostgreSQLMcpServerConfigStore implements McpServerConfigStore {
472
510
  * Automatically decrypts env values if present
473
511
  */
474
512
  private mapRowToEntry;
513
+ /**
514
+ * Map a personal table row, tagging the owning assistant.
515
+ */
516
+ private mapPersonalRowToEntry;
475
517
  /**
476
518
  * Encrypt env values in config before storing
477
519
  */
@@ -2231,6 +2273,36 @@ declare class PostgreSQLPlatformSettingsStore implements PlatformSettingsStore {
2231
2273
  save(document: PlatformSettingsDocument, expectedVersion: number, updatedBy?: string): Promise<PlatformSettingsRecord>;
2232
2274
  }
2233
2275
 
2276
+ /**
2277
+ * PostgreSQL implementation of {@link PlatformAuditStore}.
2278
+ *
2279
+ * Persists platform-level audit records in the append-only
2280
+ * `lattice_platform_audit` table. Records are returned newest-first by
2281
+ * `createdAt` descending, then `id` descending.
2282
+ */
2283
+ declare class PostgreSQLPlatformAuditStore implements PlatformAuditStore {
2284
+ private readonly options;
2285
+ constructor(options: {
2286
+ pool: Pool;
2287
+ });
2288
+ private get pool();
2289
+ /** Appends a record, assigning a fresh id and creation timestamp. */
2290
+ append(record: PlatformAuditAppendInput): Promise<PlatformAuditRecord>;
2291
+ /** Returns a record by id, or null when it does not exist. */
2292
+ get(id: string): Promise<PlatformAuditRecord | null>;
2293
+ /**
2294
+ * Returns matching records newest-first.
2295
+ *
2296
+ * `initiatorUserId` only matches human initiators. `from` is inclusive and
2297
+ * `to` is exclusive after both are normalized to instants; invalid or empty
2298
+ * boundaries are ignored. Records are ordered by `createdAt` descending,
2299
+ * then by `id` descending. Results are paginated with a default limit of 100;
2300
+ * non-finite `offset`/`limit` fall back to defaults, finite values are
2301
+ * truncated to integers, and negatives are clamped to 0.
2302
+ */
2303
+ query(params: PlatformAuditQuery): Promise<PlatformAuditRecord[]>;
2304
+ }
2305
+
2234
2306
  /** Options accepted by {@link PostgreSQLChannelReplyJobStore}. */
2235
2307
  interface PostgreSQLChannelReplyJobStoreOptions {
2236
2308
  /** Externally managed pool. When supplied, migrations are not run here. */
@@ -2437,6 +2509,7 @@ declare function createPgStoreConfig(connectionString: string): Promise<{
2437
2509
  oidcIdentityClaim: PostgreSQLOidcIdentityClaimStore;
2438
2510
  inviteLink: PostgreSQLInviteLinkStore;
2439
2511
  platformSettings: PostgreSQLPlatformSettingsStore;
2512
+ platformAudit: PostgreSQLPlatformAuditStore;
2440
2513
  channelBinding: ChannelBindingStore;
2441
2514
  channelInstallation: PostgreSQLChannelInstallationStore;
2442
2515
  thread: PostgreSQLThreadStore;
@@ -2656,6 +2729,9 @@ declare const addOidcIdentityClaimInviteFields: Migration;
2656
2729
  /** Creates the single-row durable platform settings table. */
2657
2730
  declare const createPlatformSettingsTable: Migration;
2658
2731
 
2732
+ /** Creates the append-only platform-level audit log table. */
2733
+ declare const createPlatformAuditTable: Migration;
2734
+
2659
2735
  /**
2660
2736
  * Thread table migrations
2661
2737
  */
@@ -2794,6 +2870,14 @@ declare const createMetricsConfigsTable: Migration;
2794
2870
  * Migration: Create MCP server configs table
2795
2871
  */
2796
2872
  declare const createMcpServerConfigsTable: Migration;
2873
+ /**
2874
+ * Migration: create the personal MCP server config table.
2875
+ *
2876
+ * Personal configs are deliberately stored outside
2877
+ * `lattice_mcp_server_configs` so tenant-only code paths (and older replicas
2878
+ * during a rolling upgrade) can never read or register them.
2879
+ */
2880
+ declare const createPersonalMcpServerConfigsTable: Migration;
2797
2881
 
2798
2882
  /**
2799
2883
  * Workspace table migrations
@@ -3049,4 +3133,4 @@ declare const createChannelReplyJobsTable: Migration;
3049
3133
  */
3050
3134
  declare const createStoreItemsTable: Migration;
3051
3135
 
3052
- export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, CheckpointBaseNotFoundError, CheckpointTargetNotEmptyError, type CreateChannelIdentityMappingInput, DuplicateProjectMembershipError, DuplicateProjectRoomMessageIdempotencyKeyError, InvalidFileShareAddressError, InvalidMcpAppShareAddressError, InvalidMcpAppShareVisibilityError, InvalidUserExternalIdentityRowError, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAgentRunLedger, type PostgreSQLAgentRunLedgerOptions, PostgreSQLAgentWebAppStore, type PostgreSQLAgentWebAppStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLCapabilityBundleStore, type PostgreSQLCapabilityBundleStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLChannelReplyJobStore, type PostgreSQLChannelReplyJobStoreOptions, PostgreSQLCheckpointStorage, PostgreSQLCollectionStore, type PostgreSQLCollectionStoreOptions, PostgreSQLConnectionStore, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLInviteLinkStore, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLModelProviderStore, type PostgreSQLModelProviderStoreOptions, PostgreSQLOidcIdentityClaimStore, PostgreSQLOidcProviderConfigStore, PostgreSQLOpenAuditStore, type PostgreSQLOpenAuditStoreOptions, PostgreSQLPlatformInvitationStore, PostgreSQLPlatformMemberStore, PostgreSQLPlatformSettingsStore, PostgreSQLPluginDeploymentStore, PostgreSQLProjectBotMembershipStore, PostgreSQLProjectMembershipStore, PostgreSQLProjectRoomMessageStore, PostgreSQLProjectRoomReadStateStore, PostgreSQLProjectRoomStore, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, PostgreSQLStore, PostgreSQLTaskWorkItemStore, type PostgreSQLTaskWorkItemStoreOptions, PostgreSQLTenantStore, type PostgreSQLTenantStoreOptions, type PostgreSQLThreadMessageQueueStoreOptions, PostgreSQLThreadStore, type PostgreSQLThreadStoreOptions, PostgreSQLUserExternalIdentityStore, PostgreSQLUserStore, type PostgreSQLUserStoreOptions, PostgreSQLUserTenantLinkStore, type PostgreSQLUserTenantLinkStoreOptions, PostgreSQLWorkflowTrackingStore, type PostgreSQLWorkflowTrackingStoreOptions, PostgreSQLWorkspaceStore, type PostgreSQLWorkspaceStoreOptions, PostgresSharedResourceStore, type PostgresSharedResourceStoreOptions, ProjectBotMembershipIdConflictError, ProjectMembershipIdConflictError, ProjectRoomMessageIdConflictError, ThreadMessageQueueStore, addAssistantTenantId, addCancelRequestedToEvalRuns, addEnvToEvalRuns, addFileContentType, addHoldoutToEvalRuns, addInterruptColumnsToEval, addInterruptPolicyToEvalCases, addMcpAppContentType, addOidcIdentityClaimInviteFields, addProjectConfigColumn, addScheduleTenantId, addShareKind, addSkillTenantId, addStepThreadId, addTaskIdToEvalRuns, addThreadExpiresAt, addThreadTenantId, addWorkflowRunsTenantStatusUpdatedIndex, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAgentRunLedgerTable, createAgentWebAppsTable, createAssistantsTable, createCapabilityBundlesTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createChannelReplyJobsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createInviteLinksTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createOidcIdentityClaimsTable, createOidcProviderConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createPlatformInvitationsTable, createPlatformMembersTable, createPlatformSettingsTable, createPluginDeployments, createProjectRoomReadStates, createProjectRoomTables, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createStoreItemsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUserEmailLowerUniqueIndex, createUserExternalIdentityTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, dropPluginDeploymentAuthToken, enforceUniqueEvalProjectName, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
3136
+ export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, CheckpointBaseNotFoundError, CheckpointTargetNotEmptyError, type CreateChannelIdentityMappingInput, DuplicateProjectMembershipError, DuplicateProjectRoomMessageIdempotencyKeyError, InvalidFileShareAddressError, InvalidMcpAppShareAddressError, InvalidMcpAppShareVisibilityError, InvalidUserExternalIdentityRowError, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAgentRunLedger, type PostgreSQLAgentRunLedgerOptions, PostgreSQLAgentWebAppStore, type PostgreSQLAgentWebAppStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLCapabilityBundleStore, type PostgreSQLCapabilityBundleStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLChannelReplyJobStore, type PostgreSQLChannelReplyJobStoreOptions, PostgreSQLCheckpointStorage, PostgreSQLCollectionStore, type PostgreSQLCollectionStoreOptions, PostgreSQLConnectionStore, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLInviteLinkStore, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLModelProviderStore, type PostgreSQLModelProviderStoreOptions, PostgreSQLOidcIdentityClaimStore, PostgreSQLOidcProviderConfigStore, PostgreSQLOpenAuditStore, type PostgreSQLOpenAuditStoreOptions, PostgreSQLPlatformAuditStore, PostgreSQLPlatformInvitationStore, PostgreSQLPlatformMemberStore, PostgreSQLPlatformSettingsStore, PostgreSQLPluginDeploymentStore, PostgreSQLProjectBotMembershipStore, PostgreSQLProjectMembershipStore, PostgreSQLProjectRoomMessageStore, PostgreSQLProjectRoomReadStateStore, PostgreSQLProjectRoomStore, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, PostgreSQLStore, PostgreSQLTaskWorkItemStore, type PostgreSQLTaskWorkItemStoreOptions, PostgreSQLTenantStore, type PostgreSQLTenantStoreOptions, type PostgreSQLThreadMessageQueueStoreOptions, PostgreSQLThreadStore, type PostgreSQLThreadStoreOptions, PostgreSQLUserExternalIdentityStore, PostgreSQLUserStore, type PostgreSQLUserStoreOptions, PostgreSQLUserTenantLinkStore, type PostgreSQLUserTenantLinkStoreOptions, PostgreSQLWorkflowTrackingStore, type PostgreSQLWorkflowTrackingStoreOptions, PostgreSQLWorkspaceStore, type PostgreSQLWorkspaceStoreOptions, PostgresSharedResourceStore, type PostgresSharedResourceStoreOptions, ProjectBotMembershipIdConflictError, ProjectMembershipIdConflictError, ProjectRoomMessageIdConflictError, ThreadMessageQueueStore, addAssistantTenantId, addCancelRequestedToEvalRuns, addEnvToEvalRuns, addFileContentType, addHoldoutToEvalRuns, addInterruptColumnsToEval, addInterruptPolicyToEvalCases, addMcpAppContentType, addOidcIdentityClaimInviteFields, addProjectConfigColumn, addScheduleTenantId, addShareKind, addSkillTenantId, addStepThreadId, addTaskIdToEvalRuns, addThreadExpiresAt, addThreadTenantId, addWorkflowRunsTenantStatusUpdatedIndex, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAgentRunLedgerTable, createAgentWebAppsTable, createAssistantsTable, createCapabilityBundlesTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createChannelReplyJobsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createInviteLinksTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createOidcIdentityClaimsTable, createOidcProviderConfigsTable, createPGVectorStoreProvider, createPersonalMcpServerConfigsTable, createPgStoreConfig, createPlatformAuditTable, createPlatformInvitationsTable, createPlatformMembersTable, createPlatformSettingsTable, createPluginDeployments, createProjectRoomReadStates, createProjectRoomTables, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createStoreItemsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUserEmailLowerUniqueIndex, createUserExternalIdentityTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, dropPluginDeploymentAuthToken, enforceUniqueEvalProjectName, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };