@axiom-lattice/local-stores 5.0.2 → 5.1.0

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/local-stores@5.0.2 build /home/runner/work/agentic/agentic/packages/local-stores
2
+ > @axiom-lattice/local-stores@5.1.0 build /home/runner/work/agentic/agentic/packages/local-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 254.39 KB
12
- CJS dist/index.js.map 461.99 KB
13
- CJS ⚡️ Build success in 821ms
14
- ESM dist/index.mjs 249.57 KB
15
- ESM dist/index.mjs.map 458.34 KB
16
- ESM ⚡️ Build success in 854ms
11
+ ESM dist/index.mjs 278.33 KB
12
+ ESM dist/index.mjs.map 513.88 KB
13
+ ESM ⚡️ Build success in 965ms
14
+ CJS dist/index.js 283.74 KB
15
+ CJS dist/index.js.map 518.12 KB
16
+ CJS ⚡️ Build success in 1019ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 14030ms
19
- DTS dist/index.d.ts 46.34 KB
20
- DTS dist/index.d.mts 46.34 KB
18
+ DTS ⚡️ Build success in 13765ms
19
+ DTS dist/index.d.ts 52.54 KB
20
+ DTS dist/index.d.mts 52.54 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,107 @@
1
1
  # @axiom-lattice/local-stores
2
2
 
3
+ ## 5.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - f29edad: Add the Admin Center platform-management surface, durable platform settings,
8
+ opaque invite links, enterprise SSO follow-ups, and domain branding.
9
+
10
+ - **Admin Center:** grouped navigation (Access/Tenancy/Identity/Settings),
11
+ full-width responsive shell, Overview attention cards + health + stats,
12
+ redesigned People, Platform Roles, Invite Links, Tenants, Tenant Members,
13
+ OIDC Providers, and Settings pages with shared Admin Center primitives.
14
+ Settings is split into three direct writable menu entries (Authentication,
15
+ Rate Limits & Quotas, Branding) instead of an in-page tab set; the read-only
16
+ environment view lives in Overview.
17
+ - **Platform settings:** PostgreSQL-backed auth/invite/rate-limit/quota/branding
18
+ settings with env fallback, version CAS, outbox invalidation, 30s refresh,
19
+ read-only Overview environment, and multi-replica readiness.
20
+ - **Invite links:** opaque, encrypted-at-rest links with expiry/max uses/revoke;
21
+ platform role links always require admin approval, tenant member auto-join
22
+ only with email-bound IdP-verified email; revoke cancels pending claims.
23
+ - **SSO follow-ups:** optional default tenant, private-host allowlists, email
24
+ completion claims, pending SSO review, and SSO avatar metadata.
25
+ - **Domain branding:** platform default + exact-host domain overrides, public
26
+ `GET /api/branding`, Admin Center Branding tab, login/register/invite brand
27
+ application, workspace domain theme inheritance, and tenant primary-color
28
+ override.
29
+ - **Security hardening:** platform guards fail closed; email-less completion and
30
+ public branding/invite routes are explicitly public; owner fallback/owner
31
+ target protections; last-owner checks; SSRF allowlist and metadata rejection;
32
+ rate-limit precedence; claim approval leases/rollback; avatar URL validation.
33
+
34
+ - 0ad828b: Add generic OIDC console login with Azure Entra ID support, external identity
35
+ binding, JIT pending users, platform roles, a separate Platform Admin app, and
36
+ platform-scoped provider configuration.
37
+
38
+ - `@axiom-lattice/auth-oidc`: authorization-code + PKCE + nonce via
39
+ `openid-client` v6, Azure `oid`/`sub` claim mapping, signed state cookie,
40
+ endpoint SSRF validation, config parsing, and per-provider `providerId` state.
41
+ - `@axiom-lattice/protocols` / `@axiom-lattice/core`: auth provider and external
42
+ identity store contracts, provider registry, identity mapping (issuer-scoped
43
+ keys, verified-email-only auto-link, JIT pending), in-memory identity store,
44
+ the OIDC provider config store contract + encrypted in-memory store, and the
45
+ `PlatformMemberStore` contract + in-memory store with `owner`/`admin`/
46
+ `auditor` roles.
47
+ - `@axiom-lattice/local-stores` / `@axiom-lattice/pg-stores`: external identity,
48
+ OIDC provider config, and platform member stores; PostgreSQL migrations v209
49
+ (`lattice_user_identities`), v210 (`lower(email)` unique index), v211
50
+ (`lattice_oidc_provider_configs`, encrypted client secret), and v212
51
+ (`lattice_platform_members`).
52
+ - `@axiom-lattice/gateway`: multi-provider OIDC routes, one-time 60-second
53
+ handoff/exchange, platform-role CRUD/test APIs for store providers, runtime
54
+ registry with env `oidc` fallback, `PlatformBootstrapService` +
55
+ `PlatformAccessService` (owner/admin/auditor) replacing env-only checks on
56
+ approval/user/tenant/OIDC surfaces, `/api/platform/*` member and tenant
57
+ assignment APIs, OIDC rate limits, and fail-closed deployment checks.
58
+ - `@axiom-lattice/client-sdk`: `client.oidcProviders` list/create/update/
59
+ delete/test/testStored and `client.platform` me/members/tenant-assignment
60
+ methods with types.
61
+ - `@axiom-lattice/react-sdk`: provider discovery, SSO button labeled with the
62
+ provider display name, `/auth/callback` bootstrap, pending/error notices, the
63
+ write-only OIDC provider panel, and the separate `/platform-admin` app with
64
+ Overview, Platform Users, Tenants, Tenant Assignments, and OIDC Providers.
65
+ OIDC Providers is removed from the tenant workspace menu.
66
+
67
+ - 0ad828b: SSO-only deployments and platform invitations.
68
+
69
+ - `@axiom-lattice/gateway`: `AUTH_LOCAL_ENABLED` / `AUTH_BREAK_GLASS_EMAILS`
70
+ disable password login, registration, and password changes while keeping an
71
+ audited, env-only break-glass escape hatch. `PlatformSsoBootstrapService`
72
+ claims the first platform owner from a verified SSO login (issuer + subject >
73
+ group > email) with no local password, serialized by the
74
+ `platform-bootstrap` lease. `PlatformInvitationService` invites normalized
75
+ emails: existing active users are granted immediately, everyone else gets a
76
+ pending invitation claimed on the first verified SSO login before identity
77
+ mapping (consume-before-grant, per-email lease, owner-only owner invitations,
78
+ `PLATFORM_INVITATION_TRUST_EMAIL` off by default).
79
+ - `@axiom-lattice/protocols` / `@axiom-lattice/core` /
80
+ `@axiom-lattice/local-stores` / `@axiom-lattice/pg-stores`: platform
81
+ invitation store contract + InMemory/Local/PostgreSQL implementations and PG
82
+ migration v213 (`lattice_platform_invitations`).
83
+ - `@axiom-lattice/client-sdk`: `client.platform.listInvitations()` /
84
+ `revokeInvitation(email)` and the `{ member?, invitation? }` grant result.
85
+ - `@axiom-lattice/react-sdk`: Platform Users loads and revokes pending
86
+ invitations, distinguishes "invited" from "granted", exposes SSO-only /
87
+ break-glass login states, and keeps owner invitations owner-only. Invited
88
+ users need no tenant membership to use `/platform-admin`.
89
+
90
+ ### Patch Changes
91
+
92
+ - Updated dependencies [f29edad]
93
+ - Updated dependencies [0ad828b]
94
+ - Updated dependencies [0ad828b]
95
+ - @axiom-lattice/protocols@7.2.0
96
+ - @axiom-lattice/core@12.2.0
97
+
98
+ ## 5.0.3
99
+
100
+ ### Patch Changes
101
+
102
+ - Updated dependencies [253552f]
103
+ - @axiom-lattice/core@12.1.1
104
+
3
105
  ## 5.0.2
