@inkeep/agents-core 0.0.0-dev-20251125151505 → 0.0.0-dev-20251125155922

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,6 +1,6 @@
1
1
  import * as drizzle_zod from 'drizzle-zod';
2
2
  import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
3
- import { z } from 'zod';
3
+ import { z } from '@hono/zod-openapi';
4
4
 
5
5
  declare const UserSelectSchema: drizzle_zod.BuildSchema<"select", {
6
6
  id: drizzle_orm_pg_core.PgColumn<{
@@ -1,6 +1,6 @@
1
1
  import { user, session, account, organization, member, invitation, verification } from '../chunk-GENLXHZ4.js';
2
2
  import { createSelectSchema, createInsertSchema } from 'drizzle-zod';
3
- import { z } from 'zod';
3
+ import { z } from '@hono/zod-openapi';
4
4
 
5
5
  var UserSelectSchema = createSelectSchema(user);
6
6
  var UserInsertSchema = createInsertSchema(user);
@@ -4,15 +4,15 @@ import * as zod from 'zod';
4
4
  import * as better_auth from 'better-auth';
5
5
  import { BetterAuthAdvancedOptions } from 'better-auth';
6
6
  import { GoogleOptions } from 'better-auth/social-providers';
7
- import { D as DatabaseClient } from '../client-DsyOtfXi.js';
7
+ import { D as DatabaseClient } from '../client-CxcKBk9K.js';
8
8
  import 'drizzle-orm/node-postgres';
9
9
  import 'drizzle-orm/pglite';
10
- import '../schema-el4dcgfD.js';
10
+ import '../schema-ClGDkQvB.js';
11
11
  import 'drizzle-orm';
12
12
  import 'drizzle-orm/pg-core';
13
- import '../utility-Cnh0tsog.js';
14
- import 'drizzle-zod';
13
+ import '../utility-BBmGDlMn.js';
15
14
  import '@hono/zod-openapi';
15
+ import 'drizzle-zod';
16
16
  import './auth-schema.js';
17
17
 
18
18
  interface OIDCProviderConfig {
package/dist/auth/auth.js CHANGED
@@ -1,5 +1,5 @@
1
- import { generateId } from '../chunk-XSKQ54TS.js';
2
- import { env } from '../chunk-LL6F3EAR.js';
1
+ import { generateId } from '../chunk-3HACEHXF.js';
2
+ import { env } from '../chunk-RUTYLJB7.js';
3
3
  import { ssoProvider } from '../chunk-GENLXHZ4.js';
4
4
  import { ownerRole, adminRole, memberRole, ac } from '../chunk-JNBVHWXX.js';
5
5
  import { sso } from '@better-auth/sso';
@@ -1,11 +1,10 @@
1
- import { loadEnvironmentFiles, env } from './chunk-LL6F3EAR.js';
1
+ import { loadEnvironmentFiles, env } from './chunk-RUTYLJB7.js';
2
2
  import { getLogger } from './chunk-DN4B564Y.js';
3
3
  import { CredentialStoreType, MCPTransportType } from './chunk-YFHT5M2R.js';
4
- import { z } from 'zod';
4
+ import { z } from '@hono/zod-openapi';
5
5
  import { customAlphabet } from 'nanoid';
6
6
  import { scrypt, randomBytes, timingSafeEqual } from 'crypto';
7
7
  import { promisify } from 'util';
8
- import { z as z$1 } from '@hono/zod-openapi';
9
8
  import { HTTPException } from 'hono/http-exception';
10
9
  import { Client } from '@modelcontextprotocol/sdk/client/index.js';
11
10
  import { SSEClientTransport } from '@modelcontextprotocol/sdk/client/sse.js';
@@ -195,7 +194,7 @@ function toISODateString(dateValue) {
195
194
  }
196
195
  return dateValue.toISOString();
197
196
  }
198
- var ErrorCode = z$1.enum([
197
+ var ErrorCode = z.enum([
199
198
  "bad_request",
200
199
  "unauthorized",
201
200
  "forbidden",
@@ -214,28 +213,28 @@ var errorCodeToHttpStatus = {
214
213
  internal_server_error: 500
215
214
  };
216
215
  var ERROR_DOCS_BASE_URL = "https://docs.inkeep.com/agents-api/errors";
217
- var problemDetailsSchema = z$1.object({
216
+ var problemDetailsSchema = z.object({
218
217
  // type: z.string().url().openapi({
219
218
  // description: "A URI reference that identifies the problem type.",
220
219
  // example: `${ERROR_DOCS_BASE_URL}#not-found`,
221
220
  // }),
222
- title: z$1.string().openapi({
221
+ title: z.string().openapi({
223
222
  description: "A short, human-readable summary of the problem type.",
224
223
  example: "Resource Not Found"
225
224
  }),
226
- status: z$1.number().int().openapi({
225
+ status: z.number().int().openapi({
227
226
  description: "The HTTP status code.",
228
227
  example: 404
229
228
  }),
230
- detail: z$1.string().openapi({
229
+ detail: z.string().openapi({
231
230
  description: "A human-readable explanation specific to this occurrence of the problem.",
232
231
  example: "The requested resource was not found."
233
232
  }),
234
- instance: z$1.string().optional().openapi({
233
+ instance: z.string().optional().openapi({
235
234
  description: "A URI reference that identifies the specific occurrence of the problem.",
236
235
  example: "/conversations/123"
237
236
  }),
238
- requestId: z$1.string().optional().openapi({
237
+ requestId: z.string().optional().openapi({
239
238
  description: "A unique identifier for the request, useful for troubleshooting.",
240
239
  example: "req_1234567890"
241
240
  }),
@@ -244,13 +243,13 @@ var problemDetailsSchema = z$1.object({
244
243
  example: "not_found"
245
244
  })
246
245
  }).openapi("ProblemDetails");
247
- var errorResponseSchema = z$1.object({
248
- error: z$1.object({
246
+ var errorResponseSchema = z.object({
247
+ error: z.object({
249
248
  code: ErrorCode.openapi({
250
249
  description: "A short code indicating the error code returned.",
251
250
  example: "not_found"
252
251
  }),
253
- message: z$1.string().openapi({
252
+ message: z.string().openapi({
254
253
  description: "A human readable error message.",
255
254
  example: "The requested resource was not found."
256
255
  })
@@ -390,15 +389,15 @@ var errorSchemaFactory = (code, description) => ({
390
389
  content: {
391
390
  "application/problem+json": {
392
391
  schema: problemDetailsSchema.extend({
393
- code: z$1.literal(code).openapi({
392
+ code: z.literal(code).openapi({
394
393
  description: "A short code indicating the error code returned.",
395
394
  example: code
396
395
  }),
397
- detail: z$1.string().openapi({
396
+ detail: z.string().openapi({
398
397
  description: "A detailed explanation specific to this occurrence of the problem, providing context and specifics about what went wrong.",
399
398
  example: description
400
399
  }),
401
- title: z$1.string().openapi({
400
+ title: z.string().openapi({
402
401
  description: "A short, human-readable summary of the problem type.",
403
402
  example: getTitleFromCode(code)
404
403
  }),
@@ -406,16 +405,16 @@ var errorSchemaFactory = (code, description) => ({
406
405
  // description: "A URI reference that identifies the problem type.",
407
406
  // example: `${ERROR_DOCS_BASE_URL}#${code}`,
408
407
  // }),
409
- status: z$1.number().int().openapi({
408
+ status: z.number().int().openapi({
410
409
  description: "The HTTP status code.",
411
410
  example: errorCodeToHttpStatus[code]
412
411
  }),
413
- error: z$1.object({
414
- code: z$1.literal(code).openapi({
412
+ error: z.object({
413
+ code: z.literal(code).openapi({
415
414
  description: "A short code indicating the error code returned.",
416
415
  example: code
417
416
  }),
418
- message: z$1.string().openapi({
417
+ message: z.string().openapi({
419
418
  description: "A concise error message suitable for display to end users. May be truncated if the full detail is long.",
420
419
  example: description.length > 100 ? `${description.substring(0, 97)}...` : description
421
420
  })
@@ -1,5 +1,5 @@
1
1
  import { AgentWithinContextOfProjectSchema, resourceIdSchema, MAX_ID_LENGTH } from './chunk-XHODTX4H.js';
2
- import { z } from 'zod';
2
+ import { z } from '@hono/zod-openapi';
3
3
 
4
4
  // src/validation/cycleDetection.ts
5
5
  function detectDelegationCycles(agentData) {
@@ -1,5 +1,5 @@
1
1
  import { getLogger } from './chunk-DN4B564Y.js';
2
- import { z } from 'zod';
2
+ import { z } from '@hono/zod-openapi';
3
3
 
4
4
  var logger = getLogger("schema-conversion");
5
5
  function convertZodToJsonSchema(zodSchema) {
@@ -1,6 +1,6 @@
1
1
  import { schemaValidationDefaults } from './chunk-Z64UK4CA.js';
2
- import { loadEnvironmentFiles } from './chunk-LL6F3EAR.js';
3
- import { z } from 'zod';
2
+ import { loadEnvironmentFiles } from './chunk-RUTYLJB7.js';
3
+ import { z } from '@hono/zod-openapi';
4
4
 
5
5
  loadEnvironmentFiles();
6
6
  var constantsSchema = z.object(
@@ -4,7 +4,7 @@ import path from 'path';
4
4
  import dotenv from 'dotenv';
5
5
  import { expand } from 'dotenv-expand';
6
6
  import { findUpSync } from 'find-up';
7
- import { z } from 'zod';
7
+ import { z } from '@hono/zod-openapi';
8
8
 
9
9
  // src/env.ts
10
10
  var loadEnvironmentFiles = () => {
@@ -1,7 +1,7 @@
1
1
  import { getLogger } from './chunk-DN4B564Y.js';
2
2
  import { CredentialStoreType } from './chunk-YFHT5M2R.js';
3
3
  import { Nango } from '@nangohq/node';
4
- import { z } from 'zod';
4
+ import { z } from '@hono/zod-openapi';
5
5
 
6
6
  // src/credential-stores/CredentialStoreRegistry.ts
7
7
  var CredentialStoreRegistry = class {
@@ -1,6 +1,6 @@
1
1
  import { NodePgDatabase } from 'drizzle-orm/node-postgres';
2
2
  import { PgliteDatabase } from 'drizzle-orm/pglite';
3
- import { s as schema } from './schema-el4dcgfD.js';
3
+ import { s as schema } from './schema-ClGDkQvB.js';
4
4
 
5
5
  type DatabaseClient = NodePgDatabase<typeof schema> | PgliteDatabase<typeof schema>;
6
6
  interface DatabaseConfig {
@@ -1,12 +1,11 @@
1
1
  export { i as ACTIVITY_NAMES, g as ACTIVITY_STATUS, f as ACTIVITY_TYPES, h as AGENT_IDS, p as AGGREGATE_OPERATORS, A as AI_OPERATIONS, j as AI_TOOL_TYPES, o as DATA_SOURCES, k as DATA_TYPES, D as DELEGATION_FROM_SUB_AGENT_ID, b as DELEGATION_ID, a as DELEGATION_TO_SUB_AGENT_ID, F as FIELD_TYPES, O as OPERATORS, m as ORDER_DIRECTIONS, P as PANEL_TYPES, q as QUERY_DEFAULTS, l as QUERY_EXPRESSIONS, Q as QUERY_FIELD_CONFIGS, n as QUERY_TYPES, R as REDUCE_OPERATIONS, e as SPAN_KEYS, S as SPAN_NAMES, T as TRANSFER_FROM_SUB_AGENT_ID, c as TRANSFER_TO_SUB_AGENT_ID, U as UNKNOWN_VALUE, d as detectAuthenticationRequired } from './auth-detection-7G0Dxt55.js';
2
- import { z } from 'zod';
3
- import { C as ConversationHistoryConfig, F as FunctionApiInsertSchema, A as ApiKeyApiUpdateSchema, a as FullAgentAgentInsertSchema } from './utility-Cnh0tsog.js';
4
- export { e as AgentStopWhen, b as AgentStopWhenSchema, h as CredentialStoreType, j as FunctionApiSelectSchema, k as FunctionApiUpdateSchema, i as MCPTransportType, g as ModelSettings, M as ModelSettingsSchema, d as StopWhen, S as StopWhenSchema, f as SubAgentStopWhen, c as SubAgentStopWhenSchema } from './utility-Cnh0tsog.js';
2
+ import { z } from '@hono/zod-openapi';
3
+ import { C as ConversationHistoryConfig, F as FunctionApiInsertSchema, A as ApiKeyApiUpdateSchema, a as FullAgentAgentInsertSchema } from './utility-BBmGDlMn.js';
4
+ export { e as AgentStopWhen, b as AgentStopWhenSchema, h as CredentialStoreType, j as FunctionApiSelectSchema, k as FunctionApiUpdateSchema, i as MCPTransportType, g as ModelSettings, M as ModelSettingsSchema, d as StopWhen, S as StopWhenSchema, f as SubAgentStopWhen, c as SubAgentStopWhenSchema } from './utility-BBmGDlMn.js';
5
5
  export { v as validatePropsAsJsonSchema } from './props-validation-BMR1qNiy.js';
6
6
  import 'pino';
7
7
  import 'drizzle-zod';
8
8
  import 'drizzle-orm/pg-core';
9
- import '@hono/zod-openapi';
10
9
 
11
10
  declare const TenantParamsSchema: z.ZodObject<{
12
11
  tenantId: z.ZodString;
@@ -134,8 +133,8 @@ declare const DataComponentApiInsertSchema: z.ZodObject<{
134
133
  }, z.core.$strip>>>;
135
134
  }, z.core.$strip>;
136
135
  declare const ArtifactComponentApiInsertSchema: z.ZodObject<{
137
- name: z.ZodString;
138
136
  id: z.ZodString;
137
+ name: z.ZodString;
139
138
  description: z.ZodString;
140
139
  props: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
141
140
  }, {
@@ -170,8 +169,8 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
170
169
  description: z.ZodOptional<z.ZodString>;
171
170
  defaultSubAgentId: z.ZodOptional<z.ZodString>;
172
171
  subAgents: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
173
- name: z.ZodString;
174
172
  id: z.ZodString;
173
+ name: z.ZodString;
175
174
  createdAt: z.ZodOptional<z.ZodString>;
176
175
  updatedAt: z.ZodOptional<z.ZodString>;
177
176
  description: z.ZodString;
@@ -5,7 +5,7 @@ import { schemaValidationDefaults } from './chunk-Z64UK4CA.js';
5
5
  export { detectAuthenticationRequired } from './chunk-4JZT4QEE.js';
6
6
  import { CredentialStoreType } from './chunk-YFHT5M2R.js';
7
7
  export { CredentialStoreType, MCPTransportType } from './chunk-YFHT5M2R.js';
8
- import { z } from 'zod';
8
+ import { z } from '@hono/zod-openapi';
9
9
 
10
10
  var {
11
11
  AGENT_EXECUTION_TRANSFER_COUNT_MAX,
@@ -1,2 +1,2 @@
1
- export { AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT, AGENT_EXECUTION_TRANSFER_COUNT_MAX, AGENT_EXECUTION_TRANSFER_COUNT_MIN, CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT, STATUS_UPDATE_MAX_INTERVAL_SECONDS, STATUS_UPDATE_MAX_NUM_EVENTS, SUB_AGENT_TURN_GENERATION_STEPS_DEFAULT, SUB_AGENT_TURN_GENERATION_STEPS_MAX, SUB_AGENT_TURN_GENERATION_STEPS_MIN, VALIDATION_AGENT_PROMPT_MAX_CHARS, VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS } from '../../chunk-ZEZCCHV7.js';
1
+ export { AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT, AGENT_EXECUTION_TRANSFER_COUNT_MAX, AGENT_EXECUTION_TRANSFER_COUNT_MIN, CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT, STATUS_UPDATE_MAX_INTERVAL_SECONDS, STATUS_UPDATE_MAX_NUM_EVENTS, SUB_AGENT_TURN_GENERATION_STEPS_DEFAULT, SUB_AGENT_TURN_GENERATION_STEPS_MAX, SUB_AGENT_TURN_GENERATION_STEPS_MIN, VALIDATION_AGENT_PROMPT_MAX_CHARS, VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS } from '../../chunk-BJLC7EI4.js';
2
2
  export { schemaValidationDefaults } from '../../chunk-Z64UK4CA.js';
@@ -1,10 +1,9 @@
1
- import { C as CredentialStore } from '../server-DKDjEFRy.js';
1
+ import { C as CredentialStore } from '../server-oSjrME75.js';
2
2
  import 'hono';
3
- import '../utility-Cnh0tsog.js';
4
- import 'zod';
3
+ import '../utility-BBmGDlMn.js';
4
+ import '@hono/zod-openapi';
5
5
  import 'drizzle-zod';
6
6
  import 'drizzle-orm/pg-core';
7
- import '@hono/zod-openapi';
8
7
 
9
8
  /**
10
9
  * Registry for managing credential stores in the application context
@@ -1 +1 @@
1
- export { CredentialStoreRegistry, InMemoryCredentialStore, KeyChainStore, NangoCredentialStore, createDefaultCredentialStores, createKeyChainStore, createNangoCredentialStore } from '../chunk-FOK3JSQN.js';
1
+ export { CredentialStoreRegistry, InMemoryCredentialStore, KeyChainStore, NangoCredentialStore, createDefaultCredentialStores, createKeyChainStore, createNangoCredentialStore } from '../chunk-YSFXXC6K.js';
@@ -1,8 +1,7 @@
1
1
  import 'drizzle-orm';
2
2
  import 'drizzle-orm/pg-core';
3
- import '../utility-Cnh0tsog.js';
3
+ import '../utility-BBmGDlMn.js';
4
4
  export { account, invitation, member, organization, session, ssoProvider, user, verification } from '../auth/auth-schema.js';
5
- export { G as agentRelations, J as agentToolRelationsRelations, a as agents, y as apiKeys, I as apiKeysRelations, j as artifactComponents, O as artifactComponentsRelations, b as contextCache, E as contextCacheRelations, c as contextConfigs, D as contextConfigsRelations, v as conversations, M as conversationsRelations, z as credentialReferences, K as credentialReferencesRelations, h as dataComponents, Q as dataComponentsRelations, f as externalAgents, H as externalAgentsRelations, m as functionTools, V as functionToolsRelations, n as functions, T as functionsRelations, x as ledgerArtifacts, S as ledgerArtifactsRelations, w as messages, N as messagesRelations, p as projects, B as projectsRelations, k as subAgentArtifactComponents, P as subAgentArtifactComponentsRelations, i as subAgentDataComponents, R as subAgentDataComponentsRelations, q as subAgentExternalAgentRelations, X as subAgentExternalAgentRelationsRelations, u as subAgentFunctionToolRelations, W as subAgentFunctionToolRelationsRelations, e as subAgentRelations, U as subAgentRelationsRelations, r as subAgentTeamAgentRelations, Y as subAgentTeamAgentRelationsRelations, o as subAgentToolRelations, d as subAgents, F as subAgentsRelations, g as taskRelations, C as taskRelationsRelations, t as tasks, A as tasksRelations, l as tools, L as toolsRelations } from '../schema-el4dcgfD.js';
6
- import 'zod';
7
- import 'drizzle-zod';
5
+ export { G as agentRelations, J as agentToolRelationsRelations, a as agents, y as apiKeys, I as apiKeysRelations, j as artifactComponents, O as artifactComponentsRelations, b as contextCache, E as contextCacheRelations, c as contextConfigs, D as contextConfigsRelations, v as conversations, M as conversationsRelations, z as credentialReferences, K as credentialReferencesRelations, h as dataComponents, Q as dataComponentsRelations, f as externalAgents, H as externalAgentsRelations, m as functionTools, V as functionToolsRelations, n as functions, T as functionsRelations, x as ledgerArtifacts, S as ledgerArtifactsRelations, w as messages, N as messagesRelations, p as projects, B as projectsRelations, k as subAgentArtifactComponents, P as subAgentArtifactComponentsRelations, i as subAgentDataComponents, R as subAgentDataComponentsRelations, q as subAgentExternalAgentRelations, X as subAgentExternalAgentRelationsRelations, u as subAgentFunctionToolRelations, W as subAgentFunctionToolRelationsRelations, e as subAgentRelations, U as subAgentRelationsRelations, r as subAgentTeamAgentRelations, Y as subAgentTeamAgentRelationsRelations, o as subAgentToolRelations, d as subAgents, F as subAgentsRelations, g as taskRelations, C as taskRelationsRelations, t as tasks, A as tasksRelations, l as tools, L as toolsRelations } from '../schema-ClGDkQvB.js';
8
6
  import '@hono/zod-openapi';
7
+ import 'drizzle-zod';
@@ -1,13 +1,12 @@
1
- import { D as DatabaseClient } from '../client-DsyOtfXi.js';
1
+ import { D as DatabaseClient } from '../client-CxcKBk9K.js';
2
2
  import 'drizzle-orm/node-postgres';
3
3
  import 'drizzle-orm/pglite';
4
- import '../schema-el4dcgfD.js';
4
+ import '../schema-ClGDkQvB.js';
5
5
  import 'drizzle-orm';
6
6
  import 'drizzle-orm/pg-core';
7
- import '../utility-Cnh0tsog.js';
8
- import 'zod';
9
- import 'drizzle-zod';
7
+ import '../utility-BBmGDlMn.js';
10
8
  import '@hono/zod-openapi';
9
+ import 'drizzle-zod';
11
10
  import '../auth/auth-schema.js';
12
11
 
13
12
  /**