@inkeep/agents-api 0.0.0-dev-20260121225854 → 0.0.0-dev-20260122001146

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.
Files changed (35) hide show
  1. package/dist/.well-known/workflow/v1/flow.cjs +44 -44
  2. package/dist/.well-known/workflow/v1/flow.cjs.debug.json +2 -2
  3. package/dist/.well-known/workflow/v1/manifest.debug.json +14 -14
  4. package/dist/.well-known/workflow/v1/step.cjs +130 -130
  5. package/dist/.well-known/workflow/v1/step.cjs.debug.json +2 -2
  6. package/dist/data/db/manageDbClient.d.ts +2 -2
  7. package/dist/data/db/runDbClient.d.ts +2 -2
  8. package/dist/domains/evals/routes/datasetTriggers.d.ts +2 -2
  9. package/dist/domains/evals/routes/index.d.ts +2 -2
  10. package/dist/domains/evals/workflow/routes.d.ts +2 -2
  11. package/dist/domains/manage/routes/conversations.d.ts +2 -2
  12. package/dist/domains/manage/routes/evals/evaluationResults.d.ts +2 -2
  13. package/dist/domains/manage/routes/index.d.ts +2 -2
  14. package/dist/domains/manage/routes/mcp.d.ts +2 -2
  15. package/dist/domains/manage/routes/signoz.d.ts +2 -2
  16. package/dist/domains/run/agents/Agent.js +1 -1
  17. package/dist/domains/run/agents/relationTools.d.ts +2 -2
  18. package/dist/domains/run/services/AgentSession.js +9 -0
  19. package/dist/domains/run/tools/NativeSandboxExecutor.d.ts +3 -2
  20. package/dist/domains/run/tools/NativeSandboxExecutor.js +76 -46
  21. package/dist/domains/run/tools/SandboxExecutorFactory.d.ts +11 -1
  22. package/dist/domains/run/tools/SandboxExecutorFactory.js +27 -3
  23. package/dist/domains/run/tools/VercelSandboxExecutor.d.ts +3 -11
  24. package/dist/domains/run/tools/VercelSandboxExecutor.js +137 -127
  25. package/dist/domains/run/utils/token-estimator.d.ts +2 -2
  26. package/dist/middleware/evalsAuth.d.ts +2 -2
  27. package/dist/middleware/manageAuth.d.ts +2 -2
  28. package/dist/middleware/projectAccess.d.ts +2 -2
  29. package/dist/middleware/projectConfig.d.ts +3 -3
  30. package/dist/middleware/requirePermission.d.ts +2 -2
  31. package/dist/middleware/runAuth.d.ts +4 -4
  32. package/dist/middleware/sessionAuth.d.ts +3 -3
  33. package/dist/middleware/tenantAccess.d.ts +2 -2
  34. package/dist/middleware/tracing.d.ts +3 -3
  35. package/package.json +3 -3
@@ -11,11 +11,11 @@ const logger = getLogger("VercelSandboxExecutor");
11
11
  * Executes function tools in isolated Vercel Sandbox MicroVMs
12
12
  * Caches and reuses sandboxes based on dependencies to improve performance
13
13
  */