4
106
 
5
107
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { SqlJsStatic, Database } from 'sql.js';
2
2
  import { SqliteSaver } from '@langchain/langgraph-checkpoint-sqlite';
3
- import { ThreadStore, Thread, CreateThreadRequest, StoreProtocol, StorePutInput, StoreItem, StoreSearchInput, AssistantStore, Assistant, CreateAssistantRequest, WorkspaceStore, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ProjectStore, ProjectFilter, Project, CreateProjectRequest, UpdateProjectRequest, UpdateProjectCapabilityBundlesResult, ProjectRoomStore, ProjectRoom, ProjectMembershipStore, ProjectMembership, ProjectHumanRole, ProjectMembershipMutationResult, ProjectBotMembershipStore, ProjectBotMembership, ProjectRoomMessageStore, ProjectRoomMessage, ProjectRoomReadStateStore, ProjectRoomReadState, UserStore, User, CreateUserRequest, UpdateUserRequest, TenantStore, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLinkStore, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, DatabaseConfigStore, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, ConnectionStore, ConnectionEntry, MetricsServerConfigStore, MetricsServerConfigEntry, CreateMetricsServerConfigRequest, UpdateMetricsServerConfigRequest, McpServerConfigStore, McpServerConfigEntry, CreateMcpServerConfigRequest, UpdateMcpServerConfigRequest, ModelProviderStore, ModelProviderEntry, CreateModelProviderRequest, UpdateModelProviderRequest, ModelProviderStatus, ModelProviderModelEntry, ProviderModelInput, 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, SkillStore, SkillStoreContext, Skill, CreateSkillRequest, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TaskStore, CreateTaskRequest, TaskItem, TaskListFilter, TaskDependentListQuery, UpdateTaskRequest, TaskMutationSnapshot, TaskWorkItemStore, CreateWorkItemRequest, TaskWorkItem, CreateWorkItemIfAbsentRequest, TaskWorkItemListFilter, ProjectLifecycleEventQuery, CapabilityBundleStore, CapabilityBundle, InternalCreateCapabilityBundleInput, InternalUpdateCapabilityBundleInput, CapabilityBundleDeleteResult, IConversationStore, ConversationRecord, CreateConversationInput } from '@axiom-lattice/protocols';
3
+ import { ThreadStore, Thread, CreateThreadRequest, StoreProtocol, StorePutInput, StoreItem, StoreSearchInput, AssistantStore, Assistant, CreateAssistantRequest, WorkspaceStore, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ProjectStore, ProjectFilter, Project, CreateProjectRequest, UpdateProjectRequest, UpdateProjectCapabilityBundlesResult, ProjectRoomStore, ProjectRoom, ProjectMembershipStore, ProjectMembership, ProjectHumanRole, ProjectMembershipMutationResult, ProjectBotMembershipStore, ProjectBotMembership, ProjectRoomMessageStore, ProjectRoomMessage, ProjectRoomReadStateStore, ProjectRoomReadState, 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, PlatformSettingsStore, PlatformSettingsRecord, PlatformSettingsDocument, DatabaseConfigStore, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, ConnectionStore, ConnectionEntry, MetricsServerConfigStore, MetricsServerConfigEntry, CreateMetricsServerConfigRequest, UpdateMetricsServerConfigRequest, McpServerConfigStore, McpServerConfigEntry, CreateMcpServerConfigRequest, UpdateMcpServerConfigRequest, ModelProviderStore, ModelProviderEntry, CreateModelProviderRequest, UpdateModelProviderRequest, ModelProviderStatus, ModelProviderModelEntry, ProviderModelInput, 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, SkillStore, SkillStoreContext, Skill, CreateSkillRequest, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TaskStore, CreateTaskRequest, TaskItem, TaskListFilter, TaskDependentListQuery, UpdateTaskRequest, TaskMutationSnapshot, TaskWorkItemStore, CreateWorkItemRequest, TaskWorkItem, CreateWorkItemIfAbsentRequest, TaskWorkItemListFilter, ProjectLifecycleEventQuery, CapabilityBundleStore, CapabilityBundle, InternalCreateCapabilityBundleInput, InternalUpdateCapabilityBundleInput, CapabilityBundleDeleteResult, IConversationStore, ConversationRecord, CreateConversationInput } from '@axiom-lattice/protocols';
4
4
  import { IMessageQueueStore, AddMessageParams, PendingMessage, QueueScope, ClaimMessagesOptions, ThreadInfo } from '@axiom-lattice/core';
