@axiom-lattice/gateway 2.1.87 → 2.1.88

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/gateway@2.1.87 build /home/runner/work/agentic/agentic/packages/gateway
2
+ > @axiom-lattice/gateway@2.1.88 build /home/runner/work/agentic/agentic/packages/gateway
3
3
  > tsup src/index.ts --format cjs,esm --dts --clean --sourcemap
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -11,22 +11,22 @@
11
11
  ESM Build start
12
12
  [warn] ▲ [WARNING] "import.meta" is not available with the "cjs" output format and will be empty [empty-import-meta]
13
13
 
14
- src/index.ts:178:33:
15
-  178 │ const __filename = fileURLToPath(import.meta.url);
14
+ src/index.ts:175:33:
15
+  175 │ const __filename = fileURLToPath(import.meta.url);
16
16
  ╵ ~~~~~~~~~~~
17
17
 
18
18
  You need to set the output format to "esm" for "import.meta" to work correctly.
19
19
 
20
20
 
21
- CJS dist/index.js 242.46 KB
22
- CJS dist/index.js.map 507.89 KB
23
- CJS ⚡️ Build success in 387ms
24
- ESM dist/index.mjs 237.76 KB
21
+ ESM dist/index.mjs 237.01 KB
25
22
  ESM dist/sender-PX32VSHB.mjs 873.00 B
23
+ ESM dist/index.mjs.map 504.85 KB
26
24
  ESM dist/sender-PX32VSHB.mjs.map 2.07 KB
27
- ESM dist/index.mjs.map 506.38 KB
28
- ESM ⚡️ Build success in 391ms
25
+ ESM ⚡️ Build success in 417ms
26
+ CJS dist/index.js 241.90 KB
27
+ CJS dist/index.js.map 506.42 KB
28
+ CJS ⚡️ Build success in 418ms
29
29
  DTS Build start
30
- DTS ⚡️ Build success in 13983ms
30
+ DTS ⚡️ Build success in 13918ms
31
31
  DTS dist/index.d.ts 5.01 KB
32
32
  DTS dist/index.d.mts 5.01 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @axiom-lattice/gateway
2
2
 
3
+ ## 2.1.88
4
+
5
+ ### Patch Changes
6
+
7
+ - 6ff5bd5: fix issue
8
+ - Updated dependencies [6ff5bd5]
9
+ - @axiom-lattice/agent-eval@2.1.70
10
+ - @axiom-lattice/core@2.1.76
11
+ - @axiom-lattice/pg-stores@1.0.67
12
+ - @axiom-lattice/protocols@2.1.39
13
+ - @axiom-lattice/queue-redis@1.0.38
14
+
3
15
  ## 2.1.87
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -1,125 +1,68 @@
1
- # Lattice Gateway
1
+ # @axiom-lattice/gateway
2
2
 
3
- 这是 Lattice 项目的 API 网关服务,提供了基于 Fastify HTTP API 接口,用于与 Lattice Core 交互。
3
+ Fastify-based HTTP API gateway exposing REST endpoints for agent execution, thread management, and configuration.
4
4
 
5
- ## 功能特点
5
+ ## Store Consumption
6
6
 
7
- - 基于 Fastify HTTP API
8
- - 代理调用服务
9
- - 流式响应支持
10
- - 事件总线
11
- - 队列服务(基于 QueueLattice)
12
- - 日志服务(基于 LoggerLattice,支持自定义配置)
7
+ The gateway reads all stores from `StoreLatticeManager` at startup — no manual wiring needed.
8
+ Register stores via `configureStores` **before** calling `startAsHttpEndpoint()`:
13
9
 