14
- var VercelSandboxExecutor = class VercelSandboxExecutor {
15
- static instance;
14
+ var VercelSandboxExecutor = class {
16
15
  config;
17
16
  sandboxPool = /* @__PURE__ */ new Map();
18
17
  cleanupInterval = null;
18
+ sandboxInitPromises = /* @__PURE__ */ new Map();
19
19
  constructor(config) {
20
20
  this.config = config;
21
21
  logger.info({
@@ -27,12 +27,74 @@ var VercelSandboxExecutor = class VercelSandboxExecutor {
27
27
  }, "VercelSandboxExecutor initialized with pooling");
28
28
  this.startPoolCleanup();
29
29
  }
30
- /**
31
- * Get singleton instance of VercelSandboxExecutor
32
- */
33
- static getInstance(config) {
34
- if (!VercelSandboxExecutor.instance) VercelSandboxExecutor.instance = new VercelSandboxExecutor(config);
35
- return VercelSandboxExecutor.instance;
30
+ async getOrCreateSandbox(params) {
31
+ const cached = this.getCachedSandbox(params.dependencyHash);
32
+ if (cached) return cached;
33
+ const existingInit = this.sandboxInitPromises.get(params.dependencyHash);
34
+ if (existingInit) {
35
+ await existingInit;
36
+ const afterInit = this.getCachedSandbox(params.dependencyHash);
37
+ if (!afterInit) throw new Error("Sandbox initialization finished but sandbox not found in pool");
38
+ return afterInit;
39
+ }
40
+ const initPromise = (async () => {
41
+ let sandbox = null;
42
+ try {
43
+ sandbox = await Sandbox.create({
44
+ token: this.config.token,
45
+ teamId: this.config.teamId,
46
+ projectId: this.config.projectId,
47
+ timeout: this.config.timeout,
48
+ resources: { vcpus: this.config.vcpus || 1 },
49
+ runtime: this.config.runtime
50
+ });
51
+ logger.info({
52
+ functionId: params.functionId,
53
+ functionName: params.toolName,
54
+ sandboxId: sandbox.sandboxId,
55
+ dependencyHash: params.dependencyHash
56
+ }, "New sandbox created");
57
+ this.addToPool(params.dependencyHash, sandbox, params.dependencies);
58
+ if (Object.keys(params.dependencies).length > 0) {
59
+ logger.debug({
60
+ functionId: params.functionId,
61
+ functionName: params.toolName,
62
+ dependencyHash: params.dependencyHash,
63
+ dependencies: params.dependencies
64
+ }, "Installing dependencies in new sandbox");
65
+ const packageJsonContent = JSON.stringify({ dependencies: params.dependencies }, null, 2);
66
+ await sandbox.writeFiles([{
67
+ path: "package.json",
68
+ content: Buffer.from(packageJsonContent, "utf-8")
69
+ }]);
70
+ const installCmd = await sandbox.runCommand({
71
+ cmd: "npm",
72
+ args: ["install", "--omit=dev"],
73
+ cwd: "/vercel/sandbox"
74
+ });
75
+ const installStdout = await installCmd.stdout();
76
+ const installStderr = await installCmd.stderr();
77
+ if (installStdout) logger.debug({ functionId: params.functionId }, installStdout);
78
+ if (installStderr) logger.debug({ functionId: params.functionId }, installStderr);
79
+ if (installCmd.exitCode !== 0) throw new Error(`Failed to install dependencies: ${installStderr}`);
80
+ logger.info({
81
+ functionId: params.functionId,
82
+ dependencyHash: params.dependencyHash
83
+ }, "Dependencies installed successfully");
84
+ }
85
+ return sandbox;
86
+ } catch (error) {
87
+ await this.removeSandbox(params.dependencyHash);
88
+ if (sandbox) try {
89
+ await sandbox.stop();
90
+ } catch {}
91
+ throw error;
92
+ } finally {
93
+ this.sandboxInitPromises.delete(params.dependencyHash);
94
+ }
95
+ })();
96
+ this.sandboxInitPromises.set(params.dependencyHash, initPromise);
97
+ return initPromise;
36
98
  }
37
99
  /**
38
100
  * Generate a hash for dependencies to use as cache key
@@ -48,13 +110,17 @@ var VercelSandboxExecutor = class VercelSandboxExecutor {
48
110
  const cached = this.sandboxPool.get(dependencyHash);
49
111
  if (!cached) return null;
50
112
  const age = Date.now() - cached.createdAt;
51
- if (age > FUNCTION_TOOL_SANDBOX_POOL_TTL_MS || cached.useCount >= FUNCTION_TOOL_SANDBOX_MAX_USE_COUNT) {
113
+ const timeoutSafetyMs = 2e3;
114
+ const timeRemaining = cached.timeoutMs - age;
115
+ if (age > FUNCTION_TOOL_SANDBOX_POOL_TTL_MS || cached.useCount >= FUNCTION_TOOL_SANDBOX_MAX_USE_COUNT || timeRemaining <= timeoutSafetyMs) {
52
116
  logger.debug({
53
117
  dependencyHash,
54
118
  age,
55
119
  useCount: cached.useCount,
56
120
  ttl: FUNCTION_TOOL_SANDBOX_POOL_TTL_MS,
57
- maxUseCount: FUNCTION_TOOL_SANDBOX_MAX_USE_COUNT
121
+ maxUseCount: FUNCTION_TOOL_SANDBOX_MAX_USE_COUNT,
122
+ timeoutMs: cached.timeoutMs,
123
+ timeRemaining
58
124
  }, "Sandbox expired, will create new one");
59
125
  this.removeSandbox(dependencyHash);
60
126
  return null;
@@ -62,7 +128,9 @@ var VercelSandboxExecutor = class VercelSandboxExecutor {
62
128
  logger.debug({
63
129
  dependencyHash,
64
130
  useCount: cached.useCount,
65
- age
131
+ age,
132
+ timeoutMs: cached.timeoutMs,
133
+ timeRemaining
66
134
  }, "Reusing cached sandbox");
67
135
  return cached.sandbox;
68
136
  }
@@ -73,6 +141,7 @@ var VercelSandboxExecutor = class VercelSandboxExecutor {
73
141
  this.sandboxPool.set(dependencyHash, {
74
142
  sandbox,
75
143
  createdAt: Date.now(),
144
+ timeoutMs: sandbox.timeout,
76
145
  useCount: 0,
77
146
  dependencies
78
147
  });
@@ -94,6 +163,7 @@ var VercelSandboxExecutor = class VercelSandboxExecutor {
94
163
  async removeSandbox(dependencyHash) {
95
164
  const cached = this.sandboxPool.get(dependencyHash);
96
165
  if (cached) {
166
+ this.sandboxPool.delete(dependencyHash);
97
167
  try {
98
168
  await cached.sandbox.stop();
99
169
  logger.debug({ dependencyHash }, "Sandbox stopped");
@@ -103,7 +173,6 @@ var VercelSandboxExecutor = class VercelSandboxExecutor {
103
173
  dependencyHash
104
174
  }, "Error stopping sandbox");
105
175
  }
106
- this.sandboxPool.delete(dependencyHash);
107
176
  }
108
177
  }
109
178
  /**
@@ -113,7 +182,12 @@ var VercelSandboxExecutor = class VercelSandboxExecutor {
113
182
  this.cleanupInterval = setInterval(() => {
114
183
  const now = Date.now();
115
184
  const toRemove = [];
116
- for (const [hash, cached] of this.sandboxPool.entries()) if (now - cached.createdAt > FUNCTION_TOOL_SANDBOX_POOL_TTL_MS || cached.useCount >= FUNCTION_TOOL_SANDBOX_MAX_USE_COUNT) toRemove.push(hash);
185
+ for (const [hash, cached] of this.sandboxPool.entries()) {
186
+ const age = now - cached.createdAt;
187
+ const timeoutSafetyMs = 2e3;
188
+ const timeRemaining = cached.timeoutMs - age;
189
+ if (age > FUNCTION_TOOL_SANDBOX_POOL_TTL_MS || cached.useCount >= FUNCTION_TOOL_SANDBOX_MAX_USE_COUNT || timeRemaining <= timeoutSafetyMs) toRemove.push(hash);
190
+ }
117
191
  if (toRemove.length > 0) {
118
192
  logger.info({
119
193
  count: toRemove.length,
@@ -132,6 +206,7 @@ var VercelSandboxExecutor = class VercelSandboxExecutor {
132
206
  this.cleanupInterval = null;
133
207
  }
134
208
  logger.info({ poolSize: this.sandboxPool.size }, "Cleaning up all sandboxes");
209
+ this.sandboxInitPromises.clear();
135
210
  const promises = Array.from(this.sandboxPool.keys()).map((hash) => this.removeSandbox(hash));
136
211
  await Promise.all(promises);
137
212
  }
@@ -156,18 +231,6 @@ var VercelSandboxExecutor = class VercelSandboxExecutor {
156
231
  return envVars;
157
232
  }
158
233
  /**
159
- * Create .env file content from environment variables
160
- * Note: Currently creates empty placeholders. Values will be populated in the future.
161
- */
162
- createEnvFileContent(envVarNames) {
163
- const envLines = [];
164
- for (const varName of envVarNames) {
165
- envLines.push(`${varName}=""`);
166
- logger.debug({ varName }, "Adding environment variable placeholder to sandbox");
167
- }
168
- return envLines.join("\n");
169
- }
170
- /**
171
234
  * Execute a function tool in Vercel Sandbox with pooling
172
235
  */
173
236
  async executeFunctionTool(functionId, args, toolConfig) {
@@ -175,6 +238,9 @@ var VercelSandboxExecutor = class VercelSandboxExecutor {
175
238
  const logs = [];
176
239
  const dependencies = toolConfig.dependencies || {};
177
240
  const dependencyHash = this.generateDependencyHash(dependencies);
241
+ const runRelDir = `runs/${`${Date.now()}-${crypto.randomBytes(6).toString("hex")}`}`;
242
+ const filename = this.config.runtime === "typescript" ? "execute.ts" : "execute.js";
243
+ const runFilePath = `${runRelDir}/${filename}`;
178
244
  try {
179
245
  logger.info({
180
246
  functionId,
@@ -182,109 +248,44 @@ var VercelSandboxExecutor = class VercelSandboxExecutor {
182
248
  dependencyHash,
183
249
  poolSize: this.sandboxPool.size
184
250
  }, "Executing function in Vercel Sandbox");
185
- let sandbox = this.getCachedSandbox(dependencyHash);
186
- let isNewSandbox = false;
187
- if (!sandbox) {
188
- isNewSandbox = true;
189
- sandbox = await Sandbox.create({
190
- token: this.config.token,
191
- teamId: this.config.teamId,
192
- projectId: this.config.projectId,
193
- timeout: this.config.timeout,
194
- resources: { vcpus: this.config.vcpus || 1 },
195
- runtime: this.config.runtime
196
- });
197
- logger.info({
198
- functionId,
199
- sandboxId: sandbox.sandboxId,
200
- dependencyHash
201
- }, `New sandbox created for function ${functionId}`);
202
- this.addToPool(dependencyHash, sandbox, dependencies);
203
- } else logger.info({
251
+ const sandbox = await this.getOrCreateSandbox({
204
252
  functionId,
205
- sandboxId: sandbox.sandboxId,
206
- dependencyHash
207
- }, `Reusing cached sandbox for function ${functionId}`);
253
+ toolName: toolConfig.name,
254
+ dependencyHash,
255
+ dependencies
256
+ });
208
257
  this.incrementUseCount(dependencyHash);
209
258
  try {
210
- if (isNewSandbox && toolConfig.dependencies && Object.keys(toolConfig.dependencies).length > 0) {
211
- logger.debug({
212
- functionId,
213
- functionName: toolConfig.name,
214
- dependencies: toolConfig.dependencies
215
- }, "Installing dependencies in new sandbox");
216
- const packageJson = { dependencies: toolConfig.dependencies };
217
- const packageJsonContent = JSON.stringify(packageJson, null, 2);
218
- await sandbox.writeFiles([{
219
- path: "package.json",
220
- content: Buffer.from(packageJsonContent, "utf-8")
221
- }]);
222
- const installCmd = await sandbox.runCommand({
223
- cmd: "npm",
224
- args: ["install", "--omit=dev"]
225
- });
226
- const installStdout = await installCmd.stdout();
227
- const installStderr = await installCmd.stderr();
228
- if (installStdout) logs.push(installStdout);
229
- if (installStderr) logs.push(installStderr);
230
- if (installCmd.exitCode !== 0) throw new Error(`Failed to install dependencies: ${installStderr}`);
231
- logger.info({
232
- functionId,
233
- dependencyHash
234
- }, "Dependencies installed successfully");
235
- }
236
259
  const executionCode = createExecutionWrapper(toolConfig.executeCode, args);
237
260
  const envVars = this.extractEnvVars(toolConfig.executeCode);
238
- const filesToWrite = [];
239
- const filename = this.config.runtime === "typescript" ? "execute.ts" : "execute.js";
240
- filesToWrite.push({
241
- path: filename,
261
+ const env = envVars.size > 0 ? Object.fromEntries(Array.from(envVars).map((k) => [k, ""])) : {};
262
+ const mkdirCmd = await sandbox.runCommand({
263
+ cmd: "mkdir",
264
+ args: ["-p", runRelDir],
265
+ cwd: "/vercel/sandbox"
266
+ });
267
+ const mkdirStderr = await mkdirCmd.stderr();
268
+ if (mkdirCmd.exitCode !== 0) throw new Error(mkdirStderr || "Failed to create run directory");
269
+ await sandbox.writeFiles([{
270
+ path: runFilePath,
242
271
  content: Buffer.from(executionCode, "utf-8")
272
+ }]);
273
+ const runtime = this.config.runtime === "typescript" ? "tsx" : "node";
274
+ const executeCmd = this.config.runtime === "typescript" ? await sandbox.runCommand({
275
+ cmd: "npx",
276
+ args: [
277
+ "--yes",
278
+ "tsx",
279
+ filename
280
+ ],
281
+ cwd: `/vercel/sandbox/${runRelDir}`,
282
+ env
283
+ }) : await sandbox.runCommand({
284
+ cmd: runtime,
285
+ args: [filename],
286
+ cwd: `/vercel/sandbox/${runRelDir}`,
287
+ env
243
288
  });
244
- if (envVars.size > 0) {
245
- const envFileContent = this.createEnvFileContent(envVars);
246
- if (envFileContent) {
247
- filesToWrite.push({
248
- path: ".env",
249
- content: Buffer.from(envFileContent, "utf-8")
250
- });
251
- logger.info({
252
- functionId,
253
- envVarCount: envVars.size,
254
- envVars: Array.from(envVars)
255
- }, "Creating environment variable placeholders in sandbox");
256
- }
257
- }
258
- await sandbox.writeFiles(filesToWrite);
259
- logger.info({
260
- functionId,
261
- runtime: this.config.runtime === "typescript" ? "tsx" : "node",
262
- hasEnvVars: envVars.size > 0
263
- }, `Execution code written to file for runtime ${this.config.runtime}`);
264
- const executeCmd = await (async () => {
265
- if (envVars.size > 0) return sandbox.runCommand({
266
- cmd: "npx",
267
- args: this.config.runtime === "typescript" ? [
268
- "--yes",
269
- "dotenv-cli",
270
- "--",
271
- "npx",
272
- "tsx",
273
- filename
274
- ] : [
275
- "--yes",
276
- "dotenv-cli",
277
- "--",
278
- "node",
279
- filename
280
- ]
281
- });
282
- const runtime = this.config.runtime === "typescript" ? "tsx" : "node";
283
- return sandbox.runCommand({
284
- cmd: runtime,
285
- args: [filename]
286
- });
287
- })();
288
289
  const executeStdout = await executeCmd.stdout();
289
290
  const executeStderr = await executeCmd.stderr();
290
291
  if (executeStdout) logs.push(executeStdout);
@@ -294,7 +295,8 @@ var VercelSandboxExecutor = class VercelSandboxExecutor {
294
295
  logger.error({
295
296
  functionId,
296
297
  exitCode: executeCmd.exitCode,
297
- stderr: executeStderr
298
+ stderr: executeStderr,
299
+ logs
298
300
  }, "Function execution failed");
299
301
  return {
300
302
  success: false,
@@ -306,7 +308,8 @@ var VercelSandboxExecutor = class VercelSandboxExecutor {
306
308
  const result = parseExecutionResult(executeStdout, functionId, logger);
307
309
  logger.info({
308
310
  functionId,
309
- executionTime
311
+ executionTime,
312
+ logs
310
313
  }, "Function executed successfully in Vercel Sandbox");
311
314
  return {
312
315
  success: true,
@@ -314,9 +317,14 @@ var VercelSandboxExecutor = class VercelSandboxExecutor {
314
317
  logs,
315
318
  executionTime
316
319
  };
317
- } catch (innerError) {
318
- await this.removeSandbox(dependencyHash);
319
- throw innerError;
320
+ } finally {
321
+ try {
322
+ await sandbox.runCommand({
323
+ cmd: "rm",
324
+ args: ["-rf", runRelDir],
325
+ cwd: "/vercel/sandbox"
326
+ });
327
+ } catch {}
320
328
  }
321
329
  } catch (error) {
322
330
  const executionTime = Date.now() - startTime;
@@ -324,7 +332,9 @@ var VercelSandboxExecutor = class VercelSandboxExecutor {
324
332
  logger.error({
325
333
  functionId,
326
334
  error: errorMessage,
327
- executionTime
335
+ stack: error,
336
+ executionTime,
337
+ logs
328
338
  }, "Vercel Sandbox execution error");
329
339
  return {
330
340
  success: false,
@@ -1,4 +1,4 @@
1
- import * as _inkeep_agents_core3 from "@inkeep/agents-core";
1
+ import * as _inkeep_agents_core1 from "@inkeep/agents-core";
2
2
  import { BreakdownComponentDef, ContextBreakdown, calculateBreakdownTotal, createEmptyBreakdown } from "@inkeep/agents-core";
3
3
 
4
4
  //#region src/domains/run/utils/token-estimator.d.ts
@@ -17,7 +17,7 @@ interface AssembleResult {
17
17
  /** The assembled prompt string */
18
18
  prompt: string;
19
19
  /** Token breakdown for each component */
20
- breakdown: _inkeep_agents_core3.ContextBreakdown;
20
+ breakdown: _inkeep_agents_core1.ContextBreakdown;
21
21
  }
22
22
  //#endregion
23
23
  export { AssembleResult, type BreakdownComponentDef, type ContextBreakdown, calculateBreakdownTotal, createEmptyBreakdown, estimateTokens };
@@ -1,4 +1,4 @@
1
- import * as hono6 from "hono";
1
+ import * as hono1 from "hono";
2
2
  import { BaseExecutionContext } from "@inkeep/agents-core";
3
3
 
4
4
  //#region src/middleware/evalsAuth.d.ts
@@ -7,7 +7,7 @@ import { BaseExecutionContext } from "@inkeep/agents-core";
7
7
  * Middleware to authenticate API requests using Bearer token authentication
8
8
  * First checks if token matches INKEEP_AGENTS_EVAL_API_BYPASS_SECRET,
9
9
  */
10
- declare const evalApiKeyAuth: () => hono6.MiddlewareHandler<{
10
+ declare const evalApiKeyAuth: () => hono1.MiddlewareHandler<{
11
11
  Variables: {
12
12
  executionContext: BaseExecutionContext;
13
13
  };
@@ -1,4 +1,4 @@
1
- import * as hono0 from "hono";
1
+ import * as hono2 from "hono";
2
2
  import { BaseExecutionContext } from "@inkeep/agents-core";
3
3
  import { createAuth } from "@inkeep/agents-core/auth";
4
4
 
@@ -12,7 +12,7 @@ import { createAuth } from "@inkeep/agents-core/auth";
12
12
  * 3. Database API key
13
13
  * 4. Internal service token
14
14
  */
15
- declare const manageApiKeyAuth: () => hono0.MiddlewareHandler<{
15
+ declare const manageApiKeyAuth: () => hono2.MiddlewareHandler<{
16
16
  Variables: {
17
17
  executionContext: BaseExecutionContext;
18
18
  userId?: string;
@@ -1,5 +1,5 @@
1
1
  import { ManageAppVariables } from "../types/app.js";
2
- import * as hono1 from "hono";
2
+ import * as hono3 from "hono";
3
3
 
4
4
  //#region src/middleware/projectAccess.d.ts
5
5
 
@@ -26,6 +26,6 @@ declare const requireProjectPermission: <Env$1 extends {
26
26
  Variables: ManageAppVariables;
27
27
  } = {
28
28
  Variables: ManageAppVariables;
29
- }>(permission?: ProjectPermission) => hono1.MiddlewareHandler<Env$1, string, {}, Response>;
29
+ }>(permission?: ProjectPermission) => hono3.MiddlewareHandler<Env$1, string, {}, Response>;
30
30
  //#endregion
31
31
  export { ProjectPermission, requireProjectPermission };
@@ -1,11 +1,11 @@
1
- import * as hono2 from "hono";
1
+ import * as hono4 from "hono";
2
2
  import { BaseExecutionContext, ResolvedRef } from "@inkeep/agents-core";
3
3
 
4
4
  //#region src/middleware/projectConfig.d.ts
5
5
  /**
6
6
  * Middleware that fetches the full project definition from the Management API
7
7
  */
8
- declare const projectConfigMiddleware: hono2.MiddlewareHandler<{
8
+ declare const projectConfigMiddleware: hono4.MiddlewareHandler<{
9
9
  Variables: {
10
10
  executionContext: BaseExecutionContext;
11
11
  resolvedRef: ResolvedRef;
@@ -15,7 +15,7 @@ declare const projectConfigMiddleware: hono2.MiddlewareHandler<{
15
15
  * Creates a middleware that applies project config fetching except for specified route patterns
16
16
  * @param skipRouteCheck - Function that returns true if the route should skip the middleware
17
17
  */
18
- declare const projectConfigMiddlewareExcept: (skipRouteCheck: (path: string) => boolean) => hono2.MiddlewareHandler<{
18
+ declare const projectConfigMiddlewareExcept: (skipRouteCheck: (path: string) => boolean) => hono4.MiddlewareHandler<{
19
19
  Variables: {
20
20
  executionContext: BaseExecutionContext;
21
21
  resolvedRef: ResolvedRef;
@@ -1,5 +1,5 @@
1
1
  import { ManageAppVariables } from "../types/app.js";
2
- import * as hono7 from "hono";
2
+ import * as hono6 from "hono";
3
3
 
4
4
  //#region src/middleware/requirePermission.d.ts
5
5
  type Permission = {
@@ -9,6 +9,6 @@ declare const requirePermission: <Env$1 extends {
9
9
  Variables: ManageAppVariables;
10
10
  } = {
11
11
  Variables: ManageAppVariables;
12
- }>(permissions: Permission) => hono7.MiddlewareHandler<Env$1, string, {}, Response>;
12
+ }>(permissions: Permission) => hono6.MiddlewareHandler<Env$1, string, {}, Response>;
13
13
  //#endregion
14
14
  export { requirePermission };
@@ -1,8 +1,8 @@
1
- import * as hono13 from "hono";
1
+ import * as hono7 from "hono";
2
2
  import { BaseExecutionContext } from "@inkeep/agents-core";
3
3
 
4
4
  //#region src/middleware/runAuth.d.ts
5
- declare const runApiKeyAuth: () => hono13.MiddlewareHandler<{
5
+ declare const runApiKeyAuth: () => hono7.MiddlewareHandler<{
6
6
  Variables: {
7
7
  executionContext: BaseExecutionContext;
8
8
  };
@@ -11,7 +11,7 @@ declare const runApiKeyAuth: () => hono13.MiddlewareHandler<{
11
11
  * Creates a middleware that applies API key authentication except for specified route patterns
12
12
  * @param skipRouteCheck - Function that returns true if the route should skip authentication
13
13
  */
14
- declare const runApiKeyAuthExcept: (skipRouteCheck: (path: string) => boolean) => hono13.MiddlewareHandler<{
14
+ declare const runApiKeyAuthExcept: (skipRouteCheck: (path: string) => boolean) => hono7.MiddlewareHandler<{
15
15
  Variables: {
16
16
  executionContext: BaseExecutionContext;
17
17
  };
@@ -20,7 +20,7 @@ declare const runApiKeyAuthExcept: (skipRouteCheck: (path: string) => boolean) =
20
20
  * Helper middleware for endpoints that optionally support API key authentication
21
21
  * If no auth header is present, it continues without setting the executionContext
22
22
  */
23
- declare const runOptionalAuth: () => hono13.MiddlewareHandler<{
23
+ declare const runOptionalAuth: () => hono7.MiddlewareHandler<{
24
24
  Variables: {
25
25
  executionContext?: BaseExecutionContext;
26
26
  };
@@ -1,4 +1,4 @@
1
- import * as hono8 from "hono";
1
+ import * as hono10 from "hono";
2
2
 
3
3
  //#region src/middleware/sessionAuth.d.ts
4
4
 
@@ -7,11 +7,11 @@ import * as hono8 from "hono";
7
7
  * Requires that a user has already been authenticated via Better Auth session.
8
8
  * Used primarily for manage routes that require an active user session.
9
9
  */
10
- declare const sessionAuth: () => hono8.MiddlewareHandler<any, string, {}, Response>;
10
+ declare const sessionAuth: () => hono10.MiddlewareHandler<any, string, {}, Response>;
11
11
  /**
12
12
  * Global session middleware - sets user and session in context for all routes
13
13
  * Used for all routes that require an active user session.
14
14
  */
15
- declare const sessionContext: () => hono8.MiddlewareHandler<any, string, {}, Response>;
15
+ declare const sessionContext: () => hono10.MiddlewareHandler<any, string, {}, Response>;
16
16
  //#endregion
17
17
  export { sessionAuth, sessionContext };
@@ -1,4 +1,4 @@
1
- import * as hono10 from "hono";
1
+ import * as hono12 from "hono";
2
2
 
3
3
  //#region src/middleware/tenantAccess.d.ts
4
4
 
@@ -11,7 +11,7 @@ import * as hono10 from "hono";
11
11
  * - API key user: Access only to the tenant associated with the API key
12
12
  * - Session user: Access based on organization membership
13
13
  */
14
- declare const requireTenantAccess: () => hono10.MiddlewareHandler<{
14
+ declare const requireTenantAccess: () => hono12.MiddlewareHandler<{
15
15
  Variables: {
16
16
  userId: string;
17
17
  tenantId: string;
@@ -1,7 +1,7 @@
1
- import * as hono11 from "hono";
1
+ import * as hono13 from "hono";
2
2
 
3
3
  //#region src/middleware/tracing.d.ts
4
- declare const otelBaggageMiddleware: () => hono11.MiddlewareHandler<any, string, {}, Response>;
5
- declare const executionBaggageMiddleware: () => hono11.MiddlewareHandler<any, string, {}, Response>;
4
+ declare const otelBaggageMiddleware: () => hono13.MiddlewareHandler<any, string, {}, Response>;
5
+ declare const executionBaggageMiddleware: () => hono13.MiddlewareHandler<any, string, {}, Response>;
6
6
  //#endregion
7
7
  export { executionBaggageMiddleware, otelBaggageMiddleware };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-api",
3
- "version": "0.0.0-dev-20260121225854",
3
+ "version": "0.0.0-dev-20260122001146",
4
4
  "description": "Unified Inkeep Agents API - combines management, runtime, and evaluation capabilities",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {
@@ -70,8 +70,8 @@
70
70
  "openid-client": "^6.8.1",
71
71
  "pg": "^8.16.3",
72
72
  "workflow": "4.0.1-beta.33",
73
- "@inkeep/agents-core": "^0.0.0-dev-20260121225854",
74
- "@inkeep/agents-manage-mcp": "^0.0.0-dev-20260121225854"
73
+ "@inkeep/agents-core": "^0.0.0-dev-20260122001146",
74
+ "@inkeep/agents-manage-mcp": "^0.0.0-dev-20260122001146"
75
75
  },
76
76
  "peerDependencies": {
77
77
  "@hono/zod-openapi": "^1.1.5",