@axiom-lattice/local-stores 5.1.2 → 5.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
 
2
- > @axiom-lattice/local-stores@5.1.2 build /home/runner/work/agentic/agentic/packages/local-stores
2
+ > @axiom-lattice/local-stores@5.2.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
- CJS dist/index.js 283.74 KB
12
- CJS dist/index.js.map 518.12 KB
13
- CJS ⚡️ Build success in 635ms
14
- ESM dist/index.mjs 278.33 KB
15
- ESM dist/index.mjs.map 513.88 KB
16
- ESM ⚡️ Build success in 651ms
11
+ ESM dist/index.mjs 289.80 KB
12
+ ESM dist/index.mjs.map 535.25 KB
13
+ ESM ⚡️ Build success in 594ms
14
+ CJS dist/index.js 295.30 KB
15
+ CJS dist/index.js.map 539.57 KB
16
+ CJS ⚡️ Build success in 599ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 13560ms
19
- DTS dist/index.d.ts 52.54 KB
20
- DTS dist/index.d.mts 52.54 KB
18
+ DTS ⚡️ Build success in 9486ms
19
+ DTS dist/index.d.ts 55.17 KB
20
+ DTS dist/index.d.mts 55.17 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,81 @@
1
1
  # @axiom-lattice/local-stores
2
2
 
3
+ ## 5.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [b928a17]
8
+ - @axiom-lattice/core@12.3.1
9
+
10
+ ## 5.2.0
11
+
12
+ ### Minor Changes
13
+
14
+ - 2554b78: Add personal-assistant-scoped MCP server configs in their own data domain.
15
+ Configs live in a dedicated `lattice_personal_mcp_server_configs` /
16
+ `lt_personal_mcp_configs` table (PG v220) keyed by
17
+ `(tenantId, ownerAssistantId, key)`, so tenant listings, tenant export/import,
18
+ startup restore, and older replicas never read them. A new
19
+ `/api/personal-mcp-servers` route family resolves the caller's personal
20
+ assistant server-side (no client-supplied assistant id) and returns 404 on
21
+ replicas that predate it rather than falling back to tenant CRUD.
22
+
23
+ Personal MCP tools register into a per-assistant tool bucket and are mounted
24
+ automatically only for the owning assistant, with personal keys shadowing the
25
+ same tenant key and tenant tools still available as fallback. Connections are
26
+ established lazily on the first assistant build, bounded by a sync budget, and
27
+ cross-replica invalidation rides a separate `personal-mcp-config-changed`
28
+ outbox topic that older replicas ignore. Deleting a personal assistant or an
29
+ assistant purges its personal MCP configs and runtime.
30
+
31
+ The MCP drawer now takes an `apiBasePath`, and the personal assistant page
32
+ opens it against the personal routes. Tool selection is reconciled onto the
33
+ live tool list so servers that rename tools each session no longer lose the
34
+ saved selection; the tools endpoint returns the reconciled `selectedTools`, and
35
+ the tools modal gains select-all/deselect-all controls.
36
+
37
+ - 1a4f8fa: Add an append-only platform audit foundation. Admin Center platform mutations are
38
+ captured with the real human initiator, source, route, target tenant, redacted
39
+ request/response, status, and duration. The audit store is available in InMemory, Local
40
+ SQLite, and PostgreSQL, with `GET /api/platform/audit` and client SDK methods.
41
+ - 9107769: Add role-inherited Platform Ops Agent write tools and high-risk playbooks.
42
+ Owners and admins can create/update/delete platform users, grant roles, manage
43
+ invitations/invite links/tenants/members, configure OIDC providers, resolve SSO
44
+ claims, patch settings, and update branding; auditors stay read-only, owner-role
45
+ changes require an owner, and the hidden `__platform__` tenant is protected.
46
+ Every write is audited with the human initiator and the Ops Agent
47
+ thread/tool executor. High-risk operations raise a HITL `confirm` interrupt and execute only after
48
+ the user approves them. The old private Ops thread/message/SSE routes,
49
+ `platformOpsConfirmation` store/service, PG v220 migration, confirm/cancel
50
+ routes, and custom `OpsAgentPanel`/`OpsToolCard` were removed; only
51
+ `/api/platform/ops/config` remains. The Admin Center Ops page now reuses the
52
+ standard `LatticeChat`/AgentRun stack (including the embedded chat sidebar for
53
+ New Thread and History). Platform scope only opens the standard chat route
54
+ families for the fixed `platform-ops` assistant after re-checking the live
55
+ platform role (including the legacy Admin Center `/api/users`, `/api/tenants`,
56
+ and `/api/oidc-providers` routes). Ops threads/runs use a fixed internal **sandbox** workspace/project (with filesystem middleware) inside the hidden
57
+ platform tenant, preserving normal workspace/project thread isolation. The
58
+ signed console session is the tenant authority, not a client-supplied header. A real-Gateway Playwright spec covers the
59
+ platform Ops chat, HITL confirm/resume, and the resulting playbook audit row.
60
+ Ops gains a read-only `ops_list_audit` tool with filters and bounded pagination.
61
+ List tools accept bounded `limit` values, and writes share a per-user
62
+ `platform.ops.write` rate limit (60/minute) that returns
63
+ `PLATFORM_OPS_RATE_LIMITED` and records the refusal in the audit log. Tool
64
+ failures now consistently use `{ success:false, error:{ code, message } }`.
65
+
66
+ ### Patch Changes
67
+
68
+ - Updated dependencies [e5dd58b]
69
+ - Updated dependencies [b3a3428]
70
+ - Updated dependencies [2554b78]
71
+ - Updated dependencies [1a4f8fa]
72
+ - Updated dependencies [cb411cc]
73
+ - Updated dependencies [a43e635]
74
+ - Updated dependencies [9107769]
75
+ - Updated dependencies [c9b8df8]
76
+ - @axiom-lattice/protocols@7.3.0
77
+ - @axiom-lattice/core@12.3.0
78
+
3
79
  ## 5.1.2
