@axiom-lattice/pg-stores 5.0.3 → 5.1.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.
Files changed (37) hide show
  1. package/.turbo/turbo-build.log +10 -10
  2. package/CHANGELOG.md +102 -0
  3. package/dist/index.d.mts +178 -2
  4. package/dist/index.d.ts +178 -2
  5. package/dist/index.js +1243 -197
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +1167 -124
  8. package/dist/index.mjs.map +1 -1
  9. package/package.json +3 -3
  10. package/src/__tests__/PostgreSQLInviteLinkStore.test.ts +63 -0
  11. package/src/__tests__/PostgreSQLOidcIdentityClaimStore.test.ts +123 -0
  12. package/src/__tests__/PostgreSQLOidcProviderConfigStore.test.ts +233 -0
  13. package/src/__tests__/PostgreSQLPlatformInvitationStore.test.ts +222 -0
  14. package/src/__tests__/PostgreSQLPlatformMemberStore.test.ts +146 -0
  15. package/src/__tests__/PostgreSQLPlatformSettingsStore.test.ts +115 -0
  16. package/src/__tests__/PostgreSQLUserExternalIdentityStore.test.ts +125 -0
  17. package/src/__tests__/PostgreSQLUserStore.test.ts +75 -0
  18. package/src/createPgStoreConfig.ts +34 -0
  19. package/src/index.ts +16 -0
  20. package/src/migrations/invite_link_migration.ts +35 -0
  21. package/src/migrations/oidc_identity_claim_invite_migration.ts +29 -0
  22. package/src/migrations/oidc_identity_claim_migration.ts +39 -0
  23. package/src/migrations/oidc_provider_allowed_hosts_migration.ts +19 -0
  24. package/src/migrations/oidc_provider_config_migration.ts +27 -0
  25. package/src/migrations/platform_invitation_migration.ts +22 -0
  26. package/src/migrations/platform_member_migration.ts +21 -0
  27. package/src/migrations/platform_settings_migration.ts +21 -0
  28. package/src/migrations/user_email_lower_unique_migration.ts +22 -0
  29. package/src/migrations/user_external_identity_migration.ts +27 -0
  30. package/src/stores/PostgreSQLInviteLinkStore.ts +134 -0
  31. package/src/stores/PostgreSQLOidcIdentityClaimStore.ts +251 -0
  32. package/src/stores/PostgreSQLOidcProviderConfigStore.ts +222 -0
  33. package/src/stores/PostgreSQLPlatformInvitationStore.ts +133 -0
  34. package/src/stores/PostgreSQLPlatformMemberStore.ts +105 -0
  35. package/src/stores/PostgreSQLPlatformSettingsStore.ts +98 -0
  36. package/src/stores/PostgreSQLUserExternalIdentityStore.ts +134 -0
  37. package/src/stores/PostgreSQLUserStore.ts +3 -2
@@ -1,5 +1,5 @@
1
1
 
2
- > @axiom-lattice/pg-stores@5.0.3 build /home/runner/work/agentic/agentic/packages/pg-stores
2
+ > @axiom-lattice/pg-stores@5.1.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
- ESM dist/index.mjs 524.22 KB
12
- ESM dist/index.mjs.map 970.44 KB
13
- ESM ⚡️ Build success in 1100ms
14
- CJS dist/index.js 533.98 KB
15
- CJS dist/index.js.map 970.75 KB
16
- CJS ⚡️ Build success in 1191ms
11
+ CJS dist/index.js 569.35 KB
12
+ CJS dist/index.js.map 1.01 MB
13
+ CJS ⚡️ Build success in 1648ms
14
+ ESM dist/index.mjs 558.27 KB
15
+ ESM dist/index.mjs.map 1.01 MB
16
+ ESM ⚡️ Build success in 1648ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 15036ms
19
- DTS dist/index.d.ts 112.00 KB
20
- DTS dist/index.d.mts 112.00 KB
18
+ DTS ⚡️ Build success in 15633ms
19
+ DTS dist/index.d.ts 120.00 KB
20
+ DTS dist/index.d.mts 120.00 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,107 @@
1
1
  # @axiom-lattice/pg-stores
2
2
 
