@inkeep/agents-core 0.0.0-dev-20251124223719 → 0.0.0-dev-20251125020527
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/auth/auth-validation-schemas.js +17 -17
- package/dist/auth/auth.d.ts +3 -3
- package/dist/auth/auth.js +4 -3
- package/dist/{auth-detection-CGqhPDnj.d.ts → auth-detection-7G0Dxt55.d.ts} +11 -0
- package/dist/{chunk-SSRRHYU4.js → chunk-7GZHUB4J.js} +4 -5
- package/dist/chunk-CMNLBV2A.js +39 -0
- package/dist/{chunk-MB2ZIPZS.js → chunk-FOK3JSQN.js} +5 -5
- package/dist/{chunk-SG75RA63.js → chunk-K54FZSDH.js} +1 -1
- package/dist/{chunk-32YRH2S7.js → chunk-KJHP6D3O.js} +63 -67
- package/dist/{chunk-Q5U2SVA6.js → chunk-LL6F3EAR.js} +11 -7
- package/dist/{chunk-TGESM3JG.js → chunk-MQMMFK2K.js} +14 -3
- package/dist/{chunk-NFYCSHD3.js → chunk-OHZDHXP7.js} +1 -0
- package/dist/{chunk-SLQW43IV.js → chunk-ZEZCCHV7.js} +4 -5
- package/dist/{chunk-ICZLNCX7.js → chunk-ZGL6KM2G.js} +358 -69
- package/dist/{chunk-VQXQOGJU.js → chunk-ZQU7AEXC.js} +313 -315
- package/dist/{client-CnpNkGsH.d.ts → client-B_3j-V4-.d.ts} +1 -1
- package/dist/client-exports.d.ts +6 -3
- package/dist/client-exports.js +126 -127
- package/dist/constants/schema-validation/index.js +1 -1
- package/dist/credential-stores/index.d.ts +3 -3
- package/dist/credential-stores/index.js +1 -1
- package/dist/db/schema.d.ts +2 -2
- package/dist/db/schema.js +1 -1
- package/dist/db/test-client.d.ts +3 -3
- package/dist/db/test-client.js +1 -1
- package/dist/index.d.ts +126 -9
- package/dist/index.js +280 -64
- package/dist/{schema-Cgkp_geg.d.ts → schema-DKbG39on.d.ts} +24 -1
- package/dist/server-BXoUiBMg.d.ts +127 -0
- package/dist/types/index.d.ts +33 -113
- package/dist/types/index.js +1 -1
- package/dist/{utility-C_tTZ7-k.d.ts → utility-Lo5NoRHK.d.ts} +141 -11
- package/dist/utils/schema-conversion.js +1 -1
- package/dist/validation/index.d.ts +2 -2
- package/dist/validation/index.js +2 -2
- package/drizzle/{0001_fair_malice.sql → 0001_calm_sheva_callister.sql} +1 -16
- package/drizzle/meta/0001_snapshot.json +7 -1
- package/drizzle/meta/_journal.json +2 -2
- package/package.json +14 -4
- package/dist/chunk-CUM6BY2Y.js +0 -320
- package/dist/chunk-H2F72PDA.js +0 -15
- package/dist/chunk-OUXC23J7.js +0 -12534
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { loadEnvironmentFiles, env } from './chunk-
|
|
1
|
+
import { loadEnvironmentFiles, env } from './chunk-LL6F3EAR.js';
|
|
2
2
|
import { getLogger } from './chunk-DN4B564Y.js';
|
|
3
3
|
import { CredentialStoreType, MCPTransportType } from './chunk-YFHT5M2R.js';
|
|
4
|
-
import {
|
|
4
|
+
import { z } from 'zod';
|
|
5
5
|
import { customAlphabet } from 'nanoid';
|
|
6
6
|
import { scrypt, randomBytes, timingSafeEqual } from 'crypto';
|
|
7
7
|
import { promisify } from 'util';
|
|
8
|
+
import { z as z$1 } from '@hono/zod-openapi';
|
|
8
9
|
import { HTTPException } from 'hono/http-exception';
|
|
9
10
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
10
11
|
import { SSEClientTransport } from '@modelcontextprotocol/sdk/client/sse.js';
|
|
@@ -14,6 +15,12 @@ import { CallToolResultSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
|
14
15
|
import { tool } from 'ai';
|
|
15
16
|
import { asyncExitHook, gracefulExit } from 'exit-hook';
|
|
16
17
|
import { match } from 'ts-pattern';
|
|
18
|
+
import { createAnthropic, anthropic } from '@ai-sdk/anthropic';
|
|
19
|
+
import { createGateway, gateway } from '@ai-sdk/gateway';
|
|
20
|
+
import { createGoogleGenerativeAI, google } from '@ai-sdk/google';
|
|
21
|
+
import { createOpenAI, openai } from '@ai-sdk/openai';
|
|
22
|
+
import { createOpenAICompatible } from '@ai-sdk/openai-compatible';
|
|
23
|
+
import { createOpenRouter, openrouter } from '@openrouter/ai-sdk-provider';
|
|
17
24
|
import * as jose from 'jose';
|
|
18
25
|
import { SignJWT, jwtVerify } from 'jose';
|
|
19
26
|
import { Composio } from '@composio/core';
|
|
@@ -47,14 +54,12 @@ var executionLimitsSharedDefaults = {
|
|
|
47
54
|
// Increased from 4,000 to 8,000 to accommodate tool results in conversation history.
|
|
48
55
|
CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT: 8e3
|
|
49
56
|
};
|
|
50
|
-
|
|
51
|
-
// src/constants/execution-limits-shared/index.ts
|
|
52
57
|
loadEnvironmentFiles();
|
|
53
|
-
var constantsSchema =
|
|
58
|
+
var constantsSchema = z.object(
|
|
54
59
|
Object.fromEntries(
|
|
55
60
|
Object.keys(executionLimitsSharedDefaults).map((key) => [
|
|
56
61
|
`AGENTS_${key}`,
|
|
57
|
-
|
|
62
|
+
z.coerce.number().optional()
|
|
58
63
|
])
|
|
59
64
|
)
|
|
60
65
|
);
|
|
@@ -179,11 +184,18 @@ function normalizeDateString(dateString) {
|
|
|
179
184
|
}
|
|
180
185
|
const pgTimestampPattern = /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(\.\d{1,3})?$/;
|
|
181
186
|
if (pgTimestampPattern.test(dateString)) {
|
|
182
|
-
return dateString.replace(" ", "T")
|
|
187
|
+
return `${dateString.replace(" ", "T")}Z`;
|
|
183
188
|
}
|
|
184
189
|
return dateString;
|
|
185
190
|
}
|
|
186
|
-
|
|
191
|
+
function toISODateString(dateValue) {
|
|
192
|
+
if (typeof dateValue === "string") {
|
|
193
|
+
const normalized = normalizeDateString(dateValue);
|
|
194
|
+
return typeof normalized === "string" ? normalized : normalized.toISOString();
|
|
195
|
+
}
|
|
196
|
+
return dateValue.toISOString();
|
|
197
|
+
}
|
|
198
|
+
var ErrorCode = z$1.enum([
|
|
187
199
|
"bad_request",
|
|
188
200
|
"unauthorized",
|
|
189
201
|
"forbidden",
|
|
@@ -202,28 +214,28 @@ var errorCodeToHttpStatus = {
|
|
|
202
214
|
internal_server_error: 500
|
|
203
215
|
};
|
|
204
216
|
var ERROR_DOCS_BASE_URL = "https://docs.inkeep.com/agents-api/errors";
|
|
205
|
-
var problemDetailsSchema =
|
|
217
|
+
var problemDetailsSchema = z$1.object({
|
|
206
218
|
// type: z.string().url().openapi({
|
|
207
219
|
// description: "A URI reference that identifies the problem type.",
|
|
208
220
|
// example: `${ERROR_DOCS_BASE_URL}#not-found`,
|
|
209
221
|
// }),
|
|
210
|
-
title:
|
|
222
|
+
title: z$1.string().openapi({
|
|
211
223
|
description: "A short, human-readable summary of the problem type.",
|
|
212
224
|
example: "Resource Not Found"
|
|
213
225
|
}),
|
|
214
|
-
status:
|
|
226
|
+
status: z$1.number().int().openapi({
|
|
215
227
|
description: "The HTTP status code.",
|
|
216
228
|
example: 404
|
|
217
229
|
}),
|
|
218
|
-
detail:
|
|
230
|
+
detail: z$1.string().openapi({
|
|
219
231
|
description: "A human-readable explanation specific to this occurrence of the problem.",
|
|
220
232
|
example: "The requested resource was not found."
|
|
221
233
|
}),
|
|
222
|
-
instance:
|
|
234
|
+
instance: z$1.string().optional().openapi({
|
|
223
235
|
description: "A URI reference that identifies the specific occurrence of the problem.",
|
|
224
236
|
example: "/conversations/123"
|
|
225
237
|
}),
|
|
226
|
-
requestId:
|
|
238
|
+
requestId: z$1.string().optional().openapi({
|
|
227
239
|
description: "A unique identifier for the request, useful for troubleshooting.",
|
|
228
240
|
example: "req_1234567890"
|
|
229
241
|
}),
|
|
@@ -232,13 +244,13 @@ var problemDetailsSchema = external_exports.object({
|
|
|
232
244
|
example: "not_found"
|
|
233
245
|
})
|
|
234
246
|
}).openapi("ProblemDetails");
|
|
235
|
-
var errorResponseSchema =
|
|
236
|
-
error:
|
|
247
|
+
var errorResponseSchema = z$1.object({
|
|
248
|
+
error: z$1.object({
|
|
237
249
|
code: ErrorCode.openapi({
|
|
238
250
|
description: "A short code indicating the error code returned.",
|
|
239
251
|
example: "not_found"
|
|
240
252
|
}),
|
|
241
|
-
message:
|
|
253
|
+
message: z$1.string().openapi({
|
|
242
254
|
description: "A human readable error message.",
|
|
243
255
|
example: "The requested resource was not found."
|
|
244
256
|
})
|
|
@@ -376,15 +388,15 @@ var errorSchemaFactory = (code, description) => ({
|
|
|
376
388
|
content: {
|
|
377
389
|
"application/problem+json": {
|
|
378
390
|
schema: problemDetailsSchema.extend({
|
|
379
|
-
code:
|
|
391
|
+
code: z$1.literal(code).openapi({
|
|
380
392
|
description: "A short code indicating the error code returned.",
|
|
381
393
|
example: code
|
|
382
394
|
}),
|
|
383
|
-
detail:
|
|
395
|
+
detail: z$1.string().openapi({
|
|
384
396
|
description: "A detailed explanation specific to this occurrence of the problem, providing context and specifics about what went wrong.",
|
|
385
397
|
example: description
|
|
386
398
|
}),
|
|
387
|
-
title:
|
|
399
|
+
title: z$1.string().openapi({
|
|
388
400
|
description: "A short, human-readable summary of the problem type.",
|
|
389
401
|
example: getTitleFromCode(code)
|
|
390
402
|
}),
|
|
@@ -392,16 +404,16 @@ var errorSchemaFactory = (code, description) => ({
|
|
|
392
404
|
// description: "A URI reference that identifies the problem type.",
|
|
393
405
|
// example: `${ERROR_DOCS_BASE_URL}#${code}`,
|
|
394
406
|
// }),
|
|
395
|
-
status:
|
|
407
|
+
status: z$1.number().int().openapi({
|
|
396
408
|
description: "The HTTP status code.",
|
|
397
409
|
example: errorCodeToHttpStatus[code]
|
|
398
410
|
}),
|
|
399
|
-
error:
|
|
400
|
-
code:
|
|
411
|
+
error: z$1.object({
|
|
412
|
+
code: z$1.literal(code).openapi({
|
|
401
413
|
description: "A short code indicating the error code returned.",
|
|
402
414
|
example: code
|
|
403
415
|
}),
|
|
404
|
-
message:
|
|
416
|
+
message: z$1.string().openapi({
|
|
405
417
|
description: "A concise error message suitable for display to end users. May be truncated if the full detail is long.",
|
|
406
418
|
example: description.length > 100 ? `${description.substring(0, 97)}...` : description
|
|
407
419
|
})
|
|
@@ -462,6 +474,28 @@ function getRequestExecutionContext(c) {
|
|
|
462
474
|
}
|
|
463
475
|
return executionContext;
|
|
464
476
|
}
|
|
477
|
+
|
|
478
|
+
// src/utils/format-messages.ts
|
|
479
|
+
function formatMessagesForLLM(messages) {
|
|
480
|
+
return messages.map((message) => {
|
|
481
|
+
const role = message.role === "user" ? "user" : message.role === "agent" ? "assistant" : "system";
|
|
482
|
+
const content = typeof message.content === "object" && message.content && "text" in message.content ? message.content.text : String(message.content || "");
|
|
483
|
+
return {
|
|
484
|
+
role,
|
|
485
|
+
content,
|
|
486
|
+
timestamp: message.createdAt,
|
|
487
|
+
fromSubAgentId: message.fromSubAgentId
|
|
488
|
+
};
|
|
489
|
+
});
|
|
490
|
+
}
|
|
491
|
+
function formatMessagesForLLMContext(messages) {
|
|
492
|
+
const formattedMessages = formatMessagesForLLM(messages);
|
|
493
|
+
return formattedMessages.map((msg) => {
|
|
494
|
+
const roleLabel = msg.role === "user" ? "User" : msg.role === "assistant" ? "Agent" : "System";
|
|
495
|
+
const agentInfo = msg.fromSubAgentId ? ` (${msg.fromSubAgentId})` : "";
|
|
496
|
+
return `${roleLabel}${agentInfo}: ${msg.content}`;
|
|
497
|
+
}).join("\n\n");
|
|
498
|
+
}
|
|
465
499
|
var McpClient = class {
|
|
466
500
|
name;
|
|
467
501
|
client;
|
|
@@ -579,7 +613,7 @@ var McpClient = class {
|
|
|
579
613
|
try {
|
|
580
614
|
const createZodSchema = (inputSchema) => {
|
|
581
615
|
if (!inputSchema || !inputSchema.properties) {
|
|
582
|
-
return
|
|
616
|
+
return z.object({});
|
|
583
617
|
}
|
|
584
618
|
const zodProperties = {};
|
|
585
619
|
for (const [key, prop] of Object.entries(inputSchema.properties)) {
|
|
@@ -587,19 +621,22 @@ var McpClient = class {
|
|
|
587
621
|
let zodType;
|
|
588
622
|
switch (propDef.type) {
|
|
589
623
|
case "string":
|
|
590
|
-
zodType =
|
|
624
|
+
zodType = z.string();
|
|
591
625
|
break;
|
|
592
626
|
case "number":
|
|
593
|
-
zodType =
|
|
627
|
+
zodType = z.number();
|
|
594
628
|
break;
|
|
595
629
|
case "boolean":
|
|
596
|
-
zodType =
|
|
630
|
+
zodType = z.boolean();
|
|
597
631
|
break;
|
|
598
632
|
case "array":
|
|
599
|
-
zodType =
|
|
633
|
+
zodType = z.array(z.any());
|
|
634
|
+
break;
|
|
635
|
+
case "object":
|
|
636
|
+
zodType = createZodSchema(propDef);
|
|
600
637
|
break;
|
|
601
638
|
default:
|
|
602
|
-
zodType =
|
|
639
|
+
zodType = z.any();
|
|
603
640
|
}
|
|
604
641
|
if (propDef.description) {
|
|
605
642
|
zodType = zodType.describe(propDef.description);
|
|
@@ -610,7 +647,7 @@ var McpClient = class {
|
|
|
610
647
|
}
|
|
611
648
|
zodProperties[key] = zodType;
|
|
612
649
|
}
|
|
613
|
-
return
|
|
650
|
+
return z.object(zodProperties);
|
|
614
651
|
};
|
|
615
652
|
const schema = createZodSchema(def.inputSchema);
|
|
616
653
|
const createdTool = tool({
|
|
@@ -636,7 +673,259 @@ var McpClient = class {
|
|
|
636
673
|
return results;
|
|
637
674
|
}
|
|
638
675
|
};
|
|
639
|
-
var logger2 = getLogger("
|
|
676
|
+
var logger2 = getLogger("ModelFactory");
|
|
677
|
+
var nimDefault = createOpenAICompatible({
|
|
678
|
+
name: "nim",
|
|
679
|
+
baseURL: "https://integrate.api.nvidia.com/v1",
|
|
680
|
+
headers: {
|
|
681
|
+
Authorization: `Bearer ${process.env.NIM_API_KEY}`
|
|
682
|
+
}
|
|
683
|
+
});
|
|
684
|
+
var ModelFactory = class _ModelFactory {
|
|
685
|
+
/**
|
|
686
|
+
* Create a provider instance with custom configuration
|
|
687
|
+
*/
|
|
688
|
+
static createProvider(provider, config) {
|
|
689
|
+
switch (provider) {
|
|
690
|
+
case "anthropic":
|
|
691
|
+
return createAnthropic(config);
|
|
692
|
+
case "openai":
|
|
693
|
+
return createOpenAI(config);
|
|
694
|
+
case "google":
|
|
695
|
+
return createGoogleGenerativeAI(config);
|
|
696
|
+
case "openrouter":
|
|
697
|
+
return {
|
|
698
|
+
...createOpenRouter(config),
|
|
699
|
+
textEmbeddingModel: () => {
|
|
700
|
+
throw new Error("OpenRouter does not support text embeddings");
|
|
701
|
+
},
|
|
702
|
+
imageModel: () => {
|
|
703
|
+
throw new Error("OpenRouter does not support image generation");
|
|
704
|
+
}
|
|
705
|
+
};
|
|
706
|
+
case "gateway":
|
|
707
|
+
return createGateway(config);
|
|
708
|
+
case "nim": {
|
|
709
|
+
const nimConfig = {
|
|
710
|
+
name: "nim",
|
|
711
|
+
baseURL: "https://integrate.api.nvidia.com/v1",
|
|
712
|
+
headers: {
|
|
713
|
+
Authorization: `Bearer ${process.env.NIM_API_KEY}`
|
|
714
|
+
},
|
|
715
|
+
...config
|
|
716
|
+
};
|
|
717
|
+
return createOpenAICompatible(nimConfig);
|
|
718
|
+
}
|
|
719
|
+
case "custom": {
|
|
720
|
+
if (!config.baseURL && !config.baseUrl) {
|
|
721
|
+
throw new Error(
|
|
722
|
+
"Custom provider requires baseURL. Please provide it in providerOptions.baseURL or providerOptions.baseUrl"
|
|
723
|
+
);
|
|
724
|
+
}
|
|
725
|
+
const customConfig = {
|
|
726
|
+
name: "custom",
|
|
727
|
+
baseURL: config.baseURL || config.baseUrl,
|
|
728
|
+
headers: {
|
|
729
|
+
...process.env.CUSTOM_LLM_API_KEY && {
|
|
730
|
+
Authorization: `Bearer ${process.env.CUSTOM_LLM_API_KEY}`
|
|
731
|
+
},
|
|
732
|
+
...config.headers || {}
|
|
733
|
+
},
|
|
734
|
+
...config
|
|
735
|
+
};
|
|
736
|
+
logger2.info(
|
|
737
|
+
{
|
|
738
|
+
config: {
|
|
739
|
+
baseURL: customConfig.baseURL,
|
|
740
|
+
hasApiKey: !!process.env.CUSTOM_LLM_API_KEY,
|
|
741
|
+
apiKeyPrefix: `${process.env.CUSTOM_LLM_API_KEY?.substring(0, 10)}...`,
|
|
742
|
+
headers: Object.keys(customConfig.headers || {})
|
|
743
|
+
}
|
|
744
|
+
},
|
|
745
|
+
"Creating custom OpenAI-compatible provider"
|
|
746
|
+
);
|
|
747
|
+
return createOpenAICompatible(customConfig);
|
|
748
|
+
}
|
|
749
|
+
default:
|
|
750
|
+
throw new Error(`Unsupported provider: ${provider}`);
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
/**
|
|
754
|
+
* Extract provider configuration from providerOptions
|
|
755
|
+
* Only includes settings that go to the provider constructor (baseURL, apiKey, etc.)
|
|
756
|
+
*/
|
|
757
|
+
static extractProviderConfig(providerOptions) {
|
|
758
|
+
if (!providerOptions) {
|
|
759
|
+
return {};
|
|
760
|
+
}
|
|
761
|
+
const providerConfig = {};
|
|
762
|
+
if (providerOptions.baseUrl || providerOptions.baseURL) {
|
|
763
|
+
providerConfig.baseURL = providerOptions.baseUrl || providerOptions.baseURL;
|
|
764
|
+
}
|
|
765
|
+
if (providerOptions.headers) {
|
|
766
|
+
providerConfig.headers = providerOptions.headers;
|
|
767
|
+
}
|
|
768
|
+
if (providerOptions.gateway) {
|
|
769
|
+
Object.assign(providerConfig, providerOptions.gateway);
|
|
770
|
+
}
|
|
771
|
+
if (providerOptions.nim) {
|
|
772
|
+
Object.assign(providerConfig, providerOptions.nim);
|
|
773
|
+
}
|
|
774
|
+
if (providerOptions.custom) {
|
|
775
|
+
Object.assign(providerConfig, providerOptions.custom);
|
|
776
|
+
}
|
|
777
|
+
return providerConfig;
|
|
778
|
+
}
|
|
779
|
+
/**
|
|
780
|
+
* Create a language model instance from configuration
|
|
781
|
+
* Throws error if no config provided - models must be configured at project level
|
|
782
|
+
*/
|
|
783
|
+
static createModel(config) {
|
|
784
|
+
if (!config?.model?.trim()) {
|
|
785
|
+
throw new Error(
|
|
786
|
+
"Model configuration is required. Please configure models at the project level."
|
|
787
|
+
);
|
|
788
|
+
}
|
|
789
|
+
const modelSettings = config;
|
|
790
|
+
if (!modelSettings.model) {
|
|
791
|
+
throw new Error("Model configuration is required");
|
|
792
|
+
}
|
|
793
|
+
const modelString = modelSettings.model.trim();
|
|
794
|
+
const { provider, modelName } = _ModelFactory.parseModelString(modelString);
|
|
795
|
+
logger2.debug(
|
|
796
|
+
{
|
|
797
|
+
provider,
|
|
798
|
+
model: modelName,
|
|
799
|
+
fullModelString: modelSettings.model,
|
|
800
|
+
hasProviderOptions: !!modelSettings.providerOptions
|
|
801
|
+
},
|
|
802
|
+
"Creating language model from config"
|
|
803
|
+
);
|
|
804
|
+
const providerConfig = _ModelFactory.extractProviderConfig(modelSettings.providerOptions);
|
|
805
|
+
if (Object.keys(providerConfig).length > 0) {
|
|
806
|
+
logger2.info({ config: providerConfig }, `Applying custom ${provider} provider configuration`);
|
|
807
|
+
const customProvider = _ModelFactory.createProvider(provider, providerConfig);
|
|
808
|
+
return customProvider.languageModel(modelName);
|
|
809
|
+
}
|
|
810
|
+
switch (provider) {
|
|
811
|
+
case "anthropic":
|
|
812
|
+
return anthropic(modelName);
|
|
813
|
+
case "openai":
|
|
814
|
+
return openai(modelName);
|
|
815
|
+
case "google":
|
|
816
|
+
return google(modelName);
|
|
817
|
+
case "openrouter":
|
|
818
|
+
return openrouter(modelName);
|
|
819
|
+
case "gateway":
|
|
820
|
+
return gateway(modelName);
|
|
821
|
+
case "nim":
|
|
822
|
+
return nimDefault(modelName);
|
|
823
|
+
case "custom":
|
|
824
|
+
throw new Error(
|
|
825
|
+
"Custom provider requires configuration. Please provide baseURL in providerOptions.custom.baseURL or providerOptions.baseURL"
|
|
826
|
+
);
|
|
827
|
+
default:
|
|
828
|
+
throw new Error(
|
|
829
|
+
`Unsupported provider: ${provider}. Supported providers are: ${_ModelFactory.BUILT_IN_PROVIDERS.join(", ")}. To access other models, use OpenRouter (openrouter/model-id), Vercel AI Gateway (gateway/model-id), NVIDIA NIM (nim/model-id), or Custom OpenAI-compatible (custom/model-id).`
|
|
830
|
+
);
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
/**
|
|
834
|
+
* Built-in providers that have special handling
|
|
835
|
+
*/
|
|
836
|
+
static BUILT_IN_PROVIDERS = [
|
|
837
|
+
"anthropic",
|
|
838
|
+
"openai",
|
|
839
|
+
"google",
|
|
840
|
+
"openrouter",
|
|
841
|
+
"gateway",
|
|
842
|
+
"nim",
|
|
843
|
+
"custom"
|
|
844
|
+
];
|
|
845
|
+
/**
|
|
846
|
+
* Parse model string to extract provider and model name
|
|
847
|
+
* Examples: "anthropic/claude-sonnet-4" -> { provider: "anthropic", modelName: "claude-sonnet-4" }
|
|
848
|
+
* "openrouter/anthropic/claude-sonnet-4" -> { provider: "openrouter", modelName: "anthropic/claude-sonnet-4" }
|
|
849
|
+
* "claude-sonnet-4" -> { provider: "anthropic", modelName: "claude-sonnet-4" } (default to anthropic)
|
|
850
|
+
*/
|
|
851
|
+
static parseModelString(modelString) {
|
|
852
|
+
if (modelString.includes("/")) {
|
|
853
|
+
const [provider, ...modelParts] = modelString.split("/");
|
|
854
|
+
const normalizedProvider = provider.toLowerCase();
|
|
855
|
+
if (!_ModelFactory.BUILT_IN_PROVIDERS.includes(normalizedProvider)) {
|
|
856
|
+
throw new Error(
|
|
857
|
+
`Unsupported provider: ${normalizedProvider}. Supported providers are: ${_ModelFactory.BUILT_IN_PROVIDERS.join(", ")}. To access other models, use OpenRouter (openrouter/model-id), Vercel AI Gateway (gateway/model-id), NVIDIA NIM (nim/model-id), or Custom OpenAI-compatible (custom/model-id).`
|
|
858
|
+
);
|
|
859
|
+
}
|
|
860
|
+
return {
|
|
861
|
+
provider: normalizedProvider,
|
|
862
|
+
modelName: modelParts.join("/")
|
|
863
|
+
};
|
|
864
|
+
}
|
|
865
|
+
throw new Error(`No provider specified in model string: ${modelString}`);
|
|
866
|
+
}
|
|
867
|
+
/**
|
|
868
|
+
* Get generation parameters from provider options
|
|
869
|
+
* These are parameters that get passed to generateText/streamText calls
|
|
870
|
+
*/
|
|
871
|
+
static getGenerationParams(providerOptions) {
|
|
872
|
+
if (!providerOptions) {
|
|
873
|
+
return {};
|
|
874
|
+
}
|
|
875
|
+
const excludedKeys = ["apiKey", "baseURL", "baseUrl", "maxDuration", "headers", "gateway", "nim", "custom"];
|
|
876
|
+
const params = {};
|
|
877
|
+
for (const [key, value] of Object.entries(providerOptions)) {
|
|
878
|
+
if (!excludedKeys.includes(key) && value !== void 0) {
|
|
879
|
+
params[key] = value;
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
return params;
|
|
883
|
+
}
|
|
884
|
+
/**
|
|
885
|
+
* Prepare complete generation configuration from model settings
|
|
886
|
+
* Returns model instance and generation parameters ready to spread into generateText/streamText
|
|
887
|
+
* Includes maxDuration if specified in provider options (in seconds, following Vercel standard)
|
|
888
|
+
*/
|
|
889
|
+
static prepareGenerationConfig(modelSettings) {
|
|
890
|
+
const modelString = modelSettings?.model?.trim();
|
|
891
|
+
const model = _ModelFactory.createModel({
|
|
892
|
+
model: modelString,
|
|
893
|
+
providerOptions: modelSettings?.providerOptions
|
|
894
|
+
});
|
|
895
|
+
const generationParams = _ModelFactory.getGenerationParams(modelSettings?.providerOptions);
|
|
896
|
+
const maxDuration = modelSettings?.providerOptions?.maxDuration;
|
|
897
|
+
return {
|
|
898
|
+
model,
|
|
899
|
+
...generationParams,
|
|
900
|
+
...maxDuration !== void 0 && { maxDuration }
|
|
901
|
+
};
|
|
902
|
+
}
|
|
903
|
+
/**
|
|
904
|
+
* Validate model settingsuration
|
|
905
|
+
* Basic validation only - let AI SDK handle parameter-specific validation
|
|
906
|
+
*/
|
|
907
|
+
static validateConfig(config) {
|
|
908
|
+
const errors = [];
|
|
909
|
+
if (!config.model) {
|
|
910
|
+
errors.push("Model name is required");
|
|
911
|
+
}
|
|
912
|
+
if (config.providerOptions) {
|
|
913
|
+
if (config.providerOptions.apiKey) {
|
|
914
|
+
errors.push(
|
|
915
|
+
"API keys should not be stored in provider options. Use environment variables (ANTHROPIC_API_KEY, OPENAI_API_KEY) or credential store instead."
|
|
916
|
+
);
|
|
917
|
+
}
|
|
918
|
+
if (config.providerOptions.maxDuration !== void 0) {
|
|
919
|
+
const maxDuration = config.providerOptions.maxDuration;
|
|
920
|
+
if (typeof maxDuration !== "number" || maxDuration <= 0) {
|
|
921
|
+
errors.push("maxDuration must be a positive number (in seconds)");
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
return errors;
|
|
926
|
+
}
|
|
927
|
+
};
|
|
928
|
+
var logger3 = getLogger("service-token-auth");
|
|
640
929
|
function getJwtSecret() {
|
|
641
930
|
const secret = env.INKEEP_AGENTS_JWT_SIGNING_SECRET;
|
|
642
931
|
const dev_secret = "insecure-dev-secret-change-in-production-min-32-chars";
|
|
@@ -646,7 +935,7 @@ function getJwtSecret() {
|
|
|
646
935
|
"INKEEP_AGENTS_JWT_SIGNING_SECRET environment variable is required in production"
|
|
647
936
|
);
|
|
648
937
|
}
|
|
649
|
-
|
|
938
|
+
logger3.warn(
|
|
650
939
|
{},
|
|
651
940
|
"INKEEP_AGENTS_JWT_SIGNING_SECRET not set, using insecure default. DO NOT USE IN PRODUCTION!"
|
|
652
941
|
);
|
|
@@ -661,7 +950,7 @@ async function generateServiceToken(params) {
|
|
|
661
950
|
tenantId: params.tenantId,
|
|
662
951
|
projectId: params.projectId
|
|
663
952
|
}).setProtectedHeader({ alg: "HS256", typ: "JWT" }).setIssuer("inkeep-agents").setSubject(params.originAgentId).setAudience(params.targetAgentId).setIssuedAt().setExpirationTime("5m").sign(secret);
|
|
664
|
-
|
|
953
|
+
logger3.debug(
|
|
665
954
|
{
|
|
666
955
|
originAgentId: params.originAgentId,
|
|
667
956
|
targetAgentId: params.targetAgentId,
|
|
@@ -671,7 +960,7 @@ async function generateServiceToken(params) {
|
|
|
671
960
|
);
|
|
672
961
|
return token;
|
|
673
962
|
} catch (error) {
|
|
674
|
-
|
|
963
|
+
logger3.error({ error }, "Failed to generate service token");
|
|
675
964
|
throw new Error("Failed to generate service token");
|
|
676
965
|
}
|
|
677
966
|
}
|
|
@@ -683,7 +972,7 @@ async function verifyServiceToken(token) {
|
|
|
683
972
|
algorithms: ["HS256"]
|
|
684
973
|
});
|
|
685
974
|
if (typeof payload.sub !== "string" || typeof payload.aud !== "string" || typeof payload.tenantId !== "string" || typeof payload.projectId !== "string") {
|
|
686
|
-
|
|
975
|
+
logger3.warn({ payload }, "Invalid service token: missing required claims");
|
|
687
976
|
return {
|
|
688
977
|
valid: false,
|
|
689
978
|
error: "Invalid token: missing required claims"
|
|
@@ -698,7 +987,7 @@ async function verifyServiceToken(token) {
|
|
|
698
987
|
iat: payload.iat,
|
|
699
988
|
exp: payload.exp
|
|
700
989
|
};
|
|
701
|
-
|
|
990
|
+
logger3.debug(
|
|
702
991
|
{
|
|
703
992
|
originAgentId: validPayload.sub,
|
|
704
993
|
targetAgentId: validPayload.aud,
|
|
@@ -712,13 +1001,13 @@ async function verifyServiceToken(token) {
|
|
|
712
1001
|
};
|
|
713
1002
|
} catch (error) {
|
|
714
1003
|
if (error instanceof Error) {
|
|
715
|
-
|
|
1004
|
+
logger3.warn({ error: error.message }, "Team agent token verification failed");
|
|
716
1005
|
return {
|
|
717
1006
|
valid: false,
|
|
718
1007
|
error: error.message
|
|
719
1008
|
};
|
|
720
1009
|
}
|
|
721
|
-
|
|
1010
|
+
logger3.warn({ error }, "Team agent token verification failed with unknown error");
|
|
722
1011
|
return {
|
|
723
1012
|
valid: false,
|
|
724
1013
|
error: "Token verification failed"
|
|
@@ -727,7 +1016,7 @@ async function verifyServiceToken(token) {
|
|
|
727
1016
|
}
|
|
728
1017
|
function validateTenantId(payload, expectedTenantId) {
|
|
729
1018
|
if (payload.tenantId !== expectedTenantId) {
|
|
730
|
-
|
|
1019
|
+
logger3.warn(
|
|
731
1020
|
{
|
|
732
1021
|
tokenTenantId: payload.tenantId,
|
|
733
1022
|
expectedTenantId,
|
|
@@ -742,7 +1031,7 @@ function validateTenantId(payload, expectedTenantId) {
|
|
|
742
1031
|
}
|
|
743
1032
|
function validateTargetAgent(payload, expectedTargetAgentId) {
|
|
744
1033
|
if (payload.aud !== expectedTargetAgentId) {
|
|
745
|
-
|
|
1034
|
+
logger3.warn(
|
|
746
1035
|
{
|
|
747
1036
|
tokenTargetAgentId: payload.aud,
|
|
748
1037
|
expectedTargetAgentId,
|
|
@@ -793,7 +1082,7 @@ async function verifyTempToken(publicKeyPem, token) {
|
|
|
793
1082
|
}
|
|
794
1083
|
return payload;
|
|
795
1084
|
}
|
|
796
|
-
var
|
|
1085
|
+
var logger4 = getLogger("composio-client");
|
|
797
1086
|
var TOOLKIT_TO_CATEGORY = {
|
|
798
1087
|
github: "development",
|
|
799
1088
|
gitlab: "development",
|
|
@@ -867,21 +1156,21 @@ function addUserIdToUrl(url, userId) {
|
|
|
867
1156
|
async function deleteComposioConnectedAccount(accountId) {
|
|
868
1157
|
const composioInstance = getComposioInstance();
|
|
869
1158
|
if (!composioInstance) {
|
|
870
|
-
|
|
1159
|
+
logger4.info({}, "Composio not configured, skipping account deletion");
|
|
871
1160
|
return false;
|
|
872
1161
|
}
|
|
873
1162
|
try {
|
|
874
1163
|
await composioInstance.connectedAccounts.delete(accountId);
|
|
875
1164
|
return true;
|
|
876
1165
|
} catch (error) {
|
|
877
|
-
|
|
1166
|
+
logger4.warn({ error }, "Error deleting Composio connected account");
|
|
878
1167
|
return false;
|
|
879
1168
|
}
|
|
880
1169
|
}
|
|
881
1170
|
async function fetchComposioConnectedAccounts(derivedUserId) {
|
|
882
1171
|
const composioInstance = getComposioInstance();
|
|
883
1172
|
if (!composioInstance) {
|
|
884
|
-
|
|
1173
|
+
logger4.info({}, "Composio not configured, skipping connected accounts fetch");
|
|
885
1174
|
return null;
|
|
886
1175
|
}
|
|
887
1176
|
try {
|
|
@@ -890,25 +1179,25 @@ async function fetchComposioConnectedAccounts(derivedUserId) {
|
|
|
890
1179
|
});
|
|
891
1180
|
return connectedAccounts;
|
|
892
1181
|
} catch (error) {
|
|
893
|
-
|
|
1182
|
+
logger4.error({ error }, "Error fetching Composio connected accounts");
|
|
894
1183
|
return null;
|
|
895
1184
|
}
|
|
896
1185
|
}
|
|
897
1186
|
async function isComposioMCPServerAuthenticated(tenantId, projectId, mcpServerUrl) {
|
|
898
1187
|
const composioApiKey = process.env.COMPOSIO_API_KEY;
|
|
899
1188
|
if (!composioApiKey) {
|
|
900
|
-
|
|
1189
|
+
logger4.info({}, "Composio API key not configured, skipping auth check");
|
|
901
1190
|
return false;
|
|
902
1191
|
}
|
|
903
1192
|
const serverId = extractComposioServerId(mcpServerUrl);
|
|
904
1193
|
if (!serverId) {
|
|
905
|
-
|
|
1194
|
+
logger4.info({ mcpServerUrl }, "Could not extract Composio server ID from URL");
|
|
906
1195
|
return false;
|
|
907
1196
|
}
|
|
908
1197
|
const derivedUserId = deriveComposioUserId(tenantId, projectId);
|
|
909
1198
|
const composioInstance = getComposioInstance();
|
|
910
1199
|
if (!composioInstance) {
|
|
911
|
-
|
|
1200
|
+
logger4.info({}, "Composio not configured, skipping auth check");
|
|
912
1201
|
return false;
|
|
913
1202
|
}
|
|
914
1203
|
try {
|
|
@@ -926,7 +1215,7 @@ async function isComposioMCPServerAuthenticated(tenantId, projectId, mcpServerUr
|
|
|
926
1215
|
);
|
|
927
1216
|
return !!activeAccount;
|
|
928
1217
|
} catch (error) {
|
|
929
|
-
|
|
1218
|
+
logger4.error({ error, mcpServerUrl }, "Error checking Composio authentication status");
|
|
930
1219
|
return false;
|
|
931
1220
|
}
|
|
932
1221
|
}
|
|
@@ -950,7 +1239,7 @@ function transformComposioServerData(composioMcpServer, isAuthenticated, url, th
|
|
|
950
1239
|
async function ensureComposioAccount(composioMcpServer, derivedUserId, initiatedAccounts) {
|
|
951
1240
|
const firstAuthConfigId = composioMcpServer.authConfigIds[0];
|
|
952
1241
|
if (!firstAuthConfigId) {
|
|
953
|
-
|
|
1242
|
+
logger4.error({ serverId: composioMcpServer.id }, "No auth config ID found for MCP server");
|
|
954
1243
|
return null;
|
|
955
1244
|
}
|
|
956
1245
|
const existingInitiatedAccount = initiatedAccounts.find(
|
|
@@ -962,7 +1251,7 @@ async function ensureComposioAccount(composioMcpServer, derivedUserId, initiated
|
|
|
962
1251
|
try {
|
|
963
1252
|
const composioInstance = getComposioInstance();
|
|
964
1253
|
if (!composioInstance) {
|
|
965
|
-
|
|
1254
|
+
logger4.error({ serverId: composioMcpServer.id }, "Composio not configured");
|
|
966
1255
|
return null;
|
|
967
1256
|
}
|
|
968
1257
|
const createAccountResponse = await composioInstance.connectedAccounts.link(
|
|
@@ -971,7 +1260,7 @@ async function ensureComposioAccount(composioMcpServer, derivedUserId, initiated
|
|
|
971
1260
|
);
|
|
972
1261
|
return createAccountResponse.redirectUrl ?? null;
|
|
973
1262
|
} catch (error) {
|
|
974
|
-
|
|
1263
|
+
logger4.error(
|
|
975
1264
|
{ serverId: composioMcpServer.id, error },
|
|
976
1265
|
"Error creating connected account for MCP server"
|
|
977
1266
|
);
|
|
@@ -1008,13 +1297,13 @@ async function transformComposioServer(composioMcpServer, authenticatedAuthConfi
|
|
|
1008
1297
|
async function fetchComposioServers(tenantId, projectId) {
|
|
1009
1298
|
const composioApiKey = process.env.COMPOSIO_API_KEY;
|
|
1010
1299
|
if (!composioApiKey) {
|
|
1011
|
-
|
|
1300
|
+
logger4.info({}, "COMPOSIO_API_KEY not configured, skipping Composio servers");
|
|
1012
1301
|
return [];
|
|
1013
1302
|
}
|
|
1014
1303
|
const derivedUserId = deriveComposioUserId(tenantId, projectId);
|
|
1015
1304
|
const composioInstance = getComposioInstance();
|
|
1016
1305
|
if (!composioInstance) {
|
|
1017
|
-
|
|
1306
|
+
logger4.info({}, "Composio not configured, returning empty list");
|
|
1018
1307
|
return [];
|
|
1019
1308
|
}
|
|
1020
1309
|
try {
|
|
@@ -1051,26 +1340,26 @@ async function fetchComposioServers(tenantId, projectId) {
|
|
|
1051
1340
|
);
|
|
1052
1341
|
return validServers;
|
|
1053
1342
|
} catch (error) {
|
|
1054
|
-
|
|
1343
|
+
logger4.error({ error }, "Failed to fetch Composio servers");
|
|
1055
1344
|
return [];
|
|
1056
1345
|
}
|
|
1057
1346
|
}
|
|
1058
1347
|
async function fetchSingleComposioServer(tenantId, projectId, mcpServerUrl) {
|
|
1059
1348
|
const composioApiKey = process.env.COMPOSIO_API_KEY;
|
|
1060
1349
|
if (!composioApiKey) {
|
|
1061
|
-
|
|
1350
|
+
logger4.debug({}, "COMPOSIO_API_KEY not configured");
|
|
1062
1351
|
return null;
|
|
1063
1352
|
}
|
|
1064
1353
|
const derivedUserId = deriveComposioUserId(tenantId, projectId);
|
|
1065
1354
|
const composioInstance = getComposioInstance();
|
|
1066
1355
|
if (!composioInstance) {
|
|
1067
|
-
|
|
1356
|
+
logger4.info({}, "Composio not configured, returning null");
|
|
1068
1357
|
return null;
|
|
1069
1358
|
}
|
|
1070
1359
|
try {
|
|
1071
1360
|
const serverId = extractComposioServerId(mcpServerUrl);
|
|
1072
1361
|
if (!serverId) {
|
|
1073
|
-
|
|
1362
|
+
logger4.error({ mcpServerUrl }, "Could not extract Composio server ID from URL");
|
|
1074
1363
|
return null;
|
|
1075
1364
|
}
|
|
1076
1365
|
const composioMcpServer = await composioInstance.mcp.get(serverId);
|
|
@@ -1094,23 +1383,23 @@ async function fetchSingleComposioServer(tenantId, projectId, mcpServerUrl) {
|
|
|
1094
1383
|
);
|
|
1095
1384
|
return transformedServer;
|
|
1096
1385
|
} catch (error) {
|
|
1097
|
-
|
|
1386
|
+
logger4.error({ error, mcpServerUrl }, "Failed to fetch single Composio server");
|
|
1098
1387
|
return null;
|
|
1099
1388
|
}
|
|
1100
1389
|
}
|
|
1101
1390
|
|
|
1102
1391
|
// src/utils/third-party-mcp-servers/third-party-check.ts
|
|
1103
|
-
var
|
|
1392
|
+
var logger5 = getLogger("third-party-check");
|
|
1104
1393
|
async function isThirdPartyMCPServerAuthenticated(tenantId, projectId, mcpServerUrl) {
|
|
1105
1394
|
const composioServerId = extractComposioServerId(mcpServerUrl);
|
|
1106
1395
|
if (composioServerId) {
|
|
1107
|
-
|
|
1396
|
+
logger5.debug({ mcpServerUrl }, "Detected Composio MCP server, checking auth status");
|
|
1108
1397
|
return isComposioMCPServerAuthenticated(tenantId, projectId, mcpServerUrl);
|
|
1109
1398
|
}
|
|
1110
|
-
|
|
1399
|
+
logger5.info({ mcpServerUrl }, "Unknown third-party MCP server provider");
|
|
1111
1400
|
return false;
|
|
1112
1401
|
}
|
|
1113
|
-
var
|
|
1402
|
+
var logger6 = getLogger("tracer");
|
|
1114
1403
|
var createNoOpSpan = () => ({
|
|
1115
1404
|
setAttributes: () => ({}),
|
|
1116
1405
|
recordException: () => ({}),
|
|
@@ -1139,23 +1428,23 @@ var noopTracer = {
|
|
|
1139
1428
|
return createNoOpSpan();
|
|
1140
1429
|
}
|
|
1141
1430
|
};
|
|
1142
|
-
function setSpanWithError(span, error,
|
|
1431
|
+
function setSpanWithError(span, error, logger7, logMessage) {
|
|
1143
1432
|
span.recordException(error);
|
|
1144
1433
|
span.setStatus({
|
|
1145
1434
|
code: SpanStatusCode.ERROR,
|
|
1146
1435
|
message: error.message
|
|
1147
1436
|
});
|
|
1148
|
-
if (
|
|
1149
|
-
|
|
1437
|
+
if (logger7 && logMessage) {
|
|
1438
|
+
logger7.error({ error: error.message }, logMessage);
|
|
1150
1439
|
}
|
|
1151
1440
|
}
|
|
1152
1441
|
function getTracer(serviceName, serviceVersion) {
|
|
1153
1442
|
try {
|
|
1154
1443
|
return trace.getTracer(serviceName, serviceVersion);
|
|
1155
1444
|
} catch (_error) {
|
|
1156
|
-
|
|
1445
|
+
logger6.debug({}, "OpenTelemetry tracer not available, using no-op tracer");
|
|
1157
1446
|
return noopTracer;
|
|
1158
1447
|
}
|
|
1159
1448
|
}
|
|
1160
1449
|
|
|
1161
|
-
export { CONVERSATION_HISTORY_DEFAULT_LIMIT, CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT, ERROR_DOCS_BASE_URL, ErrorCode, MCP_TOOL_CONNECTION_TIMEOUT_MS, MCP_TOOL_INITIAL_RECONNECTION_DELAY_MS, MCP_TOOL_MAX_RECONNECTION_DELAY_MS, MCP_TOOL_MAX_RETRIES, MCP_TOOL_RECONNECTION_DELAY_GROWTH_FACTOR, McpClient, commonCreateErrorResponses, commonDeleteErrorResponses, commonGetErrorResponses, commonUpdateErrorResponses, createApiError, createExecutionContext, errorResponseSchema, errorSchemaFactory, executionLimitsSharedDefaults, extractComposioServerId, extractPublicId, fetchComposioServers, fetchSingleComposioServer, generateApiKey, generateId, generateServiceToken, getConversationId, getCredentialStoreLookupKeyFromRetrievalParams, getRequestExecutionContext, getTracer, handleApiError, hashApiKey, isApiKeyExpired, isComposioMCPServerAuthenticated, isThirdPartyMCPServerAuthenticated, maskApiKey, normalizeDateString, problemDetailsSchema, setSpanWithError, signTempToken, validateApiKey, validateTargetAgent, validateTenantId, verifyAuthorizationHeader, verifyServiceToken, verifyTempToken };
|
|
1450
|
+
export { CONVERSATION_HISTORY_DEFAULT_LIMIT, CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT, ERROR_DOCS_BASE_URL, ErrorCode, MCP_TOOL_CONNECTION_TIMEOUT_MS, MCP_TOOL_INITIAL_RECONNECTION_DELAY_MS, MCP_TOOL_MAX_RECONNECTION_DELAY_MS, MCP_TOOL_MAX_RETRIES, MCP_TOOL_RECONNECTION_DELAY_GROWTH_FACTOR, McpClient, ModelFactory, commonCreateErrorResponses, commonDeleteErrorResponses, commonGetErrorResponses, commonUpdateErrorResponses, createApiError, createExecutionContext, errorResponseSchema, errorSchemaFactory, executionLimitsSharedDefaults, extractComposioServerId, extractPublicId, fetchComposioServers, fetchSingleComposioServer, formatMessagesForLLM, formatMessagesForLLMContext, generateApiKey, generateId, generateServiceToken, getConversationId, getCredentialStoreLookupKeyFromRetrievalParams, getRequestExecutionContext, getTracer, handleApiError, hashApiKey, isApiKeyExpired, isComposioMCPServerAuthenticated, isThirdPartyMCPServerAuthenticated, maskApiKey, normalizeDateString, problemDetailsSchema, setSpanWithError, signTempToken, toISODateString, validateApiKey, validateTargetAgent, validateTenantId, verifyAuthorizationHeader, verifyServiceToken, verifyTempToken };
|