5
5
 
6
6
  /**
@@ -460,6 +460,124 @@ declare class LocalUserTenantLinkStore implements UserTenantLinkStore {
460
460
  hasLink(userId: string, tenantId: string): Promise<boolean>;
461
461
  }
462
462
 
463
+ declare class LocalUserExternalIdentityStore implements UserExternalIdentityStore {
464
+ private readonly db;
465
+ constructor(db: DatabaseWrapper);
466
+ getByProviderSubject(providerId: string, issuer: string, subject: string): Promise<UserExternalIdentity | null>;
467
+ listByUser(userId: string): Promise<UserExternalIdentity[]>;
468
+ link(identity: UserExternalIdentity): Promise<void>;
469
+ unlink(providerId: string, issuer: string, subject: string): Promise<void>;
470
+ }
471
+
472
+ /**
473
+ * SQLite implementation of {@link OidcProviderConfigStore}.
474
+ *
475
+ * Persists OIDC provider configurations in the local `lattice_oidc_provider_configs`
476
+ * table, encrypting the client secret at rest. Intended for single-process,
477
+ * file-backed deployments.
478
+ */
479
+ declare class LocalOidcProviderConfigStore implements OidcProviderConfigStore {
480
+ private readonly db;
481
+ constructor(db: DatabaseWrapper);
482
+ private ensureColumn;
483
+ list(): Promise<OidcProviderConfig[]>;
484
+ get(id: string): Promise<OidcProviderConfig | null>;
485
+ create(id: string, input: CreateOidcProviderConfigInput): Promise<OidcProviderConfig>;
486
+ update(id: string, updates: UpdateOidcProviderConfigInput): Promise<OidcProviderConfig | null>;
487
+ delete(id: string): Promise<boolean>;
488
+ }
489
+
490
+ /**
491
+ * SQLite implementation of {@link PlatformMemberStore}.
492
+ *
493
+ * Persists platform grants in the local `lattice_platform_members` table.
494
+ * Intended for single-process, file-backed deployments.
495
+ */
496
+ declare class LocalPlatformMemberStore implements PlatformMemberStore {
497
+ private readonly db;
498
+ constructor(db: DatabaseWrapper);
499
+ /** Lists every platform member ordered by user id. */
500
+ list(): Promise<PlatformMember[]>;
501
+ /** Returns the platform member for a user, or null. */
502
+ get(userId: string): Promise<PlatformMember | null>;
503
+ /**
504
+ * Inserts or replaces a member keyed by user id.
505
+ *
506
+ * The supplied grant replaces any existing row in full (last write wins),
507
+ * including `grantedAt` and `updatedAt`.
508
+ */
509
+ upsert(member: PlatformMember): Promise<PlatformMember>;
510
+ /** Deletes a member. Returns whether a row was removed. */
511
+ delete(userId: string): Promise<boolean>;
512
+ }
513
+
514
+ /**
515
+ * SQLite implementation of {@link PlatformInvitationStore}.
516
+ *
517
+ * Persists invitations in the local `lattice_platform_invitations` table,
518
+ * keyed by normalized email. Intended for single-process, file-backed
519
+ * deployments.
520
+ */
521
+ declare class LocalPlatformInvitationStore implements PlatformInvitationStore {
522
+ private readonly db;
523
+ constructor(db: DatabaseWrapper);
524
+ /** Lists every invitation ordered by normalized email. */
525
+ list(): Promise<PlatformInvitation[]>;
526
+ /** Returns the invitation for an email, or null. */
527
+ get(email: string): Promise<PlatformInvitation | null>;
528
+ /**
529
+ * Inserts or replaces an invitation keyed by normalized email.
530
+ *
531
+ * The supplied invitation replaces any existing row in full (last write wins),
532
+ * including `expiresAt` and `consumedAt`.
533
+ */
534
+ upsert(invitation: PlatformInvitation): Promise<PlatformInvitation>;
535
+ /** Deletes an invitation. Returns whether a row was removed. */
536
+ delete(email: string): Promise<boolean>;
537
+ /**
538
+ * Atomically consumes a pending, unexpired invitation.
539
+ *
540
+ * Returns the consumed invitation, or null when the row is missing, already
541
+ * consumed, or expired.
542
+ */
543
+ consume(email: string, at: Date): Promise<PlatformInvitation | null>;
544
+ }
545
+
546
+ /** SQLite implementation of {@link OidcIdentityClaimStore}. */
547
+ declare class LocalOidcIdentityClaimStore implements OidcIdentityClaimStore {
548
+ private readonly db;
549
+ constructor(db: DatabaseWrapper);
550
+ private ensureColumn;
551
+ list(status?: OidcIdentityClaimStatus): Promise<OidcIdentityClaim[]>;
552
+ get(id: string): Promise<OidcIdentityClaim | null>;
553
+ getPendingBySubject(providerId: string, issuer: string, subject: string, now: Date): Promise<OidcIdentityClaim | null>;
554
+ create(input: CreateOidcIdentityClaimInput): Promise<OidcIdentityClaim>;
555
+ updatePending(id: string, updates: UpdateOidcIdentityClaimInput, now: Date): Promise<OidcIdentityClaim | null>;
556
+ approve(id: string, approval: OidcIdentityClaimApproval, now: Date): Promise<OidcIdentityClaim | null>;
557
+ reject(id: string, reviewedBy: string, now: Date): Promise<OidcIdentityClaim | null>;
558
+ delete(id: string): Promise<boolean>;
559
+ }
560
+
561
+ /** SQLite implementation of {@link InviteLinkStore}. */
562
+ declare class LocalInviteLinkStore implements InviteLinkStore {
563
+ private readonly db;
564
+ constructor(db: DatabaseWrapper);
565
+ list(): Promise<InviteLink[]>;
566
+ get(id: string): Promise<InviteLink | null>;
567
+ getByTokenHash(tokenHash: string): Promise<InviteLink | null>;
568
+ create(input: CreateInviteLinkInput): Promise<InviteLink>;
569
+ consume(tokenHash: string, now: Date): Promise<InviteLink | null>;
570
+ revoke(id: string, now: Date): Promise<InviteLink | null>;
571
+ }
572
+
573
+ /** SQLite implementation of {@link PlatformSettingsStore}. */
574
+ declare class LocalPlatformSettingsStore implements PlatformSettingsStore {
575
+ private readonly db;
576
+ constructor(db: DatabaseWrapper);
577
+ get(): Promise<PlatformSettingsRecord | null>;
578
+ save(document: PlatformSettingsDocument, expectedVersion: number, updatedBy?: string): Promise<PlatformSettingsRecord>;
579
+ }
580
+
463
581
  /**
464
582
  * Local SQLite implementation of DatabaseConfigStore.
465
583
  */
