@inkeep/agents-core 0.0.0-dev-20250910233441 → 0.0.0-dev-20250911000146
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/{chunk-TSPWAF64.js → chunk-355CYJ6K.js} +1 -1
- package/dist/{chunk-RFWSE64N.js → chunk-OL6BLWXL.js} +17 -15
- package/dist/chunk-SVGQSPW4.js +24 -0
- package/dist/client-exports.cjs +16 -2
- package/dist/client-exports.d.cts +15 -2
- package/dist/client-exports.d.ts +15 -2
- package/dist/client-exports.js +3 -2
- package/dist/db/schema.cjs +1 -1
- package/dist/db/schema.d.cts +3 -2
- package/dist/db/schema.d.ts +3 -2
- package/dist/db/schema.js +1 -1
- package/dist/{utility-D2Lb-YAS.d.cts → entities-yHYR8Oc6.d.cts} +1953 -1926
- package/dist/{utility-D2Lb-YAS.d.ts → entities-yHYR8Oc6.d.ts} +1953 -1926
- package/dist/index.cjs +55 -38
- package/dist/index.d.cts +209 -209
- package/dist/index.d.ts +209 -209
- package/dist/index.js +16 -15
- package/dist/{schema-E0ulMd3k.d.cts → schema-C0iKVu5c.d.cts} +1 -1
- package/dist/{schema-B5YbTpz8.d.ts → schema-USqOwJEr.d.ts} +1 -1
- package/dist/types/index.cjs +16 -0
- package/dist/types/index.d.cts +5 -3
- package/dist/types/index.d.ts +5 -3
- package/dist/types/index.js +1 -1
- package/dist/validation/index.cjs +28 -14
- package/dist/validation/index.d.cts +3 -2
- package/dist/validation/index.d.ts +3 -2
- package/dist/validation/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-BIIFENNH.js +0 -11
package/dist/index.cjs
CHANGED
|
@@ -656,7 +656,7 @@ var credentialReferences = sqliteCore.sqliteTable(
|
|
|
656
656
|
projectId: sqliteCore.text("project_id").notNull(),
|
|
657
657
|
id: sqliteCore.text("id").notNull(),
|
|
658
658
|
type: sqliteCore.text("type").notNull(),
|
|
659
|
-
// Implementation type: '
|
|
659
|
+
// Implementation type: 'keychain', 'nango', 'memory', etc.
|
|
660
660
|
credentialStoreId: sqliteCore.text("credential_store_id").notNull(),
|
|
661
661
|
// Maps to framework.getCredentialStore(id)
|
|
662
662
|
retrievalParams: sqliteCore.blob("retrieval_params", { mode: "json" }).$type(),
|
|
@@ -962,6 +962,19 @@ var TOOL_STATUS_VALUES = [
|
|
|
962
962
|
"needs_auth"
|
|
963
963
|
];
|
|
964
964
|
var VALID_RELATION_TYPES = ["transfer", "delegate"];
|
|
965
|
+
var MCPTransportType = {
|
|
966
|
+
streamableHttp: "streamable_http",
|
|
967
|
+
sse: "sse"
|
|
968
|
+
};
|
|
969
|
+
var MCPServerType = {
|
|
970
|
+
nango: "nango",
|
|
971
|
+
generic: "generic"
|
|
972
|
+
};
|
|
973
|
+
var CredentialStoreType = {
|
|
974
|
+
memory: "memory",
|
|
975
|
+
keychain: "keychain",
|
|
976
|
+
nango: "nango"
|
|
977
|
+
};
|
|
965
978
|
|
|
966
979
|
// src/validation/schemas.ts
|
|
967
980
|
var MIN_ID_LENGTH = 1;
|
|
@@ -1096,10 +1109,10 @@ var imageUrlSchema = zodOpenapi.z.string().optional().refine(
|
|
|
1096
1109
|
}
|
|
1097
1110
|
);
|
|
1098
1111
|
var McpTransportConfigSchema = zodOpenapi.z.object({
|
|
1099
|
-
type: zodOpenapi.z.enum(
|
|
1112
|
+
type: zodOpenapi.z.enum(MCPTransportType),
|
|
1100
1113
|
requestInit: zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.unknown()).optional(),
|
|
1101
1114
|
eventSourceInit: zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.unknown()).optional(),
|
|
1102
|
-
reconnectionOptions: zodOpenapi.z.
|
|
1115
|
+
reconnectionOptions: zodOpenapi.z.custom().optional(),
|
|
1103
1116
|
sessionId: zodOpenapi.z.string().optional()
|
|
1104
1117
|
});
|
|
1105
1118
|
var ToolStatusSchema = zodOpenapi.z.enum(TOOL_STATUS_VALUES);
|
|
@@ -1273,13 +1286,21 @@ var CredentialReferenceInsertSchema = zodOpenapi.z.object({
|
|
|
1273
1286
|
retrievalParams: zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.unknown()).nullish()
|
|
1274
1287
|
});
|
|
1275
1288
|
var CredentialReferenceUpdateSchema = CredentialReferenceInsertSchema.partial();
|
|
1276
|
-
var CredentialReferenceApiSelectSchema = createApiSchema(
|
|
1289
|
+
var CredentialReferenceApiSelectSchema = createApiSchema(
|
|
1290
|
+
CredentialReferenceSelectSchema
|
|
1291
|
+
).extend({
|
|
1292
|
+
type: zodOpenapi.z.enum(CredentialStoreType)
|
|
1293
|
+
});
|
|
1277
1294
|
var CredentialReferenceApiInsertSchema = createApiInsertSchema(
|
|
1278
1295
|
CredentialReferenceInsertSchema
|
|
1279
|
-
)
|
|
1296
|
+
).extend({
|
|
1297
|
+
type: zodOpenapi.z.enum(CredentialStoreType)
|
|
1298
|
+
});
|
|
1280
1299
|
var CredentialReferenceApiUpdateSchema = createApiUpdateSchema(
|
|
1281
1300
|
CredentialReferenceUpdateSchema
|
|
1282
|
-
)
|
|
1301
|
+
).extend({
|
|
1302
|
+
type: zodOpenapi.z.enum(CredentialStoreType).optional()
|
|
1303
|
+
});
|
|
1283
1304
|
var McpToolSchema = ToolInsertSchema.extend({
|
|
1284
1305
|
imageUrl: imageUrlSchema,
|
|
1285
1306
|
status: ToolStatusSchema.default("unknown"),
|
|
@@ -1289,10 +1310,6 @@ var McpToolSchema = ToolInsertSchema.extend({
|
|
|
1289
1310
|
createdAt: zodOpenapi.z.date(),
|
|
1290
1311
|
updatedAt: zodOpenapi.z.date()
|
|
1291
1312
|
});
|
|
1292
|
-
var McpToolServerConfigSchema = zodOpenapi.z.object({
|
|
1293
|
-
type: zodOpenapi.z.string(),
|
|
1294
|
-
version: zodOpenapi.z.string().optional()
|
|
1295
|
-
});
|
|
1296
1313
|
var MCPToolConfigSchema = McpToolSchema.omit({
|
|
1297
1314
|
config: true,
|
|
1298
1315
|
tenantId: true,
|
|
@@ -1308,11 +1325,9 @@ var MCPToolConfigSchema = McpToolSchema.omit({
|
|
|
1308
1325
|
tenantId: zodOpenapi.z.string().optional(),
|
|
1309
1326
|
projectId: zodOpenapi.z.string().optional(),
|
|
1310
1327
|
description: zodOpenapi.z.string().optional(),
|
|
1311
|
-
server: McpToolServerConfigSchema.optional(),
|
|
1312
1328
|
serverUrl: zodOpenapi.z.url(),
|
|
1313
|
-
toolName: zodOpenapi.z.string().optional(),
|
|
1314
1329
|
activeTools: zodOpenapi.z.array(zodOpenapi.z.string()).optional(),
|
|
1315
|
-
mcpType: zodOpenapi.z.enum(
|
|
1330
|
+
mcpType: zodOpenapi.z.enum(MCPServerType).optional(),
|
|
1316
1331
|
transport: McpTransportConfigSchema.optional(),
|
|
1317
1332
|
credential: CredentialReferenceApiInsertSchema.optional()
|
|
1318
1333
|
});
|
|
@@ -1984,6 +1999,20 @@ __publicField(_TemplateEngine, "DEFAULT_OPTIONS", {
|
|
|
1984
1999
|
});
|
|
1985
2000
|
var TemplateEngine = _TemplateEngine;
|
|
1986
2001
|
|
|
2002
|
+
// src/types/a2a.ts
|
|
2003
|
+
var TaskState = /* @__PURE__ */ ((TaskState2) => {
|
|
2004
|
+
TaskState2["Submitted"] = "submitted";
|
|
2005
|
+
TaskState2["Working"] = "working";
|
|
2006
|
+
TaskState2["InputRequired"] = "input-required";
|
|
2007
|
+
TaskState2["Completed"] = "completed";
|
|
2008
|
+
TaskState2["Canceled"] = "canceled";
|
|
2009
|
+
TaskState2["Failed"] = "failed";
|
|
2010
|
+
TaskState2["Rejected"] = "rejected";
|
|
2011
|
+
TaskState2["AuthRequired"] = "auth-required";
|
|
2012
|
+
TaskState2["Unknown"] = "unknown";
|
|
2013
|
+
return TaskState2;
|
|
2014
|
+
})(TaskState || {});
|
|
2015
|
+
|
|
1987
2016
|
// src/utils/credential-store-utils.ts
|
|
1988
2017
|
function getCredentialStoreLookupKeyFromRetrievalParams({
|
|
1989
2018
|
retrievalParams,
|
|
@@ -1992,7 +2021,7 @@ function getCredentialStoreLookupKeyFromRetrievalParams({
|
|
|
1992
2021
|
if (retrievalParams.key) {
|
|
1993
2022
|
return retrievalParams.key;
|
|
1994
2023
|
}
|
|
1995
|
-
if (credentialStoreType ===
|
|
2024
|
+
if (credentialStoreType === CredentialStoreType.nango) {
|
|
1996
2025
|
return JSON.stringify({
|
|
1997
2026
|
connectionId: retrievalParams.connectionId,
|
|
1998
2027
|
providerConfigKey: retrievalParams.providerConfigKey
|
|
@@ -2038,10 +2067,10 @@ var CredentialStuffer = class {
|
|
|
2038
2067
|
);
|
|
2039
2068
|
return null;
|
|
2040
2069
|
}
|
|
2041
|
-
if (credentialStore.type ===
|
|
2070
|
+
if (credentialStore.type === CredentialStoreType.nango) {
|
|
2042
2071
|
try {
|
|
2043
2072
|
const nangoCredentialData = JSON.parse(credentialDataString);
|
|
2044
|
-
if (mcpType ===
|
|
2073
|
+
if (mcpType === MCPServerType.nango) {
|
|
2045
2074
|
return {
|
|
2046
2075
|
headers: {
|
|
2047
2076
|
// For Nango MCP, authenticate with the Nango secret key
|
|
@@ -2072,7 +2101,7 @@ var CredentialStuffer = class {
|
|
|
2072
2101
|
return null;
|
|
2073
2102
|
}
|
|
2074
2103
|
}
|
|
2075
|
-
if (credentialStore.type ===
|
|
2104
|
+
if (credentialStore.type === CredentialStoreType.keychain) {
|
|
2076
2105
|
try {
|
|
2077
2106
|
const oauthTokens = JSON.parse(credentialDataString);
|
|
2078
2107
|
if (oauthTokens.access_token) {
|
|
@@ -2168,11 +2197,11 @@ var CredentialStuffer = class {
|
|
|
2168
2197
|
});
|
|
2169
2198
|
}
|
|
2170
2199
|
const baseConfig = {
|
|
2171
|
-
type: tool2.transport?.type ||
|
|
2200
|
+
type: tool2.transport?.type || MCPTransportType.streamableHttp,
|
|
2172
2201
|
url: tool2.serverUrl,
|
|
2173
2202
|
activeTools: tool2.activeTools
|
|
2174
2203
|
};
|
|
2175
|
-
if (baseConfig.type ===
|
|
2204
|
+
if (baseConfig.type === MCPTransportType.streamableHttp || baseConfig.type === MCPTransportType.sse) {
|
|
2176
2205
|
const httpConfig = {
|
|
2177
2206
|
...baseConfig,
|
|
2178
2207
|
url: tool2.serverUrl,
|
|
@@ -6967,7 +6996,7 @@ var McpClient = class {
|
|
|
6967
6996
|
}
|
|
6968
6997
|
async connect() {
|
|
6969
6998
|
if (this.connected) return;
|
|
6970
|
-
await tsPattern.match(this.serverConfig).with({ type:
|
|
6999
|
+
await tsPattern.match(this.serverConfig).with({ type: MCPTransportType.streamableHttp }, (config2) => this.connectHttp(config2)).with({ type: MCPTransportType.sse }, (config2) => this.connectSSE(config2)).exhaustive();
|
|
6971
7000
|
this.connected = true;
|
|
6972
7001
|
const close = this.client.onclose;
|
|
6973
7002
|
this.client.onclose = () => {
|
|
@@ -8771,7 +8800,7 @@ var CredentialStoreRegistry = class {
|
|
|
8771
8800
|
var KeyChainStore = class {
|
|
8772
8801
|
constructor(id, servicePrefix = "inkeep-agent-framework") {
|
|
8773
8802
|
__publicField(this, "id");
|
|
8774
|
-
__publicField(this, "type",
|
|
8803
|
+
__publicField(this, "type", CredentialStoreType.keychain);
|
|
8775
8804
|
__publicField(this, "service");
|
|
8776
8805
|
__publicField(this, "logger", getLogger("KeyChainStore"));
|
|
8777
8806
|
__publicField(this, "keytarAvailable", false);
|
|
@@ -8972,7 +9001,7 @@ function createKeyChainStore(id, options) {
|
|
|
8972
9001
|
var InMemoryCredentialStore = class {
|
|
8973
9002
|
constructor(id = "memory-default") {
|
|
8974
9003
|
__publicField(this, "id");
|
|
8975
|
-
__publicField(this, "type",
|
|
9004
|
+
__publicField(this, "type", CredentialStoreType.memory);
|
|
8976
9005
|
__publicField(this, "credentials", /* @__PURE__ */ new Map());
|
|
8977
9006
|
this.id = id;
|
|
8978
9007
|
}
|
|
@@ -9043,7 +9072,7 @@ function isSupportedAuthMode(mode) {
|
|
|
9043
9072
|
var NangoCredentialStore = class {
|
|
9044
9073
|
constructor(id, config2) {
|
|
9045
9074
|
__publicField(this, "id");
|
|
9046
|
-
__publicField(this, "type",
|
|
9075
|
+
__publicField(this, "type", CredentialStoreType.nango);
|
|
9047
9076
|
__publicField(this, "nangoConfig");
|
|
9048
9077
|
__publicField(this, "nangoClient");
|
|
9049
9078
|
this.id = id;
|
|
@@ -9304,20 +9333,6 @@ function createDefaultCredentialStores() {
|
|
|
9304
9333
|
return stores;
|
|
9305
9334
|
}
|
|
9306
9335
|
|
|
9307
|
-
// src/types/a2a.ts
|
|
9308
|
-
var TaskState = /* @__PURE__ */ ((TaskState2) => {
|
|
9309
|
-
TaskState2["Submitted"] = "submitted";
|
|
9310
|
-
TaskState2["Working"] = "working";
|
|
9311
|
-
TaskState2["InputRequired"] = "input-required";
|
|
9312
|
-
TaskState2["Completed"] = "completed";
|
|
9313
|
-
TaskState2["Canceled"] = "canceled";
|
|
9314
|
-
TaskState2["Failed"] = "failed";
|
|
9315
|
-
TaskState2["Rejected"] = "rejected";
|
|
9316
|
-
TaskState2["AuthRequired"] = "auth-required";
|
|
9317
|
-
TaskState2["Unknown"] = "unknown";
|
|
9318
|
-
return TaskState2;
|
|
9319
|
-
})(TaskState || {});
|
|
9320
|
-
|
|
9321
9336
|
// src/validation/id-validation.ts
|
|
9322
9337
|
function isValidResourceId(id) {
|
|
9323
9338
|
const result = resourceIdSchema.safeParse(id);
|
|
@@ -9418,6 +9433,7 @@ exports.CredentialReferenceInsertSchema = CredentialReferenceInsertSchema;
|
|
|
9418
9433
|
exports.CredentialReferenceSelectSchema = CredentialReferenceSelectSchema;
|
|
9419
9434
|
exports.CredentialReferenceUpdateSchema = CredentialReferenceUpdateSchema;
|
|
9420
9435
|
exports.CredentialStoreRegistry = CredentialStoreRegistry;
|
|
9436
|
+
exports.CredentialStoreType = CredentialStoreType;
|
|
9421
9437
|
exports.CredentialStuffer = CredentialStuffer;
|
|
9422
9438
|
exports.DataComponentApiInsertSchema = DataComponentApiInsertSchema;
|
|
9423
9439
|
exports.DataComponentApiSelectSchema = DataComponentApiSelectSchema;
|
|
@@ -9455,12 +9471,13 @@ exports.LedgerArtifactSelectSchema = LedgerArtifactSelectSchema;
|
|
|
9455
9471
|
exports.LedgerArtifactUpdateSchema = LedgerArtifactUpdateSchema;
|
|
9456
9472
|
exports.ListResponseSchema = ListResponseSchema;
|
|
9457
9473
|
exports.MAX_ID_LENGTH = MAX_ID_LENGTH;
|
|
9474
|
+
exports.MCPServerType = MCPServerType;
|
|
9458
9475
|
exports.MCPToolConfigSchema = MCPToolConfigSchema;
|
|
9476
|
+
exports.MCPTransportType = MCPTransportType;
|
|
9459
9477
|
exports.MIN_ID_LENGTH = MIN_ID_LENGTH;
|
|
9460
9478
|
exports.McpClient = McpClient;
|
|
9461
9479
|
exports.McpToolDefinitionSchema = McpToolDefinitionSchema;
|
|
9462
9480
|
exports.McpToolSchema = McpToolSchema;
|
|
9463
|
-
exports.McpToolServerConfigSchema = McpToolServerConfigSchema;
|
|
9464
9481
|
exports.McpTransportConfigSchema = McpTransportConfigSchema;
|
|
9465
9482
|
exports.MessageApiInsertSchema = MessageApiInsertSchema;
|
|
9466
9483
|
exports.MessageApiSelectSchema = MessageApiSelectSchema;
|