@inkeep/agents-core 0.0.0-dev-20260106234559 → 0.0.0-dev-20260107043750

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.
@@ -15,7 +15,12 @@ var PinoLogger = class {
15
15
  name: this.name,
16
16
  level: process.env.LOG_LEVEL || (process.env.ENVIRONMENT === "test" ? "silent" : "info"),
17
17
  serializers: { obj: (value) => ({ ...value }) },
18
- redact: ["req.headers.authorization", "req.headers[\"x-inkeep-admin-authentication\"]"],
18
+ redact: [
19
+ "req.headers.authorization",
20
+ "req.headers[\"x-inkeep-admin-authentication\"]",
21
+ "req.headers.cookie",
22
+ "req.headers[\"x-forwarded-cookie\"]"
23
+ ],
19
24
  ...config.options
20
25
  };
21
26
  if (config.transportConfigs) this.transportConfigs = config.transportConfigs;
@@ -44,20 +44,34 @@ var McpClient = class {
44
44
  }
45
45
  async connectSSE(config) {
46
46
  const url = typeof config.url === "string" ? config.url : config.url.toString();
47
+ const headersToSend = config.headers || {};
47
48
  this.transport = new SSEClientTransport(new URL(url), {
48
49
  eventSourceInit: config.eventSourceInit,
49
- requestInit: { headers: config.headers || {} }
50
+ requestInit: { headers: headersToSend }
50
51
  });
51
52
  await this.client.connect(this.transport, { timeout: config.timeout ?? this.timeout });
52
53
  }
53
54
  async connectHttp(config) {
54
55
  const { url, requestInit } = config;
56
+ const normalizeHeaders = (headers) => {
57
+ if (!headers) return {};
58
+ if (headers instanceof Headers) {
59
+ const obj = {};
60
+ headers.forEach((value, key) => {
61
+ obj[key] = value;
62
+ });
63
+ return obj;
64
+ }
65
+ if (Array.isArray(headers)) return Object.fromEntries(headers);
66
+ return headers;
67
+ };
68
+ const mergedHeaders = {
69
+ ...normalizeHeaders(requestInit?.headers),
70
+ ...config.headers || {}
71
+ };
55
72
  const mergedRequestInit = {
56
73
  ...requestInit,
57
- headers: {
58
- ...requestInit?.headers || {},
59
- ...config.headers || {}
60
- }
74
+ headers: mergedHeaders
61
75
  };
62
76
  const urlString = typeof url === "string" ? url : url.toString();
63
77
  this.transport = new StreamableHTTPClientTransport(new URL(urlString), {
@@ -1,5 +1,5 @@
1
1
  import { z } from "@hono/zod-openapi";
2
- import * as drizzle_zod15 from "drizzle-zod";
2
+ import * as drizzle_zod141 from "drizzle-zod";
3
3
  import { AnySQLiteTable } from "drizzle-orm/sqlite-core";
4
4
 
5
5
  //#region src/validation/drizzle-schema-helpers.d.ts
@@ -22,8 +22,8 @@ declare const resourceIdSchema: z.ZodString;
22
22
  declare function createResourceIdSchema(description: string, options?: {
23
23
  example?: string;
24
24
  }): z.ZodString;
25
- declare function createSelectSchemaWithModifiers<T extends AnySQLiteTable>(table: T, overrides?: Partial<Record<keyof T['_']['columns'], (schema: z.ZodTypeAny) => z.ZodTypeAny>>): drizzle_zod15.BuildSchema<"select", T["_"]["columns"], drizzle_zod15.BuildRefine<T["_"]["columns"], undefined>, undefined>;
26
- declare function createInsertSchemaWithModifiers<T extends AnySQLiteTable>(table: T, overrides?: Partial<Record<keyof T['_']['columns'], (schema: z.ZodTypeAny) => z.ZodTypeAny>>): drizzle_zod15.BuildSchema<"insert", T["_"]["columns"], drizzle_zod15.BuildRefine<Pick<T["_"]["columns"], keyof T["$inferInsert"]>, undefined>, undefined>;
25
+ declare function createSelectSchemaWithModifiers<T extends AnySQLiteTable>(table: T, overrides?: Partial<Record<keyof T['_']['columns'], (schema: z.ZodTypeAny) => z.ZodTypeAny>>): drizzle_zod141.BuildSchema<"select", T["_"]["columns"], drizzle_zod141.BuildRefine<T["_"]["columns"], undefined>, undefined>;
26
+ declare function createInsertSchemaWithModifiers<T extends AnySQLiteTable>(table: T, overrides?: Partial<Record<keyof T['_']['columns'], (schema: z.ZodTypeAny) => z.ZodTypeAny>>): drizzle_zod141.BuildSchema<"insert", T["_"]["columns"], drizzle_zod141.BuildRefine<Pick<T["_"]["columns"], keyof T["$inferInsert"]>, undefined>, undefined>;
27
27
  declare const createSelectSchema: typeof createSelectSchemaWithModifiers;
28
28
  declare const createInsertSchema: typeof createInsertSchemaWithModifiers;
29
29
  /**