@inkeep/agents-run-api 0.0.0-dev-20251125151505 → 0.0.0-dev-20251125185858

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.
@@ -1,5 +1,5 @@
1
1
  import { getLogger } from './chunk-A2S7GSHL.js';
2
- import { FUNCTION_TOOL_SANDBOX_POOL_TTL_MS, FUNCTION_TOOL_SANDBOX_MAX_USE_COUNT, FUNCTION_TOOL_SANDBOX_CLEANUP_INTERVAL_MS, FUNCTION_TOOL_EXECUTION_TIMEOUT_MS_DEFAULT, FUNCTION_TOOL_SANDBOX_MAX_OUTPUT_SIZE_BYTES, FUNCTION_TOOL_SANDBOX_QUEUE_WAIT_TIMEOUT_MS } from './chunk-IVALDC72.js';
2
+ import { FUNCTION_TOOL_SANDBOX_POOL_TTL_MS, FUNCTION_TOOL_SANDBOX_MAX_USE_COUNT, FUNCTION_TOOL_SANDBOX_CLEANUP_INTERVAL_MS, FUNCTION_TOOL_EXECUTION_TIMEOUT_MS_DEFAULT, FUNCTION_TOOL_SANDBOX_MAX_OUTPUT_SIZE_BYTES, FUNCTION_TOOL_SANDBOX_QUEUE_WAIT_TIMEOUT_MS } from './chunk-SUUSOBLI.js';
3
3
  import { spawn } from 'child_process';
4
4
  import crypto, { createHash } from 'crypto';
5
5
  import { mkdirSync, existsSync, rmSync, writeFileSync } from 'fs';
@@ -1,5 +1,5 @@
1
- import { dbClient_default } from './chunk-V4RNZ6BX.js';
2
- import { CONVERSATION_HISTORY_DEFAULT_LIMIT } from './chunk-IVALDC72.js';
1
+ import { dbClient_default } from './chunk-W6UIBREL.js';
2
+ import { CONVERSATION_HISTORY_DEFAULT_LIMIT } from './chunk-SUUSOBLI.js';
3
3
  import { CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT, createMessage, generateId, getConversationHistory } from '@inkeep/agents-core';
4
4
 
