@inkeep/agents-cli 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.
Files changed (2) hide show
  1. package/dist/index.js +1569 -1569
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -71,600 +71,6 @@ var init_base_client = __esm({
71
71
  }
72
72
  });
73
73
 
74
- // ../node_modules/.pnpm/dotenv-expand@12.0.3/node_modules/dotenv-expand/lib/main.js
75
- var require_main = __commonJS({
76
- "../node_modules/.pnpm/dotenv-expand@12.0.3/node_modules/dotenv-expand/lib/main.js"(exports, module2) {
77
- "use strict";
78
- init_esm_shims();
79
- function _resolveEscapeSequences(value) {
80
- return value.replace(/\\\$/g, "$");
81
- }
82
- function expandValue(value, processEnv, runningParsed) {
83
- const env3 = { ...runningParsed, ...processEnv };
84
- const regex = /(?<!\\)\${([^{}]+)}|(?<!\\)\$([A-Za-z_][A-Za-z0-9_]*)/g;
85
- let result = value;
86
- let match2;
87
- const seen = /* @__PURE__ */ new Set();
88
- while ((match2 = regex.exec(result)) !== null) {
89
- seen.add(result);
90
- const [template, bracedExpression, unbracedExpression] = match2;
91
- const expression = bracedExpression || unbracedExpression;
92
- const opRegex = /(:\+|\+|:-|-)/;
93
- const opMatch = expression.match(opRegex);
94
- const splitter = opMatch ? opMatch[0] : null;
95
- const r = expression.split(splitter);
96
- let defaultValue;
97
- let value2;
98
- const key = r.shift();
99
- if ([":+", "+"].includes(splitter)) {
100
- defaultValue = env3[key] ? r.join(splitter) : "";
101
- value2 = null;
102
- } else {
103
- defaultValue = r.join(splitter);
104
- value2 = env3[key];
105
- }
106
- if (value2) {
107
- if (seen.has(value2)) {
108
- result = result.replace(template, defaultValue);
109
- } else {
110
- result = result.replace(template, value2);
111
- }
112
- } else {
113
- result = result.replace(template, defaultValue);
114
- }
115
- if (result === runningParsed[key]) {
116
- break;
117
- }
118
- regex.lastIndex = 0;
119
- }
120
- return result;
121
- }
122
- function expand2(options) {
123
- const runningParsed = {};
124
- let processEnv = process.env;
125
- if (options && options.processEnv != null) {
126
- processEnv = options.processEnv;
127
- }
128
- for (const key in options.parsed) {
129
- let value = options.parsed[key];
130
- if (processEnv[key] && processEnv[key] !== value) {
131
- value = processEnv[key];
132
- } else {
133
- value = expandValue(value, processEnv, runningParsed);
134
- }
135
- options.parsed[key] = _resolveEscapeSequences(value);
136
- runningParsed[key] = _resolveEscapeSequences(value);
137
- }
138
- for (const processKey in options.parsed) {
139
- processEnv[processKey] = options.parsed[processKey];
140
- }
141
- return options;
142
- }
143
- module2.exports.expand = expand2;
144
- }
145
- });
146
-
147
- // ../packages/agents-core/src/env.ts
148
- import fs2 from "fs";
149
- import os from "os";
150
- import path2 from "path";
151
- import dotenv from "dotenv";
152
- import { findUpSync } from "find-up";
153
- import { z } from "zod";
154
- var import_dotenv_expand, loadEnvironmentFiles, envSchema, parseEnv, env;
155
- var init_env = __esm({
156
- "../packages/agents-core/src/env.ts"() {
157
- "use strict";
158
- init_esm_shims();
159
- import_dotenv_expand = __toESM(require_main(), 1);
160
- loadEnvironmentFiles = () => {
161
- const environmentFiles = [];
162
- const currentEnv = path2.resolve(process.cwd(), ".env");
163
- if (fs2.existsSync(currentEnv)) {
164
- environmentFiles.push(currentEnv);
165
- }
166
- const rootEnv = findUpSync(".env", { cwd: path2.dirname(process.cwd()) });
167
- if (rootEnv) {
168
- if (rootEnv !== currentEnv) {
169
- environmentFiles.push(rootEnv);
170
- }
171
- }
172
- const userConfigPath = path2.join(os.homedir(), ".inkeep", "config");
173
- if (fs2.existsSync(userConfigPath)) {
174
- dotenv.config({ path: userConfigPath, override: true, quiet: true });
175
- }
176
- if (environmentFiles.length > 0) {
177
- dotenv.config({
178
- path: environmentFiles,
179
- override: false,
180
- quiet: true
181
- });
182
- (0, import_dotenv_expand.expand)({ processEnv: process.env });
183
- }
184
- };
185
- loadEnvironmentFiles();
186
- envSchema = z.object({
187
- ENVIRONMENT: z.enum(["development", "production", "pentest", "test"]).optional(),
188
- DATABASE_URL: z.string().optional(),
189
- POSTGRES_POOL_SIZE: z.string().optional(),
190
- INKEEP_AGENTS_JWT_SIGNING_SECRET: z.string().min(32, "INKEEP_AGENTS_JWT_SIGNING_SECRET must be at least 32 characters").optional(),
191
- INKEEP_AGENTS_MANAGE_UI_URL: z.string().optional(),
192
- INKEEP_AGENTS_MANAGE_API_URL: z.string().optional(),
193
- BETTER_AUTH_SECRET: z.string().optional()
194
- });
195
- parseEnv = () => {
196
- try {
197
- const parsedEnv = envSchema.parse(process.env);
198
- return parsedEnv;
199
- } catch (error) {
200
- if (error instanceof z.ZodError) {
201
- const missingVars = error.issues.map((issue) => issue.path.join("."));
202
- throw new Error(
203
- `\u274C Invalid environment variables: ${missingVars.join(", ")}
204
- ${error.message}`
205
- );
206
- }
207
- throw error;
208
- }
209
- };
210
- env = parseEnv();
211
- }
212
- });
213
-
214
- // ../packages/agents-core/src/constants/execution-limits-shared/defaults.ts
215
- var executionLimitsSharedDefaults;
216
- var init_defaults = __esm({
217
- "../packages/agents-core/src/constants/execution-limits-shared/defaults.ts"() {
218
- "use strict";
219
- init_esm_shims();
220
- executionLimitsSharedDefaults = {
221
- // MCP Tool Connection and Retry Behavior
222
- // Model Context Protocol (MCP) enables agents to connect to external tools and services.
223
- // These constants control connection timeouts and retry strategy with exponential backoff.
224
- // CONNECTION_TIMEOUT_MS: Maximum wait time for initial MCP server connection
225
- // MAX_RETRIES: Maximum number of connection retry attempts before failing
226
- // INITIAL_RECONNECTION_DELAY_MS: Starting delay between retry attempts
227
- // MAX_RECONNECTION_DELAY_MS: Maximum delay between retry attempts (after exponential growth)
228
- // RECONNECTION_DELAY_GROWTH_FACTOR: Multiplier applied to delay after each failed retry (exponential backoff)
229
- MCP_TOOL_CONNECTION_TIMEOUT_MS: 3e3,
230
- // 3 seconds
231
- MCP_TOOL_MAX_RETRIES: 3,
232
- MCP_TOOL_MAX_RECONNECTION_DELAY_MS: 3e4,
233
- // 30 seconds
234
- MCP_TOOL_INITIAL_RECONNECTION_DELAY_MS: 1e3,
235
- // 1 second
236
- MCP_TOOL_RECONNECTION_DELAY_GROWTH_FACTOR: 1.5,
237
- // Conversation History Context Window
238
- // CONVERSATION_HISTORY_DEFAULT_LIMIT: Default number of recent messages to retrieve from conversation history.
239
- // Used when fetching conversation context for status updates and other operations.
240
- CONVERSATION_HISTORY_DEFAULT_LIMIT: 50,
241
- // CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT: Maximum number of tokens from previous conversation messages
242
- // to include in the LLM prompt. Prevents excessive token usage while maintaining relevant conversation context.
243
- // Messages exceeding this limit are truncated from the beginning of the conversation.
244
- // Increased from 4,000 to 8,000 to accommodate tool results in conversation history.
245
- CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT: 8e3
246
- };
247
- }
248
- });
249
-
250
- // ../packages/agents-core/src/constants/execution-limits-shared/index.ts
251
- import { z as z2 } from "zod";
252
- var constantsSchema, parseConstants, constants, MCP_TOOL_CONNECTION_TIMEOUT_MS, MCP_TOOL_MAX_RETRIES, MCP_TOOL_MAX_RECONNECTION_DELAY_MS, MCP_TOOL_INITIAL_RECONNECTION_DELAY_MS, MCP_TOOL_RECONNECTION_DELAY_GROWTH_FACTOR, CONVERSATION_HISTORY_DEFAULT_LIMIT, CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT;
253
- var init_execution_limits_shared = __esm({
254
- "../packages/agents-core/src/constants/execution-limits-shared/index.ts"() {
255
- "use strict";
256
- init_esm_shims();
257
- init_env();
258
- init_defaults();
259
- init_defaults();
260
- loadEnvironmentFiles();
261
- constantsSchema = z2.object(
262
- Object.fromEntries(
263
- Object.keys(executionLimitsSharedDefaults).map((key) => [
264
- `AGENTS_${key}`,
265
- z2.coerce.number().optional()
266
- ])
267
- )
268
- );
269
- parseConstants = () => {
270
- const envOverrides = constantsSchema.parse(process.env);
271
- return Object.fromEntries(
272
- Object.entries(executionLimitsSharedDefaults).map(([key, defaultValue]) => [
273
- key,
274
- envOverrides[`AGENTS_${key}`] ?? defaultValue
275
- ])
276
- );
277
- };
278
- constants = parseConstants();
279
- ({
280
- MCP_TOOL_CONNECTION_TIMEOUT_MS,
281
- MCP_TOOL_MAX_RETRIES,
282
- MCP_TOOL_MAX_RECONNECTION_DELAY_MS,
283
- MCP_TOOL_INITIAL_RECONNECTION_DELAY_MS,
284
- MCP_TOOL_RECONNECTION_DELAY_GROWTH_FACTOR,
285
- CONVERSATION_HISTORY_DEFAULT_LIMIT,
286
- CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT
287
- } = constants);
288
- }
289
- });
290
-
291
- // ../packages/agents-core/src/constants/models.ts
292
- var ANTHROPIC_MODELS, OPENAI_MODELS, GOOGLE_MODELS;
293
- var init_models = __esm({
294
- "../packages/agents-core/src/constants/models.ts"() {
295
- "use strict";
296
- init_esm_shims();
297
- ANTHROPIC_MODELS = {
298
- CLAUDE_OPUS_4_1: "anthropic/claude-opus-4-1",
299
- CLAUDE_OPUS_4_1_20250805: "anthropic/claude-opus-4-1-20250805",
300
- CLAUDE_SONNET_4_5: "anthropic/claude-sonnet-4-5",
301
- CLAUDE_SONNET_4_5_20250929: "anthropic/claude-sonnet-4-5-20250929",
302
- CLAUDE_SONNET_4: "anthropic/claude-sonnet-4-0",
303
- CLAUDE_SONNET_4_20250514: "anthropic/claude-sonnet-4-20250514",
304
- CLAUDE_HAIKU_4_5: "anthropic/claude-haiku-4-5",
305
- CLAUDE_HAIKU_4_5_20251001: "anthropic/claude-haiku-4-5-20251001",
306
- CLAUDE_3_5_HAIKU: "anthropic/claude-3-5-haiku-latest",
307
- CLAUDE_3_5_HAIKU_20241022: "anthropic/claude-3-5-haiku-20241022"
308
- };
309
- OPENAI_MODELS = {
310
- GPT_5_1: "openai/gpt-5.1",
311
- GPT_5: "openai/gpt-5",
312
- GPT_5_20250807: "openai/gpt-5-2025-08-07",
313
- GPT_5_MINI: "openai/gpt-5-mini",
314
- GPT_5_MINI_20250807: "openai/gpt-5-mini-2025-08-07",
315
- GPT_5_NANO: "openai/gpt-5-nano",
316
- GPT_5_NANO_20250807: "openai/gpt-5-nano-2025-08-07",
317
- GPT_4_1: "openai/gpt-4.1",
318
- GPT_4_1_20250414: "openai/gpt-4.1-2025-04-14",
319
- GPT_4_1_MINI: "openai/gpt-4.1-mini",
320
- GPT_4_1_MINI_20250414: "openai/gpt-4.1-mini-2025-04-14",
321
- GPT_4_1_NANO: "openai/gpt-4.1-nano",
322
- GPT_4_1_NANO_20250414: "openai/gpt-4.1-nano-2025-04-14"
323
- };
324
- GOOGLE_MODELS = {
325
- GEMINI_3_PRO_PREVIEW: "google/gemini-3-pro-preview",
326
- GEMINI_2_5_PRO: "google/gemini-2.5-pro",
327
- GEMINI_2_5_FLASH: "google/gemini-2.5-flash",
328
- GEMINI_2_5_FLASH_LITE: "google/gemini-2.5-flash-lite"
329
- };
330
- }
331
- });
332
-
333
- // ../packages/agents-core/src/constants/otel-attributes.ts
334
- var init_otel_attributes = __esm({
335
- "../packages/agents-core/src/constants/otel-attributes.ts"() {
336
- "use strict";
337
- init_esm_shims();
338
- }
339
- });
340
-
341
- // ../packages/agents-core/src/constants/schema-validation/defaults.ts
342
- var schemaValidationDefaults;
343
- var init_defaults2 = __esm({
344
- "../packages/agents-core/src/constants/schema-validation/defaults.ts"() {
345
- "use strict";
346
- init_esm_shims();
347
- schemaValidationDefaults = {
348
- // Agent Execution Transfer Count
349
- // Controls how many times an agent can transfer control to sub-agents in a single conversation turn.
350
- // This prevents infinite transfer loops while allowing multi-agent collaboration workflows.
351
- AGENT_EXECUTION_TRANSFER_COUNT_MIN: 1,
352
- AGENT_EXECUTION_TRANSFER_COUNT_MAX: 1e3,
353
- AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT: 10,
354
- // Sub-Agent Turn Generation Steps
355
- // Limits how many AI generation steps a sub-agent can perform within a single turn.
356
- // Each generation step typically involves sending a prompt to the LLM and processing its response.
357
- // This prevents runaway token usage while allowing complex multi-step reasoning.
358
- SUB_AGENT_TURN_GENERATION_STEPS_MIN: 1,
359
- SUB_AGENT_TURN_GENERATION_STEPS_MAX: 1e3,
360
- SUB_AGENT_TURN_GENERATION_STEPS_DEFAULT: 12,
361
- // Status Update Thresholds
362
- // Real-time status updates are triggered when either threshold is exceeded during longer operations.
363
- // MAX_NUM_EVENTS: Maximum number of internal events before forcing a status update to the client.
364
- // MAX_INTERVAL_SECONDS: Maximum time between status updates regardless of event count.
365
- STATUS_UPDATE_MAX_NUM_EVENTS: 100,
366
- STATUS_UPDATE_MAX_INTERVAL_SECONDS: 600,
367
- // 10 minutes
368
- // Prompt Text Length Validation
369
- // Maximum character limits for agent and sub-agent system prompts to prevent excessive token usage.
370
- // Enforced during agent configuration to ensure prompts remain focused and manageable.
371
- VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS: 2e3,
372
- VALIDATION_AGENT_PROMPT_MAX_CHARS: 5e3,
373
- // Context Fetcher HTTP Timeout
374
- // Maximum time allowed for HTTP requests made by Context Fetchers (e.g., CRM lookups, external API calls).
375
- // Context Fetchers automatically retrieve external data at the start of a conversation to enrich agent context.
376
- CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT: 1e4
377
- // 10 seconds
378
- };
379
- }
380
- });
381
-
382
- // ../packages/agents-core/src/constants/schema-validation/index.ts
383
- import { z as z3 } from "zod";
384
- var constantsSchema2, parseConstants2, constants2, AGENT_EXECUTION_TRANSFER_COUNT_MIN, AGENT_EXECUTION_TRANSFER_COUNT_MAX, AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT, SUB_AGENT_TURN_GENERATION_STEPS_MIN, SUB_AGENT_TURN_GENERATION_STEPS_MAX, SUB_AGENT_TURN_GENERATION_STEPS_DEFAULT, STATUS_UPDATE_MAX_NUM_EVENTS, STATUS_UPDATE_MAX_INTERVAL_SECONDS, VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS, VALIDATION_AGENT_PROMPT_MAX_CHARS, CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT;
385
- var init_schema_validation = __esm({
386
- "../packages/agents-core/src/constants/schema-validation/index.ts"() {
387
- "use strict";
388
- init_esm_shims();
389
- init_env();
390
- init_defaults2();
391
- init_defaults2();
392
- loadEnvironmentFiles();
393
- constantsSchema2 = z3.object(
394
- Object.fromEntries(
395
- Object.keys(schemaValidationDefaults).map((key) => [
396
- `AGENTS_${key}`,
397
- z3.coerce.number().optional()
398
- ])
399
- )
400
- );
401
- parseConstants2 = () => {
402
- const envOverrides = constantsSchema2.parse(process.env);
403
- return Object.fromEntries(
404
- Object.entries(schemaValidationDefaults).map(([key, defaultValue]) => [
405
- key,
406
- envOverrides[`AGENTS_${key}`] ?? defaultValue
407
- ])
408
- );
409
- };
410
- constants2 = parseConstants2();
411
- ({
412
- AGENT_EXECUTION_TRANSFER_COUNT_MIN,
413
- AGENT_EXECUTION_TRANSFER_COUNT_MAX,
414
- AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT,
415
- SUB_AGENT_TURN_GENERATION_STEPS_MIN,
416
- SUB_AGENT_TURN_GENERATION_STEPS_MAX,
417
- SUB_AGENT_TURN_GENERATION_STEPS_DEFAULT,
418
- STATUS_UPDATE_MAX_NUM_EVENTS,
419
- STATUS_UPDATE_MAX_INTERVAL_SECONDS,
420
- VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS,
421
- VALIDATION_AGENT_PROMPT_MAX_CHARS,
422
- CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT
423
- } = constants2);
424
- }
425
- });
426
-
427
- // ../packages/agents-core/src/constants/signoz-queries.ts
428
- var DATA_TYPES, FIELD_TYPES, QUERY_FIELD_CONFIGS;
429
- var init_signoz_queries = __esm({
430
- "../packages/agents-core/src/constants/signoz-queries.ts"() {
431
- "use strict";
432
- init_esm_shims();
433
- DATA_TYPES = {
434
- STRING: "string",
435
- INT64: "int64",
436
- FLOAT64: "float64",
437
- BOOL: "bool"
438
- };
439
- FIELD_TYPES = {
440
- TAG: "tag",
441
- RESOURCE: "resource"
442
- };
443
- QUERY_FIELD_CONFIGS = {
444
- // String tag fields
445
- STRING_TAG: {
446
- dataType: DATA_TYPES.STRING,
447
- type: FIELD_TYPES.TAG,
448
- isColumn: false
449
- },
450
- STRING_TAG_COLUMN: {
451
- dataType: DATA_TYPES.STRING,
452
- type: FIELD_TYPES.TAG,
453
- isColumn: true
454
- },
455
- // Numeric tag fields
456
- INT64_TAG: {
457
- dataType: DATA_TYPES.INT64,
458
- type: FIELD_TYPES.TAG,
459
- isColumn: false
460
- },
461
- INT64_TAG_COLUMN: {
462
- dataType: DATA_TYPES.INT64,
463
- type: FIELD_TYPES.TAG,
464
- isColumn: true
465
- },
466
- FLOAT64_TAG: {
467
- dataType: DATA_TYPES.FLOAT64,
468
- type: FIELD_TYPES.TAG,
469
- isColumn: false
470
- },
471
- FLOAT64_TAG_COLUMN: {
472
- dataType: DATA_TYPES.FLOAT64,
473
- type: FIELD_TYPES.TAG,
474
- isColumn: true
475
- },
476
- // Boolean tag fields
477
- BOOL_TAG: {
478
- dataType: DATA_TYPES.BOOL,
479
- type: FIELD_TYPES.TAG,
480
- isColumn: false
481
- },
482
- BOOL_TAG_COLUMN: {
483
- dataType: DATA_TYPES.BOOL,
484
- type: FIELD_TYPES.TAG,
485
- isColumn: true
486
- }
487
- };
488
- }
489
- });
490
-
491
- // ../packages/agents-core/src/utils/logger.ts
492
- import pino from "pino";
493
- import pinoPretty from "pino-pretty";
494
- function getLogger(name14) {
495
- return loggerFactory.getLogger(name14);
496
- }
497
- var PinoLogger, LoggerFactory, loggerFactory;
498
- var init_logger = __esm({
499
- "../packages/agents-core/src/utils/logger.ts"() {
500
- "use strict";
501
- init_esm_shims();
502
- PinoLogger = class {
503
- constructor(name14, config = {}) {
504
- this.name = name14;
505
- this.options = {
506
- name: this.name,
507
- level: process.env.LOG_LEVEL || (process.env.ENVIRONMENT === "test" ? "silent" : "info"),
508
- serializers: {
509
- obj: (value) => ({ ...value })
510
- },
511
- redact: ["req.headers.authorization", 'req.headers["x-inkeep-admin-authentication"]'],
512
- ...config.options
513
- };
514
- if (config.transportConfigs) {
515
- this.transportConfigs = config.transportConfigs;
516
- }
517
- if (this.transportConfigs.length > 0) {
518
- this.pinoInstance = pino(this.options, pino.transport({ targets: this.transportConfigs }));
519
- } else {
520
- try {
521
- const prettyStream = pinoPretty({
522
- colorize: true,
523
- translateTime: "HH:MM:ss",
524
- ignore: "pid,hostname"
525
- });
526
- this.pinoInstance = pino(this.options, prettyStream);
527
- } catch (error) {
528
- console.warn("Warning: pino-pretty failed, using standard JSON output:", error);
529
- this.pinoInstance = pino(this.options);
530
- }
531
- }
532
- }
533
- transportConfigs = [];
534
- pinoInstance;
535
- options;
536
- /**
537
- * Recreate the pino instance with current transports
538
- */
539
- recreateInstance() {
540
- if (this.pinoInstance && typeof this.pinoInstance.flush === "function") {
541
- this.pinoInstance.flush();
542
- }
543
- if (this.transportConfigs.length === 0) {
544
- try {
545
- const prettyStream = pinoPretty({
546
- colorize: true,
547
- translateTime: "HH:MM:ss",
548
- ignore: "pid,hostname"
549
- });
550
- this.pinoInstance = pino(this.options, prettyStream);
551
- } catch (error) {
552
- console.warn("Warning: pino-pretty failed, using standard JSON output:", error);
553
- this.pinoInstance = pino(this.options);
554
- }
555
- } else {
556
- const multiTransport = { targets: this.transportConfigs };
557
- const pinoTransport = pino.transport(multiTransport);
558
- this.pinoInstance = pino(this.options, pinoTransport);
559
- }
560
- }
561
- /**
562
- * Add a new transport to the logger
563
- */
564
- addTransport(transportConfig) {
565
- this.transportConfigs.push(transportConfig);
566
- this.recreateInstance();
567
- }
568
- /**
569
- * Remove a transport by index
570
- */
571
- removeTransport(index3) {
572
- if (index3 >= 0 && index3 < this.transportConfigs.length) {
573
- this.transportConfigs.splice(index3, 1);
574
- this.recreateInstance();
575
- }
576
- }
577
- /**
578
- * Get current transports
579
- */
580
- getTransports() {
581
- return [...this.transportConfigs];
582
- }
583
- /**
584
- * Update logger options
585
- */
586
- updateOptions(options) {
587
- this.options = {
588
- ...this.options,
589
- ...options
590
- };
591
- this.recreateInstance();
592
- }
593
- /**
594
- * Get the underlying pino instance for advanced usage
595
- */
596
- getPinoInstance() {
597
- return this.pinoInstance;
598
- }
599
- error(data, message) {
600
- this.pinoInstance.error(data, message);
601
- }
602
- warn(data, message) {
603
- this.pinoInstance.warn(data, message);
604
- }
605
- info(data, message) {
606
- this.pinoInstance.info(data, message);
607
- }
608
- debug(data, message) {
609
- this.pinoInstance.debug(data, message);
610
- }
611
- };
612
- LoggerFactory = class {
613
- config = {};
614
- loggers = /* @__PURE__ */ new Map();
615
- /**
616
- * Configure the logger factory
617
- */
618
- configure(config) {
619
- this.config = config;
620
- this.loggers.clear();
621
- }
622
- /**
623
- * Get or create a logger instance
624
- */
625
- getLogger(name14) {
626
- if (this.loggers.has(name14)) {
627
- const logger22 = this.loggers.get(name14);
628
- if (!logger22) {
629
- throw new Error(`Logger '${name14}' not found in cache`);
630
- }
631
- return logger22;
632
- }
633
- let logger21;
634
- if (this.config.loggerFactory) {
635
- logger21 = this.config.loggerFactory(name14);
636
- } else if (this.config.defaultLogger) {
637
- logger21 = this.config.defaultLogger;
638
- } else {
639
- logger21 = new PinoLogger(name14, this.config.pinoConfig);
640
- }
641
- this.loggers.set(name14, logger21);
642
- return logger21;
643
- }
644
- /**
645
- * Reset factory to default state
646
- */
647
- reset() {
648
- this.config = {};
649
- this.loggers.clear();
650
- }
651
- };
652
- loggerFactory = new LoggerFactory();
653
- }
654
- });
655
-
656
- // ../packages/agents-core/src/utils/schema-conversion.ts
657
- import { z as z4 } from "zod";
658
- var logger;
659
- var init_schema_conversion = __esm({
660
- "../packages/agents-core/src/utils/schema-conversion.ts"() {
661
- "use strict";
662
- init_esm_shims();
663
- init_logger();
664
- logger = getLogger("schema-conversion");
665
- }
666
- });
667
-
668
74
  // ../node_modules/.pnpm/@asteasolutions+zod-to-openapi@8.1.0_zod@4.1.12/node_modules/@asteasolutions/zod-to-openapi/dist/index.mjs
