@axiom-lattice/gateway 2.1.113 → 2.1.116
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 +13 -13
- package/CHANGELOG.md +28 -0
- package/dist/index.js +27 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +27 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/controllers/auth.ts +1 -5
- package/src/controllers/run.ts +5 -4
- package/src/controllers/tasks.ts +28 -1
- package/src/controllers/workspace.ts +3 -3
- package/src/routes/index.ts +1 -0
package/dist/index.mjs
CHANGED
|
@@ -265,7 +265,10 @@ var createRun = async (request, reply) => {
|
|
|
265
265
|
const project_id = request.headers["x-project-id"];
|
|
266
266
|
const x_request_id = request.headers["x-request-id"] || v4();
|
|
267
267
|
const user_id = getUserId2(request);
|
|
268
|
-
const mergedConfig =
|
|
268
|
+
const mergedConfig = {
|
|
269
|
+
...custom_run_config,
|
|
270
|
+
...user_id && { user_id }
|
|
271
|
+
};
|
|
269
272
|
if (!assistant_id) {
|
|
270
273
|
reply.status(400).send({
|
|
271
274
|
success: false,
|
|
@@ -2918,6 +2921,7 @@ async function listTasks(request, reply) {
|
|
|
2918
2921
|
priority: query.priority,
|
|
2919
2922
|
ownerType: query.ownerType,
|
|
2920
2923
|
metadata: query.metadata ? JSON.parse(query.metadata) : void 0,
|
|
2924
|
+
projectId: query.projectId,
|
|
2921
2925
|
limit: query.limit ? parseInt(query.limit) : void 0,
|
|
2922
2926
|
offset: query.offset ? parseInt(query.offset) : void 0
|
|
2923
2927
|
});
|
|
@@ -3030,6 +3034,23 @@ async function completeTask(request, reply) {
|
|
|
3030
3034
|
return reply.status(500).send({ success: false, error: error.message });
|
|
3031
3035
|
}
|
|
3032
3036
|
}
|
|
3037
|
+
function getTaskWorkItemStore() {
|
|
3038
|
+
return getStoreLattice6("default", "taskWorkItem").store;
|
|
3039
|
+
}
|
|
3040
|
+
async function listTaskWorkItems(request, reply) {
|
|
3041
|
+
const tenantId = getTenantId9(request);
|
|
3042
|
+
const { id } = request.params;
|
|
3043
|
+
const { action, limit, offset } = request.query;
|
|
3044
|
+
const store = getTaskWorkItemStore();
|
|
3045
|
+
const items = await store.list({
|
|
3046
|
+
tenantId,
|
|
3047
|
+
taskId: id,
|
|
3048
|
+
action,
|
|
3049
|
+
limit: limit ? Number(limit) : void 0,
|
|
3050
|
+
offset: offset ? Number(offset) : void 0
|
|
3051
|
+
});
|
|
3052
|
+
return reply.send({ success: true, data: items });
|
|
3053
|
+
}
|
|
3033
3054
|
|
|
3034
3055
|
// src/services/ExportImportService.ts
|
|
3035
3056
|
import { ExportableEntityRegistry, DependencyResolver, IdRemapper } from "@axiom-lattice/core";
|
|
@@ -4428,7 +4449,7 @@ var WorkspaceController = class {
|
|
|
4428
4449
|
async uploadFile(request, reply) {
|
|
4429
4450
|
const tenantId = this.getTenantId(request);
|
|
4430
4451
|
const { workspaceId, projectId } = request.params;
|
|
4431
|
-
const assistantId = request.query.assistantId;
|
|
4452
|
+
const assistantId = request.query.assistantId || request.headers["x-assistant-id"];
|
|
4432
4453
|
const workspace = await this.workspaceStore.getWorkspaceById(
|
|
4433
4454
|
tenantId,
|
|
4434
4455
|
workspaceId
|
|
@@ -4462,6 +4483,8 @@ var WorkspaceController = class {
|
|
|
4462
4483
|
const volumeBackend = await sandboxManager.getVolumeBackendForPath(volumeConfig, realPath);
|
|
4463
4484
|
if (volumeBackend && !isBinary) {
|
|
4464
4485
|
await volumeBackend.write(realPath, buffer.toString("utf-8"));
|
|
4486
|
+
} else if (volumeBackend && volumeBackend.writeBinary) {
|
|
4487
|
+
await volumeBackend.writeBinary(realPath, buffer);
|
|
4465
4488
|
} else {
|
|
4466
4489
|
const sandbox = await sandboxManager.getSandboxFromConfig(volumeConfig);
|
|
4467
4490
|
await sandbox.file.uploadFile({ file: realPath, data: buffer });
|
|
@@ -6541,11 +6564,7 @@ var AuthController = class {
|
|
|
6541
6564
|
return {
|
|
6542
6565
|
success: true,
|
|
6543
6566
|
data: {
|
|
6544
|
-
tenant
|
|
6545
|
-
id: tenant.id,
|
|
6546
|
-
name: tenant.name,
|
|
6547
|
-
status: tenant.status
|
|
6548
|
-
},
|
|
6567
|
+
tenant,
|
|
6549
6568
|
token,
|
|
6550
6569
|
personalAssistant
|
|
6551
6570
|
}
|
|
@@ -7782,6 +7801,7 @@ var registerLatticeRoutes = (app2, channelDeps) => {
|
|
|
7782
7801
|
app2.put("/api/tasks/:id", updateTask);
|
|
7783
7802
|
app2.delete("/api/tasks/:id", deleteTask);
|
|
7784
7803
|
app2.patch("/api/tasks/:id/complete", completeTask);
|
|
7804
|
+
app2.get("/api/tasks/:id/work-items", listTaskWorkItems);
|
|
7785
7805
|
app2.get(
|
|
7786
7806
|
"/api/assistants/:assistantId/graph",
|
|
7787
7807
|
{ schema: getAgentGraphSchema },
|