@axiom-lattice/local-stores 3.0.2 → 3.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@3.0.2 build /home/runner/work/agentic/agentic/packages/local-stores
2
+ > @axiom-lattice/local-stores@3.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 149.55 KB
12
- ESM dist/index.mjs.map 279.48 KB
13
- ESM ⚡️ Build success in 346ms
14
- CJS dist/index.js 153.07 KB
15
- CJS dist/index.js.map 282.33 KB
16
- CJS ⚡️ Build success in 351ms
11
+ CJS dist/index.js 166.21 KB
12
+ CJS dist/index.js.map 304.24 KB
13
+ CJS ⚡️ Build success in 510ms
14
+ ESM dist/index.mjs 162.55 KB
15
+ ESM dist/index.mjs.map 301.30 KB
16
+ ESM ⚡️ Build success in 510ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 12584ms
19
- DTS dist/index.d.ts 31.56 KB
20
- DTS dist/index.d.mts 31.56 KB
18
+ DTS ⚡️ Build success in 15859ms
19
+ DTS dist/index.d.ts 33.90 KB
20
+ DTS dist/index.d.mts 33.90 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @axiom-lattice/local-stores
2
2
 
3
+ ## 3.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 8db9937: huge enhance
8
+ - Updated dependencies [8db9937]
9
+ - @axiom-lattice/core@4.2.1
10
+ - @axiom-lattice/protocols@4.1.1
11
+
12
+ ## 3.1.0
13
+
14
+ ### Minor Changes
15
+
16
+ - eb3173b: up
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies [eb3173b]
21
+ - @axiom-lattice/core@4.2.0
22
+ - @axiom-lattice/protocols@4.1.0
23
+
3
24
  ## 3.0.2
4
25
 
5
26
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { SqlJsStatic, Database } from 'sql.js';
2
2
  import { SqliteSaver } from '@langchain/langgraph-checkpoint-sqlite';
3
- import { ThreadStore, Thread, CreateThreadRequest, AssistantStore, Assistant, CreateAssistantRequest, WorkspaceStore, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ProjectStore, ProjectFilter, Project, CreateProjectRequest, UpdateProjectRequest, 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, WorkflowTrackingStore, CreateWorkflowRunRequest, WorkflowRun, UpdateWorkflowRunRequest, QueryWorkflowRunsOptions, QueryWorkflowRunsResult, CreateRunStepRequest, RunStep, UpdateRunStepRequest, StepType, EvalStore, EvalProject, CreateEvalProjectRequest, EvalSuite, CreateEvalSuiteRequest, EvalCase, CreateEvalCaseRequest, EvalRun, CreateEvalRunRequest, EvalRunResult, EvalProjectReport, BindingRegistry, Binding, CreateBindingInput, ChannelInstallationStore, ChannelInstallation, ChannelInstallationType, CreateChannelInstallationRequest, UpdateChannelInstallationRequest, A2AApiKeyStore, A2AApiKeyRecord, CreateA2AApiKeyInput, A2AApiKeyEntry, SkillStore, SkillStoreContext, Skill, CreateSkillRequest, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TaskStore, CreateTaskRequest, TaskItem, TaskListFilter, UpdateTaskRequest, TaskWorkItemStore, CreateWorkItemRequest, TaskWorkItem, CreateWorkItemIfAbsentRequest, TaskWorkItemListFilter, IConversationStore, ConversationRecord, CreateConversationInput } from '@axiom-lattice/protocols';
4
- import { IMessageQueueStore, AddMessageParams, PendingMessage, ThreadInfo } from '@axiom-lattice/core';
3
+ import { ThreadStore, Thread, CreateThreadRequest, AssistantStore, Assistant, CreateAssistantRequest, WorkspaceStore, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ProjectStore, ProjectFilter, Project, CreateProjectRequest, UpdateProjectRequest, UpdateProjectCapabilityBundlesResult, 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, WorkflowTrackingStore, CreateWorkflowRunRequest, WorkflowRun, UpdateWorkflowRunRequest, QueryWorkflowRunsOptions, QueryWorkflowRunsResult, CreateRunStepRequest, RunStep, UpdateRunStepRequest, StepType, EvalStore, EvalProject, CreateEvalProjectRequest, EvalSuite, CreateEvalSuiteRequest, EvalCase, CreateEvalCaseRequest, EvalRun, CreateEvalRunRequest, EvalRunResult, EvalProjectReport, BindingRegistry, Binding, CreateBindingInput, ChannelInstallationStore, ChannelInstallation, ChannelInstallationType, CreateChannelInstallationRequest, UpdateChannelInstallationRequest, A2AApiKeyStore, A2AApiKeyRecord, CreateA2AApiKeyInput, A2AApiKeyEntry, SkillStore, SkillStoreContext, Skill, CreateSkillRequest, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TaskStore, CreateTaskRequest, TaskItem, TaskListFilter, UpdateTaskRequest, TaskWorkItemStore, CreateWorkItemRequest, TaskWorkItem, CreateWorkItemIfAbsentRequest, TaskWorkItemListFilter, CapabilityBundleStore, CapabilityBundle, InternalCreateCapabilityBundleInput, InternalUpdateCapabilityBundleInput, CapabilityBundleDeleteResult, IConversationStore, ConversationRecord, CreateConversationInput } from '@axiom-lattice/protocols';
4
+ import { IMessageQueueStore, AddMessageParams, PendingMessage, QueueScope, ThreadInfo } from '@axiom-lattice/core';
5
5
 