669
75
  function __rest(s4, e) {
670
76
  var t2 = {};
@@ -1558,7 +964,7 @@ var init_dist3 = __esm({
1558
964
  });
1559
965
 
1560
966
  // ../node_modules/.pnpm/@hono+zod-openapi@1.1.5_hono@4.10.4_zod@4.1.12/node_modules/@hono/zod-openapi/dist/index.js
1561
- import { z as z5 } from "zod";
967
+ import { z } from "zod";
1562
968
  var init_dist4 = __esm({
1563
969
  "../node_modules/.pnpm/@hono+zod-openapi@1.1.5_hono@4.10.4_zod@4.1.12/node_modules/@hono/zod-openapi/dist/index.js"() {
1564
970
  "use strict";
@@ -1567,7 +973,601 @@ var init_dist4 = __esm({
1567
973
  init_dist2();
1568
974
  init_dist3();
1569
975
  init_url();
1570
- extendZodWithOpenApi(z5);
976
+ extendZodWithOpenApi(z);
977
+ }
978
+ });
979
+
980
+ // ../node_modules/.pnpm/dotenv-expand@12.0.3/node_modules/dotenv-expand/lib/main.js
981
+ var require_main = __commonJS({
982
+ "../node_modules/.pnpm/dotenv-expand@12.0.3/node_modules/dotenv-expand/lib/main.js"(exports, module2) {
983
+ "use strict";
984
+ init_esm_shims();
985
+ function _resolveEscapeSequences(value) {
986
+ return value.replace(/\\\$/g, "$");
987
+ }
988
+ function expandValue(value, processEnv, runningParsed) {
989
+ const env3 = { ...runningParsed, ...processEnv };
990
+ const regex = /(?<!\\)\${([^{}]+)}|(?<!\\)\$([A-Za-z_][A-Za-z0-9_]*)/g;
991
+ let result = value;
992
+ let match2;
993
+ const seen = /* @__PURE__ */ new Set();
994
+ while ((match2 = regex.exec(result)) !== null) {
995
+ seen.add(result);
996
+ const [template, bracedExpression, unbracedExpression] = match2;
997
+ const expression = bracedExpression || unbracedExpression;
998
+ const opRegex = /(:\+|\+|:-|-)/;
999
+ const opMatch = expression.match(opRegex);
1000
+ const splitter = opMatch ? opMatch[0] : null;
1001
+ const r = expression.split(splitter);
1002
+ let defaultValue;
1003
+ let value2;
1004
+ const key = r.shift();
1005
+ if ([":+", "+"].includes(splitter)) {
1006
+ defaultValue = env3[key] ? r.join(splitter) : "";
1007
+ value2 = null;
1008
+ } else {
1009
+ defaultValue = r.join(splitter);
1010
+ value2 = env3[key];
1011
+ }
1012
+ if (value2) {
1013
+ if (seen.has(value2)) {
1014
+ result = result.replace(template, defaultValue);
1015
+ } else {
1016
+ result = result.replace(template, value2);
1017
+ }
1018
+ } else {
1019
+ result = result.replace(template, defaultValue);
1020
+ }
1021
+ if (result === runningParsed[key]) {
1022
+ break;
1023
+ }
1024
+ regex.lastIndex = 0;
1025
+ }
1026
+ return result;
1027
+ }
1028
+ function expand2(options) {
1029
+ const runningParsed = {};
1030
+ let processEnv = process.env;
1031
+ if (options && options.processEnv != null) {
1032
+ processEnv = options.processEnv;
1033
+ }
1034
+ for (const key in options.parsed) {
1035
+ let value = options.parsed[key];
1036
+ if (processEnv[key] && processEnv[key] !== value) {
1037
+ value = processEnv[key];
1038
+ } else {
1039
+ value = expandValue(value, processEnv, runningParsed);
1040
+ }
1041
+ options.parsed[key] = _resolveEscapeSequences(value);
1042
+ runningParsed[key] = _resolveEscapeSequences(value);
1043
+ }
1044
+ for (const processKey in options.parsed) {
1045
+ processEnv[processKey] = options.parsed[processKey];
1046
+ }
1047
+ return options;
1048
+ }
1049
+ module2.exports.expand = expand2;
1050
+ }
1051
+ });
1052
+
1053
+ // ../packages/agents-core/src/env.ts
1054
+ import fs2 from "fs";
1055
+ import os from "os";
1056
+ import path2 from "path";
1057
+ import dotenv from "dotenv";
1058
+ import { findUpSync } from "find-up";
1059
+ var import_dotenv_expand, loadEnvironmentFiles, envSchema, parseEnv, env;
1060
+ var init_env = __esm({
1061
+ "../packages/agents-core/src/env.ts"() {
1062
+ "use strict";
1063
+ init_esm_shims();
1064
+ import_dotenv_expand = __toESM(require_main(), 1);
1065
+ init_dist4();
1066
+ loadEnvironmentFiles = () => {
1067
+ const environmentFiles = [];
1068
+ const currentEnv = path2.resolve(process.cwd(), ".env");
1069
+ if (fs2.existsSync(currentEnv)) {
1070
+ environmentFiles.push(currentEnv);
1071
+ }
1072
+ const rootEnv = findUpSync(".env", { cwd: path2.dirname(process.cwd()) });
1073
+ if (rootEnv) {
1074
+ if (rootEnv !== currentEnv) {
1075
+ environmentFiles.push(rootEnv);
1076
+ }
1077
+ }
1078
+ const userConfigPath = path2.join(os.homedir(), ".inkeep", "config");
1079
+ if (fs2.existsSync(userConfigPath)) {
1080
+ dotenv.config({ path: userConfigPath, override: true, quiet: true });
1081
+ }
1082
+ if (environmentFiles.length > 0) {
1083
+ dotenv.config({
1084
+ path: environmentFiles,
1085
+ override: false,
1086
+ quiet: true
1087
+ });
1088
+ (0, import_dotenv_expand.expand)({ processEnv: process.env });
1089
+ }
1090
+ };
1091
+ loadEnvironmentFiles();
1092
+ envSchema = z.object({
1093
+ ENVIRONMENT: z.enum(["development", "production", "pentest", "test"]).optional(),
1094
+ DATABASE_URL: z.string().optional(),
1095
+ POSTGRES_POOL_SIZE: z.string().optional(),
1096
+ INKEEP_AGENTS_JWT_SIGNING_SECRET: z.string().min(32, "INKEEP_AGENTS_JWT_SIGNING_SECRET must be at least 32 characters").optional(),
1097
+ INKEEP_AGENTS_MANAGE_UI_URL: z.string().optional(),
1098
+ INKEEP_AGENTS_MANAGE_API_URL: z.string().optional(),
1099
+ BETTER_AUTH_SECRET: z.string().optional()
1100
+ });
1101
+ parseEnv = () => {
1102
+ try {
1103
+ const parsedEnv = envSchema.parse(process.env);
1104
+ return parsedEnv;
1105
+ } catch (error) {
1106
+ if (error instanceof z.ZodError) {
1107
+ const missingVars = error.issues.map((issue) => issue.path.join("."));
1108
+ throw new Error(
1109
+ `\u274C Invalid environment variables: ${missingVars.join(", ")}
1110
+ ${error.message}`
1111
+ );
1112
+ }
1113
+ throw error;
1114
+ }
1115
+ };
1116
+ env = parseEnv();
1117
+ }
1118
+ });
1119
+
1120
+ // ../packages/agents-core/src/constants/execution-limits-shared/defaults.ts
1121
+ var executionLimitsSharedDefaults;
1122
+ var init_defaults = __esm({
1123
+ "../packages/agents-core/src/constants/execution-limits-shared/defaults.ts"() {
1124
+ "use strict";
1125
+ init_esm_shims();
1126
+ executionLimitsSharedDefaults = {
1127
+ // MCP Tool Connection and Retry Behavior
1128
+ // Model Context Protocol (MCP) enables agents to connect to external tools and services.
1129
+ // These constants control connection timeouts and retry strategy with exponential backoff.
1130
+ // CONNECTION_TIMEOUT_MS: Maximum wait time for initial MCP server connection
1131
+ // MAX_RETRIES: Maximum number of connection retry attempts before failing
1132
+ // INITIAL_RECONNECTION_DELAY_MS: Starting delay between retry attempts
1133
+ // MAX_RECONNECTION_DELAY_MS: Maximum delay between retry attempts (after exponential growth)
1134
+ // RECONNECTION_DELAY_GROWTH_FACTOR: Multiplier applied to delay after each failed retry (exponential backoff)
1135
+ MCP_TOOL_CONNECTION_TIMEOUT_MS: 3e3,
1136
+ // 3 seconds
1137
+ MCP_TOOL_MAX_RETRIES: 3,
1138
+ MCP_TOOL_MAX_RECONNECTION_DELAY_MS: 3e4,
1139
+ // 30 seconds
1140
+ MCP_TOOL_INITIAL_RECONNECTION_DELAY_MS: 1e3,
1141
+ // 1 second
1142
+ MCP_TOOL_RECONNECTION_DELAY_GROWTH_FACTOR: 1.5,
1143
+ // Conversation History Context Window
1144
+ // CONVERSATION_HISTORY_DEFAULT_LIMIT: Default number of recent messages to retrieve from conversation history.
1145
+ // Used when fetching conversation context for status updates and other operations.
1146
+ CONVERSATION_HISTORY_DEFAULT_LIMIT: 50,
1147
+ // CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT: Maximum number of tokens from previous conversation messages
1148
+ // to include in the LLM prompt. Prevents excessive token usage while maintaining relevant conversation context.
1149
+ // Messages exceeding this limit are truncated from the beginning of the conversation.
1150
+ // Increased from 4,000 to 8,000 to accommodate tool results in conversation history.
1151
+ CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT: 8e3
1152
+ };
1153
+ }
1154
+ });
1155
+
1156
+ // ../packages/agents-core/src/constants/execution-limits-shared/index.ts
1157
+ var constantsSchema, parseConstants, constants, MCP_TOOL_CONNECTION_TIMEOUT_MS, MCP_TOOL_MAX_RETRIES, MCP_TOOL_MAX_RECONNECTION_DELAY_MS, MCP_TOOL_INITIAL_RECONNECTION_DELAY_MS, MCP_TOOL_RECONNECTION_DELAY_GROWTH_FACTOR, CONVERSATION_HISTORY_DEFAULT_LIMIT, CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT;
1158
+ var init_execution_limits_shared = __esm({
1159
+ "../packages/agents-core/src/constants/execution-limits-shared/index.ts"() {
1160
+ "use strict";
1161
+ init_esm_shims();
1162
+ init_dist4();
1163
+ init_env();
1164
+ init_defaults();
1165
+ init_defaults();
1166
+ loadEnvironmentFiles();
1167
+ constantsSchema = z.object(
1168
+ Object.fromEntries(
1169
+ Object.keys(executionLimitsSharedDefaults).map((key) => [
1170
+ `AGENTS_${key}`,
1171
+ z.coerce.number().optional()
1172
+ ])
1173
+ )
1174
+ );
1175
+ parseConstants = () => {
1176
+ const envOverrides = constantsSchema.parse(process.env);
1177
+ return Object.fromEntries(
1178
+ Object.entries(executionLimitsSharedDefaults).map(([key, defaultValue]) => [
1179
+ key,
1180
+ envOverrides[`AGENTS_${key}`] ?? defaultValue
1181
+ ])
1182
+ );
1183
+ };
1184
+ constants = parseConstants();
1185
+ ({
1186
+ MCP_TOOL_CONNECTION_TIMEOUT_MS,
1187
+ MCP_TOOL_MAX_RETRIES,
1188
+ MCP_TOOL_MAX_RECONNECTION_DELAY_MS,
1189
+ MCP_TOOL_INITIAL_RECONNECTION_DELAY_MS,
1190
+ MCP_TOOL_RECONNECTION_DELAY_GROWTH_FACTOR,
1191
+ CONVERSATION_HISTORY_DEFAULT_LIMIT,
1192
+ CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT
1193
+ } = constants);
1194
+ }
1195
+ });
1196
+
1197
+ // ../packages/agents-core/src/constants/models.ts
1198
+ var ANTHROPIC_MODELS, OPENAI_MODELS, GOOGLE_MODELS;
1199
+ var init_models = __esm({
1200
+ "../packages/agents-core/src/constants/models.ts"() {
1201
+ "use strict";
1202
+ init_esm_shims();
1203
+ ANTHROPIC_MODELS = {
1204
+ CLAUDE_OPUS_4_1: "anthropic/claude-opus-4-1",
1205
+ CLAUDE_OPUS_4_1_20250805: "anthropic/claude-opus-4-1-20250805",
1206
+ CLAUDE_SONNET_4_5: "anthropic/claude-sonnet-4-5",
1207
+ CLAUDE_SONNET_4_5_20250929: "anthropic/claude-sonnet-4-5-20250929",
1208
+ CLAUDE_SONNET_4: "anthropic/claude-sonnet-4-0",
1209
+ CLAUDE_SONNET_4_20250514: "anthropic/claude-sonnet-4-20250514",
1210
+ CLAUDE_HAIKU_4_5: "anthropic/claude-haiku-4-5",
1211
+ CLAUDE_HAIKU_4_5_20251001: "anthropic/claude-haiku-4-5-20251001",
1212
+ CLAUDE_3_5_HAIKU: "anthropic/claude-3-5-haiku-latest",
1213
+ CLAUDE_3_5_HAIKU_20241022: "anthropic/claude-3-5-haiku-20241022"
1214
+ };
1215
+ OPENAI_MODELS = {
1216
+ GPT_5_1: "openai/gpt-5.1",
1217
+ GPT_5: "openai/gpt-5",
1218
+ GPT_5_20250807: "openai/gpt-5-2025-08-07",
1219
+ GPT_5_MINI: "openai/gpt-5-mini",
1220
+ GPT_5_MINI_20250807: "openai/gpt-5-mini-2025-08-07",
1221
+ GPT_5_NANO: "openai/gpt-5-nano",
1222
+ GPT_5_NANO_20250807: "openai/gpt-5-nano-2025-08-07",
1223
+ GPT_4_1: "openai/gpt-4.1",
1224
+ GPT_4_1_20250414: "openai/gpt-4.1-2025-04-14",
1225
+ GPT_4_1_MINI: "openai/gpt-4.1-mini",
1226
+ GPT_4_1_MINI_20250414: "openai/gpt-4.1-mini-2025-04-14",
1227
+ GPT_4_1_NANO: "openai/gpt-4.1-nano",
1228
+ GPT_4_1_NANO_20250414: "openai/gpt-4.1-nano-2025-04-14"
1229
+ };
1230
+ GOOGLE_MODELS = {
1231
+ GEMINI_3_PRO_PREVIEW: "google/gemini-3-pro-preview",
1232
+ GEMINI_2_5_PRO: "google/gemini-2.5-pro",
1233
+ GEMINI_2_5_FLASH: "google/gemini-2.5-flash",
1234
+ GEMINI_2_5_FLASH_LITE: "google/gemini-2.5-flash-lite"
1235
+ };
1236
+ }
1237
+ });
1238
+
1239
+ // ../packages/agents-core/src/constants/otel-attributes.ts
1240
+ var init_otel_attributes = __esm({
1241
+ "../packages/agents-core/src/constants/otel-attributes.ts"() {
1242
+ "use strict";
1243
+ init_esm_shims();
1244
+ }
1245
+ });
1246
+
1247
+ // ../packages/agents-core/src/constants/schema-validation/defaults.ts
1248
+ var schemaValidationDefaults;
1249
+ var init_defaults2 = __esm({
1250
+ "../packages/agents-core/src/constants/schema-validation/defaults.ts"() {
1251
+ "use strict";
1252
+ init_esm_shims();
1253
+ schemaValidationDefaults = {
1254
+ // Agent Execution Transfer Count
1255
+ // Controls how many times an agent can transfer control to sub-agents in a single conversation turn.
1256
+ // This prevents infinite transfer loops while allowing multi-agent collaboration workflows.
1257
+ AGENT_EXECUTION_TRANSFER_COUNT_MIN: 1,
1258
+ AGENT_EXECUTION_TRANSFER_COUNT_MAX: 1e3,
1259
+ AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT: 10,
1260
+ // Sub-Agent Turn Generation Steps
1261
+ // Limits how many AI generation steps a sub-agent can perform within a single turn.
1262
+ // Each generation step typically involves sending a prompt to the LLM and processing its response.
1263
+ // This prevents runaway token usage while allowing complex multi-step reasoning.
1264
+ SUB_AGENT_TURN_GENERATION_STEPS_MIN: 1,
1265
+ SUB_AGENT_TURN_GENERATION_STEPS_MAX: 1e3,
1266
+ SUB_AGENT_TURN_GENERATION_STEPS_DEFAULT: 12,
1267
+ // Status Update Thresholds
1268
+ // Real-time status updates are triggered when either threshold is exceeded during longer operations.
1269
+ // MAX_NUM_EVENTS: Maximum number of internal events before forcing a status update to the client.
1270
+ // MAX_INTERVAL_SECONDS: Maximum time between status updates regardless of event count.
1271
+ STATUS_UPDATE_MAX_NUM_EVENTS: 100,
1272
+ STATUS_UPDATE_MAX_INTERVAL_SECONDS: 600,
1273
+ // 10 minutes
1274
+ // Prompt Text Length Validation
1275
+ // Maximum character limits for agent and sub-agent system prompts to prevent excessive token usage.
1276
+ // Enforced during agent configuration to ensure prompts remain focused and manageable.
1277
+ VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS: 2e3,
1278
+ VALIDATION_AGENT_PROMPT_MAX_CHARS: 5e3,
1279
+ // Context Fetcher HTTP Timeout
1280
+ // Maximum time allowed for HTTP requests made by Context Fetchers (e.g., CRM lookups, external API calls).
1281
+ // Context Fetchers automatically retrieve external data at the start of a conversation to enrich agent context.
1282
+ CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT: 1e4
1283
+ // 10 seconds
1284
+ };
1285
+ }
1286
+ });
1287
+
1288
+ // ../packages/agents-core/src/constants/schema-validation/index.ts
1289
+ var constantsSchema2, parseConstants2, constants2, AGENT_EXECUTION_TRANSFER_COUNT_MIN, AGENT_EXECUTION_TRANSFER_COUNT_MAX, AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT, SUB_AGENT_TURN_GENERATION_STEPS_MIN, SUB_AGENT_TURN_GENERATION_STEPS_MAX, SUB_AGENT_TURN_GENERATION_STEPS_DEFAULT, STATUS_UPDATE_MAX_NUM_EVENTS, STATUS_UPDATE_MAX_INTERVAL_SECONDS, VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS, VALIDATION_AGENT_PROMPT_MAX_CHARS, CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT;
1290
+ var init_schema_validation = __esm({
1291
+ "../packages/agents-core/src/constants/schema-validation/index.ts"() {
1292
+ "use strict";
1293
+ init_esm_shims();
1294
+ init_dist4();
1295
+ init_env();
1296
+ init_defaults2();
1297
+ init_defaults2();
1298
+ loadEnvironmentFiles();
1299
+ constantsSchema2 = z.object(
1300
+ Object.fromEntries(
1301
+ Object.keys(schemaValidationDefaults).map((key) => [
1302
+ `AGENTS_${key}`,
1303
+ z.coerce.number().optional()
1304
+ ])
1305
+ )
1306
+ );
1307
+ parseConstants2 = () => {
1308
+ const envOverrides = constantsSchema2.parse(process.env);
1309
+ return Object.fromEntries(
1310
+ Object.entries(schemaValidationDefaults).map(([key, defaultValue]) => [
1311
+ key,
1312
+ envOverrides[`AGENTS_${key}`] ?? defaultValue
1313
+ ])
1314
+ );
1315
+ };
1316
+ constants2 = parseConstants2();
1317
+ ({
1318
+ AGENT_EXECUTION_TRANSFER_COUNT_MIN,
1319
+ AGENT_EXECUTION_TRANSFER_COUNT_MAX,
1320
+ AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT,
1321
+ SUB_AGENT_TURN_GENERATION_STEPS_MIN,
1322
+ SUB_AGENT_TURN_GENERATION_STEPS_MAX,
1323
+ SUB_AGENT_TURN_GENERATION_STEPS_DEFAULT,
1324
+ STATUS_UPDATE_MAX_NUM_EVENTS,
1325
+ STATUS_UPDATE_MAX_INTERVAL_SECONDS,
1326
+ VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS,
1327
+ VALIDATION_AGENT_PROMPT_MAX_CHARS,
1328
+ CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT
1329
+ } = constants2);
1330
+ }
1331
+ });
1332
+
1333
+ // ../packages/agents-core/src/constants/signoz-queries.ts
1334
+ var DATA_TYPES, FIELD_TYPES, QUERY_FIELD_CONFIGS;
1335
+ var init_signoz_queries = __esm({
1336
+ "../packages/agents-core/src/constants/signoz-queries.ts"() {
1337
+ "use strict";
1338
+ init_esm_shims();
1339
+ DATA_TYPES = {
1340
+ STRING: "string",
1341
+ INT64: "int64",
1342
+ FLOAT64: "float64",
1343
+ BOOL: "bool"
1344
+ };
1345
+ FIELD_TYPES = {
1346
+ TAG: "tag",
1347
+ RESOURCE: "resource"
1348
+ };
1349
+ QUERY_FIELD_CONFIGS = {
1350
+ // String tag fields
1351
+ STRING_TAG: {
1352
+ dataType: DATA_TYPES.STRING,
1353
+ type: FIELD_TYPES.TAG,
1354
+ isColumn: false
1355
+ },
1356
+ STRING_TAG_COLUMN: {
1357
+ dataType: DATA_TYPES.STRING,
1358
+ type: FIELD_TYPES.TAG,
1359
+ isColumn: true
1360
+ },
1361
+ // Numeric tag fields
1362
+ INT64_TAG: {
1363
+ dataType: DATA_TYPES.INT64,
1364
+ type: FIELD_TYPES.TAG,
1365
+ isColumn: false
1366
+ },
1367
+ INT64_TAG_COLUMN: {
1368
+ dataType: DATA_TYPES.INT64,
1369
+ type: FIELD_TYPES.TAG,
1370
+ isColumn: true
1371
+ },
1372
+ FLOAT64_TAG: {
1373
+ dataType: DATA_TYPES.FLOAT64,
1374
+ type: FIELD_TYPES.TAG,
1375
+ isColumn: false
1376
+ },
1377
+ FLOAT64_TAG_COLUMN: {
1378
+ dataType: DATA_TYPES.FLOAT64,
1379
+ type: FIELD_TYPES.TAG,
1380
+ isColumn: true
1381
+ },
1382
+ // Boolean tag fields
1383
+ BOOL_TAG: {
1384
+ dataType: DATA_TYPES.BOOL,
1385
+ type: FIELD_TYPES.TAG,
1386
+ isColumn: false
1387
+ },
1388
+ BOOL_TAG_COLUMN: {
1389
+ dataType: DATA_TYPES.BOOL,
1390
+ type: FIELD_TYPES.TAG,
1391
+ isColumn: true
1392
+ }
1393
+ };
1394
+ }
1395
+ });
1396
+
1397
+ // ../packages/agents-core/src/utils/logger.ts
1398
+ import pino from "pino";
1399
+ import pinoPretty from "pino-pretty";
1400
+ function getLogger(name14) {
1401
+ return loggerFactory.getLogger(name14);
1402
+ }
1403
+ var PinoLogger, LoggerFactory, loggerFactory;
1404
+ var init_logger = __esm({
1405
+ "../packages/agents-core/src/utils/logger.ts"() {
1406
+ "use strict";
1407
+ init_esm_shims();
1408
+ PinoLogger = class {
1409
+ constructor(name14, config = {}) {
1410
+ this.name = name14;
1411
+ this.options = {
1412
+ name: this.name,
1413
+ level: process.env.LOG_LEVEL || (process.env.ENVIRONMENT === "test" ? "silent" : "info"),
1414
+ serializers: {
1415
+ obj: (value) => ({ ...value })
1416
+ },
1417
+ redact: ["req.headers.authorization", 'req.headers["x-inkeep-admin-authentication"]'],
1418
+ ...config.options
1419
+ };
1420
+ if (config.transportConfigs) {
1421
+ this.transportConfigs = config.transportConfigs;
1422
+ }
1423
+ if (this.transportConfigs.length > 0) {
1424
+ this.pinoInstance = pino(this.options, pino.transport({ targets: this.transportConfigs }));
1425
+ } else {
1426
+ try {
1427
+ const prettyStream = pinoPretty({
1428
+ colorize: true,
1429
+ translateTime: "HH:MM:ss",
1430
+ ignore: "pid,hostname"
1431
+ });
1432
+ this.pinoInstance = pino(this.options, prettyStream);
1433
+ } catch (error) {
1434
+ console.warn("Warning: pino-pretty failed, using standard JSON output:", error);
1435
+ this.pinoInstance = pino(this.options);
1436
+ }
1437
+ }
1438
+ }
1439
+ transportConfigs = [];
1440
+ pinoInstance;
1441
+ options;
1442
+ /**
1443
+ * Recreate the pino instance with current transports
1444
+ */
1445
+ recreateInstance() {
1446
+ if (this.pinoInstance && typeof this.pinoInstance.flush === "function") {
1447
+ this.pinoInstance.flush();
1448
+ }
1449
+ if (this.transportConfigs.length === 0) {
1450
+ try {
1451
+ const prettyStream = pinoPretty({
1452
+ colorize: true,
1453
+ translateTime: "HH:MM:ss",
1454
+ ignore: "pid,hostname"
1455
+ });
1456
+ this.pinoInstance = pino(this.options, prettyStream);
1457
+ } catch (error) {
1458
+ console.warn("Warning: pino-pretty failed, using standard JSON output:", error);
1459
+ this.pinoInstance = pino(this.options);
1460
+ }
1461
+ } else {
1462
+ const multiTransport = { targets: this.transportConfigs };
1463
+ const pinoTransport = pino.transport(multiTransport);
1464
+ this.pinoInstance = pino(this.options, pinoTransport);
1465
+ }
1466
+ }
1467
+ /**
1468
+ * Add a new transport to the logger
1469
+ */
1470
+ addTransport(transportConfig) {
1471
+ this.transportConfigs.push(transportConfig);
1472
+ this.recreateInstance();
1473
+ }
1474
+ /**
1475
+ * Remove a transport by index
1476
+ */
1477
+ removeTransport(index3) {
1478
+ if (index3 >= 0 && index3 < this.transportConfigs.length) {
1479
+ this.transportConfigs.splice(index3, 1);
1480
+ this.recreateInstance();
1481
+ }
1482
+ }
1483
+ /**
1484
+ * Get current transports
1485
+ */
1486
+ getTransports() {
1487
+ return [...this.transportConfigs];
1488
+ }
1489
+ /**
1490
+ * Update logger options
1491
+ */
1492
+ updateOptions(options) {
1493
+ this.options = {
1494
+ ...this.options,
1495
+ ...options
1496
+ };
1497
+ this.recreateInstance();
1498
+ }
1499
+ /**
1500
+ * Get the underlying pino instance for advanced usage
1501
+ */
1502
+ getPinoInstance() {
1503
+ return this.pinoInstance;
1504
+ }
1505
+ error(data, message) {
1506
+ this.pinoInstance.error(data, message);
1507
+ }
1508
+ warn(data, message) {
1509
+ this.pinoInstance.warn(data, message);
1510
+ }
1511
+ info(data, message) {
1512
+ this.pinoInstance.info(data, message);
1513
+ }
1514
+ debug(data, message) {
1515
+ this.pinoInstance.debug(data, message);
1516
+ }
1517
+ };
1518
+ LoggerFactory = class {
1519
+ config = {};
1520
+ loggers = /* @__PURE__ */ new Map();
1521
+ /**
1522
+ * Configure the logger factory
1523
+ */
1524
+ configure(config) {
1525
+ this.config = config;
1526
+ this.loggers.clear();
1527
+ }
1528
+ /**
1529
+ * Get or create a logger instance
1530
+ */
1531
+ getLogger(name14) {
1532
+ if (this.loggers.has(name14)) {
1533
+ const logger22 = this.loggers.get(name14);
1534
+ if (!logger22) {
1535
+ throw new Error(`Logger '${name14}' not found in cache`);
1536
+ }
1537
+ return logger22;
1538
+ }
1539
+ let logger21;
1540
+ if (this.config.loggerFactory) {
1541
+ logger21 = this.config.loggerFactory(name14);
1542
+ } else if (this.config.defaultLogger) {
1543
+ logger21 = this.config.defaultLogger;
1544
+ } else {
1545
+ logger21 = new PinoLogger(name14, this.config.pinoConfig);
1546
+ }
1547
+ this.loggers.set(name14, logger21);
1548
+ return logger21;
1549
+ }
1550
+ /**
1551
+ * Reset factory to default state
1552
+ */
1553
+ reset() {
1554
+ this.config = {};
1555
+ this.loggers.clear();
1556
+ }
1557
+ };
1558
+ loggerFactory = new LoggerFactory();
1559
+ }
1560
+ });
1561
+
1562
+ // ../packages/agents-core/src/utils/schema-conversion.ts
1563
+ var logger;
1564
+ var init_schema_conversion = __esm({
1565
+ "../packages/agents-core/src/utils/schema-conversion.ts"() {
1566
+ "use strict";
1567
+ init_esm_shims();
1568
+ init_dist4();
1569
+ init_logger();
1570
+ logger = getLogger("schema-conversion");
1571
1571
  }
1572
1572
  });
1573
1573
 
@@ -2731,7 +2731,7 @@ var init_utility = __esm({
2731
2731
  });
2732
2732
 
2733
2733
  // ../node_modules/.pnpm/drizzle-zod@0.8.3_drizzle-orm@0.44.7_@electric-sql+pglite@0.3.13_@libsql+client@0.15.15_82cfea4e08c4beecc114d1ca22d93bed/node_modules/drizzle-zod/index.mjs
2734
- import { z as z6 } from "zod/v4";
2734
+ import { z as z2 } from "zod/v4";
2735
2735
  import { isTable, getTableColumns, getViewSelectedFields, is, Column, SQL, isView } from "drizzle-orm";
2736
2736
  function isColumnType(column, columnTypes) {
2737
2737
  return columnTypes.includes(column.columnType);
@@ -2740,7 +2740,7 @@ function isWithEnum(column) {
2740
2740
  return "enumValues" in column && Array.isArray(column.enumValues) && column.enumValues.length > 0;
2741
2741
  }
2742
2742
  function columnToSchema(column, factory) {
2743
- const z$1 = factory?.zodInstance ?? z6;
2743
+ const z$1 = factory?.zodInstance ?? z2;
2744
2744
  const coerce = factory?.coerce ?? {};
2745
2745
  let schema;
2746
2746
  if (isWithEnum(column)) {
@@ -2790,7 +2790,7 @@ function columnToSchema(column, factory) {
2790
2790
  }
2791
2791
  return schema;
2792
2792
  }
2793
- function numberColumnToSchema(column, z26, coerce) {
2793
+ function numberColumnToSchema(column, z20, coerce) {
2794
2794
  let unsigned = column.getSQLType().includes("unsigned");
2795
2795
  let min;
2796
2796
  let max;
@@ -2858,20 +2858,20 @@ function numberColumnToSchema(column, z26, coerce) {
2858
2858
  min = Number.MIN_SAFE_INTEGER;
2859
2859
  max = Number.MAX_SAFE_INTEGER;
2860
2860
  }
2861
- let schema = coerce === true || coerce?.number ? integer2 ? z26.coerce.number() : z26.coerce.number().int() : integer2 ? z26.int() : z26.number();
2861
+ let schema = coerce === true || coerce?.number ? integer2 ? z20.coerce.number() : z20.coerce.number().int() : integer2 ? z20.int() : z20.number();
2862
2862
  schema = schema.gte(min).lte(max);
2863
2863
  return schema;
2864
2864
  }
2865
- function bigintColumnToSchema(column, z26, coerce) {
2865
+ function bigintColumnToSchema(column, z20, coerce) {
2866
2866
  const unsigned = column.getSQLType().includes("unsigned");
2867
2867
  const min = unsigned ? 0n : CONSTANTS.INT64_MIN;
2868
2868
  const max = unsigned ? CONSTANTS.INT64_UNSIGNED_MAX : CONSTANTS.INT64_MAX;
2869
- const schema = coerce === true || coerce?.bigint ? z26.coerce.bigint() : z26.bigint();
2869
+ const schema = coerce === true || coerce?.bigint ? z20.coerce.bigint() : z20.bigint();
2870
2870
  return schema.gte(min).lte(max);
2871
2871
  }
2872
- function stringColumnToSchema(column, z26, coerce) {
2872
+ function stringColumnToSchema(column, z20, coerce) {
2873
2873
  if (isColumnType(column, ["PgUUID"])) {
2874
- return z26.uuid();
2874
+ return z20.uuid();
2875
2875
  }
2876
2876
  let max;
2877
2877
  let regex;
@@ -2903,7 +2903,7 @@ function stringColumnToSchema(column, z26, coerce) {
2903
2903
  regex = /^[01]+$/;
2904
2904
  max = column.dimensions;
2905
2905
  }
2906
- let schema = coerce === true || coerce?.string ? z26.coerce.string() : z26.string();
2906
+ let schema = coerce === true || coerce?.string ? z20.coerce.string() : z20.string();
2907
2907
  schema = regex ? schema.regex(regex) : schema;
2908
2908
  return max && fixed ? schema.length(max) : max ? schema.max(max) : schema;
2909
2909
  }
@@ -2924,7 +2924,7 @@ function handleColumns(columns, refinements, conditions, factory) {
2924
2924
  continue;
2925
2925
  }
2926
2926
  const column = is(selected, Column) ? selected : void 0;
2927
- const schema = column ? columnToSchema(column, factory) : z6.any();
2927
+ const schema = column ? columnToSchema(column, factory) : z2.any();
2928
2928
  const refined = typeof refinement === "function" ? refinement(schema) : schema;
2929
2929
  if (conditions.never(column)) {
2930
2930
  continue;
@@ -2940,10 +2940,10 @@ function handleColumns(columns, refinements, conditions, factory) {
2940
2940
  }
2941
2941
  }
2942
2942
  }
2943
- return z6.object(columnSchemas);
2943
+ return z2.object(columnSchemas);
2944
2944
  }
2945
2945
  function handleEnum(enum_, factory) {
2946
- const zod = factory?.zodInstance ?? z6;
2946
+ const zod = factory?.zodInstance ?? z2;
2947
2947
  return zod.enum(enum_.enumValues);
2948
2948
  }
2949
2949
  var CONSTANTS, isPgEnum, literalSchema, jsonSchema, bufferSchema, selectConditions, insertConditions, createSelectSchema, createInsertSchema;
@@ -2972,13 +2972,13 @@ var init_drizzle_zod = __esm({
2972
2972
  INT64_UNSIGNED_MAX: 18446744073709551615n
2973
2973
  };
2974
2974
  isPgEnum = isWithEnum;
2975
- literalSchema = z6.union([z6.string(), z6.number(), z6.boolean(), z6.null()]);
2976
- jsonSchema = z6.union([
2975
+ literalSchema = z2.union([z2.string(), z2.number(), z2.boolean(), z2.null()]);
2976
+ jsonSchema = z2.union([
2977
2977
  literalSchema,
2978
- z6.record(z6.string(), z6.any()),
2979
- z6.array(z6.any())
2978
+ z2.record(z2.string(), z2.any()),
2979
+ z2.array(z2.any())
2980
2980
  ]);
2981
- bufferSchema = z6.custom((v3) => v3 instanceof Buffer);
2981
+ bufferSchema = z2.custom((v3) => v3 instanceof Buffer);
2982
2982
  selectConditions = {
2983
2983
  never: () => false,
2984
2984
  optional: () => false,
@@ -3037,7 +3037,7 @@ function createInsertSchemaWithModifiers(table, overrides) {
3037
3037
  return createInsertSchema(table, mergedModifiers);
3038
3038
  }
3039
3039
  function registerFieldSchemas(schema) {
3040
- if (!(schema instanceof z5.ZodObject)) {
3040
+ if (!(schema instanceof z.ZodObject)) {
3041
3041
  return schema;
3042
3042
  }
3043
3043
  const shape = schema.shape;
@@ -3056,12 +3056,12 @@ function registerFieldSchemas(schema) {
3056
3056
  if (fieldName in fieldMetadata && fieldSchema) {
3057
3057
  let zodFieldSchema = fieldSchema;
3058
3058
  let innerSchema = null;
3059
- if (zodFieldSchema instanceof z5.ZodOptional) {
3059
+ if (zodFieldSchema instanceof z.ZodOptional) {
3060
3060
  innerSchema = zodFieldSchema._def.innerType;
3061
3061
  zodFieldSchema = innerSchema;
3062
3062
  }
3063
3063
  zodFieldSchema.meta(fieldMetadata[fieldName]);
3064
- if (fieldName === "id" && zodFieldSchema instanceof z5.ZodString) {
3064
+ if (fieldName === "id" && zodFieldSchema instanceof z.ZodString) {
3065
3065
  zodFieldSchema.openapi({
3066
3066
  description: "Resource identifier",
3067
3067
  minLength: MIN_ID_LENGTH,
@@ -3069,12 +3069,12 @@ function registerFieldSchemas(schema) {
3069
3069
  pattern: URL_SAFE_ID_PATTERN.source,
3070
3070
  example: "resource_789"
3071
3071
  });
3072
- } else if (zodFieldSchema instanceof z5.ZodString) {
3072
+ } else if (zodFieldSchema instanceof z.ZodString) {
3073
3073
  zodFieldSchema.openapi({
3074
3074
  description: fieldMetadata[fieldName].description
3075
3075
  });
3076
3076
  }
3077
- if (innerSchema && fieldSchema instanceof z5.ZodOptional) {
3077
+ if (innerSchema && fieldSchema instanceof z.ZodOptional) {
3078
3078
  fieldSchema.meta(fieldMetadata[fieldName]);
3079
3079
  }
3080
3080
  }
@@ -3091,7 +3091,7 @@ var init_drizzle_schema_helpers = __esm({
3091
3091
  MIN_ID_LENGTH = 1;
3092
3092
  MAX_ID_LENGTH = 255;
3093
3093
  URL_SAFE_ID_PATTERN = /^[a-zA-Z0-9\-_.]+$/;
3094
- resourceIdSchema = z5.string().min(MIN_ID_LENGTH).max(MAX_ID_LENGTH).describe("Resource identifier").regex(URL_SAFE_ID_PATTERN, {
3094
+ resourceIdSchema = z.string().min(MIN_ID_LENGTH).max(MAX_ID_LENGTH).describe("Resource identifier").regex(URL_SAFE_ID_PATTERN, {
3095
3095
  message: "ID must contain only letters, numbers, hyphens, underscores, and dots"
3096
3096
  }).openapi({
3097
3097
  description: "Resource identifier",
@@ -3114,12 +3114,12 @@ var init_drizzle_schema_helpers = __esm({
3114
3114
  return modified;
3115
3115
  },
3116
3116
  name: (_schema) => {
3117
- const modified = z5.string().describe("Name");
3117
+ const modified = z.string().describe("Name");
3118
3118
  modified.meta({ description: "Name" });
3119
3119
  return modified;
3120
3120
  },
3121
3121
  description: (_schema) => {
3122
- const modified = z5.string().describe("Description");
3122
+ const modified = z.string().describe("Description");
3123
3123
  modified.meta({ description: "Description" });
3124
3124
  return modified;
3125
3125
  },
@@ -3181,9 +3181,9 @@ var init_schemas = __esm({
3181
3181
  VALIDATION_AGENT_PROMPT_MAX_CHARS: VALIDATION_AGENT_PROMPT_MAX_CHARS2,
3182
3182
  VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS: VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS2
3183
3183
  } = schemaValidationDefaults);
3184
- StopWhenSchema = z5.object({
3185
- transferCountIs: z5.number().min(AGENT_EXECUTION_TRANSFER_COUNT_MIN2).max(AGENT_EXECUTION_TRANSFER_COUNT_MAX2).optional().describe("The maximum number of transfers to trigger the stop condition."),
3186
- stepCountIs: z5.number().min(SUB_AGENT_TURN_GENERATION_STEPS_MIN2).max(SUB_AGENT_TURN_GENERATION_STEPS_MAX2).optional().describe("The maximum number of steps to trigger the stop condition.")
3184
+ StopWhenSchema = z.object({
3185
+ transferCountIs: z.number().min(AGENT_EXECUTION_TRANSFER_COUNT_MIN2).max(AGENT_EXECUTION_TRANSFER_COUNT_MAX2).optional().describe("The maximum number of transfers to trigger the stop condition."),
3186
+ stepCountIs: z.number().min(SUB_AGENT_TURN_GENERATION_STEPS_MIN2).max(SUB_AGENT_TURN_GENERATION_STEPS_MAX2).optional().describe("The maximum number of steps to trigger the stop condition.")
3187
3187
  }).openapi("StopWhen");
3188
3188
  AgentStopWhenSchema = StopWhenSchema.pick({ transferCountIs: true }).openapi(
3189
3189
  "AgentStopWhen"
@@ -3191,28 +3191,28 @@ var init_schemas = __esm({
3191
3191
  SubAgentStopWhenSchema = StopWhenSchema.pick({ stepCountIs: true }).openapi(
3192
3192
  "SubAgentStopWhen"
3193
3193
  );
3194
- pageNumber = z5.coerce.number().min(1).default(1).openapi("PaginationPageQueryParam");
3195
- limitNumber = z5.coerce.number().min(1).max(100).default(10).openapi("PaginationLimitQueryParam");
3196
- ModelSettingsSchema = z5.object({
3197
- model: z5.string().optional().describe("The model to use for the project."),
3198
- providerOptions: z5.record(z5.string(), z5.any()).optional().describe("The provider options to use for the project.")
3194
+ pageNumber = z.coerce.number().min(1).default(1).openapi("PaginationPageQueryParam");
3195
+ limitNumber = z.coerce.number().min(1).max(100).default(10).openapi("PaginationLimitQueryParam");
3196
+ ModelSettingsSchema = z.object({
3197
+ model: z.string().optional().describe("The model to use for the project."),
3198
+ providerOptions: z.record(z.string(), z.any()).optional().describe("The provider options to use for the project.")
3199
3199
  }).openapi("ModelSettings");
3200
- ModelSchema = z5.object({
3200
+ ModelSchema = z.object({
3201
3201
  base: ModelSettingsSchema.optional(),
3202
3202
  structuredOutput: ModelSettingsSchema.optional(),
3203
3203
  summarizer: ModelSettingsSchema.optional()
3204
3204
  }).openapi("Model");
3205
- ProjectModelSchema = z5.object({
3205
+ ProjectModelSchema = z.object({
3206
3206
  base: ModelSettingsSchema,
3207
3207
  structuredOutput: ModelSettingsSchema.optional(),
3208
3208
  summarizer: ModelSettingsSchema.optional()
3209
3209
  }).openapi("ProjectModel");
3210
- FunctionToolConfigSchema = z5.object({
3211
- name: z5.string(),
3212
- description: z5.string(),
3213
- inputSchema: z5.record(z5.string(), z5.unknown()),
3214
- dependencies: z5.record(z5.string(), z5.string()).optional(),
3215
- execute: z5.union([z5.function(), z5.string()])
3210
+ FunctionToolConfigSchema = z.object({
3211
+ name: z.string(),
3212
+ description: z.string(),
3213
+ inputSchema: z.record(z.string(), z.unknown()),
3214
+ dependencies: z.record(z.string(), z.string()).optional(),
3215
+ execute: z.union([z.function(), z.string()])
3216
3216
  });
3217
3217
  createApiSchema = (schema) => schema.omit({ tenantId: true, projectId: true });
3218
3218
  createApiInsertSchema = (schema) => schema.omit({ tenantId: true, projectId: true });
@@ -3245,7 +3245,7 @@ var init_schemas = __esm({
3245
3245
  SubAgentRelationApiInsertSchema = createAgentScopedApiInsertSchema(
3246
3246
  SubAgentRelationInsertSchema
3247
3247
  ).extend({
3248
- relationType: z5.enum(VALID_RELATION_TYPES)
3248
+ relationType: z.enum(VALID_RELATION_TYPES)
3249
3249
  }).refine(
3250
3250
  (data) => {
3251
3251
  const hasTarget = data.targetSubAgentId != null;
@@ -3262,7 +3262,7 @@ var init_schemas = __esm({
3262
3262
  SubAgentRelationApiUpdateSchema = createAgentScopedApiUpdateSchema(
3263
3263
  SubAgentRelationUpdateSchema
3264
3264
  ).extend({
3265
- relationType: z5.enum(VALID_RELATION_TYPES).optional()
3265
+ relationType: z.enum(VALID_RELATION_TYPES).optional()
3266
3266
  }).refine(
3267
3267
  (data) => {
3268
3268
  const hasTarget = data.targetSubAgentId != null;
@@ -3279,11 +3279,11 @@ var init_schemas = __esm({
3279
3279
  path: ["targetSubAgentId", "externalSubAgentId", "teamSubAgentId"]
3280
3280
  }
3281
3281
  ).openapi("SubAgentRelationUpdate");
3282
- SubAgentRelationQuerySchema = z5.object({
3283
- sourceSubAgentId: z5.string().optional(),
3284
- targetSubAgentId: z5.string().optional(),
3285
- externalSubAgentId: z5.string().optional(),
3286
- teamSubAgentId: z5.string().optional()
3282
+ SubAgentRelationQuerySchema = z.object({
3283
+ sourceSubAgentId: z.string().optional(),
3284
+ targetSubAgentId: z.string().optional(),
3285
+ externalSubAgentId: z.string().optional(),
3286
+ teamSubAgentId: z.string().optional()
3287
3287
  });
3288
3288
  ExternalSubAgentRelationInsertSchema = createInsertSchema2(subAgentRelations).extend({
3289
3289
  id: resourceIdSchema,
@@ -3297,7 +3297,7 @@ var init_schemas = __esm({
3297
3297
  AgentSelectSchema = createSelectSchema2(agents);
3298
3298
  AgentInsertSchema = createInsertSchema2(agents).extend({
3299
3299
  id: resourceIdSchema,
3300
- name: z5.string().trim().nonempty()
3300
+ name: z.string().trim().nonempty()
3301
3301
  });
3302
3302
  AgentUpdateSchema = AgentInsertSchema.partial();
3303
3303
  AgentApiSelectSchema = createApiSchema(AgentSelectSchema).openapi("Agent");
@@ -3324,7 +3324,7 @@ var init_schemas = __esm({
3324
3324
  TaskRelationApiSelectSchema = createApiSchema(TaskRelationSelectSchema);
3325
3325
  TaskRelationApiInsertSchema = createApiInsertSchema(TaskRelationInsertSchema);
3326
3326
  TaskRelationApiUpdateSchema = createApiUpdateSchema(TaskRelationUpdateSchema);
3327
- imageUrlSchema = z5.string().optional().refine(
3327
+ imageUrlSchema = z.string().optional().refine(
3328
3328
  (url) => {
3329
3329
  if (!url) return true;
3330
3330
  if (url.startsWith("data:image/")) {
@@ -3343,43 +3343,43 @@ var init_schemas = __esm({
3343
3343
  message: "Image URL must be a valid HTTP(S) URL or a base64 data URL (max 1MB)"
3344
3344
  }
3345
3345
  );
3346
- McpTransportConfigSchema = z5.object({
3347
- type: z5.enum(MCPTransportType),
3348
- requestInit: z5.record(z5.string(), z5.unknown()).optional(),
3349
- eventSourceInit: z5.record(z5.string(), z5.unknown()).optional(),
3350
- reconnectionOptions: z5.any().optional().openapi({
3346
+ McpTransportConfigSchema = z.object({
3347
+ type: z.enum(MCPTransportType),
3348
+ requestInit: z.record(z.string(), z.unknown()).optional(),
3349
+ eventSourceInit: z.record(z.string(), z.unknown()).optional(),
3350
+ reconnectionOptions: z.any().optional().openapi({
3351
3351
  type: "object",
3352
3352
  description: "Reconnection options for streamable HTTP transport"
3353
3353
  }),
3354
- sessionId: z5.string().optional()
3354
+ sessionId: z.string().optional()
3355
3355
  }).openapi("McpTransportConfig");
3356
- ToolStatusSchema = z5.enum(TOOL_STATUS_VALUES);
3357
- McpToolDefinitionSchema = z5.object({
3358
- name: z5.string(),
3359
- description: z5.string().optional(),
3360
- inputSchema: z5.record(z5.string(), z5.unknown()).optional()
3356
+ ToolStatusSchema = z.enum(TOOL_STATUS_VALUES);
3357
+ McpToolDefinitionSchema = z.object({
3358
+ name: z.string(),
3359
+ description: z.string().optional(),
3360
+ inputSchema: z.record(z.string(), z.unknown()).optional()
3361
3361
  });
3362
3362
  ToolSelectSchema = createSelectSchema2(tools);
3363
3363
  ToolInsertSchema = createInsertSchema2(tools).extend({
3364
3364
  id: resourceIdSchema,
3365
3365
  imageUrl: imageUrlSchema,
3366
- config: z5.object({
3367
- type: z5.literal("mcp"),
3368
- mcp: z5.object({
3369
- server: z5.object({
3370
- url: z5.url()
3366
+ config: z.object({
3367
+ type: z.literal("mcp"),
3368
+ mcp: z.object({
3369
+ server: z.object({
3370
+ url: z.url()
3371
3371
  }),
3372
- transport: z5.object({
3373
- type: z5.enum(MCPTransportType),
3374
- requestInit: z5.record(z5.string(), z5.unknown()).optional(),
3375
- eventSourceInit: z5.record(z5.string(), z5.unknown()).optional(),
3376
- reconnectionOptions: z5.any().optional().openapi({
3372
+ transport: z.object({
3373
+ type: z.enum(MCPTransportType),
3374
+ requestInit: z.record(z.string(), z.unknown()).optional(),
3375
+ eventSourceInit: z.record(z.string(), z.unknown()).optional(),
3376
+ reconnectionOptions: z.any().optional().openapi({
3377
3377
  type: "object",
3378
3378
  description: "Reconnection options for streamable HTTP transport"
3379
3379
  }),
3380
- sessionId: z5.string().optional()
3380
+ sessionId: z.string().optional()
3381
3381
  }).optional(),
3382
- activeTools: z5.array(z5.string()).optional()
3382
+ activeTools: z.array(z.string()).optional()
3383
3383
  })
3384
3384
  })
3385
3385
  });
@@ -3474,7 +3474,7 @@ var init_schemas = __esm({
3474
3474
  SubAgentArtifactComponentUpdateSchema
3475
3475
  );
3476
3476
  ExternalAgentSelectSchema = createSelectSchema2(externalAgents).extend({
3477
- credentialReferenceId: z5.string().nullable().optional()
3477
+ credentialReferenceId: z.string().nullable().optional()
3478
3478
  });
3479
3479
  ExternalAgentInsertSchema = createInsertSchema2(externalAgents).extend({
3480
3480
  id: resourceIdSchema
@@ -3483,9 +3483,9 @@ var init_schemas = __esm({
3483
3483
  ExternalAgentApiSelectSchema = createApiSchema(ExternalAgentSelectSchema).openapi("ExternalAgent");
3484
3484
  ExternalAgentApiInsertSchema = createApiInsertSchema(ExternalAgentInsertSchema).openapi("ExternalAgentCreate");
3485
3485
  ExternalAgentApiUpdateSchema = createApiUpdateSchema(ExternalAgentUpdateSchema).openapi("ExternalAgentUpdate");
3486
- AllAgentSchema = z5.discriminatedUnion("type", [
3487
- SubAgentApiSelectSchema.extend({ type: z5.literal("internal") }),
3488
- ExternalAgentApiSelectSchema.extend({ type: z5.literal("external") })
3486
+ AllAgentSchema = z.discriminatedUnion("type", [
3487
+ SubAgentApiSelectSchema.extend({ type: z.literal("internal") }),
3488
+ ExternalAgentApiSelectSchema.extend({ type: z.literal("external") })
3489
3489
  ]);
3490
3490
  ApiKeySelectSchema = createSelectSchema2(apiKeys);
3491
3491
  ApiKeyInsertSchema = createInsertSchema2(apiKeys).extend({
@@ -3507,10 +3507,10 @@ var init_schemas = __esm({
3507
3507
  keyHash: true
3508
3508
  // Never expose the hash
3509
3509
  }).openapi("ApiKey");
3510
- ApiKeyApiCreationResponseSchema = z5.object({
3511
- data: z5.object({
3510
+ ApiKeyApiCreationResponseSchema = z.object({
3511
+ data: z.object({
3512
3512
  apiKey: ApiKeyApiSelectSchema,
3513
- key: z5.string().describe("The full API key (shown only once)")
3513
+ key: z.string().describe("The full API key (shown only once)")
3514
3514
  })
3515
3515
  });
3516
3516
  ApiKeyApiInsertSchema = ApiKeyInsertSchema.omit({
@@ -3528,87 +3528,87 @@ var init_schemas = __esm({
3528
3528
  // Not set on creation
3529
3529
  }).openapi("ApiKeyCreate");
3530
3530
  ApiKeyApiUpdateSchema = ApiKeyUpdateSchema.openapi("ApiKeyUpdate");
3531
- CredentialReferenceSelectSchema = z5.object({
3532
- id: z5.string(),
3533
- tenantId: z5.string(),
3534
- projectId: z5.string(),
3535
- name: z5.string(),
3536
- type: z5.string(),
3537
- credentialStoreId: z5.string(),
3538
- retrievalParams: z5.record(z5.string(), z5.unknown()).nullish(),
3539
- createdAt: z5.string(),
3540
- updatedAt: z5.string()
3531
+ CredentialReferenceSelectSchema = z.object({
3532
+ id: z.string(),
3533
+ tenantId: z.string(),
3534
+ projectId: z.string(),
3535
+ name: z.string(),
3536
+ type: z.string(),
3537
+ credentialStoreId: z.string(),
3538
+ retrievalParams: z.record(z.string(), z.unknown()).nullish(),
3539
+ createdAt: z.string(),
3540
+ updatedAt: z.string()
3541
3541
  });
3542
3542
  CredentialReferenceInsertSchema = createInsertSchema2(credentialReferences).extend({
3543
3543
  id: resourceIdSchema,
3544
- type: z5.string(),
3544
+ type: z.string(),
3545
3545
  credentialStoreId: resourceIdSchema,
3546
- retrievalParams: z5.record(z5.string(), z5.unknown()).nullish()
3546
+ retrievalParams: z.record(z.string(), z.unknown()).nullish()
3547
3547
  });
3548
3548
  CredentialReferenceUpdateSchema = CredentialReferenceInsertSchema.partial();
3549
3549
  CredentialReferenceApiSelectSchema = createApiSchema(CredentialReferenceSelectSchema).extend({
3550
- type: z5.enum(CredentialStoreType),
3551
- tools: z5.array(ToolSelectSchema).optional(),
3552
- externalAgents: z5.array(ExternalAgentSelectSchema).optional()
3550
+ type: z.enum(CredentialStoreType),
3551
+ tools: z.array(ToolSelectSchema).optional(),
3552
+ externalAgents: z.array(ExternalAgentSelectSchema).optional()
3553
3553
  }).openapi("CredentialReference");
3554
3554
  CredentialReferenceApiInsertSchema = createApiInsertSchema(
3555
3555
  CredentialReferenceInsertSchema
3556
3556
  ).extend({
3557
- type: z5.enum(CredentialStoreType)
3557
+ type: z.enum(CredentialStoreType)
3558
3558
  }).openapi("CredentialReferenceCreate");
3559
3559
  CredentialReferenceApiUpdateSchema = createApiUpdateSchema(
3560
3560
  CredentialReferenceUpdateSchema
3561
3561
  ).extend({
3562
- type: z5.enum(CredentialStoreType).optional()
3562
+ type: z.enum(CredentialStoreType).optional()
3563
3563
  }).openapi("CredentialReferenceUpdate");
3564
- CredentialStoreSchema = z5.object({
3565
- id: z5.string().describe("Unique identifier of the credential store"),
3566
- type: z5.enum(CredentialStoreType),
3567
- available: z5.boolean().describe("Whether the store is functional and ready to use"),
3568
- reason: z5.string().nullable().describe("Reason why store is not available, if applicable")
3564
+ CredentialStoreSchema = z.object({
3565
+ id: z.string().describe("Unique identifier of the credential store"),
3566
+ type: z.enum(CredentialStoreType),
3567
+ available: z.boolean().describe("Whether the store is functional and ready to use"),
3568
+ reason: z.string().nullable().describe("Reason why store is not available, if applicable")
3569
3569
  }).openapi("CredentialStore");
3570
- CredentialStoreListResponseSchema = z5.object({
3571
- data: z5.array(CredentialStoreSchema).describe("List of credential stores")
3570
+ CredentialStoreListResponseSchema = z.object({
3571
+ data: z.array(CredentialStoreSchema).describe("List of credential stores")
3572
3572
  }).openapi("CredentialStoreListResponse");
3573
- CreateCredentialInStoreRequestSchema = z5.object({
3574
- key: z5.string().describe("The credential key"),
3575
- value: z5.string().describe("The credential value"),
3576
- metadata: z5.record(z5.string(), z5.string()).nullish().describe("The metadata for the credential")
3573
+ CreateCredentialInStoreRequestSchema = z.object({
3574
+ key: z.string().describe("The credential key"),
3575
+ value: z.string().describe("The credential value"),
3576
+ metadata: z.record(z.string(), z.string()).nullish().describe("The metadata for the credential")
3577
3577
  }).openapi("CreateCredentialInStoreRequest");
3578
- CreateCredentialInStoreResponseSchema = z5.object({
3579
- data: z5.object({
3580
- key: z5.string().describe("The credential key"),
3581
- storeId: z5.string().describe("The store ID where credential was created"),
3582
- createdAt: z5.string().describe("ISO timestamp of creation")
3578
+ CreateCredentialInStoreResponseSchema = z.object({
3579
+ data: z.object({
3580
+ key: z.string().describe("The credential key"),
3581
+ storeId: z.string().describe("The store ID where credential was created"),
3582
+ createdAt: z.string().describe("ISO timestamp of creation")
3583
3583
  })
3584
3584
  }).openapi("CreateCredentialInStoreResponse");
3585
- RelatedAgentInfoSchema = z5.object({
3586
- id: z5.string(),
3587
- name: z5.string(),
3588
- description: z5.string()
3585
+ RelatedAgentInfoSchema = z.object({
3586
+ id: z.string(),
3587
+ name: z.string(),
3588
+ description: z.string()
3589
3589
  }).openapi("RelatedAgentInfo");
3590
- ComponentAssociationSchema = z5.object({
3591
- subAgentId: z5.string(),
3592
- createdAt: z5.string()
3590
+ ComponentAssociationSchema = z.object({
3591
+ subAgentId: z.string(),
3592
+ createdAt: z.string()
3593
3593
  }).openapi("ComponentAssociation");
3594
- OAuthLoginQuerySchema = z5.object({
3595
- tenantId: z5.string().min(1, "Tenant ID is required"),
3596
- projectId: z5.string().min(1, "Project ID is required"),
3597
- toolId: z5.string().min(1, "Tool ID is required")
3594
+ OAuthLoginQuerySchema = z.object({
3595
+ tenantId: z.string().min(1, "Tenant ID is required"),
3596
+ projectId: z.string().min(1, "Project ID is required"),
3597
+ toolId: z.string().min(1, "Tool ID is required")
3598
3598
  }).openapi("OAuthLoginQuery");
3599
- OAuthCallbackQuerySchema = z5.object({
3600
- code: z5.string().min(1, "Authorization code is required"),
3601
- state: z5.string().min(1, "State parameter is required"),
3602
- error: z5.string().optional(),
3603
- error_description: z5.string().optional()
3599
+ OAuthCallbackQuerySchema = z.object({
3600
+ code: z.string().min(1, "Authorization code is required"),
3601
+ state: z.string().min(1, "State parameter is required"),
3602
+ error: z.string().optional(),
3603
+ error_description: z.string().optional()
3604
3604
  }).openapi("OAuthCallbackQuery");
3605
3605
  McpToolSchema = ToolInsertSchema.extend({
3606
3606
  imageUrl: imageUrlSchema,
3607
- availableTools: z5.array(McpToolDefinitionSchema).optional(),
3607
+ availableTools: z.array(McpToolDefinitionSchema).optional(),
3608
3608
  status: ToolStatusSchema.default("unknown"),
3609
- version: z5.string().optional(),
3610
- expiresAt: z5.string().optional(),
3611
- relationshipId: z5.string().optional()
3609
+ version: z.string().optional(),
3610
+ expiresAt: z.string().optional(),
3611
+ relationshipId: z.string().optional()
3612
3612
  }).openapi("McpTool");
3613
3613
  MCPToolConfigSchema = McpToolSchema.omit({
3614
3614
  config: true,
@@ -3620,12 +3620,12 @@ var init_schemas = __esm({
3620
3620
  updatedAt: true,
3621
3621
  credentialReferenceId: true
3622
3622
  }).extend({
3623
- tenantId: z5.string().optional(),
3624
- projectId: z5.string().optional(),
3625
- description: z5.string().optional(),
3626
- serverUrl: z5.url(),
3627
- activeTools: z5.array(z5.string()).optional(),
3628
- mcpType: z5.enum(MCPServerType).optional(),
3623
+ tenantId: z.string().optional(),
3624
+ projectId: z.string().optional(),
3625
+ description: z.string().optional(),
3626
+ serverUrl: z.url(),
3627
+ activeTools: z.array(z.string()).optional(),
3628
+ mcpType: z.enum(MCPServerType).optional(),
3629
3629
  transport: McpTransportConfigSchema.optional(),
3630
3630
  credential: CredentialReferenceApiInsertSchema.optional()
3631
3631
  });
@@ -3649,40 +3649,40 @@ var init_schemas = __esm({
3649
3649
  FunctionApiSelectSchema = createApiSchema(FunctionSelectSchema).openapi("Function");
3650
3650
  FunctionApiInsertSchema = createApiInsertSchema(FunctionInsertSchema).openapi("FunctionCreate");
3651
3651
  FunctionApiUpdateSchema = createApiUpdateSchema(FunctionUpdateSchema).openapi("FunctionUpdate");
3652
- FetchConfigSchema = z5.object({
3653
- url: z5.string().min(1, "URL is required"),
3654
- method: z5.enum(["GET", "POST", "PUT", "DELETE", "PATCH"]).optional().default("GET"),
3655
- headers: z5.record(z5.string(), z5.string()).optional(),
3656
- body: z5.record(z5.string(), z5.unknown()).optional(),
3657
- transform: z5.string().optional(),
3652
+ FetchConfigSchema = z.object({
3653
+ url: z.string().min(1, "URL is required"),
3654
+ method: z.enum(["GET", "POST", "PUT", "DELETE", "PATCH"]).optional().default("GET"),
3655
+ headers: z.record(z.string(), z.string()).optional(),
3656
+ body: z.record(z.string(), z.unknown()).optional(),
3657
+ transform: z.string().optional(),
3658
3658
  // JSONPath or JS transform function
3659
- timeout: z5.number().min(0).optional().default(CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT2).optional()
3659
+ timeout: z.number().min(0).optional().default(CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT2).optional()
3660
3660
  }).openapi("FetchConfig");
3661
- FetchDefinitionSchema = z5.object({
3662
- id: z5.string().min(1, "Fetch definition ID is required"),
3663
- name: z5.string().optional(),
3664
- trigger: z5.enum(["initialization", "invocation"]),
3661
+ FetchDefinitionSchema = z.object({
3662
+ id: z.string().min(1, "Fetch definition ID is required"),
3663
+ name: z.string().optional(),
3664
+ trigger: z.enum(["initialization", "invocation"]),
3665
3665
  fetchConfig: FetchConfigSchema,
3666
- responseSchema: z5.any().optional(),
3666
+ responseSchema: z.any().optional(),
3667
3667
  // JSON Schema for validating HTTP response
3668
- defaultValue: z5.any().optional().openapi({
3668
+ defaultValue: z.any().optional().openapi({
3669
3669
  description: "Default value if fetch fails"
3670
3670
  }),
3671
3671
  credential: CredentialReferenceApiInsertSchema.optional()
3672
3672
  }).openapi("FetchDefinition");
3673
3673
  ContextConfigSelectSchema = createSelectSchema2(contextConfigs).extend({
3674
- headersSchema: z5.any().optional().openapi({
3674
+ headersSchema: z.any().optional().openapi({
3675
3675
  type: "object",
3676
3676
  description: "JSON Schema for validating request headers"
3677
3677
  })
3678
3678
  });
3679
3679
  ContextConfigInsertSchema = createInsertSchema2(contextConfigs).extend({
3680
3680
  id: resourceIdSchema.optional(),
3681
- headersSchema: z5.any().nullable().optional().openapi({
3681
+ headersSchema: z.any().nullable().optional().openapi({
3682
3682
  type: "object",
3683
3683
  description: "JSON Schema for validating request headers"
3684
3684
  }),
3685
- contextVariables: z5.any().nullable().optional().openapi({
3685
+ contextVariables: z.any().nullable().optional().openapi({
3686
3686
  type: "object",
3687
3687
  description: "Context variables configuration with fetch definitions"
3688
3688
  })
@@ -3705,9 +3705,9 @@ var init_schemas = __esm({
3705
3705
  id: resourceIdSchema,
3706
3706
  subAgentId: resourceIdSchema,
3707
3707
  toolId: resourceIdSchema,
3708
- selectedTools: z5.array(z5.string()).nullish(),
3709
- headers: z5.record(z5.string(), z5.string()).nullish(),
3710
- toolPolicies: z5.record(z5.string(), z5.object({ needsApproval: z5.boolean().optional() })).nullish()
3708
+ selectedTools: z.array(z.string()).nullish(),
3709
+ headers: z.record(z.string(), z.string()).nullish(),
3710
+ toolPolicies: z.record(z.string(), z.object({ needsApproval: z.boolean().optional() })).nullish()
3711
3711
  });
3712
3712
  SubAgentToolRelationUpdateSchema = SubAgentToolRelationInsertSchema.partial();
3713
3713
  SubAgentToolRelationApiSelectSchema = createAgentScopedApiSchema(
@@ -3728,7 +3728,7 @@ var init_schemas = __esm({
3728
3728
  id: resourceIdSchema,
3729
3729
  subAgentId: resourceIdSchema,
3730
3730
  externalAgentId: resourceIdSchema,
3731
- headers: z5.record(z5.string(), z5.string()).nullish()
3731
+ headers: z.record(z.string(), z.string()).nullish()
3732
3732
  });
3733
3733
  SubAgentExternalAgentRelationUpdateSchema = SubAgentExternalAgentRelationInsertSchema.partial();
3734
3734
  SubAgentExternalAgentRelationApiSelectSchema = createAgentScopedApiSchema(
@@ -3747,7 +3747,7 @@ var init_schemas = __esm({
3747
3747
  id: resourceIdSchema,
3748
3748
  subAgentId: resourceIdSchema,
3749
3749
  targetAgentId: resourceIdSchema,
3750
- headers: z5.record(z5.string(), z5.string()).nullish()
3750
+ headers: z.record(z.string(), z.string()).nullish()
3751
3751
  });
3752
3752
  SubAgentTeamAgentRelationUpdateSchema = SubAgentTeamAgentRelationInsertSchema.partial();
3753
3753
  SubAgentTeamAgentRelationApiSelectSchema = createAgentScopedApiSchema(
@@ -3765,58 +3765,58 @@ var init_schemas = __esm({
3765
3765
  LedgerArtifactApiSelectSchema = createApiSchema(LedgerArtifactSelectSchema);
3766
3766
  LedgerArtifactApiInsertSchema = createApiInsertSchema(LedgerArtifactInsertSchema);
3767
3767
  LedgerArtifactApiUpdateSchema = createApiUpdateSchema(LedgerArtifactUpdateSchema);
3768
- StatusComponentSchema = z5.object({
3769
- type: z5.string(),
3770
- description: z5.string().optional(),
3771
- detailsSchema: z5.object({
3772
- type: z5.literal("object"),
3773
- properties: z5.record(z5.string(), z5.any()),
3774
- required: z5.array(z5.string()).optional()
3768
+ StatusComponentSchema = z.object({
3769
+ type: z.string(),
3770
+ description: z.string().optional(),
3771
+ detailsSchema: z.object({
3772
+ type: z.literal("object"),
3773
+ properties: z.record(z.string(), z.any()),
3774
+ required: z.array(z.string()).optional()
3775
3775
  }).optional()
3776
3776
  }).openapi("StatusComponent");
3777
- StatusUpdateSchema = z5.object({
3778
- enabled: z5.boolean().optional(),
3779
- numEvents: z5.number().min(1).max(STATUS_UPDATE_MAX_NUM_EVENTS2).optional(),
3780
- timeInSeconds: z5.number().min(1).max(STATUS_UPDATE_MAX_INTERVAL_SECONDS2).optional(),
3781
- prompt: z5.string().max(
3777
+ StatusUpdateSchema = z.object({
3778
+ enabled: z.boolean().optional(),
3779
+ numEvents: z.number().min(1).max(STATUS_UPDATE_MAX_NUM_EVENTS2).optional(),
3780
+ timeInSeconds: z.number().min(1).max(STATUS_UPDATE_MAX_INTERVAL_SECONDS2).optional(),
3781
+ prompt: z.string().max(
3782
3782
  VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS2,
3783
3783
  `Custom prompt cannot exceed ${VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS2} characters`
3784
3784
  ).optional(),
3785
- statusComponents: z5.array(StatusComponentSchema).optional()
3785
+ statusComponents: z.array(StatusComponentSchema).optional()
3786
3786
  }).openapi("StatusUpdate");
3787
- CanUseItemSchema = z5.object({
3788
- agentToolRelationId: z5.string().optional(),
3789
- toolId: z5.string(),
3790
- toolSelection: z5.array(z5.string()).nullish(),
3791
- headers: z5.record(z5.string(), z5.string()).nullish(),
3792
- toolPolicies: z5.record(z5.string(), z5.object({ needsApproval: z5.boolean().optional() })).nullish()
3787
+ CanUseItemSchema = z.object({
3788
+ agentToolRelationId: z.string().optional(),
3789
+ toolId: z.string(),
3790
+ toolSelection: z.array(z.string()).nullish(),
3791
+ headers: z.record(z.string(), z.string()).nullish(),
3792
+ toolPolicies: z.record(z.string(), z.object({ needsApproval: z.boolean().optional() })).nullish()
3793
3793
  }).openapi("CanUseItem");
3794
- canDelegateToExternalAgentSchema = z5.object({
3795
- externalAgentId: z5.string(),
3796
- subAgentExternalAgentRelationId: z5.string().optional(),
3797
- headers: z5.record(z5.string(), z5.string()).nullish()
3794
+ canDelegateToExternalAgentSchema = z.object({
3795
+ externalAgentId: z.string(),
3796
+ subAgentExternalAgentRelationId: z.string().optional(),
3797
+ headers: z.record(z.string(), z.string()).nullish()
3798
3798
  }).openapi("CanDelegateToExternalAgent");
3799
- canDelegateToTeamAgentSchema = z5.object({
3800
- agentId: z5.string(),
3801
- subAgentTeamAgentRelationId: z5.string().optional(),
3802
- headers: z5.record(z5.string(), z5.string()).nullish()
3799
+ canDelegateToTeamAgentSchema = z.object({
3800
+ agentId: z.string(),
3801
+ subAgentTeamAgentRelationId: z.string().optional(),
3802
+ headers: z.record(z.string(), z.string()).nullish()
3803
3803
  }).openapi("CanDelegateToTeamAgent");
3804
- TeamAgentSchema = z5.object({
3805
- id: z5.string(),
3806
- name: z5.string(),
3807
- description: z5.string()
3804
+ TeamAgentSchema = z.object({
3805
+ id: z.string(),
3806
+ name: z.string(),
3807
+ description: z.string()
3808
3808
  }).openapi("TeamAgent");
3809
3809
  FullAgentAgentInsertSchema = SubAgentApiInsertSchema.extend({
3810
- type: z5.literal("internal"),
3811
- canUse: z5.array(CanUseItemSchema),
3810
+ type: z.literal("internal"),
3811
+ canUse: z.array(CanUseItemSchema),
3812
3812
  // All tools (both MCP and function tools)
3813
- dataComponents: z5.array(z5.string()).optional(),
3814
- artifactComponents: z5.array(z5.string()).optional(),
3815
- canTransferTo: z5.array(z5.string()).optional(),
3816
- prompt: z5.string().trim().nonempty(),
3817
- canDelegateTo: z5.array(
3818
- z5.union([
3819
- z5.string(),
3813
+ dataComponents: z.array(z.string()).optional(),
3814
+ artifactComponents: z.array(z.string()).optional(),
3815
+ canTransferTo: z.array(z.string()).optional(),
3816
+ prompt: z.string().trim().nonempty(),
3817
+ canDelegateTo: z.array(
3818
+ z.union([
3819
+ z.string(),
3820
3820
  // Internal subAgent ID
3821
3821
  canDelegateToExternalAgentSchema,
3822
3822
  // External agent with headers
@@ -3826,46 +3826,46 @@ var init_schemas = __esm({
3826
3826
  ).optional()
3827
3827
  }).openapi("FullAgentAgentInsert");
3828
3828
  AgentWithinContextOfProjectSchema = AgentApiInsertSchema.extend({
3829
- subAgents: z5.record(z5.string(), FullAgentAgentInsertSchema),
3829
+ subAgents: z.record(z.string(), FullAgentAgentInsertSchema),
3830
3830
  // Lookup maps for UI to resolve canUse items
3831
- tools: z5.record(z5.string(), ToolApiInsertSchema).optional(),
3831
+ tools: z.record(z.string(), ToolApiInsertSchema).optional(),
3832
3832
  // MCP tools (project-scoped)
3833
- externalAgents: z5.record(z5.string(), ExternalAgentApiInsertSchema).optional(),
3833
+ externalAgents: z.record(z.string(), ExternalAgentApiInsertSchema).optional(),
3834
3834
  // External agents (project-scoped)
3835
- teamAgents: z5.record(z5.string(), TeamAgentSchema).optional(),
3835
+ teamAgents: z.record(z.string(), TeamAgentSchema).optional(),
3836
3836
  // Team agents contain basic metadata for the agent to be delegated to
3837
- functionTools: z5.record(z5.string(), FunctionToolApiInsertSchema).optional(),
3837
+ functionTools: z.record(z.string(), FunctionToolApiInsertSchema).optional(),
3838
3838
  // Function tools (agent-scoped)
3839
- functions: z5.record(z5.string(), FunctionApiInsertSchema).optional(),
3839
+ functions: z.record(z.string(), FunctionApiInsertSchema).optional(),
3840
3840
  // Get function code for function tools
3841
- contextConfig: z5.optional(ContextConfigApiInsertSchema),
3842
- statusUpdates: z5.optional(StatusUpdateSchema),
3841
+ contextConfig: z.optional(ContextConfigApiInsertSchema),
3842
+ statusUpdates: z.optional(StatusUpdateSchema),
3843
3843
  models: ModelSchema.optional(),
3844
3844
  stopWhen: AgentStopWhenSchema.optional(),
3845
- prompt: z5.string().max(
3845
+ prompt: z.string().max(
3846
3846
  VALIDATION_AGENT_PROMPT_MAX_CHARS2,
3847
3847
  `Agent prompt cannot exceed ${VALIDATION_AGENT_PROMPT_MAX_CHARS2} characters`
3848
3848
  ).optional()
3849
3849
  }).openapi("AgentWithinContextOfProject");
3850
- PaginationSchema = z5.object({
3850
+ PaginationSchema = z.object({
3851
3851
  page: pageNumber,
3852
3852
  limit: limitNumber,
3853
- total: z5.number(),
3854
- pages: z5.number()
3853
+ total: z.number(),
3854
+ pages: z.number()
3855
3855
  }).openapi("Pagination");
3856
- ErrorResponseSchema = z5.object({
3857
- error: z5.string(),
3858
- message: z5.string().optional(),
3859
- details: z5.any().optional().openapi({
3856
+ ErrorResponseSchema = z.object({
3857
+ error: z.string(),
3858
+ message: z.string().optional(),
3859
+ details: z.any().optional().openapi({
3860
3860
  description: "Additional error details"
3861
3861
  })
3862
3862
  }).openapi("ErrorResponse");
3863
- ExistsResponseSchema = z5.object({
3864
- exists: z5.boolean()
3863
+ ExistsResponseSchema = z.object({
3864
+ exists: z.boolean()
3865
3865
  }).openapi("ExistsResponse");
3866
- RemovedResponseSchema = z5.object({
3867
- message: z5.string(),
3868
- removed: z5.boolean()
3866
+ RemovedResponseSchema = z.object({
3867
+ message: z.string(),
3868
+ removed: z.boolean()
3869
3869
  }).openapi("RemovedResponse");
3870
3870
  ProjectSelectSchema = registerFieldSchemas(
3871
3871
  createSelectSchema2(projects).extend({
@@ -3892,147 +3892,147 @@ var init_schemas = __esm({
3892
3892
  );
3893
3893
  ProjectApiUpdateSchema = ProjectUpdateSchema.openapi("ProjectUpdate");
3894
3894
  FullProjectDefinitionSchema = ProjectApiInsertSchema.extend({
3895
- agents: z5.record(z5.string(), AgentWithinContextOfProjectSchema),
3896
- tools: z5.record(z5.string(), ToolApiInsertSchema),
3897
- functionTools: z5.record(z5.string(), FunctionToolApiInsertSchema).optional(),
3898
- functions: z5.record(z5.string(), FunctionApiInsertSchema).optional(),
3899
- dataComponents: z5.record(z5.string(), DataComponentApiInsertSchema).optional(),
3900
- artifactComponents: z5.record(z5.string(), ArtifactComponentApiInsertSchema).optional(),
3901
- externalAgents: z5.record(z5.string(), ExternalAgentApiInsertSchema).optional(),
3902
- statusUpdates: z5.optional(StatusUpdateSchema),
3903
- credentialReferences: z5.record(z5.string(), CredentialReferenceApiInsertSchema).optional(),
3904
- createdAt: z5.string().optional(),
3905
- updatedAt: z5.string().optional()
3895
+ agents: z.record(z.string(), AgentWithinContextOfProjectSchema),
3896
+ tools: z.record(z.string(), ToolApiInsertSchema),
3897
+ functionTools: z.record(z.string(), FunctionToolApiInsertSchema).optional(),
3898
+ functions: z.record(z.string(), FunctionApiInsertSchema).optional(),
3899
+ dataComponents: z.record(z.string(), DataComponentApiInsertSchema).optional(),
3900
+ artifactComponents: z.record(z.string(), ArtifactComponentApiInsertSchema).optional(),
3901
+ externalAgents: z.record(z.string(), ExternalAgentApiInsertSchema).optional(),
3902
+ statusUpdates: z.optional(StatusUpdateSchema),
3903
+ credentialReferences: z.record(z.string(), CredentialReferenceApiInsertSchema).optional(),
3904
+ createdAt: z.string().optional(),
3905
+ updatedAt: z.string().optional()
3906
3906
  }).openapi("FullProjectDefinition");
3907
- ProjectResponse = z5.object({ data: ProjectApiSelectSchema }).openapi("ProjectResponse");
3908
- SubAgentResponse = z5.object({ data: SubAgentApiSelectSchema }).openapi("SubAgentResponse");
3909
- AgentResponse = z5.object({ data: AgentApiSelectSchema }).openapi("AgentResponse");
3910
- ToolResponse = z5.object({ data: ToolApiSelectSchema }).openapi("ToolResponse");
3911
- ExternalAgentResponse = z5.object({ data: ExternalAgentApiSelectSchema }).openapi("ExternalAgentResponse");
3912
- ContextConfigResponse = z5.object({ data: ContextConfigApiSelectSchema }).openapi("ContextConfigResponse");
3913
- ApiKeyResponse = z5.object({ data: ApiKeyApiSelectSchema }).openapi("ApiKeyResponse");
3914
- CredentialReferenceResponse = z5.object({ data: CredentialReferenceApiSelectSchema }).openapi("CredentialReferenceResponse");
3915
- FunctionResponse = z5.object({ data: FunctionApiSelectSchema }).openapi("FunctionResponse");
3916
- FunctionToolResponse = z5.object({ data: FunctionToolApiSelectSchema }).openapi("FunctionToolResponse");
3917
- DataComponentResponse = z5.object({ data: DataComponentApiSelectSchema }).openapi("DataComponentResponse");
3918
- ArtifactComponentResponse = z5.object({ data: ArtifactComponentApiSelectSchema }).openapi("ArtifactComponentResponse");
3919
- SubAgentRelationResponse = z5.object({ data: SubAgentRelationApiSelectSchema }).openapi("SubAgentRelationResponse");
3920
- SubAgentToolRelationResponse = z5.object({ data: SubAgentToolRelationApiSelectSchema }).openapi("SubAgentToolRelationResponse");
3921
- ConversationResponse = z5.object({ data: ConversationApiSelectSchema }).openapi("ConversationResponse");
3922
- MessageResponse = z5.object({ data: MessageApiSelectSchema }).openapi("MessageResponse");
3923
- ProjectListResponse = z5.object({
3924
- data: z5.array(ProjectApiSelectSchema),
3907
+ ProjectResponse = z.object({ data: ProjectApiSelectSchema }).openapi("ProjectResponse");
3908
+ SubAgentResponse = z.object({ data: SubAgentApiSelectSchema }).openapi("SubAgentResponse");
3909
+ AgentResponse = z.object({ data: AgentApiSelectSchema }).openapi("AgentResponse");
3910
+ ToolResponse = z.object({ data: ToolApiSelectSchema }).openapi("ToolResponse");
3911
+ ExternalAgentResponse = z.object({ data: ExternalAgentApiSelectSchema }).openapi("ExternalAgentResponse");
3912
+ ContextConfigResponse = z.object({ data: ContextConfigApiSelectSchema }).openapi("ContextConfigResponse");
3913
+ ApiKeyResponse = z.object({ data: ApiKeyApiSelectSchema }).openapi("ApiKeyResponse");
3914
+ CredentialReferenceResponse = z.object({ data: CredentialReferenceApiSelectSchema }).openapi("CredentialReferenceResponse");
3915
+ FunctionResponse = z.object({ data: FunctionApiSelectSchema }).openapi("FunctionResponse");
3916
+ FunctionToolResponse = z.object({ data: FunctionToolApiSelectSchema }).openapi("FunctionToolResponse");
3917
+ DataComponentResponse = z.object({ data: DataComponentApiSelectSchema }).openapi("DataComponentResponse");
3918
+ ArtifactComponentResponse = z.object({ data: ArtifactComponentApiSelectSchema }).openapi("ArtifactComponentResponse");
3919
+ SubAgentRelationResponse = z.object({ data: SubAgentRelationApiSelectSchema }).openapi("SubAgentRelationResponse");
3920
+ SubAgentToolRelationResponse = z.object({ data: SubAgentToolRelationApiSelectSchema }).openapi("SubAgentToolRelationResponse");
3921
+ ConversationResponse = z.object({ data: ConversationApiSelectSchema }).openapi("ConversationResponse");
3922
+ MessageResponse = z.object({ data: MessageApiSelectSchema }).openapi("MessageResponse");
3923
+ ProjectListResponse = z.object({
3924
+ data: z.array(ProjectApiSelectSchema),
3925
3925
  pagination: PaginationSchema
3926
3926
  }).openapi("ProjectListResponse");
3927
- SubAgentListResponse = z5.object({
3928
- data: z5.array(SubAgentApiSelectSchema),
3927
+ SubAgentListResponse = z.object({
3928
+ data: z.array(SubAgentApiSelectSchema),
3929
3929
  pagination: PaginationSchema
3930
3930
  }).openapi("SubAgentListResponse");
3931
- AgentListResponse = z5.object({
3932
- data: z5.array(AgentApiSelectSchema),
3931
+ AgentListResponse = z.object({
3932
+ data: z.array(AgentApiSelectSchema),
3933
3933
  pagination: PaginationSchema
3934
3934
  }).openapi("AgentListResponse");
3935
- ToolListResponse = z5.object({
3936
- data: z5.array(ToolApiSelectSchema),
3935
+ ToolListResponse = z.object({
3936
+ data: z.array(ToolApiSelectSchema),
3937
3937
  pagination: PaginationSchema
3938
3938
  }).openapi("ToolListResponse");
3939
- ExternalAgentListResponse = z5.object({
3940
- data: z5.array(ExternalAgentApiSelectSchema),
3939
+ ExternalAgentListResponse = z.object({
3940
+ data: z.array(ExternalAgentApiSelectSchema),
3941
3941
  pagination: PaginationSchema
3942
3942
  }).openapi("ExternalAgentListResponse");
3943
- ContextConfigListResponse = z5.object({
3944
- data: z5.array(ContextConfigApiSelectSchema),
3943
+ ContextConfigListResponse = z.object({
3944
+ data: z.array(ContextConfigApiSelectSchema),
3945
3945
  pagination: PaginationSchema
3946
3946
  }).openapi("ContextConfigListResponse");
3947
- ApiKeyListResponse = z5.object({
3948
- data: z5.array(ApiKeyApiSelectSchema),
3947
+ ApiKeyListResponse = z.object({
3948
+ data: z.array(ApiKeyApiSelectSchema),
3949
3949
  pagination: PaginationSchema
3950
3950
  }).openapi("ApiKeyListResponse");
3951
- CredentialReferenceListResponse = z5.object({
3952
- data: z5.array(CredentialReferenceApiSelectSchema),
3951
+ CredentialReferenceListResponse = z.object({
3952
+ data: z.array(CredentialReferenceApiSelectSchema),
3953
3953
  pagination: PaginationSchema
3954
3954
  }).openapi("CredentialReferenceListResponse");
3955
- FunctionListResponse = z5.object({
3956
- data: z5.array(FunctionApiSelectSchema),
3955
+ FunctionListResponse = z.object({
3956
+ data: z.array(FunctionApiSelectSchema),
3957
3957
  pagination: PaginationSchema
3958
3958
  }).openapi("FunctionListResponse");
3959
- FunctionToolListResponse = z5.object({
3960
- data: z5.array(FunctionToolApiSelectSchema),
3959
+ FunctionToolListResponse = z.object({
3960
+ data: z.array(FunctionToolApiSelectSchema),
3961
3961
  pagination: PaginationSchema
3962
3962
  }).openapi("FunctionToolListResponse");
3963
- DataComponentListResponse = z5.object({
3964
- data: z5.array(DataComponentApiSelectSchema),
3963
+ DataComponentListResponse = z.object({
3964
+ data: z.array(DataComponentApiSelectSchema),
3965
3965
  pagination: PaginationSchema
3966
3966
  }).openapi("DataComponentListResponse");
3967
- ArtifactComponentListResponse = z5.object({
3968
- data: z5.array(ArtifactComponentApiSelectSchema),
3967
+ ArtifactComponentListResponse = z.object({
3968
+ data: z.array(ArtifactComponentApiSelectSchema),
3969
3969
  pagination: PaginationSchema
3970
3970
  }).openapi("ArtifactComponentListResponse");
3971
- SubAgentRelationListResponse = z5.object({
3972
- data: z5.array(SubAgentRelationApiSelectSchema),
3971
+ SubAgentRelationListResponse = z.object({
3972
+ data: z.array(SubAgentRelationApiSelectSchema),
3973
3973
  pagination: PaginationSchema
3974
3974
  }).openapi("SubAgentRelationListResponse");
3975
- SubAgentToolRelationListResponse = z5.object({
3976
- data: z5.array(SubAgentToolRelationApiSelectSchema),
3975
+ SubAgentToolRelationListResponse = z.object({
3976
+ data: z.array(SubAgentToolRelationApiSelectSchema),
3977
3977
  pagination: PaginationSchema
3978
3978
  }).openapi("SubAgentToolRelationListResponse");
3979
- ConversationListResponse = z5.object({
3980
- data: z5.array(ConversationApiSelectSchema),
3979
+ ConversationListResponse = z.object({
3980
+ data: z.array(ConversationApiSelectSchema),
3981
3981
  pagination: PaginationSchema
3982
3982
  }).openapi("ConversationListResponse");
3983
- MessageListResponse = z5.object({
3984
- data: z5.array(MessageApiSelectSchema),
3983
+ MessageListResponse = z.object({
3984
+ data: z.array(MessageApiSelectSchema),
3985
3985
  pagination: PaginationSchema
3986
3986
  }).openapi("MessageListResponse");
3987
- SubAgentDataComponentResponse = z5.object({ data: SubAgentDataComponentApiSelectSchema }).openapi("SubAgentDataComponentResponse");
3988
- SubAgentArtifactComponentResponse = z5.object({ data: SubAgentArtifactComponentApiSelectSchema }).openapi("SubAgentArtifactComponentResponse");
3989
- SubAgentDataComponentListResponse = z5.object({
3990
- data: z5.array(SubAgentDataComponentApiSelectSchema),
3987
+ SubAgentDataComponentResponse = z.object({ data: SubAgentDataComponentApiSelectSchema }).openapi("SubAgentDataComponentResponse");
3988
+ SubAgentArtifactComponentResponse = z.object({ data: SubAgentArtifactComponentApiSelectSchema }).openapi("SubAgentArtifactComponentResponse");
3989
+ SubAgentDataComponentListResponse = z.object({
3990
+ data: z.array(SubAgentDataComponentApiSelectSchema),
3991
3991
  pagination: PaginationSchema
3992
3992
  }).openapi("SubAgentDataComponentListResponse");
3993
- SubAgentArtifactComponentListResponse = z5.object({
3994
- data: z5.array(SubAgentArtifactComponentApiSelectSchema),
3993
+ SubAgentArtifactComponentListResponse = z.object({
3994
+ data: z.array(SubAgentArtifactComponentApiSelectSchema),
3995
3995
  pagination: PaginationSchema
3996
3996
  }).openapi("SubAgentArtifactComponentListResponse");
3997
- FullProjectDefinitionResponse = z5.object({ data: FullProjectDefinitionSchema }).openapi("FullProjectDefinitionResponse");
3998
- AgentWithinContextOfProjectResponse = z5.object({ data: AgentWithinContextOfProjectSchema }).openapi("AgentWithinContextOfProjectResponse");
3999
- RelatedAgentInfoListResponse = z5.object({
4000
- data: z5.array(RelatedAgentInfoSchema),
3997
+ FullProjectDefinitionResponse = z.object({ data: FullProjectDefinitionSchema }).openapi("FullProjectDefinitionResponse");
3998
+ AgentWithinContextOfProjectResponse = z.object({ data: AgentWithinContextOfProjectSchema }).openapi("AgentWithinContextOfProjectResponse");
3999
+ RelatedAgentInfoListResponse = z.object({
4000
+ data: z.array(RelatedAgentInfoSchema),
4001
4001
  pagination: PaginationSchema
4002
4002
  }).openapi("RelatedAgentInfoListResponse");
4003
- ComponentAssociationListResponse = z5.object({ data: z5.array(ComponentAssociationSchema) }).openapi("ComponentAssociationListResponse");
4004
- McpToolResponse = z5.object({ data: McpToolSchema }).openapi("McpToolResponse");
4005
- McpToolListResponse = z5.object({
4006
- data: z5.array(McpToolSchema),
4003
+ ComponentAssociationListResponse = z.object({ data: z.array(ComponentAssociationSchema) }).openapi("ComponentAssociationListResponse");
4004
+ McpToolResponse = z.object({ data: McpToolSchema }).openapi("McpToolResponse");
4005
+ McpToolListResponse = z.object({
4006
+ data: z.array(McpToolSchema),
4007
4007
  pagination: PaginationSchema
4008
4008
  }).openapi("McpToolListResponse");
4009
- SubAgentTeamAgentRelationResponse = z5.object({ data: SubAgentTeamAgentRelationApiSelectSchema }).openapi("SubAgentTeamAgentRelationResponse");
4010
- SubAgentTeamAgentRelationListResponse = z5.object({
4011
- data: z5.array(SubAgentTeamAgentRelationApiSelectSchema),
4009
+ SubAgentTeamAgentRelationResponse = z.object({ data: SubAgentTeamAgentRelationApiSelectSchema }).openapi("SubAgentTeamAgentRelationResponse");
4010
+ SubAgentTeamAgentRelationListResponse = z.object({
4011
+ data: z.array(SubAgentTeamAgentRelationApiSelectSchema),
4012
4012
  pagination: PaginationSchema
4013
4013
  }).openapi("SubAgentTeamAgentRelationListResponse");
4014
- SubAgentExternalAgentRelationResponse = z5.object({ data: SubAgentExternalAgentRelationApiSelectSchema }).openapi("SubAgentExternalAgentRelationResponse");
4015
- SubAgentExternalAgentRelationListResponse = z5.object({
4016
- data: z5.array(SubAgentExternalAgentRelationApiSelectSchema),
4014
+ SubAgentExternalAgentRelationResponse = z.object({ data: SubAgentExternalAgentRelationApiSelectSchema }).openapi("SubAgentExternalAgentRelationResponse");
4015
+ SubAgentExternalAgentRelationListResponse = z.object({
4016
+ data: z.array(SubAgentExternalAgentRelationApiSelectSchema),
4017
4017
  pagination: PaginationSchema
4018
4018
  }).openapi("SubAgentExternalAgentRelationListResponse");
4019
- DataComponentArrayResponse = z5.object({ data: z5.array(DataComponentApiSelectSchema) }).openapi("DataComponentArrayResponse");
4020
- ArtifactComponentArrayResponse = z5.object({ data: z5.array(ArtifactComponentApiSelectSchema) }).openapi("ArtifactComponentArrayResponse");
4021
- HeadersScopeSchema = z5.object({
4022
- "x-inkeep-tenant-id": z5.string().optional().openapi({
4019
+ DataComponentArrayResponse = z.object({ data: z.array(DataComponentApiSelectSchema) }).openapi("DataComponentArrayResponse");
4020
+ ArtifactComponentArrayResponse = z.object({ data: z.array(ArtifactComponentApiSelectSchema) }).openapi("ArtifactComponentArrayResponse");
4021
+ HeadersScopeSchema = z.object({
4022
+ "x-inkeep-tenant-id": z.string().optional().openapi({
4023
4023
  description: "Tenant identifier",
4024
4024
  example: "tenant_123"
4025
4025
  }),
4026
- "x-inkeep-project-id": z5.string().optional().openapi({
4026
+ "x-inkeep-project-id": z.string().optional().openapi({
4027
4027
  description: "Project identifier",
4028
4028
  example: "project_456"
4029
4029
  }),
4030
- "x-inkeep-agent-id": z5.string().optional().openapi({
4030
+ "x-inkeep-agent-id": z.string().optional().openapi({
4031
4031
  description: "Agent identifier",
4032
4032
  example: "agent_789"
4033
4033
  })
4034
4034
  });
4035
- TenantId = z5.string().openapi("TenantIdPathParam", {
4035
+ TenantId = z.string().openapi("TenantIdPathParam", {
4036
4036
  param: {
4037
4037
  name: "tenantId",
4038
4038
  in: "path"
@@ -4040,7 +4040,7 @@ var init_schemas = __esm({
4040
4040
  description: "Tenant identifier",
4041
4041
  example: "tenant_123"
4042
4042
  });
4043
- ProjectId = z5.string().openapi("ProjectIdPathParam", {
4043
+ ProjectId = z.string().openapi("ProjectIdPathParam", {
4044
4044
  param: {
4045
4045
  name: "projectId",
4046
4046
  in: "path"
@@ -4048,7 +4048,7 @@ var init_schemas = __esm({
4048
4048
  description: "Project identifier",
4049
4049
  example: "project_456"
4050
4050
  });
4051
- AgentId = z5.string().openapi("AgentIdPathParam", {
4051
+ AgentId = z.string().openapi("AgentIdPathParam", {
4052
4052
  param: {
4053
4053
  name: "agentId",
4054
4054
  in: "path"
@@ -4056,7 +4056,7 @@ var init_schemas = __esm({
4056
4056
  description: "Agent identifier",
4057
4057
  example: "agent_789"
4058
4058
  });
4059
- SubAgentId = z5.string().openapi("SubAgentIdPathParam", {
4059
+ SubAgentId = z.string().openapi("SubAgentIdPathParam", {
4060
4060
  param: {
4061
4061
  name: "subAgentId",
4062
4062
  in: "path"
@@ -4064,7 +4064,7 @@ var init_schemas = __esm({
4064
4064
  description: "Sub-agent identifier",
4065
4065
  example: "sub_agent_123"
4066
4066
  });
4067
- TenantParamsSchema = z5.object({
4067
+ TenantParamsSchema = z.object({
4068
4068
  tenantId: TenantId
4069
4069
  });
4070
4070
  TenantIdParamsSchema = TenantParamsSchema.extend({
@@ -4088,37 +4088,37 @@ var init_schemas = __esm({
4088
4088
  TenantProjectAgentSubAgentIdParamsSchema = TenantProjectAgentSubAgentParamsSchema.extend({
4089
4089
  id: resourceIdSchema
4090
4090
  });
4091
- PaginationQueryParamsSchema = z5.object({
4091
+ PaginationQueryParamsSchema = z.object({
4092
4092
  page: pageNumber,
4093
4093
  limit: limitNumber
4094
4094
  }).openapi("PaginationQueryParams");
4095
- PrebuiltMCPServerSchema = z5.object({
4096
- id: z5.string().describe("Unique identifier for the MCP server"),
4097
- name: z5.string().describe("Display name of the MCP server"),
4098
- url: z5.url().describe("URL endpoint for the MCP server"),
4099
- transport: z5.enum(MCPTransportType).describe("Transport protocol type"),
4100
- imageUrl: z5.url().optional().describe("Logo/icon URL for the MCP server"),
4101
- isOpen: z5.boolean().optional().describe("Whether the MCP server is open (doesn't require authentication)"),
4102
- category: z5.string().optional().describe("Category of the MCP server (e.g., communication, project_management)"),
4103
- description: z5.string().optional().describe("Brief description of what the MCP server does"),
4104
- thirdPartyConnectAccountUrl: z5.url().optional().describe("URL to connect to the third party account")
4095
+ PrebuiltMCPServerSchema = z.object({
4096
+ id: z.string().describe("Unique identifier for the MCP server"),
4097
+ name: z.string().describe("Display name of the MCP server"),
4098
+ url: z.url().describe("URL endpoint for the MCP server"),
4099
+ transport: z.enum(MCPTransportType).describe("Transport protocol type"),
4100
+ imageUrl: z.url().optional().describe("Logo/icon URL for the MCP server"),
4101
+ isOpen: z.boolean().optional().describe("Whether the MCP server is open (doesn't require authentication)"),
4102
+ category: z.string().optional().describe("Category of the MCP server (e.g., communication, project_management)"),
4103
+ description: z.string().optional().describe("Brief description of what the MCP server does"),
4104
+ thirdPartyConnectAccountUrl: z.url().optional().describe("URL to connect to the third party account")
4105
4105
  });
4106
- MCPCatalogListResponse = z5.object({
4107
- data: z5.array(PrebuiltMCPServerSchema)
4106
+ MCPCatalogListResponse = z.object({
4107
+ data: z.array(PrebuiltMCPServerSchema)
4108
4108
  }).openapi("MCPCatalogListResponse");
4109
- ThirdPartyMCPServerResponse = z5.object({
4109
+ ThirdPartyMCPServerResponse = z.object({
4110
4110
  data: PrebuiltMCPServerSchema.nullable()
4111
4111
  }).openapi("ThirdPartyMCPServerResponse");
4112
4112
  }
4113
4113
  });
4114
4114
 
4115
4115
  // ../packages/agents-core/src/context/ContextConfig.ts
4116
- import { z as z7 } from "zod";
4117
4116
  var logger2;
4118
4117
  var init_ContextConfig = __esm({
4119
4118
  "../packages/agents-core/src/context/ContextConfig.ts"() {
4120
4119
  "use strict";
4121
4120
  init_esm_shims();
4121
+ init_dist4();
4122
4122
  init_logger();
4123
4123
  init_schema_conversion();
4124
4124
  init_schemas();
@@ -218982,56 +218982,56 @@ var init_index_node = __esm({
218982
218982
  });
218983
218983
 
218984
218984
  // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.21.0/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
218985
- import { z as z8 } from "zod";
218985
+ import { z as z3 } from "zod";
218986
218986
  var JSONRPC_VERSION, ProgressTokenSchema, CursorSchema, RequestMetaSchema, BaseRequestParamsSchema, RequestSchema, BaseNotificationParamsSchema, NotificationSchema, ResultSchema, RequestIdSchema, JSONRPCRequestSchema, JSONRPCNotificationSchema, JSONRPCResponseSchema, ErrorCode, JSONRPCErrorSchema, JSONRPCMessageSchema, EmptyResultSchema, CancelledNotificationSchema, IconSchema, IconsSchema, BaseMetadataSchema, ImplementationSchema, ClientCapabilitiesSchema, InitializeRequestSchema, ServerCapabilitiesSchema, InitializeResultSchema, InitializedNotificationSchema, PingRequestSchema, ProgressSchema, ProgressNotificationSchema, PaginatedRequestSchema, PaginatedResultSchema, ResourceContentsSchema, TextResourceContentsSchema, Base64Schema, BlobResourceContentsSchema, ResourceSchema, ResourceTemplateSchema, ListResourcesRequestSchema, ListResourcesResultSchema, ListResourceTemplatesRequestSchema, ListResourceTemplatesResultSchema, ReadResourceRequestSchema, ReadResourceResultSchema, ResourceListChangedNotificationSchema, SubscribeRequestSchema, UnsubscribeRequestSchema, ResourceUpdatedNotificationSchema, PromptArgumentSchema, PromptSchema, ListPromptsRequestSchema, ListPromptsResultSchema, GetPromptRequestSchema, TextContentSchema, ImageContentSchema, AudioContentSchema, EmbeddedResourceSchema, ResourceLinkSchema, ContentBlockSchema, PromptMessageSchema, GetPromptResultSchema, PromptListChangedNotificationSchema, ToolAnnotationsSchema, ToolSchema, ListToolsRequestSchema, ListToolsResultSchema, CallToolResultSchema, CompatibilityCallToolResultSchema, CallToolRequestSchema, ToolListChangedNotificationSchema, LoggingLevelSchema, SetLevelRequestSchema, LoggingMessageNotificationSchema, ModelHintSchema, ModelPreferencesSchema, SamplingMessageSchema, CreateMessageRequestSchema, CreateMessageResultSchema, BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema, EnumSchemaSchema, PrimitiveSchemaDefinitionSchema, ElicitRequestSchema, ElicitResultSchema, ResourceTemplateReferenceSchema, PromptReferenceSchema, CompleteRequestSchema, CompleteResultSchema, RootSchema, ListRootsRequestSchema, ListRootsResultSchema, RootsListChangedNotificationSchema, ClientRequestSchema, ClientNotificationSchema, ClientResultSchema, ServerRequestSchema, ServerNotificationSchema, ServerResultSchema;
218987
218987
  var init_types2 = __esm({
218988
218988
  "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.21.0/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js"() {
218989
218989
  "use strict";
218990
218990
  init_esm_shims();
218991
218991
  JSONRPC_VERSION = "2.0";
218992
- ProgressTokenSchema = z8.union([z8.string(), z8.number().int()]);
218993
- CursorSchema = z8.string();
218994
- RequestMetaSchema = z8.object({
218992
+ ProgressTokenSchema = z3.union([z3.string(), z3.number().int()]);
218993
+ CursorSchema = z3.string();
218994
+ RequestMetaSchema = z3.object({
218995
218995
  /**
218996
218996
  * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
218997
218997
  */
218998
- progressToken: z8.optional(ProgressTokenSchema)
218998
+ progressToken: z3.optional(ProgressTokenSchema)
218999
218999
  }).passthrough();
219000
- BaseRequestParamsSchema = z8.object({
219001
- _meta: z8.optional(RequestMetaSchema)
219000
+ BaseRequestParamsSchema = z3.object({
219001
+ _meta: z3.optional(RequestMetaSchema)
219002
219002
  }).passthrough();
219003
- RequestSchema = z8.object({
219004
- method: z8.string(),
219005
- params: z8.optional(BaseRequestParamsSchema)
219003
+ RequestSchema = z3.object({
219004
+ method: z3.string(),
219005
+ params: z3.optional(BaseRequestParamsSchema)
219006
219006
  });
219007
- BaseNotificationParamsSchema = z8.object({
219007
+ BaseNotificationParamsSchema = z3.object({
219008
219008
  /**
219009
219009
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
219010
219010
  * for notes on _meta usage.
219011
219011
  */
219012
- _meta: z8.optional(z8.object({}).passthrough())
219012
+ _meta: z3.optional(z3.object({}).passthrough())
219013
219013
  }).passthrough();
219014
- NotificationSchema = z8.object({
219015
- method: z8.string(),
219016
- params: z8.optional(BaseNotificationParamsSchema)
219014
+ NotificationSchema = z3.object({
219015
+ method: z3.string(),
219016
+ params: z3.optional(BaseNotificationParamsSchema)
219017
219017
  });
219018
- ResultSchema = z8.object({
219018
+ ResultSchema = z3.object({
219019
219019
  /**
219020
219020
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
219021
219021
  * for notes on _meta usage.
219022
219022
  */
219023
- _meta: z8.optional(z8.object({}).passthrough())
219023
+ _meta: z3.optional(z3.object({}).passthrough())
219024
219024
  }).passthrough();
219025
- RequestIdSchema = z8.union([z8.string(), z8.number().int()]);
219026
- JSONRPCRequestSchema = z8.object({
219027
- jsonrpc: z8.literal(JSONRPC_VERSION),
219025
+ RequestIdSchema = z3.union([z3.string(), z3.number().int()]);
219026
+ JSONRPCRequestSchema = z3.object({
219027
+ jsonrpc: z3.literal(JSONRPC_VERSION),
219028
219028
  id: RequestIdSchema
219029
219029
  }).merge(RequestSchema).strict();
219030
- JSONRPCNotificationSchema = z8.object({
219031
- jsonrpc: z8.literal(JSONRPC_VERSION)
219030
+ JSONRPCNotificationSchema = z3.object({
219031
+ jsonrpc: z3.literal(JSONRPC_VERSION)
219032
219032
  }).merge(NotificationSchema).strict();
219033
- JSONRPCResponseSchema = z8.object({
219034
- jsonrpc: z8.literal(JSONRPC_VERSION),
219033
+ JSONRPCResponseSchema = z3.object({
219034
+ jsonrpc: z3.literal(JSONRPC_VERSION),
219035
219035
  id: RequestIdSchema,
219036
219036
  result: ResultSchema
219037
219037
  }).strict();
@@ -219044,28 +219044,28 @@ var init_types2 = __esm({
219044
219044
  ErrorCode3[ErrorCode3["InvalidParams"] = -32602] = "InvalidParams";
219045
219045
  ErrorCode3[ErrorCode3["InternalError"] = -32603] = "InternalError";
219046
219046
  })(ErrorCode || (ErrorCode = {}));
219047
- JSONRPCErrorSchema = z8.object({
219048
- jsonrpc: z8.literal(JSONRPC_VERSION),
219047
+ JSONRPCErrorSchema = z3.object({
219048
+ jsonrpc: z3.literal(JSONRPC_VERSION),
219049
219049
  id: RequestIdSchema,
219050
- error: z8.object({
219050
+ error: z3.object({
219051
219051
  /**
219052
219052
  * The error type that occurred.
219053
219053
  */
219054
- code: z8.number().int(),
219054
+ code: z3.number().int(),
219055
219055
  /**
219056
219056
  * A short description of the error. The message SHOULD be limited to a concise single sentence.
219057
219057
  */
219058
- message: z8.string(),
219058
+ message: z3.string(),
219059
219059
  /**
219060
219060
  * Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
219061
219061
  */
219062
- data: z8.optional(z8.unknown())
219062
+ data: z3.optional(z3.unknown())
219063
219063
  })
219064
219064
  }).strict();
219065
- JSONRPCMessageSchema = z8.union([JSONRPCRequestSchema, JSONRPCNotificationSchema, JSONRPCResponseSchema, JSONRPCErrorSchema]);
219065
+ JSONRPCMessageSchema = z3.union([JSONRPCRequestSchema, JSONRPCNotificationSchema, JSONRPCResponseSchema, JSONRPCErrorSchema]);
219066
219066
  EmptyResultSchema = ResultSchema.strict();
219067
219067
  CancelledNotificationSchema = NotificationSchema.extend({
219068
- method: z8.literal("notifications/cancelled"),
219068
+ method: z3.literal("notifications/cancelled"),
219069
219069
  params: BaseNotificationParamsSchema.extend({
219070
219070
  /**
219071
219071
  * The ID of the request to cancel.
@@ -219076,27 +219076,27 @@ var init_types2 = __esm({
219076
219076
  /**
219077
219077
  * An optional string describing the reason for the cancellation. This MAY be logged or presented to the user.
219078
219078
  */
219079
- reason: z8.string().optional()
219079
+ reason: z3.string().optional()
219080
219080
  })
219081
219081
  });
219082
- IconSchema = z8.object({
219082
+ IconSchema = z3.object({
219083
219083
  /**
219084
219084
  * URL or data URI for the icon.
219085
219085
  */
219086
- src: z8.string(),
219086
+ src: z3.string(),
219087
219087
  /**
219088
219088
  * Optional MIME type for the icon.
219089
219089
  */
219090
- mimeType: z8.optional(z8.string()),
219090
+ mimeType: z3.optional(z3.string()),
219091
219091
  /**
219092
219092
  * Optional array of strings that specify sizes at which the icon can be used.
219093
219093
  * Each string should be in WxH format (e.g., `"48x48"`, `"96x96"`) or `"any"` for scalable formats like SVG.
219094
219094
  *
219095
219095
  * If not provided, the client should assume that the icon can be used at any size.
219096
219096
  */
219097
- sizes: z8.optional(z8.array(z8.string()))
219097
+ sizes: z3.optional(z3.array(z3.string()))
219098
219098
  }).passthrough();
219099
- IconsSchema = z8.object({
219099
+ IconsSchema = z3.object({
219100
219100
  /**
219101
219101
  * Optional set of sized icons that the client can display in a user interface.
219102
219102
  *
@@ -219108,11 +219108,11 @@ var init_types2 = __esm({
219108
219108
  * - `image/svg+xml` - SVG images (scalable but requires security precautions)
219109
219109
  * - `image/webp` - WebP images (modern, efficient format)
219110
219110
  */
219111
- icons: z8.array(IconSchema).optional()
219111
+ icons: z3.array(IconSchema).optional()
219112
219112
  }).passthrough();
219113
- BaseMetadataSchema = z8.object({
219113
+ BaseMetadataSchema = z3.object({
219114
219114
  /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
219115
- name: z8.string(),
219115
+ name: z3.string(),
219116
219116
  /**
219117
219117
  * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
219118
219118
  * even by those unfamiliar with domain-specific terminology.
@@ -219121,99 +219121,99 @@ var init_types2 = __esm({
219121
219121
  * where `annotations.title` should be given precedence over using `name`,
219122
219122
  * if present).
219123
219123
  */
219124
- title: z8.optional(z8.string())
219124
+ title: z3.optional(z3.string())
219125
219125
  }).passthrough();
219126
219126
  ImplementationSchema = BaseMetadataSchema.extend({
219127
- version: z8.string(),
219127
+ version: z3.string(),
219128
219128
  /**
219129
219129
  * An optional URL of the website for this implementation.
219130
219130
  */
219131
- websiteUrl: z8.optional(z8.string())
219131
+ websiteUrl: z3.optional(z3.string())
219132
219132
  }).merge(IconsSchema);
219133
- ClientCapabilitiesSchema = z8.object({
219133
+ ClientCapabilitiesSchema = z3.object({
219134
219134
  /**
219135
219135
  * Experimental, non-standard capabilities that the client supports.
219136
219136
  */
219137
- experimental: z8.optional(z8.object({}).passthrough()),
219137
+ experimental: z3.optional(z3.object({}).passthrough()),
219138
219138
  /**
219139
219139
  * Present if the client supports sampling from an LLM.
219140
219140
  */
219141
- sampling: z8.optional(z8.object({}).passthrough()),
219141
+ sampling: z3.optional(z3.object({}).passthrough()),
219142
219142
  /**
219143
219143
  * Present if the client supports eliciting user input.
219144
219144
  */
219145
- elicitation: z8.optional(z8.object({}).passthrough()),
219145
+ elicitation: z3.optional(z3.object({}).passthrough()),
219146
219146
  /**
219147
219147
  * Present if the client supports listing roots.
219148
219148
  */
219149
- roots: z8.optional(z8.object({
219149
+ roots: z3.optional(z3.object({
219150
219150
  /**
219151
219151
  * Whether the client supports issuing notifications for changes to the roots list.
219152
219152
  */
219153
- listChanged: z8.optional(z8.boolean())
219153
+ listChanged: z3.optional(z3.boolean())
219154
219154
  }).passthrough())
219155
219155
  }).passthrough();
219156
219156
  InitializeRequestSchema = RequestSchema.extend({
219157
- method: z8.literal("initialize"),
219157
+ method: z3.literal("initialize"),
219158
219158
  params: BaseRequestParamsSchema.extend({
219159
219159
  /**
219160
219160
  * The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well.
219161
219161
  */
219162
- protocolVersion: z8.string(),
219162
+ protocolVersion: z3.string(),
219163
219163
  capabilities: ClientCapabilitiesSchema,
219164
219164
  clientInfo: ImplementationSchema
219165
219165
  })
219166
219166
  });
219167
- ServerCapabilitiesSchema = z8.object({
219167
+ ServerCapabilitiesSchema = z3.object({
219168
219168
  /**
219169
219169
  * Experimental, non-standard capabilities that the server supports.
219170
219170
  */
219171
- experimental: z8.optional(z8.object({}).passthrough()),
219171
+ experimental: z3.optional(z3.object({}).passthrough()),
219172
219172
  /**
219173
219173
  * Present if the server supports sending log messages to the client.
219174
219174
  */
219175
- logging: z8.optional(z8.object({}).passthrough()),
219175
+ logging: z3.optional(z3.object({}).passthrough()),
219176
219176
  /**
219177
219177
  * Present if the server supports sending completions to the client.
219178
219178
  */
219179
- completions: z8.optional(z8.object({}).passthrough()),
219179
+ completions: z3.optional(z3.object({}).passthrough()),
219180
219180
  /**
219181
219181
  * Present if the server offers any prompt templates.
219182
219182
  */
219183
- prompts: z8.optional(z8.object({
219183
+ prompts: z3.optional(z3.object({
219184
219184
  /**
219185
219185
  * Whether this server supports issuing notifications for changes to the prompt list.
219186
219186
  */
219187
- listChanged: z8.optional(z8.boolean())
219187
+ listChanged: z3.optional(z3.boolean())
219188
219188
  }).passthrough()),
219189
219189
  /**
219190
219190
  * Present if the server offers any resources to read.
219191
219191
  */
219192
- resources: z8.optional(z8.object({
219192
+ resources: z3.optional(z3.object({
219193
219193
  /**
219194
219194
  * Whether this server supports clients subscribing to resource updates.
219195
219195
  */
219196
- subscribe: z8.optional(z8.boolean()),
219196
+ subscribe: z3.optional(z3.boolean()),
219197
219197
  /**
219198
219198
  * Whether this server supports issuing notifications for changes to the resource list.
219199
219199
  */
219200
- listChanged: z8.optional(z8.boolean())
219200
+ listChanged: z3.optional(z3.boolean())
219201
219201
  }).passthrough()),
219202
219202
  /**
219203
219203
  * Present if the server offers any tools to call.
219204
219204
  */
219205
- tools: z8.optional(z8.object({
219205
+ tools: z3.optional(z3.object({
219206
219206
  /**
219207
219207
  * Whether this server supports issuing notifications for changes to the tool list.
219208
219208
  */
219209
- listChanged: z8.optional(z8.boolean())
219209
+ listChanged: z3.optional(z3.boolean())
219210
219210
  }).passthrough())
219211
219211
  }).passthrough();
219212
219212
  InitializeResultSchema = ResultSchema.extend({
219213
219213
  /**
219214
219214
  * The version of the Model Context Protocol that the server wants to use. This may not match the version that the client requested. If the client cannot support this version, it MUST disconnect.
219215
219215
  */
219216
- protocolVersion: z8.string(),
219216
+ protocolVersion: z3.string(),
219217
219217
  capabilities: ServerCapabilitiesSchema,
219218
219218
  serverInfo: ImplementationSchema,
219219
219219
  /**
@@ -219221,30 +219221,30 @@ var init_types2 = __esm({
219221
219221
  *
219222
219222
  * This can be used by clients to improve the LLM's understanding of available tools, resources, etc. It can be thought of like a "hint" to the model. For example, this information MAY be added to the system prompt.
219223
219223
  */
219224
- instructions: z8.optional(z8.string())
219224
+ instructions: z3.optional(z3.string())
219225
219225
  });
219226
219226
  InitializedNotificationSchema = NotificationSchema.extend({
219227
- method: z8.literal("notifications/initialized")
219227
+ method: z3.literal("notifications/initialized")
219228
219228
  });
219229
219229
  PingRequestSchema = RequestSchema.extend({
219230
- method: z8.literal("ping")
219230
+ method: z3.literal("ping")
219231
219231
  });
219232
- ProgressSchema = z8.object({
219232
+ ProgressSchema = z3.object({
219233
219233
  /**
219234
219234
  * The progress thus far. This should increase every time progress is made, even if the total is unknown.
219235
219235
  */
219236
- progress: z8.number(),
219236
+ progress: z3.number(),
219237
219237
  /**
219238
219238
  * Total number of items to process (or total progress required), if known.
219239
219239
  */
219240
- total: z8.optional(z8.number()),
219240
+ total: z3.optional(z3.number()),
219241
219241
  /**
219242
219242
  * An optional message describing the current progress.
219243
219243
  */
219244
- message: z8.optional(z8.string())
219244
+ message: z3.optional(z3.string())
219245
219245
  }).passthrough();
219246
219246
  ProgressNotificationSchema = NotificationSchema.extend({
219247
- method: z8.literal("notifications/progress"),
219247
+ method: z3.literal("notifications/progress"),
219248
219248
  params: BaseNotificationParamsSchema.merge(ProgressSchema).extend({
219249
219249
  /**
219250
219250
  * The progress token which was given in the initial request, used to associate this notification with the request that is proceeding.
@@ -219258,7 +219258,7 @@ var init_types2 = __esm({
219258
219258
  * An opaque token representing the current pagination position.
219259
219259
  * If provided, the server should return results starting after this cursor.
219260
219260
  */
219261
- cursor: z8.optional(CursorSchema)
219261
+ cursor: z3.optional(CursorSchema)
219262
219262
  }).optional()
219263
219263
  });
219264
219264
  PaginatedResultSchema = ResultSchema.extend({
@@ -219266,30 +219266,30 @@ var init_types2 = __esm({
219266
219266
  * An opaque token representing the pagination position after the last returned result.
219267
219267
  * If present, there may be more results available.
219268
219268
  */
219269
- nextCursor: z8.optional(CursorSchema)
219269
+ nextCursor: z3.optional(CursorSchema)
219270
219270
  });
219271
- ResourceContentsSchema = z8.object({
219271
+ ResourceContentsSchema = z3.object({
219272
219272
  /**
219273
219273
  * The URI of this resource.
219274
219274
  */
219275
- uri: z8.string(),
219275
+ uri: z3.string(),
219276
219276
  /**
219277
219277
  * The MIME type of this resource, if known.
219278
219278
  */
219279
- mimeType: z8.optional(z8.string()),
219279
+ mimeType: z3.optional(z3.string()),
219280
219280
  /**
219281
219281
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
219282
219282
  * for notes on _meta usage.
219283
219283
  */
219284
- _meta: z8.optional(z8.object({}).passthrough())
219284
+ _meta: z3.optional(z3.object({}).passthrough())
219285
219285
  }).passthrough();
219286
219286
  TextResourceContentsSchema = ResourceContentsSchema.extend({
219287
219287
  /**
219288
219288
  * The text of the item. This must only be set if the item can actually be represented as text (not binary data).
219289
219289
  */
219290
- text: z8.string()
219290
+ text: z3.string()
219291
219291
  });
219292
- Base64Schema = z8.string().refine((val) => {
219292
+ Base64Schema = z3.string().refine((val) => {
219293
219293
  try {
219294
219294
  atob(val);
219295
219295
  return true;
@@ -219307,160 +219307,160 @@ var init_types2 = __esm({
219307
219307
  /**
219308
219308
  * The URI of this resource.
219309
219309
  */
219310
- uri: z8.string(),
219310
+ uri: z3.string(),
219311
219311
  /**
219312
219312
  * A description of what this resource represents.
219313
219313
  *
219314
219314
  * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
219315
219315
  */
219316
- description: z8.optional(z8.string()),
219316
+ description: z3.optional(z3.string()),
219317
219317
  /**
219318
219318
  * The MIME type of this resource, if known.
219319
219319
  */
219320
- mimeType: z8.optional(z8.string()),
219320
+ mimeType: z3.optional(z3.string()),
219321
219321
  /**
219322
219322
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
219323
219323
  * for notes on _meta usage.
219324
219324
  */
219325
- _meta: z8.optional(z8.object({}).passthrough())
219325
+ _meta: z3.optional(z3.object({}).passthrough())
219326
219326
  }).merge(IconsSchema);
219327
219327
  ResourceTemplateSchema = BaseMetadataSchema.extend({
219328
219328
  /**
219329
219329
  * A URI template (according to RFC 6570) that can be used to construct resource URIs.
219330
219330
  */
219331
- uriTemplate: z8.string(),
219331
+ uriTemplate: z3.string(),
219332
219332
  /**
219333
219333
  * A description of what this template is for.
219334
219334
  *
219335
219335
  * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
219336
219336
  */
219337
- description: z8.optional(z8.string()),
219337
+ description: z3.optional(z3.string()),
219338
219338
  /**
219339
219339
  * The MIME type for all resources that match this template. This should only be included if all resources matching this template have the same type.
219340
219340
  */
219341
- mimeType: z8.optional(z8.string()),
219341
+ mimeType: z3.optional(z3.string()),
219342
219342
  /**
219343
219343
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
219344
219344
  * for notes on _meta usage.
219345
219345
  */
219346
- _meta: z8.optional(z8.object({}).passthrough())
219346
+ _meta: z3.optional(z3.object({}).passthrough())
219347
219347
  }).merge(IconsSchema);
219348
219348
  ListResourcesRequestSchema = PaginatedRequestSchema.extend({
219349
- method: z8.literal("resources/list")
219349
+ method: z3.literal("resources/list")
219350
219350
  });
219351
219351
  ListResourcesResultSchema = PaginatedResultSchema.extend({
219352
- resources: z8.array(ResourceSchema)
219352
+ resources: z3.array(ResourceSchema)
219353
219353
  });
219354
219354
  ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({
219355
- method: z8.literal("resources/templates/list")
219355
+ method: z3.literal("resources/templates/list")
219356
219356
  });
219357
219357
  ListResourceTemplatesResultSchema = PaginatedResultSchema.extend({
219358
- resourceTemplates: z8.array(ResourceTemplateSchema)
219358
+ resourceTemplates: z3.array(ResourceTemplateSchema)
219359
219359
  });
219360
219360
  ReadResourceRequestSchema = RequestSchema.extend({
219361
- method: z8.literal("resources/read"),
219361
+ method: z3.literal("resources/read"),
219362
219362
  params: BaseRequestParamsSchema.extend({
219363
219363
  /**
219364
219364
  * The URI of the resource to read. The URI can use any protocol; it is up to the server how to interpret it.
219365
219365
  */
219366
- uri: z8.string()
219366
+ uri: z3.string()
219367
219367
  })
219368
219368
  });
219369
219369
  ReadResourceResultSchema = ResultSchema.extend({
219370
- contents: z8.array(z8.union([TextResourceContentsSchema, BlobResourceContentsSchema]))
219370
+ contents: z3.array(z3.union([TextResourceContentsSchema, BlobResourceContentsSchema]))
219371
219371
  });
219372
219372
  ResourceListChangedNotificationSchema = NotificationSchema.extend({
219373
- method: z8.literal("notifications/resources/list_changed")
219373
+ method: z3.literal("notifications/resources/list_changed")
219374
219374
  });
219375
219375
  SubscribeRequestSchema = RequestSchema.extend({
219376
- method: z8.literal("resources/subscribe"),
219376
+ method: z3.literal("resources/subscribe"),
219377
219377
  params: BaseRequestParamsSchema.extend({
219378
219378
  /**
219379
219379
  * The URI of the resource to subscribe to. The URI can use any protocol; it is up to the server how to interpret it.
219380
219380
  */
219381
- uri: z8.string()
219381
+ uri: z3.string()
219382
219382
  })
219383
219383
  });
219384
219384
  UnsubscribeRequestSchema = RequestSchema.extend({
219385
- method: z8.literal("resources/unsubscribe"),
219385
+ method: z3.literal("resources/unsubscribe"),
219386
219386
  params: BaseRequestParamsSchema.extend({
219387
219387
  /**
219388
219388
  * The URI of the resource to unsubscribe from.
219389
219389
  */
219390
- uri: z8.string()
219390
+ uri: z3.string()
219391
219391
  })
219392
219392
  });
219393
219393
  ResourceUpdatedNotificationSchema = NotificationSchema.extend({
219394
- method: z8.literal("notifications/resources/updated"),
219394
+ method: z3.literal("notifications/resources/updated"),
219395
219395
  params: BaseNotificationParamsSchema.extend({
219396
219396
  /**
219397
219397
  * The URI of the resource that has been updated. This might be a sub-resource of the one that the client actually subscribed to.
219398
219398
  */
219399
- uri: z8.string()
219399
+ uri: z3.string()
219400
219400
  })
219401
219401
  });
219402
- PromptArgumentSchema = z8.object({
219402
+ PromptArgumentSchema = z3.object({
219403
219403
  /**
219404
219404
  * The name of the argument.
219405
219405
  */
219406
- name: z8.string(),
219406
+ name: z3.string(),
219407
219407
  /**
219408
219408
  * A human-readable description of the argument.
219409
219409
  */
219410
- description: z8.optional(z8.string()),
219410
+ description: z3.optional(z3.string()),
219411
219411
  /**
219412
219412
  * Whether this argument must be provided.
219413
219413
  */
219414
- required: z8.optional(z8.boolean())
219414
+ required: z3.optional(z3.boolean())
219415
219415
  }).passthrough();
219416
219416
  PromptSchema = BaseMetadataSchema.extend({
219417
219417
  /**
219418
219418
  * An optional description of what this prompt provides
219419
219419
  */
219420
- description: z8.optional(z8.string()),
219420
+ description: z3.optional(z3.string()),
219421
219421
  /**
219422
219422
  * A list of arguments to use for templating the prompt.
219423
219423
  */
219424
- arguments: z8.optional(z8.array(PromptArgumentSchema)),
219424
+ arguments: z3.optional(z3.array(PromptArgumentSchema)),
219425
219425
  /**
219426
219426
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
219427
219427
  * for notes on _meta usage.
219428
219428
  */
219429
- _meta: z8.optional(z8.object({}).passthrough())
219429
+ _meta: z3.optional(z3.object({}).passthrough())
219430
219430
  }).merge(IconsSchema);
219431
219431
  ListPromptsRequestSchema = PaginatedRequestSchema.extend({
219432
- method: z8.literal("prompts/list")
219432
+ method: z3.literal("prompts/list")
219433
219433
  });
219434
219434
  ListPromptsResultSchema = PaginatedResultSchema.extend({
219435
- prompts: z8.array(PromptSchema)
219435
+ prompts: z3.array(PromptSchema)
219436
219436
  });
219437
219437
  GetPromptRequestSchema = RequestSchema.extend({
219438
- method: z8.literal("prompts/get"),
219438
+ method: z3.literal("prompts/get"),
219439
219439
  params: BaseRequestParamsSchema.extend({
219440
219440
  /**
219441
219441
  * The name of the prompt or prompt template.
219442
219442
  */
219443
- name: z8.string(),
219443
+ name: z3.string(),
219444
219444
  /**
219445
219445
  * Arguments to use for templating the prompt.
219446
219446
  */
219447
- arguments: z8.optional(z8.record(z8.string()))
219447
+ arguments: z3.optional(z3.record(z3.string()))
219448
219448
  })
219449
219449
  });
219450
- TextContentSchema = z8.object({
219451
- type: z8.literal("text"),
219450
+ TextContentSchema = z3.object({
219451
+ type: z3.literal("text"),
219452
219452
  /**
219453
219453
  * The text content of the message.
219454
219454
  */
219455
- text: z8.string(),
219455
+ text: z3.string(),
219456
219456
  /**
219457
219457
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
219458
219458
  * for notes on _meta usage.
219459
219459
  */
219460
- _meta: z8.optional(z8.object({}).passthrough())
219460
+ _meta: z3.optional(z3.object({}).passthrough())
219461
219461
  }).passthrough();
219462
- ImageContentSchema = z8.object({
219463
- type: z8.literal("image"),
219462
+ ImageContentSchema = z3.object({
219463
+ type: z3.literal("image"),
219464
219464
  /**
219465
219465
  * The base64-encoded image data.
219466
219466
  */
@@ -219468,15 +219468,15 @@ var init_types2 = __esm({
219468
219468
  /**
219469
219469
  * The MIME type of the image. Different providers may support different image types.
219470
219470
  */
219471
- mimeType: z8.string(),
219471
+ mimeType: z3.string(),
219472
219472
  /**
219473
219473
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
219474
219474
  * for notes on _meta usage.
219475
219475
  */
219476
- _meta: z8.optional(z8.object({}).passthrough())
219476
+ _meta: z3.optional(z3.object({}).passthrough())
219477
219477
  }).passthrough();
219478
- AudioContentSchema = z8.object({
219479
- type: z8.literal("audio"),
219478
+ AudioContentSchema = z3.object({
219479
+ type: z3.literal("audio"),
219480
219480
  /**
219481
219481
  * The base64-encoded audio data.
219482
219482
  */
@@ -219484,57 +219484,57 @@ var init_types2 = __esm({
219484
219484
  /**
219485
219485
  * The MIME type of the audio. Different providers may support different audio types.
219486
219486
  */
219487
- mimeType: z8.string(),
219487
+ mimeType: z3.string(),
219488
219488
  /**
219489
219489
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
219490
219490
  * for notes on _meta usage.
219491
219491
  */
219492
- _meta: z8.optional(z8.object({}).passthrough())
219492
+ _meta: z3.optional(z3.object({}).passthrough())
219493
219493
  }).passthrough();
219494
- EmbeddedResourceSchema = z8.object({
219495
- type: z8.literal("resource"),
219496
- resource: z8.union([TextResourceContentsSchema, BlobResourceContentsSchema]),
219494
+ EmbeddedResourceSchema = z3.object({
219495
+ type: z3.literal("resource"),
219496
+ resource: z3.union([TextResourceContentsSchema, BlobResourceContentsSchema]),
219497
219497
  /**
219498
219498
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
219499
219499
  * for notes on _meta usage.
219500
219500
  */
219501
- _meta: z8.optional(z8.object({}).passthrough())
219501
+ _meta: z3.optional(z3.object({}).passthrough())
219502
219502
  }).passthrough();
219503
219503
  ResourceLinkSchema = ResourceSchema.extend({
219504
- type: z8.literal("resource_link")
219504
+ type: z3.literal("resource_link")
219505
219505
  });
219506
- ContentBlockSchema = z8.union([
219506
+ ContentBlockSchema = z3.union([
219507
219507
  TextContentSchema,
219508
219508
  ImageContentSchema,
219509
219509
  AudioContentSchema,
219510
219510
  ResourceLinkSchema,
219511
219511
  EmbeddedResourceSchema
219512
219512
  ]);
219513
- PromptMessageSchema = z8.object({
219514
- role: z8.enum(["user", "assistant"]),
219513
+ PromptMessageSchema = z3.object({
219514
+ role: z3.enum(["user", "assistant"]),
219515
219515
  content: ContentBlockSchema
219516
219516
  }).passthrough();
219517
219517
  GetPromptResultSchema = ResultSchema.extend({
219518
219518
  /**
219519
219519
  * An optional description for the prompt.
219520
219520
  */
219521
- description: z8.optional(z8.string()),
219522
- messages: z8.array(PromptMessageSchema)
219521
+ description: z3.optional(z3.string()),
219522
+ messages: z3.array(PromptMessageSchema)
219523
219523
  });
219524
219524
  PromptListChangedNotificationSchema = NotificationSchema.extend({
219525
- method: z8.literal("notifications/prompts/list_changed")
219525
+ method: z3.literal("notifications/prompts/list_changed")
219526
219526
  });
219527
- ToolAnnotationsSchema = z8.object({
219527
+ ToolAnnotationsSchema = z3.object({
219528
219528
  /**
219529
219529
  * A human-readable title for the tool.
219530
219530
  */
219531
- title: z8.optional(z8.string()),
219531
+ title: z3.optional(z3.string()),
219532
219532
  /**
219533
219533
  * If true, the tool does not modify its environment.
219534
219534
  *
219535
219535
  * Default: false
219536
219536
  */
219537
- readOnlyHint: z8.optional(z8.boolean()),
219537
+ readOnlyHint: z3.optional(z3.boolean()),
219538
219538
  /**
219539
219539
  * If true, the tool may perform destructive updates to its environment.
219540
219540
  * If false, the tool performs only additive updates.
@@ -219543,7 +219543,7 @@ var init_types2 = __esm({
219543
219543
  *
219544
219544
  * Default: true
219545
219545
  */
219546
- destructiveHint: z8.optional(z8.boolean()),
219546
+ destructiveHint: z3.optional(z3.boolean()),
219547
219547
  /**
219548
219548
  * If true, calling the tool repeatedly with the same arguments
219549
219549
  * will have no additional effect on the its environment.
@@ -219552,7 +219552,7 @@ var init_types2 = __esm({
219552
219552
  *
219553
219553
  * Default: false
219554
219554
  */
219555
- idempotentHint: z8.optional(z8.boolean()),
219555
+ idempotentHint: z3.optional(z3.boolean()),
219556
219556
  /**
219557
219557
  * If true, this tool may interact with an "open world" of external
219558
219558
  * entities. If false, the tool's domain of interaction is closed.
@@ -219561,45 +219561,45 @@ var init_types2 = __esm({
219561
219561
  *
219562
219562
  * Default: true
219563
219563
  */
219564
- openWorldHint: z8.optional(z8.boolean())
219564
+ openWorldHint: z3.optional(z3.boolean())
219565
219565
  }).passthrough();
219566
219566
  ToolSchema = BaseMetadataSchema.extend({
219567
219567
  /**
219568
219568
  * A human-readable description of the tool.
219569
219569
  */
219570
- description: z8.optional(z8.string()),
219570
+ description: z3.optional(z3.string()),
219571
219571
  /**
219572
219572
  * A JSON Schema object defining the expected parameters for the tool.
219573
219573
  */
219574
- inputSchema: z8.object({
219575
- type: z8.literal("object"),
219576
- properties: z8.optional(z8.object({}).passthrough()),
219577
- required: z8.optional(z8.array(z8.string()))
219574
+ inputSchema: z3.object({
219575
+ type: z3.literal("object"),
219576
+ properties: z3.optional(z3.object({}).passthrough()),
219577
+ required: z3.optional(z3.array(z3.string()))
219578
219578
  }).passthrough(),
219579
219579
  /**
219580
219580
  * An optional JSON Schema object defining the structure of the tool's output returned in
219581
219581
  * the structuredContent field of a CallToolResult.
219582
219582
  */
219583
- outputSchema: z8.optional(z8.object({
219584
- type: z8.literal("object"),
219585
- properties: z8.optional(z8.object({}).passthrough()),
219586
- required: z8.optional(z8.array(z8.string()))
219583
+ outputSchema: z3.optional(z3.object({
219584
+ type: z3.literal("object"),
219585
+ properties: z3.optional(z3.object({}).passthrough()),
219586
+ required: z3.optional(z3.array(z3.string()))
219587
219587
  }).passthrough()),
219588
219588
  /**
219589
219589
  * Optional additional tool information.
219590
219590
  */
219591
- annotations: z8.optional(ToolAnnotationsSchema),
219591
+ annotations: z3.optional(ToolAnnotationsSchema),
219592
219592
  /**
219593
219593
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
219594
219594
  * for notes on _meta usage.
219595
219595
  */
219596
- _meta: z8.optional(z8.object({}).passthrough())
219596
+ _meta: z3.optional(z3.object({}).passthrough())
219597
219597
  }).merge(IconsSchema);
219598
219598
  ListToolsRequestSchema = PaginatedRequestSchema.extend({
219599
- method: z8.literal("tools/list")
219599
+ method: z3.literal("tools/list")
219600
219600
  });
219601
219601
  ListToolsResultSchema = PaginatedResultSchema.extend({
219602
- tools: z8.array(ToolSchema)
219602
+ tools: z3.array(ToolSchema)
219603
219603
  });
219604
219604
  CallToolResultSchema = ResultSchema.extend({
219605
219605
  /**
@@ -219608,13 +219608,13 @@ var init_types2 = __esm({
219608
219608
  * If the Tool does not define an outputSchema, this field MUST be present in the result.
219609
219609
  * For backwards compatibility, this field is always present, but it may be empty.
219610
219610
  */
219611
- content: z8.array(ContentBlockSchema).default([]),
219611
+ content: z3.array(ContentBlockSchema).default([]),
219612
219612
  /**
219613
219613
  * An object containing structured tool output.
219614
219614
  *
219615
219615
  * If the Tool defines an outputSchema, this field MUST be present in the result, and contain a JSON object that matches the schema.
219616
219616
  */
219617
- structuredContent: z8.object({}).passthrough().optional(),
219617
+ structuredContent: z3.object({}).passthrough().optional(),
219618
219618
  /**
219619
219619
  * Whether the tool call ended in an error.
219620
219620
  *
@@ -219629,24 +219629,24 @@ var init_types2 = __esm({
219629
219629
  * server does not support tool calls, or any other exceptional conditions,
219630
219630
  * should be reported as an MCP error response.
219631
219631
  */
219632
- isError: z8.optional(z8.boolean())
219632
+ isError: z3.optional(z3.boolean())
219633
219633
  });
219634
219634
  CompatibilityCallToolResultSchema = CallToolResultSchema.or(ResultSchema.extend({
219635
- toolResult: z8.unknown()
219635
+ toolResult: z3.unknown()
219636
219636
  }));
219637
219637
  CallToolRequestSchema = RequestSchema.extend({
219638
- method: z8.literal("tools/call"),
219638
+ method: z3.literal("tools/call"),
219639
219639
  params: BaseRequestParamsSchema.extend({
219640
- name: z8.string(),
219641
- arguments: z8.optional(z8.record(z8.unknown()))
219640
+ name: z3.string(),
219641
+ arguments: z3.optional(z3.record(z3.unknown()))
219642
219642
  })
219643
219643
  });
219644
219644
  ToolListChangedNotificationSchema = NotificationSchema.extend({
219645
- method: z8.literal("notifications/tools/list_changed")
219645
+ method: z3.literal("notifications/tools/list_changed")
219646
219646
  });
219647
- LoggingLevelSchema = z8.enum(["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"]);
219647
+ LoggingLevelSchema = z3.enum(["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"]);
219648
219648
  SetLevelRequestSchema = RequestSchema.extend({
219649
- method: z8.literal("logging/setLevel"),
219649
+ method: z3.literal("logging/setLevel"),
219650
219650
  params: BaseRequestParamsSchema.extend({
219651
219651
  /**
219652
219652
  * The level of logging that the client wants to receive from the server. The server should send all logs at this level and higher (i.e., more severe) to the client as notifications/logging/message.
@@ -219655,7 +219655,7 @@ var init_types2 = __esm({
219655
219655
  })
219656
219656
  });
219657
219657
  LoggingMessageNotificationSchema = NotificationSchema.extend({
219658
- method: z8.literal("notifications/message"),
219658
+ method: z3.literal("notifications/message"),
219659
219659
  params: BaseNotificationParamsSchema.extend({
219660
219660
  /**
219661
219661
  * The severity of this log message.
@@ -219664,124 +219664,124 @@ var init_types2 = __esm({
219664
219664
  /**
219665
219665
  * An optional name of the logger issuing this message.
219666
219666
  */
219667
- logger: z8.optional(z8.string()),
219667
+ logger: z3.optional(z3.string()),
219668
219668
  /**
219669
219669
  * The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here.
219670
219670
  */
219671
- data: z8.unknown()
219671
+ data: z3.unknown()
219672
219672
  })
219673
219673
  });
219674
- ModelHintSchema = z8.object({
219674
+ ModelHintSchema = z3.object({
219675
219675
  /**
219676
219676
  * A hint for a model name.
219677
219677
  */
219678
- name: z8.string().optional()
219678
+ name: z3.string().optional()
219679
219679
  }).passthrough();
219680
- ModelPreferencesSchema = z8.object({
219680
+ ModelPreferencesSchema = z3.object({
219681
219681
  /**
219682
219682
  * Optional hints to use for model selection.
219683
219683
  */
219684
- hints: z8.optional(z8.array(ModelHintSchema)),
219684
+ hints: z3.optional(z3.array(ModelHintSchema)),
219685
219685
  /**
219686
219686
  * How much to prioritize cost when selecting a model.
219687
219687
  */
219688
- costPriority: z8.optional(z8.number().min(0).max(1)),
219688
+ costPriority: z3.optional(z3.number().min(0).max(1)),
219689
219689
  /**
219690
219690
  * How much to prioritize sampling speed (latency) when selecting a model.
219691
219691
  */
219692
- speedPriority: z8.optional(z8.number().min(0).max(1)),
219692
+ speedPriority: z3.optional(z3.number().min(0).max(1)),
219693
219693
  /**
219694
219694
  * How much to prioritize intelligence and capabilities when selecting a model.
219695
219695
  */
219696
- intelligencePriority: z8.optional(z8.number().min(0).max(1))
219696
+ intelligencePriority: z3.optional(z3.number().min(0).max(1))
219697
219697
  }).passthrough();
219698
- SamplingMessageSchema = z8.object({
219699
- role: z8.enum(["user", "assistant"]),
219700
- content: z8.union([TextContentSchema, ImageContentSchema, AudioContentSchema])
219698
+ SamplingMessageSchema = z3.object({
219699
+ role: z3.enum(["user", "assistant"]),
219700
+ content: z3.union([TextContentSchema, ImageContentSchema, AudioContentSchema])
219701
219701
  }).passthrough();
219702
219702
  CreateMessageRequestSchema = RequestSchema.extend({
219703
- method: z8.literal("sampling/createMessage"),
219703
+ method: z3.literal("sampling/createMessage"),
219704
219704
  params: BaseRequestParamsSchema.extend({
219705
- messages: z8.array(SamplingMessageSchema),
219705
+ messages: z3.array(SamplingMessageSchema),
219706
219706
  /**
219707
219707
  * An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt.
219708
219708
  */
219709
- systemPrompt: z8.optional(z8.string()),
219709
+ systemPrompt: z3.optional(z3.string()),
219710
219710
  /**
219711
219711
  * A request to include context from one or more MCP servers (including the caller), to be attached to the prompt. The client MAY ignore this request.
219712
219712
  */
219713
- includeContext: z8.optional(z8.enum(["none", "thisServer", "allServers"])),
219714
- temperature: z8.optional(z8.number()),
219713
+ includeContext: z3.optional(z3.enum(["none", "thisServer", "allServers"])),
219714
+ temperature: z3.optional(z3.number()),
219715
219715
  /**
219716
219716
  * The maximum number of tokens to sample, as requested by the server. The client MAY choose to sample fewer tokens than requested.
219717
219717
  */
219718
- maxTokens: z8.number().int(),
219719
- stopSequences: z8.optional(z8.array(z8.string())),
219718
+ maxTokens: z3.number().int(),
219719
+ stopSequences: z3.optional(z3.array(z3.string())),
219720
219720
  /**
219721
219721
  * Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific.
219722
219722
  */
219723
- metadata: z8.optional(z8.object({}).passthrough()),
219723
+ metadata: z3.optional(z3.object({}).passthrough()),
219724
219724
  /**
219725
219725
  * The server's preferences for which model to select.
219726
219726
  */
219727
- modelPreferences: z8.optional(ModelPreferencesSchema)
219727
+ modelPreferences: z3.optional(ModelPreferencesSchema)
219728
219728
  })
219729
219729
  });
219730
219730
  CreateMessageResultSchema = ResultSchema.extend({
219731
219731
  /**
219732
219732
  * The name of the model that generated the message.
219733
219733
  */
219734
- model: z8.string(),
219734
+ model: z3.string(),
219735
219735
  /**
219736
219736
  * The reason why sampling stopped.
219737
219737
  */
219738
- stopReason: z8.optional(z8.enum(["endTurn", "stopSequence", "maxTokens"]).or(z8.string())),
219739
- role: z8.enum(["user", "assistant"]),
219740
- content: z8.discriminatedUnion("type", [TextContentSchema, ImageContentSchema, AudioContentSchema])
219738
+ stopReason: z3.optional(z3.enum(["endTurn", "stopSequence", "maxTokens"]).or(z3.string())),
219739
+ role: z3.enum(["user", "assistant"]),
219740
+ content: z3.discriminatedUnion("type", [TextContentSchema, ImageContentSchema, AudioContentSchema])
219741
219741
  });
219742
- BooleanSchemaSchema = z8.object({
219743
- type: z8.literal("boolean"),
219744
- title: z8.optional(z8.string()),
219745
- description: z8.optional(z8.string()),
219746
- default: z8.optional(z8.boolean())
219742
+ BooleanSchemaSchema = z3.object({
219743
+ type: z3.literal("boolean"),
219744
+ title: z3.optional(z3.string()),
219745
+ description: z3.optional(z3.string()),
219746
+ default: z3.optional(z3.boolean())
219747
219747
  }).passthrough();
219748
- StringSchemaSchema = z8.object({
219749
- type: z8.literal("string"),
219750
- title: z8.optional(z8.string()),
219751
- description: z8.optional(z8.string()),
219752
- minLength: z8.optional(z8.number()),
219753
- maxLength: z8.optional(z8.number()),
219754
- format: z8.optional(z8.enum(["email", "uri", "date", "date-time"]))
219748
+ StringSchemaSchema = z3.object({
219749
+ type: z3.literal("string"),
219750
+ title: z3.optional(z3.string()),
219751
+ description: z3.optional(z3.string()),
219752
+ minLength: z3.optional(z3.number()),
219753
+ maxLength: z3.optional(z3.number()),
219754
+ format: z3.optional(z3.enum(["email", "uri", "date", "date-time"]))
219755
219755
  }).passthrough();
219756
- NumberSchemaSchema = z8.object({
219757
- type: z8.enum(["number", "integer"]),
219758
- title: z8.optional(z8.string()),
219759
- description: z8.optional(z8.string()),
219760
- minimum: z8.optional(z8.number()),
219761
- maximum: z8.optional(z8.number())
219756
+ NumberSchemaSchema = z3.object({
219757
+ type: z3.enum(["number", "integer"]),
219758
+ title: z3.optional(z3.string()),
219759
+ description: z3.optional(z3.string()),
219760
+ minimum: z3.optional(z3.number()),
219761
+ maximum: z3.optional(z3.number())
219762
219762
  }).passthrough();
219763
- EnumSchemaSchema = z8.object({
219764
- type: z8.literal("string"),
219765
- title: z8.optional(z8.string()),
219766
- description: z8.optional(z8.string()),
219767
- enum: z8.array(z8.string()),
219768
- enumNames: z8.optional(z8.array(z8.string()))
219763
+ EnumSchemaSchema = z3.object({
219764
+ type: z3.literal("string"),
219765
+ title: z3.optional(z3.string()),
219766
+ description: z3.optional(z3.string()),
219767
+ enum: z3.array(z3.string()),
219768
+ enumNames: z3.optional(z3.array(z3.string()))
219769
219769
  }).passthrough();
219770
- PrimitiveSchemaDefinitionSchema = z8.union([BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema, EnumSchemaSchema]);
219770
+ PrimitiveSchemaDefinitionSchema = z3.union([BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema, EnumSchemaSchema]);
219771
219771
  ElicitRequestSchema = RequestSchema.extend({
219772
- method: z8.literal("elicitation/create"),
219772
+ method: z3.literal("elicitation/create"),
219773
219773
  params: BaseRequestParamsSchema.extend({
219774
219774
  /**
219775
219775
  * The message to present to the user.
219776
219776
  */
219777
- message: z8.string(),
219777
+ message: z3.string(),
219778
219778
  /**
219779
219779
  * The schema for the requested user input.
219780
219780
  */
219781
- requestedSchema: z8.object({
219782
- type: z8.literal("object"),
219783
- properties: z8.record(z8.string(), PrimitiveSchemaDefinitionSchema),
219784
- required: z8.optional(z8.array(z8.string()))
219781
+ requestedSchema: z3.object({
219782
+ type: z3.literal("object"),
219783
+ properties: z3.record(z3.string(), PrimitiveSchemaDefinitionSchema),
219784
+ required: z3.optional(z3.array(z3.string()))
219785
219785
  }).passthrough()
219786
219786
  })
219787
219787
  });
@@ -219789,92 +219789,92 @@ var init_types2 = __esm({
219789
219789
  /**
219790
219790
  * The user's response action.
219791
219791
  */
219792
- action: z8.enum(["accept", "decline", "cancel"]),
219792
+ action: z3.enum(["accept", "decline", "cancel"]),
219793
219793
  /**
219794
219794
  * The collected user input content (only present if action is "accept").
219795
219795
  */
219796
- content: z8.optional(z8.record(z8.string(), z8.unknown()))
219796
+ content: z3.optional(z3.record(z3.string(), z3.unknown()))
219797
219797
  });
219798
- ResourceTemplateReferenceSchema = z8.object({
219799
- type: z8.literal("ref/resource"),
219798
+ ResourceTemplateReferenceSchema = z3.object({
219799
+ type: z3.literal("ref/resource"),
219800
219800
  /**
219801
219801
  * The URI or URI template of the resource.
219802
219802
  */
219803
- uri: z8.string()
219803
+ uri: z3.string()
219804
219804
  }).passthrough();
219805
- PromptReferenceSchema = z8.object({
219806
- type: z8.literal("ref/prompt"),
219805
+ PromptReferenceSchema = z3.object({
219806
+ type: z3.literal("ref/prompt"),
219807
219807
  /**
219808
219808
  * The name of the prompt or prompt template
219809
219809
  */
219810
- name: z8.string()
219810
+ name: z3.string()
219811
219811
  }).passthrough();
219812
219812
  CompleteRequestSchema = RequestSchema.extend({
219813
- method: z8.literal("completion/complete"),
219813
+ method: z3.literal("completion/complete"),
219814
219814
  params: BaseRequestParamsSchema.extend({
219815
- ref: z8.union([PromptReferenceSchema, ResourceTemplateReferenceSchema]),
219815
+ ref: z3.union([PromptReferenceSchema, ResourceTemplateReferenceSchema]),
219816
219816
  /**
219817
219817
  * The argument's information
219818
219818
  */
219819
- argument: z8.object({
219819
+ argument: z3.object({
219820
219820
  /**
219821
219821
  * The name of the argument
219822
219822
  */
219823
- name: z8.string(),
219823
+ name: z3.string(),
219824
219824
  /**
219825
219825
  * The value of the argument to use for completion matching.
219826
219826
  */
219827
- value: z8.string()
219827
+ value: z3.string()
219828
219828
  }).passthrough(),
219829
- context: z8.optional(z8.object({
219829
+ context: z3.optional(z3.object({
219830
219830
  /**
219831
219831
  * Previously-resolved variables in a URI template or prompt.
219832
219832
  */
219833
- arguments: z8.optional(z8.record(z8.string(), z8.string()))
219833
+ arguments: z3.optional(z3.record(z3.string(), z3.string()))
219834
219834
  }))
219835
219835
  })
219836
219836
  });
219837
219837
  CompleteResultSchema = ResultSchema.extend({
219838
- completion: z8.object({
219838
+ completion: z3.object({
219839
219839
  /**
219840
219840
  * An array of completion values. Must not exceed 100 items.
219841
219841
  */
219842
- values: z8.array(z8.string()).max(100),
219842
+ values: z3.array(z3.string()).max(100),
219843
219843
  /**
219844
219844
  * The total number of completion options available. This can exceed the number of values actually sent in the response.
219845
219845
  */
219846
- total: z8.optional(z8.number().int()),
219846
+ total: z3.optional(z3.number().int()),
219847
219847
  /**
219848
219848
  * Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown.
219849
219849
  */
219850
- hasMore: z8.optional(z8.boolean())
219850
+ hasMore: z3.optional(z3.boolean())
219851
219851
  }).passthrough()
219852
219852
  });
219853
- RootSchema = z8.object({
219853
+ RootSchema = z3.object({
219854
219854
  /**
219855
219855
  * The URI identifying the root. This *must* start with file:// for now.
219856
219856
  */
219857
- uri: z8.string().startsWith("file://"),
219857
+ uri: z3.string().startsWith("file://"),
219858
219858
  /**
219859
219859
  * An optional name for the root.
219860
219860
  */
219861
- name: z8.optional(z8.string()),
219861
+ name: z3.optional(z3.string()),
219862
219862
  /**
219863
219863
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
219864
219864
  * for notes on _meta usage.
219865
219865
  */
219866
- _meta: z8.optional(z8.object({}).passthrough())
219866
+ _meta: z3.optional(z3.object({}).passthrough())
219867
219867
  }).passthrough();
219868
219868
  ListRootsRequestSchema = RequestSchema.extend({
219869
- method: z8.literal("roots/list")
219869
+ method: z3.literal("roots/list")
219870
219870
  });
219871
219871
  ListRootsResultSchema = ResultSchema.extend({
219872
- roots: z8.array(RootSchema)
219872
+ roots: z3.array(RootSchema)
219873
219873
  });
219874
219874
  RootsListChangedNotificationSchema = NotificationSchema.extend({
219875
- method: z8.literal("notifications/roots/list_changed")
219875
+ method: z3.literal("notifications/roots/list_changed")
219876
219876
  });
219877
- ClientRequestSchema = z8.union([
219877
+ ClientRequestSchema = z3.union([
219878
219878
  PingRequestSchema,
219879
219879
  InitializeRequestSchema,
219880
219880
  CompleteRequestSchema,
@@ -219889,15 +219889,15 @@ var init_types2 = __esm({
219889
219889
  CallToolRequestSchema,
219890
219890
  ListToolsRequestSchema
219891
219891
  ]);
219892
- ClientNotificationSchema = z8.union([
219892
+ ClientNotificationSchema = z3.union([
219893
219893
  CancelledNotificationSchema,
219894
219894
  ProgressNotificationSchema,
219895
219895
  InitializedNotificationSchema,
219896
219896
  RootsListChangedNotificationSchema
219897
219897
  ]);
219898
- ClientResultSchema = z8.union([EmptyResultSchema, CreateMessageResultSchema, ElicitResultSchema, ListRootsResultSchema]);
219899
- ServerRequestSchema = z8.union([PingRequestSchema, CreateMessageRequestSchema, ElicitRequestSchema, ListRootsRequestSchema]);
219900
- ServerNotificationSchema = z8.union([
219898
+ ClientResultSchema = z3.union([EmptyResultSchema, CreateMessageResultSchema, ElicitResultSchema, ListRootsResultSchema]);
219899
+ ServerRequestSchema = z3.union([PingRequestSchema, CreateMessageRequestSchema, ElicitRequestSchema, ListRootsRequestSchema]);
219900
+ ServerNotificationSchema = z3.union([
219901
219901
  CancelledNotificationSchema,
219902
219902
  ProgressNotificationSchema,
219903
219903
  LoggingMessageNotificationSchema,
@@ -219906,7 +219906,7 @@ var init_types2 = __esm({
219906
219906
  ToolListChangedNotificationSchema,
219907
219907
  PromptListChangedNotificationSchema
219908
219908
  ]);
219909
- ServerResultSchema = z8.union([
219909
+ ServerResultSchema = z3.union([
219910
219910
  EmptyResultSchema,
219911
219911
  InitializeResultSchema,
219912
219912
  CompleteResultSchema,
@@ -219922,148 +219922,148 @@ var init_types2 = __esm({
219922
219922
  });
219923
219923
 
219924
219924
  // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.21.0/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js
219925
- import { z as z9 } from "zod";
219925
+ import { z as z4 } from "zod";
219926
219926
  var SafeUrlSchema, OAuthProtectedResourceMetadataSchema, OAuthMetadataSchema, OpenIdProviderMetadataSchema, OpenIdProviderDiscoveryMetadataSchema, OAuthTokensSchema, OAuthErrorResponseSchema, OptionalSafeUrlSchema, OAuthClientMetadataSchema, OAuthClientInformationSchema, OAuthClientInformationFullSchema, OAuthClientRegistrationErrorSchema, OAuthTokenRevocationRequestSchema;
219927
219927
  var init_auth = __esm({
219928
219928
  "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.21.0/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js"() {
219929
219929
  "use strict";
219930
219930
  init_esm_shims();
219931
- SafeUrlSchema = z9.string().url().superRefine((val, ctx) => {
219931
+ SafeUrlSchema = z4.string().url().superRefine((val, ctx) => {
219932
219932
  if (!URL.canParse(val)) {
219933
219933
  ctx.addIssue({
219934
- code: z9.ZodIssueCode.custom,
219934
+ code: z4.ZodIssueCode.custom,
219935
219935
  message: "URL must be parseable",
219936
219936
  fatal: true
219937
219937
  });
219938
- return z9.NEVER;
219938
+ return z4.NEVER;
219939
219939
  }
219940
219940
  }).refine((url) => {
219941
219941
  const u2 = new URL(url);
219942
219942
  return u2.protocol !== "javascript:" && u2.protocol !== "data:" && u2.protocol !== "vbscript:";
219943
219943
  }, { message: "URL cannot use javascript:, data:, or vbscript: scheme" });
219944
- OAuthProtectedResourceMetadataSchema = z9.object({
219945
- resource: z9.string().url(),
219946
- authorization_servers: z9.array(SafeUrlSchema).optional(),
219947
- jwks_uri: z9.string().url().optional(),
219948
- scopes_supported: z9.array(z9.string()).optional(),
219949
- bearer_methods_supported: z9.array(z9.string()).optional(),
219950
- resource_signing_alg_values_supported: z9.array(z9.string()).optional(),
219951
- resource_name: z9.string().optional(),
219952
- resource_documentation: z9.string().optional(),
219953
- resource_policy_uri: z9.string().url().optional(),
219954
- resource_tos_uri: z9.string().url().optional(),
219955
- tls_client_certificate_bound_access_tokens: z9.boolean().optional(),
219956
- authorization_details_types_supported: z9.array(z9.string()).optional(),
219957
- dpop_signing_alg_values_supported: z9.array(z9.string()).optional(),
219958
- dpop_bound_access_tokens_required: z9.boolean().optional()
219944
+ OAuthProtectedResourceMetadataSchema = z4.object({
219945
+ resource: z4.string().url(),
219946
+ authorization_servers: z4.array(SafeUrlSchema).optional(),
219947
+ jwks_uri: z4.string().url().optional(),
219948
+ scopes_supported: z4.array(z4.string()).optional(),
219949
+ bearer_methods_supported: z4.array(z4.string()).optional(),
219950
+ resource_signing_alg_values_supported: z4.array(z4.string()).optional(),
219951
+ resource_name: z4.string().optional(),
219952
+ resource_documentation: z4.string().optional(),
219953
+ resource_policy_uri: z4.string().url().optional(),
219954
+ resource_tos_uri: z4.string().url().optional(),
219955
+ tls_client_certificate_bound_access_tokens: z4.boolean().optional(),
219956
+ authorization_details_types_supported: z4.array(z4.string()).optional(),
219957
+ dpop_signing_alg_values_supported: z4.array(z4.string()).optional(),
219958
+ dpop_bound_access_tokens_required: z4.boolean().optional()
219959
219959
  }).passthrough();
219960
- OAuthMetadataSchema = z9.object({
219961
- issuer: z9.string(),
219960
+ OAuthMetadataSchema = z4.object({
219961
+ issuer: z4.string(),
219962
219962
  authorization_endpoint: SafeUrlSchema,
219963
219963
  token_endpoint: SafeUrlSchema,
219964
219964
  registration_endpoint: SafeUrlSchema.optional(),
219965
- scopes_supported: z9.array(z9.string()).optional(),
219966
- response_types_supported: z9.array(z9.string()),
219967
- response_modes_supported: z9.array(z9.string()).optional(),
219968
- grant_types_supported: z9.array(z9.string()).optional(),
219969
- token_endpoint_auth_methods_supported: z9.array(z9.string()).optional(),
219970
- token_endpoint_auth_signing_alg_values_supported: z9.array(z9.string()).optional(),
219965
+ scopes_supported: z4.array(z4.string()).optional(),
219966
+ response_types_supported: z4.array(z4.string()),
219967
+ response_modes_supported: z4.array(z4.string()).optional(),
219968
+ grant_types_supported: z4.array(z4.string()).optional(),
219969
+ token_endpoint_auth_methods_supported: z4.array(z4.string()).optional(),
219970
+ token_endpoint_auth_signing_alg_values_supported: z4.array(z4.string()).optional(),
219971
219971
  service_documentation: SafeUrlSchema.optional(),
219972
219972
  revocation_endpoint: SafeUrlSchema.optional(),
219973
- revocation_endpoint_auth_methods_supported: z9.array(z9.string()).optional(),
219974
- revocation_endpoint_auth_signing_alg_values_supported: z9.array(z9.string()).optional(),
219975
- introspection_endpoint: z9.string().optional(),
219976
- introspection_endpoint_auth_methods_supported: z9.array(z9.string()).optional(),
219977
- introspection_endpoint_auth_signing_alg_values_supported: z9.array(z9.string()).optional(),
219978
- code_challenge_methods_supported: z9.array(z9.string()).optional()
219973
+ revocation_endpoint_auth_methods_supported: z4.array(z4.string()).optional(),
219974
+ revocation_endpoint_auth_signing_alg_values_supported: z4.array(z4.string()).optional(),
219975
+ introspection_endpoint: z4.string().optional(),
219976
+ introspection_endpoint_auth_methods_supported: z4.array(z4.string()).optional(),
219977
+ introspection_endpoint_auth_signing_alg_values_supported: z4.array(z4.string()).optional(),
219978
+ code_challenge_methods_supported: z4.array(z4.string()).optional()
219979
219979
  }).passthrough();
219980
- OpenIdProviderMetadataSchema = z9.object({
219981
- issuer: z9.string(),
219980
+ OpenIdProviderMetadataSchema = z4.object({
219981
+ issuer: z4.string(),
219982
219982
  authorization_endpoint: SafeUrlSchema,
219983
219983
  token_endpoint: SafeUrlSchema,
219984
219984
  userinfo_endpoint: SafeUrlSchema.optional(),
219985
219985
  jwks_uri: SafeUrlSchema,
219986
219986
  registration_endpoint: SafeUrlSchema.optional(),
219987
- scopes_supported: z9.array(z9.string()).optional(),
219988
- response_types_supported: z9.array(z9.string()),
219989
- response_modes_supported: z9.array(z9.string()).optional(),
219990
- grant_types_supported: z9.array(z9.string()).optional(),
219991
- acr_values_supported: z9.array(z9.string()).optional(),
219992
- subject_types_supported: z9.array(z9.string()),
219993
- id_token_signing_alg_values_supported: z9.array(z9.string()),
219994
- id_token_encryption_alg_values_supported: z9.array(z9.string()).optional(),
219995
- id_token_encryption_enc_values_supported: z9.array(z9.string()).optional(),
219996
- userinfo_signing_alg_values_supported: z9.array(z9.string()).optional(),
219997
- userinfo_encryption_alg_values_supported: z9.array(z9.string()).optional(),
219998
- userinfo_encryption_enc_values_supported: z9.array(z9.string()).optional(),
219999
- request_object_signing_alg_values_supported: z9.array(z9.string()).optional(),
220000
- request_object_encryption_alg_values_supported: z9.array(z9.string()).optional(),
220001
- request_object_encryption_enc_values_supported: z9.array(z9.string()).optional(),
220002
- token_endpoint_auth_methods_supported: z9.array(z9.string()).optional(),
220003
- token_endpoint_auth_signing_alg_values_supported: z9.array(z9.string()).optional(),
220004
- display_values_supported: z9.array(z9.string()).optional(),
220005
- claim_types_supported: z9.array(z9.string()).optional(),
220006
- claims_supported: z9.array(z9.string()).optional(),
220007
- service_documentation: z9.string().optional(),
220008
- claims_locales_supported: z9.array(z9.string()).optional(),
220009
- ui_locales_supported: z9.array(z9.string()).optional(),
220010
- claims_parameter_supported: z9.boolean().optional(),
220011
- request_parameter_supported: z9.boolean().optional(),
220012
- request_uri_parameter_supported: z9.boolean().optional(),
220013
- require_request_uri_registration: z9.boolean().optional(),
219987
+ scopes_supported: z4.array(z4.string()).optional(),
219988
+ response_types_supported: z4.array(z4.string()),
219989
+ response_modes_supported: z4.array(z4.string()).optional(),
219990
+ grant_types_supported: z4.array(z4.string()).optional(),
219991
+ acr_values_supported: z4.array(z4.string()).optional(),
219992
+ subject_types_supported: z4.array(z4.string()),
219993
+ id_token_signing_alg_values_supported: z4.array(z4.string()),
219994
+ id_token_encryption_alg_values_supported: z4.array(z4.string()).optional(),
219995
+ id_token_encryption_enc_values_supported: z4.array(z4.string()).optional(),
219996
+ userinfo_signing_alg_values_supported: z4.array(z4.string()).optional(),
219997
+ userinfo_encryption_alg_values_supported: z4.array(z4.string()).optional(),
219998
+ userinfo_encryption_enc_values_supported: z4.array(z4.string()).optional(),
219999
+ request_object_signing_alg_values_supported: z4.array(z4.string()).optional(),
220000
+ request_object_encryption_alg_values_supported: z4.array(z4.string()).optional(),
220001
+ request_object_encryption_enc_values_supported: z4.array(z4.string()).optional(),
220002
+ token_endpoint_auth_methods_supported: z4.array(z4.string()).optional(),
220003
+ token_endpoint_auth_signing_alg_values_supported: z4.array(z4.string()).optional(),
220004
+ display_values_supported: z4.array(z4.string()).optional(),
220005
+ claim_types_supported: z4.array(z4.string()).optional(),
220006
+ claims_supported: z4.array(z4.string()).optional(),
220007
+ service_documentation: z4.string().optional(),
220008
+ claims_locales_supported: z4.array(z4.string()).optional(),
220009
+ ui_locales_supported: z4.array(z4.string()).optional(),
220010
+ claims_parameter_supported: z4.boolean().optional(),
220011
+ request_parameter_supported: z4.boolean().optional(),
220012
+ request_uri_parameter_supported: z4.boolean().optional(),
220013
+ require_request_uri_registration: z4.boolean().optional(),
220014
220014
  op_policy_uri: SafeUrlSchema.optional(),
220015
220015
  op_tos_uri: SafeUrlSchema.optional()
220016
220016
  }).passthrough();
220017
220017
  OpenIdProviderDiscoveryMetadataSchema = OpenIdProviderMetadataSchema.merge(OAuthMetadataSchema.pick({
220018
220018
  code_challenge_methods_supported: true
220019
220019
  }));
220020
- OAuthTokensSchema = z9.object({
220021
- access_token: z9.string(),
220022
- id_token: z9.string().optional(),
220020
+ OAuthTokensSchema = z4.object({
220021
+ access_token: z4.string(),
220022
+ id_token: z4.string().optional(),
220023
220023
  // Optional for OAuth 2.1, but necessary in OpenID Connect
220024
- token_type: z9.string(),
220025
- expires_in: z9.number().optional(),
220026
- scope: z9.string().optional(),
220027
- refresh_token: z9.string().optional()
220024
+ token_type: z4.string(),
220025
+ expires_in: z4.number().optional(),
220026
+ scope: z4.string().optional(),
220027
+ refresh_token: z4.string().optional()
220028
220028
  }).strip();
220029
- OAuthErrorResponseSchema = z9.object({
220030
- error: z9.string(),
220031
- error_description: z9.string().optional(),
220032
- error_uri: z9.string().optional()
220029
+ OAuthErrorResponseSchema = z4.object({
220030
+ error: z4.string(),
220031
+ error_description: z4.string().optional(),
220032
+ error_uri: z4.string().optional()
220033
220033
  });
220034
- OptionalSafeUrlSchema = SafeUrlSchema.optional().or(z9.literal("").transform(() => void 0));
220035
- OAuthClientMetadataSchema = z9.object({
220036
- redirect_uris: z9.array(SafeUrlSchema),
220037
- token_endpoint_auth_method: z9.string().optional(),
220038
- grant_types: z9.array(z9.string()).optional(),
220039
- response_types: z9.array(z9.string()).optional(),
220040
- client_name: z9.string().optional(),
220034
+ OptionalSafeUrlSchema = SafeUrlSchema.optional().or(z4.literal("").transform(() => void 0));
220035
+ OAuthClientMetadataSchema = z4.object({
220036
+ redirect_uris: z4.array(SafeUrlSchema),
220037
+ token_endpoint_auth_method: z4.string().optional(),
220038
+ grant_types: z4.array(z4.string()).optional(),
220039
+ response_types: z4.array(z4.string()).optional(),
220040
+ client_name: z4.string().optional(),
220041
220041
  client_uri: SafeUrlSchema.optional(),
220042
220042
  logo_uri: OptionalSafeUrlSchema,
220043
- scope: z9.string().optional(),
220044
- contacts: z9.array(z9.string()).optional(),
220043
+ scope: z4.string().optional(),
220044
+ contacts: z4.array(z4.string()).optional(),
220045
220045
  tos_uri: OptionalSafeUrlSchema,
220046
- policy_uri: z9.string().optional(),
220046
+ policy_uri: z4.string().optional(),
220047
220047
  jwks_uri: SafeUrlSchema.optional(),
220048
- jwks: z9.any().optional(),
220049
- software_id: z9.string().optional(),
220050
- software_version: z9.string().optional(),
220051
- software_statement: z9.string().optional()
220048
+ jwks: z4.any().optional(),
220049
+ software_id: z4.string().optional(),
220050
+ software_version: z4.string().optional(),
220051
+ software_statement: z4.string().optional()
220052
220052
  }).strip();
220053
- OAuthClientInformationSchema = z9.object({
220054
- client_id: z9.string(),
220055
- client_secret: z9.string().optional(),
220056
- client_id_issued_at: z9.number().optional(),
220057
- client_secret_expires_at: z9.number().optional()
220053
+ OAuthClientInformationSchema = z4.object({
220054
+ client_id: z4.string(),
220055
+ client_secret: z4.string().optional(),
220056
+ client_id_issued_at: z4.number().optional(),
220057
+ client_secret_expires_at: z4.number().optional()
220058
220058
  }).strip();
220059
220059
  OAuthClientInformationFullSchema = OAuthClientMetadataSchema.merge(OAuthClientInformationSchema);
220060
- OAuthClientRegistrationErrorSchema = z9.object({
220061
- error: z9.string(),
220062
- error_description: z9.string().optional()
220060
+ OAuthClientRegistrationErrorSchema = z4.object({
220061
+ error: z4.string(),
220062
+ error_description: z4.string().optional()
220063
220063
  }).strip();
220064
- OAuthTokenRevocationRequestSchema = z9.object({
220065
- token: z9.string(),
220066
- token_type_hint: z9.string().optional()
220064
+ OAuthTokenRevocationRequestSchema = z4.object({
220065
+ token: z4.string(),
220066
+ token_type_hint: z4.string().optional()
220067
220067
  }).strip();
220068
220068
  }
220069
220069
  });
@@ -220234,7 +220234,7 @@ var init_error = __esm({
220234
220234
  init_dist4();
220235
220235
  init_http_exception();
220236
220236
  init_logger();
220237
- ErrorCode2 = z5.enum([
220237
+ ErrorCode2 = z.enum([
220238
220238
  "bad_request",
220239
220239
  "unauthorized",
220240
220240
  "forbidden",
@@ -220252,28 +220252,28 @@ var init_error = __esm({
220252
220252
  unprocessable_entity: 422,
220253
220253
  internal_server_error: 500
220254
220254
  };
220255
- problemDetailsSchema = z5.object({
220255
+ problemDetailsSchema = z.object({
220256
220256
  // type: z.string().url().openapi({
220257
220257
  // description: "A URI reference that identifies the problem type.",
220258
220258
  // example: `${ERROR_DOCS_BASE_URL}#not-found`,
220259
220259
  // }),
220260
- title: z5.string().openapi({
220260
+ title: z.string().openapi({
220261
220261
  description: "A short, human-readable summary of the problem type.",
220262
220262
  example: "Resource Not Found"
220263
220263
  }),
220264
- status: z5.number().int().openapi({
220264
+ status: z.number().int().openapi({
220265
220265
  description: "The HTTP status code.",
220266
220266
  example: 404
220267
220267
  }),
220268
- detail: z5.string().openapi({
220268
+ detail: z.string().openapi({
220269
220269
  description: "A human-readable explanation specific to this occurrence of the problem.",
220270
220270
  example: "The requested resource was not found."
220271
220271
  }),
220272
- instance: z5.string().optional().openapi({
220272
+ instance: z.string().optional().openapi({
220273
220273
  description: "A URI reference that identifies the specific occurrence of the problem.",
220274
220274
  example: "/conversations/123"
220275
220275
  }),
220276
- requestId: z5.string().optional().openapi({
220276
+ requestId: z.string().optional().openapi({
220277
220277
  description: "A unique identifier for the request, useful for troubleshooting.",
220278
220278
  example: "req_1234567890"
220279
220279
  }),
@@ -220282,13 +220282,13 @@ var init_error = __esm({
220282
220282
  example: "not_found"
220283
220283
  })
220284
220284
  }).openapi("ProblemDetails");
220285
- errorResponseSchema = z5.object({
220286
- error: z5.object({
220285
+ errorResponseSchema = z.object({
220286
+ error: z.object({
220287
220287
  code: ErrorCode2.openapi({
220288
220288
  description: "A short code indicating the error code returned.",
220289
220289
  example: "not_found"
220290
220290
  }),
220291
- message: z5.string().openapi({
220291
+ message: z.string().openapi({
220292
220292
  description: "A human readable error message.",
220293
220293
  example: "The requested resource was not found."
220294
220294
  })
@@ -220300,15 +220300,15 @@ var init_error = __esm({
220300
220300
  content: {
220301
220301
  "application/problem+json": {
220302
220302
  schema: problemDetailsSchema.extend({
220303
- code: z5.literal(code).openapi({
220303
+ code: z.literal(code).openapi({
220304
220304
  description: "A short code indicating the error code returned.",
220305
220305
  example: code
220306
220306
  }),
220307
- detail: z5.string().openapi({
220307
+ detail: z.string().openapi({
220308
220308
  description: "A detailed explanation specific to this occurrence of the problem, providing context and specifics about what went wrong.",
220309
220309
  example: description
220310
220310
  }),
220311
- title: z5.string().openapi({
220311
+ title: z.string().openapi({
220312
220312
  description: "A short, human-readable summary of the problem type.",
220313
220313
  example: getTitleFromCode(code)
220314
220314
  }),
@@ -220316,16 +220316,16 @@ var init_error = __esm({
220316
220316
  // description: "A URI reference that identifies the problem type.",
220317
220317
  // example: `${ERROR_DOCS_BASE_URL}#${code}`,
220318
220318
  // }),
220319
- status: z5.number().int().openapi({
220319
+ status: z.number().int().openapi({
220320
220320
  description: "The HTTP status code.",
220321
220321
  example: errorCodeToHttpStatus[code]
220322
220322
  }),
220323
- error: z5.object({
220324
- code: z5.literal(code).openapi({
220323
+ error: z.object({
220324
+ code: z.literal(code).openapi({
220325
220325
  description: "A short code indicating the error code returned.",
220326
220326
  example: code
220327
220327
  }),
220328
- message: z5.string().openapi({
220328
+ message: z.string().openapi({
220329
220329
  description: "A concise error message suitable for display to end users. May be truncated if the full detail is long.",
220330
220330
  example: description.length > 100 ? `${description.substring(0, 97)}...` : description
220331
220331
  })
@@ -227419,7 +227419,6 @@ var init_exit_hook = __esm({
227419
227419
 
227420
227420
  // ../packages/agents-core/src/utils/mcp-client.ts
227421
227421
  import { tool } from "ai";
227422
- import { z as z10 } from "zod";
227423
227422
  var init_mcp_client = __esm({
227424
227423
  "../packages/agents-core/src/utils/mcp-client.ts"() {
227425
227424
  "use strict";
@@ -227430,6 +227429,7 @@ var init_mcp_client = __esm({
227430
227429
  init_protocol();
227431
227430
  init_types2();
227432
227431
  init_exit_hook();
227432
+ init_dist4();
227433
227433
  init_execution_limits_shared();
227434
227434
  init_utility();
227435
227435
  }
@@ -228238,13 +228238,13 @@ var init_dist8 = __esm({
228238
228238
 
228239
228239
  // ../node_modules/.pnpm/@ai-sdk+openai-compatible@1.0.27_zod@4.1.12/node_modules/@ai-sdk/openai-compatible/dist/index.mjs
228240
228240
  import { z as z32 } from "zod/v4";
228241
- import { z as z11 } from "zod/v4";
228241
+ import { z as z5 } from "zod/v4";
228242
228242
  import { z as z22 } from "zod/v4";
228243
228243
  import { z as z52 } from "zod/v4";
228244
228244
  import { z as z43 } from "zod/v4";
228245
- import { z as z72 } from "zod/v4";
228246
- import { z as z62 } from "zod/v4";
228247
- import { z as z82 } from "zod/v4";
228245
+ import { z as z7 } from "zod/v4";
228246
+ import { z as z6 } from "zod/v4";
228247
+ import { z as z8 } from "zod/v4";
228248
228248
  function getOpenAIMetadata(message) {
228249
228249
  var _a18, _b;
228250
228250
  return (_b = (_a18 = message == null ? void 0 : message.providerOptions) == null ? void 0 : _a18.openaiCompatible) != null ? _b : {};
@@ -228594,20 +228594,20 @@ var init_dist9 = __esm({
228594
228594
  init_dist8();
228595
228595
  init_dist8();
228596
228596
  init_dist8();
228597
- openaiCompatibleProviderOptions = z11.object({
228597
+ openaiCompatibleProviderOptions = z5.object({
228598
228598
  /**
228599
228599
  * A unique identifier representing your end-user, which can help the provider to
228600
228600
  * monitor and detect abuse.
228601
228601
  */
228602
- user: z11.string().optional(),
228602
+ user: z5.string().optional(),
228603
228603
  /**
228604
228604
  * Reasoning effort for reasoning models. Defaults to `medium`.
228605
228605
  */
228606
- reasoningEffort: z11.string().optional(),
228606
+ reasoningEffort: z5.string().optional(),
228607
228607
  /**
228608
228608
  * Controls the verbosity of the generated text. Defaults to `medium`.
228609
228609
  */
228610
- textVerbosity: z11.string().optional()
228610
+ textVerbosity: z5.string().optional()
228611
228611
  });
228612
228612
  openaiCompatibleErrorDataSchema = z22.object({
228613
228613
  error: z22.object({
@@ -229437,17 +229437,17 @@ var init_dist9 = __esm({
229437
229437
  }),
229438
229438
  errorSchema
229439
229439
  ]);
229440
- openaiCompatibleEmbeddingProviderOptions = z62.object({
229440
+ openaiCompatibleEmbeddingProviderOptions = z6.object({
229441
229441
  /**
229442
229442
  * The number of dimensions the resulting output embeddings should have.
229443
229443
  * Only supported in text-embedding-3 and later models.
229444
229444
  */
229445
- dimensions: z62.number().optional(),
229445
+ dimensions: z6.number().optional(),
229446
229446
  /**
229447
229447
  * A unique identifier representing your end-user, which can help providers to
229448
229448
  * monitor and detect abuse.
229449
229449
  */
229450
- user: z62.string().optional()
229450
+ user: z6.string().optional()
229451
229451
  });
229452
229452
  OpenAICompatibleEmbeddingModel = class {
229453
229453
  constructor(modelId, config) {
@@ -229530,10 +229530,10 @@ var init_dist9 = __esm({
229530
229530
  };
229531
229531
  }
229532
229532
  };
229533
- openaiTextEmbeddingResponseSchema = z72.object({
229534
- data: z72.array(z72.object({ embedding: z72.array(z72.number()) })),
229535
- usage: z72.object({ prompt_tokens: z72.number() }).nullish(),
229536
- providerMetadata: z72.record(z72.string(), z72.record(z72.string(), z72.any())).optional()
229533
+ openaiTextEmbeddingResponseSchema = z7.object({
229534
+ data: z7.array(z7.object({ embedding: z7.array(z7.number()) })),
229535
+ usage: z7.object({ prompt_tokens: z7.number() }).nullish(),
229536
+ providerMetadata: z7.record(z7.string(), z7.record(z7.string(), z7.any())).optional()
229537
229537
  });
229538
229538
  OpenAICompatibleImageModel = class {
229539
229539
  constructor(modelId, config) {
@@ -229602,8 +229602,8 @@ var init_dist9 = __esm({
229602
229602
  };
229603
229603
  }
229604
229604
  };
229605
- openaiCompatibleImageResponseSchema = z82.object({
229606
- data: z82.array(z82.object({ b64_json: z82.string() }))
229605
+ openaiCompatibleImageResponseSchema = z8.object({
229606
+ data: z8.array(z8.object({ b64_json: z8.string() }))
229607
229607
  });
229608
229608
  VERSION2 = true ? "1.0.27" : "0.0.0-test";
229609
229609
  }
@@ -241372,19 +241372,19 @@ var require_range = __commonJS({
241372
241372
  var replaceCaret = (comp, options) => {
241373
241373
  debug("caret", comp, options);
241374
241374
  const r = options.loose ? re4[t2.CARETLOOSE] : re4[t2.CARET];
241375
- const z26 = options.includePrerelease ? "-0" : "";
241375
+ const z20 = options.includePrerelease ? "-0" : "";
241376
241376
  return comp.replace(r, (_3, M2, m4, p12, pr2) => {
241377
241377
  debug("caret", comp, _3, M2, m4, p12, pr2);
241378
241378
  let ret;
241379
241379
  if (isX(M2)) {
241380
241380
  ret = "";
241381
241381
  } else if (isX(m4)) {
241382
- ret = `>=${M2}.0.0${z26} <${+M2 + 1}.0.0-0`;
241382
+ ret = `>=${M2}.0.0${z20} <${+M2 + 1}.0.0-0`;
241383
241383
  } else if (isX(p12)) {
241384
241384
  if (M2 === "0") {
241385
- ret = `>=${M2}.${m4}.0${z26} <${M2}.${+m4 + 1}.0-0`;
241385
+ ret = `>=${M2}.${m4}.0${z20} <${M2}.${+m4 + 1}.0-0`;
241386
241386
  } else {
241387
- ret = `>=${M2}.${m4}.0${z26} <${+M2 + 1}.0.0-0`;
241387
+ ret = `>=${M2}.${m4}.0${z20} <${+M2 + 1}.0.0-0`;
241388
241388
  }
241389
241389
  } else if (pr2) {
241390
241390
  debug("replaceCaret pr", pr2);
@@ -241401,9 +241401,9 @@ var require_range = __commonJS({
241401
241401
  debug("no pr");
241402
241402
  if (M2 === "0") {
241403
241403
  if (m4 === "0") {
241404
- ret = `>=${M2}.${m4}.${p12}${z26} <${M2}.${m4}.${+p12 + 1}-0`;
241404
+ ret = `>=${M2}.${m4}.${p12}${z20} <${M2}.${m4}.${+p12 + 1}-0`;
241405
241405
  } else {
241406
- ret = `>=${M2}.${m4}.${p12}${z26} <${M2}.${+m4 + 1}.0-0`;
241406
+ ret = `>=${M2}.${m4}.${p12}${z20} <${M2}.${+m4 + 1}.0-0`;
241407
241407
  }
241408
241408
  } else {
241409
241409
  ret = `>=${M2}.${m4}.${p12} <${+M2 + 1}.0.0-0`;
@@ -242232,18 +242232,18 @@ var require_semver2 = __commonJS({
242232
242232
 
242233
242233
  // ../node_modules/.pnpm/@composio+json-schema-to-zod@0.1.18_zod@4.1.12/node_modules/@composio/json-schema-to-zod/dist/index.js
242234
242234
  import * as z16 from "zod/v3";
242235
- import { z as z12 } from "zod/v3";
242235
+ import { z as z9 } from "zod/v3";
242236
242236
  import { z as z23 } from "zod/v3";
242237
242237
  import { z as z33 } from "zod/v3";
242238
242238
  import { z as z44 } from "zod/v3";
242239
242239
  import { z as z53 } from "zod/v3";
242240
- import { z as z63 } from "zod/v3";
242241
- import { z as z73 } from "zod/v3";
242242
- import { z as z83 } from "zod/v3";
242240
+ import { z as z62 } from "zod/v3";
242241
+ import { z as z72 } from "zod/v3";
242242
+ import { z as z82 } from "zod/v3";
242243
242243
  import { z as z92 } from "zod/v3";
242244
- import { z as z102 } from "zod/v3";
242245
- import { z as z112 } from "zod/v3";
242246
- import { z as z122 } from "zod/v3";
242244
+ import { z as z10 } from "zod/v3";
242245
+ import { z as z11 } from "zod/v3";
242246
+ import { z as z12 } from "zod/v3";
242247
242247
  import * as z14 from "zod/v3";
242248
242248
  import { z as z13 } from "zod/v3";
242249
242249
  import { z as z15 } from "zod/v3";
@@ -242266,11 +242266,11 @@ import { ZodError } from "zod/v3";
242266
242266
  import { ZodError as ZodError2 } from "zod/v3";
242267
242267
  import { z as z45 } from "zod/v3";
242268
242268
  import { z as z54 } from "zod/v3";
242269
- import { z as z64 } from "zod/v3";
242270
- import { z as z74 } from "zod/v3";
242271
- import z84 from "zod/v3";
242269
+ import { z as z63 } from "zod/v3";
242270
+ import { z as z73 } from "zod/v3";
242271
+ import z83 from "zod/v3";
242272
242272
  import { z as z93 } from "zod/v3";
242273
- import z103 from "zod/v3";
242273
+ import z102 from "zod/v3";
242274
242274
  function getRandomUUID() {
242275
242275
  return v4_default();
242276
242276
  }
@@ -243827,220 +243827,220 @@ ${originalStackBody}`;
243827
243827
  required: z54.boolean().optional()
243828
243828
  })
243829
243829
  );
243830
- TriggerStatusEnum = z64.enum(["enable", "disable"]);
243831
- TriggerSubscribeParamSchema = z64.object({
243832
- toolkits: z64.array(z64.string()).optional(),
243833
- triggerId: z64.string().optional(),
243834
- connectedAccountId: z64.string().optional(),
243835
- authConfigId: z64.string().optional(),
243836
- triggerSlug: z64.array(z64.string()).optional(),
243837
- triggerData: z64.string().optional(),
243838
- userId: z64.string().optional()
243830
+ TriggerStatusEnum = z63.enum(["enable", "disable"]);
243831
+ TriggerSubscribeParamSchema = z63.object({
243832
+ toolkits: z63.array(z63.string()).optional(),
243833
+ triggerId: z63.string().optional(),
243834
+ connectedAccountId: z63.string().optional(),
243835
+ authConfigId: z63.string().optional(),
243836
+ triggerSlug: z63.array(z63.string()).optional(),
243837
+ triggerData: z63.string().optional(),
243838
+ userId: z63.string().optional()
243839
243839
  });
243840
- TriggerInstanceListActiveParamsSchema = z64.object({
243841
- authConfigIds: z64.array(z64.string()).nullable().optional(),
243842
- connectedAccountIds: z64.array(z64.string()).nullable().optional(),
243843
- limit: z64.number().optional(),
243844
- page: z64.number().optional(),
243845
- showDisabled: z64.boolean().nullable().optional(),
243846
- triggerIds: z64.array(z64.string()).nullable().optional(),
243847
- triggerNames: z64.array(z64.string()).nullable().optional()
243840
+ TriggerInstanceListActiveParamsSchema = z63.object({
243841
+ authConfigIds: z63.array(z63.string()).nullable().optional(),
243842
+ connectedAccountIds: z63.array(z63.string()).nullable().optional(),
243843
+ limit: z63.number().optional(),
243844
+ page: z63.number().optional(),
243845
+ showDisabled: z63.boolean().nullable().optional(),
243846
+ triggerIds: z63.array(z63.string()).nullable().optional(),
243847
+ triggerNames: z63.array(z63.string()).nullable().optional()
243848
243848
  });
243849
- TriggerInstanceListActiveResponseItemSchema = z64.object({
243850
- id: z64.string(),
243851
- connectedAccountId: z64.string(),
243852
- disabledAt: z64.string().nullable(),
243853
- state: z64.record(z64.unknown()),
243854
- triggerConfig: z64.record(z64.unknown()),
243855
- triggerName: z64.string(),
243856
- updatedAt: z64.string(),
243857
- triggerData: z64.string().optional(),
243858
- uuid: z64.string().optional()
243849
+ TriggerInstanceListActiveResponseItemSchema = z63.object({
243850
+ id: z63.string(),
243851
+ connectedAccountId: z63.string(),
243852
+ disabledAt: z63.string().nullable(),
243853
+ state: z63.record(z63.unknown()),
243854
+ triggerConfig: z63.record(z63.unknown()),
243855
+ triggerName: z63.string(),
243856
+ updatedAt: z63.string(),
243857
+ triggerData: z63.string().optional(),
243858
+ uuid: z63.string().optional()
243859
243859
  });
243860
- TriggerInstanceListActiveResponseSchema = z64.object({
243861
- items: z64.array(TriggerInstanceListActiveResponseItemSchema),
243862
- nextCursor: z64.string().nullable(),
243863
- totalPages: z64.number()
243860
+ TriggerInstanceListActiveResponseSchema = z63.object({
243861
+ items: z63.array(TriggerInstanceListActiveResponseItemSchema),
243862
+ nextCursor: z63.string().nullable(),
243863
+ totalPages: z63.number()
243864
243864
  });
243865
- TriggerInstanceUpsertParamsSchema = z64.object({
243866
- connectedAccountId: z64.string().optional(),
243867
- triggerConfig: z64.record(z64.unknown()).optional()
243865
+ TriggerInstanceUpsertParamsSchema = z63.object({
243866
+ connectedAccountId: z63.string().optional(),
243867
+ triggerConfig: z63.record(z63.unknown()).optional()
243868
243868
  });
243869
- TriggerInstanceUpsertResponseSchema = z64.object({
243870
- triggerId: z64.string()
243869
+ TriggerInstanceUpsertResponseSchema = z63.object({
243870
+ triggerId: z63.string()
243871
243871
  });
243872
- TriggerInstanceManageUpdateParamsSchema = z64.object({
243873
- status: z64.enum(["enable", "disable"])
243872
+ TriggerInstanceManageUpdateParamsSchema = z63.object({
243873
+ status: z63.enum(["enable", "disable"])
243874
243874
  });
243875
- TriggerInstanceManageUpdateResponseSchema = z64.object({
243876
- status: z64.enum(["success"])
243875
+ TriggerInstanceManageUpdateResponseSchema = z63.object({
243876
+ status: z63.enum(["success"])
243877
243877
  });
243878
- TriggerInstanceManageDeleteResponseSchema = z64.object({
243879
- triggerId: z64.string()
243878
+ TriggerInstanceManageDeleteResponseSchema = z63.object({
243879
+ triggerId: z63.string()
243880
243880
  });
243881
- IncomingTriggerPayloadSchema = z64.object({
243882
- id: z64.string().describe("The ID of the trigger"),
243883
- uuid: z64.string().describe("The UUID of the trigger"),
243884
- triggerSlug: z64.string().describe("The slug of the trigger that triggered the event"),
243885
- toolkitSlug: z64.string().describe("The slug of the toolkit that triggered the event"),
243886
- userId: z64.string().describe("The ID of the user that triggered the event"),
243887
- payload: z64.record(z64.unknown()).describe("The payload of the trigger").optional(),
243888
- originalPayload: z64.record(z64.unknown()).describe("The original payload of the trigger").optional(),
243889
- metadata: z64.object({
243890
- id: z64.string(),
243891
- uuid: z64.string(),
243892
- toolkitSlug: z64.string(),
243893
- triggerSlug: z64.string(),
243894
- triggerData: z64.string().optional(),
243895
- triggerConfig: z64.record(z64.unknown()),
243896
- connectedAccount: z64.object({
243897
- id: z64.string(),
243898
- uuid: z64.string(),
243899
- authConfigId: z64.string(),
243900
- authConfigUUID: z64.string(),
243901
- userId: z64.string(),
243902
- status: z64.enum(["ACTIVE", "INACTIVE"])
243881
+ IncomingTriggerPayloadSchema = z63.object({
243882
+ id: z63.string().describe("The ID of the trigger"),
243883
+ uuid: z63.string().describe("The UUID of the trigger"),
243884
+ triggerSlug: z63.string().describe("The slug of the trigger that triggered the event"),
243885
+ toolkitSlug: z63.string().describe("The slug of the toolkit that triggered the event"),
243886
+ userId: z63.string().describe("The ID of the user that triggered the event"),
243887
+ payload: z63.record(z63.unknown()).describe("The payload of the trigger").optional(),
243888
+ originalPayload: z63.record(z63.unknown()).describe("The original payload of the trigger").optional(),
243889
+ metadata: z63.object({
243890
+ id: z63.string(),
243891
+ uuid: z63.string(),
243892
+ toolkitSlug: z63.string(),
243893
+ triggerSlug: z63.string(),
243894
+ triggerData: z63.string().optional(),
243895
+ triggerConfig: z63.record(z63.unknown()),
243896
+ connectedAccount: z63.object({
243897
+ id: z63.string(),
243898
+ uuid: z63.string(),
243899
+ authConfigId: z63.string(),
243900
+ authConfigUUID: z63.string(),
243901
+ userId: z63.string(),
243902
+ status: z63.enum(["ACTIVE", "INACTIVE"])
243903
243903
  })
243904
243904
  })
243905
243905
  });
243906
- TriggersTypeListParamsSchema = z64.object({
243907
- cursor: z64.string().optional(),
243908
- limit: z64.number().nullish(),
243909
- toolkits: z64.array(z64.string()).nullish()
243906
+ TriggersTypeListParamsSchema = z63.object({
243907
+ cursor: z63.string().optional(),
243908
+ limit: z63.number().nullish(),
243909
+ toolkits: z63.array(z63.string()).nullish()
243910
243910
  });
243911
- TriggerTypeSchema = z64.object({
243912
- slug: z64.string(),
243913
- name: z64.string(),
243914
- description: z64.string(),
243915
- instructions: z64.string().optional(),
243916
- toolkit: z64.object({
243917
- logo: z64.string(),
243918
- slug: z64.string(),
243919
- name: z64.string()
243911
+ TriggerTypeSchema = z63.object({
243912
+ slug: z63.string(),
243913
+ name: z63.string(),
243914
+ description: z63.string(),
243915
+ instructions: z63.string().optional(),
243916
+ toolkit: z63.object({
243917
+ logo: z63.string(),
243918
+ slug: z63.string(),
243919
+ name: z63.string()
243920
243920
  }),
243921
- payload: z64.record(z64.unknown()),
243922
- config: z64.record(z64.unknown()),
243923
- version: z64.string().optional()
243921
+ payload: z63.record(z63.unknown()),
243922
+ config: z63.record(z63.unknown()),
243923
+ version: z63.string().optional()
243924
243924
  });
243925
- TriggersTypeListResponseSchema = z64.object({
243926
- items: z64.array(TriggerTypeSchema),
243927
- nextCursor: z64.string().nullish(),
243928
- totalPages: z64.number()
243925
+ TriggersTypeListResponseSchema = z63.object({
243926
+ items: z63.array(TriggerTypeSchema),
243927
+ nextCursor: z63.string().nullish(),
243928
+ totalPages: z63.number()
243929
243929
  });
243930
- SDKRealtimeCredentialsResponseSchema = z74.object({
243931
- projectId: z74.string().describe("The project ID"),
243932
- pusherKey: z74.string().describe("The Pusher key"),
243933
- pusherCluster: z74.string().describe("The Pusher cluster")
243930
+ SDKRealtimeCredentialsResponseSchema = z73.object({
243931
+ projectId: z73.string().describe("The project ID"),
243932
+ pusherKey: z73.string().describe("The Pusher key"),
243933
+ pusherCluster: z73.string().describe("The Pusher cluster")
243934
243934
  });
243935
- MCPServerInstanceSchema = z84.object({
243936
- id: z84.string(),
243937
- name: z84.string(),
243938
- type: z84.literal("streamable_http"),
243939
- url: z84.string(),
243940
- userId: z84.string(),
243941
- allowedTools: z84.array(z84.string()),
243942
- authConfigs: z84.array(z84.string())
243935
+ MCPServerInstanceSchema = z83.object({
243936
+ id: z83.string(),
243937
+ name: z83.string(),
243938
+ type: z83.literal("streamable_http"),
243939
+ url: z83.string(),
243940
+ userId: z83.string(),
243941
+ allowedTools: z83.array(z83.string()),
243942
+ authConfigs: z83.array(z83.string())
243943
243943
  });
243944
- MCPConfigToolkitsSchema = z84.object({
243945
- toolkit: z84.string().describe("Id of the toolkit").optional(),
243946
- authConfigId: z84.string().describe("Id of the auth config").optional()
243944
+ MCPConfigToolkitsSchema = z83.object({
243945
+ toolkit: z83.string().describe("Id of the toolkit").optional(),
243946
+ authConfigId: z83.string().describe("Id of the auth config").optional()
243947
243947
  });
243948
- MCPConfigCreationParamsSchema = z84.object({
243949
- toolkits: z84.array(z84.union([MCPConfigToolkitsSchema, z84.string()])),
243950
- allowedTools: z84.array(z84.string()).optional(),
243951
- manuallyManageConnections: z84.boolean().default(false).optional().describe(
243948
+ MCPConfigCreationParamsSchema = z83.object({
243949
+ toolkits: z83.array(z83.union([MCPConfigToolkitsSchema, z83.string()])),
243950
+ allowedTools: z83.array(z83.string()).optional(),
243951
+ manuallyManageConnections: z83.boolean().default(false).optional().describe(
243952
243952
  `Whether to manually manage accounts. If true, you need to manage accounts manually connect user accounts.
243953
243953
  If set to false, composio will inject account maangement tools into your mcp server for agents to request and authenticate accounts.
243954
243954
  defaults to false`
243955
243955
  )
243956
243956
  });
243957
- MCPConfigResponseSchema = z84.object({
243957
+ MCPConfigResponseSchema = z83.object({
243958
243958
  /**
243959
243959
  * Unique identifier for the newly created custom MCP server
243960
243960
  */
243961
- id: z84.string(),
243961
+ id: z83.string(),
243962
243962
  /**
243963
243963
  * Human-readable name of the custom MCP server
243964
243964
  */
243965
- name: z84.string(),
243965
+ name: z83.string(),
243966
243966
  /**
243967
243967
  * List of tool identifiers that are enabled for this server
243968
243968
  */
243969
- allowedTools: z84.array(z84.string()),
243969
+ allowedTools: z83.array(z83.string()),
243970
243970
  /**
243971
243971
  * ID references to the auth configurations used by this server
243972
243972
  */
243973
- authConfigIds: z84.array(z84.string()),
243973
+ authConfigIds: z83.array(z83.string()),
243974
243974
  /**
243975
243975
  * Set of command line instructions for connecting various clients to this MCP server
243976
243976
  */
243977
- commands: z84.object({
243977
+ commands: z83.object({
243978
243978
  /**
243979
243979
  * Command line instruction for Claude client setup
243980
243980
  */
243981
- claude: z84.string(),
243981
+ claude: z83.string(),
243982
243982
  /**
243983
243983
  * Command line instruction for Cursor client setup
243984
243984
  */
243985
- cursor: z84.string(),
243985
+ cursor: z83.string(),
243986
243986
  /**
243987
243987
  * Command line instruction for Windsurf client setup
243988
243988
  */
243989
- windsurf: z84.string()
243989
+ windsurf: z83.string()
243990
243990
  }),
243991
243991
  /**
243992
243992
  * URL endpoint for establishing Server-Sent Events (SSE) connection to this MCP server
243993
243993
  */
243994
- MCPUrl: z84.string()
243994
+ MCPUrl: z83.string()
243995
243995
  });
243996
- MCPGetInstanceParamsSchema = z84.object({
243997
- manuallyManageConnections: z84.boolean().default(false).optional().describe(
243996
+ MCPGetInstanceParamsSchema = z83.object({
243997
+ manuallyManageConnections: z83.boolean().default(false).optional().describe(
243998
243998
  `Whether to manually manage accounts. If true, you need to manage accounts manually connect user accounts.
243999
243999
  If set to false, composio will inject account maangement tools into your mcp server for agents to request and authenticate accounts.
244000
244000
  defaults to false`
244001
244001
  )
244002
244002
  });
244003
- MCPListParamsSchema = z84.object({
244004
- page: z84.number().optional().default(1),
244005
- limit: z84.number().optional().default(10),
244006
- toolkits: z84.array(z84.string()).optional().default([]),
244007
- authConfigs: z84.array(z84.string()).optional().default([]),
244008
- name: z84.string().optional()
244003
+ MCPListParamsSchema = z83.object({
244004
+ page: z83.number().optional().default(1),
244005
+ limit: z83.number().optional().default(10),
244006
+ toolkits: z83.array(z83.string()).optional().default([]),
244007
+ authConfigs: z83.array(z83.string()).optional().default([]),
244008
+ name: z83.string().optional()
244009
244009
  });
244010
244010
  MCPItemSchema = MCPConfigResponseSchema.extend({
244011
- ...z84.object({
244012
- toolkitIcons: z84.record(z84.string(), z84.string()),
244013
- serverInstanceCount: z84.number(),
244014
- toolkits: z84.array(z84.string())
244011
+ ...z83.object({
244012
+ toolkitIcons: z83.record(z83.string(), z83.string()),
244013
+ serverInstanceCount: z83.number(),
244014
+ toolkits: z83.array(z83.string())
244015
244015
  }).shape
244016
244016
  });
244017
- MCPListResponseSchema = z84.object({
244018
- items: z84.array(MCPItemSchema),
244019
- currentPage: z84.number(),
244020
- totalPages: z84.number()
244017
+ MCPListResponseSchema = z83.object({
244018
+ items: z83.array(MCPItemSchema),
244019
+ currentPage: z83.number(),
244020
+ totalPages: z83.number()
244021
244021
  });
244022
- MCPUpdateParamsSchema = z84.object({
244023
- name: z84.string().optional(),
244024
- toolkits: z84.array(z84.union([MCPConfigToolkitsSchema, z84.string()])).optional(),
244025
- allowedTools: z84.array(z84.string()).optional(),
244026
- manuallyManageConnections: z84.boolean().optional().describe(
244022
+ MCPUpdateParamsSchema = z83.object({
244023
+ name: z83.string().optional(),
244024
+ toolkits: z83.array(z83.union([MCPConfigToolkitsSchema, z83.string()])).optional(),
244025
+ allowedTools: z83.array(z83.string()).optional(),
244026
+ manuallyManageConnections: z83.boolean().optional().describe(
244027
244027
  `Whether to manually manage accounts. If true, you need to manage accounts manually connect user accounts.
244028
244028
  If set to false, composio will inject account maangement tools into your mcp server for agents to request and authenticate accounts.
244029
244029
  defaults to false`
244030
244030
  )
244031
244031
  });
244032
- MCPServerConnectionStatus = z84.object({
244033
- connected: z84.boolean(),
244034
- toolkit: z84.string(),
244035
- connectedAccountId: z84.string()
244032
+ MCPServerConnectionStatus = z83.object({
244033
+ connected: z83.boolean(),
244034
+ toolkit: z83.string(),
244035
+ connectedAccountId: z83.string()
244036
244036
  });
244037
- MCPServerConnectedAccountsSchema = z84.record(
244038
- z84.string(),
244039
- z84.array(
244040
- z84.object({
244041
- toolkit: z84.string(),
244042
- authConfigId: z84.string(),
244043
- connectedAccountId: z84.string()
244037
+ MCPServerConnectedAccountsSchema = z83.record(
244038
+ z83.string(),
244039
+ z83.array(
244040
+ z83.object({
244041
+ toolkit: z83.string(),
244042
+ authConfigId: z83.string(),
244043
+ connectedAccountId: z83.string()
244044
244044
  })
244045
244045
  )
244046
244046
  );
@@ -244218,17 +244218,17 @@ defaults to false`
244218
244218
  tools: z93.array(z93.string()).optional()
244219
244219
  });
244220
244220
  RUNTIME_ENV = detectRuntime();
244221
- ToolRouterToolkitConfigSchema = z103.object({
244222
- toolkit: z103.string(),
244223
- authConfigId: z103.string().optional()
244221
+ ToolRouterToolkitConfigSchema = z102.object({
244222
+ toolkit: z102.string(),
244223
+ authConfigId: z102.string().optional()
244224
244224
  });
244225
- ToolRouterConfigSchema = z103.object({
244226
- toolkits: z103.array(z103.union([z103.string(), ToolRouterToolkitConfigSchema])).optional(),
244227
- manuallyManageConnections: z103.boolean().optional()
244225
+ ToolRouterConfigSchema = z102.object({
244226
+ toolkits: z102.array(z102.union([z102.string(), ToolRouterToolkitConfigSchema])).optional(),
244227
+ manuallyManageConnections: z102.boolean().optional()
244228
244228
  });
244229
- ToolRouterSessionSchema = z103.object({
244230
- sessionId: z103.string(),
244231
- url: z103.string()
244229
+ ToolRouterSessionSchema = z102.object({
244230
+ sessionId: z102.string(),
244231
+ url: z102.string()
244232
244232
  });
244233
244233
  }
244234
244234
  });
@@ -245734,20 +245734,20 @@ var init_dist12 = __esm({
245734
245734
  });
245735
245735
 
245736
245736
  // ../packages/agents-core/src/credential-stores/nango-store.ts
245737
- import { z as z18 } from "zod";
245738
245737
  var logger18, CredentialKeySchema;
245739
245738
  var init_nango_store = __esm({
245740
245739
  "../packages/agents-core/src/credential-stores/nango-store.ts"() {
245741
245740
  "use strict";
245742
245741
  init_esm_shims();
245743
245742
  init_dist12();
245743
+ init_dist4();
245744
245744
  init_types();
245745
245745
  init_logger();
245746
245746
  logger18 = getLogger("nango-credential-store");
245747
- CredentialKeySchema = z18.object({
245748
- connectionId: z18.string().min(1, "connectionId must be a non-empty string"),
245749
- providerConfigKey: z18.string().min(1, "providerConfigKey must be a non-empty string"),
245750
- integrationDisplayName: z18.string().nullish()
245747
+ CredentialKeySchema = z.object({
245748
+ connectionId: z.string().min(1, "connectionId must be a non-empty string"),
245749
+ providerConfigKey: z.string().min(1, "providerConfigKey must be a non-empty string"),
245750
+ integrationDisplayName: z.string().nullish()
245751
245751
  });
245752
245752
  }
245753
245753
  });
@@ -245932,7 +245932,7 @@ function Nr(e) {
245932
245932
  let t2;
245933
245933
  return e.startsWith('"') && e.endsWith('"') ? t2 = e.substring(1, e.length - 1) : t2 = e.toLowerCase(), t2;
245934
245934
  }
245935
- var hn, ht, bt, be, ge, gt, we, ve, Ge, wt, V, je, At, xt, St, Ae, Dt, Bt, It, Mt, Rt, Tt, Qe, We, Et, Ct, Pt, Ut, Nt, Lt, Ot, kt, Vt, _e, ze, He, Ft, qe, xe, vt, Gt, jt, Qt, Wt, _t, zt, Ht, qt, Yt, $t, Kt, Jt, Xt, Zt, en, tn, nn, rn, sn, an, Ye, on, un, $e, Se, ln, cn, dn, fn, he, wn, Ue, Be, Ie, Me, Re, Te, Ee, Ce, Pe, F2, v, G, j, Q, W, C, _2, z19, H, q, Y, $, K, J, X, Z, ee, te, zn, b, g2, N, ce, L2, x2, le, U2, Xe, T2, m, An, xn, Sn, Dn, Bn, In, Mn, Rn, O, Tn, En, Cn, Pn, Un, Ne, Nn, Ln, On, kn, Vn, Fn, pe, vn, Gn, jn, Qn, k, Le, Wn, R2, w, fe, me, ne, de, Oe, _n, Ze, et, A, S, D2, o, l2, tt, nt, rt, st, it, at, ot, ke, ut, lt, ct, pt, dt, ft, mt, yt, Ve, ye, Fe, se, re2;
245935
+ var hn, ht, bt, be, ge, gt, we, ve, Ge, wt, V, je, At, xt, St, Ae, Dt, Bt, It, Mt, Rt, Tt, Qe, We, Et, Ct, Pt, Ut, Nt, Lt, Ot, kt, Vt, _e, ze, He, Ft, qe, xe, vt, Gt, jt, Qt, Wt, _t, zt, Ht, qt, Yt, $t, Kt, Jt, Xt, Zt, en, tn, nn, rn, sn, an, Ye, on, un, $e, Se, ln, cn, dn, fn, he, wn, Ue, Be, Ie, Me, Re, Te, Ee, Ce, Pe, F2, v, G, j, Q, W, C, _2, z18, H, q, Y, $, K, J, X, Z, ee, te, zn, b, g2, N, ce, L2, x2, le, U2, Xe, T2, m, An, xn, Sn, Dn, Bn, In, Mn, Rn, O, Tn, En, Cn, Pn, Un, Ne, Nn, Ln, On, kn, Vn, Fn, pe, vn, Gn, jn, Qn, k, Le, Wn, R2, w, fe, me, ne, de, Oe, _n, Ze, et, A, S, D2, o, l2, tt, nt, rt, st, it, at, ot, ke, ut, lt, ct, pt, dt, ft, mt, yt, Ve, ye, Fe, se, re2;
245936
245936
  var init_chunk_3WWIVTCY = __esm({
245937
245937
  "../node_modules/.pnpm/@electric-sql+pglite@0.3.13/node_modules/@electric-sql/pglite/dist/chunk-3WWIVTCY.js"() {
245938
245938
  "use strict";
@@ -246035,7 +246035,7 @@ var init_chunk_3WWIVTCY = __esm({
246035
246035
  F(wn, { parseDescribeStatementResults: () => De, parseResults: () => bn });
246036
246036
  u();
246037
246037
  Ue = {};
246038
- F(Ue, { AuthenticationCleartextPassword: () => v, AuthenticationMD5Password: () => G, AuthenticationOk: () => F2, AuthenticationSASL: () => j, AuthenticationSASLContinue: () => Q, AuthenticationSASLFinal: () => W, BackendKeyDataMessage: () => K, CommandCompleteMessage: () => Z, CopyDataMessage: () => _2, CopyResponse: () => z19, DataRowMessage: () => ee, DatabaseError: () => C, Field: () => H, NoticeMessage: () => te, NotificationResponseMessage: () => J, ParameterDescriptionMessage: () => Y, ParameterStatusMessage: () => $, ReadyForQueryMessage: () => X, RowDescriptionMessage: () => q, bindComplete: () => Ie, closeComplete: () => Me, copyDone: () => Pe, emptyQuery: () => Ce, noData: () => Re, parseComplete: () => Be, portalSuspended: () => Te, replicationStart: () => Ee });
246038
+ F(Ue, { AuthenticationCleartextPassword: () => v, AuthenticationMD5Password: () => G, AuthenticationOk: () => F2, AuthenticationSASL: () => j, AuthenticationSASLContinue: () => Q, AuthenticationSASLFinal: () => W, BackendKeyDataMessage: () => K, CommandCompleteMessage: () => Z, CopyDataMessage: () => _2, CopyResponse: () => z18, DataRowMessage: () => ee, DatabaseError: () => C, Field: () => H, NoticeMessage: () => te, NotificationResponseMessage: () => J, ParameterDescriptionMessage: () => Y, ParameterStatusMessage: () => $, ReadyForQueryMessage: () => X, RowDescriptionMessage: () => q, bindComplete: () => Ie, closeComplete: () => Me, copyDone: () => Pe, emptyQuery: () => Ce, noData: () => Re, parseComplete: () => Be, portalSuspended: () => Te, replicationStart: () => Ee });
246039
246039
  u();
246040
246040
  Be = { name: "parseComplete", length: 5 };
246041
246041
  Ie = { name: "bindComplete", length: 5 };
@@ -246099,7 +246099,7 @@ var init_chunk_3WWIVTCY = __esm({
246099
246099
  this.name = "copyData";
246100
246100
  }
246101
246101
  };
246102
- z19 = class {
246102
+ z18 = class {
246103
246103
  constructor(t2, n3, r, i3) {
246104
246104
  this.length = t2;
246105
246105
  this.name = n3;
@@ -246458,7 +246458,7 @@ var init_chunk_3WWIVTCY = __esm({
246458
246458
  return T(this, l2, ke).call(this, t2, n3, r, "copyOutResponse");
246459
246459
  }, ke = function(t2, n3, r, i3) {
246460
246460
  h(this, o).setBuffer(t2, r);
246461
- let a2 = h(this, o).byte() !== 0, u2 = h(this, o).int16(), f3 = new z19(n3, i3, a2, u2);
246461
+ let a2 = h(this, o).byte() !== 0, u2 = h(this, o).int16(), f3 = new z18(n3, i3, a2, u2);
246462
246462
  for (let c2 = 0; c2 < u2; c2++) f3.columnTypes[c2] = h(this, o).int16();
246463
246463
  return f3;
246464
246464
  }, ut = function(t2, n3, r) {
@@ -246902,7 +246902,7 @@ var init_chunk_VBDAOXYI = __esm({
246902
246902
  }], ["modifyTime", 12, 136, function(r, e) {
246903
246903
  return k4(r[e[0]], e[1]);
246904
246904
  }, function(r, e, t2) {
246905
- return z26(r.slice(e, e + t2[1]));
246905
+ return z20(r.slice(e, e + t2[1]));
246906
246906
  }], ["checksum", 8, 148, function(r, e) {
246907
246907
  return " ";
246908
246908
  }, function(r, e, t2) {
@@ -246944,11 +246944,11 @@ var init_chunk_VBDAOXYI = __esm({
246944
246944
  }], ["accessTime", 12, 476, function(r, e) {
246945
246945
  return k4(r[e[0]], e[1]);
246946
246946
  }, function(r, e, t2) {
246947
- return z26(r.slice(e, e + t2[1]));
246947
+ return z20(r.slice(e, e + t2[1]));
246948
246948
  }], ["createTime", 12, 488, function(r, e) {
246949
246949
  return k4(r[e[0]], e[1]);
246950
246950
  }, function(r, e, t2) {
246951
- return z26(r.slice(e, e + t2[1]));
246951
+ return z20(r.slice(e, e + t2[1]));
246952
246952
  }]], $4 = (function(r) {
246953
246953
  var e = r[r.length - 1];
246954
246954
  return e[2] + e[1];
@@ -246985,7 +246985,7 @@ var init_chunk_VBDAOXYI = __esm({
246985
246985
  var e = String.fromCharCode.apply(null, r);
246986
246986
  return parseInt(e.replace(/^0+$/g, ""), 8) || 0;
246987
246987
  }
246988
- function z26(r) {
246988
+ function z20(r) {
246989
246989
  return r.length == 0 || r[0] == 0 ? null : new Date(1e3 * S3(r));
246990
246990
  }
246991
246991
  function Tr2(r, e, t2) {
@@ -247011,7 +247011,7 @@ var init_chunk_VBDAOXYI = __esm({
247011
247011
  f3.exports.formatTarDateTime = k4;
247012
247012
  f3.exports.parseTarString = A2;
247013
247013
  f3.exports.parseTarNumber = S3;
247014
- f3.exports.parseTarDateTime = z26;
247014
+ f3.exports.parseTarDateTime = z20;
247015
247015
  });
247016
247016
  er = D((ne3, rr) => {
247017
247017
  "use strict";
@@ -251779,48 +251779,48 @@ var init_test_client = __esm({
251779
251779
  });
251780
251780
 
251781
251781
  // ../packages/agents-core/src/validation/event-schemas.ts
251782
- import { z as z20 } from "zod";
251783
251782
  var TransferDataSchema, DelegationSentDataSchema, DelegationReturnedDataSchema, DataOperationDetailsSchema, DataOperationEventSchema, A2AMessageMetadataSchema;
251784
251783
  var init_event_schemas = __esm({
251785
251784
  "../packages/agents-core/src/validation/event-schemas.ts"() {
251786
251785
  "use strict";
251787
251786
  init_esm_shims();
251788
- TransferDataSchema = z20.object({
251789
- fromSubAgent: z20.string().describe("ID of the sub-agent transferring control"),
251790
- targetSubAgent: z20.string().describe("ID of the sub-agent receiving control"),
251791
- reason: z20.string().optional().describe("Reason for the transfer"),
251792
- context: z20.any().optional().describe("Additional context data")
251787
+ init_dist4();
251788
+ TransferDataSchema = z.object({
251789
+ fromSubAgent: z.string().describe("ID of the sub-agent transferring control"),
251790
+ targetSubAgent: z.string().describe("ID of the sub-agent receiving control"),
251791
+ reason: z.string().optional().describe("Reason for the transfer"),
251792
+ context: z.any().optional().describe("Additional context data")
251793
251793
  });
251794
- DelegationSentDataSchema = z20.object({
251795
- delegationId: z20.string().describe("Unique identifier for this delegation"),
251796
- fromSubAgent: z20.string().describe("ID of the delegating sub-agent"),
251797
- targetSubAgent: z20.string().describe("ID of the sub-agent receiving the delegation"),
251798
- taskDescription: z20.string().describe("Description of the delegated task"),
251799
- context: z20.any().optional().describe("Additional context data")
251794
+ DelegationSentDataSchema = z.object({
251795
+ delegationId: z.string().describe("Unique identifier for this delegation"),
251796
+ fromSubAgent: z.string().describe("ID of the delegating sub-agent"),
251797
+ targetSubAgent: z.string().describe("ID of the sub-agent receiving the delegation"),
251798
+ taskDescription: z.string().describe("Description of the delegated task"),
251799
+ context: z.any().optional().describe("Additional context data")
251800
251800
  });
251801
- DelegationReturnedDataSchema = z20.object({
251802
- delegationId: z20.string().describe("Unique identifier matching the original delegation"),
251803
- fromSubAgent: z20.string().describe("ID of the sub-agent that completed the task"),
251804
- targetSubAgent: z20.string().describe("ID of the sub-agent receiving the result"),
251805
- result: z20.any().optional().describe("Result data from the delegated task")
251801
+ DelegationReturnedDataSchema = z.object({
251802
+ delegationId: z.string().describe("Unique identifier matching the original delegation"),
251803
+ fromSubAgent: z.string().describe("ID of the sub-agent that completed the task"),
251804
+ targetSubAgent: z.string().describe("ID of the sub-agent receiving the result"),
251805
+ result: z.any().optional().describe("Result data from the delegated task")
251806
251806
  });
251807
- DataOperationDetailsSchema = z20.object({
251808
- timestamp: z20.number().describe("Unix timestamp in milliseconds"),
251809
- subAgentId: z20.string().describe("ID of the sub-agent that generated this data"),
251810
- data: z20.any().describe("The actual data payload")
251807
+ DataOperationDetailsSchema = z.object({
251808
+ timestamp: z.number().describe("Unix timestamp in milliseconds"),
251809
+ subAgentId: z.string().describe("ID of the sub-agent that generated this data"),
251810
+ data: z.any().describe("The actual data payload")
251811
251811
  });
251812
- DataOperationEventSchema = z20.object({
251813
- type: z20.string().describe("Event type identifier"),
251814
- label: z20.string().describe("Human-readable label for the event"),
251812
+ DataOperationEventSchema = z.object({
251813
+ type: z.string().describe("Event type identifier"),
251814
+ label: z.string().describe("Human-readable label for the event"),
251815
251815
  details: DataOperationDetailsSchema
251816
251816
  });
251817
- A2AMessageMetadataSchema = z20.object({
251818
- fromSubAgentId: z20.string().optional().describe("ID of the sending sub-agent"),
251819
- toSubAgentId: z20.string().optional().describe("ID of the receiving sub-agent"),
251820
- fromExternalAgentId: z20.string().optional().describe("ID of the sending external agent"),
251821
- toExternalAgentId: z20.string().optional().describe("ID of the receiving external agent"),
251822
- taskId: z20.string().optional().describe("Associated task ID"),
251823
- a2aTaskId: z20.string().optional().describe("A2A-specific task ID")
251817
+ A2AMessageMetadataSchema = z.object({
251818
+ fromSubAgentId: z.string().optional().describe("ID of the sending sub-agent"),
251819
+ toSubAgentId: z.string().optional().describe("ID of the receiving sub-agent"),
251820
+ fromExternalAgentId: z.string().optional().describe("ID of the sending external agent"),
251821
+ toExternalAgentId: z.string().optional().describe("ID of the receiving external agent"),
251822
+ taskId: z.string().optional().describe("Associated task ID"),
251823
+ a2aTaskId: z.string().optional().describe("A2A-specific task ID")
251824
251824
  });
251825
251825
  }
251826
251826
  });
@@ -251835,54 +251835,54 @@ var init_id_validation = __esm({
251835
251835
  });
251836
251836
 
251837
251837
  // ../packages/agents-core/src/validation/stream-event-schemas.ts
251838
- import { z as z21 } from "zod";
251839
251838
  var TextStartEventSchema, TextDeltaEventSchema, TextEndEventSchema, DataComponentStreamEventSchema, DataOperationStreamEventSchema, DataSummaryStreamEventSchema, StreamErrorEventSchema, StreamFinishEventSchema, StreamEventSchema;
251840
251839
  var init_stream_event_schemas = __esm({
251841
251840
  "../packages/agents-core/src/validation/stream-event-schemas.ts"() {
251842
251841
  "use strict";
251843
251842
  init_esm_shims();
251844
- TextStartEventSchema = z21.object({
251845
- type: z21.literal("text-start"),
251846
- id: z21.string()
251843
+ init_dist4();
251844
+ TextStartEventSchema = z.object({
251845
+ type: z.literal("text-start"),
251846
+ id: z.string()
251847
251847
  });
251848
- TextDeltaEventSchema = z21.object({
251849
- type: z21.literal("text-delta"),
251850
- id: z21.string(),
251851
- delta: z21.string()
251848
+ TextDeltaEventSchema = z.object({
251849
+ type: z.literal("text-delta"),
251850
+ id: z.string(),
251851
+ delta: z.string()
251852
251852
  });
251853
- TextEndEventSchema = z21.object({
251854
- type: z21.literal("text-end"),
251855
- id: z21.string()
251853
+ TextEndEventSchema = z.object({
251854
+ type: z.literal("text-end"),
251855
+ id: z.string()
251856
251856
  });
251857
- DataComponentStreamEventSchema = z21.object({
251858
- type: z21.literal("data-component"),
251859
- id: z21.string(),
251860
- data: z21.any()
251857
+ DataComponentStreamEventSchema = z.object({
251858
+ type: z.literal("data-component"),
251859
+ id: z.string(),
251860
+ data: z.any()
251861
251861
  });
251862
- DataOperationStreamEventSchema = z21.object({
251863
- type: z21.literal("data-operation"),
251864
- data: z21.any()
251862
+ DataOperationStreamEventSchema = z.object({
251863
+ type: z.literal("data-operation"),
251864
+ data: z.any()
251865
251865
  // Contains OperationEvent types (AgentInitializingEvent, CompletionEvent, etc.)
251866
251866
  });
251867
- DataSummaryStreamEventSchema = z21.object({
251868
- type: z21.literal("data-summary"),
251869
- data: z21.any()
251867
+ DataSummaryStreamEventSchema = z.object({
251868
+ type: z.literal("data-summary"),
251869
+ data: z.any()
251870
251870
  // Contains SummaryEvent from entities.ts
251871
251871
  });
251872
- StreamErrorEventSchema = z21.object({
251873
- type: z21.literal("error"),
251874
- error: z21.string()
251872
+ StreamErrorEventSchema = z.object({
251873
+ type: z.literal("error"),
251874
+ error: z.string()
251875
251875
  });
251876
- StreamFinishEventSchema = z21.object({
251877
- type: z21.literal("finish"),
251878
- finishReason: z21.string().optional(),
251879
- usage: z21.object({
251880
- promptTokens: z21.number().optional(),
251881
- completionTokens: z21.number().optional(),
251882
- totalTokens: z21.number().optional()
251876
+ StreamFinishEventSchema = z.object({
251877
+ type: z.literal("finish"),
251878
+ finishReason: z.string().optional(),
251879
+ usage: z.object({
251880
+ promptTokens: z.number().optional(),
251881
+ completionTokens: z.number().optional(),
251882
+ totalTokens: z.number().optional()
251883
251883
  }).optional()
251884
251884
  });
251885
- StreamEventSchema = z21.discriminatedUnion("type", [
251885
+ StreamEventSchema = z.discriminatedUnion("type", [
251886
251886
  TextStartEventSchema,
251887
251887
  TextDeltaEventSchema,
251888
251888
  TextEndEventSchema,
@@ -259582,26 +259582,26 @@ init_esm_shims();
259582
259582
  // src/env.ts
259583
259583
  init_esm_shims();
259584
259584
  init_src();
259585
- import { z as z25 } from "zod";
259585
+ import { z as z19 } from "zod";
259586
259586
  loadEnvironmentFiles();
259587
- var envSchema2 = z25.object({
259588
- DEBUG: z25.string().optional(),
259587
+ var envSchema2 = z19.object({
259588
+ DEBUG: z19.string().optional(),
259589
259589
  // Secrets loaded from .env files (relative to where CLI is executed)
259590
- ANTHROPIC_API_KEY: z25.string().optional(),
259591
- OPENAI_API_KEY: z25.string().optional(),
259592
- GOOGLE_GENERATIVE_AI_API_KEY: z25.string().optional(),
259590
+ ANTHROPIC_API_KEY: z19.string().optional(),
259591
+ OPENAI_API_KEY: z19.string().optional(),
259592
+ GOOGLE_GENERATIVE_AI_API_KEY: z19.string().optional(),
259593
259593
  // Langfuse configuration for LLM observability
259594
- LANGFUSE_SECRET_KEY: z25.string().optional(),
259595
- LANGFUSE_PUBLIC_KEY: z25.string().optional(),
259596
- LANGFUSE_BASEURL: z25.string().optional().default("https://cloud.langfuse.com"),
259597
- LANGFUSE_ENABLED: z25.string().optional().transform((val) => val === "true")
259594
+ LANGFUSE_SECRET_KEY: z19.string().optional(),
259595
+ LANGFUSE_PUBLIC_KEY: z19.string().optional(),
259596
+ LANGFUSE_BASEURL: z19.string().optional().default("https://cloud.langfuse.com"),
259597
+ LANGFUSE_ENABLED: z19.string().optional().transform((val) => val === "true")
259598
259598
  });
259599
259599
  var parseEnv2 = () => {
259600
259600
  try {
259601
259601
  const parsedEnv = envSchema2.parse(process.env);
259602
259602
  return parsedEnv;
259603
259603
  } catch (error) {
259604
- if (error instanceof z25.ZodError) {
259604
+ if (error instanceof z19.ZodError) {
259605
259605
  const missingVars = error.issues.map((issue) => issue.path.join("."));
259606
259606
  throw new Error(
259607
259607
  `\u274C Invalid environment variables: ${missingVars.join(", ")}