@inkeep/agents-core 0.0.0-dev-20251124172027 → 0.0.0-dev-20251124223719
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.js +28 -2
- package/dist/{chunk-OEHP46F7.js → chunk-32YRH2S7.js} +67 -63
- package/dist/chunk-CUM6BY2Y.js +320 -0
- package/dist/{chunk-AUIQTGXL.js → chunk-ICZLNCX7.js} +30 -29
- package/dist/{chunk-FOK3JSQN.js → chunk-MB2ZIPZS.js} +5 -5
- package/dist/chunk-OUXC23J7.js +12534 -0
- package/dist/{chunk-4RVJB4KV.js → chunk-Q5U2SVA6.js} +7 -8
- package/dist/{chunk-KMLLKRUY.js → chunk-SLQW43IV.js} +5 -4
- package/dist/{chunk-7GZHUB4J.js → chunk-SSRRHYU4.js} +5 -4
- package/dist/{chunk-ZCEKN54E.js → chunk-VQXQOGJU.js} +314 -312
- package/dist/client-exports.js +126 -125
- package/dist/constants/schema-validation/index.js +1 -1
- package/dist/credential-stores/index.js +1 -1
- package/dist/index.js +16 -14
- package/dist/utils/schema-conversion.js +1 -1
- package/dist/validation/index.js +2 -2
- package/package.json +4 -8
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { loadEnvironmentFiles, env } from './chunk-
|
|
1
|
+
import { loadEnvironmentFiles, env } from './chunk-Q5U2SVA6.js';
|
|
2
2
|
import { getLogger } from './chunk-DN4B564Y.js';
|
|
3
3
|
import { CredentialStoreType, MCPTransportType } from './chunk-YFHT5M2R.js';
|
|
4
|
-
import {
|
|
4
|
+
import { external_exports } from './chunk-OUXC23J7.js';
|
|
5
5
|
import { customAlphabet } from 'nanoid';
|
|
6
6
|
import { scrypt, randomBytes, timingSafeEqual } from 'crypto';
|
|
7
7
|
import { promisify } from 'util';
|
|
8
|
-
import { z as z$1 } from '@hono/zod-openapi';
|
|
9
8
|
import { HTTPException } from 'hono/http-exception';
|
|
10
9
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
11
10
|
import { SSEClientTransport } from '@modelcontextprotocol/sdk/client/sse.js';
|
|
@@ -48,12 +47,14 @@ var executionLimitsSharedDefaults = {
|
|
|
48
47
|
// Increased from 4,000 to 8,000 to accommodate tool results in conversation history.
|
|
49
48
|
CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT: 8e3
|
|
50
49
|
};
|
|
50
|
+
|
|
51
|
+
// src/constants/execution-limits-shared/index.ts
|
|
51
52
|
loadEnvironmentFiles();
|
|
52
|
-
var constantsSchema =
|
|
53
|
+
var constantsSchema = external_exports.object(
|
|
53
54
|
Object.fromEntries(
|
|
54
55
|
Object.keys(executionLimitsSharedDefaults).map((key) => [
|
|
55
56
|
`AGENTS_${key}`,
|
|
56
|
-
|
|
57
|
+
external_exports.coerce.number().optional()
|
|
57
58
|
])
|
|
58
59
|
)
|
|
59
60
|
);
|
|
@@ -182,7 +183,7 @@ function normalizeDateString(dateString) {
|
|
|
182
183
|
}
|
|
183
184
|
return dateString;
|
|
184
185
|
}
|
|
185
|
-
var ErrorCode =
|
|
186
|
+
var ErrorCode = external_exports.enum([
|
|
186
187
|
"bad_request",
|
|
187
188
|
"unauthorized",
|
|
188
189
|
"forbidden",
|
|
@@ -201,28 +202,28 @@ var errorCodeToHttpStatus = {
|
|
|
201
202
|
internal_server_error: 500
|
|
202
203
|
};
|
|
203
204
|
var ERROR_DOCS_BASE_URL = "https://docs.inkeep.com/agents-api/errors";
|
|
204
|
-
var problemDetailsSchema =
|
|
205
|
+
var problemDetailsSchema = external_exports.object({
|
|
205
206
|
// type: z.string().url().openapi({
|
|
206
207
|
// description: "A URI reference that identifies the problem type.",
|
|
207
208
|
// example: `${ERROR_DOCS_BASE_URL}#not-found`,
|
|
208
209
|
// }),
|
|
209
|
-
title:
|
|
210
|
+
title: external_exports.string().openapi({
|
|
210
211
|
description: "A short, human-readable summary of the problem type.",
|
|
211
212
|
example: "Resource Not Found"
|
|
212
213
|
}),
|
|
213
|
-
status:
|
|
214
|
+
status: external_exports.number().int().openapi({
|
|
214
215
|
description: "The HTTP status code.",
|
|
215
216
|
example: 404
|
|
216
217
|
}),
|
|
217
|
-
detail:
|
|
218
|
+
detail: external_exports.string().openapi({
|
|
218
219
|
description: "A human-readable explanation specific to this occurrence of the problem.",
|
|
219
220
|
example: "The requested resource was not found."
|
|
220
221
|
}),
|
|
221
|
-
instance:
|
|
222
|
+
instance: external_exports.string().optional().openapi({
|
|
222
223
|
description: "A URI reference that identifies the specific occurrence of the problem.",
|
|
223
224
|
example: "/conversations/123"
|
|
224
225
|
}),
|
|
225
|
-
requestId:
|
|
226
|
+
requestId: external_exports.string().optional().openapi({
|
|
226
227
|
description: "A unique identifier for the request, useful for troubleshooting.",
|
|
227
228
|
example: "req_1234567890"
|
|
228
229
|
}),
|
|
@@ -231,13 +232,13 @@ var problemDetailsSchema = z$1.object({
|
|
|
231
232
|
example: "not_found"
|
|
232
233
|
})
|
|
233
234
|
}).openapi("ProblemDetails");
|
|
234
|
-
var errorResponseSchema =
|
|
235
|
-
error:
|
|
235
|
+
var errorResponseSchema = external_exports.object({
|
|
236
|
+
error: external_exports.object({
|
|
236
237
|
code: ErrorCode.openapi({
|
|
237
238
|
description: "A short code indicating the error code returned.",
|
|
238
239
|
example: "not_found"
|
|
239
240
|
}),
|
|
240
|
-
message:
|
|
241
|
+
message: external_exports.string().openapi({
|
|
241
242
|
description: "A human readable error message.",
|
|
242
243
|
example: "The requested resource was not found."
|
|
243
244
|
})
|
|
@@ -375,15 +376,15 @@ var errorSchemaFactory = (code, description) => ({
|
|
|
375
376
|
content: {
|
|
376
377
|
"application/problem+json": {
|
|
377
378
|
schema: problemDetailsSchema.extend({
|
|
378
|
-
code:
|
|
379
|
+
code: external_exports.literal(code).openapi({
|
|
379
380
|
description: "A short code indicating the error code returned.",
|
|
380
381
|
example: code
|
|
381
382
|
}),
|
|
382
|
-
detail:
|
|
383
|
+
detail: external_exports.string().openapi({
|
|
383
384
|
description: "A detailed explanation specific to this occurrence of the problem, providing context and specifics about what went wrong.",
|
|
384
385
|
example: description
|
|
385
386
|
}),
|
|
386
|
-
title:
|
|
387
|
+
title: external_exports.string().openapi({
|
|
387
388
|
description: "A short, human-readable summary of the problem type.",
|
|
388
389
|
example: getTitleFromCode(code)
|
|
389
390
|
}),
|
|
@@ -391,16 +392,16 @@ var errorSchemaFactory = (code, description) => ({
|
|
|
391
392
|
// description: "A URI reference that identifies the problem type.",
|
|
392
393
|
// example: `${ERROR_DOCS_BASE_URL}#${code}`,
|
|
393
394
|
// }),
|
|
394
|
-
status:
|
|
395
|
+
status: external_exports.number().int().openapi({
|
|
395
396
|
description: "The HTTP status code.",
|
|
396
397
|
example: errorCodeToHttpStatus[code]
|
|
397
398
|
}),
|
|
398
|
-
error:
|
|
399
|
-
code:
|
|
399
|
+
error: external_exports.object({
|
|
400
|
+
code: external_exports.literal(code).openapi({
|
|
400
401
|
description: "A short code indicating the error code returned.",
|
|
401
402
|
example: code
|
|
402
403
|
}),
|
|
403
|
-
message:
|
|
404
|
+
message: external_exports.string().openapi({
|
|
404
405
|
description: "A concise error message suitable for display to end users. May be truncated if the full detail is long.",
|
|
405
406
|
example: description.length > 100 ? `${description.substring(0, 97)}...` : description
|
|
406
407
|
})
|
|
@@ -578,7 +579,7 @@ var McpClient = class {
|
|
|
578
579
|
try {
|
|
579
580
|
const createZodSchema = (inputSchema) => {
|
|
580
581
|
if (!inputSchema || !inputSchema.properties) {
|
|
581
|
-
return
|
|
582
|
+
return external_exports.object({});
|
|
582
583
|
}
|
|
583
584
|
const zodProperties = {};
|
|
584
585
|
for (const [key, prop] of Object.entries(inputSchema.properties)) {
|
|
@@ -586,19 +587,19 @@ var McpClient = class {
|
|
|
586
587
|
let zodType;
|
|
587
588
|
switch (propDef.type) {
|
|
588
589
|
case "string":
|
|
589
|
-
zodType =
|
|
590
|
+
zodType = external_exports.string();
|
|
590
591
|
break;
|
|
591
592
|
case "number":
|
|
592
|
-
zodType =
|
|
593
|
+
zodType = external_exports.number();
|
|
593
594
|
break;
|
|
594
595
|
case "boolean":
|
|
595
|
-
zodType =
|
|
596
|
+
zodType = external_exports.boolean();
|
|
596
597
|
break;
|
|
597
598
|
case "array":
|
|
598
|
-
zodType =
|
|
599
|
+
zodType = external_exports.array(external_exports.any());
|
|
599
600
|
break;
|
|
600
601
|
default:
|
|
601
|
-
zodType =
|
|
602
|
+
zodType = external_exports.any();
|
|
602
603
|
}
|
|
603
604
|
if (propDef.description) {
|
|
604
605
|
zodType = zodType.describe(propDef.description);
|
|
@@ -609,7 +610,7 @@ var McpClient = class {
|
|
|
609
610
|
}
|
|
610
611
|
zodProperties[key] = zodType;
|
|
611
612
|
}
|
|
612
|
-
return
|
|
613
|
+
return external_exports.object(zodProperties);
|
|
613
614
|
};
|
|
614
615
|
const schema = createZodSchema(def.inputSchema);
|
|
615
616
|
const createdTool = tool({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getLogger } from './chunk-DN4B564Y.js';
|
|
2
2
|
import { CredentialStoreType } from './chunk-YFHT5M2R.js';
|
|
3
|
+
import { external_exports } from './chunk-OUXC23J7.js';
|
|
3
4
|
import { Nango } from '@nangohq/node';
|
|
4
|
-
import { z } from 'zod';
|
|
5
5
|
|
|
6
6
|
// src/credential-stores/CredentialStoreRegistry.ts
|
|
7
7
|
var CredentialStoreRegistry = class {
|
|
@@ -349,10 +349,10 @@ var InMemoryCredentialStore = class {
|
|
|
349
349
|
}
|
|
350
350
|
};
|
|
351
351
|
var logger = getLogger("nango-credential-store");
|
|
352
|
-
var CredentialKeySchema =
|
|
353
|
-
connectionId:
|
|
354
|
-
providerConfigKey:
|
|
355
|
-
integrationDisplayName:
|
|
352
|
+
var CredentialKeySchema = external_exports.object({
|
|
353
|
+
connectionId: external_exports.string().min(1, "connectionId must be a non-empty string"),
|
|
354
|
+
providerConfigKey: external_exports.string().min(1, "providerConfigKey must be a non-empty string"),
|
|
355
|
+
integrationDisplayName: external_exports.string().nullish()
|
|
356
356
|
});
|
|
357
357
|
function parseCredentialKey(key) {
|
|
358
358
|
try {
|