4
80
 
5
81
  ### 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, 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';
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, PlatformAuditStore, PlatformAuditAppendInput, PlatformAuditRecord, PlatformAuditQuery, DatabaseConfigStore, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, ConnectionStore, ConnectionEntry, MetricsServerConfigStore, MetricsServerConfigEntry, CreateMetricsServerConfigRequest, UpdateMetricsServerConfigRequest, McpServerConfigStore, PersonalMcpServerConfigStore, McpServerConfigEntry, CreateMcpServerConfigRequest, UpdateMcpServerConfigRequest, PersonalMcpServerConfigEntry, 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
  /**
@@ -578,6 +578,37 @@ declare class LocalPlatformSettingsStore implements PlatformSettingsStore {
578
578
  save(document: PlatformSettingsDocument, expectedVersion: number, updatedBy?: string): Promise<PlatformSettingsRecord>;
579
579
  }
580
580
 
581
+ /**
582
+ * Local SQLite implementation of the platform audit store (append-only).
583
+ */
584
+
585
+ /**
586
+ * SQLite implementation of {@link PlatformAuditStore}.
587
+ *
588
+ * Persists platform-level audit records in the local
589
+ * `lattice_platform_audit` table. Records are append-only and returned
590
+ * newest-first by `createdAt` descending, then `id` descending.
591
+ */
592
+ declare class LocalPlatformAuditStore implements PlatformAuditStore {
593
+ private readonly db;
594
+ constructor(db: DatabaseWrapper);
595
+ /** Appends a record, assigning a fresh id and creation timestamp. */
596
+ append(record: PlatformAuditAppendInput): Promise<PlatformAuditRecord>;
597
+ /** Returns a record by id, or null when it does not exist. */
598
+ get(id: string): Promise<PlatformAuditRecord | null>;
599
+ /**
600
+ * Returns matching records newest-first.
601
+ *
602
+ * `initiatorUserId` only matches human initiators. `from` is inclusive and
603
+ * `to` is exclusive after both are normalized to instants; invalid or empty
604
+ * boundaries are ignored. Records are ordered by `createdAt` descending,
605
+ * then by `id` descending. Results are paginated with a default limit of 100;
606
+ * non-finite `offset`/`limit` fall back to defaults, finite values are
607
+ * truncated to integers, and negatives are clamped to 0.
608
+ */
609
+ query(params: PlatformAuditQuery): Promise<PlatformAuditRecord[]>;
610
+ }
611
+
581
612
  /**
582
613
  * Local SQLite implementation of DatabaseConfigStore.
583
614
  */
@@ -644,7 +675,7 @@ declare class LocalMetricsServerConfigStore implements MetricsServerConfigStore
644
675
  * Local SQLite implementation of McpServerConfigStore.
645
676
  */
646
677
 
