@axiom-lattice/local-stores 5.1.1 → 5.2.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.
- package/.turbo/turbo-build.log +10 -10
- package/CHANGELOG.md +76 -0
- package/dist/index.d.mts +44 -3
- package/dist/index.d.ts +44 -3
- package/dist/index.js +407 -78
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +396 -66
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/__tests__/LocalMcpServerConfigStore.test.ts +101 -0
- package/src/__tests__/LocalPlatformAuditStore.test.ts +509 -0
- package/src/__tests__/LocalUserTenantLinkStore.test.ts +46 -0
- package/src/createLocalStoreConfig.ts +2 -0
- package/src/index.ts +1 -0
- package/src/stores/LocalMcpServerConfigStore.ts +200 -1
- package/src/stores/LocalPlatformAuditStore.ts +241 -0
- package/src/stores/LocalUserTenantLinkStore.ts +8 -6
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @axiom-lattice/local-stores@5.
|
|
2
|
+
> @axiom-lattice/local-stores@5.2.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
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
[34mCLI[39m Target: es2020
|
|
9
9
|
[34mCJS[39m Build start
|
|
10
10
|
[34mESM[39m Build start
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
11
|
+
[32mCJS[39m [1mdist/index.js [22m[32m295.30 KB[39m
|
|
12
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m539.57 KB[39m
|
|
13
|
+
[32mCJS[39m ⚡️ Build success in 852ms
|
|
14
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m289.80 KB[39m
|
|
15
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m535.25 KB[39m
|
|
16
|
+
[32mESM[39m ⚡️ Build success in 897ms
|
|
17
17
|
[34mDTS[39m Build start
|
|
18
|
-
[32mDTS[39m ⚡️ Build success in
|
|
19
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
20
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[
|
|
18
|
+
[32mDTS[39m ⚡️ Build success in 13143ms
|
|
19
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m55.17 KB[39m
|
|
20
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m55.17 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,81 @@
|
|
|
1
1
|
# @axiom-lattice/local-stores
|
|
2
2
|
|
|
3
|
+
## 5.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 2554b78: Add personal-assistant-scoped MCP server configs in their own data domain.
|
|
8
|
+
Configs live in a dedicated `lattice_personal_mcp_server_configs` /
|
|
9
|
+
`lt_personal_mcp_configs` table (PG v220) keyed by
|
|
10
|
+
`(tenantId, ownerAssistantId, key)`, so tenant listings, tenant export/import,
|
|
11
|
+
startup restore, and older replicas never read them. A new
|
|
12
|
+
`/api/personal-mcp-servers` route family resolves the caller's personal
|
|
13
|
+
assistant server-side (no client-supplied assistant id) and returns 404 on
|
|
14
|
+
replicas that predate it rather than falling back to tenant CRUD.
|
|
15
|
+
|
|
16
|
+
Personal MCP tools register into a per-assistant tool bucket and are mounted
|
|
17
|
+
automatically only for the owning assistant, with personal keys shadowing the
|
|
18
|
+
same tenant key and tenant tools still available as fallback. Connections are
|
|
19
|
+
established lazily on the first assistant build, bounded by a sync budget, and
|
|
20
|
+
cross-replica invalidation rides a separate `personal-mcp-config-changed`
|
|
21
|
+
outbox topic that older replicas ignore. Deleting a personal assistant or an
|
|
22
|
+
assistant purges its personal MCP configs and runtime.
|
|
23
|
+
|
|
24
|
+
The MCP drawer now takes an `apiBasePath`, and the personal assistant page
|
|
25
|
+
opens it against the personal routes. Tool selection is reconciled onto the
|
|
26
|
+
live tool list so servers that rename tools each session no longer lose the
|
|
27
|
+
saved selection; the tools endpoint returns the reconciled `selectedTools`, and
|
|
28
|
+
the tools modal gains select-all/deselect-all controls.
|
|
29
|
+
|
|
30
|
+
- 1a4f8fa: Add an append-only platform audit foundation. Admin Center platform mutations are
|
|
31
|
+
captured with the real human initiator, source, route, target tenant, redacted
|
|
32
|
+
request/response, status, and duration. The audit store is available in InMemory, Local
|
|
33
|
+
SQLite, and PostgreSQL, with `GET /api/platform/audit` and client SDK methods.
|
|
34
|
+
- 9107769: Add role-inherited Platform Ops Agent write tools and high-risk playbooks.
|
|
35
|
+
Owners and admins can create/update/delete platform users, grant roles, manage
|
|
36
|
+
invitations/invite links/tenants/members, configure OIDC providers, resolve SSO
|
|
37
|
+
claims, patch settings, and update branding; auditors stay read-only, owner-role
|
|
38
|
+
changes require an owner, and the hidden `__platform__` tenant is protected.
|
|
39
|
+
Every write is audited with the human initiator and the Ops Agent
|
|
40
|
+
thread/tool executor. High-risk operations raise a HITL `confirm` interrupt and execute only after
|
|
41
|
+
the user approves them. The old private Ops thread/message/SSE routes,
|
|
42
|
+
`platformOpsConfirmation` store/service, PG v220 migration, confirm/cancel
|
|
43
|
+
routes, and custom `OpsAgentPanel`/`OpsToolCard` were removed; only
|
|
44
|
+
`/api/platform/ops/config` remains. The Admin Center Ops page now reuses the
|
|
45
|
+
standard `LatticeChat`/AgentRun stack (including the embedded chat sidebar for
|
|
46
|
+
New Thread and History). Platform scope only opens the standard chat route
|
|
47
|
+
families for the fixed `platform-ops` assistant after re-checking the live
|
|
48
|
+
platform role (including the legacy Admin Center `/api/users`, `/api/tenants`,
|
|
49
|
+
and `/api/oidc-providers` routes). Ops threads/runs use a fixed internal **sandbox** workspace/project (with filesystem middleware) inside the hidden
|
|
50
|
+
platform tenant, preserving normal workspace/project thread isolation. The
|
|
51
|
+
signed console session is the tenant authority, not a client-supplied header. A real-Gateway Playwright spec covers the
|
|
52
|
+
platform Ops chat, HITL confirm/resume, and the resulting playbook audit row.
|
|
53
|
+
Ops gains a read-only `ops_list_audit` tool with filters and bounded pagination.
|
|
54
|
+
List tools accept bounded `limit` values, and writes share a per-user
|
|
55
|
+
`platform.ops.write` rate limit (60/minute) that returns
|
|
56
|
+
`PLATFORM_OPS_RATE_LIMITED` and records the refusal in the audit log. Tool
|
|
57
|
+
failures now consistently use `{ success:false, error:{ code, message } }`.
|
|
58
|
+
|
|
59
|
+
### Patch Changes
|
|
60
|
+
|
|
61
|
+
- Updated dependencies [e5dd58b]
|
|
62
|
+
- Updated dependencies [b3a3428]
|
|
63
|
+
- Updated dependencies [2554b78]
|
|
64
|
+
- Updated dependencies [1a4f8fa]
|
|
65
|
+
- Updated dependencies [cb411cc]
|
|
66
|
+
- Updated dependencies [a43e635]
|
|
67
|
+
- Updated dependencies [9107769]
|
|
68
|
+
- Updated dependencies [c9b8df8]
|
|
69
|
+
- @axiom-lattice/protocols@7.3.0
|
|
70
|
+
- @axiom-lattice/core@12.3.0
|
|
71
|
+
|
|
72
|
+
## 5.1.2
|
|
73
|
+
|
|
74
|
+
### Patch Changes
|
|
75
|
+
|
|
76
|
+
- Updated dependencies [4484bcf]
|
|
77
|
+
- @axiom-lattice/core@12.2.2
|
|
78
|
+
|
|
3
79
|
## 5.1.1
|
|
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 };
|