@axiom-lattice/gateway 2.1.78 → 2.1.80
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 +21 -0
- package/dist/index.js +24 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
- package/src/channels/lark/LarkChannelAdapter.ts +1 -1
- package/src/channels/lark/controller.ts +4 -3
- package/src/controllers/sandbox.ts +21 -21
- package/src/controllers/workflow-tracking.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axiom-lattice/gateway",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.80",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
"redis": "^5.0.1",
|
|
41
41
|
"uuid": "^9.0.1",
|
|
42
42
|
"zod": "3.25.76",
|
|
43
|
-
"@axiom-lattice/agent-eval": "2.1.
|
|
44
|
-
"@axiom-lattice/core": "2.1.
|
|
45
|
-
"@axiom-lattice/pg-stores": "1.0.
|
|
46
|
-
"@axiom-lattice/protocols": "2.1.
|
|
47
|
-
"@axiom-lattice/queue-redis": "1.0.
|
|
43
|
+
"@axiom-lattice/agent-eval": "2.1.64",
|
|
44
|
+
"@axiom-lattice/core": "2.1.70",
|
|
45
|
+
"@axiom-lattice/pg-stores": "1.0.60",
|
|
46
|
+
"@axiom-lattice/protocols": "2.1.36",
|
|
47
|
+
"@axiom-lattice/queue-redis": "1.0.35"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/jest": "^29.5.14",
|
|
@@ -66,7 +66,7 @@ export const larkChannelAdapter: ChannelAdapter<LarkChannelInstallationConfig> =
|
|
|
66
66
|
installation: ChannelInstallation<LarkChannelInstallationConfig>,
|
|
67
67
|
): Promise<void> {
|
|
68
68
|
const { createLarkSender } = await import("./sender");
|
|
69
|
-
const sender = createLarkSender(installation.config);
|
|
69
|
+
const sender = await createLarkSender(installation.config);
|
|
70
70
|
await sender.sendTextReply({
|
|
71
71
|
chatId: replyTarget.rawTarget.chatId as string,
|
|
72
72
|
text: message.text,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FastifyReply, FastifyRequest } from "fastify";
|
|
2
|
-
import type { ChannelInstallationStore, LarkChannelInstallationConfig } from "@axiom-lattice/protocols";
|
|
2
|
+
import type { ChannelInstallation, ChannelInstallationStore, LarkChannelInstallationConfig } from "@axiom-lattice/protocols";
|
|
3
3
|
import { larkChannelAdapter } from "./LarkChannelAdapter";
|
|
4
4
|
import type { MessageRouter } from "../../router/MessageRouter";
|
|
5
5
|
import { parseLarkRequestBody } from "./verification";
|
|
@@ -23,14 +23,15 @@ export function createLarkEventHandler(deps: {
|
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
const
|
|
26
|
+
const larkInstallation = installation as ChannelInstallation<LarkChannelInstallationConfig>;
|
|
27
|
+
const body = parseLarkRequestBody(request.body, larkInstallation.config.encryptKey);
|
|
27
28
|
|
|
28
29
|
if (body.type === "url_verification" && body.challenge) {
|
|
29
30
|
reply.status(200).send({ challenge: body.challenge });
|
|
30
31
|
return;
|
|
31
32
|
}
|
|
32
33
|
|
|
33
|
-
const inboundMessage = await larkChannelAdapter.receive(request.body,
|
|
34
|
+
const inboundMessage = await larkChannelAdapter.receive(request.body, larkInstallation);
|
|
34
35
|
if (!inboundMessage) {
|
|
35
36
|
reply.status(200).send();
|
|
36
37
|
return;
|
|
@@ -37,14 +37,6 @@ interface SandboxParams {
|
|
|
37
37
|
threadId: string;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
interface ProxyParams extends SandboxParams {
|
|
41
|
-
"*": string;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
interface ResourceParams extends SandboxParams {
|
|
45
|
-
resourcePath: string;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
40
|
export function registerSandboxProxyRoutes(app: FastifyInstance): void {
|
|
49
41
|
// Register uploadfile route FIRST before wildcard routes to ensure it matches
|
|
50
42
|
app.post<{ Params: SandboxParams }>(
|
|
@@ -59,14 +51,18 @@ export function registerSandboxProxyRoutes(app: FastifyInstance): void {
|
|
|
59
51
|
return reply.status(500).send({ error: "Assistant sandbox config not found" });
|
|
60
52
|
}
|
|
61
53
|
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
threadId,
|
|
65
|
-
vmIsolation
|
|
66
|
-
);
|
|
54
|
+
const workspaceId = request.headers["x-workspace-id"] as string;
|
|
55
|
+
const projectId = request.headers["x-project-id"] as string;
|
|
67
56
|
|
|
68
|
-
const sandboxManager = getSandBoxManager()
|
|
69
|
-
const sandbox = await sandboxManager.
|
|
57
|
+
const sandboxManager = getSandBoxManager();
|
|
58
|
+
const sandbox = await sandboxManager.getSandboxFromConfig({
|
|
59
|
+
assistant_id: assistantId,
|
|
60
|
+
thread_id: threadId,
|
|
61
|
+
tenantId,
|
|
62
|
+
workspaceId,
|
|
63
|
+
projectId,
|
|
64
|
+
vmIsolation,
|
|
65
|
+
});
|
|
70
66
|
|
|
71
67
|
try {
|
|
72
68
|
const data = await request.file();
|
|
@@ -122,14 +118,18 @@ export function registerSandboxProxyRoutes(app: FastifyInstance): void {
|
|
|
122
118
|
return reply.status(500).send({ error: "Assistant filesystem vmIsolation not found" });
|
|
123
119
|
}
|
|
124
120
|
|
|
125
|
-
const
|
|
126
|
-
|
|
127
|
-
threadId,
|
|
128
|
-
vmIsolation
|
|
129
|
-
);
|
|
121
|
+
const workspaceId = request.headers["x-workspace-id"] as string;
|
|
122
|
+
const projectId = request.headers["x-project-id"] as string;
|
|
130
123
|
|
|
131
124
|
const sandboxManager = getSandBoxManager();
|
|
132
|
-
const sandbox = await sandboxManager.
|
|
125
|
+
const sandbox = await sandboxManager.getSandboxFromConfig({
|
|
126
|
+
assistant_id: assistantId,
|
|
127
|
+
thread_id: threadId,
|
|
128
|
+
tenantId,
|
|
129
|
+
workspaceId,
|
|
130
|
+
projectId,
|
|
131
|
+
vmIsolation,
|
|
132
|
+
});
|
|
133
133
|
|
|
134
134
|
try {
|
|
135
135
|
// Normalize path to /-prefixed absolute path
|
|
@@ -39,6 +39,7 @@ async function getDefinitionsFromAssistants(tenantId: string): Promise<Array<{
|
|
|
39
39
|
const results: Array<{
|
|
40
40
|
assistantId: string;
|
|
41
41
|
assistantName: string;
|
|
42
|
+
description?: string;
|
|
42
43
|
topologyEdges: { from: string; to: string; purpose: string }[];
|
|
43
44
|
totalEdges: number;
|
|
44
45
|
}> = [];
|