@inkeep/agents-api 0.0.0-dev-20260127010045 → 0.0.0-dev-20260127155059

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,10 +1,10 @@
1
1
  import { AppConfig } from "./types/app.js";
2
2
  import "./types/index.js";
3
3
  import { Hono } from "hono";
4
- import * as hono_types0 from "hono/types";
4
+ import * as hono_types1 from "hono/types";
5
5
 
6
6
  //#region src/createApp.d.ts
7
7
  declare const isWebhookRoute: (path: string) => boolean;
8
- declare function createAgentsHono(config: AppConfig): Hono<hono_types0.BlankEnv, hono_types0.BlankSchema, "/">;
8
+ declare function createAgentsHono(config: AppConfig): Hono<hono_types1.BlankEnv, hono_types1.BlankSchema, "/">;
9
9
  //#endregion
10
10
  export { createAgentsHono, isWebhookRoute };
@@ -1,6 +1,6 @@
1
- import * as _inkeep_agents_core0 from "@inkeep/agents-core";
1
+ import * as _inkeep_agents_core2 from "@inkeep/agents-core";
2
2
 
3
3
  //#region src/data/db/manageDbClient.d.ts
4
- declare const manageDbClient: _inkeep_agents_core0.AgentsManageDatabaseClient;
4
+ declare const manageDbClient: _inkeep_agents_core2.AgentsManageDatabaseClient;
5
5
  //#endregion
6
6
  export { manageDbClient as default };
@@ -1,6 +1,6 @@
1
- import * as _inkeep_agents_core0 from "@inkeep/agents-core";
1
+ import * as _inkeep_agents_core3 from "@inkeep/agents-core";
2
2
 
3
3
  //#region src/data/db/runDbClient.d.ts
4
- declare const runDbClient: _inkeep_agents_core0.AgentsRunDatabaseClient;
4
+ declare const runDbClient: _inkeep_agents_core3.AgentsRunDatabaseClient;
5
5
  //#endregion
6
6
  export { runDbClient as default };
@@ -1,7 +1,7 @@
1
1
  import { OpenAPIHono } from "@hono/zod-openapi";
2
- import * as hono16 from "hono";
2
+ import * as hono4 from "hono";
3
3
 
4
4
  //#region src/domains/evals/routes/datasetTriggers.d.ts
5
- declare const app: OpenAPIHono<hono16.Env, {}, "/">;
5
+ declare const app: OpenAPIHono<hono4.Env, {}, "/">;
6
6
  //#endregion
7
7
  export { app as default };
@@ -1,7 +1,7 @@
1
1
  import { OpenAPIHono } from "@hono/zod-openapi";
2
- import * as hono14 from "hono";
2
+ import * as hono3 from "hono";
3
3
 
4
4
  //#region src/domains/evals/routes/index.d.ts
5
- declare const app: OpenAPIHono<hono14.Env, {}, "/">;
5
+ declare const app: OpenAPIHono<hono3.Env, {}, "/">;
6
6
  //#endregion
7
7
  export { app as default };
@@ -1,7 +1,7 @@
1
1
  import { Hono } from "hono";
2
- import * as hono_types14 from "hono/types";
2
+ import * as hono_types16 from "hono/types";
3
3
 
4
4
  //#region src/domains/evals/workflow/routes.d.ts
5
- declare const workflowRoutes: Hono<hono_types14.BlankEnv, hono_types14.BlankSchema, "/">;
5
+ declare const workflowRoutes: Hono<hono_types16.BlankEnv, hono_types16.BlankSchema, "/">;
6
6
  //#endregion
7
7
  export { workflowRoutes };