3
+ ## 5.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [ff00d97]
8
+ - @axiom-lattice/core@12.2.1
9
+
10
+ ## 5.1.0
11
+
12
+ ### Minor Changes
13
+
14
+ - f29edad: Add the Admin Center platform-management surface, durable platform settings,
15
+ opaque invite links, enterprise SSO follow-ups, and domain branding.
16
+
17
+ - **Admin Center:** grouped navigation (Access/Tenancy/Identity/Settings),
18
+ full-width responsive shell, Overview attention cards + health + stats,
19
+ redesigned People, Platform Roles, Invite Links, Tenants, Tenant Members,
20
+ OIDC Providers, and Settings pages with shared Admin Center primitives.
21
+ Settings is split into three direct writable menu entries (Authentication,
22
+ Rate Limits & Quotas, Branding) instead of an in-page tab set; the read-only
23
+ environment view lives in Overview.
24
+ - **Platform settings:** PostgreSQL-backed auth/invite/rate-limit/quota/branding
25
+ settings with env fallback, version CAS, outbox invalidation, 30s refresh,
26
+ read-only Overview environment, and multi-replica readiness.
27
+ - **Invite links:** opaque, encrypted-at-rest links with expiry/max uses/revoke;
28
+ platform role links always require admin approval, tenant member auto-join
29
+ only with email-bound IdP-verified email; revoke cancels pending claims.
30
+ - **SSO follow-ups:** optional default tenant, private-host allowlists, email
31
+ completion claims, pending SSO review, and SSO avatar metadata.
32
+ - **Domain branding:** platform default + exact-host domain overrides, public
33
+ `GET /api/branding`, Admin Center Branding tab, login/register/invite brand
34
+ application, workspace domain theme inheritance, and tenant primary-color
35
+ override.
36
+ - **Security hardening:** platform guards fail closed; email-less completion and
37
+ public branding/invite routes are explicitly public; owner fallback/owner
38
+ target protections; last-owner checks; SSRF allowlist and metadata rejection;
39
+ rate-limit precedence; claim approval leases/rollback; avatar URL validation.
40
+
41
+ - 0ad828b: Add generic OIDC console login with Azure Entra ID support, external identity
42
+ binding, JIT pending users, platform roles, a separate Platform Admin app, and
43
+ platform-scoped provider configuration.
44
+
45
+ - `@axiom-lattice/auth-oidc`: authorization-code + PKCE + nonce via
46
+ `openid-client` v6, Azure `oid`/`sub` claim mapping, signed state cookie,
47
+ endpoint SSRF validation, config parsing, and per-provider `providerId` state.
48
+ - `@axiom-lattice/protocols` / `@axiom-lattice/core`: auth provider and external
49
+ identity store contracts, provider registry, identity mapping (issuer-scoped
50
+ keys, verified-email-only auto-link, JIT pending), in-memory identity store,
51
+ the OIDC provider config store contract + encrypted in-memory store, and the
52
+ `PlatformMemberStore` contract + in-memory store with `owner`/`admin`/
53
+ `auditor` roles.
54
+ - `@axiom-lattice/local-stores` / `@axiom-lattice/pg-stores`: external identity,
55
+ OIDC provider config, and platform member stores; PostgreSQL migrations v209
56
+ (`lattice_user_identities`), v210 (`lower(email)` unique index), v211
57
+ (`lattice_oidc_provider_configs`, encrypted client secret), and v212
58
+ (`lattice_platform_members`).
59
+ - `@axiom-lattice/gateway`: multi-provider OIDC routes, one-time 60-second
60
+ handoff/exchange, platform-role CRUD/test APIs for store providers, runtime
61
+ registry with env `oidc` fallback, `PlatformBootstrapService` +
62
+ `PlatformAccessService` (owner/admin/auditor) replacing env-only checks on
63
+ approval/user/tenant/OIDC surfaces, `/api/platform/*` member and tenant
64
+ assignment APIs, OIDC rate limits, and fail-closed deployment checks.
65
+ - `@axiom-lattice/client-sdk`: `client.oidcProviders` list/create/update/
66
+ delete/test/testStored and `client.platform` me/members/tenant-assignment
67
+ methods with types.
68
+ - `@axiom-lattice/react-sdk`: provider discovery, SSO button labeled with the
69
+ provider display name, `/auth/callback` bootstrap, pending/error notices, the
70
+ write-only OIDC provider panel, and the separate `/platform-admin` app with
71
+ Overview, Platform Users, Tenants, Tenant Assignments, and OIDC Providers.
72
+ OIDC Providers is removed from the tenant workspace menu.
73
+
74
+ - 0ad828b: SSO-only deployments and platform invitations.
75
+
76
+ - `@axiom-lattice/gateway`: `AUTH_LOCAL_ENABLED` / `AUTH_BREAK_GLASS_EMAILS`
77
+ disable password login, registration, and password changes while keeping an
78
+ audited, env-only break-glass escape hatch. `PlatformSsoBootstrapService`
79
+ claims the first platform owner from a verified SSO login (issuer + subject >
80
+ group > email) with no local password, serialized by the
81
+ `platform-bootstrap` lease. `PlatformInvitationService` invites normalized
82
+ emails: existing active users are granted immediately, everyone else gets a
83
+ pending invitation claimed on the first verified SSO login before identity
84
+ mapping (consume-before-grant, per-email lease, owner-only owner invitations,
85
+ `PLATFORM_INVITATION_TRUST_EMAIL` off by default).
86
+ - `@axiom-lattice/protocols` / `@axiom-lattice/core` /
87
+ `@axiom-lattice/local-stores` / `@axiom-lattice/pg-stores`: platform
88
+ invitation store contract + InMemory/Local/PostgreSQL implementations and PG
89
+ migration v213 (`lattice_platform_invitations`).
90
+ - `@axiom-lattice/client-sdk`: `client.platform.listInvitations()` /
91
+ `revokeInvitation(email)` and the `{ member?, invitation? }` grant result.
92
+ - `@axiom-lattice/react-sdk`: Platform Users loads and revokes pending
93
+ invitations, distinguishes "invited" from "granted", exposes SSO-only /
94
+ break-glass login states, and keeps owner invitations owner-only. Invited
95
+ users need no tenant membership to use `/platform-admin`.
96
+
97
+ ### Patch Changes
98
+
99
+ - Updated dependencies [f29edad]
100
+ - Updated dependencies [0ad828b]
101
+ - Updated dependencies [0ad828b]
102
+ - @axiom-lattice/protocols@7.2.0
103
+ - @axiom-lattice/core@12.2.0
104
+
3
105
  ## 5.0.3
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, 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, 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, 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';
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';
@@ -748,6 +748,133 @@ declare class PostgreSQLUserTenantLinkStore implements UserTenantLinkStore {
748
748
  hasLink(userId: string, tenantId: string): Promise<boolean>;
749
749
  }
