@axiom-lattice/pg-stores 3.1.17 → 3.1.18
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 +41 -0
- package/dist/index.d.mts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +57 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +56 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/__tests__/ChannelIdentityMappingStore.test.ts +9 -0
- package/src/__tests__/MenuStore.mcpApp.integration.test.ts +36 -0
- package/src/__tests__/MenuStore.migrations.test.ts +38 -0
- package/src/__tests__/PostgreSQLCapabilityBundleStore.test.ts +24 -5
- package/src/createPgStoreConfig.ts +2 -0
- package/src/index.ts +1 -0
- package/src/migrations/__tests__/menu_items_add_mcp_app_type.test.ts +30 -0
- package/src/migrations/menu_items_add_mcp_app_type.ts +29 -0
- package/src/stores/MenuStore.ts +2 -0
- package/src/stores/PostgreSQLCapabilityBundleStore.ts +32 -15
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @axiom-lattice/pg-stores@3.1.
|
|
2
|
+
> @axiom-lattice/pg-stores@3.1.18 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[32m400.85 KB[39m
|
|
12
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m730.96 KB[39m
|
|
13
|
+
[32mCJS[39m ⚡️ Build success in 877ms
|
|
14
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m392.59 KB[39m
|
|
15
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m730.60 KB[39m
|
|
16
|
+
[32mESM[39m ⚡️ Build success in 918ms
|
|
17
17
|
[34mDTS[39m Build start
|
|
18
|
-
[32mDTS[39m ⚡️ Build success in
|
|
19
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m82.
|
|
20
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[32m82.
|
|
18
|
+
[32mDTS[39m ⚡️ Build success in 13657ms
|
|
19
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m82.41 KB[39m
|
|
20
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m82.41 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
# @axiom-lattice/pg-stores
|
|
2
2
|
|
|
3
|
+
## 3.1.18
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1cc5893: Repair the drifted test baseline, authenticate Lark webhook ingress with the verification token and request signature, require CAS revisions on capability bundle updates, and fix SandboxRegistry process-lifetime issues.
|
|
8
|
+
- e4a110f: mcp ui etc
|
|
9
|
+
- ad3ac4d: Add a first-class `mcpApp` custom-menu content type so a rendered MCP App can be
|
|
10
|
+
pinned to the workspace menu and re-opened as a live entry point. The protocol
|
|
11
|
+
gains `McpAppMenuConfig` (discriminated `mcp` / `plugin`) and `FileMenuConfig`;
|
|
12
|
+
react-sdk encodes/parses the item, renders it via `McpAppFullscreen`, and adds a
|
|
13
|
+
pin affordance to `McpAppToolbar` reusing `PinToMenuButton`. pg-stores broadens
|
|
14
|
+
the `lattice_menu_items.content_type` CHECK constraint to accept `mcpApp`
|
|
15
|
+
(migration v181, registered centrally in `createPgStoreConfig`).
|
|
16
|
+
- Updated dependencies [0b7cabc]
|
|
17
|
+
- Updated dependencies [c5cd1fe]
|
|
18
|
+
- Updated dependencies [ecd28e5]
|
|
19
|
+
- Updated dependencies [8ed0255]
|
|
20
|
+
- Updated dependencies [15b7181]
|
|
21
|
+
- Updated dependencies [1cc5893]
|
|
22
|
+
- Updated dependencies [e4a110f]
|
|
23
|
+
- Updated dependencies [2fd1187]
|
|
24
|
+
- Updated dependencies [015a931]
|
|
25
|
+
- Updated dependencies [3398474]
|
|
26
|
+
- Updated dependencies [a87f880]
|
|
27
|
+
- Updated dependencies [9de0600]
|
|
28
|
+
- Updated dependencies [fbc46a4]
|
|
29
|
+
- Updated dependencies [978699d]
|
|
30
|
+
- Updated dependencies [db00edc]
|
|
31
|
+
- Updated dependencies [4f86ed4]
|
|
32
|
+
- Updated dependencies [41c6ee2]
|
|
33
|
+
- Updated dependencies [15c92a0]
|
|
34
|
+
- Updated dependencies [ad3ac4d]
|
|
35
|
+
- Updated dependencies [4c3ddbd]
|
|
36
|
+
- Updated dependencies [a0a30b3]
|
|
37
|
+
- Updated dependencies [ac6b3de]
|
|
38
|
+
- Updated dependencies [2d5682c]
|
|
39
|
+
- Updated dependencies [cb933a7]
|
|
40
|
+
- Updated dependencies [7f35e3d]
|
|
41
|
+
- @axiom-lattice/core@4.3.0
|
|
42
|
+
- @axiom-lattice/protocols@4.4.0
|
|
43
|
+
|
|
3
44
|
## 3.1.17
|
|
4
45
|
|
|
5
46
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1488,6 +1488,12 @@ declare class PostgreSQLCapabilityBundleStore implements CapabilityBundleStore {
|
|
|
1488
1488
|
update(tenantId: string, id: string, input: InternalUpdateCapabilityBundleInput): Promise<CapabilityBundle | {
|
|
1489
1489
|
status: "conflict";
|
|
1490
1490
|
} | null>;
|
|
1491
|
+
/**
|
|
1492
|
+
* Distinguishes a stale-revision CAS miss from a missing bundle.
|
|
1493
|
+
*
|
|
1494
|
+
* @returns `null` when no such bundle exists, otherwise a conflict marker.
|
|
1495
|
+
*/
|
|
1496
|
+
private resolveCasMiss;
|
|
1491
1497
|
deleteIfUnreferenced(tenantId: string, id: string): Promise<CapabilityBundleDeleteResult>;
|
|
1492
1498
|
}
|
|
1493
1499
|
|
|
@@ -2195,6 +2201,8 @@ declare const createMenuItemsTable: Migration;
|
|
|
2195
2201
|
|
|
2196
2202
|
declare const addFileContentType: Migration;
|
|
2197
2203
|
|
|
2204
|
+
declare const addMcpAppContentType: Migration;
|
|
2205
|
+
|
|
2198
2206
|
/**
|
|
2199
2207
|
* Collection table migrations
|
|
2200
2208
|
*/
|
|
@@ -2206,4 +2214,4 @@ declare const createProjectRoomTables: Migration;
|
|
|
2206
2214
|
/** Adds per-user, per-room read markers for unread counts. */
|
|
2207
2215
|
declare const createProjectRoomReadStates: Migration;
|
|
2208
2216
|
|
|
2209
|
-
export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, type CreateChannelIdentityMappingInput, DuplicateProjectMembershipError, DuplicateProjectRoomMessageIdempotencyKeyError, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAgentWebAppStore, type PostgreSQLAgentWebAppStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLCapabilityBundleStore, type PostgreSQLCapabilityBundleStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLCollectionStore, type PostgreSQLCollectionStoreOptions, PostgreSQLConnectionStore, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLOpenAuditStore, type PostgreSQLOpenAuditStoreOptions, PostgreSQLProjectBotMembershipStore, PostgreSQLProjectMembershipStore, PostgreSQLProjectRoomMessageStore, PostgreSQLProjectRoomReadStateStore, PostgreSQLProjectRoomStore, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, PostgreSQLTaskWorkItemStore, type PostgreSQLTaskWorkItemStoreOptions, PostgreSQLTenantStore, type PostgreSQLTenantStoreOptions, type PostgreSQLThreadMessageQueueStoreOptions, PostgreSQLThreadStore, type PostgreSQLThreadStoreOptions, PostgreSQLUserStore, type PostgreSQLUserStoreOptions, PostgreSQLUserTenantLinkStore, type PostgreSQLUserTenantLinkStoreOptions, PostgreSQLWorkflowTrackingStore, type PostgreSQLWorkflowTrackingStoreOptions, PostgreSQLWorkspaceStore, type PostgreSQLWorkspaceStoreOptions, PostgresSharedResourceStore, type PostgresSharedResourceStoreOptions, ProjectBotMembershipIdConflictError, ProjectMembershipIdConflictError, ProjectRoomMessageIdConflictError, ThreadMessageQueueStore, addAssistantTenantId, addEnvToEvalRuns, addFileContentType, addHoldoutToEvalRuns, addInterruptColumnsToEval, addInterruptPolicyToEvalCases, addProjectConfigColumn, addScheduleTenantId, addSkillTenantId, addStepThreadId, addTaskIdToEvalRuns, addThreadTenantId, addWorkflowRunsTenantStatusUpdatedIndex, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAgentWebAppsTable, createAssistantsTable, createCapabilityBundlesTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createProjectRoomReadStates, createProjectRoomTables, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, enforceUniqueEvalProjectName, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
|
|
2217
|
+
export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, type CreateChannelIdentityMappingInput, DuplicateProjectMembershipError, DuplicateProjectRoomMessageIdempotencyKeyError, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAgentWebAppStore, type PostgreSQLAgentWebAppStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLCapabilityBundleStore, type PostgreSQLCapabilityBundleStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLCollectionStore, type PostgreSQLCollectionStoreOptions, PostgreSQLConnectionStore, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLOpenAuditStore, type PostgreSQLOpenAuditStoreOptions, PostgreSQLProjectBotMembershipStore, PostgreSQLProjectMembershipStore, PostgreSQLProjectRoomMessageStore, PostgreSQLProjectRoomReadStateStore, PostgreSQLProjectRoomStore, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, PostgreSQLTaskWorkItemStore, type PostgreSQLTaskWorkItemStoreOptions, PostgreSQLTenantStore, type PostgreSQLTenantStoreOptions, type PostgreSQLThreadMessageQueueStoreOptions, PostgreSQLThreadStore, type PostgreSQLThreadStoreOptions, PostgreSQLUserStore, type PostgreSQLUserStoreOptions, PostgreSQLUserTenantLinkStore, type PostgreSQLUserTenantLinkStoreOptions, PostgreSQLWorkflowTrackingStore, type PostgreSQLWorkflowTrackingStoreOptions, PostgreSQLWorkspaceStore, type PostgreSQLWorkspaceStoreOptions, PostgresSharedResourceStore, type PostgresSharedResourceStoreOptions, ProjectBotMembershipIdConflictError, ProjectMembershipIdConflictError, ProjectRoomMessageIdConflictError, ThreadMessageQueueStore, addAssistantTenantId, addEnvToEvalRuns, addFileContentType, addHoldoutToEvalRuns, addInterruptColumnsToEval, addInterruptPolicyToEvalCases, addMcpAppContentType, addProjectConfigColumn, addScheduleTenantId, addSkillTenantId, addStepThreadId, addTaskIdToEvalRuns, addThreadTenantId, addWorkflowRunsTenantStatusUpdatedIndex, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAgentWebAppsTable, createAssistantsTable, createCapabilityBundlesTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createProjectRoomReadStates, createProjectRoomTables, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, enforceUniqueEvalProjectName, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
|
package/dist/index.d.ts
CHANGED
|
@@ -1488,6 +1488,12 @@ declare class PostgreSQLCapabilityBundleStore implements CapabilityBundleStore {
|
|
|
1488
1488
|
update(tenantId: string, id: string, input: InternalUpdateCapabilityBundleInput): Promise<CapabilityBundle | {
|
|
1489
1489
|
status: "conflict";
|
|
1490
1490
|
} | null>;
|
|
1491
|
+
/**
|
|
1492
|
+
* Distinguishes a stale-revision CAS miss from a missing bundle.
|
|
1493
|
+
*
|
|
1494
|
+
* @returns `null` when no such bundle exists, otherwise a conflict marker.
|
|
1495
|
+
*/
|
|
1496
|
+
private resolveCasMiss;
|
|
1491
1497
|
deleteIfUnreferenced(tenantId: string, id: string): Promise<CapabilityBundleDeleteResult>;
|
|
1492
1498
|
}
|
|
1493
1499
|
|
|
@@ -2195,6 +2201,8 @@ declare const createMenuItemsTable: Migration;
|
|
|
2195
2201
|
|
|
2196
2202
|
declare const addFileContentType: Migration;
|
|
2197
2203
|
|
|
2204
|
+
declare const addMcpAppContentType: Migration;
|
|
2205
|
+
|
|
2198
2206
|
/**
|
|
2199
2207
|
* Collection table migrations
|
|
2200
2208
|
*/
|
|
@@ -2206,4 +2214,4 @@ declare const createProjectRoomTables: Migration;
|
|
|
2206
2214
|
/** Adds per-user, per-room read markers for unread counts. */
|
|
2207
2215
|
declare const createProjectRoomReadStates: Migration;
|
|
2208
2216
|
|
|
2209
|
-
export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, type CreateChannelIdentityMappingInput, DuplicateProjectMembershipError, DuplicateProjectRoomMessageIdempotencyKeyError, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAgentWebAppStore, type PostgreSQLAgentWebAppStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLCapabilityBundleStore, type PostgreSQLCapabilityBundleStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLCollectionStore, type PostgreSQLCollectionStoreOptions, PostgreSQLConnectionStore, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLOpenAuditStore, type PostgreSQLOpenAuditStoreOptions, PostgreSQLProjectBotMembershipStore, PostgreSQLProjectMembershipStore, PostgreSQLProjectRoomMessageStore, PostgreSQLProjectRoomReadStateStore, PostgreSQLProjectRoomStore, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, PostgreSQLTaskWorkItemStore, type PostgreSQLTaskWorkItemStoreOptions, PostgreSQLTenantStore, type PostgreSQLTenantStoreOptions, type PostgreSQLThreadMessageQueueStoreOptions, PostgreSQLThreadStore, type PostgreSQLThreadStoreOptions, PostgreSQLUserStore, type PostgreSQLUserStoreOptions, PostgreSQLUserTenantLinkStore, type PostgreSQLUserTenantLinkStoreOptions, PostgreSQLWorkflowTrackingStore, type PostgreSQLWorkflowTrackingStoreOptions, PostgreSQLWorkspaceStore, type PostgreSQLWorkspaceStoreOptions, PostgresSharedResourceStore, type PostgresSharedResourceStoreOptions, ProjectBotMembershipIdConflictError, ProjectMembershipIdConflictError, ProjectRoomMessageIdConflictError, ThreadMessageQueueStore, addAssistantTenantId, addEnvToEvalRuns, addFileContentType, addHoldoutToEvalRuns, addInterruptColumnsToEval, addInterruptPolicyToEvalCases, addProjectConfigColumn, addScheduleTenantId, addSkillTenantId, addStepThreadId, addTaskIdToEvalRuns, addThreadTenantId, addWorkflowRunsTenantStatusUpdatedIndex, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAgentWebAppsTable, createAssistantsTable, createCapabilityBundlesTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createProjectRoomReadStates, createProjectRoomTables, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, enforceUniqueEvalProjectName, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
|
|
2217
|
+
export { ChannelBindingStore, type ChannelBindingStoreOptions, type ChannelIdentityMapping, ChannelIdentityMappingStore, type ChannelIdentityMappingStoreOptions, type CreateChannelIdentityMappingInput, DuplicateProjectMembershipError, DuplicateProjectRoomMessageIdempotencyKeyError, MenuStore, type MenuStoreOptions, type Migration, MigrationManager, PGVectorStoreProvider, PostgreSQLA2AApiKeyStore, type PostgreSQLA2AApiKeyStoreOptions, PostgreSQLAgentWebAppStore, type PostgreSQLAgentWebAppStoreOptions, PostgreSQLAssistantStore, type PostgreSQLAssistantStoreOptions, PostgreSQLCapabilityBundleStore, type PostgreSQLCapabilityBundleStoreOptions, PostgreSQLChannelInstallationStore, type PostgreSQLChannelInstallationStoreOptions, PostgreSQLCollectionStore, type PostgreSQLCollectionStoreOptions, PostgreSQLConnectionStore, PostgreSQLDatabaseConfigStore, type PostgreSQLDatabaseConfigStoreOptions, PostgreSQLEvalStore, type PostgreSQLEvalStoreOptions, PostgreSQLMcpServerConfigStore, type PostgreSQLMcpServerConfigStoreOptions, PostgreSQLMetricsServerConfigStore, type PostgreSQLMetricsServerConfigStoreOptions, PostgreSQLOpenAuditStore, type PostgreSQLOpenAuditStoreOptions, PostgreSQLProjectBotMembershipStore, PostgreSQLProjectMembershipStore, PostgreSQLProjectRoomMessageStore, PostgreSQLProjectRoomReadStateStore, PostgreSQLProjectRoomStore, PostgreSQLProjectStore, type PostgreSQLProjectStoreOptions, PostgreSQLScheduleStorage, type PostgreSQLScheduleStorageOptions, PostgreSQLSkillStore, type PostgreSQLSkillStoreOptions, PostgreSQLTaskWorkItemStore, type PostgreSQLTaskWorkItemStoreOptions, PostgreSQLTenantStore, type PostgreSQLTenantStoreOptions, type PostgreSQLThreadMessageQueueStoreOptions, PostgreSQLThreadStore, type PostgreSQLThreadStoreOptions, PostgreSQLUserStore, type PostgreSQLUserStoreOptions, PostgreSQLUserTenantLinkStore, type PostgreSQLUserTenantLinkStoreOptions, PostgreSQLWorkflowTrackingStore, type PostgreSQLWorkflowTrackingStoreOptions, PostgreSQLWorkspaceStore, type PostgreSQLWorkspaceStoreOptions, PostgresSharedResourceStore, type PostgresSharedResourceStoreOptions, ProjectBotMembershipIdConflictError, ProjectMembershipIdConflictError, ProjectRoomMessageIdConflictError, ThreadMessageQueueStore, addAssistantTenantId, addEnvToEvalRuns, addFileContentType, addHoldoutToEvalRuns, addInterruptColumnsToEval, addInterruptPolicyToEvalCases, addMcpAppContentType, addProjectConfigColumn, addScheduleTenantId, addSkillTenantId, addStepThreadId, addTaskIdToEvalRuns, addThreadTenantId, addWorkflowRunsTenantStatusUpdatedIndex, alterChannelInstallationsTable, changeAssistantPrimaryKey, changeSkillPrimaryKey, changeThreadPrimaryKey, createA2AApiKeysTable, createAgentWebAppsTable, createAssistantsTable, createCapabilityBundlesTable, createChannelBindingsTable, createChannelIdentityMappingTables, createChannelInstallationsTable, createCollectionsTable, createDatabaseConfigsTable, createEvalCasesTable, createEvalProjectsTable, createEvalRunResultsTable, createEvalRunsTable, createEvalSuitesTable, createMcpServerConfigsTable, createMenuItemsTable, createMetricsConfigsTable, createPGVectorStoreProvider, createPgStoreConfig, createProjectRoomReadStates, createProjectRoomTables, createProjectsTable, createScheduledTasksTable, createSharedResourcesTable, createSkillsTable, createTenantsTable, createThreadMessageQueueTable, createThreadsTable, createUsersTable, createWorkflowTrackingTables, createWorkspacesTable, enforceUniqueEvalProjectName, evalMigrations, mapRowToRunStep, mapRowToWorkflowRun, safeParse };
|
package/dist/index.js
CHANGED
|
@@ -76,6 +76,7 @@ __export(index_exports, {
|
|
|
76
76
|
addHoldoutToEvalRuns: () => addHoldoutToEvalRuns,
|
|
77
77
|
addInterruptColumnsToEval: () => addInterruptColumnsToEval,
|
|
78
78
|
addInterruptPolicyToEvalCases: () => addInterruptPolicyToEvalCases,
|
|
79
|
+
addMcpAppContentType: () => addMcpAppContentType,
|
|
79
80
|
addProjectConfigColumn: () => addProjectConfigColumn,
|
|
80
81
|
addScheduleTenantId: () => addScheduleTenantId,
|
|
81
82
|
addSkillTenantId: () => addSkillTenantId,
|
|
@@ -8934,6 +8935,34 @@ var addFileContentType = {
|
|
|
8934
8935
|
}
|
|
8935
8936
|
};
|
|
8936
8937
|
|
|
8938
|
+
// src/migrations/menu_items_add_mcp_app_type.ts
|
|
8939
|
+
var addMcpAppContentType = {
|
|
8940
|
+
version: 181,
|
|
8941
|
+
name: "add_mcp_app_content_type_to_menu_items",
|
|
8942
|
+
up: async (client) => {
|
|
8943
|
+
await client.query(`
|
|
8944
|
+
ALTER TABLE lattice_menu_items
|
|
8945
|
+
DROP CONSTRAINT IF EXISTS lattice_menu_items_content_type_check
|
|
8946
|
+
`);
|
|
8947
|
+
await client.query(`
|
|
8948
|
+
ALTER TABLE lattice_menu_items
|
|
8949
|
+
ADD CONSTRAINT lattice_menu_items_content_type_check
|
|
8950
|
+
CHECK (content_type IN ('agent', 'html', 'custom', 'file', 'mcpApp'))
|
|
8951
|
+
`);
|
|
8952
|
+
},
|
|
8953
|
+
down: async (client) => {
|
|
8954
|
+
await client.query(`
|
|
8955
|
+
ALTER TABLE lattice_menu_items
|
|
8956
|
+
DROP CONSTRAINT IF EXISTS lattice_menu_items_content_type_check
|
|
8957
|
+
`);
|
|
8958
|
+
await client.query(`
|
|
8959
|
+
ALTER TABLE lattice_menu_items
|
|
8960
|
+
ADD CONSTRAINT lattice_menu_items_content_type_check
|
|
8961
|
+
CHECK (content_type IN ('agent', 'html', 'custom', 'file'))
|
|
8962
|
+
`);
|
|
8963
|
+
}
|
|
8964
|
+
};
|
|
8965
|
+
|
|
8937
8966
|
// src/stores/MenuStore.ts
|
|
8938
8967
|
var MenuStore = class {
|
|
8939
8968
|
constructor(options) {
|
|
@@ -8952,6 +8981,7 @@ var MenuStore = class {
|
|
|
8952
8981
|
this.migrationManager = new MigrationManager(this.pool);
|
|
8953
8982
|
this.migrationManager.register(createMenuItemsTable);
|
|
8954
8983
|
this.migrationManager.register(addFileContentType);
|
|
8984
|
+
this.migrationManager.register(addMcpAppContentType);
|
|
8955
8985
|
if (options.autoMigrate !== false) {
|
|
8956
8986
|
this.initialize().catch((error) => {
|
|
8957
8987
|
console.error("Failed to initialize MenuStore:", error);
|
|
@@ -10171,6 +10201,10 @@ var PostgreSQLCapabilityBundleStore = class {
|
|
|
10171
10201
|
}
|
|
10172
10202
|
async update(tenantId, id, input) {
|
|
10173
10203
|
await this.ready();
|
|
10204
|
+
const expectedUpdatedAt = input.expectedUpdatedAt;
|
|
10205
|
+
if (typeof expectedUpdatedAt !== "string" || expectedUpdatedAt.trim().length === 0) {
|
|
10206
|
+
return this.resolveCasMiss(tenantId, id);
|
|
10207
|
+
}
|
|
10174
10208
|
const fields = [];
|
|
10175
10209
|
const values = [];
|
|
10176
10210
|
const add = (field, value) => {
|
|
@@ -10185,37 +10219,46 @@ var PostgreSQLCapabilityBundleStore = class {
|
|
|
10185
10219
|
add("capabilities", JSON.stringify(input.capabilities));
|
|
10186
10220
|
}
|
|
10187
10221
|
if (fields.length === 0) {
|
|
10188
|
-
const expectedUpdatedAt2 = input.expectedUpdatedAt;
|
|
10189
10222
|
const result = await this.pool.query(
|
|
10190
10223
|
`SELECT id, tenant_id, bundle_key, name, description, capabilities, created_at, updated_at::text AS updated_at
|
|
10191
10224
|
FROM lattice_capability_bundles
|
|
10192
|
-
WHERE tenant_id = $1 AND id = $2
|
|
10193
|
-
|
|
10225
|
+
WHERE tenant_id = $1 AND id = $2 AND updated_at::text = $3`,
|
|
10226
|
+
[tenantId, id, expectedUpdatedAt]
|
|
10194
10227
|
);
|
|
10195
10228
|
if (result.rows[0]) return map(result.rows[0]);
|
|
10196
|
-
return
|
|
10229
|
+
return this.resolveCasMiss(tenantId, id);
|
|
10197
10230
|
}
|
|
10198
|
-
|
|
10199
|
-
values.
|
|
10200
|
-
if (expectedUpdatedAt !== void 0) values.push(expectedUpdatedAt);
|
|
10201
|
-
const tenantParam = values.length - (expectedUpdatedAt === void 0 ? 1 : 2);
|
|
10231
|
+
values.push(tenantId, id, expectedUpdatedAt);
|
|
10232
|
+
const tenantParam = values.length - 2;
|
|
10202
10233
|
const idParam = tenantParam + 1;
|
|
10203
|
-
const
|
|
10234
|
+
const revisionParam = values.length;
|
|
10204
10235
|
try {
|
|
10205
10236
|
const result = await this.pool.query(
|
|
10206
10237
|
`UPDATE lattice_capability_bundles
|
|
10207
|
-
|
|
10208
|
-
|
|
10238
|
+
SET ${fields.join(", ")}, updated_at = GREATEST(updated_at + interval '1 microsecond', clock_timestamp())
|
|
10239
|
+
WHERE tenant_id = $${tenantParam} AND id = $${idParam} AND updated_at::text = $${revisionParam}
|
|
10209
10240
|
RETURNING id, tenant_id, bundle_key, name, description, capabilities, created_at, updated_at::text AS updated_at`,
|
|
10210
10241
|
values
|
|
10211
10242
|
);
|
|
10212
10243
|
if (result.rows[0]) return map(result.rows[0]);
|
|
10213
|
-
return
|
|
10244
|
+
return this.resolveCasMiss(tenantId, id);
|
|
10214
10245
|
} catch (error) {
|
|
10215
10246
|
if (isDuplicate(error)) throw new Error(duplicateMessage);
|
|
10216
10247
|
throw error;
|
|
10217
10248
|
}
|
|
10218
10249
|
}
|
|
10250
|
+
/**
|
|
10251
|
+
* Distinguishes a stale-revision CAS miss from a missing bundle.
|
|
10252
|
+
*
|
|
10253
|
+
* @returns `null` when no such bundle exists, otherwise a conflict marker.
|
|
10254
|
+
*/
|
|
10255
|
+
async resolveCasMiss(tenantId, id) {
|
|
10256
|
+
const result = await this.pool.query(
|
|
10257
|
+
"SELECT id FROM lattice_capability_bundles WHERE tenant_id = $1 AND id = $2",
|
|
10258
|
+
[tenantId, id]
|
|
10259
|
+
);
|
|
10260
|
+
return result.rows[0] ? { status: "conflict" } : null;
|
|
10261
|
+
}
|
|
10219
10262
|
async deleteIfUnreferenced(tenantId, id) {
|
|
10220
10263
|
await this.ready();
|
|
10221
10264
|
const client = await this.pool.connect();
|
|
@@ -11045,6 +11088,7 @@ async function createPgStoreConfig(connectionString) {
|
|
|
11045
11088
|
mm.register(createMenuItemsTable);
|
|
11046
11089
|
mm.register(createSharedResourcesTable);
|
|
11047
11090
|
mm.register(addFileContentType);
|
|
11091
|
+
mm.register(addMcpAppContentType);
|
|
11048
11092
|
mm.register(createCollectionsTable);
|
|
11049
11093
|
mm.register(createTaskWorkItemsMigration);
|
|
11050
11094
|
mm.register(addWorkItemProjectFieldsMigration);
|
|
@@ -11706,6 +11750,7 @@ function mapRowToChannelIdentityMapping(row) {
|
|
|
11706
11750
|
addHoldoutToEvalRuns,
|
|
11707
11751
|
addInterruptColumnsToEval,
|
|
11708
11752
|
addInterruptPolicyToEvalCases,
|
|
11753
|
+
addMcpAppContentType,
|
|
11709
11754
|
addProjectConfigColumn,
|
|
11710
11755
|
addScheduleTenantId,
|
|
11711
11756
|
addSkillTenantId,
|