@@ -979,6 +1097,13 @@ declare function createLocalStoreConfig(options?: LocalStoreConfigOptions): Prom
979
1097
  user: LocalUserStore;
980
1098
  tenant: LocalTenantStore;
981
1099
  userTenantLink: LocalUserTenantLinkStore;
1100
+ userExternalIdentity: LocalUserExternalIdentityStore;
1101
+ oidcProviderConfig: LocalOidcProviderConfigStore;
1102
+ platformMember: LocalPlatformMemberStore;
1103
+ platformInvitation: LocalPlatformInvitationStore;
1104
+ oidcIdentityClaim: LocalOidcIdentityClaimStore;
1105
+ inviteLink: LocalInviteLinkStore;
1106
+ platformSettings: LocalPlatformSettingsStore;
982
1107
  database: LocalDatabaseConfigStore;
983
1108
  connection: LocalConnectionStore;
984
1109
  metrics: LocalMetricsServerConfigStore;
@@ -1015,4 +1140,4 @@ declare class InMemoryConversationStore implements IConversationStore {
1015
1140
  deleteConversation(conversationId: string): Promise<void>;
1016
1141
  }
1017
1142
 
1018
- export { DatabaseWrapper, DuplicateProjectMembershipError, DuplicateProjectRoomMessageIdempotencyKeyError, InMemoryConversationStore, LocalA2AApiKeyStore, LocalAssistantStore, LocalCapabilityBundleStore, LocalChannelBindingStore, LocalChannelInstallationStore, LocalConnectionStore, LocalDatabaseConfigStore, LocalEvalStore, LocalMcpServerConfigStore, LocalMetricsServerConfigStore, LocalModelProviderStore, LocalOpenAuditStore, LocalProjectBotMembershipStore, LocalProjectMembershipStore, LocalProjectRoomMessageStore, LocalProjectRoomReadStateStore, LocalProjectRoomStore, LocalProjectStore, LocalScheduleStorage, LocalSkillStore, LocalStore, type LocalStoreConfigOptions, type LocalStoreOptions, LocalTaskStore, LocalTaskWorkItemStore, LocalTenantStore, LocalThreadMessageQueueStore, LocalThreadStore, LocalUserStore, LocalUserTenantLinkStore, LocalWorkflowTrackingStore, LocalWorkspaceStore, type Migration, MigrationManager, ProjectBotMembershipIdConflictError, ProjectMembershipIdConflictError, ProjectRoomMessageIdConflictError, RunResult, StatementWrapper, closeDatabase, createLocalStoreConfig, ensureTable, getDatabase, initDatabase, nowISO, parseISO };
1143
+ export { DatabaseWrapper, DuplicateProjectMembershipError, DuplicateProjectRoomMessageIdempotencyKeyError, InMemoryConversationStore, LocalA2AApiKeyStore, LocalAssistantStore, LocalCapabilityBundleStore, LocalChannelBindingStore, LocalChannelInstallationStore, LocalConnectionStore, LocalDatabaseConfigStore, LocalEvalStore, LocalInviteLinkStore, LocalMcpServerConfigStore, LocalMetricsServerConfigStore, LocalModelProviderStore, LocalOidcIdentityClaimStore, LocalOidcProviderConfigStore, LocalOpenAuditStore, LocalPlatformInvitationStore, LocalPlatformMemberStore, LocalPlatformSettingsStore, LocalProjectBotMembershipStore, LocalProjectMembershipStore, LocalProjectRoomMessageStore, LocalProjectRoomReadStateStore, LocalProjectRoomStore, LocalProjectStore, LocalScheduleStorage, LocalSkillStore, LocalStore, type LocalStoreConfigOptions, type LocalStoreOptions, LocalTaskStore, LocalTaskWorkItemStore, LocalTenantStore, LocalThreadMessageQueueStore, LocalThreadStore, LocalUserExternalIdentityStore, LocalUserStore, LocalUserTenantLinkStore, LocalWorkflowTrackingStore, LocalWorkspaceStore, type Migration, MigrationManager, ProjectBotMembershipIdConflictError, ProjectMembershipIdConflictError, ProjectRoomMessageIdConflictError, RunResult, StatementWrapper, closeDatabase, createLocalStoreConfig, ensureTable, getDatabase, initDatabase, nowISO, parseISO };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { SqlJsStatic, Database } from 'sql.js';
2
2
  import { SqliteSaver } from '@langchain/langgraph-checkpoint-sqlite';
