@inkeep/agents-core 0.0.0-dev-20251003220013 → 0.0.0-dev-20251003221329
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-Y63D625C.js → chunk-ZVLDWUCT.js} +1 -1
- package/dist/client-exports.d.cts +7 -7
- package/dist/client-exports.d.ts +7 -7
- package/dist/client-exports.js +2 -2
- package/dist/db/schema.d.cts +2 -2
- package/dist/db/schema.d.ts +2 -2
- package/dist/index.cjs +48 -4
- package/dist/index.d.cts +253 -247
- package/dist/index.d.ts +253 -247
- package/dist/index.js +54 -10
- package/dist/{schema-DeUmRJk-.d.cts → schema-BB_Q_YNK.d.ts} +1 -1
- package/dist/{schema-DhRzICV3.d.ts → schema-DDUpvlcp.d.cts} +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/validation/index.d.cts +2 -2
- package/dist/validation/index.d.ts +2 -2
- package/dist/validation/index.js +2 -2
- package/package.json +1 -1
- package/dist/{chunk-YVZJ5VV7.js → chunk-AGEHLZUK.js} +1 -1
- package/dist/{utility-BOfzG3mF.d.cts → utility-Cd0qsewS.d.cts} +178 -178
- package/dist/{utility-BOfzG3mF.d.ts → utility-Cd0qsewS.d.ts} +178 -178
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { C as ConversationHistoryConfig, A as ApiKeyApiUpdateSchema, F as FullGraphAgentInsertSchema } from './utility-
|
|
3
|
-
export { d as AgentStopWhen, a as AgentStopWhenSchema, e as CredentialStoreType, c as GraphStopWhen, G as GraphStopWhenSchema, M as MCPTransportType, b as StopWhen, S as StopWhenSchema } from './utility-
|
|
2
|
+
import { C as ConversationHistoryConfig, A as ApiKeyApiUpdateSchema, F as FullGraphAgentInsertSchema } from './utility-Cd0qsewS.cjs';
|
|
3
|
+
export { d as AgentStopWhen, a as AgentStopWhenSchema, e as CredentialStoreType, c as GraphStopWhen, G as GraphStopWhenSchema, M as MCPTransportType, b as StopWhen, S as StopWhenSchema } from './utility-Cd0qsewS.cjs';
|
|
4
4
|
import 'drizzle-zod';
|
|
5
5
|
import 'drizzle-orm/sqlite-core';
|
|
6
6
|
import '@hono/zod-openapi';
|
|
@@ -67,8 +67,8 @@ declare const AgentApiInsertSchema: z.ZodObject<{
|
|
|
67
67
|
canTransferTo: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
68
68
|
canDelegateTo: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
69
69
|
type: z.ZodOptional<z.ZodEnum<{
|
|
70
|
-
external: "external";
|
|
71
70
|
internal: "internal";
|
|
71
|
+
external: "external";
|
|
72
72
|
}>>;
|
|
73
73
|
}, z.core.$strip>;
|
|
74
74
|
declare const ToolApiInsertSchema: z.ZodObject<{
|
|
@@ -168,11 +168,13 @@ declare const FullGraphDefinitionSchema: z.ZodObject<{
|
|
|
168
168
|
description: z.ZodOptional<z.ZodString>;
|
|
169
169
|
defaultAgentId: z.ZodOptional<z.ZodString>;
|
|
170
170
|
agents: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
171
|
-
name: z.ZodString;
|
|
172
171
|
id: z.ZodString;
|
|
172
|
+
name: z.ZodString;
|
|
173
|
+
description: z.ZodString;
|
|
174
|
+
prompt: z.ZodString;
|
|
173
175
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
174
176
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
175
|
-
|
|
177
|
+
conversationHistoryConfig: z.ZodOptional<z.ZodNullable<z.ZodType<ConversationHistoryConfig, ConversationHistoryConfig, z.core.$ZodTypeInternals<ConversationHistoryConfig, ConversationHistoryConfig>>>>;
|
|
176
178
|
models: z.ZodOptional<z.ZodObject<{
|
|
177
179
|
base: z.ZodOptional<z.ZodObject<{
|
|
178
180
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -196,8 +198,6 @@ declare const FullGraphDefinitionSchema: z.ZodObject<{
|
|
|
196
198
|
}, {
|
|
197
199
|
stepCountIs?: number | undefined;
|
|
198
200
|
}>>>>;
|
|
199
|
-
prompt: z.ZodString;
|
|
200
|
-
conversationHistoryConfig: z.ZodOptional<z.ZodNullable<z.ZodType<ConversationHistoryConfig, ConversationHistoryConfig, z.core.$ZodTypeInternals<ConversationHistoryConfig, ConversationHistoryConfig>>>>;
|
|
201
201
|
type: z.ZodLiteral<"internal">;
|
|
202
202
|
canUse: z.ZodArray<z.ZodObject<{
|
|
203
203
|
agentToolRelationId: z.ZodOptional<z.ZodString>;
|
package/dist/client-exports.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { C as ConversationHistoryConfig, A as ApiKeyApiUpdateSchema, F as FullGraphAgentInsertSchema } from './utility-
|
|
3
|
-
export { d as AgentStopWhen, a as AgentStopWhenSchema, e as CredentialStoreType, c as GraphStopWhen, G as GraphStopWhenSchema, M as MCPTransportType, b as StopWhen, S as StopWhenSchema } from './utility-
|
|
2
|
+
import { C as ConversationHistoryConfig, A as ApiKeyApiUpdateSchema, F as FullGraphAgentInsertSchema } from './utility-Cd0qsewS.js';
|
|
3
|
+
export { d as AgentStopWhen, a as AgentStopWhenSchema, e as CredentialStoreType, c as GraphStopWhen, G as GraphStopWhenSchema, M as MCPTransportType, b as StopWhen, S as StopWhenSchema } from './utility-Cd0qsewS.js';
|
|
4
4
|
import 'drizzle-zod';
|
|
5
5
|
import 'drizzle-orm/sqlite-core';
|
|
6
6
|
import '@hono/zod-openapi';
|
|
@@ -67,8 +67,8 @@ declare const AgentApiInsertSchema: z.ZodObject<{
|
|
|
67
67
|
canTransferTo: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
68
68
|
canDelegateTo: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
69
69
|
type: z.ZodOptional<z.ZodEnum<{
|
|
70
|
-
external: "external";
|
|
71
70
|
internal: "internal";
|
|
71
|
+
external: "external";
|
|
72
72
|
}>>;
|
|
73
73
|
}, z.core.$strip>;
|
|
74
74
|
declare const ToolApiInsertSchema: z.ZodObject<{
|
|
@@ -168,11 +168,13 @@ declare const FullGraphDefinitionSchema: z.ZodObject<{
|
|
|
168
168
|
description: z.ZodOptional<z.ZodString>;
|
|
169
169
|
defaultAgentId: z.ZodOptional<z.ZodString>;
|
|
170
170
|
agents: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
171
|
-
name: z.ZodString;
|
|
172
171
|
id: z.ZodString;
|
|
172
|
+
name: z.ZodString;
|
|
173
|
+
description: z.ZodString;
|
|
174
|
+
prompt: z.ZodString;
|
|
173
175
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
174
176
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
175
|
-
|
|
177
|
+
conversationHistoryConfig: z.ZodOptional<z.ZodNullable<z.ZodType<ConversationHistoryConfig, ConversationHistoryConfig, z.core.$ZodTypeInternals<ConversationHistoryConfig, ConversationHistoryConfig>>>>;
|
|
176
178
|
models: z.ZodOptional<z.ZodObject<{
|
|
177
179
|
base: z.ZodOptional<z.ZodObject<{
|
|
178
180
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -196,8 +198,6 @@ declare const FullGraphDefinitionSchema: z.ZodObject<{
|
|
|
196
198
|
}, {
|
|
197
199
|
stepCountIs?: number | undefined;
|
|
198
200
|
}>>>>;
|
|
199
|
-
prompt: z.ZodString;
|
|
200
|
-
conversationHistoryConfig: z.ZodOptional<z.ZodNullable<z.ZodType<ConversationHistoryConfig, ConversationHistoryConfig, z.core.$ZodTypeInternals<ConversationHistoryConfig, ConversationHistoryConfig>>>>;
|
|
201
201
|
type: z.ZodLiteral<"internal">;
|
|
202
202
|
canUse: z.ZodArray<z.ZodObject<{
|
|
203
203
|
agentToolRelationId: z.ZodOptional<z.ZodString>;
|
package/dist/client-exports.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FullGraphAgentInsertSchema } from './chunk-
|
|
2
|
-
export { AgentStopWhenSchema, GraphStopWhenSchema, StopWhenSchema } from './chunk-
|
|
1
|
+
import { FullGraphAgentInsertSchema } from './chunk-AGEHLZUK.js';
|
|
2
|
+
export { AgentStopWhenSchema, GraphStopWhenSchema, StopWhenSchema } from './chunk-AGEHLZUK.js';
|
|
3
3
|
import { CredentialStoreType } from './chunk-YFHT5M2R.js';
|
|
4
4
|
export { CredentialStoreType, MCPTransportType } from './chunk-YFHT5M2R.js';
|
|
5
5
|
import { z } from 'zod';
|
package/dist/db/schema.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'drizzle-orm';
|
|
2
2
|
import 'drizzle-orm/sqlite-core';
|
|
3
|
-
import '../utility-
|
|
4
|
-
export { k as agentArtifactComponents, K as agentArtifactComponentsRelations, i as agentDataComponents, M as agentDataComponentsRelations, a as agentGraph, B as agentGraphRelations, e as agentRelations, O as agentRelationsRelations, m as agentToolRelations, E as agentToolRelationsRelations, d as agents, A as agentsRelations, r as apiKeys, D as apiKeysRelations, j as artifactComponents, J as artifactComponentsRelations, b as contextCache, z as contextCacheRelations, c as contextConfigs, y as contextConfigsRelations, n as conversations, H as conversationsRelations, u as credentialReferences, F as credentialReferencesRelations, h as dataComponents, L as dataComponentsRelations, f as externalAgents, C as externalAgentsRelations, q as ledgerArtifacts, N as ledgerArtifactsRelations, o as messages, I as messagesRelations, p as projects, w as projectsRelations, g as taskRelations, x as taskRelationsRelations, t as tasks, v as tasksRelations, l as tools, G as toolsRelations } from '../schema-
|
|
3
|
+
import '../utility-Cd0qsewS.cjs';
|
|
4
|
+
export { k as agentArtifactComponents, K as agentArtifactComponentsRelations, i as agentDataComponents, M as agentDataComponentsRelations, a as agentGraph, B as agentGraphRelations, e as agentRelations, O as agentRelationsRelations, m as agentToolRelations, E as agentToolRelationsRelations, d as agents, A as agentsRelations, r as apiKeys, D as apiKeysRelations, j as artifactComponents, J as artifactComponentsRelations, b as contextCache, z as contextCacheRelations, c as contextConfigs, y as contextConfigsRelations, n as conversations, H as conversationsRelations, u as credentialReferences, F as credentialReferencesRelations, h as dataComponents, L as dataComponentsRelations, f as externalAgents, C as externalAgentsRelations, q as ledgerArtifacts, N as ledgerArtifactsRelations, o as messages, I as messagesRelations, p as projects, w as projectsRelations, g as taskRelations, x as taskRelationsRelations, t as tasks, v as tasksRelations, l as tools, G as toolsRelations } from '../schema-DDUpvlcp.cjs';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import 'drizzle-zod';
|
|
7
7
|
import '@hono/zod-openapi';
|
package/dist/db/schema.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'drizzle-orm';
|
|
2
2
|
import 'drizzle-orm/sqlite-core';
|
|
3
|
-
import '../utility-
|
|
4
|
-
export { k as agentArtifactComponents, K as agentArtifactComponentsRelations, i as agentDataComponents, M as agentDataComponentsRelations, a as agentGraph, B as agentGraphRelations, e as agentRelations, O as agentRelationsRelations, m as agentToolRelations, E as agentToolRelationsRelations, d as agents, A as agentsRelations, r as apiKeys, D as apiKeysRelations, j as artifactComponents, J as artifactComponentsRelations, b as contextCache, z as contextCacheRelations, c as contextConfigs, y as contextConfigsRelations, n as conversations, H as conversationsRelations, u as credentialReferences, F as credentialReferencesRelations, h as dataComponents, L as dataComponentsRelations, f as externalAgents, C as externalAgentsRelations, q as ledgerArtifacts, N as ledgerArtifactsRelations, o as messages, I as messagesRelations, p as projects, w as projectsRelations, g as taskRelations, x as taskRelationsRelations, t as tasks, v as tasksRelations, l as tools, G as toolsRelations } from '../schema-
|
|
3
|
+
import '../utility-Cd0qsewS.js';
|
|
4
|
+
export { k as agentArtifactComponents, K as agentArtifactComponentsRelations, i as agentDataComponents, M as agentDataComponentsRelations, a as agentGraph, B as agentGraphRelations, e as agentRelations, O as agentRelationsRelations, m as agentToolRelations, E as agentToolRelationsRelations, d as agents, A as agentsRelations, r as apiKeys, D as apiKeysRelations, j as artifactComponents, J as artifactComponentsRelations, b as contextCache, z as contextCacheRelations, c as contextConfigs, y as contextConfigsRelations, n as conversations, H as conversationsRelations, u as credentialReferences, F as credentialReferencesRelations, h as dataComponents, L as dataComponentsRelations, f as externalAgents, C as externalAgentsRelations, q as ledgerArtifacts, N as ledgerArtifactsRelations, o as messages, I as messagesRelations, p as projects, w as projectsRelations, g as taskRelations, x as taskRelationsRelations, t as tasks, v as tasksRelations, l as tools, G as toolsRelations } from '../schema-BB_Q_YNK.js';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import 'drizzle-zod';
|
|
7
7
|
import '@hono/zod-openapi';
|
package/dist/index.cjs
CHANGED
|
@@ -5544,6 +5544,9 @@ var McpClient = class {
|
|
|
5544
5544
|
{ capabilities: opts.capabilities || {} }
|
|
5545
5545
|
);
|
|
5546
5546
|
}
|
|
5547
|
+
isConnected() {
|
|
5548
|
+
return this.connected;
|
|
5549
|
+
}
|
|
5547
5550
|
async connect() {
|
|
5548
5551
|
if (this.connected) return;
|
|
5549
5552
|
await tsPattern.match(this.serverConfig).with({ type: MCPTransportType.streamableHttp }, (config) => this.connectHttp(config)).with({ type: MCPTransportType.sse }, (config) => this.connectSSE(config)).exhaustive();
|
|
@@ -10407,10 +10410,47 @@ var NangoCredentialStore = class {
|
|
|
10407
10410
|
if (error && typeof error === "object" && "status" in error && error.status === 404) {
|
|
10408
10411
|
return null;
|
|
10409
10412
|
}
|
|
10410
|
-
|
|
10413
|
+
logger11.error(
|
|
10414
|
+
{ error: error instanceof Error ? error.message : "Unknown error", uniqueKey },
|
|
10415
|
+
`Failed to fetch integration ${uniqueKey}`
|
|
10416
|
+
);
|
|
10411
10417
|
return null;
|
|
10412
10418
|
}
|
|
10413
10419
|
}
|
|
10420
|
+
/**
|
|
10421
|
+
* Optimize OAuth token data to fit within Nango's 1024 character limit for apiKey field
|
|
10422
|
+
* Strategy: Remove unnecessary fields
|
|
10423
|
+
*/
|
|
10424
|
+
optimizeOAuthTokenForNango(tokenData) {
|
|
10425
|
+
const parsed = JSON.parse(tokenData);
|
|
10426
|
+
const essential = {
|
|
10427
|
+
access_token: parsed.access_token,
|
|
10428
|
+
token_type: parsed.token_type,
|
|
10429
|
+
expires_in: parsed.expires_in,
|
|
10430
|
+
refresh_token: parsed.refresh_token
|
|
10431
|
+
};
|
|
10432
|
+
Object.keys(essential).forEach((key) => {
|
|
10433
|
+
if (essential[key] === void 0) {
|
|
10434
|
+
delete essential[key];
|
|
10435
|
+
}
|
|
10436
|
+
});
|
|
10437
|
+
const result = JSON.stringify(essential);
|
|
10438
|
+
if (result.length > 1024) {
|
|
10439
|
+
logger11.error(
|
|
10440
|
+
{
|
|
10441
|
+
originalLength: tokenData.length,
|
|
10442
|
+
essentialLength: result.length,
|
|
10443
|
+
accessTokenLength: parsed.access_token?.length || 0,
|
|
10444
|
+
refreshTokenLength: parsed.refresh_token?.length || 0
|
|
10445
|
+
},
|
|
10446
|
+
"OAuth token too large for Nango storage even after removing non-essential fields"
|
|
10447
|
+
);
|
|
10448
|
+
throw new Error(
|
|
10449
|
+
`OAuth token (${result.length} chars) exceeds Nango's 1024 character limit. Essential fields cannot be truncated without breaking functionality. Consider using keychain storage instead of Nango for this provider.`
|
|
10450
|
+
);
|
|
10451
|
+
}
|
|
10452
|
+
return result;
|
|
10453
|
+
}
|
|
10414
10454
|
/**
|
|
10415
10455
|
* Create an API key credential by setting up Nango integration and importing the connection
|
|
10416
10456
|
*/
|
|
@@ -10441,9 +10481,13 @@ var NangoCredentialStore = class {
|
|
|
10441
10481
|
throw new Error(`Integration '${name}' not found`);
|
|
10442
10482
|
}
|
|
10443
10483
|
const importConnectionUrl = `${process.env.NANGO_SERVER_URL || "https://api.nango.dev"}/connections`;
|
|
10484
|
+
const optimizedApiKey = this.optimizeOAuthTokenForNango(apiKeyToSet);
|
|
10485
|
+
if (!optimizedApiKey) {
|
|
10486
|
+
throw new Error(`Failed to optimize OAuth token for Nango.`);
|
|
10487
|
+
}
|
|
10444
10488
|
const credentials = {
|
|
10445
10489
|
type: "API_KEY",
|
|
10446
|
-
apiKey:
|
|
10490
|
+
apiKey: optimizedApiKey
|
|
10447
10491
|
};
|
|
10448
10492
|
const body = {
|
|
10449
10493
|
provider_config_key: integration.unique_key,
|
|
@@ -10460,12 +10504,12 @@ var NangoCredentialStore = class {
|
|
|
10460
10504
|
body: JSON.stringify(body)
|
|
10461
10505
|
});
|
|
10462
10506
|
if (!response.ok) {
|
|
10507
|
+
const errorText = await response.text();
|
|
10463
10508
|
throw new Error(
|
|
10464
|
-
`Failed to import connection: HTTP ${response.status} - ${response.statusText}`
|
|
10509
|
+
`Failed to import connection: HTTP ${response.status} - ${response.statusText}. Response: ${errorText}`
|
|
10465
10510
|
);
|
|
10466
10511
|
}
|
|
10467
10512
|
} catch (error) {
|
|
10468
|
-
console.error("Unexpected error creating API key credential:", error);
|
|
10469
10513
|
logger11.error(
|
|
10470
10514
|
{
|
|
10471
10515
|
error: error instanceof Error ? error.message : "Unknown error",
|