14
- ## 安装
15
-
16
- ```bash
17
- pnpm install
18
- ```
19
-
20
- ## 启动服务
21
-
22
- ```bash
23
- # 开发环境
24
- pnpm dev
25
-
26
- # 生产环境
27
- pnpm build
28
- pnpm start
29
- ```
30
-
31
- ## API 接口
32
-
33
- ### Configuration API
34
-
35
- The gateway supports dynamic configuration updates via JSON. You can update environment variables at runtime without restarting the server.
10
+ ```typescript
11
+ import { configureStores } from "@axiom-lattice/core";
12
+ import { createPgStoreConfig } from "@axiom-lattice/pg-stores";
13
+ import { LatticeGateway } from "@axiom-lattice/gateway";
36
14
 
37
- #### Get Configuration
15
+ const stores = createPgStoreConfig(process.env.DATABASE_URL);
16
+ await configureStores({ ...stores });
38
17
 
39
- ```bash
40
- GET /api/config
18
+ // Gateway picks up stores from StoreLatticeManager automatically
19
+ LatticeGateway.startAsHttpEndpoint({ port: 4001 });
41
20
  ```
42
21
 
43
- Returns the current configuration (sensitive values are masked).
22
+ ### How it works
44
23
 
45
- #### Update Configuration
24
+ The gateway internally calls `getStoreLattice("default", type)` for each store it needs:
46
25
 
47
- ```bash
48
- PUT /api/config
49
- Content-Type: application/json
26
+ - **`channelBinding`** — used by `MessageRouter` for sender-to-agent binding resolution
27
+ - **`channelInstallation`** — used for channel instance lookup
28
+ - **`database`** — `SqlDatabaseManager` reads configs lazily on first query
29
+ - **`metrics`** — `MetricsServerManager` loads configs on first access
30
+ - **All other stores** — consumed by controllers via `getStoreLattice("default", type)`
50
31
 
51
- {
52
- "config": {
53
- "port": 4001,
54
- "queueServiceType": "redis",
55
- "redisUrl": "redis://localhost:6379",
56
- "redisPassword": "your-password",
57
- "queueName": "tasks"
58
- }
59
- }
60
- ```
61
-
62
- **Note**: When updating `queueServiceType`, the queue service will be automatically reconfigured.
32
+ No `setConfigStore()` or `loadConfigsFromStore()` calls needed — each manager reads directly from `StoreLatticeManager`.
63
33
 
64
- **Example**:
34
+ ## Quick Start
65
35
 
66
36
  ```typescript
67
- // Update configuration from frontend
68
- const response = await fetch("http://localhost:4001/api/config", {
69
- method: "PUT",
70
- headers: {
71
- "Content-Type": "application/json",
72
- },
73
- body: JSON.stringify({
74
- config: {
75
- queueServiceType: "redis",
76
- redisUrl: "redis://localhost:6379",
77
- redisPassword: "your-password",
78
- },
79
- }),
80
- });
37
+ import { LatticeGateway } from "@axiom-lattice/gateway";
81
38
 
82
- const result = await response.json();
83
- console.log(result); // { success: true, message: "Configuration updated successfully", data: {...} }
39
+ LatticeGateway.startAsHttpEndpoint({
40
+ port: 4001,
41
+ queueServiceConfig: { type: "memory", defaultStartPollingQueue: true },
42
+ });
84
43
  ```
85
44
 
86
- ### 代理调用
87
-
88
- - `POST /api/v1/run`: 运行代理
89
- - `POST /api/v1/run/stream`: 流式运行代理
90
- - `GET /api/v1/run/:thread_id`: 获取运行状态
91
- - `GET /api/v1/run/:thread_id/messages`: 获取消息历史
92
-
93
- ## Logger 配置
94
-
95
- Gateway 使用 Logger Lattice 进行日志管理,支持自定义日志配置。详细说明请参考 [LOGGER_CONFIG.md](./LOGGER_CONFIG.md)。
96
-
97
- ### 快速开始
45
+ ## Logger Configuration
98
46
 
99
47
  ```typescript
100
48
  import { LatticeGateway } from "@axiom-lattice/gateway";
101
49
  import { LoggerType } from "@axiom-lattice/protocols";
102
50
 
