@axiom-lattice/local-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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @axiom-lattice/local-stores@5.0.3 build /home/runner/work/agentic/agentic/packages/local-stores
2
+ > @axiom-lattice/local-stores@5.1.1 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
- ESM dist/index.mjs 249.57 KB
12
- ESM dist/index.mjs.map 458.34 KB
13
- ESM ⚡️ Build success in 768ms
14
- CJS dist/index.js 254.39 KB
15
- CJS dist/index.js.map 461.99 KB
16
- CJS ⚡️ Build success in 781ms
11
+ ESM dist/index.mjs 278.33 KB
12
+ ESM dist/index.mjs.map 513.88 KB
13
+ ESM ⚡️ Build success in 896ms
14
+ CJS dist/index.js 283.74 KB
15
+ CJS dist/index.js.map 518.12 KB
16
+ CJS ⚡️ Build success in 917ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 13081ms
19
- DTS dist/index.d.ts 46.34 KB
20
- DTS dist/index.d.mts 46.34 KB
18
+ DTS ⚡️ Build success in 13156ms
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.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 { 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 };