@axiom-lattice/gateway 2.1.48 → 2.1.49
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 +9 -0
- package/dist/index.js +14 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/controllers/run.ts +0 -2
- package/src/index.ts +11 -0
- package/src/services/agent_task_consumer.ts +9 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @axiom-lattice/gateway@2.1.
|
|
2
|
+
> @axiom-lattice/gateway@2.1.49 build /home/runner/work/agentic/agentic/packages/gateway
|
|
3
3
|
> tsup src/index.ts --format cjs,esm --dts --clean --sourcemap
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
[34mCLI[39m Cleaning output folder
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
11
|
[34mESM[39m Build start
|
|
12
|
-
[32mCJS[39m [1mdist/index.js [22m[32m168.
|
|
13
|
-
[32mCJS[39m [1mdist/index.js.map [22m[
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in
|
|
15
|
-
[32mESM[39m [1mdist/index.mjs [22m[32m165.
|
|
16
|
-
[32mESM[39m [1mdist/index.mjs.map [22m[
|
|
17
|
-
[32mESM[39m ⚡️ Build success in
|
|
12
|
+
[32mCJS[39m [1mdist/index.js [22m[32m168.91 KB[39m
|
|
13
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m360.31 KB[39m
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 308ms
|
|
15
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m165.46 KB[39m
|
|
16
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m360.78 KB[39m
|
|
17
|
+
[32mESM[39m ⚡️ Build success in 308ms
|
|
18
18
|
[34mDTS[39m Build start
|
|
19
|
-
[32mDTS[39m ⚡️ Build success in
|
|
19
|
+
[32mDTS[39m ⚡️ Build success in 9402ms
|
|
20
20
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m3.76 KB[39m
|
|
21
21
|
[32mDTS[39m [1mdist/index.d.mts [22m[32m3.76 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -349,7 +349,6 @@ var resumeStream = async (request, reply) => {
|
|
|
349
349
|
workspace_id,
|
|
350
350
|
project_id
|
|
351
351
|
});
|
|
352
|
-
console.log("[UI]message_id", message_id);
|
|
353
352
|
const stream = agent.chunkStream(message_id, [import_protocols.MessageChunkTypes.THREAD_IDLE]);
|
|
354
353
|
for await (const chunk of stream) {
|
|
355
354
|
reply.raw.write(`data: ${JSON.stringify(chunk)}
|
|
@@ -4951,8 +4950,6 @@ var handleAgentTask = async (taskRequest, retryCount = 0) => {
|
|
|
4951
4950
|
console.log(
|
|
4952
4951
|
`\u5F00\u59CB\u5904\u7406\u4EFB\u52A1 [assistant_id: ${assistant_id}, thread_id: ${thread_id}]`
|
|
4953
4952
|
);
|
|
4954
|
-
const apiUrl = AgentTaskConsumer.agent_run_endpoint;
|
|
4955
|
-
console.log(`apiUrl: ${apiUrl}`);
|
|
4956
4953
|
const agent = import_core25.agentInstanceManager.getAgent({ assistant_id, thread_id, tenant_id, workspace_id: runConfig?.workspaceId, project_id: runConfig?.projectId, custom_run_config: runConfig });
|
|
4957
4954
|
await agent.addMessage({ input, command }, import_core25.QueueMode.STEER);
|
|
4958
4955
|
if (callback_event) {
|
|
@@ -4963,6 +4960,13 @@ var handleAgentTask = async (taskRequest, retryCount = 0) => {
|
|
|
4963
4960
|
config: { assistant_id, thread_id, tenant_id }
|
|
4964
4961
|
});
|
|
4965
4962
|
});
|
|
4963
|
+
agent.subscribeOnce("message:interrupted", (evt) => {
|
|
4964
|
+
import_core25.eventBus.publish(callback_event, {
|
|
4965
|
+
success: true,
|
|
4966
|
+
state: evt.state,
|
|
4967
|
+
config: { assistant_id, thread_id, tenant_id }
|
|
4968
|
+
});
|
|
4969
|
+
});
|
|
4966
4970
|
}
|
|
4967
4971
|
return true;
|
|
4968
4972
|
} catch (error) {
|
|
@@ -5307,6 +5311,13 @@ var start = async (config) => {
|
|
|
5307
5311
|
agentTaskConsumer.startPollingQueue();
|
|
5308
5312
|
}
|
|
5309
5313
|
}
|
|
5314
|
+
try {
|
|
5315
|
+
logger.info("Starting agent instance recovery...");
|
|
5316
|
+
const restoreStats = await import_core26.agentInstanceManager.restore();
|
|
5317
|
+
logger.info(`Agent recovery complete: ${restoreStats.restored} threads restored, ${restoreStats.errors} errors`);
|
|
5318
|
+
} catch (error) {
|
|
5319
|
+
logger.error("Agent recovery failed", { error });
|
|
5320
|
+
}
|
|
5310
5321
|
} catch (err) {
|
|
5311
5322
|
logger.error("Server start failed", { error: err });
|
|
5312
5323
|
process.exit(1);
|