3
- import { ThreadStore, Thread, CreateThreadRequest, StoreProtocol, StorePutInput, StoreItem, StoreSearchInput, AssistantStore, Assistant, CreateAssistantRequest, WorkspaceStore, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ProjectStore, ProjectFilter, Project, CreateProjectRequest, UpdateProjectRequest, UpdateProjectCapabilityBundlesResult, ProjectRoomStore, ProjectRoom, ProjectMembershipStore, ProjectMembership, ProjectHumanRole, ProjectMembershipMutationResult, ProjectBotMembershipStore, ProjectBotMembership, ProjectRoomMessageStore, ProjectRoomMessage, ProjectRoomReadStateStore, ProjectRoomReadState, UserStore, User, CreateUserRequest, UpdateUserRequest, TenantStore, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLinkStore, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, DatabaseConfigStore, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, ConnectionStore, ConnectionEntry, MetricsServerConfigStore, MetricsServerConfigEntry, CreateMetricsServerConfigRequest, UpdateMetricsServerConfigRequest, McpServerConfigStore, McpServerConfigEntry, CreateMcpServerConfigRequest, UpdateMcpServerConfigRequest, ModelProviderStore, ModelProviderEntry, CreateModelProviderRequest, UpdateModelProviderRequest, ModelProviderStatus, ModelProviderModelEntry, ProviderModelInput, 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, SkillStore, SkillStoreContext, Skill, CreateSkillRequest, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TaskStore, CreateTaskRequest, TaskItem, TaskListFilter, TaskDependentListQuery, UpdateTaskRequest, TaskMutationSnapshot, TaskWorkItemStore, CreateWorkItemRequest, TaskWorkItem, CreateWorkItemIfAbsentRequest, TaskWorkItemListFilter, ProjectLifecycleEventQuery, CapabilityBundleStore, CapabilityBundle, InternalCreateCapabilityBundleInput, InternalUpdateCapabilityBundleInput, CapabilityBundleDeleteResult, IConversationStore, ConversationRecord, CreateConversationInput } from '@axiom-lattice/protocols';
3
+ import { ThreadStore, Thread, CreateThreadRequest, StoreProtocol, StorePutInput, StoreItem, StoreSearchInput, AssistantStore, Assistant, CreateAssistantRequest, WorkspaceStore, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ProjectStore, ProjectFilter, Project, CreateProjectRequest, UpdateProjectRequest, UpdateProjectCapabilityBundlesResult, ProjectRoomStore, ProjectRoom, ProjectMembershipStore, ProjectMembership, ProjectHumanRole, ProjectMembershipMutationResult, ProjectBotMembershipStore, ProjectBotMembership, ProjectRoomMessageStore, ProjectRoomMessage, ProjectRoomReadStateStore, ProjectRoomReadState, 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, PlatformSettingsStore, PlatformSettingsRecord, PlatformSettingsDocument, DatabaseConfigStore, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, ConnectionStore, ConnectionEntry, MetricsServerConfigStore, MetricsServerConfigEntry, CreateMetricsServerConfigRequest, UpdateMetricsServerConfigRequest, McpServerConfigStore, McpServerConfigEntry, CreateMcpServerConfigRequest, UpdateMcpServerConfigRequest, ModelProviderStore, ModelProviderEntry, CreateModelProviderRequest, UpdateModelProviderRequest, ModelProviderStatus, ModelProviderModelEntry, ProviderModelInput, 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, SkillStore, SkillStoreContext, Skill, CreateSkillRequest, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TaskStore, CreateTaskRequest, TaskItem, TaskListFilter, TaskDependentListQuery, UpdateTaskRequest, TaskMutationSnapshot, TaskWorkItemStore, CreateWorkItemRequest, TaskWorkItem, CreateWorkItemIfAbsentRequest, TaskWorkItemListFilter, ProjectLifecycleEventQuery, CapabilityBundleStore, CapabilityBundle, InternalCreateCapabilityBundleInput, InternalUpdateCapabilityBundleInput, CapabilityBundleDeleteResult, IConversationStore, ConversationRecord, CreateConversationInput } from '@axiom-lattice/protocols';
4
4
  import { IMessageQueueStore, AddMessageParams, PendingMessage, QueueScope, ClaimMessagesOptions, ThreadInfo } from '@axiom-lattice/core';