647
- declare class LocalMcpServerConfigStore implements McpServerConfigStore {
678
+ declare class LocalMcpServerConfigStore implements McpServerConfigStore, PersonalMcpServerConfigStore {
648
679
  private db;
649
680
  constructor(db: DatabaseWrapper);
650
681
  getAllConfigs(tenantId: string): Promise<McpServerConfigEntry[]>;
@@ -655,6 +686,15 @@ declare class LocalMcpServerConfigStore implements McpServerConfigStore {
655
686
  updateConfig(tenantId: string, id: string, updates: Partial<UpdateMcpServerConfigRequest>): Promise<McpServerConfigEntry | null>;
656
687
  deleteConfig(tenantId: string, id: string): Promise<boolean>;
657
688
  hasConfig(tenantId: string, id: string): Promise<boolean>;
689
+ getAllConfigsForAssistant(tenantId: string, ownerAssistantId: string): Promise<PersonalMcpServerConfigEntry[]>;
690
+ getAllPersonalConfigsWithoutTenant(): Promise<PersonalMcpServerConfigEntry[]>;
691
+ getConfigByIdForAssistant(tenantId: string, ownerAssistantId: string, id: string): Promise<PersonalMcpServerConfigEntry | null>;
692
+ getConfigByKeyForAssistant(tenantId: string, ownerAssistantId: string, key: string): Promise<PersonalMcpServerConfigEntry | null>;
693
+ createConfigForAssistant(tenantId: string, ownerAssistantId: string, id: string, data: CreateMcpServerConfigRequest): Promise<PersonalMcpServerConfigEntry>;
694
+ updateConfigForAssistant(tenantId: string, ownerAssistantId: string, id: string, updates: Partial<UpdateMcpServerConfigRequest>): Promise<PersonalMcpServerConfigEntry | null>;
695
+ deleteConfigForAssistant(tenantId: string, ownerAssistantId: string, id: string): Promise<boolean>;
696
+ deleteConfigsForAssistant(tenantId: string, ownerAssistantId: string): Promise<number>;
697
+ hasConfigForAssistant(tenantId: string, ownerAssistantId: string, id: string): Promise<boolean>;
658
698
  }
659
699
 
660
700
  /**
@@ -1104,6 +1144,7 @@ declare function createLocalStoreConfig(options?: LocalStoreConfigOptions): Prom
1104
1144
  oidcIdentityClaim: LocalOidcIdentityClaimStore;
1105
1145
  inviteLink: LocalInviteLinkStore;
1106
1146
  platformSettings: LocalPlatformSettingsStore;
1147
+ platformAudit: LocalPlatformAuditStore;
1107
1148
  database: LocalDatabaseConfigStore;
1108
1149
  connection: LocalConnectionStore;
1109
1150
  metrics: LocalMetricsServerConfigStore;
@@ -1140,4 +1181,4 @@ declare class InMemoryConversationStore implements IConversationStore {
1140
1181
  deleteConversation(conversationId: string): Promise<void>;
1141
1182
  }
1142
1183
 
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 };
1184
+ export { DatabaseWrapper, DuplicateProjectMembershipError, DuplicateProjectRoomMessageIdempotencyKeyError, InMemoryConversationStore, LocalA2AApiKeyStore, LocalAssistantStore, LocalCapabilityBundleStore, LocalChannelBindingStore, LocalChannelInstallationStore, LocalConnectionStore, LocalDatabaseConfigStore, LocalEvalStore, LocalInviteLinkStore, LocalMcpServerConfigStore, LocalMetricsServerConfigStore, LocalModelProviderStore, LocalOidcIdentityClaimStore, LocalOidcProviderConfigStore, LocalOpenAuditStore, LocalPlatformAuditStore, 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, 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';
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, PlatformAuditStore, PlatformAuditAppendInput, PlatformAuditRecord, PlatformAuditQuery, DatabaseConfigStore, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, ConnectionStore, ConnectionEntry, MetricsServerConfigStore, MetricsServerConfigEntry, CreateMetricsServerConfigRequest, UpdateMetricsServerConfigRequest, McpServerConfigStore, PersonalMcpServerConfigStore, McpServerConfigEntry, CreateMcpServerConfigRequest, UpdateMcpServerConfigRequest, PersonalMcpServerConfigEntry, 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
  /**
@@ -578,6 +578,37 @@ declare class LocalPlatformSettingsStore implements PlatformSettingsStore {
578
578
  save(document: PlatformSettingsDocument, expectedVersion: number, updatedBy?: string): Promise<PlatformSettingsRecord>;
579
579
  }
580
580
 
581
+ /**
582
+ * Local SQLite implementation of the platform audit store (append-only).
583
+ */
584
+
585
+ /**
586
+ * SQLite implementation of {@link PlatformAuditStore}.
587
+ *
588
+ * Persists platform-level audit records in the local
589
+ * `lattice_platform_audit` table. Records are append-only and returned
590
+ * newest-first by `createdAt` descending, then `id` descending.
591
+ */
592
+ declare class LocalPlatformAuditStore implements PlatformAuditStore {
593
+ private readonly db;
594
+ constructor(db: DatabaseWrapper);
595
+ /** Appends a record, assigning a fresh id and creation timestamp. */
596
+ append(record: PlatformAuditAppendInput): Promise<PlatformAuditRecord>;
597
+ /** Returns a record by id, or null when it does not exist. */
598
+ get(id: string): Promise<PlatformAuditRecord | null>;
599
+ /**
600
+ * Returns matching records newest-first.
601
+ *
602
+ * `initiatorUserId` only matches human initiators. `from` is inclusive and
603
+ * `to` is exclusive after both are normalized to instants; invalid or empty
604
+ * boundaries are ignored. Records are ordered by `createdAt` descending,
605
+ * then by `id` descending. Results are paginated with a default limit of 100;
606
+ * non-finite `offset`/`limit` fall back to defaults, finite values are
607
+ * truncated to integers, and negatives are clamped to 0.
608
+ */
609
+ query(params: PlatformAuditQuery): Promise<PlatformAuditRecord[]>;
610
+ }
611
+
581
612
  /**
582
613
  * Local SQLite implementation of DatabaseConfigStore.
583
614
  */
@@ -644,7 +675,7 @@ declare class LocalMetricsServerConfigStore implements MetricsServerConfigStore
644
675
  * Local SQLite implementation of McpServerConfigStore.
645
676
  */
646
677
 
647
- declare class LocalMcpServerConfigStore implements McpServerConfigStore {
678
+ declare class LocalMcpServerConfigStore implements McpServerConfigStore, PersonalMcpServerConfigStore {
648
679
  private db;
649
680
  constructor(db: DatabaseWrapper);
650
681
  getAllConfigs(tenantId: string): Promise<McpServerConfigEntry[]>;
@@ -655,6 +686,15 @@ declare class LocalMcpServerConfigStore implements McpServerConfigStore {
655
686
  updateConfig(tenantId: string, id: string, updates: Partial<UpdateMcpServerConfigRequest>): Promise<McpServerConfigEntry | null>;
656
687
  deleteConfig(tenantId: string, id: string): Promise<boolean>;
657
688
  hasConfig(tenantId: string, id: string): Promise<boolean>;
689
+ getAllConfigsForAssistant(tenantId: string, ownerAssistantId: string): Promise<PersonalMcpServerConfigEntry[]>;
690
+ getAllPersonalConfigsWithoutTenant(): Promise<PersonalMcpServerConfigEntry[]>;
691
+ getConfigByIdForAssistant(tenantId: string, ownerAssistantId: string, id: string): Promise<PersonalMcpServerConfigEntry | null>;
692
+ getConfigByKeyForAssistant(tenantId: string, ownerAssistantId: string, key: string): Promise<PersonalMcpServerConfigEntry | null>;
693
+ createConfigForAssistant(tenantId: string, ownerAssistantId: string, id: string, data: CreateMcpServerConfigRequest): Promise<PersonalMcpServerConfigEntry>;
694
+ updateConfigForAssistant(tenantId: string, ownerAssistantId: string, id: string, updates: Partial<UpdateMcpServerConfigRequest>): Promise<PersonalMcpServerConfigEntry | null>;
695
+ deleteConfigForAssistant(tenantId: string, ownerAssistantId: string, id: string): Promise<boolean>;
696
+ deleteConfigsForAssistant(tenantId: string, ownerAssistantId: string): Promise<number>;
697
+ hasConfigForAssistant(tenantId: string, ownerAssistantId: string, id: string): Promise<boolean>;
658
698
  }
659
699
 
660
700
  /**
@@ -1104,6 +1144,7 @@ declare function createLocalStoreConfig(options?: LocalStoreConfigOptions): Prom
1104
1144
  oidcIdentityClaim: LocalOidcIdentityClaimStore;
1105
1145
  inviteLink: LocalInviteLinkStore;
1106
1146
  platformSettings: LocalPlatformSettingsStore;
1147
+ platformAudit: LocalPlatformAuditStore;
1107
1148
  database: LocalDatabaseConfigStore;
1108
1149
  connection: LocalConnectionStore;
1109
1150
  metrics: LocalMetricsServerConfigStore;
@@ -1140,4 +1181,4 @@ declare class InMemoryConversationStore implements IConversationStore {
1140
1181
  deleteConversation(conversationId: string): Promise<void>;
1141
1182
  }
1142
1183
 
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 };
1184
+ export { DatabaseWrapper, DuplicateProjectMembershipError, DuplicateProjectRoomMessageIdempotencyKeyError, InMemoryConversationStore, LocalA2AApiKeyStore, LocalAssistantStore, LocalCapabilityBundleStore, LocalChannelBindingStore, LocalChannelInstallationStore, LocalConnectionStore, LocalDatabaseConfigStore, LocalEvalStore, LocalInviteLinkStore, LocalMcpServerConfigStore, LocalMetricsServerConfigStore, LocalModelProviderStore, LocalOidcIdentityClaimStore, LocalOidcProviderConfigStore, LocalOpenAuditStore, LocalPlatformAuditStore, 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 };