6
6
  /**
7
7
  * Shared SQLite database connection for local stores using sql.js (WASM).
@@ -244,6 +244,8 @@ declare class LocalProjectStore implements ProjectStore {
244
244
  createProject(tenantId: string, workspaceId: string, id: string, data: CreateProjectRequest): Promise<Project>;
245
245
  updateProject(tenantId: string, id: string, updates: UpdateProjectRequest): Promise<Project | null>;
246
246
  deleteProject(tenantId: string, id: string): Promise<boolean>;
247
+ updateCapabilityBundleIds(tenantId: string, projectId: string, bundleIds: string[], expectedRevisions?: Record<string, string>): Promise<UpdateProjectCapabilityBundlesResult>;
248
+ isCapabilityBundleReferenced(tenantId: string, bundleId: string): Promise<boolean>;
247
249
  /** Add a column if it does not exist (SQLite version compatible). */
248
250
  private ensureColumn;
249
251
  }
@@ -515,17 +517,19 @@ declare class LocalA2AApiKeyStore implements A2AApiKeyStore {
515
517
 
516
518
  declare class LocalThreadMessageQueueStore implements IMessageQueueStore {
517
519
  private db;
520
+ private capacityTail;
518
521
  constructor(db: DatabaseWrapper);
519
522
  addMessage(params: AddMessageParams): Promise<PendingMessage>;
523
+ addMessageIfCapacity(params: AddMessageParams, maxSize: number): Promise<boolean>;
520
524
  addMessageAtHead(params: AddMessageParams): Promise<PendingMessage>;
521
- getPendingMessages(threadId: string): Promise<PendingMessage[]>;
522
- getProcessingMessages(threadId: string): Promise<PendingMessage[]>;
523
- getQueueSize(threadId: string): Promise<number>;
525
+ getPendingMessages(threadId: string, scope?: QueueScope): Promise<PendingMessage[]>;
526
+ getProcessingMessages(threadId: string, scope?: QueueScope): Promise<PendingMessage[]>;
527
+ getQueueSize(threadId: string, scope?: QueueScope): Promise<number>;
524
528
  getThreadsWithPendingMessages(): Promise<ThreadInfo[]>;
525
- removeMessage(messageId: string): Promise<boolean>;
526
- clearMessages(threadId: string): Promise<void>;
527
- markProcessing(messageId: string): Promise<void>;
528
- resetProcessingToPending(threadId: string): Promise<number>;
529
+ removeMessage(messageId: string, scope?: QueueScope): Promise<boolean>;
530
+ clearMessages(threadId: string, scope?: QueueScope): Promise<void>;
531
+ markProcessing(messageId: string, customRunConfig?: unknown, scope?: QueueScope): Promise<void>;
532
+ resetProcessingToPending(threadId: string, scope?: QueueScope): Promise<number>;
529
533
  private getById;
530
534
  }
531
535
 
@@ -639,6 +643,44 @@ declare class LocalTaskWorkItemStore implements TaskWorkItemStore {
639
643
  /** Atomically return an existing event or create it once. */
640
644
  createIfAbsentByEventKey(params: CreateWorkItemIfAbsentRequest): Promise<TaskWorkItem>;
641
645
  list(filter: TaskWorkItemListFilter): Promise<TaskWorkItem[]>;
646
+ /** List pending execution results using one bounded SQLite anti-join query. */
647
+ listPendingExecutionResults(params: {
648
+ tenantId: string;
649
+ taskId: string;
650
+ limit: number;
651
+ }): Promise<TaskWorkItem[]>;
652
+ }
653
+
654
+ /**
655
+ * Persists tenant-scoped capability bundles in a shared local sql.js database.
656
+ *
657
+ * The constructor creates the required table and index idempotently. Database
658
+ * lifecycle remains owned by the caller through `initDatabase` and
659
+ * `closeDatabase`.
660
+ *
661
+ * @example
662
+ * ```ts
663
+ * const db = await initDatabase({ dbPath: "./lattice.db" });
664
+ * const store = new LocalCapabilityBundleStore(db);
665
+ * const bundles = await store.listByTenant("tenant-1");
666
+ * ```
667
+ */
668
+ declare class LocalCapabilityBundleStore implements CapabilityBundleStore {
669
+ private readonly db;
670
+ /**
671
+ * Creates a capability bundle store over an initialized sql.js database.
672
+ *
673
+ * @param db - Shared local database wrapper used for persistence.
674
+ */
675
+ constructor(db: DatabaseWrapper);
676
+ listByTenant(tenantId: string): Promise<CapabilityBundle[]>;
677
+ getById(tenantId: string, id: string): Promise<CapabilityBundle | null>;
678
+ getManyByIds(tenantId: string, ids: string[]): Promise<CapabilityBundle[]>;
679
+ create(tenantId: string, input: InternalCreateCapabilityBundleInput): Promise<CapabilityBundle>;
680
+ update(tenantId: string, id: string, input: InternalUpdateCapabilityBundleInput): Promise<CapabilityBundle | {
681
+ status: "conflict";
682
+ } | null>;
683
+ deleteIfUnreferenced(tenantId: string, id: string): Promise<CapabilityBundleDeleteResult>;
642
684
  }
643
685
 
644
686
  /**
@@ -696,6 +738,7 @@ declare function createLocalStoreConfig(options?: LocalStoreConfigOptions): Prom
696
738
  schedule: LocalScheduleStorage;
697
739
  task: LocalTaskStore;
698
740
  taskWorkItem: LocalTaskWorkItemStore;
741
+ capabilityBundle: LocalCapabilityBundleStore;
699
742
  checkpoint: SqliteSaver;
700
743
  }>;
701
744
 
@@ -715,4 +758,4 @@ declare class InMemoryConversationStore implements IConversationStore {
715
758
  deleteConversation(conversationId: string): Promise<void>;
716
759
  }
717
760
 
718
- export { DatabaseWrapper, InMemoryConversationStore, LocalA2AApiKeyStore, LocalAssistantStore, LocalChannelBindingStore, LocalChannelInstallationStore, LocalConnectionStore, LocalDatabaseConfigStore, LocalEvalStore, LocalMcpServerConfigStore, LocalMetricsServerConfigStore, LocalProjectStore, LocalScheduleStorage, LocalSkillStore, type LocalStoreConfigOptions, type LocalStoreOptions, LocalTaskStore, LocalTaskWorkItemStore, LocalTenantStore, LocalThreadMessageQueueStore, LocalThreadStore, LocalUserStore, LocalUserTenantLinkStore, LocalWorkflowTrackingStore, LocalWorkspaceStore, type Migration, MigrationManager, RunResult, StatementWrapper, closeDatabase, createLocalStoreConfig, ensureTable, getDatabase, initDatabase, nowISO, parseISO };
761
+ export { DatabaseWrapper, InMemoryConversationStore, LocalA2AApiKeyStore, LocalAssistantStore, LocalCapabilityBundleStore, LocalChannelBindingStore, LocalChannelInstallationStore, LocalConnectionStore, LocalDatabaseConfigStore, LocalEvalStore, LocalMcpServerConfigStore, LocalMetricsServerConfigStore, LocalProjectStore, LocalScheduleStorage, LocalSkillStore, type LocalStoreConfigOptions, type LocalStoreOptions, LocalTaskStore, LocalTaskWorkItemStore, LocalTenantStore, LocalThreadMessageQueueStore, LocalThreadStore, LocalUserStore, LocalUserTenantLinkStore, LocalWorkflowTrackingStore, LocalWorkspaceStore, type Migration, MigrationManager, RunResult, StatementWrapper, closeDatabase, createLocalStoreConfig, ensureTable, getDatabase, initDatabase, nowISO, parseISO };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { SqlJsStatic, Database } from 'sql.js';
2
2
  import { SqliteSaver } from '@langchain/langgraph-checkpoint-sqlite';
3
- import { ThreadStore, Thread, CreateThreadRequest, AssistantStore, Assistant, CreateAssistantRequest, WorkspaceStore, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ProjectStore, ProjectFilter, Project, CreateProjectRequest, UpdateProjectRequest, 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, WorkflowTrackingStore, CreateWorkflowRunRequest, WorkflowRun, UpdateWorkflowRunRequest, QueryWorkflowRunsOptions, QueryWorkflowRunsResult, CreateRunStepRequest, RunStep, UpdateRunStepRequest, StepType, EvalStore, EvalProject, CreateEvalProjectRequest, EvalSuite, CreateEvalSuiteRequest, EvalCase, CreateEvalCaseRequest, EvalRun, CreateEvalRunRequest, EvalRunResult, EvalProjectReport, BindingRegistry, Binding, CreateBindingInput, ChannelInstallationStore, ChannelInstallation, ChannelInstallationType, CreateChannelInstallationRequest, UpdateChannelInstallationRequest, A2AApiKeyStore, A2AApiKeyRecord, CreateA2AApiKeyInput, A2AApiKeyEntry, SkillStore, SkillStoreContext, Skill, CreateSkillRequest, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TaskStore, CreateTaskRequest, TaskItem, TaskListFilter, UpdateTaskRequest, TaskWorkItemStore, CreateWorkItemRequest, TaskWorkItem, CreateWorkItemIfAbsentRequest, TaskWorkItemListFilter, IConversationStore, ConversationRecord, CreateConversationInput } from '@axiom-lattice/protocols';
4
- import { IMessageQueueStore, AddMessageParams, PendingMessage, ThreadInfo } from '@axiom-lattice/core';
3
+ import { ThreadStore, Thread, CreateThreadRequest, AssistantStore, Assistant, CreateAssistantRequest, WorkspaceStore, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ProjectStore, ProjectFilter, Project, CreateProjectRequest, UpdateProjectRequest, UpdateProjectCapabilityBundlesResult, 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, WorkflowTrackingStore, CreateWorkflowRunRequest, WorkflowRun, UpdateWorkflowRunRequest, QueryWorkflowRunsOptions, QueryWorkflowRunsResult, CreateRunStepRequest, RunStep, UpdateRunStepRequest, StepType, EvalStore, EvalProject, CreateEvalProjectRequest, EvalSuite, CreateEvalSuiteRequest, EvalCase, CreateEvalCaseRequest, EvalRun, CreateEvalRunRequest, EvalRunResult, EvalProjectReport, BindingRegistry, Binding, CreateBindingInput, ChannelInstallationStore, ChannelInstallation, ChannelInstallationType, CreateChannelInstallationRequest, UpdateChannelInstallationRequest, A2AApiKeyStore, A2AApiKeyRecord, CreateA2AApiKeyInput, A2AApiKeyEntry, SkillStore, SkillStoreContext, Skill, CreateSkillRequest, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TaskStore, CreateTaskRequest, TaskItem, TaskListFilter, UpdateTaskRequest, TaskWorkItemStore, CreateWorkItemRequest, TaskWorkItem, CreateWorkItemIfAbsentRequest, TaskWorkItemListFilter, CapabilityBundleStore, CapabilityBundle, InternalCreateCapabilityBundleInput, InternalUpdateCapabilityBundleInput, CapabilityBundleDeleteResult, IConversationStore, ConversationRecord, CreateConversationInput } from '@axiom-lattice/protocols';
4
+ import { IMessageQueueStore, AddMessageParams, PendingMessage, QueueScope, ThreadInfo } from '@axiom-lattice/core';
5
5
 
6
6
  /**
7
7
  * Shared SQLite database connection for local stores using sql.js (WASM).
@@ -244,6 +244,8 @@ declare class LocalProjectStore implements ProjectStore {
244
244
  createProject(tenantId: string, workspaceId: string, id: string, data: CreateProjectRequest): Promise<Project>;
245
245
  updateProject(tenantId: string, id: string, updates: UpdateProjectRequest): Promise<Project | null>;
246
246
  deleteProject(tenantId: string, id: string): Promise<boolean>;
247
+ updateCapabilityBundleIds(tenantId: string, projectId: string, bundleIds: string[], expectedRevisions?: Record<string, string>): Promise<UpdateProjectCapabilityBundlesResult>;
248
+ isCapabilityBundleReferenced(tenantId: string, bundleId: string): Promise<boolean>;
247
249
  /** Add a column if it does not exist (SQLite version compatible). */
248
250
  private ensureColumn;
249
251
  }