103
- // 使用默认配置
104
- LatticeGateway.startAsHttpEndpoint({
105
- port: 4001,
106
- });
107
-
108
- // 自定义日志配置
109
51
  LatticeGateway.startAsHttpEndpoint({
110
52
  port: 4001,
111
53
  loggerConfig: {
112
- file: "./logs/my-app/gateway",
54
+ name: "default",
55
+ type: LoggerType.PINO,
113
56
  serviceName: "my-service",
114
57
  },
115
58
  });
116
59
  ```
117
60
 
118
- ## 目录结构
61
+ ## API Endpoints
119
62
 
120
- - `src/config/`: 配置文件
121
- - `src/controllers/`: 控制器
122
- - `src/routes/`: 路由定义
123
- - `src/services/`: 服务实现
124
- - `src/types/`: 类型定义
125
- - `LOGGER_CONFIG.md`: Logger 配置详细文档
63
+ - `POST /api/v1/run` — Execute agent
64
+ - `POST /api/v1/run/stream` — Stream agent execution
65
+ - `GET /api/v1/run/:thread_id` — Get run status
66
+ - `GET /api/v1/run/:thread_id/messages` — Get message history
67
+ - `GET /api/config` — Get gateway configuration
68
+ - `PUT /api/config` — Update gateway configuration
package/dist/index.js CHANGED
@@ -1715,7 +1715,7 @@ async function executeDataQuery(request, reply) {
1715
1715
  message: `Metrics server not registered: ${body.serverKey}. Please register the server first.`
1716
1716
  };
1717
1717
  }
1718
- const client = import_core12.metricsServerManager.getClient(tenantId, body.serverKey);
1718
+ const client = await import_core12.metricsServerManager.getClient(tenantId, body.serverKey);
1719
1719
  if (isSemanticQuery) {
1720
1720
  return await executeSemanticQuery(client, body, reply);
1721
1721
  } else {
@@ -3915,7 +3915,7 @@ async function testMetricsServerConnection(request, reply) {
3915
3915
  const testKey = `__test_${key}_${Date.now()}`;
3916
3916
  import_core21.metricsServerManager.registerServer(tenantId, testKey, config.config);
3917
3917
  try {
3918
- const client = import_core21.metricsServerManager.getClient(tenantId, testKey);
3918
+ const client = await import_core21.metricsServerManager.getClient(tenantId, testKey);
3919
3919
  const result = await client.testConnection();
3920
3920
  import_core21.metricsServerManager.removeServer(tenantId, testKey);
3921
3921
  return {
@@ -3966,7 +3966,7 @@ async function listAvailableMetrics(request, reply) {
3966
3966
  if (!import_core21.metricsServerManager.hasServer(tenantId, key)) {
3967
3967
  import_core21.metricsServerManager.registerServer(tenantId, key, config.config);
3968
3968
  }
3969
- const client = import_core21.metricsServerManager.getClient(tenantId, key);
3969
+ const client = await import_core21.metricsServerManager.getClient(tenantId, key);
3970
3970
  const metrics = await client.listMetrics();
3971
3971
  return {
3972
3972
  success: true,
@@ -4012,7 +4012,7 @@ async function queryMetricsData(request, reply) {
4012
4012
  if (!import_core21.metricsServerManager.hasServer(tenantId, key)) {
4013
4013
  import_core21.metricsServerManager.registerServer(tenantId, key, config.config);
4014
4014
  }
4015
- const client = import_core21.metricsServerManager.getClient(tenantId, key);
4015
+ const client = await import_core21.metricsServerManager.getClient(tenantId, key);
4016
4016
  const result = await client.queryMetricData(metricName, {
4017
4017
  startTime,
4018
4018
  endTime,
@@ -6354,19 +6354,8 @@ function registerChannelInstallationRoutes(app2) {
6354
6354
  app2.delete("/api/channel-installations/:installationId", deleteChannelInstallation);
6355
6355
  }
6356
6356
 
6357
- // src/bindings/index.ts
6358
- var registryInstance = null;
6359
- function setBindingRegistry(registry) {
6360
- registryInstance = registry;
6361
- }
6362
- function getBindingRegistry() {
6363
- if (!registryInstance) {
6364
- throw new Error("BindingRegistry not initialized. Call setBindingRegistry() first.");
6365
- }
6366
- return registryInstance;
6367
- }
6368
-
6369
6357
  // src/controllers/channel-bindings.ts
6358
+ var import_core28 = require("@axiom-lattice/core");
6370
6359
  function getTenantId12(request) {
6371
6360
  const userTenantId = request.user?.tenantId;
6372
6361
  if (userTenantId) return userTenantId;
@@ -6376,7 +6365,7 @@ async function getBindingList(request, _reply) {
6376
6365
  const tenantId = getTenantId12(request);
6377
6366
  const { channel, agentId, channelInstallationId, limit, offset } = request.query;
6378
6367
  try {
6379
- const registry = getBindingRegistry();
6368
+ const registry = (0, import_core28.getBindingRegistry)();
6380
6369
  const bindings = await registry.list({ channel, agentId, tenantId, channelInstallationId, limit, offset });
6381
6370
  return { success: true, message: "Bindings retrieved", data: { records: bindings, total: bindings.length } };
6382
6371
  } catch (error) {
@@ -6387,7 +6376,7 @@ async function getBindingList(request, _reply) {
6387
6376
  async function getBinding(request, reply) {
6388
6377
  const tenantId = getTenantId12(request);
6389
6378
  try {
6390
- const registry = getBindingRegistry();
6379
+ const registry = (0, import_core28.getBindingRegistry)();
6391
6380
  const bindings = await registry.list({ tenantId });
6392
6381
  const binding = bindings.find((b) => b.id === request.params.id);
6393
6382
  if (!binding || binding.tenantId !== tenantId) {
@@ -6403,7 +6392,7 @@ async function getBinding(request, reply) {
6403
6392
  async function createBinding(request, reply) {
6404
6393
  const tenantId = getTenantId12(request);
6405
6394
  try {
6406
- const registry = getBindingRegistry();
6395
+ const registry = (0, import_core28.getBindingRegistry)();
6407
6396
  const binding = await registry.create({ ...request.body, tenantId });
6408
6397
  reply.status(201);
6409
6398
  return { success: true, message: "Binding created", data: binding };
@@ -6416,7 +6405,7 @@ async function createBinding(request, reply) {
6416
6405
  async function updateBinding(request, reply) {
6417
6406
  try {
6418
6407
  const tenantId = getTenantId12(request);
6419
- const registry = getBindingRegistry();
6408
+ const registry = (0, import_core28.getBindingRegistry)();
6420
6409
  const bindings = await registry.list({ tenantId });
6421
6410
  const existing = bindings.find((b) => b.id === request.params.id);
6422
6411
  if (!existing || existing.tenantId !== tenantId) {
@@ -6434,7 +6423,7 @@ async function updateBinding(request, reply) {
6434
6423
  async function deleteBinding(request, reply) {
6435
6424
  try {
6436
6425
  const tenantId = getTenantId12(request);
6437
- const registry = getBindingRegistry();
6426
+ const registry = (0, import_core28.getBindingRegistry)();
6438
6427
  const bindings = await registry.list({ tenantId });
6439
6428
  const existing = bindings.find((b) => b.id === request.params.id);
6440
6429
  if (!existing || existing.tenantId !== tenantId) {
@@ -6453,7 +6442,7 @@ async function resolveBinding(request, _reply) {
6453
6442
  const tenantId = getTenantId12(request);
6454
6443
  const { channel, senderId, channelInstallationId } = request.query;
6455
6444
  try {
6456
- const registry = getBindingRegistry();
6445
+ const registry = (0, import_core28.getBindingRegistry)();
6457
6446
  const binding = await registry.resolve({ channel, senderId, channelInstallationId, tenantId });
6458
6447
  if (!binding) {
6459
6448
  return { success: false, message: "No binding found", data: null };
@@ -6690,7 +6679,7 @@ var registerLatticeRoutes = (app2, channelDeps) => {
6690
6679
  };
6691
6680
 
6692
6681
  // src/router/MessageRouter.ts
6693
- var import_core28 = require("@axiom-lattice/core");
6682
+ var import_core29 = require("@axiom-lattice/core");
6694
6683
  var import_crypto8 = require("crypto");
6695
6684
  var BindingNotFoundError = class extends Error {
6696
6685
  constructor(message) {
@@ -6806,7 +6795,7 @@ var MessageRouter = class {
6806
6795
  }
6807
6796
  let threadId = ctx.binding.threadMode === "per_conversation" ? void 0 : ctx.binding.threadId;
6808
6797
  if (!threadId) {
6809
- const threadStore = (0, import_core28.getStoreLattice)("default", "thread").store;
6798
+ const threadStore = (0, import_core29.getStoreLattice)("default", "thread").store;
6810
6799
  const newThreadId = (0, import_crypto8.randomUUID)();
6811
6800
  console.log({
6812
6801
  event: "dispatch:thread:create",
@@ -6847,7 +6836,7 @@ var MessageRouter = class {
6847
6836
  senderId: message.sender.id,
6848
6837
  contentLength: message.content.text.length
6849
6838
  }, "Dispatching to agent");
6850
- const agent = import_core28.agentInstanceManager.getAgent({
6839
+ const agent = import_core29.agentInstanceManager.getAgent({
6851
6840
  tenant_id: tenantId,
6852
6841
  assistant_id: ctx.binding.agentId,
6853
6842
  thread_id: threadId,
@@ -7027,7 +7016,7 @@ function createAuditLoggerMiddleware() {
7027
7016
  }
7028
7017
 
7029
7018
  // src/index.ts
7030
- var import_core30 = require("@axiom-lattice/core");
7019
+ var import_core31 = require("@axiom-lattice/core");
7031
7020
 
7032
7021
  // src/swagger.ts
7033
7022
  var import_swagger = __toESM(require("@fastify/swagger"));
@@ -7092,7 +7081,7 @@ var configureSwagger = async (app2, customSwaggerConfig, customSwaggerUiConfig)
7092
7081
  };
7093
7082
 
7094
7083
  // src/services/agent_task_consumer.ts
7095
- var import_core29 = require("@axiom-lattice/core");
7084
+ var import_core30 = require("@axiom-lattice/core");
7096
7085
  var handleAgentTask = async (taskRequest, retryCount = 0) => {
7097
7086
  const {
7098
7087
  assistant_id,
@@ -7110,18 +7099,18 @@ var handleAgentTask = async (taskRequest, retryCount = 0) => {
7110
7099
  console.log(
7111
7100
  `\u5F00\u59CB\u5904\u7406\u4EFB\u52A1 [assistant_id: ${assistant_id}, thread_id: ${thread_id}]`
7112
7101
  );
7113
- const agent = import_core29.agentInstanceManager.getAgent({ assistant_id, thread_id, tenant_id, workspace_id: runConfig?.workspaceId, project_id: runConfig?.projectId, custom_run_config: runConfig });
7114
- await agent.addMessage({ input, command, custom_run_config: runConfig }, import_core29.QueueMode.STEER);
7102
+ const agent = import_core30.agentInstanceManager.getAgent({ assistant_id, thread_id, tenant_id, workspace_id: runConfig?.workspaceId, project_id: runConfig?.projectId, custom_run_config: runConfig });
7103
+ await agent.addMessage({ input, command, custom_run_config: runConfig }, import_core30.QueueMode.STEER);
7115
7104
  if (callback_event) {
7116
7105
  agent.subscribeOnce("message:completed", (evt) => {
7117
- import_core29.eventBus.publish(callback_event, {
7106
+ import_core30.eventBus.publish(callback_event, {
7118
7107
  success: true,
7119
7108
  state: evt.state,
7120
7109
  config: { assistant_id, thread_id, tenant_id }
7121
7110
  });
7122
7111
  if (main_thread_id && main_tenant_id) {
7123
7112
  try {
7124
- const mainAgent = import_core29.agentInstanceManager.getAgent({
7113
+ const mainAgent = import_core30.agentInstanceManager.getAgent({
7125
7114
  assistant_id: main_assistant_id ?? assistant_id,
7126
7115
  thread_id: main_thread_id,
7127
7116
  tenant_id: main_tenant_id
@@ -7149,7 +7138,7 @@ ${summary}`
7149
7138
  }
