@axiom-lattice/pg-stores 2.0.10 → 3.0.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.
- package/.turbo/turbo-build.log +10 -10
- package/CHANGELOG.md +60 -0
- package/dist/index.d.mts +52 -4
- package/dist/index.d.ts +52 -4
- package/dist/index.js +907 -123
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +905 -123
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/__tests__/PostgreSQLA2AApiKeyStore.migrations.test.ts +76 -0
- package/src/__tests__/PostgreSQLA2AApiKeyStore.test.ts +133 -0
- package/src/__tests__/PostgreSQLAgentWebAppStore.migrations.test.ts +77 -0
- package/src/__tests__/PostgreSQLAgentWebAppStore.test.ts +290 -0
- package/src/__tests__/PostgreSQLChannelInstallationStore.test.ts +37 -2
- package/src/__tests__/PostgreSQLTaskStore.integration.test.ts +90 -0
- package/src/__tests__/PostgreSQLTaskStore.test.ts +287 -0
- package/src/__tests__/PostgreSQLTaskWorkItemStore.test.ts +104 -0
- package/src/__tests__/add_a2a_key_assistant_ids.test.ts +34 -0
- package/src/__tests__/workspace-project-store.test.ts +48 -0
- package/src/createPgStoreConfig.ts +10 -1
- package/src/index.ts +10 -0
- package/src/migrations/add_a2a_key_assistant_ids.ts +24 -0
- package/src/migrations/add_project_kind_column.ts +29 -0
- package/src/migrations/agent_web_apps_migration.ts +37 -0
- package/src/migrations/task_work_items_migration.ts +15 -0
- package/src/stores/PostgreSQLA2AApiKeyStore.ts +23 -8
- package/src/stores/PostgreSQLAgentWebAppStore.ts +280 -0
- package/src/stores/PostgreSQLProjectStore.ts +31 -8
- package/src/stores/PostgreSQLTaskStore.ts +272 -7
- package/src/stores/PostgreSQLTaskWorkItemStore.ts +42 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @axiom-lattice/pg-stores@
|
|
2
|
+
> @axiom-lattice/pg-stores@3.0.1 build /home/runner/work/agentic/agentic/packages/pg-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
|
-
[32mCJS[39m [1mdist/index.js [22m[
|
|
12
|
-
[32mCJS[39m [1mdist/index.js.map [22m[
|
|
13
|
-
[32mCJS[39m ⚡️ Build success in
|
|
14
|
-
[32mESM[39m [1mdist/index.mjs [22m[
|
|
15
|
-
[32mESM[39m [1mdist/index.mjs.map [22m[
|
|
16
|
-
[32mESM[39m ⚡️ Build success in
|
|
11
|
+
[32mCJS[39m [1mdist/index.js [22m[32m307.76 KB[39m
|
|
12
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m570.33 KB[39m
|
|
13
|
+
[32mCJS[39m ⚡️ Build success in 620ms
|
|
14
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m300.95 KB[39m
|
|
15
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m570.04 KB[39m
|
|
16
|
+
[32mESM[39m ⚡️ Build success in 652ms
|
|
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 18626ms
|
|
19
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m65.28 KB[39m
|
|
20
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m65.28 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,65 @@
|
|
|
1
1
|
# @axiom-lattice/pg-stores
|
|
2
2
|
|
|
3
|
+
## 3.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b44b480: Add managed Agent Web App publications, an isolated public runtime with project, model, thread, attachment and HITL boundaries, management SDK methods, and a dedicated React SDK Web App entry with composable hooks and widget components. Share authorized Agent execution, close-aware SSE transport, neutral file-reference formatting, and review decision state without merging Console and external authentication contexts.
|
|
8
|
+
- 3401a97: fix web
|
|
9
|
+
- Updated dependencies [b44b480]
|
|
10
|
+
- Updated dependencies [3401a97]
|
|
11
|
+
- @axiom-lattice/protocols@4.0.1
|
|
12
|
+
- @axiom-lattice/core@4.0.1
|
|
13
|
+
|
|
14
|
+
## 3.0.0
|
|
15
|
+
|
|
16
|
+
### Major Changes
|
|
17
|
+
|
|
18
|
+
- 1c783d0: Align A2A with the standard 0.3 protocol.
|
|
19
|
+
|
|
20
|
+
**Standard A2A 0.3 server (gateway):** per-assistant discovery and execution via
|
|
21
|
+
`GET /api/a2a/agents/:assistantId/.well-known/agent-card.json` and
|
|
22
|
+
`POST /api/a2a/agents/:assistantId/jsonrpc` (`message/send`, `message/stream`,
|
|
23
|
+
`tasks/get`, `tasks/cancel`), plus an internal `test-call` management route.
|
|
24
|
+
Every inbound task is persisted as a `TaskItem` (single-ID projection:
|
|
25
|
+
`TaskItem.id === A2A taskId`). File `bytes` parts are ingested into workspace
|
|
26
|
+
storage and referenced by URI.
|
|
27
|
+
|
|
28
|
+
**API key scope model:** keys are now `tenant + projectId (required) +
|
|
29
|
+
assistantIds[]` whitelist. Added `client.a2aKeys.*` (list/create/delete/disable/
|
|
30
|
+
enable/rotate) and UI (`A2AKeyList`, `A2AExposureSection` with agent-card preview
|
|
31
|
+
and dual-mode try-call).
|
|
32
|
+
|
|
33
|
+
**Breaking changes:**
|
|
34
|
+
|
|
35
|
+
- The legacy custom REST endpoints (`/api/a2a/tasks/send`,
|
|
36
|
+
`/api/a2a/tasks/:taskId`, `/api/a2a/tasks/:taskId/stream`,
|
|
37
|
+
`/api/a2a/tasks/:taskId/cancel`) are removed; use the JSON-RPC endpoint instead.
|
|
38
|
+
- The `A2A_API_KEYS` env format is simplified to `key:tenant:project,...`
|
|
39
|
+
(no workspace segment); `workspaceId` is removed from the key model and
|
|
40
|
+
creation flow.
|
|
41
|
+
- The `x-a2a-agent-id` request header is removed (the assistant is derived from
|
|
42
|
+
the URL path).
|
|
43
|
+
- `protocols` self-maintained A2A types are replaced by re-exports of
|
|
44
|
+
`@a2a-js/sdk` 0.3 types; `A2AApiKeyRecord`/`CreateA2AApiKeyInput` drop
|
|
45
|
+
`workspaceId` and gain `assistantIds`.
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- 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.
|
|
50
|
+
- 1ed2a67: up issues
|
|
51
|
+
- 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.
|
|
52
|
+
- 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.
|
|
53
|
+
- Updated dependencies [4de3e59]
|
|
54
|
+
- Updated dependencies [1c783d0]
|
|
55
|
+
- Updated dependencies [1ed2a67]
|
|
56
|
+
- Updated dependencies [a44c80b]
|
|
57
|
+
- Updated dependencies [83e1d5d]
|
|
58
|
+
- Updated dependencies [139e8f0]
|
|
59
|
+
- Updated dependencies [e501a4b]
|
|
60
|
+
- @axiom-lattice/protocols@4.0.0
|
|
61
|
+
- @axiom-lattice/core@4.0.0
|
|
62
|
+
|
|
3
63
|
## 2.0.10
|
|
4
64
|
|
|
5
65
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Pool, PoolConfig, PoolClient } from 'pg';
|
|
2
2
|
export { Pool, PoolConfig } from 'pg';
|
|
3
|
-
import { ThreadStore, Thread, CreateThreadRequest, AssistantStore, Assistant, CreateAssistantRequest, DatabaseConfigStore, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, ConnectionStore, ConnectionEntry, MetricsServerConfigStore, MetricsServerConfigEntry, CreateMetricsServerConfigRequest, UpdateMetricsServerConfigRequest, McpServerConfigStore, McpServerConfigEntry, CreateMcpServerConfigRequest, UpdateMcpServerConfigRequest, WorkspaceStore, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ProjectStore, Project, CreateProjectRequest, UpdateProjectRequest, UserStore, User, CreateUserRequest, UpdateUserRequest, TenantStore, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLinkStore, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, 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, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TaskStore, CreateTaskRequest, TaskItem, TaskListFilter, UpdateTaskRequest, TaskWorkItemStore, CreateWorkItemRequest, TaskWorkItem, TaskWorkItemListFilter, MenuRegistry, MenuItem, CreateMenuItemInput, UpdateMenuItemInput, SharedResourceStore, ShareRecord, CollectionStore, Collection, CreateCollectionRequest, UpdateCollectionRequest, VectorStoreProvider, VectorStoreCreateParams, SkillStore, Skill, CreateSkillRequest } from '@axiom-lattice/protocols';
|
|
4
|
-
export { Assistant, AssistantStore, Binding, BindingRegistry, ChannelInstallation, ChannelInstallationStore, ConnectionEntry, ConnectionStore, CreateAssistantRequest, CreateBindingInput, CreateChannelInstallationRequest, CreateDatabaseConfigRequest, CreateEvalCaseRequest, CreateEvalProjectRequest, CreateEvalRunRequest, CreateEvalSuiteRequest, CreateMcpServerConfigRequest, CreateMenuItemInput, CreateMetricsServerConfigRequest, CreateProjectRequest, CreateRunStepRequest, CreateShareRequest, CreateSkillRequest, CreateTenantRequest, CreateThreadRequest, CreateUserRequest, CreateUserTenantLinkRequest, CreateWorkflowRunRequest, CreateWorkspaceRequest, DatabaseConfig, DatabaseConfigEntry, DatabaseConfigStore, DatabaseType, EvalCase, EvalProject, EvalProjectReport, EvalRun, EvalRunResult, EvalStore, EvalSuite, LarkChannelInstallationConfig, McpServerConfigEntry, McpServerConfigStore, MenuItem, MenuRegistry, MetricsServerConfig, MetricsServerConfigEntry, MetricsServerConfigStore, Project, ProjectStore, ResourceAddress, RunStep, ScheduleExecutionType, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ShareRecord, ShareResult, ShareVisibility, SharedResourceStore, Skill, SkillStore, StorageType, Tenant, TenantStatus, TenantStore, Thread, ThreadStore, UpdateChannelInstallationRequest, UpdateDatabaseConfigRequest, UpdateMcpServerConfigRequest, UpdateMetricsServerConfigRequest, UpdateProjectRequest, UpdateRunStepRequest, UpdateTenantRequest, UpdateUserRequest, UpdateUserTenantLinkRequest, UpdateWorkflowRunRequest, UpdateWorkspaceRequest, User, UserStore, UserTenantLink, UserTenantLinkStore, UserTenantRole, WorkflowRun, WorkflowTrackingStore, Workspace, WorkspaceStore } from '@axiom-lattice/protocols';
|
|
3
|
+
import { ThreadStore, Thread, CreateThreadRequest, AssistantStore, Assistant, CreateAssistantRequest, DatabaseConfigStore, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, ConnectionStore, ConnectionEntry, MetricsServerConfigStore, MetricsServerConfigEntry, CreateMetricsServerConfigRequest, UpdateMetricsServerConfigRequest, McpServerConfigStore, McpServerConfigEntry, CreateMcpServerConfigRequest, UpdateMcpServerConfigRequest, WorkspaceStore, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ProjectStore, ProjectFilter, Project, CreateProjectRequest, UpdateProjectRequest, UserStore, User, CreateUserRequest, UpdateUserRequest, TenantStore, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLinkStore, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, 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, AgentWebAppStore, AgentWebApp, CreateAgentWebAppInput, AgentWebAppStorePatch, AgentWebAppUpdateOptions, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TaskStore, CreateTaskRequest, TaskItem, TaskListFilter, UpdateTaskRequest, TaskWorkItemStore, CreateWorkItemRequest, TaskWorkItem, CreateWorkItemIfAbsentRequest, TaskWorkItemListFilter, MenuRegistry, MenuItem, CreateMenuItemInput, UpdateMenuItemInput, SharedResourceStore, ShareRecord, CollectionStore, Collection, CreateCollectionRequest, UpdateCollectionRequest, VectorStoreProvider, VectorStoreCreateParams, SkillStore, Skill, CreateSkillRequest } from '@axiom-lattice/protocols';
|
|
4
|
+
export { AgentWebApp, AgentWebAppAppearance, AgentWebAppFeatures, AgentWebAppScope, AgentWebAppStatus, AgentWebAppStore, Assistant, AssistantStore, Binding, BindingRegistry, ChannelInstallation, ChannelInstallationStore, ConnectionEntry, ConnectionStore, CreateAgentWebAppInput, CreateAssistantRequest, CreateBindingInput, CreateChannelInstallationRequest, CreateDatabaseConfigRequest, CreateEvalCaseRequest, CreateEvalProjectRequest, CreateEvalRunRequest, CreateEvalSuiteRequest, CreateMcpServerConfigRequest, CreateMenuItemInput, CreateMetricsServerConfigRequest, CreateProjectRequest, CreateRunStepRequest, CreateShareRequest, CreateSkillRequest, CreateTenantRequest, CreateThreadRequest, CreateUserRequest, CreateUserTenantLinkRequest, CreateWorkflowRunRequest, CreateWorkspaceRequest, DatabaseConfig, DatabaseConfigEntry, DatabaseConfigStore, DatabaseType, EvalCase, EvalProject, EvalProjectReport, EvalRun, EvalRunResult, EvalStore, EvalSuite, LarkChannelInstallationConfig, McpServerConfigEntry, McpServerConfigStore, MenuItem, MenuRegistry, MetricsServerConfig, MetricsServerConfigEntry, MetricsServerConfigStore, Project, ProjectStore, ResourceAddress, RunStep, ScheduleExecutionType, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ShareRecord, ShareResult, ShareVisibility, SharedResourceStore, Skill, SkillStore, StorageType, Tenant, TenantStatus, TenantStore, Thread, ThreadStore, UpdateAgentWebAppInput, UpdateChannelInstallationRequest, UpdateDatabaseConfigRequest, UpdateMcpServerConfigRequest, UpdateMetricsServerConfigRequest, UpdateProjectRequest, UpdateRunStepRequest, UpdateTenantRequest, UpdateUserRequest, UpdateUserTenantLinkRequest, UpdateWorkflowRunRequest, UpdateWorkspaceRequest, User, UserStore, UserTenantLink, UserTenantLinkStore, UserTenantRole, WorkflowRun, WorkflowTrackingStore, Workspace, WorkspaceStore } from '@axiom-lattice/protocols';
|
|
5
5
|
import { IMessageQueueStore, AddMessageParams, PendingMessage, ThreadInfo } from '@axiom-lattice/core';
|
|
6
6
|
export { AddMessageParams, PendingMessage, ThreadInfo } from '@axiom-lattice/core';
|
|
7
7
|
import { PostgresSaver } from '@langchain/langgraph-checkpoint-postgres';
|
|
@@ -599,7 +599,7 @@ declare class PostgreSQLProjectStore implements ProjectStore {
|
|
|
599
599
|
/**
|
|
600
600
|
* Get all projects for a specific workspace
|
|
601
601
|
*/
|
|
602
|
-
getProjectsByWorkspace(tenantId: string, workspaceId: string): Promise<Project[]>;
|
|
602
|
+
getProjectsByWorkspace(tenantId: string, workspaceId: string, filter?: ProjectFilter): Promise<Project[]>;
|
|
603
603
|
/**
|
|
604
604
|
* Get a project by ID for a specific tenant
|
|
605
605
|
*/
|
|
@@ -1035,6 +1035,7 @@ declare class PostgreSQLA2AApiKeyStore implements A2AApiKeyStore {
|
|
|
1035
1035
|
dispose(): Promise<void>;
|
|
1036
1036
|
private ensureInitialized;
|
|
1037
1037
|
findByKey(key: string): Promise<A2AApiKeyRecord | null>;
|
|
1038
|
+
findById(id: string): Promise<A2AApiKeyRecord | null>;
|
|
1038
1039
|
list(params: {
|
|
1039
1040
|
tenantId?: string;
|
|
1040
1041
|
limit?: number;
|
|
@@ -1048,6 +1049,30 @@ declare class PostgreSQLA2AApiKeyStore implements A2AApiKeyStore {
|
|
|
1048
1049
|
loadIntoMap(): Promise<Map<string, A2AApiKeyEntry>>;
|
|
1049
1050
|
}
|
|
1050
1051
|
|
|
1052
|
+
interface PostgreSQLAgentWebAppStoreOptions {
|
|
1053
|
+
pool?: Pool;
|
|
1054
|
+
poolConfig?: string | PoolConfig;
|
|
1055
|
+
autoMigrate?: boolean;
|
|
1056
|
+
}
|
|
1057
|
+
declare class PostgreSQLAgentWebAppStore implements AgentWebAppStore {
|
|
1058
|
+
private pool;
|
|
1059
|
+
private migrationManager;
|
|
1060
|
+
private initialized;
|
|
1061
|
+
private ownsPool;
|
|
1062
|
+
private initPromise;
|
|
1063
|
+
constructor(options: PostgreSQLAgentWebAppStoreOptions);
|
|
1064
|
+
initialize(): Promise<void>;
|
|
1065
|
+
private startInitialization;
|
|
1066
|
+
dispose(): Promise<void>;
|
|
1067
|
+
private ensureInitialized;
|
|
1068
|
+
list(tenantId: string, assistantId?: string): Promise<AgentWebApp[]>;
|
|
1069
|
+
getById(tenantId: string, webAppId: string): Promise<AgentWebApp | null>;
|
|
1070
|
+
findById(webAppId: string): Promise<AgentWebApp | null>;
|
|
1071
|
+
create(tenantId: string, input: CreateAgentWebAppInput): Promise<AgentWebApp>;
|
|
1072
|
+
update(tenantId: string, webAppId: string, patch: AgentWebAppStorePatch, options?: AgentWebAppUpdateOptions): Promise<AgentWebApp | null>;
|
|
1073
|
+
delete(tenantId: string, webAppId: string): Promise<boolean>;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1051
1076
|
/**
|
|
1052
1077
|
* PostgreSQL implementation of ScheduleStorage
|
|
1053
1078
|
*
|
|
@@ -1195,6 +1220,22 @@ declare class PostgreSQLTaskStore implements TaskStore {
|
|
|
1195
1220
|
getById(tenantId: string, id: string): Promise<TaskItem | null>;
|
|
1196
1221
|
list(filter: TaskListFilter): Promise<TaskItem[]>;
|
|
1197
1222
|
update(tenantId: string, id: string, updates: UpdateTaskRequest): Promise<TaskItem | null>;
|
|
1223
|
+
/**
|
|
1224
|
+
* Atomically update a task unless its current status is blocked.
|
|
1225
|
+
*
|
|
1226
|
+
* @param tenantId Tenant identifier.
|
|
1227
|
+
* @param id Task identifier.
|
|
1228
|
+
* @param updates Partial task data to update.
|
|
1229
|
+
* @param blockedStatuses Current statuses that prevent the update.
|
|
1230
|
+
* @returns The updated task, or `null` when missing or blocked.
|
|
1231
|
+
*/
|
|
1232
|
+
updateIfStatusNotIn(tenantId: string, id: string, updates: UpdateTaskRequest, blockedStatuses: TaskItem["status"][]): Promise<TaskItem | null>;
|
|
1233
|
+
/** Atomically update a task only when its current status is expected. */
|
|
1234
|
+
updateIfStatusIn(tenantId: string, id: string, updates: UpdateTaskRequest, expectedStatuses: TaskItem["status"][]): Promise<TaskItem | null>;
|
|
1235
|
+
/** Atomically update a task only when status and updatedAt match a read snapshot. */
|
|
1236
|
+
updateIfStatusAndUpdatedAt(tenantId: string, id: string, updates: UpdateTaskRequest, expectedStatuses: TaskItem["status"][], expectedUpdatedAt: Date | string): Promise<TaskItem | null>;
|
|
1237
|
+
/** Atomically update a child only when both child and parent snapshots match. */
|
|
1238
|
+
updateIfStatusUpdatedAtAndParentUpdatedAt(tenantId: string, id: string, updates: UpdateTaskRequest, expectedStatuses: TaskItem["status"][], expectedUpdatedAt: Date | string, parentId: string, expectedParentUpdatedAt: Date | string): Promise<TaskItem | null>;
|
|
1198
1239
|
delete(tenantId: string, id: string): Promise<boolean>;
|
|
1199
1240
|
dispose(): Promise<void>;
|
|
1200
1241
|
private ensureInitialized;
|
|
@@ -1204,6 +1245,10 @@ declare class PostgreSQLTaskWorkItemStore implements TaskWorkItemStore {
|
|
|
1204
1245
|
private pool;
|
|
1205
1246
|
constructor(pool: Pool);
|
|
1206
1247
|
create(params: CreateWorkItemRequest): Promise<TaskWorkItem>;
|
|
1248
|
+
/** Find an event by its tenant- and task-scoped key without pagination. */
|
|
1249
|
+
findByEventKey(tenantId: string, taskId: string, eventKey: string): Promise<TaskWorkItem | null>;
|
|
1250
|
+
/** Atomically return an existing event or create it once. */
|
|
1251
|
+
createIfAbsentByEventKey(params: CreateWorkItemIfAbsentRequest): Promise<TaskWorkItem>;
|
|
1207
1252
|
list(filter: TaskWorkItemListFilter): Promise<TaskWorkItem[]>;
|
|
1208
1253
|
private rowToItem;
|
|
1209
1254
|
}
|
|
@@ -1335,6 +1380,7 @@ declare function createPgStoreConfig(connectionString: string): Promise<{
|
|
|
1335
1380
|
task: PostgreSQLTaskStore;
|
|
1336
1381
|
taskWorkItem: PostgreSQLTaskWorkItemStore;
|
|
1337
1382
|
a2aApiKey: PostgreSQLA2AApiKeyStore;
|
|
1383
|
+
agentWebApp: PostgreSQLAgentWebAppStore;
|
|
1338
1384
|
schedule: PostgreSQLScheduleStorage;
|
|
1339
1385
|
menu: MenuStore;
|
|
1340
1386
|
sharedResource: PostgresSharedResourceStore;
|
|
@@ -1695,6 +1741,8 @@ declare const createSharedResourcesTable: Migration;
|
|
|
1695
1741
|
|
|
1696
1742
|
declare const createA2AApiKeysTable: Migration;
|
|
1697
1743
|
|
|
1744
|
+
declare const createAgentWebAppsTable: Migration;
|
|
1745
|
+
|
|
1698
1746
|
/**
|
|
1699
1747
|
* PostgreSQL migrations for workflow tracking tables
|
|
1700
1748
|
*/
|
|
@@ -1819,4 +1867,4 @@ declare const addFileContentType: Migration;
|
|
|
1819
1867
|
|
|
1820
1868
|
declare const createCollectionsTable: Migration;
|
|
1821
1869
|
|
|
1822
|
-
export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, type CreateChannelIdentityMappingInput, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLCollectionStore, type PostgreSQLCollectionStoreOptions, PostgreSQLConnectionStore, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, PostgreSQLTenantStore, type PostgreSQLTenantStoreOptions, type PostgreSQLThreadMessageQueueStoreOptions, PostgreSQLThreadStore, type PostgreSQLThreadStoreOptions, PostgreSQLUserStore, type PostgreSQLUserStoreOptions, PostgreSQLUserTenantLinkStore, type PostgreSQLUserTenantLinkStoreOptions, PostgreSQLWorkflowTrackingStore, type PostgreSQLWorkflowTrackingStoreOptions, PostgreSQLWorkspaceStore, type PostgreSQLWorkspaceStoreOptions, PostgresSharedResourceStore, type PostgresSharedResourceStoreOptions, ThreadMessageQueueStore, addAssistantTenantId, addEnvToEvalRuns, addFileContentType, addHoldoutToEvalRuns, addInterruptColumnsToEval, addInterruptPolicyToEvalCases, addProjectConfigColumn, addScheduleTenantId, addSkillTenantId, addStepThreadId, addTaskIdToEvalRuns, addThreadTenantId, addWorkflowRunsTenantStatusUpdatedIndex, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAssistantsTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, enforceUniqueEvalProjectName, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
|
|
1870
|
+
export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, type CreateChannelIdentityMappingInput, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAgentWebAppStore, type PostgreSQLAgentWebAppStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLCollectionStore, type PostgreSQLCollectionStoreOptions, PostgreSQLConnectionStore, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, PostgreSQLTenantStore, type PostgreSQLTenantStoreOptions, type PostgreSQLThreadMessageQueueStoreOptions, PostgreSQLThreadStore, type PostgreSQLThreadStoreOptions, PostgreSQLUserStore, type PostgreSQLUserStoreOptions, PostgreSQLUserTenantLinkStore, type PostgreSQLUserTenantLinkStoreOptions, PostgreSQLWorkflowTrackingStore, type PostgreSQLWorkflowTrackingStoreOptions, PostgreSQLWorkspaceStore, type PostgreSQLWorkspaceStoreOptions, PostgresSharedResourceStore, type PostgresSharedResourceStoreOptions, ThreadMessageQueueStore, addAssistantTenantId, addEnvToEvalRuns, addFileContentType, addHoldoutToEvalRuns, addInterruptColumnsToEval, addInterruptPolicyToEvalCases, addProjectConfigColumn, addScheduleTenantId, addSkillTenantId, addStepThreadId, addTaskIdToEvalRuns, addThreadTenantId, addWorkflowRunsTenantStatusUpdatedIndex, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAgentWebAppsTable, createAssistantsTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, enforceUniqueEvalProjectName, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Pool, PoolConfig, PoolClient } from 'pg';
|
|
2
2
|
export { Pool, PoolConfig } from 'pg';
|
|
3
|
-
import { ThreadStore, Thread, CreateThreadRequest, AssistantStore, Assistant, CreateAssistantRequest, DatabaseConfigStore, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, ConnectionStore, ConnectionEntry, MetricsServerConfigStore, MetricsServerConfigEntry, CreateMetricsServerConfigRequest, UpdateMetricsServerConfigRequest, McpServerConfigStore, McpServerConfigEntry, CreateMcpServerConfigRequest, UpdateMcpServerConfigRequest, WorkspaceStore, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ProjectStore, Project, CreateProjectRequest, UpdateProjectRequest, UserStore, User, CreateUserRequest, UpdateUserRequest, TenantStore, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLinkStore, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, 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, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TaskStore, CreateTaskRequest, TaskItem, TaskListFilter, UpdateTaskRequest, TaskWorkItemStore, CreateWorkItemRequest, TaskWorkItem, TaskWorkItemListFilter, MenuRegistry, MenuItem, CreateMenuItemInput, UpdateMenuItemInput, SharedResourceStore, ShareRecord, CollectionStore, Collection, CreateCollectionRequest, UpdateCollectionRequest, VectorStoreProvider, VectorStoreCreateParams, SkillStore, Skill, CreateSkillRequest } from '@axiom-lattice/protocols';
|
|
4
|
-
export { Assistant, AssistantStore, Binding, BindingRegistry, ChannelInstallation, ChannelInstallationStore, ConnectionEntry, ConnectionStore, CreateAssistantRequest, CreateBindingInput, CreateChannelInstallationRequest, CreateDatabaseConfigRequest, CreateEvalCaseRequest, CreateEvalProjectRequest, CreateEvalRunRequest, CreateEvalSuiteRequest, CreateMcpServerConfigRequest, CreateMenuItemInput, CreateMetricsServerConfigRequest, CreateProjectRequest, CreateRunStepRequest, CreateShareRequest, CreateSkillRequest, CreateTenantRequest, CreateThreadRequest, CreateUserRequest, CreateUserTenantLinkRequest, CreateWorkflowRunRequest, CreateWorkspaceRequest, DatabaseConfig, DatabaseConfigEntry, DatabaseConfigStore, DatabaseType, EvalCase, EvalProject, EvalProjectReport, EvalRun, EvalRunResult, EvalStore, EvalSuite, LarkChannelInstallationConfig, McpServerConfigEntry, McpServerConfigStore, MenuItem, MenuRegistry, MetricsServerConfig, MetricsServerConfigEntry, MetricsServerConfigStore, Project, ProjectStore, ResourceAddress, RunStep, ScheduleExecutionType, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ShareRecord, ShareResult, ShareVisibility, SharedResourceStore, Skill, SkillStore, StorageType, Tenant, TenantStatus, TenantStore, Thread, ThreadStore, UpdateChannelInstallationRequest, UpdateDatabaseConfigRequest, UpdateMcpServerConfigRequest, UpdateMetricsServerConfigRequest, UpdateProjectRequest, UpdateRunStepRequest, UpdateTenantRequest, UpdateUserRequest, UpdateUserTenantLinkRequest, UpdateWorkflowRunRequest, UpdateWorkspaceRequest, User, UserStore, UserTenantLink, UserTenantLinkStore, UserTenantRole, WorkflowRun, WorkflowTrackingStore, Workspace, WorkspaceStore } from '@axiom-lattice/protocols';
|
|
3
|
+
import { ThreadStore, Thread, CreateThreadRequest, AssistantStore, Assistant, CreateAssistantRequest, DatabaseConfigStore, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, ConnectionStore, ConnectionEntry, MetricsServerConfigStore, MetricsServerConfigEntry, CreateMetricsServerConfigRequest, UpdateMetricsServerConfigRequest, McpServerConfigStore, McpServerConfigEntry, CreateMcpServerConfigRequest, UpdateMcpServerConfigRequest, WorkspaceStore, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ProjectStore, ProjectFilter, Project, CreateProjectRequest, UpdateProjectRequest, UserStore, User, CreateUserRequest, UpdateUserRequest, TenantStore, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLinkStore, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, 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, AgentWebAppStore, AgentWebApp, CreateAgentWebAppInput, AgentWebAppStorePatch, AgentWebAppUpdateOptions, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TaskStore, CreateTaskRequest, TaskItem, TaskListFilter, UpdateTaskRequest, TaskWorkItemStore, CreateWorkItemRequest, TaskWorkItem, CreateWorkItemIfAbsentRequest, TaskWorkItemListFilter, MenuRegistry, MenuItem, CreateMenuItemInput, UpdateMenuItemInput, SharedResourceStore, ShareRecord, CollectionStore, Collection, CreateCollectionRequest, UpdateCollectionRequest, VectorStoreProvider, VectorStoreCreateParams, SkillStore, Skill, CreateSkillRequest } from '@axiom-lattice/protocols';
|
|
4
|
+
export { AgentWebApp, AgentWebAppAppearance, AgentWebAppFeatures, AgentWebAppScope, AgentWebAppStatus, AgentWebAppStore, Assistant, AssistantStore, Binding, BindingRegistry, ChannelInstallation, ChannelInstallationStore, ConnectionEntry, ConnectionStore, CreateAgentWebAppInput, CreateAssistantRequest, CreateBindingInput, CreateChannelInstallationRequest, CreateDatabaseConfigRequest, CreateEvalCaseRequest, CreateEvalProjectRequest, CreateEvalRunRequest, CreateEvalSuiteRequest, CreateMcpServerConfigRequest, CreateMenuItemInput, CreateMetricsServerConfigRequest, CreateProjectRequest, CreateRunStepRequest, CreateShareRequest, CreateSkillRequest, CreateTenantRequest, CreateThreadRequest, CreateUserRequest, CreateUserTenantLinkRequest, CreateWorkflowRunRequest, CreateWorkspaceRequest, DatabaseConfig, DatabaseConfigEntry, DatabaseConfigStore, DatabaseType, EvalCase, EvalProject, EvalProjectReport, EvalRun, EvalRunResult, EvalStore, EvalSuite, LarkChannelInstallationConfig, McpServerConfigEntry, McpServerConfigStore, MenuItem, MenuRegistry, MetricsServerConfig, MetricsServerConfigEntry, MetricsServerConfigStore, Project, ProjectStore, ResourceAddress, RunStep, ScheduleExecutionType, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ShareRecord, ShareResult, ShareVisibility, SharedResourceStore, Skill, SkillStore, StorageType, Tenant, TenantStatus, TenantStore, Thread, ThreadStore, UpdateAgentWebAppInput, UpdateChannelInstallationRequest, UpdateDatabaseConfigRequest, UpdateMcpServerConfigRequest, UpdateMetricsServerConfigRequest, UpdateProjectRequest, UpdateRunStepRequest, UpdateTenantRequest, UpdateUserRequest, UpdateUserTenantLinkRequest, UpdateWorkflowRunRequest, UpdateWorkspaceRequest, User, UserStore, UserTenantLink, UserTenantLinkStore, UserTenantRole, WorkflowRun, WorkflowTrackingStore, Workspace, WorkspaceStore } from '@axiom-lattice/protocols';
|
|
5
5
|
import { IMessageQueueStore, AddMessageParams, PendingMessage, ThreadInfo } from '@axiom-lattice/core';
|
|
6
6
|
export { AddMessageParams, PendingMessage, ThreadInfo } from '@axiom-lattice/core';
|
|
7
7
|
import { PostgresSaver } from '@langchain/langgraph-checkpoint-postgres';
|
|
@@ -599,7 +599,7 @@ declare class PostgreSQLProjectStore implements ProjectStore {
|
|
|
599
599
|
/**
|
|
600
600
|
* Get all projects for a specific workspace
|
|
601
601
|
*/
|
|
602
|
-
getProjectsByWorkspace(tenantId: string, workspaceId: string): Promise<Project[]>;
|
|
602
|
+
getProjectsByWorkspace(tenantId: string, workspaceId: string, filter?: ProjectFilter): Promise<Project[]>;
|
|
603
603
|
/**
|
|
604
604
|
* Get a project by ID for a specific tenant
|
|
605
605
|
*/
|
|
@@ -1035,6 +1035,7 @@ declare class PostgreSQLA2AApiKeyStore implements A2AApiKeyStore {
|
|
|
1035
1035
|
dispose(): Promise<void>;
|
|
1036
1036
|
private ensureInitialized;
|
|
1037
1037
|
findByKey(key: string): Promise<A2AApiKeyRecord | null>;
|
|
1038
|
+
findById(id: string): Promise<A2AApiKeyRecord | null>;
|
|
1038
1039
|
list(params: {
|
|
1039
1040
|
tenantId?: string;
|
|
1040
1041
|
limit?: number;
|
|
@@ -1048,6 +1049,30 @@ declare class PostgreSQLA2AApiKeyStore implements A2AApiKeyStore {
|
|
|
1048
1049
|
loadIntoMap(): Promise<Map<string, A2AApiKeyEntry>>;
|
|
1049
1050
|
}
|
|
1050
1051
|
|
|
1052
|
+
interface PostgreSQLAgentWebAppStoreOptions {
|
|
1053
|
+
pool?: Pool;
|
|
1054
|
+
poolConfig?: string | PoolConfig;
|
|
1055
|
+
autoMigrate?: boolean;
|
|
1056
|
+
}
|
|
1057
|
+
declare class PostgreSQLAgentWebAppStore implements AgentWebAppStore {
|
|
1058
|
+
private pool;
|
|
1059
|
+
private migrationManager;
|
|
1060
|
+
private initialized;
|
|
1061
|
+
private ownsPool;
|
|
1062
|
+
private initPromise;
|
|
1063
|
+
constructor(options: PostgreSQLAgentWebAppStoreOptions);
|
|
1064
|
+
initialize(): Promise<void>;
|
|
1065
|
+
private startInitialization;
|
|
1066
|
+
dispose(): Promise<void>;
|
|
1067
|
+
private ensureInitialized;
|
|
1068
|
+
list(tenantId: string, assistantId?: string): Promise<AgentWebApp[]>;
|
|
1069
|
+
getById(tenantId: string, webAppId: string): Promise<AgentWebApp | null>;
|
|
1070
|
+
findById(webAppId: string): Promise<AgentWebApp | null>;
|
|
1071
|
+
create(tenantId: string, input: CreateAgentWebAppInput): Promise<AgentWebApp>;
|
|
1072
|
+
update(tenantId: string, webAppId: string, patch: AgentWebAppStorePatch, options?: AgentWebAppUpdateOptions): Promise<AgentWebApp | null>;
|
|
1073
|
+
delete(tenantId: string, webAppId: string): Promise<boolean>;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1051
1076
|
/**
|
|
1052
1077
|
* PostgreSQL implementation of ScheduleStorage
|
|
1053
1078
|
*
|
|
@@ -1195,6 +1220,22 @@ declare class PostgreSQLTaskStore implements TaskStore {
|
|
|
1195
1220
|
getById(tenantId: string, id: string): Promise<TaskItem | null>;
|
|
1196
1221
|
list(filter: TaskListFilter): Promise<TaskItem[]>;
|
|
1197
1222
|
update(tenantId: string, id: string, updates: UpdateTaskRequest): Promise<TaskItem | null>;
|
|
1223
|
+
/**
|
|
1224
|
+
* Atomically update a task unless its current status is blocked.
|
|
1225
|
+
*
|
|
1226
|
+
* @param tenantId Tenant identifier.
|
|
1227
|
+
* @param id Task identifier.
|
|
1228
|
+
* @param updates Partial task data to update.
|
|
1229
|
+
* @param blockedStatuses Current statuses that prevent the update.
|
|
1230
|
+
* @returns The updated task, or `null` when missing or blocked.
|
|
1231
|
+
*/
|
|
1232
|
+
updateIfStatusNotIn(tenantId: string, id: string, updates: UpdateTaskRequest, blockedStatuses: TaskItem["status"][]): Promise<TaskItem | null>;
|
|
1233
|
+
/** Atomically update a task only when its current status is expected. */
|
|
1234
|
+
updateIfStatusIn(tenantId: string, id: string, updates: UpdateTaskRequest, expectedStatuses: TaskItem["status"][]): Promise<TaskItem | null>;
|
|
1235
|
+
/** Atomically update a task only when status and updatedAt match a read snapshot. */
|
|
1236
|
+
updateIfStatusAndUpdatedAt(tenantId: string, id: string, updates: UpdateTaskRequest, expectedStatuses: TaskItem["status"][], expectedUpdatedAt: Date | string): Promise<TaskItem | null>;
|
|
1237
|
+
/** Atomically update a child only when both child and parent snapshots match. */
|
|
1238
|
+
updateIfStatusUpdatedAtAndParentUpdatedAt(tenantId: string, id: string, updates: UpdateTaskRequest, expectedStatuses: TaskItem["status"][], expectedUpdatedAt: Date | string, parentId: string, expectedParentUpdatedAt: Date | string): Promise<TaskItem | null>;
|
|
1198
1239
|
delete(tenantId: string, id: string): Promise<boolean>;
|
|
1199
1240
|
dispose(): Promise<void>;
|
|
1200
1241
|
private ensureInitialized;
|
|
@@ -1204,6 +1245,10 @@ declare class PostgreSQLTaskWorkItemStore implements TaskWorkItemStore {
|
|
|
1204
1245
|
private pool;
|
|
1205
1246
|
constructor(pool: Pool);
|
|
1206
1247
|
create(params: CreateWorkItemRequest): Promise<TaskWorkItem>;
|
|
1248
|
+
/** Find an event by its tenant- and task-scoped key without pagination. */
|
|
1249
|
+
findByEventKey(tenantId: string, taskId: string, eventKey: string): Promise<TaskWorkItem | null>;
|
|
1250
|
+
/** Atomically return an existing event or create it once. */
|
|
1251
|
+
createIfAbsentByEventKey(params: CreateWorkItemIfAbsentRequest): Promise<TaskWorkItem>;
|
|
1207
1252
|
list(filter: TaskWorkItemListFilter): Promise<TaskWorkItem[]>;
|
|
1208
1253
|
private rowToItem;
|
|
1209
1254
|
}
|
|
@@ -1335,6 +1380,7 @@ declare function createPgStoreConfig(connectionString: string): Promise<{
|
|
|
1335
1380
|
task: PostgreSQLTaskStore;
|
|
1336
1381
|
taskWorkItem: PostgreSQLTaskWorkItemStore;
|
|
1337
1382
|
a2aApiKey: PostgreSQLA2AApiKeyStore;
|
|
1383
|
+
agentWebApp: PostgreSQLAgentWebAppStore;
|
|
1338
1384
|
schedule: PostgreSQLScheduleStorage;
|
|
1339
1385
|
menu: MenuStore;
|
|
1340
1386
|
sharedResource: PostgresSharedResourceStore;
|
|
@@ -1695,6 +1741,8 @@ declare const createSharedResourcesTable: Migration;
|
|
|
1695
1741
|
|
|
1696
1742
|
declare const createA2AApiKeysTable: Migration;
|
|
1697
1743
|
|
|
1744
|
+
declare const createAgentWebAppsTable: Migration;
|
|
1745
|
+
|
|
1698
1746
|
/**
|
|
1699
1747
|
* PostgreSQL migrations for workflow tracking tables
|
|
1700
1748
|
*/
|
|
@@ -1819,4 +1867,4 @@ declare const addFileContentType: Migration;
|
|
|
1819
1867
|
|
|
1820
1868
|
declare const createCollectionsTable: Migration;
|
|
1821
1869
|
|
|
1822
|
-
export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, type CreateChannelIdentityMappingInput, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLCollectionStore, type PostgreSQLCollectionStoreOptions, PostgreSQLConnectionStore, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, PostgreSQLTenantStore, type PostgreSQLTenantStoreOptions, type PostgreSQLThreadMessageQueueStoreOptions, PostgreSQLThreadStore, type PostgreSQLThreadStoreOptions, PostgreSQLUserStore, type PostgreSQLUserStoreOptions, PostgreSQLUserTenantLinkStore, type PostgreSQLUserTenantLinkStoreOptions, PostgreSQLWorkflowTrackingStore, type PostgreSQLWorkflowTrackingStoreOptions, PostgreSQLWorkspaceStore, type PostgreSQLWorkspaceStoreOptions, PostgresSharedResourceStore, type PostgresSharedResourceStoreOptions, ThreadMessageQueueStore, addAssistantTenantId, addEnvToEvalRuns, addFileContentType, addHoldoutToEvalRuns, addInterruptColumnsToEval, addInterruptPolicyToEvalCases, addProjectConfigColumn, addScheduleTenantId, addSkillTenantId, addStepThreadId, addTaskIdToEvalRuns, addThreadTenantId, addWorkflowRunsTenantStatusUpdatedIndex, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAssistantsTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, enforceUniqueEvalProjectName, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
|
|
1870
|
+
export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, type CreateChannelIdentityMappingInput, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAgentWebAppStore, type PostgreSQLAgentWebAppStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLCollectionStore, type PostgreSQLCollectionStoreOptions, PostgreSQLConnectionStore, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, PostgreSQLTenantStore, type PostgreSQLTenantStoreOptions, type PostgreSQLThreadMessageQueueStoreOptions, PostgreSQLThreadStore, type PostgreSQLThreadStoreOptions, PostgreSQLUserStore, type PostgreSQLUserStoreOptions, PostgreSQLUserTenantLinkStore, type PostgreSQLUserTenantLinkStoreOptions, PostgreSQLWorkflowTrackingStore, type PostgreSQLWorkflowTrackingStoreOptions, PostgreSQLWorkspaceStore, type PostgreSQLWorkspaceStoreOptions, PostgresSharedResourceStore, type PostgresSharedResourceStoreOptions, ThreadMessageQueueStore, addAssistantTenantId, addEnvToEvalRuns, addFileContentType, addHoldoutToEvalRuns, addInterruptColumnsToEval, addInterruptPolicyToEvalCases, addProjectConfigColumn, addScheduleTenantId, addSkillTenantId, addStepThreadId, addTaskIdToEvalRuns, addThreadTenantId, addWorkflowRunsTenantStatusUpdatedIndex, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAgentWebAppsTable, createAssistantsTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, enforceUniqueEvalProjectName, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
|