5
5
  function createDefaultConversationHistoryConfig(mode = "full") {
@@ -208,7 +208,7 @@ async function getConversationScopedArtifacts(params) {
208
208
  return [];
209
209
  }
210
210
  const { getLedgerArtifacts } = await import('@inkeep/agents-core');
211
- const dbClient = (await import('./dbClient-BXOIYVCJ.js')).default;
211
+ const dbClient = (await import('./dbClient-47AP7OHJ.js')).default;
212
212
  const visibleTaskIds = visibleMessages.map((msg) => msg.taskId).filter((taskId) => Boolean(taskId));
213
213
  const referenceArtifacts = [];
214
214
  for (const taskId of visibleTaskIds) {
@@ -1,5 +1,5 @@
1
1
  import { loadEnvironmentFiles } from '@inkeep/agents-core';
2
- import { z } from 'zod';
2
+ import { z } from '@hono/zod-openapi';
3
3
 
4
4
  // src/env.ts
5
5
  loadEnvironmentFiles();
@@ -1,4 +1,4 @@
1
- import { env } from './chunk-IYG4HUQ6.js';
1
+ import { env } from './chunk-CDYXP4BN.js';
2
2
  import { getLogger } from './chunk-A2S7GSHL.js';
3
3
  import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node';
4
4
  import { BaggageSpanProcessor, ALLOW_ALL_BAGGAGE_KEYS } from '@opentelemetry/baggage-span-processor';
@@ -1,5 +1,5 @@
1
1
  import { loadEnvironmentFiles } from '@inkeep/agents-core';
2
- import { z } from 'zod';
2
+ import { z } from '@hono/zod-openapi';
3
3
 
4
4
  // src/constants/execution-limits/index.ts
5
5
 
@@ -1,4 +1,4 @@
1
- import { env } from './chunk-IYG4HUQ6.js';
1
+ import { env } from './chunk-CDYXP4BN.js';
2
2
  import { F, u, R, x, T, h, U, L, or, C, Vr, ce, ur, P } from './chunk-SBJLXGYG.js';
3
3
  import { createDatabaseClient } from '@inkeep/agents-core';
4
4
  import * as schema from '@inkeep/agents-core/db/schema';
@@ -1 +1 @@
1
- export { createDefaultConversationHistoryConfig, getConversationScopedArtifacts, getFormattedConversationHistory, getFullConversationContext, getScopedHistory, getUserFacingHistory, saveA2AMessageResponse } from './chunk-M46DFVYB.js';
1
+ export { createDefaultConversationHistoryConfig, getConversationScopedArtifacts, getFormattedConversationHistory, getFullConversationContext, getScopedHistory, getUserFacingHistory, saveA2AMessageResponse } from './chunk-BQB27EXW.js';
@@ -0,0 +1 @@
1
+ export { dbClient_default as default } from './chunk-W6UIBREL.js';
package/dist/index.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var agentsCore = require('@inkeep/agents-core');
6
- var z8 = require('zod');
6
+ var zodOpenapi = require('@hono/zod-openapi');
7
7
  var s3 = require('fs');
8
8
  var o3 = require('path');
9
9
  var schema = require('@inkeep/agents-core/db/schema');
@@ -13,7 +13,6 @@ var crypto2 = require('crypto');
13
13
  var os = require('os');
14
14
  var sandbox = require('@vercel/sandbox');
15
15
  var otel = require('@hono/otel');
16
- var zodOpenapi = require('@hono/zod-openapi');
17
16
  var api = require('@opentelemetry/api');
18
17
  var hono = require('hono');
19
18
  var cors = require('hono/cors');
@@ -61,7 +60,6 @@ function _interopNamespace(e) {
61
60
  return Object.freeze(n);
62
61
  }
63
62
 
64
- var z8__default = /*#__PURE__*/_interopDefault(z8);
65
63
  var s3__namespace = /*#__PURE__*/_interopNamespace(s3);
66
64
  var o3__namespace = /*#__PURE__*/_interopNamespace(o3);
67
65
  var schema__namespace = /*#__PURE__*/_interopNamespace(schema);
@@ -84,29 +82,29 @@ var envSchema, parseEnv, env;
84
82
  var init_env = __esm({
85
83
  "src/env.ts"() {
86
84
  agentsCore.loadEnvironmentFiles();
87
- envSchema = z8.z.object({
88
- NODE_ENV: z8.z.enum(["development", "production", "test"]).optional(),
89
- ENVIRONMENT: z8.z.enum(["development", "production", "pentest", "test"]).optional().default("development"),
90
- DATABASE_URL: z8.z.string().optional(),
91
- INKEEP_AGENTS_RUN_API_URL: z8.z.string().optional().default("http://localhost:3003"),
92
- AGENTS_MANAGE_UI_URL: z8.z.string().optional().default("http://localhost:3000"),
93
- LOG_LEVEL: z8.z.enum(["trace", "debug", "info", "warn", "error"]).optional().default("debug"),
94
- NANGO_SERVER_URL: z8.z.string().optional().default("https://api.nango.dev"),
95
- NANGO_SECRET_KEY: z8.z.string().optional(),
96
- ANTHROPIC_API_KEY: z8.z.string(),
97
- OPENAI_API_KEY: z8.z.string().optional(),
98
- GOOGLE_GENERATIVE_AI_API_KEY: z8.z.string().optional(),
99
- INKEEP_AGENTS_RUN_API_BYPASS_SECRET: z8.z.string().optional(),
100
- INKEEP_AGENTS_JWT_SIGNING_SECRET: z8.z.string().optional(),
101
- INKEEP_AGENTS_TEMP_JWT_PUBLIC_KEY: z8.z.string().optional(),
102
- OTEL_BSP_SCHEDULE_DELAY: z8.z.coerce.number().optional().default(500),
103
- OTEL_BSP_MAX_EXPORT_BATCH_SIZE: z8.z.coerce.number().optional().default(64)
85
+ envSchema = zodOpenapi.z.object({
86
+ NODE_ENV: zodOpenapi.z.enum(["development", "production", "test"]).optional(),
87
+ ENVIRONMENT: zodOpenapi.z.enum(["development", "production", "pentest", "test"]).optional().default("development"),
88
+ DATABASE_URL: zodOpenapi.z.string().optional(),
89
+ INKEEP_AGENTS_RUN_API_URL: zodOpenapi.z.string().optional().default("http://localhost:3003"),
90
+ AGENTS_MANAGE_UI_URL: zodOpenapi.z.string().optional().default("http://localhost:3000"),
91
+ LOG_LEVEL: zodOpenapi.z.enum(["trace", "debug", "info", "warn", "error"]).optional().default("debug"),
92
+ NANGO_SERVER_URL: zodOpenapi.z.string().optional().default("https://api.nango.dev"),
93
+ NANGO_SECRET_KEY: zodOpenapi.z.string().optional(),
94
+ ANTHROPIC_API_KEY: zodOpenapi.z.string(),
95
+ OPENAI_API_KEY: zodOpenapi.z.string().optional(),
96
+ GOOGLE_GENERATIVE_AI_API_KEY: zodOpenapi.z.string().optional(),
97
+ INKEEP_AGENTS_RUN_API_BYPASS_SECRET: zodOpenapi.z.string().optional(),
98
+ INKEEP_AGENTS_JWT_SIGNING_SECRET: zodOpenapi.z.string().optional(),
99
+ INKEEP_AGENTS_TEMP_JWT_PUBLIC_KEY: zodOpenapi.z.string().optional(),
100
+ OTEL_BSP_SCHEDULE_DELAY: zodOpenapi.z.coerce.number().optional().default(500),
101
+ OTEL_BSP_MAX_EXPORT_BATCH_SIZE: zodOpenapi.z.coerce.number().optional().default(64)
104
102
  });
105
103
  parseEnv = () => {
106
104
  try {
107
105
  return envSchema.parse(process.env);
108
106
  } catch (error) {
109
- if (error instanceof z8.z.ZodError) {
107
+ if (error instanceof zodOpenapi.z.ZodError) {
110
108
  const missingVars = error.issues.map((issue) => issue.path.join("."));
111
109
  throw new Error(
112
110
  `\u274C Invalid environment variables: ${missingVars.join(", ")}
@@ -6244,11 +6242,11 @@ var init_execution_limits = __esm({
6244
6242
  init_defaults();
6245
6243
  init_defaults();
6246
6244
  agentsCore.loadEnvironmentFiles();
6247
- constantsSchema = z8.z.object(
6245
+ constantsSchema = zodOpenapi.z.object(
6248
6246
  Object.fromEntries(
6249
6247
  Object.keys(executionLimitsDefaults).map((key) => [
6250
6248
  `AGENTS_${key}`,
6251
- z8.z.coerce.number().optional()
6249
+ zodOpenapi.z.coerce.number().optional()
6252
6250
  ])
6253
6251
  )
6254
6252
  );
@@ -10533,12 +10531,12 @@ ${conversationHistory}
10533
10531
  Previous updates sent to user:
10534
10532
  ${previousSummaries.map((s4, i3) => `${i3 + 1}. ${s4}`).join("\n")}
10535
10533
  ` : "";
10536
- const selectionSchema = z8.z.object(
10534
+ const selectionSchema = zodOpenapi.z.object(
10537
10535
  Object.fromEntries([
10538
10536
  [
10539
10537
  "no_relevant_updates",
10540
- z8.z.object({
10541
- no_updates: z8.z.boolean().default(true)
10538
+ zodOpenapi.z.object({
10539
+ no_updates: zodOpenapi.z.boolean().default(true)
10542
10540
  }).optional().describe(
10543
10541
  "Use when nothing substantially new to report. Should only use on its own."
10544
10542
  )
@@ -10672,8 +10670,8 @@ ${this.statusUpdateState?.config.prompt?.trim() || ""}`;
10672
10670
  if (component.detailsSchema && "properties" in component.detailsSchema) {
10673
10671
  return this.buildZodSchemaFromJson(component.detailsSchema);
10674
10672
  }
10675
- return z8.z.object({
10676
- label: z8.z.string().describe(
10673
+ return zodOpenapi.z.object({
10674
+ label: zodOpenapi.z.string().describe(
10677
10675
  'A short 3-5 word phrase, that is a descriptive label for the update component. This Label must be EXTREMELY unique to represent the UNIQUE update we are providing. The ACTUAL finding or result, not the action. What specific information was discovered? (e.g., "Slack requires OAuth 2.0 setup", "Found 5 integration methods", "API rate limit is 100/minute"). Include the actual detail or insight, not just that you searched or processed. CRITICAL: Only use facts explicitly found in the activities - NEVER invent names, people, organizations, or details that are not present in the actual tool results.'
10678
10676
  )
10679
10677
  });
@@ -10683,56 +10681,56 @@ ${this.statusUpdateState?.config.prompt?.trim() || ""}`;
10683
10681
  */
10684
10682
  buildZodSchemaFromJson(jsonSchema) {
10685
10683
  const properties = {};
10686
- properties.label = z8.z.string().describe(
10684
+ properties.label = zodOpenapi.z.string().describe(
10687
10685
  'A short 3-5 word phrase, that is a descriptive label for the update component. This Label must be EXTREMELY unique to represent the UNIQUE update we are providing. The SPECIFIC finding, result, or insight discovered (e.g., "Slack bot needs workspace admin role", "Found ingestion requires 3 steps", "Channel history limited to 10k messages"). State the ACTUAL information found, not that you searched. What did you LEARN or DISCOVER? What specific detail is now known? CRITICAL: Only use facts explicitly found in the activities - NEVER invent names, people, organizations, or details that are not present in the actual tool results.'
10688
10686
  );
10689
10687
  for (const [key, value] of Object.entries(jsonSchema.properties)) {
10690
10688
  let zodType;
10691
10689
  if (value.enum && Array.isArray(value.enum)) {
10692
10690
  if (value.enum.length === 1) {
10693
- zodType = z8.z.literal(value.enum[0]);
10691
+ zodType = zodOpenapi.z.literal(value.enum[0]);
10694
10692
  } else {
10695
10693
  const [first, ...rest] = value.enum;
10696
- zodType = z8.z.enum([first, ...rest]);
10694
+ zodType = zodOpenapi.z.enum([first, ...rest]);
10697
10695
  }
10698
10696
  } else if (value.type === "string") {
10699
- zodType = z8.z.string();
10697
+ zodType = zodOpenapi.z.string();
10700
10698
  if (value.minLength) zodType = zodType.min(value.minLength);
10701
10699
  if (value.maxLength) zodType = zodType.max(value.maxLength);
10702
10700
  if (value.format === "email") zodType = zodType.email();
10703
10701
  if (value.format === "url" || value.format === "uri")
10704
10702
  zodType = zodType.url();
10705
10703
  } else if (value.type === "number" || value.type === "integer") {
10706
- zodType = value.type === "integer" ? z8.z.number().int() : z8.z.number();
10704
+ zodType = value.type === "integer" ? zodOpenapi.z.number().int() : zodOpenapi.z.number();
10707
10705
  if (value.minimum !== void 0) zodType = zodType.min(value.minimum);
10708
10706
  if (value.maximum !== void 0) zodType = zodType.max(value.maximum);
10709
10707
  } else if (value.type === "boolean") {
10710
- zodType = z8.z.boolean();
10708
+ zodType = zodOpenapi.z.boolean();
10711
10709
  } else if (value.type === "array") {
10712
10710
  if (value.items) {
10713
10711
  if (value.items.enum && Array.isArray(value.items.enum)) {
10714
10712
  const [first, ...rest] = value.items.enum;
10715
- zodType = z8.z.array(z8.z.enum([first, ...rest]));
10713
+ zodType = zodOpenapi.z.array(zodOpenapi.z.enum([first, ...rest]));
10716
10714
  } else if (value.items.type === "string") {
10717
- zodType = z8.z.array(z8.z.string());
10715
+ zodType = zodOpenapi.z.array(zodOpenapi.z.string());
10718
10716
  } else if (value.items.type === "number") {
10719
- zodType = z8.z.array(z8.z.number());
10717
+ zodType = zodOpenapi.z.array(zodOpenapi.z.number());
10720
10718
  } else if (value.items.type === "boolean") {
10721
- zodType = z8.z.array(z8.z.boolean());
10719
+ zodType = zodOpenapi.z.array(zodOpenapi.z.boolean());
10722
10720
  } else if (value.items.type === "object") {
10723
- zodType = z8.z.array(z8.z.record(z8.z.string(), z8.z.any()));
10721
+ zodType = zodOpenapi.z.array(zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.any()));
10724
10722
  } else {
10725
- zodType = z8.z.array(z8.z.any());
10723
+ zodType = zodOpenapi.z.array(zodOpenapi.z.any());
10726
10724
  }
10727
10725
  } else {
10728
- zodType = z8.z.array(z8.z.any());
10726
+ zodType = zodOpenapi.z.array(zodOpenapi.z.any());
10729
10727
  }
10730
10728
  if (value.minItems) zodType = zodType.min(value.minItems);
10731
10729
  if (value.maxItems) zodType = zodType.max(value.maxItems);
10732
10730
  } else if (value.type === "object") {
10733
- zodType = z8.z.record(z8.z.string(), z8.z.any());
10731
+ zodType = zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.any());
10734
10732
  } else {
10735
- zodType = z8.z.any();
10733
+ zodType = zodOpenapi.z.any();
10736
10734
  }
10737
10735
  if (value.description) {
10738
10736
  zodType = zodType.describe(value.description);
@@ -10742,7 +10740,7 @@ ${this.statusUpdateState?.config.prompt?.trim() || ""}`;
10742
10740
  }
10743
10741
  properties[key] = zodType;
10744
10742
  }
10745
- return z8.z.object(properties);
10743
+ return zodOpenapi.z.object(properties);
10746
10744
  }
10747
10745
  /**
10748
10746
  * Extract user-visible activities with rich formatting and complete information
@@ -10973,9 +10971,9 @@ Make it specific and relevant.`;
10973
10971
  };
10974
10972
  } else {
10975
10973
  const model = agentsCore.ModelFactory.createModel(modelToUse);
10976
- const schema2 = z8.z.object({
10977
- name: z8.z.string().describe("Concise, descriptive name for the artifact"),
10978
- description: z8.z.string().describe("Brief description of the artifact's relevance to the user's question")
10974
+ const schema2 = zodOpenapi.z.object({
10975
+ name: zodOpenapi.z.string().describe("Concise, descriptive name for the artifact"),
10976
+ description: zodOpenapi.z.string().describe("Brief description of the artifact's relevance to the user's question")
10979
10977
  });
10980
10978
  const { object } = await tracer.startActiveSpan(
10981
10979
  "agent_session.generate_artifact_metadata",
@@ -12111,7 +12109,7 @@ var logger12 = agentsCore.getLogger("DataComponentSchema");
12111
12109
  function jsonSchemaToZod(jsonSchema) {
12112
12110
  if (!jsonSchema || typeof jsonSchema !== "object") {
12113
12111
  logger12.warn({ jsonSchema }, "Invalid JSON schema provided, using string fallback");
12114
- return z8.z.string();
12112
+ return zodOpenapi.z.string();
12115
12113
  }
12116
12114
  switch (jsonSchema.type) {
12117
12115
  case "object":
@@ -12120,22 +12118,22 @@ function jsonSchemaToZod(jsonSchema) {
12120
12118
  for (const [key, prop] of Object.entries(jsonSchema.properties)) {
12121
12119
  shape[key] = jsonSchemaToZod(prop);
12122
12120
  }
12123
- return z8.z.object(shape);
12121
+ return zodOpenapi.z.object(shape);
12124
12122
  }
12125
- return z8.z.record(z8.z.string(), z8.z.unknown());
12123
+ return zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.unknown());
12126
12124
  case "array": {
12127
- const itemSchema = jsonSchema.items ? jsonSchemaToZod(jsonSchema.items) : z8.z.unknown();
12128
- return z8.z.array(itemSchema);
12125
+ const itemSchema = jsonSchema.items ? jsonSchemaToZod(jsonSchema.items) : zodOpenapi.z.unknown();
12126
+ return zodOpenapi.z.array(itemSchema);
12129
12127
  }
12130
12128
  case "string":
12131
- return z8.z.string();
12129
+ return zodOpenapi.z.string();
12132
12130
  case "number":
12133
12131
  case "integer":
12134
- return z8.z.number();
12132
+ return zodOpenapi.z.number();
12135
12133
  case "boolean":
12136
- return z8.z.boolean();
12134
+ return zodOpenapi.z.boolean();
12137
12135
  case "null":
12138
- return z8.z.null();
12136
+ return zodOpenapi.z.null();
12139
12137
  default:
12140
12138
  logger12.warn(
12141
12139
  {
@@ -12144,7 +12142,7 @@ function jsonSchemaToZod(jsonSchema) {
12144
12142
  },
12145
12143
  "Unsupported JSON schema type, using unknown validation"
12146
12144
  );
12147
- return z8.z.unknown();
12145
+ return zodOpenapi.z.unknown();
12148
12146
  }
12149
12147
  }
12150
12148
 
@@ -12391,9 +12389,9 @@ var ArtifactReferenceSchema = class _ArtifactReferenceSchema {
12391
12389
  * Get the standard Zod schema for artifact reference components
12392
12390
  */
12393
12391
  static getSchema() {
12394
- return z8.z.object({
12395
- id: z8.z.string(),
12396
- name: z8.z.literal("Artifact"),
12392
+ return zodOpenapi.z.object({
12393
+ id: zodOpenapi.z.string(),
12394
+ name: zodOpenapi.z.literal("Artifact"),
12397
12395
  props: jsonSchemaToZod(_ArtifactReferenceSchema.ARTIFACT_PROPS_SCHEMA)
12398
12396
  });
12399
12397
  }
@@ -12444,9 +12442,9 @@ var ArtifactCreateSchema = class {
12444
12442
  },
12445
12443
  required: ["id", "tool_call_id", "type", "base_selector"]
12446
12444
  };
12447
- return z8.z.object({
12448
- id: z8.z.string(),
12449
- name: z8.z.literal(`ArtifactCreate_${component.name}`),
12445
+ return zodOpenapi.z.object({
12446
+ id: zodOpenapi.z.string(),
12447
+ name: zodOpenapi.z.literal(`ArtifactCreate_${component.name}`),
12450
12448
  props: jsonSchemaToZod(propsSchema)
12451
12449
  });
12452
12450
  });
@@ -13231,7 +13229,7 @@ var createTransferToAgentTool = ({
13231
13229
  const toolDescription = generateTransferToolDescription(transferConfig);
13232
13230
  return ai.tool({
13233
13231
  description: toolDescription,
13234
- inputSchema: z8__default.default.object({}),
13232
+ inputSchema: zodOpenapi.z.object({}),
13235
13233
  execute: async () => {
13236
13234
  const activeSpan = api.trace.getActiveSpan();
13237
13235
  if (activeSpan) {
@@ -13286,7 +13284,7 @@ function createDelegateToAgentTool({
13286
13284
  }) {
13287
13285
  return ai.tool({
13288
13286
  description: generateDelegateToolDescription(delegateConfig),
13289
- inputSchema: z8__default.default.object({ message: z8__default.default.string() }),
13287
+ inputSchema: zodOpenapi.z.object({ message: zodOpenapi.z.string() }),
13290
13288
  execute: async (input, context) => {
13291
13289
  const delegationId = `del_${agentsCore.generateId()}`;
13292
13290
  const activeSpan = api.trace.getActiveSpan();
@@ -15646,9 +15644,9 @@ var Agent = class {
15646
15644
  getArtifactTools() {
15647
15645
  return ai.tool({
15648
15646
  description: "Call this tool to get the complete artifact data with the given artifactId. This retrieves the full artifact content (not just the summary). Only use this when you need the complete artifact data and the summary shown in your context is insufficient.",
15649
- inputSchema: z8.z.object({
15650
- artifactId: z8.z.string().describe("The unique identifier of the artifact to get."),
15651
- toolCallId: z8.z.string().describe("The tool call ID associated with this artifact.")
15647
+ inputSchema: zodOpenapi.z.object({
15648
+ artifactId: zodOpenapi.z.string().describe("The unique identifier of the artifact to get."),
15649
+ toolCallId: zodOpenapi.z.string().describe("The tool call ID associated with this artifact.")
15652
15650
  }),
15653
15651
  execute: async ({ artifactId, toolCallId }) => {
15654
15652
  logger19.info({ artifactId, toolCallId }, "get_artifact_full executed");
@@ -15675,9 +15673,9 @@ var Agent = class {
15675
15673
  createThinkingCompleteTool() {
15676
15674
  return ai.tool({
15677
15675
  description: "\u{1F6A8} CRITICAL: Call this tool IMMEDIATELY when you have gathered enough information to answer the user. This is MANDATORY - you CANNOT provide text responses in thinking mode, only tool calls. Call thinking_complete as soon as you have sufficient data to generate a structured response.",
15678
- inputSchema: z8.z.object({
15679
- complete: z8.z.boolean().describe("ALWAYS set to true - marks end of research phase"),
15680
- summary: z8.z.string().describe(
15676
+ inputSchema: zodOpenapi.z.object({
15677
+ complete: zodOpenapi.z.boolean().describe("ALWAYS set to true - marks end of research phase"),
15678
+ summary: zodOpenapi.z.string().describe(
15681
15679
  "Brief summary of what information was gathered and why it is sufficient to answer the user"
15682
15680
  )
15683
15681
  }),
@@ -16368,9 +16366,9 @@ ${output}${structureHintsFormatted}`;
16368
16366
  this.config.dataComponents.forEach((dc) => {
16369
16367
  const propsSchema = jsonSchemaToZod(dc.props);
16370
16368
  componentSchemas.push(
16371
- z8.z.object({
16372
- id: z8.z.string(),
16373
- name: z8.z.literal(dc.name),
16369
+ zodOpenapi.z.object({
16370
+ id: zodOpenapi.z.string(),
16371
+ name: zodOpenapi.z.literal(dc.name),
16374
16372
  props: propsSchema
16375
16373
  })
16376
16374
  );
@@ -16387,7 +16385,7 @@ ${output}${structureHintsFormatted}`;
16387
16385
  if (componentSchemas.length === 1) {
16388
16386
  dataComponentsSchema = componentSchemas[0];
16389
16387
  } else {
16390
- dataComponentsSchema = z8.z.union(
16388
+ dataComponentsSchema = zodOpenapi.z.union(
16391
16389
  componentSchemas
16392
16390
  );
16393
16391
  }
@@ -16429,8 +16427,8 @@ ${output}${structureHintsFormatted}`;
16429
16427
  const streamResult = ai.streamObject({
16430
16428
  ...structuredModelSettings,
16431
16429
  messages: phase2Messages,
16432
- schema: z8.z.object({
16433
- dataComponents: z8.z.array(dataComponentsSchema)
16430
+ schema: zodOpenapi.z.object({
16431
+ dataComponents: zodOpenapi.z.array(dataComponentsSchema)
16434
16432
  }),
16435
16433
  experimental_telemetry: {
16436
16434
  isEnabled: true,
@@ -16500,8 +16498,8 @@ ${output}${structureHintsFormatted}`;
16500
16498
  withJsonPostProcessing2({
16501
16499
  ...structuredModelSettings,
16502
16500
  messages: phase2Messages,
16503
- schema: z8.z.object({
16504
- dataComponents: z8.z.array(dataComponentsSchema)
16501
+ schema: zodOpenapi.z.object({
16502
+ dataComponents: zodOpenapi.z.array(dataComponentsSchema)
16505
16503
  }),
16506
16504
  experimental_telemetry: {
16507
16505
  isEnabled: true,
@@ -17342,14 +17340,14 @@ app.openapi(
17342
17340
  description: "Agent Card for A2A discovery",
17343
17341
  content: {
17344
17342
  "application/json": {
17345
- schema: z8.z.object({
17346
- name: z8.z.string(),
17347
- description: z8.z.string().optional(),
17348
- url: z8.z.string(),
17349
- version: z8.z.string(),
17350
- defaultInputModes: z8.z.array(z8.z.string()),
17351
- defaultOutputModes: z8.z.array(z8.z.string()),
17352
- skills: z8.z.array(z8.z.any())
17343
+ schema: zodOpenapi.z.object({
17344
+ name: zodOpenapi.z.string(),
17345
+ description: zodOpenapi.z.string().optional(),
17346
+ url: zodOpenapi.z.string(),
17347
+ version: zodOpenapi.z.string(),
17348
+ defaultInputModes: zodOpenapi.z.array(zodOpenapi.z.string()),
17349
+ defaultOutputModes: zodOpenapi.z.array(zodOpenapi.z.string()),
17350
+ skills: zodOpenapi.z.array(zodOpenapi.z.any())
17353
17351
  })
17354
17352
  }
17355
17353
  }
@@ -18621,36 +18619,36 @@ var chatCompletionsRoute = zodOpenapi.createRoute({
18621
18619
  body: {
18622
18620
  content: {
18623
18621
  "application/json": {
18624
- schema: z8.z.object({
18625
- model: z8.z.string().describe("The model to use for the completion"),
18626
- messages: z8.z.array(
18627
- z8.z.object({
18628
- role: z8.z.enum(["system", "user", "assistant", "function", "tool"]).describe("The role of the message"),
18629
- content: z8.z.union([
18630
- z8.z.string(),
18631
- z8.z.array(
18632
- z8.z.strictObject({
18633
- type: z8.z.string(),
18634
- text: z8.z.string().optional()
18622
+ schema: zodOpenapi.z.object({
18623
+ model: zodOpenapi.z.string().describe("The model to use for the completion"),
18624
+ messages: zodOpenapi.z.array(
18625
+ zodOpenapi.z.object({
18626
+ role: zodOpenapi.z.enum(["system", "user", "assistant", "function", "tool"]).describe("The role of the message"),
18627
+ content: zodOpenapi.z.union([
18628
+ zodOpenapi.z.string(),
18629
+ zodOpenapi.z.array(
18630
+ zodOpenapi.z.strictObject({
18631
+ type: zodOpenapi.z.string(),
18632
+ text: zodOpenapi.z.string().optional()
18635
18633
  })
18636
18634
  )
18637
18635
  ]).describe("The message content"),
18638
- name: z8.z.string().optional().describe("The name of the message sender")
18636
+ name: zodOpenapi.z.string().optional().describe("The name of the message sender")
18639
18637
  })
18640
18638
  ).describe("The conversation messages"),
18641
- temperature: z8.z.number().optional().describe("Controls randomness (0-1)"),
18642
- top_p: z8.z.number().optional().describe("Controls nucleus sampling"),
18643
- n: z8.z.number().optional().describe("Number of completions to generate"),
18644
- stream: z8.z.boolean().optional().describe("Whether to stream the response"),
18645
- max_tokens: z8.z.number().optional().describe("Maximum tokens to generate"),
18646
- presence_penalty: z8.z.number().optional().describe("Presence penalty (-2 to 2)"),
18647
- frequency_penalty: z8.z.number().optional().describe("Frequency penalty (-2 to 2)"),
18648
- logit_bias: z8.z.record(z8.z.string(), z8.z.number()).optional().describe("Token logit bias"),
18649
- user: z8.z.string().optional().describe("User identifier"),
18650
- conversationId: z8.z.string().optional().describe("Conversation ID for multi-turn chat"),
18651
- tools: z8.z.array(z8.z.string()).optional().describe("Available tools"),
18652
- runConfig: z8.z.record(z8.z.string(), z8.z.unknown()).optional().describe("Run configuration"),
18653
- headers: z8.z.record(z8.z.string(), z8.z.unknown()).optional().describe(
18639
+ temperature: zodOpenapi.z.number().optional().describe("Controls randomness (0-1)"),
18640
+ top_p: zodOpenapi.z.number().optional().describe("Controls nucleus sampling"),
18641
+ n: zodOpenapi.z.number().optional().describe("Number of completions to generate"),
18642
+ stream: zodOpenapi.z.boolean().optional().describe("Whether to stream the response"),
18643
+ max_tokens: zodOpenapi.z.number().optional().describe("Maximum tokens to generate"),
18644
+ presence_penalty: zodOpenapi.z.number().optional().describe("Presence penalty (-2 to 2)"),
18645
+ frequency_penalty: zodOpenapi.z.number().optional().describe("Frequency penalty (-2 to 2)"),
18646
+ logit_bias: zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.number()).optional().describe("Token logit bias"),
18647
+ user: zodOpenapi.z.string().optional().describe("User identifier"),
18648
+ conversationId: zodOpenapi.z.string().optional().describe("Conversation ID for multi-turn chat"),
18649
+ tools: zodOpenapi.z.array(zodOpenapi.z.string()).optional().describe("Available tools"),
18650
+ runConfig: zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.unknown()).optional().describe("Run configuration"),
18651
+ headers: zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.unknown()).optional().describe(
18654
18652
  "Headers data for template processing (validated against context config schema)"
18655
18653
  )
18656
18654
  })
@@ -18661,14 +18659,14 @@ var chatCompletionsRoute = zodOpenapi.createRoute({
18661
18659
  responses: {
18662
18660
  200: {
18663
18661
  description: "Streaming chat completion response in Server-Sent Events format",
18664
- headers: z8.z.object({
18665
- "Content-Type": z8.z.string().default("text/event-stream"),
18666
- "Cache-Control": z8.z.string().default("no-cache"),
18667
- Connection: z8.z.string().default("keep-alive")
18662
+ headers: zodOpenapi.z.object({
18663
+ "Content-Type": zodOpenapi.z.string().default("text/event-stream"),
18664
+ "Cache-Control": zodOpenapi.z.string().default("no-cache"),
18665
+ Connection: zodOpenapi.z.string().default("keep-alive")
18668
18666
  }),
18669
18667
  content: {
18670
18668
  "text/event-stream": {
18671
- schema: z8.z.string().describe("Server-Sent Events stream with chat completion chunks")
18669
+ schema: zodOpenapi.z.string().describe("Server-Sent Events stream with chat completion chunks")
18672
18670
  }
18673
18671
  }
18674
18672
  },
@@ -18676,13 +18674,13 @@ var chatCompletionsRoute = zodOpenapi.createRoute({
18676
18674
  description: "Invalid request context or parameters",
18677
18675
  content: {
18678
18676
  "application/json": {
18679
- schema: z8.z.object({
18680
- error: z8.z.string(),
18681
- details: z8.z.array(
18682
- z8.z.object({
18683
- field: z8.z.string(),
18684
- message: z8.z.string(),
18685
- value: z8.z.unknown().optional()
18677
+ schema: zodOpenapi.z.object({
18678
+ error: zodOpenapi.z.string(),
18679
+ details: zodOpenapi.z.array(
18680
+ zodOpenapi.z.object({
18681
+ field: zodOpenapi.z.string(),
18682
+ message: zodOpenapi.z.string(),
18683
+ value: zodOpenapi.z.unknown().optional()
18686
18684
  })
18687
18685
  ).optional()
18688
18686
  })
@@ -18693,8 +18691,8 @@ var chatCompletionsRoute = zodOpenapi.createRoute({
18693
18691
  description: "Agent or agent not found",
18694
18692
  content: {
18695
18693
  "application/json": {
18696
- schema: z8.z.object({
18697
- error: z8.z.string()
18694
+ schema: zodOpenapi.z.object({
18695
+ error: zodOpenapi.z.string()
18698
18696
  })
18699
18697
  }
18700
18698
  }
@@ -18703,9 +18701,9 @@ var chatCompletionsRoute = zodOpenapi.createRoute({
18703
18701
  description: "Internal server error",
18704
18702
  content: {
18705
18703
  "application/json": {
18706
- schema: z8.z.object({
18707
- error: z8.z.string(),
18708
- message: z8.z.string()
18704
+ schema: zodOpenapi.z.object({
18705
+ error: zodOpenapi.z.string(),
18706
+ message: zodOpenapi.z.string()
18709
18707
  })
18710
18708
  }
18711
18709
  }
@@ -19556,7 +19554,7 @@ var getServer = async (headers2, executionContext, conversationId, credentialSto
19556
19554
  "send-query-to-agent",
19557
19555
  `Send a query to the ${agent.name} agent. The agent has the following description: ${agent.description}`,
19558
19556
  {
19559
- query: z8.z.string().describe("The query to send to the agent")
19557
+ query: zodOpenapi.z.string().describe("The query to send to the agent")
19560
19558
  },
19561
19559
  async ({ query }) => {
19562
19560
  try {
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
- import { flushBatchProcessor } from './chunk-AZFBQY6E.js';
2
- import { getFormattedConversationHistory, createDefaultConversationHistoryConfig, saveA2AMessageResponse } from './chunk-M46DFVYB.js';
3
- import { dbClient_default } from './chunk-V4RNZ6BX.js';
4
- import { env } from './chunk-IYG4HUQ6.js';
1
+ import { flushBatchProcessor } from './chunk-QOUOKHYQ.js';
2
+ import { getFormattedConversationHistory, createDefaultConversationHistoryConfig, saveA2AMessageResponse } from './chunk-BQB27EXW.js';
3
+ import { dbClient_default } from './chunk-W6UIBREL.js';
4
+ import { env } from './chunk-CDYXP4BN.js';
5
5
  import { getLogger } from './chunk-A2S7GSHL.js';
6
- import { SESSION_CLEANUP_INTERVAL_MS, AGENT_EXECUTION_MAX_CONSECUTIVE_ERRORS, SESSION_TOOL_RESULT_CACHE_TIMEOUT_MS, STREAM_MAX_LIFETIME_MS, STREAM_BUFFER_MAX_SIZE_BYTES, STREAM_TEXT_GAP_THRESHOLD_MS, ARTIFACT_GENERATION_MAX_RETRIES, ARTIFACT_SESSION_MAX_PENDING, STATUS_UPDATE_DEFAULT_INTERVAL_SECONDS, STATUS_UPDATE_DEFAULT_NUM_EVENTS, ARTIFACT_SESSION_MAX_PREVIOUS_SUMMARIES, AGENT_EXECUTION_MAX_GENERATION_STEPS, FUNCTION_TOOL_SANDBOX_VCPUS_DEFAULT, FUNCTION_TOOL_EXECUTION_TIMEOUT_MS_DEFAULT, LLM_GENERATION_MAX_ALLOWED_TIMEOUT_MS, ARTIFACT_GENERATION_BACKOFF_INITIAL_MS, ARTIFACT_GENERATION_BACKOFF_MAX_MS, LLM_GENERATION_FIRST_CALL_TIMEOUT_MS_STREAMING, LLM_GENERATION_FIRST_CALL_TIMEOUT_MS_NON_STREAMING, LLM_GENERATION_SUBSEQUENT_CALL_TIMEOUT_MS, DELEGATION_TOOL_BACKOFF_MAX_ELAPSED_TIME_MS, DELEGATION_TOOL_BACKOFF_EXPONENT, DELEGATION_TOOL_BACKOFF_MAX_INTERVAL_MS, DELEGATION_TOOL_BACKOFF_INITIAL_INTERVAL_MS, STREAM_PARSER_MAX_SNAPSHOT_SIZE, STREAM_PARSER_MAX_STREAMED_SIZE, STREAM_PARSER_MAX_COLLECTED_PARTS } from './chunk-IVALDC72.js';
6
+ import { SESSION_CLEANUP_INTERVAL_MS, AGENT_EXECUTION_MAX_CONSECUTIVE_ERRORS, SESSION_TOOL_RESULT_CACHE_TIMEOUT_MS, STREAM_MAX_LIFETIME_MS, STREAM_BUFFER_MAX_SIZE_BYTES, STREAM_TEXT_GAP_THRESHOLD_MS, ARTIFACT_GENERATION_MAX_RETRIES, ARTIFACT_SESSION_MAX_PENDING, STATUS_UPDATE_DEFAULT_INTERVAL_SECONDS, STATUS_UPDATE_DEFAULT_NUM_EVENTS, ARTIFACT_SESSION_MAX_PREVIOUS_SUMMARIES, AGENT_EXECUTION_MAX_GENERATION_STEPS, FUNCTION_TOOL_SANDBOX_VCPUS_DEFAULT, FUNCTION_TOOL_EXECUTION_TIMEOUT_MS_DEFAULT, LLM_GENERATION_MAX_ALLOWED_TIMEOUT_MS, ARTIFACT_GENERATION_BACKOFF_INITIAL_MS, ARTIFACT_GENERATION_BACKOFF_MAX_MS, LLM_GENERATION_FIRST_CALL_TIMEOUT_MS_STREAMING, LLM_GENERATION_FIRST_CALL_TIMEOUT_MS_NON_STREAMING, LLM_GENERATION_SUBSEQUENT_CALL_TIMEOUT_MS, DELEGATION_TOOL_BACKOFF_MAX_ELAPSED_TIME_MS, DELEGATION_TOOL_BACKOFF_EXPONENT, DELEGATION_TOOL_BACKOFF_MAX_INTERVAL_MS, DELEGATION_TOOL_BACKOFF_INITIAL_INTERVAL_MS, STREAM_PARSER_MAX_SNAPSHOT_SIZE, STREAM_PARSER_MAX_STREAMED_SIZE, STREAM_PARSER_MAX_COLLECTED_PARTS } from './chunk-SUUSOBLI.js';
7
7
  import { getTracer, HeadersScopeSchema, getRequestExecutionContext, createApiError, getAgentWithDefaultSubAgent, contextValidationMiddleware, getConversationId, getFullAgent, createOrGetConversation, getActiveAgentForConversation, setActiveAgentForConversation, getSubAgentById, handleContextResolution, createMessage, generateId, commonGetErrorResponses, loggerFactory, getConversation, createDefaultCredentialStores, CredentialStoreRegistry, createTask, getTask, updateTask, setSpanWithError, AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT, updateConversation, handleApiError, TaskState, getAgentById, getProject, setActiveAgentForThread, getRelatedAgentsForAgent, getExternalAgentsForSubAgent, getTeamAgentsForSubAgent, getToolsForAgent, getDataComponentsForAgent, getArtifactComponentsForAgent, dbResultToMcpTool, CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT, CONVERSATION_HISTORY_DEFAULT_LIMIT, ModelFactory, verifyTempToken, validateAndGetApiKey, verifyServiceToken, validateTargetAgent, ContextResolver, CredentialStuffer, MCPServerType, getCredentialReference, McpClient, getFunctionToolsForSubAgent, getFunction, getContextConfigById, getFullAgentDefinition, TemplateEngine, listTaskIdsByContextId, getLedgerArtifacts, agentHasArtifactComponents, upsertLedgerArtifact, MCPTransportType, SPAN_KEYS, headers, generateServiceToken } from '@inkeep/agents-core';
8
8
  import { otel } from '@hono/otel';
9
- import { OpenAPIHono, createRoute, z as z$1 } from '@hono/zod-openapi';
9
+ import { OpenAPIHono, createRoute, z } from '@hono/zod-openapi';
10
10
  import { trace, propagation, context, SpanStatusCode } from '@opentelemetry/api';
11
11
  import { Hono } from 'hono';
12
12
  import { cors } from 'hono/cors';
@@ -14,7 +14,6 @@ import { HTTPException } from 'hono/http-exception';
14
14
  import { requestId } from 'hono/request-id';
15
15
  import { createMiddleware } from 'hono/factory';
16
16
  import { swaggerUI } from '@hono/swagger-ui';
17
- import z5, { z } from 'zod';
18
17
  import { streamSSE, stream } from 'hono/streaming';
19
18
  import { createUIMessageStream, JsonToSseTransformStream, parsePartialJson, generateObject, tool, streamText, generateText, streamObject } from 'ai';
20
19
  import jmespath from 'jmespath';
@@ -5580,7 +5579,7 @@ var createTransferToAgentTool = ({
5580
5579
  const toolDescription = generateTransferToolDescription(transferConfig);
5581
5580
  return tool({
5582
5581
  description: toolDescription,
5583
- inputSchema: z5.object({}),
5582
+ inputSchema: z.object({}),
5584
5583
  execute: async () => {
5585
5584
  const activeSpan = trace.getActiveSpan();
5586
5585
  if (activeSpan) {
@@ -5635,7 +5634,7 @@ function createDelegateToAgentTool({
5635
5634
  }) {
5636
5635
  return tool({
5637
5636
  description: generateDelegateToolDescription(delegateConfig),
5638
- inputSchema: z5.object({ message: z5.string() }),
5637
+ inputSchema: z.object({ message: z.string() }),
5639
5638
  execute: async (input, context) => {
5640
5639
  const delegationId = `del_${generateId()}`;
5641
5640
  const activeSpan = trace.getActiveSpan();
@@ -7653,7 +7652,7 @@ var Agent = class {
7653
7652
  if (functionToolsData.length === 0) {
7654
7653
  return functionTools;
7655
7654
  }
7656
- const { SandboxExecutorFactory } = await import('./SandboxExecutorFactory-FVKDJKKZ.js');
7655
+ const { SandboxExecutorFactory } = await import('./SandboxExecutorFactory-A2LTPE2X.js');
7657
7656
  const sandboxExecutor = SandboxExecutorFactory.getInstance();
7658
7657
  for (const functionToolDef of functionToolsData) {
7659
7658
  const functionId = functionToolDef.functionId;
@@ -7947,7 +7946,7 @@ var Agent = class {
7947
7946
  inputSchema: tool3.inputSchema || tool3.parameters || {},
7948
7947
  usageGuidelines: name.startsWith("transfer_to_") || name.startsWith("delegate_to_") ? `Use this tool to ${name.startsWith("transfer_to_") ? "transfer" : "delegate"} to another agent when appropriate.` : "Use this tool when appropriate for the task at hand."
7949
7948
  }));
7950
- const { getConversationScopedArtifacts } = await import('./conversations-NZLQK64L.js');
7949
+ const { getConversationScopedArtifacts } = await import('./conversations-33GSAG2C.js');
7951
7950
  const historyConfig = this.config.conversationHistoryConfig ?? createDefaultConversationHistoryConfig();
7952
7951
  const referenceArtifacts = await getConversationScopedArtifacts({
7953
7952
  tenantId: this.config.tenantId,
@@ -11297,29 +11296,29 @@ var chatDataStreamRoute = createRoute({
11297
11296
  body: {
11298
11297
  content: {
11299
11298
  "application/json": {
11300
- schema: z$1.object({
11301
- model: z$1.string().optional(),
11302
- messages: z$1.array(
11303
- z$1.object({
11304
- role: z$1.enum(["system", "user", "assistant", "function", "tool"]),
11305
- content: z$1.any(),
11306
- parts: z$1.array(
11307
- z$1.object({
11308
- type: z$1.union([
11309
- z$1.enum(["text", "image", "audio", "video", "file"]),
11310
- z$1.string().regex(/^data-/, 'Type must start with "data-"')
11299
+ schema: z.object({
11300
+ model: z.string().optional(),
11301
+ messages: z.array(
11302
+ z.object({
11303
+ role: z.enum(["system", "user", "assistant", "function", "tool"]),
11304
+ content: z.any(),
11305
+ parts: z.array(
11306
+ z.object({
11307
+ type: z.union([
11308
+ z.enum(["text", "image", "audio", "video", "file"]),
11309
+ z.string().regex(/^data-/, 'Type must start with "data-"')
11311
11310
  ]),
11312
- text: z$1.string().optional()
11311
+ text: z.string().optional()
11313
11312
  })
11314
11313
  ).optional()
11315
11314
  })
11316
11315
  ),
11317
- id: z$1.string().optional(),
11318
- conversationId: z$1.string().optional(),
11319
- stream: z$1.boolean().optional().describe("Whether to stream the response").default(true),
11320
- max_tokens: z$1.number().optional().describe("Maximum tokens to generate"),
11321
- headers: z$1.record(z$1.string(), z$1.unknown()).optional().describe("Headers data for template processing"),
11322
- runConfig: z$1.record(z$1.string(), z$1.unknown()).optional().describe("Run configuration")
11316
+ id: z.string().optional(),
11317
+ conversationId: z.string().optional(),
11318
+ stream: z.boolean().optional().describe("Whether to stream the response").default(true),
11319
+ max_tokens: z.number().optional().describe("Maximum tokens to generate"),
11320
+ headers: z.record(z.string(), z.unknown()).optional().describe("Headers data for template processing"),
11321
+ runConfig: z.record(z.string(), z.unknown()).optional().describe("Run configuration")
11323
11322
  })
11324
11323
  }
11325
11324
  }
@@ -11328,9 +11327,9 @@ var chatDataStreamRoute = createRoute({
11328
11327
  responses: {
11329
11328
  200: {
11330
11329
  description: "Streamed chat completion",
11331
- headers: z$1.object({
11332
- "Content-Type": z$1.string().default("text/plain; charset=utf-8"),
11333
- "x-vercel-ai-data-stream": z$1.string().default("v1")
11330
+ headers: z.object({
11331
+ "Content-Type": z.string().default("text/plain; charset=utf-8"),
11332
+ "x-vercel-ai-data-stream": z.string().default("v1")
11334
11333
  })
11335
11334
  },
11336
11335
  ...commonGetErrorResponses
@@ -11543,11 +11542,11 @@ var toolApprovalRoute = createRoute({
11543
11542
  body: {
11544
11543
  content: {
11545
11544
  "application/json": {
11546
- schema: z$1.object({
11547
- conversationId: z$1.string().describe("The conversation ID"),
11548
- toolCallId: z$1.string().describe("The tool call ID to respond to"),
11549
- approved: z$1.boolean().describe("Whether the tool execution is approved"),
11550
- reason: z$1.string().optional().describe("Optional reason for the decision")
11545
+ schema: z.object({
11546
+ conversationId: z.string().describe("The conversation ID"),
11547
+ toolCallId: z.string().describe("The tool call ID to respond to"),
11548
+ approved: z.boolean().describe("Whether the tool execution is approved"),
11549
+ reason: z.string().optional().describe("Optional reason for the decision")
11551
11550
  })
11552
11551
  }
11553
11552
  }
@@ -11558,9 +11557,9 @@ var toolApprovalRoute = createRoute({
11558
11557
  description: "Tool approval response processed successfully",
11559
11558
  content: {
11560
11559
  "application/json": {
11561
- schema: z$1.object({
11562
- success: z$1.boolean(),
11563
- message: z$1.string().optional()
11560
+ schema: z.object({
11561
+ success: z.boolean(),
11562
+ message: z.string().optional()
11564
11563
  })
11565
11564
  }
11566
11565
  }
@@ -11569,8 +11568,8 @@ var toolApprovalRoute = createRoute({
11569
11568
  description: "Bad request - invalid tool call ID or conversation ID",
11570
11569
  content: {
11571
11570
  "application/json": {
11572
- schema: z$1.object({
11573
- error: z$1.string()
11571
+ schema: z.object({
11572
+ error: z.string()
11574
11573
  })
11575
11574
  }
11576
11575
  }
@@ -11579,8 +11578,8 @@ var toolApprovalRoute = createRoute({
11579
11578
  description: "Tool call not found or already processed",
11580
11579
  content: {
11581
11580
  "application/json": {
11582
- schema: z$1.object({
11583
- error: z$1.string()
11581
+ schema: z.object({
11582
+ error: z.string()
11584
11583
  })
11585
11584
  }
11586
11585
  }
@@ -11589,9 +11588,9 @@ var toolApprovalRoute = createRoute({
11589
11588
  description: "Internal server error",
11590
11589
  content: {
11591
11590
  "application/json": {
11592
- schema: z$1.object({
11593
- error: z$1.string(),
11594
- message: z$1.string()
11591
+ schema: z.object({
11592
+ error: z.string(),
11593
+ message: z.string()
11595
11594
  })
11596
11595
  }
11597
11596
  }
@@ -10,33 +10,33 @@ var sdkNode = require('@opentelemetry/sdk-node');
10
10
  var sdkTraceBase = require('@opentelemetry/sdk-trace-base');
11
11
  var semanticConventions = require('@opentelemetry/semantic-conventions');
12
12
  var agentsCore = require('@inkeep/agents-core');
13
- var zod = require('zod');
13
+ var zodOpenapi = require('@hono/zod-openapi');
14
14
 
15
15
  // src/instrumentation.ts
16
16
  agentsCore.loadEnvironmentFiles();
17
- var envSchema = zod.z.object({
18
- NODE_ENV: zod.z.enum(["development", "production", "test"]).optional(),
19
- ENVIRONMENT: zod.z.enum(["development", "production", "pentest", "test"]).optional().default("development"),
20
- DATABASE_URL: zod.z.string().optional(),
21
- INKEEP_AGENTS_RUN_API_URL: zod.z.string().optional().default("http://localhost:3003"),
22
- AGENTS_MANAGE_UI_URL: zod.z.string().optional().default("http://localhost:3000"),
23
- LOG_LEVEL: zod.z.enum(["trace", "debug", "info", "warn", "error"]).optional().default("debug"),
24
- NANGO_SERVER_URL: zod.z.string().optional().default("https://api.nango.dev"),
25
- NANGO_SECRET_KEY: zod.z.string().optional(),
26
- ANTHROPIC_API_KEY: zod.z.string(),
27
- OPENAI_API_KEY: zod.z.string().optional(),
28
- GOOGLE_GENERATIVE_AI_API_KEY: zod.z.string().optional(),
29
- INKEEP_AGENTS_RUN_API_BYPASS_SECRET: zod.z.string().optional(),
30
- INKEEP_AGENTS_JWT_SIGNING_SECRET: zod.z.string().optional(),
31
- INKEEP_AGENTS_TEMP_JWT_PUBLIC_KEY: zod.z.string().optional(),
32
- OTEL_BSP_SCHEDULE_DELAY: zod.z.coerce.number().optional().default(500),
33
- OTEL_BSP_MAX_EXPORT_BATCH_SIZE: zod.z.coerce.number().optional().default(64)
17
+ var envSchema = zodOpenapi.z.object({
18
+ NODE_ENV: zodOpenapi.z.enum(["development", "production", "test"]).optional(),
19
+ ENVIRONMENT: zodOpenapi.z.enum(["development", "production", "pentest", "test"]).optional().default("development"),
20
+ DATABASE_URL: zodOpenapi.z.string().optional(),
21
+ INKEEP_AGENTS_RUN_API_URL: zodOpenapi.z.string().optional().default("http://localhost:3003"),
22
+ AGENTS_MANAGE_UI_URL: zodOpenapi.z.string().optional().default("http://localhost:3000"),
23
+ LOG_LEVEL: zodOpenapi.z.enum(["trace", "debug", "info", "warn", "error"]).optional().default("debug"),
24
+ NANGO_SERVER_URL: zodOpenapi.z.string().optional().default("https://api.nango.dev"),
25
+ NANGO_SECRET_KEY: zodOpenapi.z.string().optional(),
26
+ ANTHROPIC_API_KEY: zodOpenapi.z.string(),
27
+ OPENAI_API_KEY: zodOpenapi.z.string().optional(),
28
+ GOOGLE_GENERATIVE_AI_API_KEY: zodOpenapi.z.string().optional(),
29
+ INKEEP_AGENTS_RUN_API_BYPASS_SECRET: zodOpenapi.z.string().optional(),
30
+ INKEEP_AGENTS_JWT_SIGNING_SECRET: zodOpenapi.z.string().optional(),
31
+ INKEEP_AGENTS_TEMP_JWT_PUBLIC_KEY: zodOpenapi.z.string().optional(),
32
+ OTEL_BSP_SCHEDULE_DELAY: zodOpenapi.z.coerce.number().optional().default(500),
33
+ OTEL_BSP_MAX_EXPORT_BATCH_SIZE: zodOpenapi.z.coerce.number().optional().default(64)
34
34
  });
35
35
  var parseEnv = () => {
36
36
  try {
37
37
  return envSchema.parse(process.env);
38
38
  } catch (error) {
39
- if (error instanceof zod.z.ZodError) {
39
+ if (error instanceof zodOpenapi.z.ZodError) {
40
40
  const missingVars = error.issues.map((issue) => issue.path.join("."));
41
41
  throw new Error(
42
42
  `\u274C Invalid environment variables: ${missingVars.join(", ")}
@@ -1 +1 @@
1
- export { defaultBatchProcessor, defaultContextManager, defaultInstrumentations, defaultResource, defaultSDK, defaultSpanProcessors, defaultTextMapPropagator, flushBatchProcessor } from './chunk-AZFBQY6E.js';
1
+ export { defaultBatchProcessor, defaultContextManager, defaultInstrumentations, defaultResource, defaultSDK, defaultSpanProcessors, defaultTextMapPropagator, flushBatchProcessor } from './chunk-QOUOKHYQ.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-run-api",
3
- "version": "0.0.0-dev-20251125151505",
3
+ "version": "0.0.0-dev-20251125185858",
4
4
  "description": "Agents Run API for Inkeep Agent Framework - handles chat, agent execution, and streaming",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -24,7 +24,6 @@
24
24
  "@hono/node-server": "^1.14.3",
25
25
  "@hono/otel": "^0.4.0",
26
26
  "@hono/swagger-ui": "^0.5.1",
27
- "@hono/zod-openapi": "^1.0.2",
28
27
  "@openrouter/ai-sdk-provider": "^1.2.0",
29
28
  "@opentelemetry/api": "^1.9.0",
30
29
  "@opentelemetry/auto-instrumentations-node": "^0.64.1",
@@ -54,8 +53,11 @@
54
53
  "pino": "^9.11.0",
55
54
  "traverse": "^0.6.11",
56
55
  "ts-pattern": "^5.7.1",
57
- "zod": "4.1.5",
58
- "@inkeep/agents-core": "^0.0.0-dev-20251125151505"
56
+ "@inkeep/agents-core": "^0.0.0-dev-20251125185858"
57
+ },
58
+ "peerDependencies": {
59
+ "@hono/zod-openapi": "^1.1.5",
60
+ "zod": "^4.1.11"
59
61
  },
60
62
  "optionalDependencies": {
61
63
  "keytar": "^7.9.0"
@@ -1 +0,0 @@
1
- export { dbClient_default as default } from './chunk-V4RNZ6BX.js';