750
750
 
751
+ /**
752
+ * Raised when a row read from `lattice_user_identities` does not match the
753
+ * expected column types.
754
+ */
755
+ declare class InvalidUserExternalIdentityRowError extends Error {
756
+ readonly code = "INVALID_USER_EXTERNAL_IDENTITY_ROW";
757
+ constructor();
758
+ }
759
+ declare class PostgreSQLUserExternalIdentityStore implements UserExternalIdentityStore {
760
+ private readonly pool;
761
+ constructor(options: {
762
+ pool: Pool;
763
+ });
764
+ getByProviderSubject(providerId: string, issuer: string, subject: string): Promise<UserExternalIdentity | null>;
765
+ listByUser(userId: string): Promise<UserExternalIdentity[]>;
766
+ link(identity: UserExternalIdentity): Promise<void>;
767
+ unlink(providerId: string, issuer: string, subject: string): Promise<void>;
768
+ }
769
+
770
+ /**
771
+ * PostgreSQL implementation of {@link OidcProviderConfigStore}.
772
+ *
773
+ * Persists OIDC provider configurations in `lattice_oidc_provider_configs`,
774
+ * encrypting the client secret at rest and using the database clock for
775
+ * `updated_at` on writes.
776
+ */
777
+ declare class PostgreSQLOidcProviderConfigStore implements OidcProviderConfigStore {
778
+ private readonly pool;
779
+ constructor(options: {
780
+ pool: Pool;
781
+ });
782
+ list(): Promise<OidcProviderConfig[]>;
783
+ get(id: string): Promise<OidcProviderConfig | null>;
784
+ create(id: string, input: CreateOidcProviderConfigInput): Promise<OidcProviderConfig>;
785
+ update(id: string, updates: UpdateOidcProviderConfigInput): Promise<OidcProviderConfig | null>;
786
+ delete(id: string): Promise<boolean>;
787
+ }
788
+
789
+ /**
790
+ * PostgreSQL implementation of {@link PlatformMemberStore}.
791
+ *
792
+ * Persists platform grants in `lattice_platform_members`, keyed by user id.
793
+ */
794
+ declare class PostgreSQLPlatformMemberStore implements PlatformMemberStore {
795
+ private readonly pool;
796
+ constructor(options: {
797
+ pool: Pool;
798
+ });
799
+ /** Lists every platform member ordered by user id. */
800
+ list(): Promise<PlatformMember[]>;
801
+ /** Returns the platform member for a user, or null. */
802
+ get(userId: string): Promise<PlatformMember | null>;
803
+ /**
804
+ * Inserts or replaces a member keyed by user id.
805
+ *
806
+ * The supplied grant replaces any existing row in full (last write wins),
807
+ * including `grantedAt` and `updatedAt`.
808
+ */
809
+ upsert(member: PlatformMember): Promise<PlatformMember>;
810
+ /** Deletes a member. Returns whether a row was removed. */
811
+ delete(userId: string): Promise<boolean>;
812
+ }
813
+
814
+ /**
815
+ * PostgreSQL implementation of {@link PlatformInvitationStore}.
816
+ *
817
+ * Persists invitations in `lattice_platform_invitations`, keyed by normalized
818
+ * email.
819
+ */
820
+ declare class PostgreSQLPlatformInvitationStore implements PlatformInvitationStore {
821
+ private readonly pool;
822
+ constructor(options: {
823
+ pool: Pool;
824
+ });
825
+ /** Lists every invitation ordered by normalized email. */
826
+ list(): Promise<PlatformInvitation[]>;
827
+ /** Returns the invitation for an email, or null. */
828
+ get(email: string): Promise<PlatformInvitation | null>;
829
+ /**
830
+ * Inserts or replaces an invitation keyed by normalized email.
831
+ *
832
+ * The supplied invitation replaces any existing row in full (last write wins),
833
+ * including `expiresAt` and `consumedAt`.
834
+ */
835
+ upsert(invitation: PlatformInvitation): Promise<PlatformInvitation>;
836
+ /** Deletes an invitation. Returns whether a row was removed. */
837
+ delete(email: string): Promise<boolean>;
838
+ /**
839
+ * Atomically consumes a pending, unexpired invitation.
840
+ *
841
+ * Returns the consumed invitation, or null when the row is missing, already
842
+ * consumed, or expired.
843
+ */
844
+ consume(email: string, at: Date): Promise<PlatformInvitation | null>;
845
+ }
846
+
847
+ /** PostgreSQL implementation of {@link OidcIdentityClaimStore}. */
848
+ declare class PostgreSQLOidcIdentityClaimStore implements OidcIdentityClaimStore {
849
+ private readonly pool;
850
+ constructor(options: {
851
+ pool: Pool;
852
+ });
853
+ list(status?: OidcIdentityClaimStatus): Promise<OidcIdentityClaim[]>;
854
+ get(id: string): Promise<OidcIdentityClaim | null>;
855
+ getPendingBySubject(providerId: string, issuer: string, subject: string, now: Date): Promise<OidcIdentityClaim | null>;
856
+ create(input: CreateOidcIdentityClaimInput): Promise<OidcIdentityClaim>;
857
+ updatePending(id: string, updates: UpdateOidcIdentityClaimInput, now: Date): Promise<OidcIdentityClaim | null>;
858
+ approve(id: string, approval: OidcIdentityClaimApproval, now: Date): Promise<OidcIdentityClaim | null>;
859
+ reject(id: string, reviewedBy: string, now: Date): Promise<OidcIdentityClaim | null>;
860
+ delete(id: string): Promise<boolean>;
861
+ }
862
+
863
+ /** PostgreSQL implementation of {@link InviteLinkStore}. */
864
+ declare class PostgreSQLInviteLinkStore implements InviteLinkStore {
865
+ private readonly options;
866
+ constructor(options: {
867
+ pool: Pool;
868
+ });
869
+ private get pool();
870
+ list(): Promise<InviteLink[]>;
871
+ get(id: string): Promise<InviteLink | null>;
872
+ getByTokenHash(tokenHash: string): Promise<InviteLink | null>;
873
+ create(input: CreateInviteLinkInput): Promise<InviteLink>;
874
+ consume(tokenHash: string, now: Date): Promise<InviteLink | null>;
875
+ revoke(id: string, now: Date): Promise<InviteLink | null>;
876
+ }
877
+
751
878
  /**
752
879
  * PostgreSQL implementation of WorkflowTrackingStore
753
880
  */
