@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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +6 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/controllers/workflow-tracking.ts +12 -3
package/package.json
CHANGED
|
@@ -428,9 +428,16 @@ export async function replyInboxTask(
|
|
|
428
428
|
tenant_id: tenantId,
|
|
429
429
|
});
|
|
430
430
|
|
|
431
|
-
// 3. 提交 resume
|
|
432
|
-
//
|
|
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",
|