@@ -3,10 +3,10 @@ import { GenerateInstallationAccessTokenResult, GenerateTokenError, GenerateToke
3
3
  import { GetJwkResult, JwksError, JwksResult, clearJwksCache, getJwkForToken, getJwksCacheStatus } from "./jwks.js";
4
4
  import { GitHubOidcClaims, ValidateOidcTokenResult, ValidateTokenError, ValidateTokenResult, validateOidcToken } from "./oidcToken.js";
5
5
  import { Hono } from "hono";
6
- import * as hono_types7 from "hono/types";
6
+ import * as hono_types12 from "hono/types";
7
7
 
8
8
  //#region src/domains/github/index.d.ts
9
- declare function createGithubRoutes(): Hono<hono_types7.BlankEnv, hono_types7.BlankSchema, "/">;
10
- declare const githubRoutes: Hono<hono_types7.BlankEnv, hono_types7.BlankSchema, "/">;
9
+ declare function createGithubRoutes(): Hono<hono_types12.BlankEnv, hono_types12.BlankSchema, "/">;
10
+ declare const githubRoutes: Hono<hono_types12.BlankEnv, hono_types12.BlankSchema, "/">;
11
11
  //#endregion
12
12
  export { type GenerateInstallationAccessTokenResult, type GenerateTokenError, type GenerateTokenResult, type GetJwkResult, type GitHubAppConfig, type GitHubOidcClaims, type InstallationAccessToken, type InstallationInfo, type JwksError, type JwksResult, type LookupInstallationError, type LookupInstallationForRepoResult, type LookupInstallationResult, type ValidateOidcTokenResult, type ValidateTokenError, type ValidateTokenResult, clearJwksCache, createGithubRoutes, generateInstallationAccessToken, getGitHubAppConfig, getJwkForToken, getJwksCacheStatus, githubRoutes, isGitHubAppConfigured, lookupInstallationForRepo, validateOidcToken };
@@ -1,7 +1,7 @@
1
1
  import { Hono } from "hono";
2
- import * as hono_types5 from "hono/types";
2
+ import * as hono_types7 from "hono/types";
3
3
 
4
4
  //#region src/domains/github/routes/tokenExchange.d.ts
5
- declare const app: Hono<hono_types5.BlankEnv, hono_types5.BlankSchema, "/">;
5
+ declare const app: Hono<hono_types7.BlankEnv, hono_types7.BlankSchema, "/">;
6
6
  //#endregion
7
7
  export { app as default };
@@ -1,7 +1,7 @@
1
1
  import { OpenAPIHono } from "@hono/zod-openapi";
2
- import * as hono15 from "hono";
2
+ import * as hono5 from "hono";
3
3
 
4
4
  //#region src/domains/manage/routes/conversations.d.ts
5
- declare const app: OpenAPIHono<hono15.Env, {}, "/">;
5
+ declare const app: OpenAPIHono<hono5.Env, {}, "/">;
6
6
  //#endregion
7
7
  export { app as default };
@@ -1,7 +1,7 @@
1
1
  import { OpenAPIHono } from "@hono/zod-openapi";
2
- import * as hono18 from "hono";
2
+ import * as hono2 from "hono";
3
3
 
4
4
  //#region src/domains/manage/routes/evals/evaluationResults.d.ts
5
- declare const app: OpenAPIHono<hono18.Env, {}, "/">;
5
+ declare const app: OpenAPIHono<hono2.Env, {}, "/">;
6
6
  //#endregion
7
7
  export { app as default };
@@ -1,7 +1,7 @@
1
1
  import { Hono } from "hono";
2
- import * as hono_types12 from "hono/types";
2
+ import * as hono_types9 from "hono/types";
3
3
 
4
4
  //#region src/domains/manage/routes/mcp.d.ts
5
- declare const app: Hono<hono_types12.BlankEnv, hono_types12.BlankSchema, "/">;
5
+ declare const app: Hono<hono_types9.BlankEnv, hono_types9.BlankSchema, "/">;
6
6
  //#endregion
7
7
  export { app as default };
@@ -1,7 +1,7 @@
1
1
  import { Hono } from "hono";
2
- import * as hono_types16 from "hono/types";
2
+ import * as hono_types5 from "hono/types";
3
3
 
4
4
  //#region src/domains/mcp/routes/mcp.d.ts
5
- declare const app: Hono<hono_types16.BlankEnv, hono_types16.BlankSchema, "/">;
5
+ declare const app: Hono<hono_types5.BlankEnv, hono_types5.BlankSchema, "/">;
6
6
  //#endregion
7
7
  export { app as default };
@@ -1,6 +1,6 @@
1
1
  import { AgentConfig, DelegateRelation } from "./Agent.js";
2
2
  import { InternalRelation } from "../utils/project.js";
3
- import * as _inkeep_agents_core1 from "@inkeep/agents-core";
3
+ import * as _inkeep_agents_core0 from "@inkeep/agents-core";
4
4
  import { CredentialStoreRegistry, FullExecutionContext } from "@inkeep/agents-core";
5
5
  import * as ai0 from "ai";
6
6
 
@@ -44,7 +44,7 @@ declare function createDelegateToAgentTool({
44
44
  message: string;
45
45
  }, {
46
46
  toolCallId: any;
47
- result: _inkeep_agents_core1.Message | _inkeep_agents_core1.Task;
47
+ result: _inkeep_agents_core0.Message | _inkeep_agents_core0.Task;
48
48
  }>;
49
49
  /**
50
50
  * Parameters for building a transfer relation config
@@ -1,4 +1,4 @@
1
- import { validateAgainstJsonSchema } from "./validation.js";
1
+ import { validationHelper } from "./validation.js";
2
2
  import { CredentialStuffer, JsonTransformer, TemplateEngine, getLogger } from "@inkeep/agents-core";
3
3
 
4
4
  //#region src/domains/run/context/ContextFetcher.ts
@@ -228,16 +228,17 @@ var ContextFetcher = class {
228
228
  * Validate response against JSON Schema
229
229
  */
230
230
  validateResponseWithJsonSchema(data, jsonSchema, definitionId) {
231
- try {
232
- if (!validateAgainstJsonSchema(jsonSchema, data)) throw new Error("Data does not match JSON Schema");
233
- } catch (error) {
234
- const errorMessage = error instanceof Error ? error.message : "Unknown validation error";
231
+ const validate = validationHelper(jsonSchema);
232
+ if (!validate(data)) {
233
+ const errors = validate.errors || [];
234
+ const formattedErrors = errors.map((e) => `${e.instancePath || "/"}: ${e.message}`).join("; ");
235
235
  logger.error({
236
236
  definitionId,
237
237
  jsonSchema,
238
- error: errorMessage
238
+ errors,
239
+ formattedErrors
239
240
  }, "JSON Schema response validation failed");
240
- throw new Error(`Response validation failed: ${errorMessage}`);
241
+ throw new Error(`Response validation failed: ${formattedErrors}`);
241
242
  }
242
243
  }
243
244
  /**
@@ -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 };
package/dist/env.d.ts CHANGED
@@ -14,11 +14,11 @@ declare const envSchema: z.ZodObject<{
14
14
  pentest: "pentest";
15
15
  }>>;
16
16
  LOG_LEVEL: z.ZodDefault<z.ZodEnum<{
17
+ error: "error";
17
18
  trace: "trace";
18
19
  debug: "debug";
19
20
  info: "info";
20
21
  warn: "warn";
21
- error: "error";
22
22
  }>>;
23
23
  INKEEP_AGENTS_MANAGE_DATABASE_URL: z.ZodString;
24
24
  INKEEP_AGENTS_RUN_DATABASE_URL: z.ZodString;
@@ -53,7 +53,7 @@ declare const envSchema: z.ZodObject<{
53
53
  declare const env: {
54
54
  NODE_ENV: "development" | "production" | "test";
55
55
  ENVIRONMENT: "development" | "production" | "test" | "pentest";
56
- LOG_LEVEL: "trace" | "debug" | "info" | "warn" | "error";
56
+ LOG_LEVEL: "error" | "trace" | "debug" | "info" | "warn";
57
57
  INKEEP_AGENTS_MANAGE_DATABASE_URL: string;
58
58
  INKEEP_AGENTS_RUN_DATABASE_URL: string;
59
59
  INKEEP_AGENTS_API_URL: string;