5
5
 
6
6
  /**
@@ -460,6 +460,124 @@ declare class LocalUserTenantLinkStore implements UserTenantLinkStore {
460
460
  hasLink(userId: string, tenantId: string): Promise<boolean>;
461
461
  }
462
462
 
463
+ declare class LocalUserExternalIdentityStore implements UserExternalIdentityStore {
464
+ private readonly db;
465
+ constructor(db: DatabaseWrapper);
466
+ getByProviderSubject(providerId: string, issuer: string, subject: string): Promise<UserExternalIdentity | null>;
467
+ listByUser(userId: string): Promise<UserExternalIdentity[]>;
468
+ link(identity: UserExternalIdentity): Promise<void>;
469
+ unlink(providerId: string, issuer: string, subject: string): Promise<void>;
470
+ }
471
+
472
+ /**
473
+ * SQLite implementation of {@link OidcProviderConfigStore}.
474
+ *
475
+ * Persists OIDC provider configurations in the local `lattice_oidc_provider_configs`
476
+ * table, encrypting the client secret at rest. Intended for single-process,
477
+ * file-backed deployments.
478
+ */
479
+ declare class LocalOidcProviderConfigStore implements OidcProviderConfigStore {
480
+ private readonly db;
481
+ constructor(db: DatabaseWrapper);
482
+ private ensureColumn;
483
+ list(): Promise<OidcProviderConfig[]>;
484
+ get(id: string): Promise<OidcProviderConfig | null>;
485
+ create(id: string, input: CreateOidcProviderConfigInput): Promise<OidcProviderConfig>;
486
+ update(id: string, updates: UpdateOidcProviderConfigInput): Promise<OidcProviderConfig | null>;
487
+ delete(id: string): Promise<boolean>;
488
+ }
489
+
490
+ /**
491
+ * SQLite implementation of {@link PlatformMemberStore}.
492
+ *
493
+ * Persists platform grants in the local `lattice_platform_members` table.
494
+ * Intended for single-process, file-backed deployments.
495
+ */
496
+ declare class LocalPlatformMemberStore implements PlatformMemberStore {
497
+ private readonly db;
498
+ constructor(db: DatabaseWrapper);
499
+ /** Lists every platform member ordered by user id. */
500
+ list(): Promise<PlatformMember[]>;
501
+ /** Returns the platform member for a user, or null. */
502
+ get(userId: string): Promise<PlatformMember | null>;
503
+ /**
504
+ * Inserts or replaces a member keyed by user id.
505
+ *
506
+ * The supplied grant replaces any existing row in full (last write wins),
507
+ * including `grantedAt` and `updatedAt`.
508
+ */
509
+ upsert(member: PlatformMember): Promise<PlatformMember>;
510
+ /** Deletes a member. Returns whether a row was removed. */
511
+ delete(userId: string): Promise<boolean>;
512
+ }
513
+
514
+ /**
515
+ * SQLite implementation of {@link PlatformInvitationStore}.
516
+ *
517
+ * Persists invitations in the local `lattice_platform_invitations` table,
518
+ * keyed by normalized email. Intended for single-process, file-backed
519
+ * deployments.
520
+ */
521
+ declare class LocalPlatformInvitationStore implements PlatformInvitationStore {
522
+ private readonly db;
523
+ constructor(db: DatabaseWrapper);
524
+ /** Lists every invitation ordered by normalized email. */
525
+ list(): Promise<PlatformInvitation[]>;
526
+ /** Returns the invitation for an email, or null. */
527
+ get(email: string): Promise<PlatformInvitation | null>;
528
+ /**
529
+ * Inserts or replaces an invitation keyed by normalized email.
530
+ *
531
+ * The supplied invitation replaces any existing row in full (last write wins),
532
+ * including `expiresAt` and `consumedAt`.
533
+ */
534
+ upsert(invitation: PlatformInvitation): Promise<PlatformInvitation>;
535
+ /** Deletes an invitation. Returns whether a row was removed. */
536
+ delete(email: string): Promise<boolean>;
537
+ /**
538
+ * Atomically consumes a pending, unexpired invitation.
539
+ *
540
+ * Returns the consumed invitation, or null when the row is missing, already
541
+ * consumed, or expired.
542
+ */
543
+ consume(email: string, at: Date): Promise<PlatformInvitation | null>;
544
+ }
545
+
546
+ /** SQLite implementation of {@link OidcIdentityClaimStore}. */
547
+ declare class LocalOidcIdentityClaimStore implements OidcIdentityClaimStore {
548
+ private readonly db;
549
+ constructor(db: DatabaseWrapper);
550
+ private ensureColumn;
551
+ list(status?: OidcIdentityClaimStatus): Promise<OidcIdentityClaim[]>;
552
+ get(id: string): Promise<OidcIdentityClaim | null>;
553
+ getPendingBySubject(providerId: string, issuer: string, subject: string, now: Date): Promise<OidcIdentityClaim | null>;
554
+ create(input: CreateOidcIdentityClaimInput): Promise<OidcIdentityClaim>;
555
+ updatePending(id: string, updates: UpdateOidcIdentityClaimInput, now: Date): Promise<OidcIdentityClaim | null>;
556
+ approve(id: string, approval: OidcIdentityClaimApproval, now: Date): Promise<OidcIdentityClaim | null>;
557
+ reject(id: string, reviewedBy: string, now: Date): Promise<OidcIdentityClaim | null>;
558
+ delete(id: string): Promise<boolean>;
559
+ }
560
+
561
+ /** SQLite implementation of {@link InviteLinkStore}. */
562
+ declare class LocalInviteLinkStore implements InviteLinkStore {
563
+ private readonly db;
564
+ constructor(db: DatabaseWrapper);
565
+ list(): Promise<InviteLink[]>;
566
+ get(id: string): Promise<InviteLink | null>;
567
+ getByTokenHash(tokenHash: string): Promise<InviteLink | null>;
568
+ create(input: CreateInviteLinkInput): Promise<InviteLink>;
569
+ consume(tokenHash: string, now: Date): Promise<InviteLink | null>;
570
+ revoke(id: string, now: Date): Promise<InviteLink | null>;
571
+ }
572
+
573
+ /** SQLite implementation of {@link PlatformSettingsStore}. */
574
+ declare class LocalPlatformSettingsStore implements PlatformSettingsStore {
575
+ private readonly db;
576
+ constructor(db: DatabaseWrapper);
577
+ get(): Promise<PlatformSettingsRecord | null>;
578
+ save(document: PlatformSettingsDocument, expectedVersion: number, updatedBy?: string): Promise<PlatformSettingsRecord>;
579
+ }
580
+
463
581
  /**
464
582
  * Local SQLite implementation of DatabaseConfigStore.
465
583
  */
