@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.
- package/dist/index.js +1569 -1569
- 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
|
|
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(
|
|
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
|
|
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 ??
|
|
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,
|
|
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 ?
|
|
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,
|
|
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 ?
|
|
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,
|
|
2872
|
+
function stringColumnToSchema(column, z20, coerce) {
|
|
2873
2873
|
if (isColumnType(column, ["PgUUID"])) {
|
|
2874
|
-
return
|
|
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 ?
|
|
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) :
|
|
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
|
|
2943
|
+
return z2.object(columnSchemas);
|
|
2944
2944
|
}
|
|
2945
2945
|
function handleEnum(enum_, factory) {
|
|
2946
|
-
const zod = factory?.zodInstance ??
|
|
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 =
|
|
2976
|
-
jsonSchema =
|
|
2975
|
+
literalSchema = z2.union([z2.string(), z2.number(), z2.boolean(), z2.null()]);
|
|
2976
|
+
jsonSchema = z2.union([
|
|
2977
2977
|
literalSchema,
|
|
2978
|
-
|
|
2979
|
-
|
|
2978
|
+
z2.record(z2.string(), z2.any()),
|
|
2979
|
+
z2.array(z2.any())
|
|
2980
2980
|
]);
|
|
2981
|
-
bufferSchema =
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
3185
|
-
transferCountIs:
|
|
3186
|
-
stepCountIs:
|
|
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 =
|
|
3195
|
-
limitNumber =
|
|
3196
|
-
ModelSettingsSchema =
|
|
3197
|
-
model:
|
|
3198
|
-
providerOptions:
|
|
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 =
|
|
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 =
|
|
3205
|
+
ProjectModelSchema = z.object({
|
|
3206
3206
|
base: ModelSettingsSchema,
|
|
3207
3207
|
structuredOutput: ModelSettingsSchema.optional(),
|
|
3208
3208
|
summarizer: ModelSettingsSchema.optional()
|
|
3209
3209
|
}).openapi("ProjectModel");
|
|
3210
|
-
FunctionToolConfigSchema =
|
|
3211
|
-
name:
|
|
3212
|
-
description:
|
|
3213
|
-
inputSchema:
|
|
3214
|
-
dependencies:
|
|
3215
|
-
execute:
|
|
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:
|
|
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:
|
|
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 =
|
|
3283
|
-
sourceSubAgentId:
|
|
3284
|
-
targetSubAgentId:
|
|
3285
|
-
externalSubAgentId:
|
|
3286
|
-
teamSubAgentId:
|
|
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:
|
|
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 =
|
|
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 =
|
|
3347
|
-
type:
|
|
3348
|
-
requestInit:
|
|
3349
|
-
eventSourceInit:
|
|
3350
|
-
reconnectionOptions:
|
|
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:
|
|
3354
|
+
sessionId: z.string().optional()
|
|
3355
3355
|
}).openapi("McpTransportConfig");
|
|
3356
|
-
ToolStatusSchema =
|
|
3357
|
-
McpToolDefinitionSchema =
|
|
3358
|
-
name:
|
|
3359
|
-
description:
|
|
3360
|
-
inputSchema:
|
|
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:
|
|
3367
|
-
type:
|
|
3368
|
-
mcp:
|
|
3369
|
-
server:
|
|
3370
|
-
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:
|
|
3373
|
-
type:
|
|
3374
|
-
requestInit:
|
|
3375
|
-
eventSourceInit:
|
|
3376
|
-
reconnectionOptions:
|
|
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:
|
|
3380
|
+
sessionId: z.string().optional()
|
|
3381
3381
|
}).optional(),
|
|
3382
|
-
activeTools:
|
|
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:
|
|
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 =
|
|
3487
|
-
SubAgentApiSelectSchema.extend({ type:
|
|
3488
|
-
ExternalAgentApiSelectSchema.extend({ type:
|
|
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 =
|
|
3511
|
-
data:
|
|
3510
|
+
ApiKeyApiCreationResponseSchema = z.object({
|
|
3511
|
+
data: z.object({
|
|
3512
3512
|
apiKey: ApiKeyApiSelectSchema,
|
|
3513
|
-
key:
|
|
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 =
|
|
3532
|
-
id:
|
|
3533
|
-
tenantId:
|
|
3534
|
-
projectId:
|
|
3535
|
-
name:
|
|
3536
|
-
type:
|
|
3537
|
-
credentialStoreId:
|
|
3538
|
-
retrievalParams:
|
|
3539
|
-
createdAt:
|
|
3540
|
-
updatedAt:
|
|
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:
|
|
3544
|
+
type: z.string(),
|
|
3545
3545
|
credentialStoreId: resourceIdSchema,
|
|
3546
|
-
retrievalParams:
|
|
3546
|
+
retrievalParams: z.record(z.string(), z.unknown()).nullish()
|
|
3547
3547
|
});
|
|
3548
3548
|
CredentialReferenceUpdateSchema = CredentialReferenceInsertSchema.partial();
|
|
3549
3549
|
CredentialReferenceApiSelectSchema = createApiSchema(CredentialReferenceSelectSchema).extend({
|
|
3550
|
-
type:
|
|
3551
|
-
tools:
|
|
3552
|
-
externalAgents:
|
|
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:
|
|
3557
|
+
type: z.enum(CredentialStoreType)
|
|
3558
3558
|
}).openapi("CredentialReferenceCreate");
|
|
3559
3559
|
CredentialReferenceApiUpdateSchema = createApiUpdateSchema(
|
|
3560
3560
|
CredentialReferenceUpdateSchema
|
|
3561
3561
|
).extend({
|
|
3562
|
-
type:
|
|
3562
|
+
type: z.enum(CredentialStoreType).optional()
|
|
3563
3563
|
}).openapi("CredentialReferenceUpdate");
|
|
3564
|
-
CredentialStoreSchema =
|
|
3565
|
-
id:
|
|
3566
|
-
type:
|
|
3567
|
-
available:
|
|
3568
|
-
reason:
|
|
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 =
|
|
3571
|
-
data:
|
|
3570
|
+
CredentialStoreListResponseSchema = z.object({
|
|
3571
|
+
data: z.array(CredentialStoreSchema).describe("List of credential stores")
|
|
3572
3572
|
}).openapi("CredentialStoreListResponse");
|
|
3573
|
-
CreateCredentialInStoreRequestSchema =
|
|
3574
|
-
key:
|
|
3575
|
-
value:
|
|
3576
|
-
metadata:
|
|
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 =
|
|
3579
|
-
data:
|
|
3580
|
-
key:
|
|
3581
|
-
storeId:
|
|
3582
|
-
createdAt:
|
|
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 =
|
|
3586
|
-
id:
|
|
3587
|
-
name:
|
|
3588
|
-
description:
|
|
3585
|
+
RelatedAgentInfoSchema = z.object({
|
|
3586
|
+
id: z.string(),
|
|
3587
|
+
name: z.string(),
|
|
3588
|
+
description: z.string()
|
|
3589
3589
|
}).openapi("RelatedAgentInfo");
|
|
3590
|
-
ComponentAssociationSchema =
|
|
3591
|
-
subAgentId:
|
|
3592
|
-
createdAt:
|
|
3590
|
+
ComponentAssociationSchema = z.object({
|
|
3591
|
+
subAgentId: z.string(),
|
|
3592
|
+
createdAt: z.string()
|
|
3593
3593
|
}).openapi("ComponentAssociation");
|
|
3594
|
-
OAuthLoginQuerySchema =
|
|
3595
|
-
tenantId:
|
|
3596
|
-
projectId:
|
|
3597
|
-
toolId:
|
|
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 =
|
|
3600
|
-
code:
|
|
3601
|
-
state:
|
|
3602
|
-
error:
|
|
3603
|
-
error_description:
|
|
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:
|
|
3607
|
+
availableTools: z.array(McpToolDefinitionSchema).optional(),
|
|
3608
3608
|
status: ToolStatusSchema.default("unknown"),
|
|
3609
|
-
version:
|
|
3610
|
-
expiresAt:
|
|
3611
|
-
relationshipId:
|
|
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:
|
|
3624
|
-
projectId:
|
|
3625
|
-
description:
|
|
3626
|
-
serverUrl:
|
|
3627
|
-
activeTools:
|
|
3628
|
-
mcpType:
|
|
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 =
|
|
3653
|
-
url:
|
|
3654
|
-
method:
|
|
3655
|
-
headers:
|
|
3656
|
-
body:
|
|
3657
|
-
transform:
|
|
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:
|
|
3659
|
+
timeout: z.number().min(0).optional().default(CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT2).optional()
|
|
3660
3660
|
}).openapi("FetchConfig");
|
|
3661
|
-
FetchDefinitionSchema =
|
|
3662
|
-
id:
|
|
3663
|
-
name:
|
|
3664
|
-
trigger:
|
|
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:
|
|
3666
|
+
responseSchema: z.any().optional(),
|
|
3667
3667
|
// JSON Schema for validating HTTP response
|
|
3668
|
-
defaultValue:
|
|
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:
|
|
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:
|
|
3681
|
+
headersSchema: z.any().nullable().optional().openapi({
|
|
3682
3682
|
type: "object",
|
|
3683
3683
|
description: "JSON Schema for validating request headers"
|
|
3684
3684
|
}),
|
|
3685
|
-
contextVariables:
|
|
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:
|
|
3709
|
-
headers:
|
|
3710
|
-
toolPolicies:
|
|
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:
|
|
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:
|
|
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 =
|
|
3769
|
-
type:
|
|
3770
|
-
description:
|
|
3771
|
-
detailsSchema:
|
|
3772
|
-
type:
|
|
3773
|
-
properties:
|
|
3774
|
-
required:
|
|
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 =
|
|
3778
|
-
enabled:
|
|
3779
|
-
numEvents:
|
|
3780
|
-
timeInSeconds:
|
|
3781
|
-
prompt:
|
|
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:
|
|
3785
|
+
statusComponents: z.array(StatusComponentSchema).optional()
|
|
3786
3786
|
}).openapi("StatusUpdate");
|
|
3787
|
-
CanUseItemSchema =
|
|
3788
|
-
agentToolRelationId:
|
|
3789
|
-
toolId:
|
|
3790
|
-
toolSelection:
|
|
3791
|
-
headers:
|
|
3792
|
-
toolPolicies:
|
|
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 =
|
|
3795
|
-
externalAgentId:
|
|
3796
|
-
subAgentExternalAgentRelationId:
|
|
3797
|
-
headers:
|
|
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 =
|
|
3800
|
-
agentId:
|
|
3801
|
-
subAgentTeamAgentRelationId:
|
|
3802
|
-
headers:
|
|
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 =
|
|
3805
|
-
id:
|
|
3806
|
-
name:
|
|
3807
|
-
description:
|
|
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:
|
|
3811
|
-
canUse:
|
|
3810
|
+
type: z.literal("internal"),
|
|
3811
|
+
canUse: z.array(CanUseItemSchema),
|
|
3812
3812
|
// All tools (both MCP and function tools)
|
|
3813
|
-
dataComponents:
|
|
3814
|
-
artifactComponents:
|
|
3815
|
-
canTransferTo:
|
|
3816
|
-
prompt:
|
|
3817
|
-
canDelegateTo:
|
|
3818
|
-
|
|
3819
|
-
|
|
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:
|
|
3829
|
+
subAgents: z.record(z.string(), FullAgentAgentInsertSchema),
|
|
3830
3830
|
// Lookup maps for UI to resolve canUse items
|
|
3831
|
-
tools:
|
|
3831
|
+
tools: z.record(z.string(), ToolApiInsertSchema).optional(),
|
|
3832
3832
|
// MCP tools (project-scoped)
|
|
3833
|
-
externalAgents:
|
|
3833
|
+
externalAgents: z.record(z.string(), ExternalAgentApiInsertSchema).optional(),
|
|
3834
3834
|
// External agents (project-scoped)
|
|
3835
|
-
teamAgents:
|
|
3835
|
+
teamAgents: z.record(z.string(), TeamAgentSchema).optional(),
|
|
3836
3836
|
// Team agents contain basic metadata for the agent to be delegated to
|
|
3837
|
-
functionTools:
|
|
3837
|
+
functionTools: z.record(z.string(), FunctionToolApiInsertSchema).optional(),
|
|
3838
3838
|
// Function tools (agent-scoped)
|
|
3839
|
-
functions:
|
|
3839
|
+
functions: z.record(z.string(), FunctionApiInsertSchema).optional(),
|
|
3840
3840
|
// Get function code for function tools
|
|
3841
|
-
contextConfig:
|
|
3842
|
-
statusUpdates:
|
|
3841
|
+
contextConfig: z.optional(ContextConfigApiInsertSchema),
|
|
3842
|
+
statusUpdates: z.optional(StatusUpdateSchema),
|
|
3843
3843
|
models: ModelSchema.optional(),
|
|
3844
3844
|
stopWhen: AgentStopWhenSchema.optional(),
|
|
3845
|
-
prompt:
|
|
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 =
|
|
3850
|
+
PaginationSchema = z.object({
|
|
3851
3851
|
page: pageNumber,
|
|
3852
3852
|
limit: limitNumber,
|
|
3853
|
-
total:
|
|
3854
|
-
pages:
|
|
3853
|
+
total: z.number(),
|
|
3854
|
+
pages: z.number()
|
|
3855
3855
|
}).openapi("Pagination");
|
|
3856
|
-
ErrorResponseSchema =
|
|
3857
|
-
error:
|
|
3858
|
-
message:
|
|
3859
|
-
details:
|
|
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 =
|
|
3864
|
-
exists:
|
|
3863
|
+
ExistsResponseSchema = z.object({
|
|
3864
|
+
exists: z.boolean()
|
|
3865
3865
|
}).openapi("ExistsResponse");
|
|
3866
|
-
RemovedResponseSchema =
|
|
3867
|
-
message:
|
|
3868
|
-
removed:
|
|
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:
|
|
3896
|
-
tools:
|
|
3897
|
-
functionTools:
|
|
3898
|
-
functions:
|
|
3899
|
-
dataComponents:
|
|
3900
|
-
artifactComponents:
|
|
3901
|
-
externalAgents:
|
|
3902
|
-
statusUpdates:
|
|
3903
|
-
credentialReferences:
|
|
3904
|
-
createdAt:
|
|
3905
|
-
updatedAt:
|
|
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 =
|
|
3908
|
-
SubAgentResponse =
|
|
3909
|
-
AgentResponse =
|
|
3910
|
-
ToolResponse =
|
|
3911
|
-
ExternalAgentResponse =
|
|
3912
|
-
ContextConfigResponse =
|
|
3913
|
-
ApiKeyResponse =
|
|
3914
|
-
CredentialReferenceResponse =
|
|
3915
|
-
FunctionResponse =
|
|
3916
|
-
FunctionToolResponse =
|
|
3917
|
-
DataComponentResponse =
|
|
3918
|
-
ArtifactComponentResponse =
|
|
3919
|
-
SubAgentRelationResponse =
|
|
3920
|
-
SubAgentToolRelationResponse =
|
|
3921
|
-
ConversationResponse =
|
|
3922
|
-
MessageResponse =
|
|
3923
|
-
ProjectListResponse =
|
|
3924
|
-
data:
|
|
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 =
|
|
3928
|
-
data:
|
|
3927
|
+
SubAgentListResponse = z.object({
|
|
3928
|
+
data: z.array(SubAgentApiSelectSchema),
|
|
3929
3929
|
pagination: PaginationSchema
|
|
3930
3930
|
}).openapi("SubAgentListResponse");
|
|
3931
|
-
AgentListResponse =
|
|
3932
|
-
data:
|
|
3931
|
+
AgentListResponse = z.object({
|
|
3932
|
+
data: z.array(AgentApiSelectSchema),
|
|
3933
3933
|
pagination: PaginationSchema
|
|
3934
3934
|
}).openapi("AgentListResponse");
|
|
3935
|
-
ToolListResponse =
|
|
3936
|
-
data:
|
|
3935
|
+
ToolListResponse = z.object({
|
|
3936
|
+
data: z.array(ToolApiSelectSchema),
|
|
3937
3937
|
pagination: PaginationSchema
|
|
3938
3938
|
}).openapi("ToolListResponse");
|
|
3939
|
-
ExternalAgentListResponse =
|
|
3940
|
-
data:
|
|
3939
|
+
ExternalAgentListResponse = z.object({
|
|
3940
|
+
data: z.array(ExternalAgentApiSelectSchema),
|
|
3941
3941
|
pagination: PaginationSchema
|
|
3942
3942
|
}).openapi("ExternalAgentListResponse");
|
|
3943
|
-
ContextConfigListResponse =
|
|
3944
|
-
data:
|
|
3943
|
+
ContextConfigListResponse = z.object({
|
|
3944
|
+
data: z.array(ContextConfigApiSelectSchema),
|
|
3945
3945
|
pagination: PaginationSchema
|
|
3946
3946
|
}).openapi("ContextConfigListResponse");
|
|
3947
|
-
ApiKeyListResponse =
|
|
3948
|
-
data:
|
|
3947
|
+
ApiKeyListResponse = z.object({
|
|
3948
|
+
data: z.array(ApiKeyApiSelectSchema),
|
|
3949
3949
|
pagination: PaginationSchema
|
|
3950
3950
|
}).openapi("ApiKeyListResponse");
|
|
3951
|
-
CredentialReferenceListResponse =
|
|
3952
|
-
data:
|
|
3951
|
+
CredentialReferenceListResponse = z.object({
|
|
3952
|
+
data: z.array(CredentialReferenceApiSelectSchema),
|
|
3953
3953
|
pagination: PaginationSchema
|
|
3954
3954
|
}).openapi("CredentialReferenceListResponse");
|
|
3955
|
-
FunctionListResponse =
|
|
3956
|
-
data:
|
|
3955
|
+
FunctionListResponse = z.object({
|
|
3956
|
+
data: z.array(FunctionApiSelectSchema),
|
|
3957
3957
|
pagination: PaginationSchema
|
|
3958
3958
|
}).openapi("FunctionListResponse");
|
|
3959
|
-
FunctionToolListResponse =
|
|
3960
|
-
data:
|
|
3959
|
+
FunctionToolListResponse = z.object({
|
|
3960
|
+
data: z.array(FunctionToolApiSelectSchema),
|
|
3961
3961
|
pagination: PaginationSchema
|
|
3962
3962
|
}).openapi("FunctionToolListResponse");
|
|
3963
|
-
DataComponentListResponse =
|
|
3964
|
-
data:
|
|
3963
|
+
DataComponentListResponse = z.object({
|
|
3964
|
+
data: z.array(DataComponentApiSelectSchema),
|
|
3965
3965
|
pagination: PaginationSchema
|
|
3966
3966
|
}).openapi("DataComponentListResponse");
|
|
3967
|
-
ArtifactComponentListResponse =
|
|
3968
|
-
data:
|
|
3967
|
+
ArtifactComponentListResponse = z.object({
|
|
3968
|
+
data: z.array(ArtifactComponentApiSelectSchema),
|
|
3969
3969
|
pagination: PaginationSchema
|
|
3970
3970
|
}).openapi("ArtifactComponentListResponse");
|
|
3971
|
-
SubAgentRelationListResponse =
|
|
3972
|
-
data:
|
|
3971
|
+
SubAgentRelationListResponse = z.object({
|
|
3972
|
+
data: z.array(SubAgentRelationApiSelectSchema),
|
|
3973
3973
|
pagination: PaginationSchema
|
|
3974
3974
|
}).openapi("SubAgentRelationListResponse");
|
|
3975
|
-
SubAgentToolRelationListResponse =
|
|
3976
|
-
data:
|
|
3975
|
+
SubAgentToolRelationListResponse = z.object({
|
|
3976
|
+
data: z.array(SubAgentToolRelationApiSelectSchema),
|
|
3977
3977
|
pagination: PaginationSchema
|
|
3978
3978
|
}).openapi("SubAgentToolRelationListResponse");
|
|
3979
|
-
ConversationListResponse =
|
|
3980
|
-
data:
|
|
3979
|
+
ConversationListResponse = z.object({
|
|
3980
|
+
data: z.array(ConversationApiSelectSchema),
|
|
3981
3981
|
pagination: PaginationSchema
|
|
3982
3982
|
}).openapi("ConversationListResponse");
|
|
3983
|
-
MessageListResponse =
|
|
3984
|
-
data:
|
|
3983
|
+
MessageListResponse = z.object({
|
|
3984
|
+
data: z.array(MessageApiSelectSchema),
|
|
3985
3985
|
pagination: PaginationSchema
|
|
3986
3986
|
}).openapi("MessageListResponse");
|
|
3987
|
-
SubAgentDataComponentResponse =
|
|
3988
|
-
SubAgentArtifactComponentResponse =
|
|
3989
|
-
SubAgentDataComponentListResponse =
|
|
3990
|
-
data:
|
|
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 =
|
|
3994
|
-
data:
|
|
3993
|
+
SubAgentArtifactComponentListResponse = z.object({
|
|
3994
|
+
data: z.array(SubAgentArtifactComponentApiSelectSchema),
|
|
3995
3995
|
pagination: PaginationSchema
|
|
3996
3996
|
}).openapi("SubAgentArtifactComponentListResponse");
|
|
3997
|
-
FullProjectDefinitionResponse =
|
|
3998
|
-
AgentWithinContextOfProjectResponse =
|
|
3999
|
-
RelatedAgentInfoListResponse =
|
|
4000
|
-
data:
|
|
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 =
|
|
4004
|
-
McpToolResponse =
|
|
4005
|
-
McpToolListResponse =
|
|
4006
|
-
data:
|
|
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 =
|
|
4010
|
-
SubAgentTeamAgentRelationListResponse =
|
|
4011
|
-
data:
|
|
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 =
|
|
4015
|
-
SubAgentExternalAgentRelationListResponse =
|
|
4016
|
-
data:
|
|
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 =
|
|
4020
|
-
ArtifactComponentArrayResponse =
|
|
4021
|
-
HeadersScopeSchema =
|
|
4022
|
-
"x-inkeep-tenant-id":
|
|
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":
|
|
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":
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
4091
|
+
PaginationQueryParamsSchema = z.object({
|
|
4092
4092
|
page: pageNumber,
|
|
4093
4093
|
limit: limitNumber
|
|
4094
4094
|
}).openapi("PaginationQueryParams");
|
|
4095
|
-
PrebuiltMCPServerSchema =
|
|
4096
|
-
id:
|
|
4097
|
-
name:
|
|
4098
|
-
url:
|
|
4099
|
-
transport:
|
|
4100
|
-
imageUrl:
|
|
4101
|
-
isOpen:
|
|
4102
|
-
category:
|
|
4103
|
-
description:
|
|
4104
|
-
thirdPartyConnectAccountUrl:
|
|
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 =
|
|
4107
|
-
data:
|
|
4106
|
+
MCPCatalogListResponse = z.object({
|
|
4107
|
+
data: z.array(PrebuiltMCPServerSchema)
|
|
4108
4108
|
}).openapi("MCPCatalogListResponse");
|
|
4109
|
-
ThirdPartyMCPServerResponse =
|
|
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
|
|
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 =
|
|
218993
|
-
CursorSchema =
|
|
218994
|
-
RequestMetaSchema =
|
|
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:
|
|
218998
|
+
progressToken: z3.optional(ProgressTokenSchema)
|
|
218999
218999
|
}).passthrough();
|
|
219000
|
-
BaseRequestParamsSchema =
|
|
219001
|
-
_meta:
|
|
219000
|
+
BaseRequestParamsSchema = z3.object({
|
|
219001
|
+
_meta: z3.optional(RequestMetaSchema)
|
|
219002
219002
|
}).passthrough();
|
|
219003
|
-
RequestSchema =
|
|
219004
|
-
method:
|
|
219005
|
-
params:
|
|
219003
|
+
RequestSchema = z3.object({
|
|
219004
|
+
method: z3.string(),
|
|
219005
|
+
params: z3.optional(BaseRequestParamsSchema)
|
|
219006
219006
|
});
|
|
219007
|
-
BaseNotificationParamsSchema =
|
|
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:
|
|
219012
|
+
_meta: z3.optional(z3.object({}).passthrough())
|
|
219013
219013
|
}).passthrough();
|
|
219014
|
-
NotificationSchema =
|
|
219015
|
-
method:
|
|
219016
|
-
params:
|
|
219014
|
+
NotificationSchema = z3.object({
|
|
219015
|
+
method: z3.string(),
|
|
219016
|
+
params: z3.optional(BaseNotificationParamsSchema)
|
|
219017
219017
|
});
|
|
219018
|
-
ResultSchema =
|
|
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:
|
|
219023
|
+
_meta: z3.optional(z3.object({}).passthrough())
|
|
219024
219024
|
}).passthrough();
|
|
219025
|
-
RequestIdSchema =
|
|
219026
|
-
JSONRPCRequestSchema =
|
|
219027
|
-
jsonrpc:
|
|
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 =
|
|
219031
|
-
jsonrpc:
|
|
219030
|
+
JSONRPCNotificationSchema = z3.object({
|
|
219031
|
+
jsonrpc: z3.literal(JSONRPC_VERSION)
|
|
219032
219032
|
}).merge(NotificationSchema).strict();
|
|
219033
|
-
JSONRPCResponseSchema =
|
|
219034
|
-
jsonrpc:
|
|
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 =
|
|
219048
|
-
jsonrpc:
|
|
219047
|
+
JSONRPCErrorSchema = z3.object({
|
|
219048
|
+
jsonrpc: z3.literal(JSONRPC_VERSION),
|
|
219049
219049
|
id: RequestIdSchema,
|
|
219050
|
-
error:
|
|
219050
|
+
error: z3.object({
|
|
219051
219051
|
/**
|
|
219052
219052
|
* The error type that occurred.
|
|
219053
219053
|
*/
|
|
219054
|
-
code:
|
|
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:
|
|
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:
|
|
219062
|
+
data: z3.optional(z3.unknown())
|
|
219063
219063
|
})
|
|
219064
219064
|
}).strict();
|
|
219065
|
-
JSONRPCMessageSchema =
|
|
219065
|
+
JSONRPCMessageSchema = z3.union([JSONRPCRequestSchema, JSONRPCNotificationSchema, JSONRPCResponseSchema, JSONRPCErrorSchema]);
|
|
219066
219066
|
EmptyResultSchema = ResultSchema.strict();
|
|
219067
219067
|
CancelledNotificationSchema = NotificationSchema.extend({
|
|
219068
|
-
method:
|
|
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:
|
|
219079
|
+
reason: z3.string().optional()
|
|
219080
219080
|
})
|
|
219081
219081
|
});
|
|
219082
|
-
IconSchema =
|
|
219082
|
+
IconSchema = z3.object({
|
|
219083
219083
|
/**
|
|
219084
219084
|
* URL or data URI for the icon.
|
|
219085
219085
|
*/
|
|
219086
|
-
src:
|
|
219086
|
+
src: z3.string(),
|
|
219087
219087
|
/**
|
|
219088
219088
|
* Optional MIME type for the icon.
|
|
219089
219089
|
*/
|
|
219090
|
-
mimeType:
|
|
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:
|
|
219097
|
+
sizes: z3.optional(z3.array(z3.string()))
|
|
219098
219098
|
}).passthrough();
|
|
219099
|
-
IconsSchema =
|
|
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:
|
|
219111
|
+
icons: z3.array(IconSchema).optional()
|
|
219112
219112
|
}).passthrough();
|
|
219113
|
-
BaseMetadataSchema =
|
|
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:
|
|
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:
|
|
219124
|
+
title: z3.optional(z3.string())
|
|
219125
219125
|
}).passthrough();
|
|
219126
219126
|
ImplementationSchema = BaseMetadataSchema.extend({
|
|
219127
|
-
version:
|
|
219127
|
+
version: z3.string(),
|
|
219128
219128
|
/**
|
|
219129
219129
|
* An optional URL of the website for this implementation.
|
|
219130
219130
|
*/
|
|
219131
|
-
websiteUrl:
|
|
219131
|
+
websiteUrl: z3.optional(z3.string())
|
|
219132
219132
|
}).merge(IconsSchema);
|
|
219133
|
-
ClientCapabilitiesSchema =
|
|
219133
|
+
ClientCapabilitiesSchema = z3.object({
|
|
219134
219134
|
/**
|
|
219135
219135
|
* Experimental, non-standard capabilities that the client supports.
|
|
219136
219136
|
*/
|
|
219137
|
-
experimental:
|
|
219137
|
+
experimental: z3.optional(z3.object({}).passthrough()),
|
|
219138
219138
|
/**
|
|
219139
219139
|
* Present if the client supports sampling from an LLM.
|
|
219140
219140
|
*/
|
|
219141
|
-
sampling:
|
|
219141
|
+
sampling: z3.optional(z3.object({}).passthrough()),
|
|
219142
219142
|
/**
|
|
219143
219143
|
* Present if the client supports eliciting user input.
|
|
219144
219144
|
*/
|
|
219145
|
-
elicitation:
|
|
219145
|
+
elicitation: z3.optional(z3.object({}).passthrough()),
|
|
219146
219146
|
/**
|
|
219147
219147
|
* Present if the client supports listing roots.
|
|
219148
219148
|
*/
|
|
219149
|
-
roots:
|
|
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:
|
|
219153
|
+
listChanged: z3.optional(z3.boolean())
|
|
219154
219154
|
}).passthrough())
|
|
219155
219155
|
}).passthrough();
|
|
219156
219156
|
InitializeRequestSchema = RequestSchema.extend({
|
|
219157
|
-
method:
|
|
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:
|
|
219162
|
+
protocolVersion: z3.string(),
|
|
219163
219163
|
capabilities: ClientCapabilitiesSchema,
|
|
219164
219164
|
clientInfo: ImplementationSchema
|
|
219165
219165
|
})
|
|
219166
219166
|
});
|
|
219167
|
-
ServerCapabilitiesSchema =
|
|
219167
|
+
ServerCapabilitiesSchema = z3.object({
|
|
219168
219168
|
/**
|
|
219169
219169
|
* Experimental, non-standard capabilities that the server supports.
|
|
219170
219170
|
*/
|
|
219171
|
-
experimental:
|
|
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:
|
|
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:
|
|
219179
|
+
completions: z3.optional(z3.object({}).passthrough()),
|
|
219180
219180
|
/**
|
|
219181
219181
|
* Present if the server offers any prompt templates.
|
|
219182
219182
|
*/
|
|
219183
|
-
prompts:
|
|
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:
|
|
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:
|
|
219192
|
+
resources: z3.optional(z3.object({
|
|
219193
219193
|
/**
|
|
219194
219194
|
* Whether this server supports clients subscribing to resource updates.
|
|
219195
219195
|
*/
|
|
219196
|
-
subscribe:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
219224
|
+
instructions: z3.optional(z3.string())
|
|
219225
219225
|
});
|
|
219226
219226
|
InitializedNotificationSchema = NotificationSchema.extend({
|
|
219227
|
-
method:
|
|
219227
|
+
method: z3.literal("notifications/initialized")
|
|
219228
219228
|
});
|
|
219229
219229
|
PingRequestSchema = RequestSchema.extend({
|
|
219230
|
-
method:
|
|
219230
|
+
method: z3.literal("ping")
|
|
219231
219231
|
});
|
|
219232
|
-
ProgressSchema =
|
|
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:
|
|
219236
|
+
progress: z3.number(),
|
|
219237
219237
|
/**
|
|
219238
219238
|
* Total number of items to process (or total progress required), if known.
|
|
219239
219239
|
*/
|
|
219240
|
-
total:
|
|
219240
|
+
total: z3.optional(z3.number()),
|
|
219241
219241
|
/**
|
|
219242
219242
|
* An optional message describing the current progress.
|
|
219243
219243
|
*/
|
|
219244
|
-
message:
|
|
219244
|
+
message: z3.optional(z3.string())
|
|
219245
219245
|
}).passthrough();
|
|
219246
219246
|
ProgressNotificationSchema = NotificationSchema.extend({
|
|
219247
|
-
method:
|
|
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:
|
|
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:
|
|
219269
|
+
nextCursor: z3.optional(CursorSchema)
|
|
219270
219270
|
});
|
|
219271
|
-
ResourceContentsSchema =
|
|
219271
|
+
ResourceContentsSchema = z3.object({
|
|
219272
219272
|
/**
|
|
219273
219273
|
* The URI of this resource.
|
|
219274
219274
|
*/
|
|
219275
|
-
uri:
|
|
219275
|
+
uri: z3.string(),
|
|
219276
219276
|
/**
|
|
219277
219277
|
* The MIME type of this resource, if known.
|
|
219278
219278
|
*/
|
|
219279
|
-
mimeType:
|
|
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:
|
|
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:
|
|
219290
|
+
text: z3.string()
|
|
219291
219291
|
});
|
|
219292
|
-
Base64Schema =
|
|
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:
|
|
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:
|
|
219316
|
+
description: z3.optional(z3.string()),
|
|
219317
219317
|
/**
|
|
219318
219318
|
* The MIME type of this resource, if known.
|
|
219319
219319
|
*/
|
|
219320
|
-
mimeType:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
219346
|
+
_meta: z3.optional(z3.object({}).passthrough())
|
|
219347
219347
|
}).merge(IconsSchema);
|
|
219348
219348
|
ListResourcesRequestSchema = PaginatedRequestSchema.extend({
|
|
219349
|
-
method:
|
|
219349
|
+
method: z3.literal("resources/list")
|
|
219350
219350
|
});
|
|
219351
219351
|
ListResourcesResultSchema = PaginatedResultSchema.extend({
|
|
219352
|
-
resources:
|
|
219352
|
+
resources: z3.array(ResourceSchema)
|
|
219353
219353
|
});
|
|
219354
219354
|
ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({
|
|
219355
|
-
method:
|
|
219355
|
+
method: z3.literal("resources/templates/list")
|
|
219356
219356
|
});
|
|
219357
219357
|
ListResourceTemplatesResultSchema = PaginatedResultSchema.extend({
|
|
219358
|
-
resourceTemplates:
|
|
219358
|
+
resourceTemplates: z3.array(ResourceTemplateSchema)
|
|
219359
219359
|
});
|
|
219360
219360
|
ReadResourceRequestSchema = RequestSchema.extend({
|
|
219361
|
-
method:
|
|
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:
|
|
219366
|
+
uri: z3.string()
|
|
219367
219367
|
})
|
|
219368
219368
|
});
|
|
219369
219369
|
ReadResourceResultSchema = ResultSchema.extend({
|
|
219370
|
-
contents:
|
|
219370
|
+
contents: z3.array(z3.union([TextResourceContentsSchema, BlobResourceContentsSchema]))
|
|
219371
219371
|
});
|
|
219372
219372
|
ResourceListChangedNotificationSchema = NotificationSchema.extend({
|
|
219373
|
-
method:
|
|
219373
|
+
method: z3.literal("notifications/resources/list_changed")
|
|
219374
219374
|
});
|
|
219375
219375
|
SubscribeRequestSchema = RequestSchema.extend({
|
|
219376
|
-
method:
|
|
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:
|
|
219381
|
+
uri: z3.string()
|
|
219382
219382
|
})
|
|
219383
219383
|
});
|
|
219384
219384
|
UnsubscribeRequestSchema = RequestSchema.extend({
|
|
219385
|
-
method:
|
|
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:
|
|
219390
|
+
uri: z3.string()
|
|
219391
219391
|
})
|
|
219392
219392
|
});
|
|
219393
219393
|
ResourceUpdatedNotificationSchema = NotificationSchema.extend({
|
|
219394
|
-
method:
|
|
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:
|
|
219399
|
+
uri: z3.string()
|
|
219400
219400
|
})
|
|
219401
219401
|
});
|
|
219402
|
-
PromptArgumentSchema =
|
|
219402
|
+
PromptArgumentSchema = z3.object({
|
|
219403
219403
|
/**
|
|
219404
219404
|
* The name of the argument.
|
|
219405
219405
|
*/
|
|
219406
|
-
name:
|
|
219406
|
+
name: z3.string(),
|
|
219407
219407
|
/**
|
|
219408
219408
|
* A human-readable description of the argument.
|
|
219409
219409
|
*/
|
|
219410
|
-
description:
|
|
219410
|
+
description: z3.optional(z3.string()),
|
|
219411
219411
|
/**
|
|
219412
219412
|
* Whether this argument must be provided.
|
|
219413
219413
|
*/
|
|
219414
|
-
required:
|
|
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:
|
|
219420
|
+
description: z3.optional(z3.string()),
|
|
219421
219421
|
/**
|
|
219422
219422
|
* A list of arguments to use for templating the prompt.
|
|
219423
219423
|
*/
|
|
219424
|
-
arguments:
|
|
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:
|
|
219429
|
+
_meta: z3.optional(z3.object({}).passthrough())
|
|
219430
219430
|
}).merge(IconsSchema);
|
|
219431
219431
|
ListPromptsRequestSchema = PaginatedRequestSchema.extend({
|
|
219432
|
-
method:
|
|
219432
|
+
method: z3.literal("prompts/list")
|
|
219433
219433
|
});
|
|
219434
219434
|
ListPromptsResultSchema = PaginatedResultSchema.extend({
|
|
219435
|
-
prompts:
|
|
219435
|
+
prompts: z3.array(PromptSchema)
|
|
219436
219436
|
});
|
|
219437
219437
|
GetPromptRequestSchema = RequestSchema.extend({
|
|
219438
|
-
method:
|
|
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:
|
|
219443
|
+
name: z3.string(),
|
|
219444
219444
|
/**
|
|
219445
219445
|
* Arguments to use for templating the prompt.
|
|
219446
219446
|
*/
|
|
219447
|
-
arguments:
|
|
219447
|
+
arguments: z3.optional(z3.record(z3.string()))
|
|
219448
219448
|
})
|
|
219449
219449
|
});
|
|
219450
|
-
TextContentSchema =
|
|
219451
|
-
type:
|
|
219450
|
+
TextContentSchema = z3.object({
|
|
219451
|
+
type: z3.literal("text"),
|
|
219452
219452
|
/**
|
|
219453
219453
|
* The text content of the message.
|
|
219454
219454
|
*/
|
|
219455
|
-
text:
|
|
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:
|
|
219460
|
+
_meta: z3.optional(z3.object({}).passthrough())
|
|
219461
219461
|
}).passthrough();
|
|
219462
|
-
ImageContentSchema =
|
|
219463
|
-
type:
|
|
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:
|
|
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:
|
|
219476
|
+
_meta: z3.optional(z3.object({}).passthrough())
|
|
219477
219477
|
}).passthrough();
|
|
219478
|
-
AudioContentSchema =
|
|
219479
|
-
type:
|
|
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:
|
|
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:
|
|
219492
|
+
_meta: z3.optional(z3.object({}).passthrough())
|
|
219493
219493
|
}).passthrough();
|
|
219494
|
-
EmbeddedResourceSchema =
|
|
219495
|
-
type:
|
|
219496
|
-
resource:
|
|
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:
|
|
219501
|
+
_meta: z3.optional(z3.object({}).passthrough())
|
|
219502
219502
|
}).passthrough();
|
|
219503
219503
|
ResourceLinkSchema = ResourceSchema.extend({
|
|
219504
|
-
type:
|
|
219504
|
+
type: z3.literal("resource_link")
|
|
219505
219505
|
});
|
|
219506
|
-
ContentBlockSchema =
|
|
219506
|
+
ContentBlockSchema = z3.union([
|
|
219507
219507
|
TextContentSchema,
|
|
219508
219508
|
ImageContentSchema,
|
|
219509
219509
|
AudioContentSchema,
|
|
219510
219510
|
ResourceLinkSchema,
|
|
219511
219511
|
EmbeddedResourceSchema
|
|
219512
219512
|
]);
|
|
219513
|
-
PromptMessageSchema =
|
|
219514
|
-
role:
|
|
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:
|
|
219522
|
-
messages:
|
|
219521
|
+
description: z3.optional(z3.string()),
|
|
219522
|
+
messages: z3.array(PromptMessageSchema)
|
|
219523
219523
|
});
|
|
219524
219524
|
PromptListChangedNotificationSchema = NotificationSchema.extend({
|
|
219525
|
-
method:
|
|
219525
|
+
method: z3.literal("notifications/prompts/list_changed")
|
|
219526
219526
|
});
|
|
219527
|
-
ToolAnnotationsSchema =
|
|
219527
|
+
ToolAnnotationsSchema = z3.object({
|
|
219528
219528
|
/**
|
|
219529
219529
|
* A human-readable title for the tool.
|
|
219530
219530
|
*/
|
|
219531
|
-
title:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
219575
|
-
type:
|
|
219576
|
-
properties:
|
|
219577
|
-
required:
|
|
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:
|
|
219584
|
-
type:
|
|
219585
|
-
properties:
|
|
219586
|
-
required:
|
|
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:
|
|
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:
|
|
219596
|
+
_meta: z3.optional(z3.object({}).passthrough())
|
|
219597
219597
|
}).merge(IconsSchema);
|
|
219598
219598
|
ListToolsRequestSchema = PaginatedRequestSchema.extend({
|
|
219599
|
-
method:
|
|
219599
|
+
method: z3.literal("tools/list")
|
|
219600
219600
|
});
|
|
219601
219601
|
ListToolsResultSchema = PaginatedResultSchema.extend({
|
|
219602
|
-
tools:
|
|
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:
|
|
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:
|
|
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:
|
|
219632
|
+
isError: z3.optional(z3.boolean())
|
|
219633
219633
|
});
|
|
219634
219634
|
CompatibilityCallToolResultSchema = CallToolResultSchema.or(ResultSchema.extend({
|
|
219635
|
-
toolResult:
|
|
219635
|
+
toolResult: z3.unknown()
|
|
219636
219636
|
}));
|
|
219637
219637
|
CallToolRequestSchema = RequestSchema.extend({
|
|
219638
|
-
method:
|
|
219638
|
+
method: z3.literal("tools/call"),
|
|
219639
219639
|
params: BaseRequestParamsSchema.extend({
|
|
219640
|
-
name:
|
|
219641
|
-
arguments:
|
|
219640
|
+
name: z3.string(),
|
|
219641
|
+
arguments: z3.optional(z3.record(z3.unknown()))
|
|
219642
219642
|
})
|
|
219643
219643
|
});
|
|
219644
219644
|
ToolListChangedNotificationSchema = NotificationSchema.extend({
|
|
219645
|
-
method:
|
|
219645
|
+
method: z3.literal("notifications/tools/list_changed")
|
|
219646
219646
|
});
|
|
219647
|
-
LoggingLevelSchema =
|
|
219647
|
+
LoggingLevelSchema = z3.enum(["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"]);
|
|
219648
219648
|
SetLevelRequestSchema = RequestSchema.extend({
|
|
219649
|
-
method:
|
|
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:
|
|
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:
|
|
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:
|
|
219671
|
+
data: z3.unknown()
|
|
219672
219672
|
})
|
|
219673
219673
|
});
|
|
219674
|
-
ModelHintSchema =
|
|
219674
|
+
ModelHintSchema = z3.object({
|
|
219675
219675
|
/**
|
|
219676
219676
|
* A hint for a model name.
|
|
219677
219677
|
*/
|
|
219678
|
-
name:
|
|
219678
|
+
name: z3.string().optional()
|
|
219679
219679
|
}).passthrough();
|
|
219680
|
-
ModelPreferencesSchema =
|
|
219680
|
+
ModelPreferencesSchema = z3.object({
|
|
219681
219681
|
/**
|
|
219682
219682
|
* Optional hints to use for model selection.
|
|
219683
219683
|
*/
|
|
219684
|
-
hints:
|
|
219684
|
+
hints: z3.optional(z3.array(ModelHintSchema)),
|
|
219685
219685
|
/**
|
|
219686
219686
|
* How much to prioritize cost when selecting a model.
|
|
219687
219687
|
*/
|
|
219688
|
-
costPriority:
|
|
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:
|
|
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:
|
|
219696
|
+
intelligencePriority: z3.optional(z3.number().min(0).max(1))
|
|
219697
219697
|
}).passthrough();
|
|
219698
|
-
SamplingMessageSchema =
|
|
219699
|
-
role:
|
|
219700
|
-
content:
|
|
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:
|
|
219703
|
+
method: z3.literal("sampling/createMessage"),
|
|
219704
219704
|
params: BaseRequestParamsSchema.extend({
|
|
219705
|
-
messages:
|
|
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:
|
|
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:
|
|
219714
|
-
temperature:
|
|
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:
|
|
219719
|
-
stopSequences:
|
|
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:
|
|
219723
|
+
metadata: z3.optional(z3.object({}).passthrough()),
|
|
219724
219724
|
/**
|
|
219725
219725
|
* The server's preferences for which model to select.
|
|
219726
219726
|
*/
|
|
219727
|
-
modelPreferences:
|
|
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:
|
|
219734
|
+
model: z3.string(),
|
|
219735
219735
|
/**
|
|
219736
219736
|
* The reason why sampling stopped.
|
|
219737
219737
|
*/
|
|
219738
|
-
stopReason:
|
|
219739
|
-
role:
|
|
219740
|
-
content:
|
|
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 =
|
|
219743
|
-
type:
|
|
219744
|
-
title:
|
|
219745
|
-
description:
|
|
219746
|
-
default:
|
|
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 =
|
|
219749
|
-
type:
|
|
219750
|
-
title:
|
|
219751
|
-
description:
|
|
219752
|
-
minLength:
|
|
219753
|
-
maxLength:
|
|
219754
|
-
format:
|
|
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 =
|
|
219757
|
-
type:
|
|
219758
|
-
title:
|
|
219759
|
-
description:
|
|
219760
|
-
minimum:
|
|
219761
|
-
maximum:
|
|
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 =
|
|
219764
|
-
type:
|
|
219765
|
-
title:
|
|
219766
|
-
description:
|
|
219767
|
-
enum:
|
|
219768
|
-
enumNames:
|
|
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 =
|
|
219770
|
+
PrimitiveSchemaDefinitionSchema = z3.union([BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema, EnumSchemaSchema]);
|
|
219771
219771
|
ElicitRequestSchema = RequestSchema.extend({
|
|
219772
|
-
method:
|
|
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:
|
|
219777
|
+
message: z3.string(),
|
|
219778
219778
|
/**
|
|
219779
219779
|
* The schema for the requested user input.
|
|
219780
219780
|
*/
|
|
219781
|
-
requestedSchema:
|
|
219782
|
-
type:
|
|
219783
|
-
properties:
|
|
219784
|
-
required:
|
|
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:
|
|
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:
|
|
219796
|
+
content: z3.optional(z3.record(z3.string(), z3.unknown()))
|
|
219797
219797
|
});
|
|
219798
|
-
ResourceTemplateReferenceSchema =
|
|
219799
|
-
type:
|
|
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:
|
|
219803
|
+
uri: z3.string()
|
|
219804
219804
|
}).passthrough();
|
|
219805
|
-
PromptReferenceSchema =
|
|
219806
|
-
type:
|
|
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:
|
|
219810
|
+
name: z3.string()
|
|
219811
219811
|
}).passthrough();
|
|
219812
219812
|
CompleteRequestSchema = RequestSchema.extend({
|
|
219813
|
-
method:
|
|
219813
|
+
method: z3.literal("completion/complete"),
|
|
219814
219814
|
params: BaseRequestParamsSchema.extend({
|
|
219815
|
-
ref:
|
|
219815
|
+
ref: z3.union([PromptReferenceSchema, ResourceTemplateReferenceSchema]),
|
|
219816
219816
|
/**
|
|
219817
219817
|
* The argument's information
|
|
219818
219818
|
*/
|
|
219819
|
-
argument:
|
|
219819
|
+
argument: z3.object({
|
|
219820
219820
|
/**
|
|
219821
219821
|
* The name of the argument
|
|
219822
219822
|
*/
|
|
219823
|
-
name:
|
|
219823
|
+
name: z3.string(),
|
|
219824
219824
|
/**
|
|
219825
219825
|
* The value of the argument to use for completion matching.
|
|
219826
219826
|
*/
|
|
219827
|
-
value:
|
|
219827
|
+
value: z3.string()
|
|
219828
219828
|
}).passthrough(),
|
|
219829
|
-
context:
|
|
219829
|
+
context: z3.optional(z3.object({
|
|
219830
219830
|
/**
|
|
219831
219831
|
* Previously-resolved variables in a URI template or prompt.
|
|
219832
219832
|
*/
|
|
219833
|
-
arguments:
|
|
219833
|
+
arguments: z3.optional(z3.record(z3.string(), z3.string()))
|
|
219834
219834
|
}))
|
|
219835
219835
|
})
|
|
219836
219836
|
});
|
|
219837
219837
|
CompleteResultSchema = ResultSchema.extend({
|
|
219838
|
-
completion:
|
|
219838
|
+
completion: z3.object({
|
|
219839
219839
|
/**
|
|
219840
219840
|
* An array of completion values. Must not exceed 100 items.
|
|
219841
219841
|
*/
|
|
219842
|
-
values:
|
|
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:
|
|
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:
|
|
219850
|
+
hasMore: z3.optional(z3.boolean())
|
|
219851
219851
|
}).passthrough()
|
|
219852
219852
|
});
|
|
219853
|
-
RootSchema =
|
|
219853
|
+
RootSchema = z3.object({
|
|
219854
219854
|
/**
|
|
219855
219855
|
* The URI identifying the root. This *must* start with file:// for now.
|
|
219856
219856
|
*/
|
|
219857
|
-
uri:
|
|
219857
|
+
uri: z3.string().startsWith("file://"),
|
|
219858
219858
|
/**
|
|
219859
219859
|
* An optional name for the root.
|
|
219860
219860
|
*/
|
|
219861
|
-
name:
|
|
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:
|
|
219866
|
+
_meta: z3.optional(z3.object({}).passthrough())
|
|
219867
219867
|
}).passthrough();
|
|
219868
219868
|
ListRootsRequestSchema = RequestSchema.extend({
|
|
219869
|
-
method:
|
|
219869
|
+
method: z3.literal("roots/list")
|
|
219870
219870
|
});
|
|
219871
219871
|
ListRootsResultSchema = ResultSchema.extend({
|
|
219872
|
-
roots:
|
|
219872
|
+
roots: z3.array(RootSchema)
|
|
219873
219873
|
});
|
|
219874
219874
|
RootsListChangedNotificationSchema = NotificationSchema.extend({
|
|
219875
|
-
method:
|
|
219875
|
+
method: z3.literal("notifications/roots/list_changed")
|
|
219876
219876
|
});
|
|
219877
|
-
ClientRequestSchema =
|
|
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 =
|
|
219892
|
+
ClientNotificationSchema = z3.union([
|
|
219893
219893
|
CancelledNotificationSchema,
|
|
219894
219894
|
ProgressNotificationSchema,
|
|
219895
219895
|
InitializedNotificationSchema,
|
|
219896
219896
|
RootsListChangedNotificationSchema
|
|
219897
219897
|
]);
|
|
219898
|
-
ClientResultSchema =
|
|
219899
|
-
ServerRequestSchema =
|
|
219900
|
-
ServerNotificationSchema =
|
|
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 =
|
|
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
|
|
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 =
|
|
219931
|
+
SafeUrlSchema = z4.string().url().superRefine((val, ctx) => {
|
|
219932
219932
|
if (!URL.canParse(val)) {
|
|
219933
219933
|
ctx.addIssue({
|
|
219934
|
-
code:
|
|
219934
|
+
code: z4.ZodIssueCode.custom,
|
|
219935
219935
|
message: "URL must be parseable",
|
|
219936
219936
|
fatal: true
|
|
219937
219937
|
});
|
|
219938
|
-
return
|
|
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 =
|
|
219945
|
-
resource:
|
|
219946
|
-
authorization_servers:
|
|
219947
|
-
jwks_uri:
|
|
219948
|
-
scopes_supported:
|
|
219949
|
-
bearer_methods_supported:
|
|
219950
|
-
resource_signing_alg_values_supported:
|
|
219951
|
-
resource_name:
|
|
219952
|
-
resource_documentation:
|
|
219953
|
-
resource_policy_uri:
|
|
219954
|
-
resource_tos_uri:
|
|
219955
|
-
tls_client_certificate_bound_access_tokens:
|
|
219956
|
-
authorization_details_types_supported:
|
|
219957
|
-
dpop_signing_alg_values_supported:
|
|
219958
|
-
dpop_bound_access_tokens_required:
|
|
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 =
|
|
219961
|
-
issuer:
|
|
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:
|
|
219966
|
-
response_types_supported:
|
|
219967
|
-
response_modes_supported:
|
|
219968
|
-
grant_types_supported:
|
|
219969
|
-
token_endpoint_auth_methods_supported:
|
|
219970
|
-
token_endpoint_auth_signing_alg_values_supported:
|
|
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:
|
|
219974
|
-
revocation_endpoint_auth_signing_alg_values_supported:
|
|
219975
|
-
introspection_endpoint:
|
|
219976
|
-
introspection_endpoint_auth_methods_supported:
|
|
219977
|
-
introspection_endpoint_auth_signing_alg_values_supported:
|
|
219978
|
-
code_challenge_methods_supported:
|
|
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 =
|
|
219981
|
-
issuer:
|
|
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:
|
|
219988
|
-
response_types_supported:
|
|
219989
|
-
response_modes_supported:
|
|
219990
|
-
grant_types_supported:
|
|
219991
|
-
acr_values_supported:
|
|
219992
|
-
subject_types_supported:
|
|
219993
|
-
id_token_signing_alg_values_supported:
|
|
219994
|
-
id_token_encryption_alg_values_supported:
|
|
219995
|
-
id_token_encryption_enc_values_supported:
|
|
219996
|
-
userinfo_signing_alg_values_supported:
|
|
219997
|
-
userinfo_encryption_alg_values_supported:
|
|
219998
|
-
userinfo_encryption_enc_values_supported:
|
|
219999
|
-
request_object_signing_alg_values_supported:
|
|
220000
|
-
request_object_encryption_alg_values_supported:
|
|
220001
|
-
request_object_encryption_enc_values_supported:
|
|
220002
|
-
token_endpoint_auth_methods_supported:
|
|
220003
|
-
token_endpoint_auth_signing_alg_values_supported:
|
|
220004
|
-
display_values_supported:
|
|
220005
|
-
claim_types_supported:
|
|
220006
|
-
claims_supported:
|
|
220007
|
-
service_documentation:
|
|
220008
|
-
claims_locales_supported:
|
|
220009
|
-
ui_locales_supported:
|
|
220010
|
-
claims_parameter_supported:
|
|
220011
|
-
request_parameter_supported:
|
|
220012
|
-
request_uri_parameter_supported:
|
|
220013
|
-
require_request_uri_registration:
|
|
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 =
|
|
220021
|
-
access_token:
|
|
220022
|
-
id_token:
|
|
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:
|
|
220025
|
-
expires_in:
|
|
220026
|
-
scope:
|
|
220027
|
-
refresh_token:
|
|
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 =
|
|
220030
|
-
error:
|
|
220031
|
-
error_description:
|
|
220032
|
-
error_uri:
|
|
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(
|
|
220035
|
-
OAuthClientMetadataSchema =
|
|
220036
|
-
redirect_uris:
|
|
220037
|
-
token_endpoint_auth_method:
|
|
220038
|
-
grant_types:
|
|
220039
|
-
response_types:
|
|
220040
|
-
client_name:
|
|
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:
|
|
220044
|
-
contacts:
|
|
220043
|
+
scope: z4.string().optional(),
|
|
220044
|
+
contacts: z4.array(z4.string()).optional(),
|
|
220045
220045
|
tos_uri: OptionalSafeUrlSchema,
|
|
220046
|
-
policy_uri:
|
|
220046
|
+
policy_uri: z4.string().optional(),
|
|
220047
220047
|
jwks_uri: SafeUrlSchema.optional(),
|
|
220048
|
-
jwks:
|
|
220049
|
-
software_id:
|
|
220050
|
-
software_version:
|
|
220051
|
-
software_statement:
|
|
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 =
|
|
220054
|
-
client_id:
|
|
220055
|
-
client_secret:
|
|
220056
|
-
client_id_issued_at:
|
|
220057
|
-
client_secret_expires_at:
|
|
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 =
|
|
220061
|
-
error:
|
|
220062
|
-
error_description:
|
|
220060
|
+
OAuthClientRegistrationErrorSchema = z4.object({
|
|
220061
|
+
error: z4.string(),
|
|
220062
|
+
error_description: z4.string().optional()
|
|
220063
220063
|
}).strip();
|
|
220064
|
-
OAuthTokenRevocationRequestSchema =
|
|
220065
|
-
token:
|
|
220066
|
-
token_type_hint:
|
|
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 =
|
|
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 =
|
|
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:
|
|
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:
|
|
220264
|
+
status: z.number().int().openapi({
|
|
220265
220265
|
description: "The HTTP status code.",
|
|
220266
220266
|
example: 404
|
|
220267
220267
|
}),
|
|
220268
|
-
detail:
|
|
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:
|
|
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:
|
|
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 =
|
|
220286
|
-
error:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
220319
|
+
status: z.number().int().openapi({
|
|
220320
220320
|
description: "The HTTP status code.",
|
|
220321
220321
|
example: errorCodeToHttpStatus[code]
|
|
220322
220322
|
}),
|
|
220323
|
-
error:
|
|
220324
|
-
code:
|
|
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:
|
|
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
|
|
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
|
|
228246
|
-
import { z as
|
|
228247
|
-
import { z as
|
|
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 =
|
|
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:
|
|
228602
|
+
user: z5.string().optional(),
|
|
228603
228603
|
/**
|
|
228604
228604
|
* Reasoning effort for reasoning models. Defaults to `medium`.
|
|
228605
228605
|
*/
|
|
228606
|
-
reasoningEffort:
|
|
228606
|
+
reasoningEffort: z5.string().optional(),
|
|
228607
228607
|
/**
|
|
228608
228608
|
* Controls the verbosity of the generated text. Defaults to `medium`.
|
|
228609
228609
|
*/
|
|
228610
|
-
textVerbosity:
|
|
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 =
|
|
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:
|
|
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:
|
|
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 =
|
|
229534
|
-
data:
|
|
229535
|
-
usage:
|
|
229536
|
-
providerMetadata:
|
|
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 =
|
|
229606
|
-
data:
|
|
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
|
|
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${
|
|
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${
|
|
241385
|
+
ret = `>=${M2}.${m4}.0${z20} <${M2}.${+m4 + 1}.0-0`;
|
|
241386
241386
|
} else {
|
|
241387
|
-
ret = `>=${M2}.${m4}.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}${
|
|
241404
|
+
ret = `>=${M2}.${m4}.${p12}${z20} <${M2}.${m4}.${+p12 + 1}-0`;
|
|
241405
241405
|
} else {
|
|
241406
|
-
ret = `>=${M2}.${m4}.${p12}${
|
|
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
|
|
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
|
|
242241
|
-
import { z as
|
|
242242
|
-
import { z as
|
|
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
|
|
242245
|
-
import { z as
|
|
242246
|
-
import { z as
|
|
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
|
|
242270
|
-
import { z as
|
|
242271
|
-
import
|
|
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
|
|
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 =
|
|
243831
|
-
TriggerSubscribeParamSchema =
|
|
243832
|
-
toolkits:
|
|
243833
|
-
triggerId:
|
|
243834
|
-
connectedAccountId:
|
|
243835
|
-
authConfigId:
|
|
243836
|
-
triggerSlug:
|
|
243837
|
-
triggerData:
|
|
243838
|
-
userId:
|
|
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 =
|
|
243841
|
-
authConfigIds:
|
|
243842
|
-
connectedAccountIds:
|
|
243843
|
-
limit:
|
|
243844
|
-
page:
|
|
243845
|
-
showDisabled:
|
|
243846
|
-
triggerIds:
|
|
243847
|
-
triggerNames:
|
|
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 =
|
|
243850
|
-
id:
|
|
243851
|
-
connectedAccountId:
|
|
243852
|
-
disabledAt:
|
|
243853
|
-
state:
|
|
243854
|
-
triggerConfig:
|
|
243855
|
-
triggerName:
|
|
243856
|
-
updatedAt:
|
|
243857
|
-
triggerData:
|
|
243858
|
-
uuid:
|
|
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 =
|
|
243861
|
-
items:
|
|
243862
|
-
nextCursor:
|
|
243863
|
-
totalPages:
|
|
243860
|
+
TriggerInstanceListActiveResponseSchema = z63.object({
|
|
243861
|
+
items: z63.array(TriggerInstanceListActiveResponseItemSchema),
|
|
243862
|
+
nextCursor: z63.string().nullable(),
|
|
243863
|
+
totalPages: z63.number()
|
|
243864
243864
|
});
|
|
243865
|
-
TriggerInstanceUpsertParamsSchema =
|
|
243866
|
-
connectedAccountId:
|
|
243867
|
-
triggerConfig:
|
|
243865
|
+
TriggerInstanceUpsertParamsSchema = z63.object({
|
|
243866
|
+
connectedAccountId: z63.string().optional(),
|
|
243867
|
+
triggerConfig: z63.record(z63.unknown()).optional()
|
|
243868
243868
|
});
|
|
243869
|
-
TriggerInstanceUpsertResponseSchema =
|
|
243870
|
-
triggerId:
|
|
243869
|
+
TriggerInstanceUpsertResponseSchema = z63.object({
|
|
243870
|
+
triggerId: z63.string()
|
|
243871
243871
|
});
|
|
243872
|
-
TriggerInstanceManageUpdateParamsSchema =
|
|
243873
|
-
status:
|
|
243872
|
+
TriggerInstanceManageUpdateParamsSchema = z63.object({
|
|
243873
|
+
status: z63.enum(["enable", "disable"])
|
|
243874
243874
|
});
|
|
243875
|
-
TriggerInstanceManageUpdateResponseSchema =
|
|
243876
|
-
status:
|
|
243875
|
+
TriggerInstanceManageUpdateResponseSchema = z63.object({
|
|
243876
|
+
status: z63.enum(["success"])
|
|
243877
243877
|
});
|
|
243878
|
-
TriggerInstanceManageDeleteResponseSchema =
|
|
243879
|
-
triggerId:
|
|
243878
|
+
TriggerInstanceManageDeleteResponseSchema = z63.object({
|
|
243879
|
+
triggerId: z63.string()
|
|
243880
243880
|
});
|
|
243881
|
-
IncomingTriggerPayloadSchema =
|
|
243882
|
-
id:
|
|
243883
|
-
uuid:
|
|
243884
|
-
triggerSlug:
|
|
243885
|
-
toolkitSlug:
|
|
243886
|
-
userId:
|
|
243887
|
-
payload:
|
|
243888
|
-
originalPayload:
|
|
243889
|
-
metadata:
|
|
243890
|
-
id:
|
|
243891
|
-
uuid:
|
|
243892
|
-
toolkitSlug:
|
|
243893
|
-
triggerSlug:
|
|
243894
|
-
triggerData:
|
|
243895
|
-
triggerConfig:
|
|
243896
|
-
connectedAccount:
|
|
243897
|
-
id:
|
|
243898
|
-
uuid:
|
|
243899
|
-
authConfigId:
|
|
243900
|
-
authConfigUUID:
|
|
243901
|
-
userId:
|
|
243902
|
-
status:
|
|
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 =
|
|
243907
|
-
cursor:
|
|
243908
|
-
limit:
|
|
243909
|
-
toolkits:
|
|
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 =
|
|
243912
|
-
slug:
|
|
243913
|
-
name:
|
|
243914
|
-
description:
|
|
243915
|
-
instructions:
|
|
243916
|
-
toolkit:
|
|
243917
|
-
logo:
|
|
243918
|
-
slug:
|
|
243919
|
-
name:
|
|
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:
|
|
243922
|
-
config:
|
|
243923
|
-
version:
|
|
243921
|
+
payload: z63.record(z63.unknown()),
|
|
243922
|
+
config: z63.record(z63.unknown()),
|
|
243923
|
+
version: z63.string().optional()
|
|
243924
243924
|
});
|
|
243925
|
-
TriggersTypeListResponseSchema =
|
|
243926
|
-
items:
|
|
243927
|
-
nextCursor:
|
|
243928
|
-
totalPages:
|
|
243925
|
+
TriggersTypeListResponseSchema = z63.object({
|
|
243926
|
+
items: z63.array(TriggerTypeSchema),
|
|
243927
|
+
nextCursor: z63.string().nullish(),
|
|
243928
|
+
totalPages: z63.number()
|
|
243929
243929
|
});
|
|
243930
|
-
SDKRealtimeCredentialsResponseSchema =
|
|
243931
|
-
projectId:
|
|
243932
|
-
pusherKey:
|
|
243933
|
-
pusherCluster:
|
|
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 =
|
|
243936
|
-
id:
|
|
243937
|
-
name:
|
|
243938
|
-
type:
|
|
243939
|
-
url:
|
|
243940
|
-
userId:
|
|
243941
|
-
allowedTools:
|
|
243942
|
-
authConfigs:
|
|
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 =
|
|
243945
|
-
toolkit:
|
|
243946
|
-
authConfigId:
|
|
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 =
|
|
243949
|
-
toolkits:
|
|
243950
|
-
allowedTools:
|
|
243951
|
-
manuallyManageConnections:
|
|
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 =
|
|
243957
|
+
MCPConfigResponseSchema = z83.object({
|
|
243958
243958
|
/**
|
|
243959
243959
|
* Unique identifier for the newly created custom MCP server
|
|
243960
243960
|
*/
|
|
243961
|
-
id:
|
|
243961
|
+
id: z83.string(),
|
|
243962
243962
|
/**
|
|
243963
243963
|
* Human-readable name of the custom MCP server
|
|
243964
243964
|
*/
|
|
243965
|
-
name:
|
|
243965
|
+
name: z83.string(),
|
|
243966
243966
|
/**
|
|
243967
243967
|
* List of tool identifiers that are enabled for this server
|
|
243968
243968
|
*/
|
|
243969
|
-
allowedTools:
|
|
243969
|
+
allowedTools: z83.array(z83.string()),
|
|
243970
243970
|
/**
|
|
243971
243971
|
* ID references to the auth configurations used by this server
|
|
243972
243972
|
*/
|
|
243973
|
-
authConfigIds:
|
|
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:
|
|
243977
|
+
commands: z83.object({
|
|
243978
243978
|
/**
|
|
243979
243979
|
* Command line instruction for Claude client setup
|
|
243980
243980
|
*/
|
|
243981
|
-
claude:
|
|
243981
|
+
claude: z83.string(),
|
|
243982
243982
|
/**
|
|
243983
243983
|
* Command line instruction for Cursor client setup
|
|
243984
243984
|
*/
|
|
243985
|
-
cursor:
|
|
243985
|
+
cursor: z83.string(),
|
|
243986
243986
|
/**
|
|
243987
243987
|
* Command line instruction for Windsurf client setup
|
|
243988
243988
|
*/
|
|
243989
|
-
windsurf:
|
|
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:
|
|
243994
|
+
MCPUrl: z83.string()
|
|
243995
243995
|
});
|
|
243996
|
-
MCPGetInstanceParamsSchema =
|
|
243997
|
-
manuallyManageConnections:
|
|
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 =
|
|
244004
|
-
page:
|
|
244005
|
-
limit:
|
|
244006
|
-
toolkits:
|
|
244007
|
-
authConfigs:
|
|
244008
|
-
name:
|
|
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
|
-
...
|
|
244012
|
-
toolkitIcons:
|
|
244013
|
-
serverInstanceCount:
|
|
244014
|
-
toolkits:
|
|
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 =
|
|
244018
|
-
items:
|
|
244019
|
-
currentPage:
|
|
244020
|
-
totalPages:
|
|
244017
|
+
MCPListResponseSchema = z83.object({
|
|
244018
|
+
items: z83.array(MCPItemSchema),
|
|
244019
|
+
currentPage: z83.number(),
|
|
244020
|
+
totalPages: z83.number()
|
|
244021
244021
|
});
|
|
244022
|
-
MCPUpdateParamsSchema =
|
|
244023
|
-
name:
|
|
244024
|
-
toolkits:
|
|
244025
|
-
allowedTools:
|
|
244026
|
-
manuallyManageConnections:
|
|
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 =
|
|
244033
|
-
connected:
|
|
244034
|
-
toolkit:
|
|
244035
|
-
connectedAccountId:
|
|
244032
|
+
MCPServerConnectionStatus = z83.object({
|
|
244033
|
+
connected: z83.boolean(),
|
|
244034
|
+
toolkit: z83.string(),
|
|
244035
|
+
connectedAccountId: z83.string()
|
|
244036
244036
|
});
|
|
244037
|
-
MCPServerConnectedAccountsSchema =
|
|
244038
|
-
|
|
244039
|
-
|
|
244040
|
-
|
|
244041
|
-
toolkit:
|
|
244042
|
-
authConfigId:
|
|
244043
|
-
connectedAccountId:
|
|
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 =
|
|
244222
|
-
toolkit:
|
|
244223
|
-
authConfigId:
|
|
244221
|
+
ToolRouterToolkitConfigSchema = z102.object({
|
|
244222
|
+
toolkit: z102.string(),
|
|
244223
|
+
authConfigId: z102.string().optional()
|
|
244224
244224
|
});
|
|
244225
|
-
ToolRouterConfigSchema =
|
|
244226
|
-
toolkits:
|
|
244227
|
-
manuallyManageConnections:
|
|
244225
|
+
ToolRouterConfigSchema = z102.object({
|
|
244226
|
+
toolkits: z102.array(z102.union([z102.string(), ToolRouterToolkitConfigSchema])).optional(),
|
|
244227
|
+
manuallyManageConnections: z102.boolean().optional()
|
|
244228
244228
|
});
|
|
244229
|
-
ToolRouterSessionSchema =
|
|
244230
|
-
sessionId:
|
|
244231
|
-
url:
|
|
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 =
|
|
245748
|
-
connectionId:
|
|
245749
|
-
providerConfigKey:
|
|
245750
|
-
integrationDisplayName:
|
|
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,
|
|
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: () =>
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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 =
|
|
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
|
-
|
|
251789
|
-
|
|
251790
|
-
|
|
251791
|
-
|
|
251792
|
-
|
|
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 =
|
|
251795
|
-
delegationId:
|
|
251796
|
-
fromSubAgent:
|
|
251797
|
-
targetSubAgent:
|
|
251798
|
-
taskDescription:
|
|
251799
|
-
context:
|
|
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 =
|
|
251802
|
-
delegationId:
|
|
251803
|
-
fromSubAgent:
|
|
251804
|
-
targetSubAgent:
|
|
251805
|
-
result:
|
|
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 =
|
|
251808
|
-
timestamp:
|
|
251809
|
-
subAgentId:
|
|
251810
|
-
data:
|
|
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 =
|
|
251813
|
-
type:
|
|
251814
|
-
label:
|
|
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 =
|
|
251818
|
-
fromSubAgentId:
|
|
251819
|
-
toSubAgentId:
|
|
251820
|
-
fromExternalAgentId:
|
|
251821
|
-
toExternalAgentId:
|
|
251822
|
-
taskId:
|
|
251823
|
-
a2aTaskId:
|
|
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
|
-
|
|
251845
|
-
|
|
251846
|
-
|
|
251843
|
+
init_dist4();
|
|
251844
|
+
TextStartEventSchema = z.object({
|
|
251845
|
+
type: z.literal("text-start"),
|
|
251846
|
+
id: z.string()
|
|
251847
251847
|
});
|
|
251848
|
-
TextDeltaEventSchema =
|
|
251849
|
-
type:
|
|
251850
|
-
id:
|
|
251851
|
-
delta:
|
|
251848
|
+
TextDeltaEventSchema = z.object({
|
|
251849
|
+
type: z.literal("text-delta"),
|
|
251850
|
+
id: z.string(),
|
|
251851
|
+
delta: z.string()
|
|
251852
251852
|
});
|
|
251853
|
-
TextEndEventSchema =
|
|
251854
|
-
type:
|
|
251855
|
-
id:
|
|
251853
|
+
TextEndEventSchema = z.object({
|
|
251854
|
+
type: z.literal("text-end"),
|
|
251855
|
+
id: z.string()
|
|
251856
251856
|
});
|
|
251857
|
-
DataComponentStreamEventSchema =
|
|
251858
|
-
type:
|
|
251859
|
-
id:
|
|
251860
|
-
data:
|
|
251857
|
+
DataComponentStreamEventSchema = z.object({
|
|
251858
|
+
type: z.literal("data-component"),
|
|
251859
|
+
id: z.string(),
|
|
251860
|
+
data: z.any()
|
|
251861
251861
|
});
|
|
251862
|
-
DataOperationStreamEventSchema =
|
|
251863
|
-
type:
|
|
251864
|
-
data:
|
|
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 =
|
|
251868
|
-
type:
|
|
251869
|
-
data:
|
|
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 =
|
|
251873
|
-
type:
|
|
251874
|
-
error:
|
|
251872
|
+
StreamErrorEventSchema = z.object({
|
|
251873
|
+
type: z.literal("error"),
|
|
251874
|
+
error: z.string()
|
|
251875
251875
|
});
|
|
251876
|
-
StreamFinishEventSchema =
|
|
251877
|
-
type:
|
|
251878
|
-
finishReason:
|
|
251879
|
-
usage:
|
|
251880
|
-
promptTokens:
|
|
251881
|
-
completionTokens:
|
|
251882
|
-
totalTokens:
|
|
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 =
|
|
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
|
|
259585
|
+
import { z as z19 } from "zod";
|
|
259586
259586
|
loadEnvironmentFiles();
|
|
259587
|
-
var envSchema2 =
|
|
259588
|
-
DEBUG:
|
|
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:
|
|
259591
|
-
OPENAI_API_KEY:
|
|
259592
|
-
GOOGLE_GENERATIVE_AI_API_KEY:
|
|
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:
|
|
259595
|
-
LANGFUSE_PUBLIC_KEY:
|
|
259596
|
-
LANGFUSE_BASEURL:
|
|
259597
|
-
LANGFUSE_ENABLED:
|
|
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
|
|
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(", ")}
|