@axiom-lattice/gateway 2.1.78 → 2.1.79

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axiom-lattice/gateway",
3
- "version": "2.1.78",
3
+ "version": "2.1.79",
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.62",
44
- "@axiom-lattice/core": "2.1.68",
45
- "@axiom-lattice/pg-stores": "1.0.58",
46
- "@axiom-lattice/protocols": "2.1.35",
47
- "@axiom-lattice/queue-redis": "1.0.34"
43
+ "@axiom-lattice/agent-eval": "2.1.63",
44
+ "@axiom-lattice/core": "2.1.69",
45
+ "@axiom-lattice/pg-stores": "1.0.59",
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 body = parseLarkRequestBody(request.body, installation.config.encryptKey);
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, installation);
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 sandboxName = sandboxService.computeSandboxName(
63
- assistantId,
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.createSandbox(sandboxName)
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 sandboxName = sandboxService.computeSandboxName(
126
- assistantId,
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.createSandbox(sandboxName);
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
  }> = [];