@@ -979,6 +1097,13 @@ declare function createLocalStoreConfig(options?: LocalStoreConfigOptions): Prom
979
1097
  user: LocalUserStore;
980
1098
  tenant: LocalTenantStore;
981
1099
  userTenantLink: LocalUserTenantLinkStore;
1100
+ userExternalIdentity: LocalUserExternalIdentityStore;
1101
+ oidcProviderConfig: LocalOidcProviderConfigStore;
1102
+ platformMember: LocalPlatformMemberStore;
1103
+ platformInvitation: LocalPlatformInvitationStore;
1104
+ oidcIdentityClaim: LocalOidcIdentityClaimStore;
1105
+ inviteLink: LocalInviteLinkStore;
1106
+ platformSettings: LocalPlatformSettingsStore;
982
1107
  database: LocalDatabaseConfigStore;
983
1108
  connection: LocalConnectionStore;
984
1109
  metrics: LocalMetricsServerConfigStore;
@@ -1015,4 +1140,4 @@ declare class InMemoryConversationStore implements IConversationStore {
1015
1140
  deleteConversation(conversationId: string): Promise<void>;
1016
1141
  }
1017
1142
 
1018
- export { DatabaseWrapper, DuplicateProjectMembershipError, DuplicateProjectRoomMessageIdempotencyKeyError, InMemoryConversationStore, LocalA2AApiKeyStore, LocalAssistantStore, LocalCapabilityBundleStore, LocalChannelBindingStore, LocalChannelInstallationStore, LocalConnectionStore, LocalDatabaseConfigStore, LocalEvalStore, LocalMcpServerConfigStore, LocalMetricsServerConfigStore, LocalModelProviderStore, LocalOpenAuditStore, LocalProjectBotMembershipStore, LocalProjectMembershipStore, LocalProjectRoomMessageStore, LocalProjectRoomReadStateStore, LocalProjectRoomStore, LocalProjectStore, LocalScheduleStorage, LocalSkillStore, LocalStore, type LocalStoreConfigOptions, type LocalStoreOptions, LocalTaskStore, LocalTaskWorkItemStore, LocalTenantStore, LocalThreadMessageQueueStore, LocalThreadStore, LocalUserStore, LocalUserTenantLinkStore, LocalWorkflowTrackingStore, LocalWorkspaceStore, type Migration, MigrationManager, ProjectBotMembershipIdConflictError, ProjectMembershipIdConflictError, ProjectRoomMessageIdConflictError, RunResult, StatementWrapper, closeDatabase, createLocalStoreConfig, ensureTable, getDatabase, initDatabase, nowISO, parseISO };
1143
+ export { DatabaseWrapper, DuplicateProjectMembershipError, DuplicateProjectRoomMessageIdempotencyKeyError, InMemoryConversationStore, LocalA2AApiKeyStore, LocalAssistantStore, LocalCapabilityBundleStore, LocalChannelBindingStore, LocalChannelInstallationStore, LocalConnectionStore, LocalDatabaseConfigStore, LocalEvalStore, LocalInviteLinkStore, LocalMcpServerConfigStore, LocalMetricsServerConfigStore, LocalModelProviderStore, LocalOidcIdentityClaimStore, LocalOidcProviderConfigStore, LocalOpenAuditStore, LocalPlatformInvitationStore, LocalPlatformMemberStore, LocalPlatformSettingsStore, LocalProjectBotMembershipStore, LocalProjectMembershipStore, LocalProjectRoomMessageStore, LocalProjectRoomReadStateStore, LocalProjectRoomStore, LocalProjectStore, LocalScheduleStorage, LocalSkillStore, LocalStore, type LocalStoreConfigOptions, type LocalStoreOptions, LocalTaskStore, LocalTaskWorkItemStore, LocalTenantStore, LocalThreadMessageQueueStore, LocalThreadStore, LocalUserExternalIdentityStore, LocalUserStore, LocalUserTenantLinkStore, LocalWorkflowTrackingStore, LocalWorkspaceStore, type Migration, MigrationManager, ProjectBotMembershipIdConflictError, ProjectMembershipIdConflictError, ProjectRoomMessageIdConflictError, RunResult, StatementWrapper, closeDatabase, createLocalStoreConfig, ensureTable, getDatabase, initDatabase, nowISO, parseISO };