@axiom-lattice/local-stores 2.0.10 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
 
2
- > @axiom-lattice/local-stores@2.0.10 build /home/runner/work/agentic/agentic/packages/local-stores
2
+ > @axiom-lattice/local-stores@3.0.0 build /home/runner/work/agentic/agentic/packages/local-stores
3
3
  > tsup src/index.ts --format cjs,esm --dts --sourcemap
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -8,13 +8,13 @@
8
8
  CLI Target: es2020
9
9
  CJS Build start
10
10
  ESM Build start
11
- CJS dist/index.js 135.76 KB
12
- CJS dist/index.js.map 253.30 KB
13
- CJS ⚡️ Build success in 506ms
14
- ESM dist/index.mjs 132.29 KB
15
- ESM dist/index.mjs.map 250.45 KB
16
- ESM ⚡️ Build success in 509ms
11
+ ESM dist/index.mjs 149.55 KB
12
+ ESM dist/index.mjs.map 279.48 KB
13
+ ESM ⚡️ Build success in 326ms
14
+ CJS dist/index.js 153.07 KB
15
+ CJS dist/index.js.map 282.33 KB
16
+ CJS ⚡️ Build success in 327ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 14142ms
19
- DTS dist/index.d.ts 29.36 KB
20
- DTS dist/index.d.mts 29.36 KB
18
+ DTS ⚡️ Build success in 11582ms
19
+ DTS dist/index.d.ts 31.56 KB
20
+ DTS dist/index.d.mts 31.56 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,55 @@
1
1
  # @axiom-lattice/local-stores
2
2
 
3
+ ## 3.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 1c783d0: Align A2A with the standard 0.3 protocol.
8
+
9
+ **Standard A2A 0.3 server (gateway):** per-assistant discovery and execution via
10
+ `GET /api/a2a/agents/:assistantId/.well-known/agent-card.json` and
11
+ `POST /api/a2a/agents/:assistantId/jsonrpc` (`message/send`, `message/stream`,
12
+ `tasks/get`, `tasks/cancel`), plus an internal `test-call` management route.
13
+ Every inbound task is persisted as a `TaskItem` (single-ID projection:
14
+ `TaskItem.id === A2A taskId`). File `bytes` parts are ingested into workspace
15
+ storage and referenced by URI.
16
+
17
+ **API key scope model:** keys are now `tenant + projectId (required) +
18
+ assistantIds[]` whitelist. Added `client.a2aKeys.*` (list/create/delete/disable/
19
+ enable/rotate) and UI (`A2AKeyList`, `A2AExposureSection` with agent-card preview
20
+ and dual-mode try-call).
21
+
22
+ **Breaking changes:**
23
+
24
+ - The legacy custom REST endpoints (`/api/a2a/tasks/send`,
25
+ `/api/a2a/tasks/:taskId`, `/api/a2a/tasks/:taskId/stream`,
26
+ `/api/a2a/tasks/:taskId/cancel`) are removed; use the JSON-RPC endpoint instead.
27
+ - The `A2A_API_KEYS` env format is simplified to `key:tenant:project,...`
28
+ (no workspace segment); `workspaceId` is removed from the key model and
29
+ creation flow.
30
+ - The `x-a2a-agent-id` request header is removed (the assistant is derived from
31
+ the URL path).
32
+ - `protocols` self-maintained A2A types are replaced by re-exports of
33
+ `@a2a-js/sdk` 0.3 types; `A2AApiKeyRecord`/`CreateA2AApiKeyInput` drop
34
+ `workspaceId` and gain `assistantIds`.
35
+
36
+ ### Patch Changes
37
+
38
+ - 4de3e59: Harden A2A task persistence with caller-provided local IDs, atomic canceled-state guards across task stores, and request leases that prevent active scoped runtimes from being evicted before or during stream consumption.
39
+ - 1ed2a67: up issues
40
+ - a44c80b: Prevent ordinary channel installation creation from accepting caller IDs, normalize imported installation IDs to UUIDs, and reject duplicate store creates instead of overwriting existing installations.
41
+ - 83e1d5d: Add ProjectKind (business/training/personal) with a per-workspace shared training project. Gateway ensures a default training project exists idempotently on project list and protects the last training project from deletion; personal assistant spaces are marked `personal`; client-sdk `listProjects` accepts a `kind` filter; react-sdk splits business and training projects in WorkspaceContext and pins learning rounds to the read-only shared Training Context via TrainingContextCard. No TrainingWorkspace entity — training isolation reuses the existing projectId scope.
42
+ - e501a4b: Add optional Markdown belief traces and append-only task activities, return recent task work-item history, and align scoped task work-item ordering and filtering across stores.
43
+ - Updated dependencies [4de3e59]
44
+ - Updated dependencies [1c783d0]
45
+ - Updated dependencies [1ed2a67]
46
+ - Updated dependencies [a44c80b]
47
+ - Updated dependencies [83e1d5d]
48
+ - Updated dependencies [139e8f0]
49
+ - Updated dependencies [e501a4b]
50
+ - @axiom-lattice/protocols@4.0.0
51
+ - @axiom-lattice/core@4.0.0
52
+
3
53
  ## 2.0.10