@@ -2093,6 +2220,17 @@ declare class PostgreSQLAgentRunLedger implements IAgentRunLedger {
2093
2220
  reapLegacyExpired(): Promise<ReapedAgentRun[]>;
2094
2221
  }
2095
2222
 
2223
+ /** PostgreSQL implementation of {@link PlatformSettingsStore}. */
2224
+ declare class PostgreSQLPlatformSettingsStore implements PlatformSettingsStore {
2225
+ private readonly options;
2226
+ constructor(options: {
2227
+ pool: Pool;
2228
+ });
2229
+ private get pool();
2230
+ get(): Promise<PlatformSettingsRecord | null>;
2231
+ save(document: PlatformSettingsDocument, expectedVersion: number, updatedBy?: string): Promise<PlatformSettingsRecord>;
2232
+ }
2233
+
2096
2234
  /** Options accepted by {@link PostgreSQLChannelReplyJobStore}. */
2097
2235
  interface PostgreSQLChannelReplyJobStoreOptions {
2098
2236
  /** Externally managed pool. When supplied, migrations are not run here. */
@@ -2292,6 +2430,13 @@ declare function createPgStoreConfig(connectionString: string): Promise<{
2292
2430
  user: PostgreSQLUserStore;
2293
2431
  tenant: PostgreSQLTenantStore;
2294
2432
  userTenantLink: PostgreSQLUserTenantLinkStore;
2433
+ userExternalIdentity: PostgreSQLUserExternalIdentityStore;
2434
+ oidcProviderConfig: PostgreSQLOidcProviderConfigStore;
2435
+ platformMember: PostgreSQLPlatformMemberStore;
2436
+ platformInvitation: PostgreSQLPlatformInvitationStore;
2437
+ oidcIdentityClaim: PostgreSQLOidcIdentityClaimStore;
2438
+ inviteLink: PostgreSQLInviteLinkStore;
2439
+ platformSettings: PostgreSQLPlatformSettingsStore;
2295
2440
  channelBinding: ChannelBindingStore;
2296
2441
  channelInstallation: PostgreSQLChannelInstallationStore;
2297
2442
  thread: PostgreSQLThreadStore;
@@ -2480,6 +2625,37 @@ declare class MigrationManager {
2480
2625
  getCurrentVersion(): Promise<number>;
2481
2626
  }
2482
2627
 
2628
+ declare const createUserExternalIdentityTable: Migration;
2629
+
2630
+ /**
2631
+ * Enforce case-insensitive email uniqueness.
2632
+ *
2633
+ * `lower(email)` is the lookup identity used by every UserStore, so the
2634
+ * database must reject rows that differ only by case. This migration fails
2635
+ * closed on an existing database that still has duplicate lower(email) rows.
2636
+ */
2637
+ declare const createUserEmailLowerUniqueIndex: Migration;
2638
+
2639
+ declare const createOidcProviderConfigsTable: Migration;
2640
+
2641
+ /** Creates the platform member table keyed by user id. */
2642
+ declare const createPlatformMembersTable: Migration;
2643
+
2644
+ /** Creates the platform invitation table keyed by normalized email. */
2645
+ declare const createPlatformInvitationsTable: Migration;
2646
+
2647
+ /** Creates pending enterprise-SSO identity claims. */
2648
+ declare const createOidcIdentityClaimsTable: Migration;
2649
+
2650
+ /** Creates durable bearer invitation links. */
2651
+ declare const createInviteLinksTable: Migration;
2652
+
2653
+ /** Adds invite-link request context to pending identity claims. */
2654
+ declare const addOidcIdentityClaimInviteFields: Migration;
2655
+
2656
+ /** Creates the single-row durable platform settings table. */
2657
+ declare const createPlatformSettingsTable: Migration;
2658
+
2483
2659
  /**
2484
2660
  * Thread table migrations
2485
2661
  */
@@ -2873,4 +3049,4 @@ declare const createChannelReplyJobsTable: Migration;
2873
3049
  */
2874
3050
  declare const createStoreItemsTable: Migration;
2875
3051
 
2876
- export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, CheckpointBaseNotFoundError, CheckpointTargetNotEmptyError, type CreateChannelIdentityMappingInput, DuplicateProjectMembershipError, DuplicateProjectRoomMessageIdempotencyKeyError, InvalidFileShareAddressError, InvalidMcpAppShareAddressError, InvalidMcpAppShareVisibilityError, 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, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLModelProviderStore, type PostgreSQLModelProviderStoreOptions, PostgreSQLOpenAuditStore, type PostgreSQLOpenAuditStoreOptions, 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, 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, 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, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createPluginDeployments, createProjectRoomReadStates, createProjectRoomTables, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createStoreItemsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, dropPluginDeploymentAuthToken, enforceUniqueEvalProjectName, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
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 };
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, 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, 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, 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';
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';
@@ -748,6 +748,133 @@ declare class PostgreSQLUserTenantLinkStore implements UserTenantLinkStore {
748
748
  hasLink(userId: string, tenantId: string): Promise<boolean>;
749
749
  }
750
750
 
751
+ /**
752
+ * Raised when a row read from `lattice_user_identities` does not match the
753
+ * expected column types.
754
+ */
755
+ declare class InvalidUserExternalIdentityRowError extends Error {
756
+ readonly code = "INVALID_USER_EXTERNAL_IDENTITY_ROW";
757
+ constructor();
758
+ }
759
+ declare class PostgreSQLUserExternalIdentityStore implements UserExternalIdentityStore {
760
+ private readonly pool;
761
+ constructor(options: {
762
+ pool: Pool;
763
+ });
764
+ getByProviderSubject(providerId: string, issuer: string, subject: string): Promise<UserExternalIdentity | null>;
765
+ listByUser(userId: string): Promise<UserExternalIdentity[]>;
766
+ link(identity: UserExternalIdentity): Promise<void>;
767
+ unlink(providerId: string, issuer: string, subject: string): Promise<void>;
768
+ }
769
+
770
+ /**
771
+ * PostgreSQL implementation of {@link OidcProviderConfigStore}.
772
+ *
773
+ * Persists OIDC provider configurations in `lattice_oidc_provider_configs`,
774
+ * encrypting the client secret at rest and using the database clock for
775
+ * `updated_at` on writes.
776
+ */
777
+ declare class PostgreSQLOidcProviderConfigStore implements OidcProviderConfigStore {
778
+ private readonly pool;
779
+ constructor(options: {
780
+ pool: Pool;
781
+ });
782
+ list(): Promise<OidcProviderConfig[]>;
783
+ get(id: string): Promise<OidcProviderConfig | null>;
784
+ create(id: string, input: CreateOidcProviderConfigInput): Promise<OidcProviderConfig>;
785
+ update(id: string, updates: UpdateOidcProviderConfigInput): Promise<OidcProviderConfig | null>;
786
+ delete(id: string): Promise<boolean>;
787
+ }
788
+
789
+ /**
790
+ * PostgreSQL implementation of {@link PlatformMemberStore}.
791
+ *
792
+ * Persists platform grants in `lattice_platform_members`, keyed by user id.
793
+ */
794
+ declare class PostgreSQLPlatformMemberStore implements PlatformMemberStore {
795
+ private readonly pool;
796
+ constructor(options: {
797
+ pool: Pool;
798
+ });
799
+ /** Lists every platform member ordered by user id. */
800
+ list(): Promise<PlatformMember[]>;
801
+ /** Returns the platform member for a user, or null. */
802
+ get(userId: string): Promise<PlatformMember | null>;
803
+ /**
804
+ * Inserts or replaces a member keyed by user id.
805
+ *
806
+ * The supplied grant replaces any existing row in full (last write wins),
807
+ * including `grantedAt` and `updatedAt`.
808
+ */
809
+ upsert(member: PlatformMember): Promise<PlatformMember>;
810
+ /** Deletes a member. Returns whether a row was removed. */
811
+ delete(userId: string): Promise<boolean>;
812
+ }
813
+
814
+ /**
815
+ * PostgreSQL implementation of {@link PlatformInvitationStore}.
816
+ *
817
+ * Persists invitations in `lattice_platform_invitations`, keyed by normalized
818
+ * email.
819
+ */
820
+ declare class PostgreSQLPlatformInvitationStore implements PlatformInvitationStore {
821
+ private readonly pool;
822
+ constructor(options: {
823
+ pool: Pool;
824
+ });
825
+ /** Lists every invitation ordered by normalized email. */
826
+ list(): Promise<PlatformInvitation[]>;
827
+ /** Returns the invitation for an email, or null. */
828
+ get(email: string): Promise<PlatformInvitation | null>;
829
+ /**
830
+ * Inserts or replaces an invitation keyed by normalized email.
831
+ *
832
+ * The supplied invitation replaces any existing row in full (last write wins),
833
+ * including `expiresAt` and `consumedAt`.
834
+ */
835
+ upsert(invitation: PlatformInvitation): Promise<PlatformInvitation>;
836
+ /** Deletes an invitation. Returns whether a row was removed. */
837
+ delete(email: string): Promise<boolean>;
838
+ /**
839
+ * Atomically consumes a pending, unexpired invitation.
840
+ *
841
+ * Returns the consumed invitation, or null when the row is missing, already
842
+ * consumed, or expired.
843
+ */
844
+ consume(email: string, at: Date): Promise<PlatformInvitation | null>;
845
+ }
846
+
847
+ /** PostgreSQL implementation of {@link OidcIdentityClaimStore}. */
848
+ declare class PostgreSQLOidcIdentityClaimStore implements OidcIdentityClaimStore {
849
+ private readonly pool;
850
+ constructor(options: {
851
+ pool: Pool;
852
+ });
853
+ list(status?: OidcIdentityClaimStatus): Promise<OidcIdentityClaim[]>;
854
+ get(id: string): Promise<OidcIdentityClaim | null>;
855
+ getPendingBySubject(providerId: string, issuer: string, subject: string, now: Date): Promise<OidcIdentityClaim | null>;
856
+ create(input: CreateOidcIdentityClaimInput): Promise<OidcIdentityClaim>;
857
+ updatePending(id: string, updates: UpdateOidcIdentityClaimInput, now: Date): Promise<OidcIdentityClaim | null>;
858
+ approve(id: string, approval: OidcIdentityClaimApproval, now: Date): Promise<OidcIdentityClaim | null>;
859
+ reject(id: string, reviewedBy: string, now: Date): Promise<OidcIdentityClaim | null>;
860
+ delete(id: string): Promise<boolean>;
861
+ }
862
+
863
+ /** PostgreSQL implementation of {@link InviteLinkStore}. */
864
+ declare class PostgreSQLInviteLinkStore implements InviteLinkStore {
865
+ private readonly options;
866
+ constructor(options: {
867
+ pool: Pool;
868
+ });
869
+ private get pool();
870
+ list(): Promise<InviteLink[]>;
871
+ get(id: string): Promise<InviteLink | null>;
872
+ getByTokenHash(tokenHash: string): Promise<InviteLink | null>;
873
+ create(input: CreateInviteLinkInput): Promise<InviteLink>;
874
+ consume(tokenHash: string, now: Date): Promise<InviteLink | null>;
875
+ revoke(id: string, now: Date): Promise<InviteLink | null>;
876
+ }
877
+
751
878
  /**
752
879
  * PostgreSQL implementation of WorkflowTrackingStore
753
880
  */
@@ -2093,6 +2220,17 @@ declare class PostgreSQLAgentRunLedger implements IAgentRunLedger {
2093
2220
  reapLegacyExpired(): Promise<ReapedAgentRun[]>;
2094
2221
  }
2095
2222
 
2223
+ /** PostgreSQL implementation of {@link PlatformSettingsStore}. */
2224
+ declare class PostgreSQLPlatformSettingsStore implements PlatformSettingsStore {
2225
+ private readonly options;
2226
+ constructor(options: {
2227
+ pool: Pool;
2228
+ });
2229
+ private get pool();
2230
+ get(): Promise<PlatformSettingsRecord | null>;
2231
+ save(document: PlatformSettingsDocument, expectedVersion: number, updatedBy?: string): Promise<PlatformSettingsRecord>;
2232
+ }
2233
+
2096
2234
  /** Options accepted by {@link PostgreSQLChannelReplyJobStore}. */
2097
2235
  interface PostgreSQLChannelReplyJobStoreOptions {
2098
2236
  /** Externally managed pool. When supplied, migrations are not run here. */
@@ -2292,6 +2430,13 @@ declare function createPgStoreConfig(connectionString: string): Promise<{
2292
2430
  user: PostgreSQLUserStore;
2293
2431
  tenant: PostgreSQLTenantStore;
2294
2432
  userTenantLink: PostgreSQLUserTenantLinkStore;
2433
+ userExternalIdentity: PostgreSQLUserExternalIdentityStore;
2434
+ oidcProviderConfig: PostgreSQLOidcProviderConfigStore;
2435
+ platformMember: PostgreSQLPlatformMemberStore;
2436
+ platformInvitation: PostgreSQLPlatformInvitationStore;
2437
+ oidcIdentityClaim: PostgreSQLOidcIdentityClaimStore;
2438
+ inviteLink: PostgreSQLInviteLinkStore;
2439
+ platformSettings: PostgreSQLPlatformSettingsStore;
2295
2440
  channelBinding: ChannelBindingStore;
2296
2441
  channelInstallation: PostgreSQLChannelInstallationStore;
2297
2442
  thread: PostgreSQLThreadStore;
@@ -2480,6 +2625,37 @@ declare class MigrationManager {
2480
2625
  getCurrentVersion(): Promise<number>;
2481
2626
  }
2482
2627
 
2628
+ declare const createUserExternalIdentityTable: Migration;
2629
+
2630
+ /**
2631
+ * Enforce case-insensitive email uniqueness.
2632
+ *
2633
+ * `lower(email)` is the lookup identity used by every UserStore, so the
2634
+ * database must reject rows that differ only by case. This migration fails
2635
+ * closed on an existing database that still has duplicate lower(email) rows.
2636
+ */
2637
+ declare const createUserEmailLowerUniqueIndex: Migration;
2638
+
2639
+ declare const createOidcProviderConfigsTable: Migration;
2640
+
2641
+ /** Creates the platform member table keyed by user id. */
2642
+ declare const createPlatformMembersTable: Migration;
2643
+
2644
+ /** Creates the platform invitation table keyed by normalized email. */
2645
+ declare const createPlatformInvitationsTable: Migration;
2646
+
2647
+ /** Creates pending enterprise-SSO identity claims. */
2648
+ declare const createOidcIdentityClaimsTable: Migration;
2649
+
2650
+ /** Creates durable bearer invitation links. */
2651
+ declare const createInviteLinksTable: Migration;
2652
+
2653
+ /** Adds invite-link request context to pending identity claims. */
2654
+ declare const addOidcIdentityClaimInviteFields: Migration;
2655
+
2656
+ /** Creates the single-row durable platform settings table. */
2657
+ declare const createPlatformSettingsTable: Migration;
2658
+
2483
2659
  /**
2484
2660
  * Thread table migrations
2485
2661
  */
@@ -2873,4 +3049,4 @@ declare const createChannelReplyJobsTable: Migration;
2873
3049
  */
2874
3050
  declare const createStoreItemsTable: Migration;
2875
3051
 
2876
- export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, CheckpointBaseNotFoundError, CheckpointTargetNotEmptyError, type CreateChannelIdentityMappingInput, DuplicateProjectMembershipError, DuplicateProjectRoomMessageIdempotencyKeyError, InvalidFileShareAddressError, InvalidMcpAppShareAddressError, InvalidMcpAppShareVisibilityError, 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, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLModelProviderStore, type PostgreSQLModelProviderStoreOptions, PostgreSQLOpenAuditStore, type PostgreSQLOpenAuditStoreOptions, 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, 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, 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, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createPluginDeployments, createProjectRoomReadStates, createProjectRoomTables, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createStoreItemsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, dropPluginDeploymentAuthToken, enforceUniqueEvalProjectName, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
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 };