@axiom-lattice/gateway 2.1.32 → 2.1.34
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 +15 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +19 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/controllers/run.ts +3 -0
- package/src/services/agent_service.ts +12 -4
- package/src/services/agent_task_consumer.ts +3 -0
- package/src/types/index.ts +1 -0
package/dist/index.mjs
CHANGED
|
@@ -69,7 +69,8 @@ async function agent_invoke({
|
|
|
69
69
|
workspace_id,
|
|
70
70
|
project_id,
|
|
71
71
|
command,
|
|
72
|
-
run_id
|
|
72
|
+
run_id,
|
|
73
|
+
custom_run_config
|
|
73
74
|
}) {
|
|
74
75
|
const agentLattice = getAgentLattice(assistant_id);
|
|
75
76
|
const runnable_agent = agentLattice?.client;
|
|
@@ -89,9 +90,10 @@ async function agent_invoke({
|
|
|
89
90
|
global.__DATABASE_CONFIGS__ = databaseConfigs;
|
|
90
91
|
const runConfig = {
|
|
91
92
|
...agentLattice?.config?.runConfig || {},
|
|
92
|
-
assistant_id,
|
|
93
93
|
workspaceId: workspace_id,
|
|
94
|
-
projectId: project_id
|
|
94
|
+
projectId: project_id,
|
|
95
|
+
...custom_run_config || {},
|
|
96
|
+
assistant_id
|
|
95
97
|
};
|
|
96
98
|
const result = await runnable_agent.invoke(
|
|
97
99
|
command ? new Command(command) : { ...rest, messages, "x-tenant-id": tenant_id },
|
|
@@ -127,7 +129,8 @@ async function agent_stream({
|
|
|
127
129
|
workspace_id,
|
|
128
130
|
project_id,
|
|
129
131
|
assistant_id,
|
|
130
|
-
run_id
|
|
132
|
+
run_id,
|
|
133
|
+
custom_run_config
|
|
131
134
|
}) {
|
|
132
135
|
const runnable_agent = getAgentClient(assistant_id);
|
|
133
136
|
const agentLattice = getAgentLattice(assistant_id);
|
|
@@ -148,9 +151,10 @@ async function agent_stream({
|
|
|
148
151
|
global.__DATABASE_CONFIGS__ = databaseConfigs;
|
|
149
152
|
const runConfig = {
|
|
150
153
|
...agentLattice?.config?.runConfig || {},
|
|
151
|
-
assistant_id,
|
|
152
154
|
workspaceId: workspace_id,
|
|
153
|
-
projectId: project_id
|
|
155
|
+
projectId: project_id,
|
|
156
|
+
...custom_run_config || {},
|
|
157
|
+
assistant_id
|
|
154
158
|
};
|
|
155
159
|
try {
|
|
156
160
|
if (!runnable_agent) {
|
|
@@ -483,6 +487,7 @@ var createRun = async (request, reply) => {
|
|
|
483
487
|
command,
|
|
484
488
|
streaming,
|
|
485
489
|
background,
|
|
490
|
+
custom_run_config,
|
|
486
491
|
...input
|
|
487
492
|
} = request.body;
|
|
488
493
|
const tenant_id = request.headers["x-tenant-id"];
|
|
@@ -505,7 +510,8 @@ var createRun = async (request, reply) => {
|
|
|
505
510
|
tenant_id,
|
|
506
511
|
workspace_id,
|
|
507
512
|
project_id,
|
|
508
|
-
run_id: x_request_id
|
|
513
|
+
run_id: x_request_id,
|
|
514
|
+
custom_run_config
|
|
509
515
|
});
|
|
510
516
|
reply.hijack();
|
|
511
517
|
reply.raw.writeHead(200, {
|
|
@@ -534,7 +540,8 @@ var createRun = async (request, reply) => {
|
|
|
534
540
|
tenant_id,
|
|
535
541
|
workspace_id,
|
|
536
542
|
project_id,
|
|
537
|
-
run_id: x_request_id
|
|
543
|
+
run_id: x_request_id,
|
|
544
|
+
custom_run_config
|
|
538
545
|
});
|
|
539
546
|
reply.status(200).send(result);
|
|
540
547
|
}
|
|
@@ -4215,7 +4222,8 @@ var handleAgentTask = async (taskRequest, retryCount = 0) => {
|
|
|
4215
4222
|
thread_id,
|
|
4216
4223
|
"x-tenant-id": tenant_id,
|
|
4217
4224
|
command,
|
|
4218
|
-
callback_event
|
|
4225
|
+
callback_event,
|
|
4226
|
+
runConfig
|
|
4219
4227
|
} = taskRequest;
|
|
4220
4228
|
try {
|
|
4221
4229
|
console.log(
|
|
@@ -4230,7 +4238,8 @@ var handleAgentTask = async (taskRequest, retryCount = 0) => {
|
|
|
4230
4238
|
streaming: true,
|
|
4231
4239
|
...input,
|
|
4232
4240
|
thread_id,
|
|
4233
|
-
command
|
|
4241
|
+
command,
|
|
4242
|
+
custom_run_config: runConfig
|
|
4234
4243
|
}),
|
|
4235
4244
|
headers: {
|
|
4236
4245
|
"Content-Type": "application/json",
|