4
54
 
5
55
  ### 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, AssistantStore, Assistant, CreateAssistantRequest, WorkspaceStore, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ProjectStore, 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, TaskWorkItemListFilter, IConversationStore, ConversationRecord, CreateConversationInput } from '@axiom-lattice/protocols';
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
4
  import { IMessageQueueStore, AddMessageParams, PendingMessage, ThreadInfo } from '@axiom-lattice/core';
5
5
 
6
6
  /**
@@ -86,8 +86,8 @@ declare class StatementWrapper {
86
86
  * Result of a run operation.
87
87
  */
88
88
  declare class RunResult {
89
- private db;
90
- constructor(db: Database);
89
+ private modifiedRows;
90
+ constructor(modifiedRows: number);
91
91
  /** Number of rows modified by the last INSERT/UPDATE/DELETE. */
92
92
  get changes(): number;
93
93
  }
@@ -239,11 +239,13 @@ declare class LocalWorkspaceStore implements WorkspaceStore {
239
239
  declare class LocalProjectStore implements ProjectStore {
240
240
  private db;
241
241
  constructor(db: DatabaseWrapper);
242
- getProjectsByWorkspace(tenantId: string, workspaceId: string): Promise<Project[]>;
242
+ getProjectsByWorkspace(tenantId: string, workspaceId: string, filter?: ProjectFilter): Promise<Project[]>;
243
243
  getProjectById(tenantId: string, id: string): Promise<Project | null>;
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
+ /** Add a column if it does not exist (SQLite version compatible). */
248
+ private ensureColumn;
247
249
  }
248
250
 
249
251
  /**
@@ -485,10 +487,15 @@ declare class LocalChannelInstallationStore implements ChannelInstallationStore
485
487
  * Local SQLite implementation of A2AApiKeyStore.
486
488
  */
487
489
 
490
+ /** SQLite-backed A2A API key persistence for local deployments. */
488
491
  declare class LocalA2AApiKeyStore implements A2AApiKeyStore {
489
492
  private db;
490
493
  constructor(db: DatabaseWrapper);
494
+ /** Add a column if it does not exist (SQLite version compatible). */
495
+ private ensureColumn;
496
+ private repairManagementIds;
491
497
  findByKey(key: string): Promise<A2AApiKeyRecord | null>;
498
+ findById(id: string): Promise<A2AApiKeyRecord | null>;
492
499
  list(params: {
493
500
  tenantId?: string;
494
501
  limit?: number;
@@ -598,6 +605,22 @@ declare class LocalTaskStore implements TaskStore {
598
605
  getById(tenantId: string, id: string): Promise<TaskItem | null>;
599
606
  list(filter: TaskListFilter): Promise<TaskItem[]>;
600
607
  update(tenantId: string, id: string, updates: UpdateTaskRequest): Promise<TaskItem | null>;
608
+ /**
609
+ * Atomically update a task unless its current status is blocked.
610
+ *
611
+ * @param tenantId Tenant identifier.
612
+ * @param id Task identifier.
613
+ * @param updates Partial task data to update.
614
+ * @param blockedStatuses Current statuses that prevent the update.
615
+ * @returns The updated task, or `null` when missing or blocked.
616
+ */
617
+ updateIfStatusNotIn(tenantId: string, id: string, updates: UpdateTaskRequest, blockedStatuses: TaskItem["status"][]): Promise<TaskItem | null>;
618
+ /** Atomically update a task only when its current status is expected. */
619
+ updateIfStatusIn(tenantId: string, id: string, updates: UpdateTaskRequest, expectedStatuses: TaskItem["status"][]): Promise<TaskItem | null>;
620
+ /** Atomically update a task only when status and updatedAt match a read snapshot. */
621
+ updateIfStatusAndUpdatedAt(tenantId: string, id: string, updates: UpdateTaskRequest, expectedStatuses: TaskItem["status"][], expectedUpdatedAt: Date | string): Promise<TaskItem | null>;
622
+ /** Atomically update a child only when both child and parent snapshots match. */
623
+ updateIfStatusUpdatedAtAndParentUpdatedAt(tenantId: string, id: string, updates: UpdateTaskRequest, expectedStatuses: TaskItem["status"][], expectedUpdatedAt: Date | string, parentId: string, expectedParentUpdatedAt: Date | string): Promise<TaskItem | null>;
601
624
  delete(tenantId: string, id: string): Promise<boolean>;
602
625
  }
603
626
 
@@ -608,7 +631,13 @@ declare class LocalTaskStore implements TaskStore {
608
631
  declare class LocalTaskWorkItemStore implements TaskWorkItemStore {
609
632
  private db;
610
633
  constructor(db: DatabaseWrapper);
634
+ /** Add a column if it does not exist (SQLite version compatible). */
635
+ private ensureColumn;
611
636
  create(params: CreateWorkItemRequest): Promise<TaskWorkItem>;
637
+ /** Find an event by its tenant- and task-scoped key without pagination. */
638
+ findByEventKey(tenantId: string, taskId: string, eventKey: string): Promise<TaskWorkItem | null>;
639
+ /** Atomically return an existing event or create it once. */
640
+ createIfAbsentByEventKey(params: CreateWorkItemIfAbsentRequest): Promise<TaskWorkItem>;
612
641
  list(filter: TaskWorkItemListFilter): Promise<TaskWorkItem[]>;
613
642
  }
614
643
 
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, AssistantStore, Assistant, CreateAssistantRequest, WorkspaceStore, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ProjectStore, 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, TaskWorkItemListFilter, IConversationStore, ConversationRecord, CreateConversationInput } from '@axiom-lattice/protocols';
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
4
  import { IMessageQueueStore, AddMessageParams, PendingMessage, ThreadInfo } from '@axiom-lattice/core';
5
5
 
6
6
  /**
@@ -86,8 +86,8 @@ declare class StatementWrapper {
86
86
  * Result of a run operation.
87
87
  */
88
88
  declare class RunResult {
89
- private db;
90
- constructor(db: Database);
89
+ private modifiedRows;
90
+ constructor(modifiedRows: number);
91
91
  /** Number of rows modified by the last INSERT/UPDATE/DELETE. */
92
92
  get changes(): number;
93
93
  }
@@ -239,11 +239,13 @@ declare class LocalWorkspaceStore implements WorkspaceStore {
239
239
  declare class LocalProjectStore implements ProjectStore {
240
240
  private db;
241
241
  constructor(db: DatabaseWrapper);
242
- getProjectsByWorkspace(tenantId: string, workspaceId: string): Promise<Project[]>;
242
+ getProjectsByWorkspace(tenantId: string, workspaceId: string, filter?: ProjectFilter): Promise<Project[]>;
243
243
  getProjectById(tenantId: string, id: string): Promise<Project | null>;
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
+ /** Add a column if it does not exist (SQLite version compatible). */
248
+ private ensureColumn;
247
249
  }
248
250
 
249
251
  /**
@@ -485,10 +487,15 @@ declare class LocalChannelInstallationStore implements ChannelInstallationStore
485
487
  * Local SQLite implementation of A2AApiKeyStore.
486
488
  */
487
489
 
490
+ /** SQLite-backed A2A API key persistence for local deployments. */
488
491
  declare class LocalA2AApiKeyStore implements A2AApiKeyStore {
489
492
  private db;
490
493
  constructor(db: DatabaseWrapper);
494
+ /** Add a column if it does not exist (SQLite version compatible). */
495
+ private ensureColumn;
496
+ private repairManagementIds;
491
497
  findByKey(key: string): Promise<A2AApiKeyRecord | null>;
498
+ findById(id: string): Promise<A2AApiKeyRecord | null>;
492
499
  list(params: {
493
500
  tenantId?: string;
494
501
  limit?: number;
@@ -598,6 +605,22 @@ declare class LocalTaskStore implements TaskStore {
598
605
  getById(tenantId: string, id: string): Promise<TaskItem | null>;
599
606
  list(filter: TaskListFilter): Promise<TaskItem[]>;
600
607
  update(tenantId: string, id: string, updates: UpdateTaskRequest): Promise<TaskItem | null>;
608
+ /**
609
+ * Atomically update a task unless its current status is blocked.
610
+ *
611
+ * @param tenantId Tenant identifier.
612
+ * @param id Task identifier.
613
+ * @param updates Partial task data to update.
614
+ * @param blockedStatuses Current statuses that prevent the update.
615
+ * @returns The updated task, or `null` when missing or blocked.
616
+ */
617
+ updateIfStatusNotIn(tenantId: string, id: string, updates: UpdateTaskRequest, blockedStatuses: TaskItem["status"][]): Promise<TaskItem | null>;
618
+ /** Atomically update a task only when its current status is expected. */
619
+ updateIfStatusIn(tenantId: string, id: string, updates: UpdateTaskRequest, expectedStatuses: TaskItem["status"][]): Promise<TaskItem | null>;
620
+ /** Atomically update a task only when status and updatedAt match a read snapshot. */
621
+ updateIfStatusAndUpdatedAt(tenantId: string, id: string, updates: UpdateTaskRequest, expectedStatuses: TaskItem["status"][], expectedUpdatedAt: Date | string): Promise<TaskItem | null>;
622
+ /** Atomically update a child only when both child and parent snapshots match. */
623
+ updateIfStatusUpdatedAtAndParentUpdatedAt(tenantId: string, id: string, updates: UpdateTaskRequest, expectedStatuses: TaskItem["status"][], expectedUpdatedAt: Date | string, parentId: string, expectedParentUpdatedAt: Date | string): Promise<TaskItem | null>;
601
624
  delete(tenantId: string, id: string): Promise<boolean>;
602
625
  }
603
626
 
@@ -608,7 +631,13 @@ declare class LocalTaskStore implements TaskStore {
608
631
  declare class LocalTaskWorkItemStore implements TaskWorkItemStore {
609
632
  private db;
610
633
  constructor(db: DatabaseWrapper);
634
+ /** Add a column if it does not exist (SQLite version compatible). */
635
+ private ensureColumn;
611
636
  create(params: CreateWorkItemRequest): Promise<TaskWorkItem>;
637
+ /** Find an event by its tenant- and task-scoped key without pagination. */
638
+ findByEventKey(tenantId: string, taskId: string, eventKey: string): Promise<TaskWorkItem | null>;
639
+ /** Atomically return an existing event or create it once. */
640
+ createIfAbsentByEventKey(params: CreateWorkItemIfAbsentRequest): Promise<TaskWorkItem>;
612
641
  list(filter: TaskWorkItemListFilter): Promise<TaskWorkItem[]>;
613
642
  }
614
643