7150
7139
  });
7151
7140
  agent.subscribeOnce("message:interrupted", (evt) => {
7152
- import_core29.eventBus.publish(callback_event, {
7141
+ import_core30.eventBus.publish(callback_event, {
7153
7142
  success: true,
7154
7143
  state: evt.state,
7155
7144
  config: { assistant_id, thread_id, tenant_id }
@@ -7173,7 +7162,7 @@ ${summary}`
7173
7162
  return handleAgentTask(taskRequest, nextRetryCount);
7174
7163
  }
7175
7164
  if (callback_event) {
7176
- import_core29.eventBus.publish(callback_event, {
7165
+ import_core30.eventBus.publish(callback_event, {
7177
7166
  success: false,
7178
7167
  error: error instanceof Error ? error.message : String(error),
7179
7168
  config: { assistant_id, thread_id, tenant_id }
@@ -7211,7 +7200,7 @@ var _AgentTaskConsumer = class _AgentTaskConsumer {
7211
7200
  * 初始化事件监听和队列轮询
7212
7201
  */
7213
7202
  initialize() {
7214
- import_core29.eventBus.subscribe(import_core29.AGENT_TASK_EVENT, this.trigger_agent_task.bind(this));
7203
+ import_core30.eventBus.subscribe(import_core30.AGENT_TASK_EVENT, this.trigger_agent_task.bind(this));
7215
7204
  this.startPollingQueue();
7216
7205
  console.log("Agent\u4EFB\u52A1\u6D88\u8D39\u8005\u5DF2\u542F\u52A8\u5E76\u76D1\u542C\u4EFB\u52A1\u4E8B\u4EF6\u548C\u961F\u5217");
7217
7206
  }
@@ -7330,7 +7319,7 @@ var _AgentTaskConsumer = class _AgentTaskConsumer {
7330
7319
  handleAgentTask(taskRequest).catch((error) => {
7331
7320
  console.error("\u5904\u7406Agent\u4EFB\u52A1\u65F6\u53D1\u751F\u672A\u6355\u83B7\u7684\u9519\u8BEF:", error);
7332
7321
  if (taskRequest.callback_event) {
7333
- import_core29.eventBus.publish(taskRequest.callback_event, {
7322
+ import_core30.eventBus.publish(taskRequest.callback_event, {
7334
7323
  success: false,
7335
7324
  error: error instanceof Error ? error.message : String(error),
7336
7325
  config: {
@@ -7350,7 +7339,7 @@ _AgentTaskConsumer.agent_run_endpoint = "http://localhost:4001/api/runs";
7350
7339
  var AgentTaskConsumer = _AgentTaskConsumer;
7351
7340
 
7352
7341
  // src/index.ts
7353
- var import_core31 = require("@axiom-lattice/core");
7342
+ var import_core32 = require("@axiom-lattice/core");
7354
7343
  var import_protocols4 = require("@axiom-lattice/protocols");
7355
7344
  var import_meta = {};
7356
7345
  process.on("unhandledRejection", (reason, promise) => {
@@ -7366,11 +7355,11 @@ var DEFAULT_LOGGER_CONFIG = {
7366
7355
  var loggerLattice = initializeLogger(DEFAULT_LOGGER_CONFIG);
7367
7356
  var logger3 = loggerLattice.client;
7368
7357
  function initializeLogger(config) {
7369
- if (import_core31.loggerLatticeManager.hasLattice("default")) {
7370
- import_core31.loggerLatticeManager.removeLattice("default");
7358
+ if (import_core32.loggerLatticeManager.hasLattice("default")) {
7359
+ import_core32.loggerLatticeManager.removeLattice("default");
7371
7360
  }
7372
- (0, import_core31.registerLoggerLattice)("default", config);
7373
- return (0, import_core31.getLoggerLattice)("default");
7361
+ (0, import_core32.registerLoggerLattice)("default", config);
7362
+ return (0, import_core32.getLoggerLattice)("default");
7374
7363
  }
7375
7364
  var app = (0, import_fastify.default)({
7376
7365
  logger: false,
@@ -7473,7 +7462,7 @@ app.setErrorHandler((error, request, reply) => {
7473
7462
  });
7474
7463
  function getConfiguredSandboxProvider() {
7475
7464
  const sandboxProviderType = process.env.SANDBOX_PROVIDER_TYPE || "microsandbox-remote";
7476
- return (0, import_core31.createSandboxProvider)({
7465
+ return (0, import_core32.createSandboxProvider)({
7477
7466
  type: sandboxProviderType,
7478
7467
  remoteBaseURL: process.env.SANDBOX_BASE_URL,
7479
7468
  microsandboxServiceBaseURL: process.env.MICROSANDBOX_SERVICE_BASE_URL,
@@ -7505,8 +7494,7 @@ var start = async (config) => {
7505
7494
  const { getStoreLattice: getStoreLattice16 } = await import("@axiom-lattice/core");
7506
7495
  const bindingStore = getStoreLattice16("default", "channelBinding").store;
7507
7496
  const installationStore = getStoreLattice16("default", "channelInstallation").store;
7508
- setBindingRegistry(bindingStore);
7509
- (0, import_core30.setBindingRegistry)(bindingStore);
7497
+ (0, import_core31.setBindingRegistry)(bindingStore);
7510
7498
  const adapterRegistry = new ChannelAdapterRegistry();
7511
7499
  adapterRegistry.register(larkChannelAdapter);
7512
7500
  const router = new MessageRouter({
@@ -7523,16 +7511,8 @@ var start = async (config) => {
7523
7511
  } catch {
7524
7512
  }
7525
7513
  registerLatticeRoutes(app, channelDeps);
7526
- try {
7527
- const storeLattice = (0, import_core31.getStoreLattice)("default", "database");
7528
- const store = storeLattice.store;
7529
- import_core31.sqlDatabaseManager.setConfigStore(store);
7530
- logger3.info("Database config store set for SqlDatabaseManager");
7531
- } catch (error) {
7532
- logger3.warn("Failed to set database config store: " + (error instanceof Error ? error.message : String(error)));
7533
- }
7534
- if (!import_core31.sandboxLatticeManager.hasLattice("default")) {
7535
- import_core31.sandboxLatticeManager.registerLattice("default", getConfiguredSandboxProvider());
7514
+ if (!import_core32.sandboxLatticeManager.hasLattice("default")) {
7515
+ import_core32.sandboxLatticeManager.registerLattice("default", getConfiguredSandboxProvider());
7536
7516
  logger3.info("Registered sandbox manager from env configuration");
7537
7517
  }
7538
7518
  const target_port = config?.port || Number(process.env.PORT) || 4001;
@@ -7553,7 +7533,7 @@ var start = async (config) => {
7553
7533
  }
7554
7534
  try {
7555
7535
  logger3.info("Starting agent instance recovery...");
7556
- const restoreStats = await import_core31.agentInstanceManager.restore();
7536
+ const restoreStats = await import_core32.agentInstanceManager.restore();
7557
7537
  logger3.info(`Agent recovery complete: ${restoreStats.restored} threads restored, ${restoreStats.errors} errors`);
7558
7538
  } catch (error) {
7559
7539
  logger3.error("Agent recovery failed", { error });