@axiom-lattice/gateway 2.1.70 → 2.1.71

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axiom-lattice/gateway",
3
- "version": "2.1.70",
3
+ "version": "2.1.71",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
@@ -428,9 +428,16 @@ export async function replyInboxTask(
428
428
  tenant_id: tenantId,
429
429
  });
430
430
 
431
- // 3. 提交 resume 请求并确认没有报错
432
- // addMessage 会触发 streaming 执行,但不会等待完整 workflow 完成
431
+ // 3. 提交 resume 请求并强制启动执行
432
+ // 注意:interrupted 状态下 processing message 会阻止自动启动,需要先重置
433
433
  try {
434
+ // 先重置被中断的 processing message,使其可以被重新处理
435
+ const queueStore = (agent as any).getQueueStore?.() || (agent as any).queueStore;
436
+ if (queueStore?.resetProcessingToPending) {
437
+ await queueStore.resetProcessingToPending(run.threadId);
438
+ }
439
+
440
+ // 添加 resume 消息到队列
434
441
  await agent.addMessage({
435
442
  input: { message: "Clarification answers submitted" },
436
443
  command: {
@@ -441,8 +448,10 @@ export async function replyInboxTask(
441
448
  },
442
449
  },
443
450
  });
451
+
452
+ // 强制启动 queue processor
453
+ await agent.startQueueProcessorIfNeeded();
444
454
  } catch (error) {
445
- // resume 提交失败(如 thread 不在 interrupted 状态)
446
455
  return reply.status(400).send({
447
456
  success: false,
448
457
  message: "Failed to resume workflow",