@@ -515,17 +517,19 @@ declare class LocalA2AApiKeyStore implements A2AApiKeyStore {
515
517
 
516
518
  declare class LocalThreadMessageQueueStore implements IMessageQueueStore {
517
519
  private db;
520
+ private capacityTail;
518
521
  constructor(db: DatabaseWrapper);
519
522
  addMessage(params: AddMessageParams): Promise<PendingMessage>;
523
+ addMessageIfCapacity(params: AddMessageParams, maxSize: number): Promise<boolean>;
520
524
  addMessageAtHead(params: AddMessageParams): Promise<PendingMessage>;
521
- getPendingMessages(threadId: string): Promise<PendingMessage[]>;
522
- getProcessingMessages(threadId: string): Promise<PendingMessage[]>;
523
- getQueueSize(threadId: string): Promise<number>;
525
+ getPendingMessages(threadId: string, scope?: QueueScope): Promise<PendingMessage[]>;
526
+ getProcessingMessages(threadId: string, scope?: QueueScope): Promise<PendingMessage[]>;
527
+ getQueueSize(threadId: string, scope?: QueueScope): Promise<number>;
524
528
  getThreadsWithPendingMessages(): Promise<ThreadInfo[]>;
525
- removeMessage(messageId: string): Promise<boolean>;
526
- clearMessages(threadId: string): Promise<void>;
527
- markProcessing(messageId: string): Promise<void>;
528
- resetProcessingToPending(threadId: string): Promise<number>;
529
+ removeMessage(messageId: string, scope?: QueueScope): Promise<boolean>;
530
+ clearMessages(threadId: string, scope?: QueueScope): Promise<void>;
531
+ markProcessing(messageId: string, customRunConfig?: unknown, scope?: QueueScope): Promise<void>;
532
+ resetProcessingToPending(threadId: string, scope?: QueueScope): Promise<number>;
529
533
  private getById;
530
534
  }
531
535
 
@@ -639,6 +643,44 @@ declare class LocalTaskWorkItemStore implements TaskWorkItemStore {
639
643
  /** Atomically return an existing event or create it once. */
640
644
  createIfAbsentByEventKey(params: CreateWorkItemIfAbsentRequest): Promise<TaskWorkItem>;
641
645
  list(filter: TaskWorkItemListFilter): Promise<TaskWorkItem[]>;
646
+ /** List pending execution results using one bounded SQLite anti-join query. */
647
+ listPendingExecutionResults(params: {
648
+ tenantId: string;
649
+ taskId: string;
650
+ limit: number;
651
+ }): Promise<TaskWorkItem[]>;
652
+ }
653
+
654
+ /**
655
+ * Persists tenant-scoped capability bundles in a shared local sql.js database.
656
+ *
657
+ * The constructor creates the required table and index idempotently. Database
658
+ * lifecycle remains owned by the caller through `initDatabase` and
659
+ * `closeDatabase`.
660
+ *
661
+ * @example
662
+ * ```ts
663
+ * const db = await initDatabase({ dbPath: "./lattice.db" });
664
+ * const store = new LocalCapabilityBundleStore(db);
665
+ * const bundles = await store.listByTenant("tenant-1");
666
+ * ```
667
+ */
668
+ declare class LocalCapabilityBundleStore implements CapabilityBundleStore {
669
+ private readonly db;
670
+ /**
671
+ * Creates a capability bundle store over an initialized sql.js database.
672
+ *
673
+ * @param db - Shared local database wrapper used for persistence.
674
+ */
675
+ constructor(db: DatabaseWrapper);
676
+ listByTenant(tenantId: string): Promise<CapabilityBundle[]>;
677
+ getById(tenantId: string, id: string): Promise<CapabilityBundle | null>;
678
+ getManyByIds(tenantId: string, ids: string[]): Promise<CapabilityBundle[]>;
679
+ create(tenantId: string, input: InternalCreateCapabilityBundleInput): Promise<CapabilityBundle>;
680
+ update(tenantId: string, id: string, input: InternalUpdateCapabilityBundleInput): Promise<CapabilityBundle | {
681
+ status: "conflict";
682
+ } | null>;
683
+ deleteIfUnreferenced(tenantId: string, id: string): Promise<CapabilityBundleDeleteResult>;
642
684
  }
643
685
 
644
686
  /**
@@ -696,6 +738,7 @@ declare function createLocalStoreConfig(options?: LocalStoreConfigOptions): Prom
696
738
  schedule: LocalScheduleStorage;
697
739
  task: LocalTaskStore;
698
740
  taskWorkItem: LocalTaskWorkItemStore;
741
+ capabilityBundle: LocalCapabilityBundleStore;
699
742
  checkpoint: SqliteSaver;
700
743
  }>;
701
744
 
@@ -715,4 +758,4 @@ declare class InMemoryConversationStore implements IConversationStore {
715
758
  deleteConversation(conversationId: string): Promise<void>;
716
759
  }
717
760
 
718
- export { DatabaseWrapper, InMemoryConversationStore, LocalA2AApiKeyStore, LocalAssistantStore, LocalChannelBindingStore, LocalChannelInstallationStore, LocalConnectionStore, LocalDatabaseConfigStore, LocalEvalStore, LocalMcpServerConfigStore, LocalMetricsServerConfigStore, LocalProjectStore, LocalScheduleStorage, LocalSkillStore, type LocalStoreConfigOptions, type LocalStoreOptions, LocalTaskStore, LocalTaskWorkItemStore, LocalTenantStore, LocalThreadMessageQueueStore, LocalThreadStore, LocalUserStore, LocalUserTenantLinkStore, LocalWorkflowTrackingStore, LocalWorkspaceStore, type Migration, MigrationManager, RunResult, StatementWrapper, closeDatabase, createLocalStoreConfig, ensureTable, getDatabase, initDatabase, nowISO, parseISO };
761
+ export { DatabaseWrapper, InMemoryConversationStore, LocalA2AApiKeyStore, LocalAssistantStore, LocalCapabilityBundleStore, LocalChannelBindingStore, LocalChannelInstallationStore, LocalConnectionStore, LocalDatabaseConfigStore, LocalEvalStore, LocalMcpServerConfigStore, LocalMetricsServerConfigStore, LocalProjectStore, LocalScheduleStorage, LocalSkillStore, type LocalStoreConfigOptions, type LocalStoreOptions, LocalTaskStore, LocalTaskWorkItemStore, LocalTenantStore, LocalThreadMessageQueueStore, LocalThreadStore, LocalUserStore, LocalUserTenantLinkStore, LocalWorkflowTrackingStore, LocalWorkspaceStore, type Migration, MigrationManager, RunResult, StatementWrapper, closeDatabase, createLocalStoreConfig, ensureTable, getDatabase, initDatabase, nowISO, parseISO };