@inkeep/agents-core 0.21.0 → 1.0.0
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-VTNB6CCI.js → chunk-QEXLYPVZ.js} +1 -1
- package/dist/{chunk-7GKB2SDR.js → chunk-TNHJH73I.js} +0 -27
- package/dist/{chunk-LZJWVTQ2.js → chunk-TTIPV5QP.js} +11 -0
- package/dist/{chunk-RCE4G7BW.js → chunk-XKJPMUGE.js} +1 -1
- package/dist/client-exports.cjs +0 -27
- package/dist/client-exports.js +2 -2
- package/dist/constants/models.cjs +11 -0
- package/dist/constants/models.d.cts +11 -0
- package/dist/constants/models.d.ts +11 -0
- package/dist/constants/models.js +1 -1
- package/dist/db/schema.cjs +0 -27
- package/dist/db/schema.js +1 -1
- package/dist/index.cjs +73 -55
- package/dist/index.d.cts +24 -13
- package/dist/index.d.ts +24 -13
- package/dist/index.js +68 -34
- package/dist/types/index.d.cts +8 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/validation/index.cjs +0 -27
- package/dist/validation/index.js +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -212899,18 +212899,29 @@ async function apiFetch(url, options = {}) {
|
|
|
212899
212899
|
|
|
212900
212900
|
// src/constants/models.ts
|
|
212901
212901
|
var ANTHROPIC_MODELS = {
|
|
212902
|
+
CLAUDE_OPUS_4_1: "anthropic/claude-opus-4-1",
|
|
212902
212903
|
CLAUDE_OPUS_4_1_20250805: "anthropic/claude-opus-4-1-20250805",
|
|
212904
|
+
CLAUDE_SONNET_4_5: "anthropic/claude-sonnet-4-5",
|
|
212903
212905
|
CLAUDE_SONNET_4_5_20250929: "anthropic/claude-sonnet-4-5-20250929",
|
|
212906
|
+
CLAUDE_SONNET_4: "anthropic/claude-sonnet-4",
|
|
212904
212907
|
CLAUDE_SONNET_4_20250514: "anthropic/claude-sonnet-4-20250514",
|
|
212908
|
+
CLAUDE_3_5_SONNET: "anthropic/claude-3-5-sonnet",
|
|
212905
212909
|
CLAUDE_3_5_SONNET_20241022: "anthropic/claude-3-5-sonnet-20241022",
|
|
212910
|
+
CLAUDE_3_5_HAIKU: "anthropic/claude-3-5-haiku",
|
|
212906
212911
|
CLAUDE_3_5_HAIKU_20241022: "anthropic/claude-3-5-haiku-20241022"
|
|
212907
212912
|
};
|
|
212908
212913
|
var OPENAI_MODELS = {
|
|
212914
|
+
GPT_5: "openai/gpt-5",
|
|
212909
212915
|
GPT_5_20250807: "openai/gpt-5-2025-08-07",
|
|
212916
|
+
GPT_5_MINI: "openai/gpt-5-mini",
|
|
212910
212917
|
GPT_5_MINI_20250807: "openai/gpt-5-mini-2025-08-07",
|
|
212918
|
+
GPT_5_NANO: "openai/gpt-5-nano",
|
|
212911
212919
|
GPT_5_NANO_20250807: "openai/gpt-5-nano-2025-08-07",
|
|
212920
|
+
GPT_4_1: "openai/gpt-4.1",
|
|
212912
212921
|
GPT_4_1_20250414: "openai/gpt-4.1-2025-04-14",
|
|
212922
|
+
GPT_4_1_MINI: "openai/gpt-4.1-mini",
|
|
212913
212923
|
GPT_4_1_MINI_20250414: "openai/gpt-4.1-mini-2025-04-14",
|
|
212924
|
+
GPT_4_1_NANO: "openai/gpt-4.1-nano",
|
|
212914
212925
|
GPT_4_1_NANO_20250414: "openai/gpt-4.1-nano-2025-04-14"
|
|
212915
212926
|
};
|
|
212916
212927
|
var GOOGLE_MODELS = {
|
|
@@ -213498,11 +213509,8 @@ var projects = sqliteCore.sqliteTable(
|
|
|
213498
213509
|
{
|
|
213499
213510
|
...tenantScoped,
|
|
213500
213511
|
...uiProperties,
|
|
213501
|
-
// Project-level default model settings that can be inherited by agents
|
|
213502
213512
|
models: sqliteCore.text("models", { mode: "json" }).$type(),
|
|
213503
|
-
// Project-level stopWhen configuration that can be inherited by agents
|
|
213504
213513
|
stopWhen: sqliteCore.text("stop_when", { mode: "json" }).$type(),
|
|
213505
|
-
// Project-level sandbox configuration for function execution
|
|
213506
213514
|
sandboxConfig: sqliteCore.text("sandbox_config", { mode: "json" }).$type(),
|
|
213507
213515
|
...timestamps
|
|
213508
213516
|
},
|
|
@@ -213535,9 +213543,7 @@ var contextConfigs = sqliteCore.sqliteTable(
|
|
|
213535
213543
|
"context_configs",
|
|
213536
213544
|
{
|
|
213537
213545
|
...agentScoped,
|
|
213538
|
-
// Developer-defined Zod schema for validating incoming request context
|
|
213539
213546
|
headersSchema: sqliteCore.blob("headers_schema", { mode: "json" }).$type(),
|
|
213540
|
-
// Object mapping template keys to fetch definitions that use request context data
|
|
213541
213547
|
contextVariables: sqliteCore.blob("context_variables", { mode: "json" }).$type(),
|
|
213542
213548
|
...timestamps
|
|
213543
213549
|
},
|
|
@@ -213554,15 +213560,11 @@ var contextCache = sqliteCore.sqliteTable(
|
|
|
213554
213560
|
"context_cache",
|
|
213555
213561
|
{
|
|
213556
213562
|
...projectScoped,
|
|
213557
|
-
// Always scoped to conversation for complete data isolation
|
|
213558
213563
|
conversationId: sqliteCore.text("conversation_id").notNull(),
|
|
213559
|
-
// Reference to the context config and specific fetch definition
|
|
213560
213564
|
contextConfigId: sqliteCore.text("context_config_id").notNull(),
|
|
213561
213565
|
contextVariableKey: sqliteCore.text("context_variable_key").notNull(),
|
|
213562
213566
|
value: sqliteCore.blob("value", { mode: "json" }).$type().notNull(),
|
|
213563
|
-
// Request hash for cache invalidation based on context changes
|
|
213564
213567
|
requestHash: sqliteCore.text("request_hash"),
|
|
213565
|
-
// Metadata for monitoring and debugging
|
|
213566
213568
|
fetchedAt: sqliteCore.text("fetched_at").notNull(),
|
|
213567
213569
|
fetchSource: sqliteCore.text("fetch_source"),
|
|
213568
213570
|
fetchDurationMs: sqliteCore.integer("fetch_duration_ms"),
|
|
@@ -213609,9 +213611,7 @@ var subAgentRelations = sqliteCore.sqliteTable(
|
|
|
213609
213611
|
{
|
|
213610
213612
|
...agentScoped,
|
|
213611
213613
|
sourceSubAgentId: sqliteCore.text("source_sub_agent_id").notNull(),
|
|
213612
|
-
// For internal relationships
|
|
213613
213614
|
targetSubAgentId: sqliteCore.text("target_sub_agent_id"),
|
|
213614
|
-
// For external relationships
|
|
213615
213615
|
externalSubAgentId: sqliteCore.text("external_sub_agent_id"),
|
|
213616
213616
|
relationType: sqliteCore.text("relation_type"),
|
|
213617
213617
|
...timestamps
|
|
@@ -213780,9 +213780,7 @@ var tools = sqliteCore.sqliteTable(
|
|
|
213780
213780
|
config: sqliteCore.blob("config", { mode: "json" }).$type().notNull(),
|
|
213781
213781
|
credentialReferenceId: sqliteCore.text("credential_reference_id"),
|
|
213782
213782
|
headers: sqliteCore.blob("headers", { mode: "json" }).$type(),
|
|
213783
|
-
// Image URL for custom tool icon (supports regular URLs and base64 encoded images)
|
|
213784
213783
|
imageUrl: sqliteCore.text("image_url"),
|
|
213785
|
-
// Server capabilities and status (only for MCP tools)
|
|
213786
213784
|
capabilities: sqliteCore.blob("capabilities", { mode: "json" }).$type(),
|
|
213787
213785
|
lastError: sqliteCore.text("last_error"),
|
|
213788
213786
|
...timestamps
|
|
@@ -213812,7 +213810,6 @@ var functionTools = sqliteCore.sqliteTable(
|
|
|
213812
213810
|
foreignColumns: [agents.tenantId, agents.projectId, agents.id],
|
|
213813
213811
|
name: "function_tools_agent_fk"
|
|
213814
213812
|
}).onDelete("cascade"),
|
|
213815
|
-
// Foreign key constraint to functions table
|
|
213816
213813
|
sqliteCore.foreignKey({
|
|
213817
213814
|
columns: [table.tenantId, table.projectId, table.functionId],
|
|
213818
213815
|
foreignColumns: [functions.tenantId, functions.projectId, functions.id],
|
|
@@ -213870,13 +213867,11 @@ var subAgentFunctionToolRelations = sqliteCore.sqliteTable(
|
|
|
213870
213867
|
},
|
|
213871
213868
|
(table) => [
|
|
213872
213869
|
sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.agentId, table.id] }),
|
|
213873
|
-
// Foreign key constraint to sub_agents table
|
|
213874
213870
|
sqliteCore.foreignKey({
|
|
213875
213871
|
columns: [table.tenantId, table.projectId, table.agentId, table.subAgentId],
|
|
213876
213872
|
foreignColumns: [subAgents.tenantId, subAgents.projectId, subAgents.agentId, subAgents.id],
|
|
213877
213873
|
name: "sub_agent_function_tool_relations_sub_agent_fk"
|
|
213878
213874
|
}).onDelete("cascade"),
|
|
213879
|
-
// Foreign key constraint to functionTools table
|
|
213880
213875
|
sqliteCore.foreignKey({
|
|
213881
213876
|
columns: [table.tenantId, table.projectId, table.agentId, table.functionToolId],
|
|
213882
213877
|
foreignColumns: [
|
|
@@ -213914,26 +213909,18 @@ var messages = sqliteCore.sqliteTable(
|
|
|
213914
213909
|
{
|
|
213915
213910
|
...projectScoped,
|
|
213916
213911
|
conversationId: sqliteCore.text("conversation_id").notNull(),
|
|
213917
|
-
// Role mapping: user, agent, system (unified for both formats)
|
|
213918
213912
|
role: sqliteCore.text("role").notNull(),
|
|
213919
|
-
// Agent sender/recipient tracking (nullable - only populated when relevant)
|
|
213920
213913
|
fromSubAgentId: sqliteCore.text("from_sub_agent_id"),
|
|
213921
213914
|
toSubAgentId: sqliteCore.text("to_sub_agent_id"),
|
|
213922
|
-
// External agent sender tracking
|
|
213923
213915
|
fromExternalAgentId: sqliteCore.text("from_external_sub_agent_id"),
|
|
213924
|
-
// External agent recipient tracking
|
|
213925
213916
|
toExternalAgentId: sqliteCore.text("to_external_sub_agent_id"),
|
|
213926
|
-
// Message content stored as JSON to support both formats
|
|
213927
213917
|
content: sqliteCore.blob("content", { mode: "json" }).$type().notNull(),
|
|
213928
|
-
// Message classification and filtering
|
|
213929
213918
|
visibility: sqliteCore.text("visibility").notNull().default("user-facing"),
|
|
213930
213919
|
messageType: sqliteCore.text("message_type").notNull().default("chat"),
|
|
213931
213920
|
taskId: sqliteCore.text("task_id"),
|
|
213932
213921
|
parentMessageId: sqliteCore.text("parent_message_id"),
|
|
213933
|
-
// A2A specific fields
|
|
213934
213922
|
a2aTaskId: sqliteCore.text("a2a_task_id"),
|
|
213935
213923
|
a2aSessionId: sqliteCore.text("a2a_session_id"),
|
|
213936
|
-
// Metadata for extensions
|
|
213937
213924
|
metadata: sqliteCore.blob("metadata", { mode: "json" }).$type(),
|
|
213938
213925
|
...timestamps
|
|
213939
213926
|
},
|
|
@@ -213950,17 +213937,14 @@ var ledgerArtifacts = sqliteCore.sqliteTable(
|
|
|
213950
213937
|
"ledger_artifacts",
|
|
213951
213938
|
{
|
|
213952
213939
|
...projectScoped,
|
|
213953
|
-
// Links
|
|
213954
213940
|
taskId: sqliteCore.text("task_id").notNull(),
|
|
213955
213941
|
toolCallId: sqliteCore.text("tool_call_id"),
|
|
213956
213942
|
contextId: sqliteCore.text("context_id").notNull(),
|
|
213957
|
-
// Core Artifact fields
|
|
213958
213943
|
type: sqliteCore.text("type").notNull().default("source"),
|
|
213959
213944
|
name: sqliteCore.text("name"),
|
|
213960
213945
|
description: sqliteCore.text("description"),
|
|
213961
213946
|
parts: sqliteCore.blob("parts", { mode: "json" }).$type(),
|
|
213962
213947
|
metadata: sqliteCore.blob("metadata", { mode: "json" }).$type(),
|
|
213963
|
-
// Extra ledger information (not part of the Artifact spec – kept optional)
|
|
213964
213948
|
summary: sqliteCore.text("summary"),
|
|
213965
213949
|
mime: sqliteCore.blob("mime", { mode: "json" }).$type(),
|
|
213966
213950
|
visibility: sqliteCore.text("visibility").default("context"),
|
|
@@ -215709,7 +215693,6 @@ var CredentialStuffer = class {
|
|
|
215709
215693
|
if (mcpType === MCPServerType.nango) {
|
|
215710
215694
|
return {
|
|
215711
215695
|
headers: {
|
|
215712
|
-
// For Nango MCP, authenticate with the Nango secret key
|
|
215713
215696
|
Authorization: `Bearer ${nangoCredentialData.secretKey}`,
|
|
215714
215697
|
"provider-config-key": nangoCredentialData.providerConfigKey,
|
|
215715
215698
|
"connection-id": nangoCredentialData.connectionId
|
|
@@ -216592,7 +216575,7 @@ var getAgentRelationsBySource = (db) => async (params) => {
|
|
|
216592
216575
|
pagination: { page, limit, total, pages }
|
|
216593
216576
|
};
|
|
216594
216577
|
};
|
|
216595
|
-
var
|
|
216578
|
+
var getSubAgentRelationsByTarget = (db) => async (params) => {
|
|
216596
216579
|
const page = params.pagination?.page || 1;
|
|
216597
216580
|
const limit = Math.min(params.pagination?.limit || 10, 100);
|
|
216598
216581
|
const offset = (page - 1) * limit;
|
|
@@ -216720,7 +216703,7 @@ var getAgentRelationByParams = (db) => async (params) => {
|
|
|
216720
216703
|
where: drizzleOrm.and(...whereConditions)
|
|
216721
216704
|
});
|
|
216722
216705
|
};
|
|
216723
|
-
var
|
|
216706
|
+
var upsertSubAgentRelation = (db) => async (params) => {
|
|
216724
216707
|
const existing = await getAgentRelationByParams(db)({
|
|
216725
216708
|
scopes: { tenantId: params.tenantId, projectId: params.projectId, agentId: params.agentId },
|
|
216726
216709
|
sourceSubAgentId: params.sourceSubAgentId,
|
|
@@ -217446,7 +217429,6 @@ function createApiError({
|
|
|
217446
217429
|
const status = errorCodeToHttpStatus[code];
|
|
217447
217430
|
const title = getTitleFromCode(code);
|
|
217448
217431
|
const problemDetails = {
|
|
217449
|
-
// type,
|
|
217450
217432
|
title,
|
|
217451
217433
|
status,
|
|
217452
217434
|
detail: message,
|
|
@@ -220513,18 +220495,18 @@ var createFullAgentServerSide = (db, logger14 = defaultLogger) => async (scopes,
|
|
|
220513
220495
|
}
|
|
220514
220496
|
await Promise.all(agentArtifactComponentPromises);
|
|
220515
220497
|
logger14.info({}, "All agent-artifact component relations created");
|
|
220516
|
-
const
|
|
220498
|
+
const subAgentRelationPromises = [];
|
|
220517
220499
|
for (const [subAgentId, agentData2] of Object.entries(typed.subAgents)) {
|
|
220518
220500
|
if (isInternalAgent(agentData2) && agentData2.canTransferTo) {
|
|
220519
220501
|
for (const targetSubAgentId of agentData2.canTransferTo) {
|
|
220520
|
-
|
|
220502
|
+
subAgentRelationPromises.push(
|
|
220521
220503
|
(async () => {
|
|
220522
220504
|
try {
|
|
220523
220505
|
logger14.info(
|
|
220524
220506
|
{ subAgentId, targetSubAgentId, type: "transfer" },
|
|
220525
220507
|
"Processing agent transfer relation"
|
|
220526
220508
|
);
|
|
220527
|
-
await
|
|
220509
|
+
await upsertSubAgentRelation(db)({
|
|
220528
220510
|
id: nanoid.nanoid(),
|
|
220529
220511
|
tenantId,
|
|
220530
220512
|
projectId,
|
|
@@ -220551,14 +220533,14 @@ var createFullAgentServerSide = (db, logger14 = defaultLogger) => async (scopes,
|
|
|
220551
220533
|
for (const targetSubAgentId of agentData2.canDelegateTo) {
|
|
220552
220534
|
const targetAgentData = typed.subAgents[targetSubAgentId];
|
|
220553
220535
|
const isTargetExternal = isExternalAgent(targetAgentData);
|
|
220554
|
-
|
|
220536
|
+
subAgentRelationPromises.push(
|
|
220555
220537
|
(async () => {
|
|
220556
220538
|
try {
|
|
220557
220539
|
logger14.info(
|
|
220558
220540
|
{ subAgentId, targetSubAgentId, type: "delegate" },
|
|
220559
220541
|
"Processing agent delegation relation"
|
|
220560
220542
|
);
|
|
220561
|
-
await
|
|
220543
|
+
await upsertSubAgentRelation(db)({
|
|
220562
220544
|
id: nanoid.nanoid(),
|
|
220563
220545
|
tenantId,
|
|
220564
220546
|
projectId,
|
|
@@ -220583,10 +220565,10 @@ var createFullAgentServerSide = (db, logger14 = defaultLogger) => async (scopes,
|
|
|
220583
220565
|
}
|
|
220584
220566
|
}
|
|
220585
220567
|
}
|
|
220586
|
-
await Promise.all(
|
|
220568
|
+
await Promise.all(subAgentRelationPromises);
|
|
220587
220569
|
logger14.info(
|
|
220588
|
-
{
|
|
220589
|
-
"All agent relations created"
|
|
220570
|
+
{ subAgentRelationCount: subAgentRelationPromises.length },
|
|
220571
|
+
"All sub-agent relations created"
|
|
220590
220572
|
);
|
|
220591
220573
|
const createdAgent = await getFullAgentDefinition(db)({
|
|
220592
220574
|
scopes: { tenantId, projectId, agentId: finalAgentId }
|
|
@@ -221369,10 +221351,8 @@ function determineMimeTypes(artifact) {
|
|
|
221369
221351
|
function sanitizeArtifactForDatabase(artifact) {
|
|
221370
221352
|
return {
|
|
221371
221353
|
...artifact,
|
|
221372
|
-
// Ensure text fields don't exceed reasonable limits
|
|
221373
221354
|
name: artifact.name?.slice(0, 255) || void 0,
|
|
221374
221355
|
description: artifact.description?.slice(0, 1e3) || void 0,
|
|
221375
|
-
// Clean any undefined values from JSON fields
|
|
221376
221356
|
parts: artifact.parts ? JSON.parse(JSON.stringify(artifact.parts)) : null,
|
|
221377
221357
|
metadata: artifact.metadata ? JSON.parse(JSON.stringify(artifact.metadata)) : null
|
|
221378
221358
|
};
|
|
@@ -221479,7 +221459,6 @@ var addLedgerArtifacts = (db) => async (params) => {
|
|
|
221479
221459
|
description: sanitizedArt.description,
|
|
221480
221460
|
parts: sanitizedArt.parts,
|
|
221481
221461
|
metadata: sanitizedArt.metadata,
|
|
221482
|
-
// extra (optional) ledger fields
|
|
221483
221462
|
summary: sanitizedArt.description?.slice(0, 200) ?? null,
|
|
221484
221463
|
mime: determineMimeTypes(sanitizedArt),
|
|
221485
221464
|
// Simple string fallback until we debug the issue
|
|
@@ -222569,8 +222548,6 @@ var getFullProject = (db, logger14 = defaultLogger2) => async (params) => {
|
|
|
222569
222548
|
imageUrl: tool2.imageUrl || void 0,
|
|
222570
222549
|
capabilities: tool2.capabilities || void 0,
|
|
222571
222550
|
lastError: tool2.lastError || void 0
|
|
222572
|
-
// Don't include runtime fields in configuration
|
|
222573
|
-
// status, lastHealthCheck, availableTools, activeTools, lastToolsSync are all runtime
|
|
222574
222551
|
};
|
|
222575
222552
|
}
|
|
222576
222553
|
logger14.info(
|
|
@@ -224427,6 +224404,21 @@ var KeyChainStore = class {
|
|
|
224427
224404
|
const credential = await this.get(key);
|
|
224428
224405
|
return credential !== null;
|
|
224429
224406
|
}
|
|
224407
|
+
/**
|
|
224408
|
+
* Check if the credential store is available and functional
|
|
224409
|
+
*/
|
|
224410
|
+
async checkAvailability() {
|
|
224411
|
+
await this.initializationPromise;
|
|
224412
|
+
if (!this.keytarAvailable || !this.keytar) {
|
|
224413
|
+
return {
|
|
224414
|
+
available: false,
|
|
224415
|
+
reason: "Keytar not available - cannot store credentials in system keychain"
|
|
224416
|
+
};
|
|
224417
|
+
}
|
|
224418
|
+
return {
|
|
224419
|
+
available: true
|
|
224420
|
+
};
|
|
224421
|
+
}
|
|
224430
224422
|
/**
|
|
224431
224423
|
* Delete a credential from the keychain
|
|
224432
224424
|
*/
|
|
@@ -224568,6 +224560,14 @@ var InMemoryCredentialStore = class {
|
|
|
224568
224560
|
async delete(key) {
|
|
224569
224561
|
return this.credentials.delete(key);
|
|
224570
224562
|
}
|
|
224563
|
+
/**
|
|
224564
|
+
* Check if the credential store is available and functional
|
|
224565
|
+
*/
|
|
224566
|
+
async checkAvailability() {
|
|
224567
|
+
return {
|
|
224568
|
+
available: true
|
|
224569
|
+
};
|
|
224570
|
+
}
|
|
224571
224571
|
};
|
|
224572
224572
|
var logger13 = getLogger("nango-credential-store");
|
|
224573
224573
|
var CredentialKeySchema = zod.z.object({
|
|
@@ -224982,6 +224982,26 @@ var NangoCredentialStore = class {
|
|
|
224982
224982
|
return false;
|
|
224983
224983
|
}
|
|
224984
224984
|
}
|
|
224985
|
+
/**
|
|
224986
|
+
* Check if the credential store is available and functional
|
|
224987
|
+
*/
|
|
224988
|
+
async checkAvailability() {
|
|
224989
|
+
if (!this.nangoConfig.secretKey) {
|
|
224990
|
+
return {
|
|
224991
|
+
available: false,
|
|
224992
|
+
reason: "Nango secret key not configured"
|
|
224993
|
+
};
|
|
224994
|
+
}
|
|
224995
|
+
if (this.nangoConfig.secretKey.includes("mock") || this.nangoConfig.secretKey === "your_nango_secret_key") {
|
|
224996
|
+
return {
|
|
224997
|
+
available: false,
|
|
224998
|
+
reason: "Nango secret key appears to be a placeholder or mock value"
|
|
224999
|
+
};
|
|
225000
|
+
}
|
|
225001
|
+
return {
|
|
225002
|
+
available: true
|
|
225003
|
+
};
|
|
225004
|
+
}
|
|
224985
225005
|
};
|
|
224986
225006
|
function createNangoCredentialStore(id, config) {
|
|
224987
225007
|
const nangoSecretKey = config?.secretKey || process.env.NANGO_SECRET_KEY;
|
|
@@ -225009,15 +225029,13 @@ function createDefaultCredentialStores() {
|
|
|
225009
225029
|
})
|
|
225010
225030
|
);
|
|
225011
225031
|
}
|
|
225012
|
-
|
|
225013
|
-
|
|
225014
|
-
|
|
225015
|
-
|
|
225016
|
-
|
|
225017
|
-
|
|
225018
|
-
|
|
225019
|
-
);
|
|
225020
|
-
}
|
|
225032
|
+
try {
|
|
225033
|
+
stores.push(createKeyChainStore("keychain-default"));
|
|
225034
|
+
} catch (error) {
|
|
225035
|
+
console.warn(
|
|
225036
|
+
"Failed to create keychain store:",
|
|
225037
|
+
error instanceof Error ? error.message : error
|
|
225038
|
+
);
|
|
225021
225039
|
}
|
|
225022
225040
|
return stores;
|
|
225023
225041
|
}
|
|
@@ -225539,7 +225557,6 @@ exports.getAgentRelationByParams = getAgentRelationByParams;
|
|
|
225539
225557
|
exports.getAgentRelations = getAgentRelations;
|
|
225540
225558
|
exports.getAgentRelationsByAgent = getAgentRelationsByAgent;
|
|
225541
225559
|
exports.getAgentRelationsBySource = getAgentRelationsBySource;
|
|
225542
|
-
exports.getAgentRelationsByTarget = getAgentRelationsByTarget;
|
|
225543
225560
|
exports.getAgentSubAgentInfos = getAgentSubAgentInfos;
|
|
225544
225561
|
exports.getAgentToolRelationByAgent = getAgentToolRelationByAgent;
|
|
225545
225562
|
exports.getAgentToolRelationById = getAgentToolRelationById;
|
|
@@ -225586,6 +225603,7 @@ exports.getProjectResourceCounts = getProjectResourceCounts;
|
|
|
225586
225603
|
exports.getRelatedAgentsForAgent = getRelatedAgentsForAgent;
|
|
225587
225604
|
exports.getRequestExecutionContext = getRequestExecutionContext;
|
|
225588
225605
|
exports.getSubAgentById = getSubAgentById;
|
|
225606
|
+
exports.getSubAgentRelationsByTarget = getSubAgentRelationsByTarget;
|
|
225589
225607
|
exports.getSubAgentsByIds = getSubAgentsByIds;
|
|
225590
225608
|
exports.getTask = getTask;
|
|
225591
225609
|
exports.getToolById = getToolById;
|
|
@@ -225699,7 +225717,6 @@ exports.updateTool = updateTool;
|
|
|
225699
225717
|
exports.upsertAgent = upsertAgent;
|
|
225700
225718
|
exports.upsertAgentArtifactComponentRelation = upsertAgentArtifactComponentRelation;
|
|
225701
225719
|
exports.upsertAgentDataComponentRelation = upsertAgentDataComponentRelation;
|
|
225702
|
-
exports.upsertAgentRelation = upsertAgentRelation;
|
|
225703
225720
|
exports.upsertArtifactComponent = upsertArtifactComponent;
|
|
225704
225721
|
exports.upsertContextConfig = upsertContextConfig;
|
|
225705
225722
|
exports.upsertCredentialReference = upsertCredentialReference;
|
|
@@ -225710,6 +225727,7 @@ exports.upsertFunctionTool = upsertFunctionTool;
|
|
|
225710
225727
|
exports.upsertLedgerArtifact = upsertLedgerArtifact;
|
|
225711
225728
|
exports.upsertSubAgent = upsertSubAgent;
|
|
225712
225729
|
exports.upsertSubAgentFunctionToolRelation = upsertSubAgentFunctionToolRelation;
|
|
225730
|
+
exports.upsertSubAgentRelation = upsertSubAgentRelation;
|
|
225713
225731
|
exports.upsertSubAgentToolRelation = upsertSubAgentToolRelation;
|
|
225714
225732
|
exports.upsertTool = upsertTool;
|
|
225715
225733
|
exports.validateAgainstJsonSchema = validateAgainstJsonSchema;
|
package/dist/index.d.cts
CHANGED
|
@@ -471,6 +471,13 @@ declare class KeyChainStore implements CredentialStore {
|
|
|
471
471
|
* Check if a credential exists in the keychain
|
|
472
472
|
*/
|
|
473
473
|
has(key: string): Promise<boolean>;
|
|
474
|
+
/**
|
|
475
|
+
* Check if the credential store is available and functional
|
|
476
|
+
*/
|
|
477
|
+
checkAvailability(): Promise<{
|
|
478
|
+
available: boolean;
|
|
479
|
+
reason?: string;
|
|
480
|
+
}>;
|
|
474
481
|
/**
|
|
475
482
|
* Delete a credential from the keychain
|
|
476
483
|
*/
|
|
@@ -555,6 +562,13 @@ declare class InMemoryCredentialStore implements CredentialStore {
|
|
|
555
562
|
* @returns True if the credential was deleted, false otherwise
|
|
556
563
|
*/
|
|
557
564
|
delete(key: string): Promise<boolean>;
|
|
565
|
+
/**
|
|
566
|
+
* Check if the credential store is available and functional
|
|
567
|
+
*/
|
|
568
|
+
checkAvailability(): Promise<{
|
|
569
|
+
available: boolean;
|
|
570
|
+
reason?: string;
|
|
571
|
+
}>;
|
|
558
572
|
}
|
|
559
573
|
|
|
560
574
|
interface NangoConfig {
|
|
@@ -610,6 +624,13 @@ declare class NangoCredentialStore implements CredentialStore {
|
|
|
610
624
|
* Delete credentials - not supported for Nango (revoke through Nango dashboard)
|
|
611
625
|
*/
|
|
612
626
|
delete(key: string): Promise<boolean>;
|
|
627
|
+
/**
|
|
628
|
+
* Check if the credential store is available and functional
|
|
629
|
+
*/
|
|
630
|
+
checkAvailability(): Promise<{
|
|
631
|
+
available: boolean;
|
|
632
|
+
reason?: string;
|
|
633
|
+
}>;
|
|
613
634
|
}
|
|
614
635
|
/**
|
|
615
636
|
* Factory function to create NangoCredentialStore
|
|
@@ -2659,7 +2680,7 @@ declare const getAgentRelationsBySource: (db: DatabaseClient) => (params: {
|
|
|
2659
2680
|
pages: number;
|
|
2660
2681
|
};
|
|
2661
2682
|
}>;
|
|
2662
|
-
declare const
|
|
2683
|
+
declare const getSubAgentRelationsByTarget: (db: DatabaseClient) => (params: {
|
|
2663
2684
|
scopes: AgentScopeConfig;
|
|
2664
2685
|
targetSubAgentId: string;
|
|
2665
2686
|
pagination?: PaginationConfig;
|
|
@@ -2764,7 +2785,7 @@ declare const getAgentRelationByParams: (db: DatabaseClient) => (params: {
|
|
|
2764
2785
|
/**
|
|
2765
2786
|
* Upsert agent relation (create if it doesn't exist, no-op if it does)
|
|
2766
2787
|
*/
|
|
2767
|
-
declare const
|
|
2788
|
+
declare const upsertSubAgentRelation: (db: DatabaseClient) => (params: SubAgentRelationInsert) => Promise<{
|
|
2768
2789
|
tenantId: string;
|
|
2769
2790
|
projectId: string;
|
|
2770
2791
|
id: string;
|
|
@@ -3491,14 +3512,7 @@ declare function isValidHttpRequest(obj: any): obj is ParsedHttpRequest;
|
|
|
3491
3512
|
declare function getCachedValidator(schema: Record<string, unknown>): ValidateFunction;
|
|
3492
3513
|
declare function validationHelper(jsonSchema: Record<string, unknown>): ValidateFunction<unknown>;
|
|
3493
3514
|
declare function validateAgainstJsonSchema(jsonSchema: Record<string, unknown>, context: unknown): boolean;
|
|
3494
|
-
/**
|
|
3495
|
-
* Validates HTTP request headers against schema
|
|
3496
|
-
*/
|
|
3497
3515
|
declare function validateHttpRequestHeaders(headersSchema: any, httpRequest: ParsedHttpRequest): Promise<ContextValidationResult>;
|
|
3498
|
-
/**
|
|
3499
|
-
* Validates headers against the JSON Schema stored in context configuration
|
|
3500
|
-
* Supports both legacy simple schemas and new comprehensive HTTP request schemas
|
|
3501
|
-
*/
|
|
3502
3516
|
declare function validateHeaders({ tenantId, projectId, agentId, conversationId, parsedRequest, dbClient, credentialStores, }: {
|
|
3503
3517
|
tenantId: string;
|
|
3504
3518
|
projectId: string;
|
|
@@ -3508,9 +3522,6 @@ declare function validateHeaders({ tenantId, projectId, agentId, conversationId,
|
|
|
3508
3522
|
dbClient: DatabaseClient;
|
|
3509
3523
|
credentialStores?: CredentialStoreRegistry;
|
|
3510
3524
|
}): Promise<ContextValidationResult>;
|
|
3511
|
-
/**
|
|
3512
|
-
* Hono middleware for context validation
|
|
3513
|
-
*/
|
|
3514
3525
|
declare function contextValidationMiddleware(dbClient: DatabaseClient): (c: Context, next: Next) => Promise<void>;
|
|
3515
3526
|
|
|
3516
3527
|
type ApiKeyGenerationResult = {
|
|
@@ -4153,4 +4164,4 @@ declare function setSpanWithError(span: Span, error: Error, logger?: {
|
|
|
4153
4164
|
*/
|
|
4154
4165
|
declare function getTracer(serviceName: string, serviceVersion?: string): Tracer;
|
|
4155
4166
|
|
|
4156
|
-
export { AgentInsert, type AgentLogger, AgentScopeConfig, AgentSelect, AgentUpdate, ApiKeyCreateResult, type ApiKeyGenerationResult, ApiKeyInsert, ApiKeySelect, ApiKeyUpdate, Artifact, ArtifactComponentInsert, ArtifactComponentSelect, ArtifactComponentUpdate, type CommonCreateErrorResponses, type CommonDeleteErrorResponses, type CommonGetErrorResponses, type CommonUpdateErrorResponses, ContextCache, ContextCacheInsert, ContextCacheSelect, ContextConfigBuilder, type ContextConfigBuilderOptions, ContextConfigInsert, ContextConfigSelect, ContextConfigUpdate, ContextFetchDefinition, ContextFetcher, type ContextResolutionOptions, type ContextResolutionResult, ContextResolver, type ContextResolverInterface, type ContextValidationError, type ContextValidationResult, ConversationHistoryConfig, ConversationInsert, ConversationMetadata, ConversationSelect, ConversationUpdate, CreateApiKeyParams, type CredentialContext, type CredentialData, CredentialReferenceApiInsert, CredentialReferenceInsert, CredentialReferenceSelect, CredentialReferenceUpdate, type CredentialReferenceWithTools, type CredentialResolverInput, CredentialStore, type CredentialStoreReference, CredentialStoreRegistry, CredentialStoreType, CredentialStuffer, DataComponentInsert, DataComponentSelect, DataComponentUpdate, type DatabaseClient, type DatabaseConfig, type DotPaths, ERROR_DOCS_BASE_URL, ErrorCode, type ErrorCodes, type ErrorResponse, ExecutionContext, ExternalAgentInsert, ExternalAgentSelect, ExternalAgentUpdate, ExternalSubAgentRelationInsert, type FetchResult, FullAgentDefinition, FullProjectDefinition, FunctionApiInsert, FunctionToolApiInsert, FunctionToolApiUpdate, HTTP_REQUEST_PARTS, type HttpRequestPart, InMemoryCredentialStore, KeyChainStore, LedgerArtifactSelect, type LoggerFactoryConfig, MCPToolConfig, MCPTransportType, McpClient, type McpClientOptions, type McpSSEConfig, type McpServerConfig, type McpStreamableHttpConfig, McpTool, MessageContent, MessageInsert, MessageMetadata, MessageUpdate, MessageVisibility, NangoCredentialStore, type OAuthConfig, PaginationConfig, PaginationResult, type ParsedHttpRequest, PinoLogger, type PinoLoggerConfig, type ProblemDetails, ProjectInfo, ProjectInsert, type ProjectLogger, ProjectResourceCounts, ProjectScopeConfig, ProjectSelect, ProjectUpdate, type ResolvedContext, SubAgentInsert, SubAgentRelationInsert, SubAgentRelationUpdate, SubAgentScopeConfig, SubAgentSelect, SubAgentToolRelationUpdate, SubAgentUpdate, TaskInsert, TaskMetadataConfig, TaskSelect, type TemplateContext, TemplateEngine, type TemplateRenderOptions, ToolInsert, ToolMcpConfig, ToolSelect, ToolServerCapabilities, ToolUpdate, addFunctionToolToSubAgent, addLedgerArtifacts, addToolToAgent, agentHasArtifactComponents, apiFetch, associateArtifactComponentWithAgent, associateDataComponentWithAgent, cleanupTenantCache, clearContextConfigCache, clearConversationCache, commonCreateErrorResponses, commonDeleteErrorResponses, commonGetErrorResponses, commonUpdateErrorResponses, contextConfig, contextValidationMiddleware, countApiKeys, countArtifactComponents, countArtifactComponentsForAgent, countContextConfigs, countCredentialReferences, countDataComponents, countExternalAgents, countLedgerArtifactsByTask, countMessagesByConversation, countProjects, createAgent, createAgentToolRelation, createApiError, createApiKey, createArtifactComponent, createContextConfig, createConversation, createCredentialReference, createDataComponent, createDatabaseClient, createDefaultCredentialStores, createExecutionContext, createExternalAgent, createExternalAgentRelation, createFullAgentServerSide, createFullProjectServerSide, createFunctionTool, createInMemoryDatabaseClient, createKeyChainStore, createMessage, createNangoCredentialStore, createOrGetConversation, createProject, createSubAgent, createSubAgentRelation, createTask, createTool, createValidatedDataAccess, dbResultToMcpTool, deleteAgent, deleteAgentArtifactComponentRelationByAgent, deleteAgentDataComponentRelationByAgent, deleteAgentRelationsByAgent, deleteAgentToolRelation, deleteAgentToolRelationByAgent, deleteApiKey, deleteArtifactComponent, deleteContextConfig, deleteConversation, deleteCredentialReference, deleteDataComponent, deleteExternalAgent, deleteFullAgent, deleteFullProject, deleteFunction, deleteFunctionTool, deleteLedgerArtifactsByContext, deleteLedgerArtifactsByTask, deleteMessage, deleteProject, deleteSubAgent, deleteSubAgentRelation, deleteTool, detectAuthenticationRequired, determineContextTrigger, discoverOAuthEndpoints, errorResponseSchema, errorSchemaFactory, externalAgentExists, externalAgentUrlExists, extractPublicId, fetchComponentRelationships, fetchDefinition, generateAndCreateApiKey, generateApiKey, generateId, getActiveAgentForConversation, getAgentById, getAgentRelationById, getAgentRelationByParams, getAgentRelations, getAgentRelationsByAgent, getAgentRelationsBySource,
|
|
4167
|
+
export { AgentInsert, type AgentLogger, AgentScopeConfig, AgentSelect, AgentUpdate, ApiKeyCreateResult, type ApiKeyGenerationResult, ApiKeyInsert, ApiKeySelect, ApiKeyUpdate, Artifact, ArtifactComponentInsert, ArtifactComponentSelect, ArtifactComponentUpdate, type CommonCreateErrorResponses, type CommonDeleteErrorResponses, type CommonGetErrorResponses, type CommonUpdateErrorResponses, ContextCache, ContextCacheInsert, ContextCacheSelect, ContextConfigBuilder, type ContextConfigBuilderOptions, ContextConfigInsert, ContextConfigSelect, ContextConfigUpdate, ContextFetchDefinition, ContextFetcher, type ContextResolutionOptions, type ContextResolutionResult, ContextResolver, type ContextResolverInterface, type ContextValidationError, type ContextValidationResult, ConversationHistoryConfig, ConversationInsert, ConversationMetadata, ConversationSelect, ConversationUpdate, CreateApiKeyParams, type CredentialContext, type CredentialData, CredentialReferenceApiInsert, CredentialReferenceInsert, CredentialReferenceSelect, CredentialReferenceUpdate, type CredentialReferenceWithTools, type CredentialResolverInput, CredentialStore, type CredentialStoreReference, CredentialStoreRegistry, CredentialStoreType, CredentialStuffer, DataComponentInsert, DataComponentSelect, DataComponentUpdate, type DatabaseClient, type DatabaseConfig, type DotPaths, ERROR_DOCS_BASE_URL, ErrorCode, type ErrorCodes, type ErrorResponse, ExecutionContext, ExternalAgentInsert, ExternalAgentSelect, ExternalAgentUpdate, ExternalSubAgentRelationInsert, type FetchResult, FullAgentDefinition, FullProjectDefinition, FunctionApiInsert, FunctionToolApiInsert, FunctionToolApiUpdate, HTTP_REQUEST_PARTS, type HttpRequestPart, InMemoryCredentialStore, KeyChainStore, LedgerArtifactSelect, type LoggerFactoryConfig, MCPToolConfig, MCPTransportType, McpClient, type McpClientOptions, type McpSSEConfig, type McpServerConfig, type McpStreamableHttpConfig, McpTool, MessageContent, MessageInsert, MessageMetadata, MessageUpdate, MessageVisibility, NangoCredentialStore, type OAuthConfig, PaginationConfig, PaginationResult, type ParsedHttpRequest, PinoLogger, type PinoLoggerConfig, type ProblemDetails, ProjectInfo, ProjectInsert, type ProjectLogger, ProjectResourceCounts, ProjectScopeConfig, ProjectSelect, ProjectUpdate, type ResolvedContext, SubAgentInsert, SubAgentRelationInsert, SubAgentRelationUpdate, SubAgentScopeConfig, SubAgentSelect, SubAgentToolRelationUpdate, SubAgentUpdate, TaskInsert, TaskMetadataConfig, TaskSelect, type TemplateContext, TemplateEngine, type TemplateRenderOptions, ToolInsert, ToolMcpConfig, ToolSelect, ToolServerCapabilities, ToolUpdate, addFunctionToolToSubAgent, addLedgerArtifacts, addToolToAgent, agentHasArtifactComponents, apiFetch, associateArtifactComponentWithAgent, associateDataComponentWithAgent, cleanupTenantCache, clearContextConfigCache, clearConversationCache, commonCreateErrorResponses, commonDeleteErrorResponses, commonGetErrorResponses, commonUpdateErrorResponses, contextConfig, contextValidationMiddleware, countApiKeys, countArtifactComponents, countArtifactComponentsForAgent, countContextConfigs, countCredentialReferences, countDataComponents, countExternalAgents, countLedgerArtifactsByTask, countMessagesByConversation, countProjects, createAgent, createAgentToolRelation, createApiError, createApiKey, createArtifactComponent, createContextConfig, createConversation, createCredentialReference, createDataComponent, createDatabaseClient, createDefaultCredentialStores, createExecutionContext, createExternalAgent, createExternalAgentRelation, createFullAgentServerSide, createFullProjectServerSide, createFunctionTool, createInMemoryDatabaseClient, createKeyChainStore, createMessage, createNangoCredentialStore, createOrGetConversation, createProject, createSubAgent, createSubAgentRelation, createTask, createTool, createValidatedDataAccess, dbResultToMcpTool, deleteAgent, deleteAgentArtifactComponentRelationByAgent, deleteAgentDataComponentRelationByAgent, deleteAgentRelationsByAgent, deleteAgentToolRelation, deleteAgentToolRelationByAgent, deleteApiKey, deleteArtifactComponent, deleteContextConfig, deleteConversation, deleteCredentialReference, deleteDataComponent, deleteExternalAgent, deleteFullAgent, deleteFullProject, deleteFunction, deleteFunctionTool, deleteLedgerArtifactsByContext, deleteLedgerArtifactsByTask, deleteMessage, deleteProject, deleteSubAgent, deleteSubAgentRelation, deleteTool, detectAuthenticationRequired, determineContextTrigger, discoverOAuthEndpoints, errorResponseSchema, errorSchemaFactory, externalAgentExists, externalAgentUrlExists, extractPublicId, fetchComponentRelationships, fetchDefinition, generateAndCreateApiKey, generateApiKey, generateId, getActiveAgentForConversation, getAgentById, getAgentRelationById, getAgentRelationByParams, getAgentRelations, getAgentRelationsByAgent, getAgentRelationsBySource, getAgentSubAgentInfos, getAgentToolRelationByAgent, getAgentToolRelationById, getAgentToolRelationByTool, getAgentWithDefaultSubAgent, getAgentsForTool, getAgentsUsingArtifactComponent, getAgentsUsingDataComponent, getApiKeyById, getApiKeyByPublicId, getArtifactComponentById, getArtifactComponentsForAgent, getCacheEntry, getCachedValidator, getContextConfigById, getContextConfigCacheEntries, getConversation, getConversationCacheEntries, getConversationHistory, getConversationId, getCredentialReference, getCredentialReferenceById, getCredentialReferenceWithTools, getCredentialStoreLookupKeyFromRetrievalParams, getDataComponent, getDataComponentsForAgent, getExternalAgent, getExternalAgentByUrl, getExternalAgentRelations, getFullAgent, getFullAgentDefinition, getFullProject, getFunction, getFunctionToolById, getFunctionToolsForSubAgent, getLedgerArtifacts, getLedgerArtifactsByContext, getLogger, getMessageById, getMessagesByConversation, getMessagesByTask, getProject, getProjectResourceCounts, getRelatedAgentsForAgent, getRequestExecutionContext, getSubAgentById, getSubAgentRelationsByTarget, getSubAgentsByIds, getTask, getToolById, getToolsForAgent, getTracer, getVisibleMessages, handleApiError, handleContextConfigChange, handleContextResolution, hasApiKey, hasContextConfig, hasCredentialReference, hashApiKey, headers, invalidateHeadersCache, invalidateInvocationDefinitionsCache, isApiKeyExpired, isArtifactComponentAssociatedWithAgent, isDataComponentAssociatedWithAgent, isValidHttpRequest, listAgentRelations, listAgentToolRelations, listAgents, listAgentsPaginated, listApiKeys, listApiKeysPaginated, listArtifactComponents, listArtifactComponentsPaginated, listContextConfigs, listContextConfigsPaginated, listConversations, listCredentialReferences, listCredentialReferencesPaginated, listDataComponents, listDataComponentsPaginated, listExternalAgents, listExternalAgentsPaginated, listFunctionTools, listFunctions, listMessages, listProjects, listProjectsPaginated, listSubAgents, listSubAgentsPaginated, listTaskIdsByContextId, listTools, loadEnvironmentFiles, loggerFactory, maskApiKey, problemDetailsSchema, projectExists, projectExistsInTable, projectHasResources, removeArtifactComponentFromAgent, removeDataComponentFromAgent, removeToolFromAgent, setActiveAgentForConversation, setActiveAgentForThread, setCacheEntry, setSpanWithError, updateAgent, updateAgentRelation, updateAgentToolRelation, updateApiKey, updateApiKeyLastUsed, updateArtifactComponent, updateContextConfig, updateConversation, updateConversationActiveAgent, updateCredentialReference, updateDataComponent, updateExternalAgent, updateFullAgentServerSide, updateFullProjectServerSide, updateFunctionTool, updateMessage, updateProject, updateSubAgent, updateSubAgentFunctionToolRelation, updateTask, updateTool, upsertAgent, upsertAgentArtifactComponentRelation, upsertAgentDataComponentRelation, upsertArtifactComponent, upsertContextConfig, upsertCredentialReference, upsertDataComponent, upsertExternalAgent, upsertFunction, upsertFunctionTool, upsertLedgerArtifact, upsertSubAgent, upsertSubAgentFunctionToolRelation, upsertSubAgentRelation, upsertSubAgentToolRelation, upsertTool, validateAgainstJsonSchema, validateAndGetApiKey, validateApiKey, validateExternalAgent, validateHeaders, validateHttpRequestHeaders, validateInternalSubAgent, validateProjectExists, validationHelper, withProjectValidation };
|
package/dist/index.d.ts
CHANGED
|
@@ -471,6 +471,13 @@ declare class KeyChainStore implements CredentialStore {
|
|
|
471
471
|
* Check if a credential exists in the keychain
|
|
472
472
|
*/
|
|
473
473
|
has(key: string): Promise<boolean>;
|
|
474
|
+
/**
|
|
475
|
+
* Check if the credential store is available and functional
|
|
476
|
+
*/
|
|
477
|
+
checkAvailability(): Promise<{
|
|
478
|
+
available: boolean;
|
|
479
|
+
reason?: string;
|
|
480
|
+
}>;
|
|
474
481
|
/**
|
|
475
482
|
* Delete a credential from the keychain
|
|
476
483
|
*/
|
|
@@ -555,6 +562,13 @@ declare class InMemoryCredentialStore implements CredentialStore {
|
|
|
555
562
|
* @returns True if the credential was deleted, false otherwise
|
|
556
563
|
*/
|
|
557
564
|
delete(key: string): Promise<boolean>;
|
|
565
|
+
/**
|
|
566
|
+
* Check if the credential store is available and functional
|
|
567
|
+
*/
|
|
568
|
+
checkAvailability(): Promise<{
|
|
569
|
+
available: boolean;
|
|
570
|
+
reason?: string;
|
|
571
|
+
}>;
|
|
558
572
|
}
|
|
559
573
|
|
|
560
574
|
interface NangoConfig {
|
|
@@ -610,6 +624,13 @@ declare class NangoCredentialStore implements CredentialStore {
|
|
|
610
624
|
* Delete credentials - not supported for Nango (revoke through Nango dashboard)
|
|
611
625
|
*/
|
|
612
626
|
delete(key: string): Promise<boolean>;
|
|
627
|
+
/**
|
|
628
|
+
* Check if the credential store is available and functional
|
|
629
|
+
*/
|
|
630
|
+
checkAvailability(): Promise<{
|
|
631
|
+
available: boolean;
|
|
632
|
+
reason?: string;
|
|
633
|
+
}>;
|
|
613
634
|
}
|
|
614
635
|
/**
|
|
615
636
|
* Factory function to create NangoCredentialStore
|
|
@@ -2659,7 +2680,7 @@ declare const getAgentRelationsBySource: (db: DatabaseClient) => (params: {
|
|
|
2659
2680
|
pages: number;
|
|
2660
2681
|
};
|
|
2661
2682
|
}>;
|
|
2662
|
-
declare const
|
|
2683
|
+
declare const getSubAgentRelationsByTarget: (db: DatabaseClient) => (params: {
|
|
2663
2684
|
scopes: AgentScopeConfig;
|
|
2664
2685
|
targetSubAgentId: string;
|
|
2665
2686
|
pagination?: PaginationConfig;
|
|
@@ -2764,7 +2785,7 @@ declare const getAgentRelationByParams: (db: DatabaseClient) => (params: {
|
|
|
2764
2785
|
/**
|
|
2765
2786
|
* Upsert agent relation (create if it doesn't exist, no-op if it does)
|
|
2766
2787
|
*/
|
|
2767
|
-
declare const
|
|
2788
|
+
declare const upsertSubAgentRelation: (db: DatabaseClient) => (params: SubAgentRelationInsert) => Promise<{
|
|
2768
2789
|
tenantId: string;
|
|
2769
2790
|
projectId: string;
|
|
2770
2791
|
id: string;
|
|
@@ -3491,14 +3512,7 @@ declare function isValidHttpRequest(obj: any): obj is ParsedHttpRequest;
|
|
|
3491
3512
|
declare function getCachedValidator(schema: Record<string, unknown>): ValidateFunction;
|
|
3492
3513
|
declare function validationHelper(jsonSchema: Record<string, unknown>): ValidateFunction<unknown>;
|
|
3493
3514
|
declare function validateAgainstJsonSchema(jsonSchema: Record<string, unknown>, context: unknown): boolean;
|
|
3494
|
-
/**
|
|
3495
|
-
* Validates HTTP request headers against schema
|
|
3496
|
-
*/
|
|
3497
3515
|
declare function validateHttpRequestHeaders(headersSchema: any, httpRequest: ParsedHttpRequest): Promise<ContextValidationResult>;
|
|
3498
|
-
/**
|
|
3499
|
-
* Validates headers against the JSON Schema stored in context configuration
|
|
3500
|
-
* Supports both legacy simple schemas and new comprehensive HTTP request schemas
|
|
3501
|
-
*/
|
|
3502
3516
|
declare function validateHeaders({ tenantId, projectId, agentId, conversationId, parsedRequest, dbClient, credentialStores, }: {
|
|
3503
3517
|
tenantId: string;
|
|
3504
3518
|
projectId: string;
|
|
@@ -3508,9 +3522,6 @@ declare function validateHeaders({ tenantId, projectId, agentId, conversationId,
|
|
|
3508
3522
|
dbClient: DatabaseClient;
|
|
3509
3523
|
credentialStores?: CredentialStoreRegistry;
|
|
3510
3524
|
}): Promise<ContextValidationResult>;
|
|
3511
|
-
/**
|
|
3512
|
-
* Hono middleware for context validation
|
|
3513
|
-
*/
|
|
3514
3525
|
declare function contextValidationMiddleware(dbClient: DatabaseClient): (c: Context, next: Next) => Promise<void>;
|
|
3515
3526
|
|
|
3516
3527
|
type ApiKeyGenerationResult = {
|
|
@@ -4153,4 +4164,4 @@ declare function setSpanWithError(span: Span, error: Error, logger?: {
|
|
|
4153
4164
|
*/
|
|
4154
4165
|
declare function getTracer(serviceName: string, serviceVersion?: string): Tracer;
|
|
4155
4166
|
|
|
4156
|
-
export { AgentInsert, type AgentLogger, AgentScopeConfig, AgentSelect, AgentUpdate, ApiKeyCreateResult, type ApiKeyGenerationResult, ApiKeyInsert, ApiKeySelect, ApiKeyUpdate, Artifact, ArtifactComponentInsert, ArtifactComponentSelect, ArtifactComponentUpdate, type CommonCreateErrorResponses, type CommonDeleteErrorResponses, type CommonGetErrorResponses, type CommonUpdateErrorResponses, ContextCache, ContextCacheInsert, ContextCacheSelect, ContextConfigBuilder, type ContextConfigBuilderOptions, ContextConfigInsert, ContextConfigSelect, ContextConfigUpdate, ContextFetchDefinition, ContextFetcher, type ContextResolutionOptions, type ContextResolutionResult, ContextResolver, type ContextResolverInterface, type ContextValidationError, type ContextValidationResult, ConversationHistoryConfig, ConversationInsert, ConversationMetadata, ConversationSelect, ConversationUpdate, CreateApiKeyParams, type CredentialContext, type CredentialData, CredentialReferenceApiInsert, CredentialReferenceInsert, CredentialReferenceSelect, CredentialReferenceUpdate, type CredentialReferenceWithTools, type CredentialResolverInput, CredentialStore, type CredentialStoreReference, CredentialStoreRegistry, CredentialStoreType, CredentialStuffer, DataComponentInsert, DataComponentSelect, DataComponentUpdate, type DatabaseClient, type DatabaseConfig, type DotPaths, ERROR_DOCS_BASE_URL, ErrorCode, type ErrorCodes, type ErrorResponse, ExecutionContext, ExternalAgentInsert, ExternalAgentSelect, ExternalAgentUpdate, ExternalSubAgentRelationInsert, type FetchResult, FullAgentDefinition, FullProjectDefinition, FunctionApiInsert, FunctionToolApiInsert, FunctionToolApiUpdate, HTTP_REQUEST_PARTS, type HttpRequestPart, InMemoryCredentialStore, KeyChainStore, LedgerArtifactSelect, type LoggerFactoryConfig, MCPToolConfig, MCPTransportType, McpClient, type McpClientOptions, type McpSSEConfig, type McpServerConfig, type McpStreamableHttpConfig, McpTool, MessageContent, MessageInsert, MessageMetadata, MessageUpdate, MessageVisibility, NangoCredentialStore, type OAuthConfig, PaginationConfig, PaginationResult, type ParsedHttpRequest, PinoLogger, type PinoLoggerConfig, type ProblemDetails, ProjectInfo, ProjectInsert, type ProjectLogger, ProjectResourceCounts, ProjectScopeConfig, ProjectSelect, ProjectUpdate, type ResolvedContext, SubAgentInsert, SubAgentRelationInsert, SubAgentRelationUpdate, SubAgentScopeConfig, SubAgentSelect, SubAgentToolRelationUpdate, SubAgentUpdate, TaskInsert, TaskMetadataConfig, TaskSelect, type TemplateContext, TemplateEngine, type TemplateRenderOptions, ToolInsert, ToolMcpConfig, ToolSelect, ToolServerCapabilities, ToolUpdate, addFunctionToolToSubAgent, addLedgerArtifacts, addToolToAgent, agentHasArtifactComponents, apiFetch, associateArtifactComponentWithAgent, associateDataComponentWithAgent, cleanupTenantCache, clearContextConfigCache, clearConversationCache, commonCreateErrorResponses, commonDeleteErrorResponses, commonGetErrorResponses, commonUpdateErrorResponses, contextConfig, contextValidationMiddleware, countApiKeys, countArtifactComponents, countArtifactComponentsForAgent, countContextConfigs, countCredentialReferences, countDataComponents, countExternalAgents, countLedgerArtifactsByTask, countMessagesByConversation, countProjects, createAgent, createAgentToolRelation, createApiError, createApiKey, createArtifactComponent, createContextConfig, createConversation, createCredentialReference, createDataComponent, createDatabaseClient, createDefaultCredentialStores, createExecutionContext, createExternalAgent, createExternalAgentRelation, createFullAgentServerSide, createFullProjectServerSide, createFunctionTool, createInMemoryDatabaseClient, createKeyChainStore, createMessage, createNangoCredentialStore, createOrGetConversation, createProject, createSubAgent, createSubAgentRelation, createTask, createTool, createValidatedDataAccess, dbResultToMcpTool, deleteAgent, deleteAgentArtifactComponentRelationByAgent, deleteAgentDataComponentRelationByAgent, deleteAgentRelationsByAgent, deleteAgentToolRelation, deleteAgentToolRelationByAgent, deleteApiKey, deleteArtifactComponent, deleteContextConfig, deleteConversation, deleteCredentialReference, deleteDataComponent, deleteExternalAgent, deleteFullAgent, deleteFullProject, deleteFunction, deleteFunctionTool, deleteLedgerArtifactsByContext, deleteLedgerArtifactsByTask, deleteMessage, deleteProject, deleteSubAgent, deleteSubAgentRelation, deleteTool, detectAuthenticationRequired, determineContextTrigger, discoverOAuthEndpoints, errorResponseSchema, errorSchemaFactory, externalAgentExists, externalAgentUrlExists, extractPublicId, fetchComponentRelationships, fetchDefinition, generateAndCreateApiKey, generateApiKey, generateId, getActiveAgentForConversation, getAgentById, getAgentRelationById, getAgentRelationByParams, getAgentRelations, getAgentRelationsByAgent, getAgentRelationsBySource,
|
|
4167
|
+
export { AgentInsert, type AgentLogger, AgentScopeConfig, AgentSelect, AgentUpdate, ApiKeyCreateResult, type ApiKeyGenerationResult, ApiKeyInsert, ApiKeySelect, ApiKeyUpdate, Artifact, ArtifactComponentInsert, ArtifactComponentSelect, ArtifactComponentUpdate, type CommonCreateErrorResponses, type CommonDeleteErrorResponses, type CommonGetErrorResponses, type CommonUpdateErrorResponses, ContextCache, ContextCacheInsert, ContextCacheSelect, ContextConfigBuilder, type ContextConfigBuilderOptions, ContextConfigInsert, ContextConfigSelect, ContextConfigUpdate, ContextFetchDefinition, ContextFetcher, type ContextResolutionOptions, type ContextResolutionResult, ContextResolver, type ContextResolverInterface, type ContextValidationError, type ContextValidationResult, ConversationHistoryConfig, ConversationInsert, ConversationMetadata, ConversationSelect, ConversationUpdate, CreateApiKeyParams, type CredentialContext, type CredentialData, CredentialReferenceApiInsert, CredentialReferenceInsert, CredentialReferenceSelect, CredentialReferenceUpdate, type CredentialReferenceWithTools, type CredentialResolverInput, CredentialStore, type CredentialStoreReference, CredentialStoreRegistry, CredentialStoreType, CredentialStuffer, DataComponentInsert, DataComponentSelect, DataComponentUpdate, type DatabaseClient, type DatabaseConfig, type DotPaths, ERROR_DOCS_BASE_URL, ErrorCode, type ErrorCodes, type ErrorResponse, ExecutionContext, ExternalAgentInsert, ExternalAgentSelect, ExternalAgentUpdate, ExternalSubAgentRelationInsert, type FetchResult, FullAgentDefinition, FullProjectDefinition, FunctionApiInsert, FunctionToolApiInsert, FunctionToolApiUpdate, HTTP_REQUEST_PARTS, type HttpRequestPart, InMemoryCredentialStore, KeyChainStore, LedgerArtifactSelect, type LoggerFactoryConfig, MCPToolConfig, MCPTransportType, McpClient, type McpClientOptions, type McpSSEConfig, type McpServerConfig, type McpStreamableHttpConfig, McpTool, MessageContent, MessageInsert, MessageMetadata, MessageUpdate, MessageVisibility, NangoCredentialStore, type OAuthConfig, PaginationConfig, PaginationResult, type ParsedHttpRequest, PinoLogger, type PinoLoggerConfig, type ProblemDetails, ProjectInfo, ProjectInsert, type ProjectLogger, ProjectResourceCounts, ProjectScopeConfig, ProjectSelect, ProjectUpdate, type ResolvedContext, SubAgentInsert, SubAgentRelationInsert, SubAgentRelationUpdate, SubAgentScopeConfig, SubAgentSelect, SubAgentToolRelationUpdate, SubAgentUpdate, TaskInsert, TaskMetadataConfig, TaskSelect, type TemplateContext, TemplateEngine, type TemplateRenderOptions, ToolInsert, ToolMcpConfig, ToolSelect, ToolServerCapabilities, ToolUpdate, addFunctionToolToSubAgent, addLedgerArtifacts, addToolToAgent, agentHasArtifactComponents, apiFetch, associateArtifactComponentWithAgent, associateDataComponentWithAgent, cleanupTenantCache, clearContextConfigCache, clearConversationCache, commonCreateErrorResponses, commonDeleteErrorResponses, commonGetErrorResponses, commonUpdateErrorResponses, contextConfig, contextValidationMiddleware, countApiKeys, countArtifactComponents, countArtifactComponentsForAgent, countContextConfigs, countCredentialReferences, countDataComponents, countExternalAgents, countLedgerArtifactsByTask, countMessagesByConversation, countProjects, createAgent, createAgentToolRelation, createApiError, createApiKey, createArtifactComponent, createContextConfig, createConversation, createCredentialReference, createDataComponent, createDatabaseClient, createDefaultCredentialStores, createExecutionContext, createExternalAgent, createExternalAgentRelation, createFullAgentServerSide, createFullProjectServerSide, createFunctionTool, createInMemoryDatabaseClient, createKeyChainStore, createMessage, createNangoCredentialStore, createOrGetConversation, createProject, createSubAgent, createSubAgentRelation, createTask, createTool, createValidatedDataAccess, dbResultToMcpTool, deleteAgent, deleteAgentArtifactComponentRelationByAgent, deleteAgentDataComponentRelationByAgent, deleteAgentRelationsByAgent, deleteAgentToolRelation, deleteAgentToolRelationByAgent, deleteApiKey, deleteArtifactComponent, deleteContextConfig, deleteConversation, deleteCredentialReference, deleteDataComponent, deleteExternalAgent, deleteFullAgent, deleteFullProject, deleteFunction, deleteFunctionTool, deleteLedgerArtifactsByContext, deleteLedgerArtifactsByTask, deleteMessage, deleteProject, deleteSubAgent, deleteSubAgentRelation, deleteTool, detectAuthenticationRequired, determineContextTrigger, discoverOAuthEndpoints, errorResponseSchema, errorSchemaFactory, externalAgentExists, externalAgentUrlExists, extractPublicId, fetchComponentRelationships, fetchDefinition, generateAndCreateApiKey, generateApiKey, generateId, getActiveAgentForConversation, getAgentById, getAgentRelationById, getAgentRelationByParams, getAgentRelations, getAgentRelationsByAgent, getAgentRelationsBySource, getAgentSubAgentInfos, getAgentToolRelationByAgent, getAgentToolRelationById, getAgentToolRelationByTool, getAgentWithDefaultSubAgent, getAgentsForTool, getAgentsUsingArtifactComponent, getAgentsUsingDataComponent, getApiKeyById, getApiKeyByPublicId, getArtifactComponentById, getArtifactComponentsForAgent, getCacheEntry, getCachedValidator, getContextConfigById, getContextConfigCacheEntries, getConversation, getConversationCacheEntries, getConversationHistory, getConversationId, getCredentialReference, getCredentialReferenceById, getCredentialReferenceWithTools, getCredentialStoreLookupKeyFromRetrievalParams, getDataComponent, getDataComponentsForAgent, getExternalAgent, getExternalAgentByUrl, getExternalAgentRelations, getFullAgent, getFullAgentDefinition, getFullProject, getFunction, getFunctionToolById, getFunctionToolsForSubAgent, getLedgerArtifacts, getLedgerArtifactsByContext, getLogger, getMessageById, getMessagesByConversation, getMessagesByTask, getProject, getProjectResourceCounts, getRelatedAgentsForAgent, getRequestExecutionContext, getSubAgentById, getSubAgentRelationsByTarget, getSubAgentsByIds, getTask, getToolById, getToolsForAgent, getTracer, getVisibleMessages, handleApiError, handleContextConfigChange, handleContextResolution, hasApiKey, hasContextConfig, hasCredentialReference, hashApiKey, headers, invalidateHeadersCache, invalidateInvocationDefinitionsCache, isApiKeyExpired, isArtifactComponentAssociatedWithAgent, isDataComponentAssociatedWithAgent, isValidHttpRequest, listAgentRelations, listAgentToolRelations, listAgents, listAgentsPaginated, listApiKeys, listApiKeysPaginated, listArtifactComponents, listArtifactComponentsPaginated, listContextConfigs, listContextConfigsPaginated, listConversations, listCredentialReferences, listCredentialReferencesPaginated, listDataComponents, listDataComponentsPaginated, listExternalAgents, listExternalAgentsPaginated, listFunctionTools, listFunctions, listMessages, listProjects, listProjectsPaginated, listSubAgents, listSubAgentsPaginated, listTaskIdsByContextId, listTools, loadEnvironmentFiles, loggerFactory, maskApiKey, problemDetailsSchema, projectExists, projectExistsInTable, projectHasResources, removeArtifactComponentFromAgent, removeDataComponentFromAgent, removeToolFromAgent, setActiveAgentForConversation, setActiveAgentForThread, setCacheEntry, setSpanWithError, updateAgent, updateAgentRelation, updateAgentToolRelation, updateApiKey, updateApiKeyLastUsed, updateArtifactComponent, updateContextConfig, updateConversation, updateConversationActiveAgent, updateCredentialReference, updateDataComponent, updateExternalAgent, updateFullAgentServerSide, updateFullProjectServerSide, updateFunctionTool, updateMessage, updateProject, updateSubAgent, updateSubAgentFunctionToolRelation, updateTask, updateTool, upsertAgent, upsertAgentArtifactComponentRelation, upsertAgentDataComponentRelation, upsertArtifactComponent, upsertContextConfig, upsertCredentialReference, upsertDataComponent, upsertExternalAgent, upsertFunction, upsertFunctionTool, upsertLedgerArtifact, upsertSubAgent, upsertSubAgentFunctionToolRelation, upsertSubAgentRelation, upsertSubAgentToolRelation, upsertTool, validateAgainstJsonSchema, validateAndGetApiKey, validateApiKey, validateExternalAgent, validateHeaders, validateHttpRequestHeaders, validateInternalSubAgent, validateProjectExists, validationHelper, withProjectValidation };
|