@inkeep/agents-core 0.0.0-dev-20251108014948 → 0.0.0-dev-20251110174655
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-PPBBIDK4.js → chunk-DCMDYQKE.js} +1 -1
- package/dist/{chunk-RBUBOGX6.js → chunk-SLRVWIQY.js} +58 -8
- package/dist/client-exports.cjs +69 -12
- package/dist/client-exports.js +15 -7
- package/dist/index.cjs +234 -73
- package/dist/index.d.cts +53 -1
- package/dist/index.d.ts +53 -1
- package/dist/index.js +189 -101
- package/dist/validation/index.cjs +56 -7
- package/dist/validation/index.js +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var zod = require('zod');
|
|
4
|
+
var fs = require('fs');
|
|
5
|
+
var os = require('os');
|
|
6
|
+
var path = require('path');
|
|
7
|
+
var dotenv = require('dotenv');
|
|
8
|
+
var dotenvExpand = require('dotenv-expand');
|
|
9
|
+
var findUp = require('find-up');
|
|
4
10
|
var pino = require('pino');
|
|
5
11
|
var pinoPretty = require('pino-pretty');
|
|
6
12
|
var zodOpenapi = require('@hono/zod-openapi');
|
|
@@ -24,26 +30,20 @@ var ai = require('ai');
|
|
|
24
30
|
var exitHook = require('exit-hook');
|
|
25
31
|
var tsPattern = require('ts-pattern');
|
|
26
32
|
var jose = require('jose');
|
|
27
|
-
var fs = require('fs');
|
|
28
|
-
var os = require('os');
|
|
29
|
-
var path = require('path');
|
|
30
|
-
var dotenv = require('dotenv');
|
|
31
|
-
var dotenvExpand = require('dotenv-expand');
|
|
32
|
-
var findUp = require('find-up');
|
|
33
33
|
var api = require('@opentelemetry/api');
|
|
34
34
|
var Ajv = require('ajv');
|
|
35
35
|
var node = require('@nangohq/node');
|
|
36
36
|
|
|
37
37
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
38
38
|
|
|
39
|
-
var pino__default = /*#__PURE__*/_interopDefault(pino);
|
|
40
|
-
var pinoPretty__default = /*#__PURE__*/_interopDefault(pinoPretty);
|
|
41
|
-
var jmespath__default = /*#__PURE__*/_interopDefault(jmespath);
|
|
42
|
-
var crypto__default = /*#__PURE__*/_interopDefault(crypto);
|
|
43
39
|
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
44
40
|
var os__default = /*#__PURE__*/_interopDefault(os);
|
|
45
41
|
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
46
42
|
var dotenv__default = /*#__PURE__*/_interopDefault(dotenv);
|
|
43
|
+
var pino__default = /*#__PURE__*/_interopDefault(pino);
|
|
44
|
+
var pinoPretty__default = /*#__PURE__*/_interopDefault(pinoPretty);
|
|
45
|
+
var jmespath__default = /*#__PURE__*/_interopDefault(jmespath);
|
|
46
|
+
var crypto__default = /*#__PURE__*/_interopDefault(crypto);
|
|
47
47
|
var Ajv__default = /*#__PURE__*/_interopDefault(Ajv);
|
|
48
48
|
|
|
49
49
|
var __defProp = Object.defineProperty;
|
|
@@ -212898,6 +212898,113 @@ async function apiFetch(url, options = {}) {
|
|
|
212898
212898
|
headers: headers2
|
|
212899
212899
|
});
|
|
212900
212900
|
}
|
|
212901
|
+
var loadEnvironmentFiles = () => {
|
|
212902
|
+
const environmentFiles = [];
|
|
212903
|
+
const currentEnv = path__default.default.resolve(process.cwd(), ".env");
|
|
212904
|
+
if (fs__default.default.existsSync(currentEnv)) {
|
|
212905
|
+
environmentFiles.push(currentEnv);
|
|
212906
|
+
}
|
|
212907
|
+
const rootEnv = findUp.findUpSync(".env", { cwd: path__default.default.dirname(process.cwd()) });
|
|
212908
|
+
if (rootEnv) {
|
|
212909
|
+
if (rootEnv !== currentEnv) {
|
|
212910
|
+
environmentFiles.push(rootEnv);
|
|
212911
|
+
}
|
|
212912
|
+
}
|
|
212913
|
+
const userConfigPath = path__default.default.join(os__default.default.homedir(), ".inkeep", "config");
|
|
212914
|
+
if (fs__default.default.existsSync(userConfigPath)) {
|
|
212915
|
+
dotenv__default.default.config({ path: userConfigPath, override: true, quiet: true });
|
|
212916
|
+
}
|
|
212917
|
+
if (environmentFiles.length > 0) {
|
|
212918
|
+
dotenv__default.default.config({
|
|
212919
|
+
path: environmentFiles,
|
|
212920
|
+
override: false,
|
|
212921
|
+
quiet: true
|
|
212922
|
+
});
|
|
212923
|
+
dotenvExpand.expand({ processEnv: process.env });
|
|
212924
|
+
}
|
|
212925
|
+
};
|
|
212926
|
+
loadEnvironmentFiles();
|
|
212927
|
+
var envSchema = zod.z.object({
|
|
212928
|
+
ENVIRONMENT: zod.z.enum(["development", "production", "pentest", "test"]).optional(),
|
|
212929
|
+
DB_FILE_NAME: zod.z.string().optional(),
|
|
212930
|
+
TURSO_DATABASE_URL: zod.z.string().optional(),
|
|
212931
|
+
TURSO_AUTH_TOKEN: zod.z.string().optional(),
|
|
212932
|
+
INKEEP_AGENTS_JWT_SIGNING_SECRET: zod.z.string().min(32, "INKEEP_AGENTS_JWT_SIGNING_SECRET must be at least 32 characters").optional()
|
|
212933
|
+
});
|
|
212934
|
+
var parseEnv = () => {
|
|
212935
|
+
try {
|
|
212936
|
+
const parsedEnv = envSchema.parse(process.env);
|
|
212937
|
+
return parsedEnv;
|
|
212938
|
+
} catch (error) {
|
|
212939
|
+
if (error instanceof zod.z.ZodError) {
|
|
212940
|
+
const missingVars = error.issues.map((issue) => issue.path.join("."));
|
|
212941
|
+
throw new Error(
|
|
212942
|
+
`\u274C Invalid environment variables: ${missingVars.join(", ")}
|
|
212943
|
+
${error.message}`
|
|
212944
|
+
);
|
|
212945
|
+
}
|
|
212946
|
+
throw error;
|
|
212947
|
+
}
|
|
212948
|
+
};
|
|
212949
|
+
var env = parseEnv();
|
|
212950
|
+
|
|
212951
|
+
// src/constants/execution-limits-shared/defaults.ts
|
|
212952
|
+
var executionLimitsSharedDefaults = {
|
|
212953
|
+
// MCP Tool Connection and Retry Behavior
|
|
212954
|
+
// Model Context Protocol (MCP) enables agents to connect to external tools and services.
|
|
212955
|
+
// These constants control connection timeouts and retry strategy with exponential backoff.
|
|
212956
|
+
// CONNECTION_TIMEOUT_MS: Maximum wait time for initial MCP server connection
|
|
212957
|
+
// MAX_RETRIES: Maximum number of connection retry attempts before failing
|
|
212958
|
+
// INITIAL_RECONNECTION_DELAY_MS: Starting delay between retry attempts
|
|
212959
|
+
// MAX_RECONNECTION_DELAY_MS: Maximum delay between retry attempts (after exponential growth)
|
|
212960
|
+
// RECONNECTION_DELAY_GROWTH_FACTOR: Multiplier applied to delay after each failed retry (exponential backoff)
|
|
212961
|
+
MCP_TOOL_CONNECTION_TIMEOUT_MS: 3e3,
|
|
212962
|
+
// 3 seconds
|
|
212963
|
+
MCP_TOOL_MAX_RETRIES: 3,
|
|
212964
|
+
MCP_TOOL_MAX_RECONNECTION_DELAY_MS: 3e4,
|
|
212965
|
+
// 30 seconds
|
|
212966
|
+
MCP_TOOL_INITIAL_RECONNECTION_DELAY_MS: 1e3,
|
|
212967
|
+
// 1 second
|
|
212968
|
+
MCP_TOOL_RECONNECTION_DELAY_GROWTH_FACTOR: 1.5,
|
|
212969
|
+
// Conversation History Context Window
|
|
212970
|
+
// CONVERSATION_HISTORY_DEFAULT_LIMIT: Default number of recent messages to retrieve from conversation history.
|
|
212971
|
+
// Used when fetching conversation context for status updates and other operations.
|
|
212972
|
+
CONVERSATION_HISTORY_DEFAULT_LIMIT: 50,
|
|
212973
|
+
// CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT: Maximum number of tokens from previous conversation messages
|
|
212974
|
+
// to include in the LLM prompt. Prevents excessive token usage while maintaining relevant conversation context.
|
|
212975
|
+
// Messages exceeding this limit are truncated from the beginning of the conversation.
|
|
212976
|
+
CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT: 4e3
|
|
212977
|
+
};
|
|
212978
|
+
|
|
212979
|
+
// src/constants/execution-limits-shared/index.ts
|
|
212980
|
+
loadEnvironmentFiles();
|
|
212981
|
+
var constantsSchema = zod.z.object(
|
|
212982
|
+
Object.fromEntries(
|
|
212983
|
+
Object.keys(executionLimitsSharedDefaults).map((key) => [
|
|
212984
|
+
`AGENTS_${key}`,
|
|
212985
|
+
zod.z.coerce.number().optional()
|
|
212986
|
+
])
|
|
212987
|
+
)
|
|
212988
|
+
);
|
|
212989
|
+
var parseConstants = () => {
|
|
212990
|
+
const envOverrides = constantsSchema.parse(process.env);
|
|
212991
|
+
return Object.fromEntries(
|
|
212992
|
+
Object.entries(executionLimitsSharedDefaults).map(([key, defaultValue]) => [
|
|
212993
|
+
key,
|
|
212994
|
+
envOverrides[`AGENTS_${key}`] ?? defaultValue
|
|
212995
|
+
])
|
|
212996
|
+
);
|
|
212997
|
+
};
|
|
212998
|
+
var constants = parseConstants();
|
|
212999
|
+
var {
|
|
213000
|
+
MCP_TOOL_CONNECTION_TIMEOUT_MS,
|
|
213001
|
+
MCP_TOOL_MAX_RETRIES,
|
|
213002
|
+
MCP_TOOL_MAX_RECONNECTION_DELAY_MS,
|
|
213003
|
+
MCP_TOOL_INITIAL_RECONNECTION_DELAY_MS,
|
|
213004
|
+
MCP_TOOL_RECONNECTION_DELAY_GROWTH_FACTOR,
|
|
213005
|
+
CONVERSATION_HISTORY_DEFAULT_LIMIT,
|
|
213006
|
+
CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT
|
|
213007
|
+
} = constants;
|
|
212901
213008
|
|
|
212902
213009
|
// src/constants/models.ts
|
|
212903
213010
|
var ANTHROPIC_MODELS = {
|
|
@@ -213060,6 +213167,74 @@ var AI_TOOL_TYPES = {
|
|
|
213060
213167
|
DELEGATION: "delegation"
|
|
213061
213168
|
};
|
|
213062
213169
|
|
|
213170
|
+
// src/constants/schema-validation/defaults.ts
|
|
213171
|
+
var schemaValidationDefaults = {
|
|
213172
|
+
// Agent Execution Transfer Count
|
|
213173
|
+
// Controls how many times an agent can transfer control to sub-agents in a single conversation turn.
|
|
213174
|
+
// This prevents infinite transfer loops while allowing multi-agent collaboration workflows.
|
|
213175
|
+
AGENT_EXECUTION_TRANSFER_COUNT_MIN: 1,
|
|
213176
|
+
AGENT_EXECUTION_TRANSFER_COUNT_MAX: 1e3,
|
|
213177
|
+
AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT: 10,
|
|
213178
|
+
// Sub-Agent Turn Generation Steps
|
|
213179
|
+
// Limits how many AI generation steps a sub-agent can perform within a single turn.
|
|
213180
|
+
// Each generation step typically involves sending a prompt to the LLM and processing its response.
|
|
213181
|
+
// This prevents runaway token usage while allowing complex multi-step reasoning.
|
|
213182
|
+
SUB_AGENT_TURN_GENERATION_STEPS_MIN: 1,
|
|
213183
|
+
SUB_AGENT_TURN_GENERATION_STEPS_MAX: 1e3,
|
|
213184
|
+
SUB_AGENT_TURN_GENERATION_STEPS_DEFAULT: 12,
|
|
213185
|
+
// Status Update Thresholds
|
|
213186
|
+
// Real-time status updates are triggered when either threshold is exceeded during longer operations.
|
|
213187
|
+
// MAX_NUM_EVENTS: Maximum number of internal events before forcing a status update to the client.
|
|
213188
|
+
// MAX_INTERVAL_SECONDS: Maximum time between status updates regardless of event count.
|
|
213189
|
+
STATUS_UPDATE_MAX_NUM_EVENTS: 100,
|
|
213190
|
+
STATUS_UPDATE_MAX_INTERVAL_SECONDS: 600,
|
|
213191
|
+
// 10 minutes
|
|
213192
|
+
// Prompt Text Length Validation
|
|
213193
|
+
// Maximum character limits for agent and sub-agent system prompts to prevent excessive token usage.
|
|
213194
|
+
// Enforced during agent configuration to ensure prompts remain focused and manageable.
|
|
213195
|
+
VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS: 2e3,
|
|
213196
|
+
VALIDATION_AGENT_PROMPT_MAX_CHARS: 5e3,
|
|
213197
|
+
// Context Fetcher HTTP Timeout
|
|
213198
|
+
// Maximum time allowed for HTTP requests made by Context Fetchers (e.g., CRM lookups, external API calls).
|
|
213199
|
+
// Context Fetchers automatically retrieve external data at the start of a conversation to enrich agent context.
|
|
213200
|
+
CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT: 1e4
|
|
213201
|
+
// 10 seconds
|
|
213202
|
+
};
|
|
213203
|
+
|
|
213204
|
+
// src/constants/schema-validation/index.ts
|
|
213205
|
+
loadEnvironmentFiles();
|
|
213206
|
+
var constantsSchema2 = zod.z.object(
|
|
213207
|
+
Object.fromEntries(
|
|
213208
|
+
Object.keys(schemaValidationDefaults).map((key) => [
|
|
213209
|
+
`AGENTS_${key}`,
|
|
213210
|
+
zod.z.coerce.number().optional()
|
|
213211
|
+
])
|
|
213212
|
+
)
|
|
213213
|
+
);
|
|
213214
|
+
var parseConstants2 = () => {
|
|
213215
|
+
const envOverrides = constantsSchema2.parse(process.env);
|
|
213216
|
+
return Object.fromEntries(
|
|
213217
|
+
Object.entries(schemaValidationDefaults).map(([key, defaultValue]) => [
|
|
213218
|
+
key,
|
|
213219
|
+
envOverrides[`AGENTS_${key}`] ?? defaultValue
|
|
213220
|
+
])
|
|
213221
|
+
);
|
|
213222
|
+
};
|
|
213223
|
+
var constants2 = parseConstants2();
|
|
213224
|
+
var {
|
|
213225
|
+
AGENT_EXECUTION_TRANSFER_COUNT_MIN,
|
|
213226
|
+
AGENT_EXECUTION_TRANSFER_COUNT_MAX,
|
|
213227
|
+
AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT,
|
|
213228
|
+
SUB_AGENT_TURN_GENERATION_STEPS_MIN,
|
|
213229
|
+
SUB_AGENT_TURN_GENERATION_STEPS_MAX,
|
|
213230
|
+
SUB_AGENT_TURN_GENERATION_STEPS_DEFAULT,
|
|
213231
|
+
STATUS_UPDATE_MAX_NUM_EVENTS,
|
|
213232
|
+
STATUS_UPDATE_MAX_INTERVAL_SECONDS,
|
|
213233
|
+
VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS,
|
|
213234
|
+
VALIDATION_AGENT_PROMPT_MAX_CHARS,
|
|
213235
|
+
CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT
|
|
213236
|
+
} = constants2;
|
|
213237
|
+
|
|
213063
213238
|
// src/constants/signoz-queries.ts
|
|
213064
213239
|
var DATA_TYPES = {
|
|
213065
213240
|
STRING: "string",
|
|
@@ -214431,9 +214606,20 @@ var CredentialStoreType = {
|
|
|
214431
214606
|
};
|
|
214432
214607
|
|
|
214433
214608
|
// src/validation/schemas.ts
|
|
214609
|
+
var {
|
|
214610
|
+
AGENT_EXECUTION_TRANSFER_COUNT_MAX: AGENT_EXECUTION_TRANSFER_COUNT_MAX2,
|
|
214611
|
+
AGENT_EXECUTION_TRANSFER_COUNT_MIN: AGENT_EXECUTION_TRANSFER_COUNT_MIN2,
|
|
214612
|
+
CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT: CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT2,
|
|
214613
|
+
STATUS_UPDATE_MAX_INTERVAL_SECONDS: STATUS_UPDATE_MAX_INTERVAL_SECONDS2,
|
|
214614
|
+
STATUS_UPDATE_MAX_NUM_EVENTS: STATUS_UPDATE_MAX_NUM_EVENTS2,
|
|
214615
|
+
SUB_AGENT_TURN_GENERATION_STEPS_MAX: SUB_AGENT_TURN_GENERATION_STEPS_MAX2,
|
|
214616
|
+
SUB_AGENT_TURN_GENERATION_STEPS_MIN: SUB_AGENT_TURN_GENERATION_STEPS_MIN2,
|
|
214617
|
+
VALIDATION_AGENT_PROMPT_MAX_CHARS: VALIDATION_AGENT_PROMPT_MAX_CHARS2,
|
|
214618
|
+
VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS: VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS2
|
|
214619
|
+
} = schemaValidationDefaults;
|
|
214434
214620
|
var StopWhenSchema = zodOpenapi.z.object({
|
|
214435
|
-
transferCountIs: zodOpenapi.z.number().min(
|
|
214436
|
-
stepCountIs: zodOpenapi.z.number().min(
|
|
214621
|
+
transferCountIs: zodOpenapi.z.number().min(AGENT_EXECUTION_TRANSFER_COUNT_MIN2).max(AGENT_EXECUTION_TRANSFER_COUNT_MAX2).optional().describe("The maximum number of transfers to trigger the stop condition."),
|
|
214622
|
+
stepCountIs: zodOpenapi.z.number().min(SUB_AGENT_TURN_GENERATION_STEPS_MIN2).max(SUB_AGENT_TURN_GENERATION_STEPS_MAX2).optional().describe("The maximum number of steps to trigger the stop condition.")
|
|
214437
214623
|
}).openapi("StopWhen");
|
|
214438
214624
|
var AgentStopWhenSchema = StopWhenSchema.pick({ transferCountIs: true }).openapi(
|
|
214439
214625
|
"AgentStopWhen"
|
|
@@ -214912,7 +215098,7 @@ var FetchConfigSchema = zodOpenapi.z.object({
|
|
|
214912
215098
|
body: zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.unknown()).optional(),
|
|
214913
215099
|
transform: zodOpenapi.z.string().optional(),
|
|
214914
215100
|
// JSONPath or JS transform function
|
|
214915
|
-
timeout: zodOpenapi.z.number().min(0).optional().default(
|
|
215101
|
+
timeout: zodOpenapi.z.number().min(0).optional().default(CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT2).optional()
|
|
214916
215102
|
}).openapi("FetchConfig");
|
|
214917
215103
|
var FetchDefinitionSchema = zodOpenapi.z.object({
|
|
214918
215104
|
id: zodOpenapi.z.string().min(1, "Fetch definition ID is required"),
|
|
@@ -215031,9 +215217,12 @@ var StatusComponentSchema = zodOpenapi.z.object({
|
|
|
215031
215217
|
}).openapi("StatusComponent");
|
|
215032
215218
|
var StatusUpdateSchema = zodOpenapi.z.object({
|
|
215033
215219
|
enabled: zodOpenapi.z.boolean().optional(),
|
|
215034
|
-
numEvents: zodOpenapi.z.number().min(1).max(
|
|
215035
|
-
timeInSeconds: zodOpenapi.z.number().min(1).max(
|
|
215036
|
-
prompt: zodOpenapi.z.string().max(
|
|
215220
|
+
numEvents: zodOpenapi.z.number().min(1).max(STATUS_UPDATE_MAX_NUM_EVENTS2).optional(),
|
|
215221
|
+
timeInSeconds: zodOpenapi.z.number().min(1).max(STATUS_UPDATE_MAX_INTERVAL_SECONDS2).optional(),
|
|
215222
|
+
prompt: zodOpenapi.z.string().max(
|
|
215223
|
+
VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS2,
|
|
215224
|
+
`Custom prompt cannot exceed ${VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS2} characters`
|
|
215225
|
+
).optional(),
|
|
215037
215226
|
statusComponents: zodOpenapi.z.array(StatusComponentSchema).optional()
|
|
215038
215227
|
}).openapi("StatusUpdate");
|
|
215039
215228
|
var CanUseItemSchema = zodOpenapi.z.object({
|
|
@@ -215092,7 +215281,10 @@ var AgentWithinContextOfProjectSchema = AgentApiInsertSchema.extend({
|
|
|
215092
215281
|
statusUpdates: zodOpenapi.z.optional(StatusUpdateSchema),
|
|
215093
215282
|
models: ModelSchema.optional(),
|
|
215094
215283
|
stopWhen: AgentStopWhenSchema.optional(),
|
|
215095
|
-
prompt: zodOpenapi.z.string().max(
|
|
215284
|
+
prompt: zodOpenapi.z.string().max(
|
|
215285
|
+
VALIDATION_AGENT_PROMPT_MAX_CHARS2,
|
|
215286
|
+
`Agent prompt cannot exceed ${VALIDATION_AGENT_PROMPT_MAX_CHARS2} characters`
|
|
215287
|
+
).optional()
|
|
215096
215288
|
});
|
|
215097
215289
|
var PaginationSchema = zodOpenapi.z.object({
|
|
215098
215290
|
page: zodOpenapi.z.coerce.number().min(1).default(1),
|
|
@@ -218542,15 +218734,15 @@ var McpClient = class {
|
|
|
218542
218734
|
this.transport = new streamableHttp_js.StreamableHTTPClientTransport(new URL(urlString), {
|
|
218543
218735
|
requestInit: mergedRequestInit,
|
|
218544
218736
|
reconnectionOptions: {
|
|
218545
|
-
maxRetries:
|
|
218546
|
-
maxReconnectionDelay:
|
|
218547
|
-
initialReconnectionDelay:
|
|
218548
|
-
reconnectionDelayGrowFactor:
|
|
218737
|
+
maxRetries: MCP_TOOL_MAX_RETRIES,
|
|
218738
|
+
maxReconnectionDelay: MCP_TOOL_MAX_RECONNECTION_DELAY_MS,
|
|
218739
|
+
initialReconnectionDelay: MCP_TOOL_INITIAL_RECONNECTION_DELAY_MS,
|
|
218740
|
+
reconnectionDelayGrowFactor: MCP_TOOL_RECONNECTION_DELAY_GROWTH_FACTOR,
|
|
218549
218741
|
...config.reconnectionOptions
|
|
218550
218742
|
},
|
|
218551
218743
|
sessionId: config.sessionId
|
|
218552
218744
|
});
|
|
218553
|
-
await this.client.connect(this.transport, { timeout:
|
|
218745
|
+
await this.client.connect(this.transport, { timeout: MCP_TOOL_CONNECTION_TIMEOUT_MS });
|
|
218554
218746
|
}
|
|
218555
218747
|
async disconnect() {
|
|
218556
218748
|
if (!this.transport) {
|
|
@@ -218658,57 +218850,6 @@ var McpClient = class {
|
|
|
218658
218850
|
return results;
|
|
218659
218851
|
}
|
|
218660
218852
|
};
|
|
218661
|
-
var loadEnvironmentFiles = () => {
|
|
218662
|
-
const environmentFiles = [];
|
|
218663
|
-
const currentEnv = path__default.default.resolve(process.cwd(), ".env");
|
|
218664
|
-
if (fs__default.default.existsSync(currentEnv)) {
|
|
218665
|
-
environmentFiles.push(currentEnv);
|
|
218666
|
-
}
|
|
218667
|
-
const rootEnv = findUp.findUpSync(".env", { cwd: path__default.default.dirname(process.cwd()) });
|
|
218668
|
-
if (rootEnv) {
|
|
218669
|
-
if (rootEnv !== currentEnv) {
|
|
218670
|
-
environmentFiles.push(rootEnv);
|
|
218671
|
-
}
|
|
218672
|
-
}
|
|
218673
|
-
const userConfigPath = path__default.default.join(os__default.default.homedir(), ".inkeep", "config");
|
|
218674
|
-
if (fs__default.default.existsSync(userConfigPath)) {
|
|
218675
|
-
dotenv__default.default.config({ path: userConfigPath, override: true, quiet: true });
|
|
218676
|
-
}
|
|
218677
|
-
if (environmentFiles.length > 0) {
|
|
218678
|
-
dotenv__default.default.config({
|
|
218679
|
-
path: environmentFiles,
|
|
218680
|
-
override: false,
|
|
218681
|
-
quiet: true
|
|
218682
|
-
});
|
|
218683
|
-
dotenvExpand.expand({ processEnv: process.env });
|
|
218684
|
-
}
|
|
218685
|
-
};
|
|
218686
|
-
loadEnvironmentFiles();
|
|
218687
|
-
var envSchema = zod.z.object({
|
|
218688
|
-
ENVIRONMENT: zod.z.enum(["development", "production", "pentest", "test"]).optional(),
|
|
218689
|
-
DB_FILE_NAME: zod.z.string().optional(),
|
|
218690
|
-
TURSO_DATABASE_URL: zod.z.string().optional(),
|
|
218691
|
-
TURSO_AUTH_TOKEN: zod.z.string().optional(),
|
|
218692
|
-
INKEEP_AGENTS_JWT_SIGNING_SECRET: zod.z.string().min(32, "INKEEP_AGENTS_JWT_SIGNING_SECRET must be at least 32 characters").optional()
|
|
218693
|
-
});
|
|
218694
|
-
var parseEnv = () => {
|
|
218695
|
-
try {
|
|
218696
|
-
const parsedEnv = envSchema.parse(process.env);
|
|
218697
|
-
return parsedEnv;
|
|
218698
|
-
} catch (error) {
|
|
218699
|
-
if (error instanceof zod.z.ZodError) {
|
|
218700
|
-
const missingVars = error.issues.map((issue) => issue.path.join("."));
|
|
218701
|
-
throw new Error(
|
|
218702
|
-
`\u274C Invalid environment variables: ${missingVars.join(", ")}
|
|
218703
|
-
${error.message}`
|
|
218704
|
-
);
|
|
218705
|
-
}
|
|
218706
|
-
throw error;
|
|
218707
|
-
}
|
|
218708
|
-
};
|
|
218709
|
-
var env = parseEnv();
|
|
218710
|
-
|
|
218711
|
-
// src/utils/service-token-auth.ts
|
|
218712
218853
|
var logger6 = getLogger("service-token-auth");
|
|
218713
218854
|
function getJwtSecret() {
|
|
218714
218855
|
const secret = env.INKEEP_AGENTS_JWT_SIGNING_SECRET;
|
|
@@ -226579,6 +226720,9 @@ exports.A2AMessageMetadataSchema = A2AMessageMetadataSchema;
|
|
|
226579
226720
|
exports.ACTIVITY_NAMES = ACTIVITY_NAMES;
|
|
226580
226721
|
exports.ACTIVITY_STATUS = ACTIVITY_STATUS;
|
|
226581
226722
|
exports.ACTIVITY_TYPES = ACTIVITY_TYPES;
|
|
226723
|
+
exports.AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT = AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT;
|
|
226724
|
+
exports.AGENT_EXECUTION_TRANSFER_COUNT_MAX = AGENT_EXECUTION_TRANSFER_COUNT_MAX;
|
|
226725
|
+
exports.AGENT_EXECUTION_TRANSFER_COUNT_MIN = AGENT_EXECUTION_TRANSFER_COUNT_MIN;
|
|
226582
226726
|
exports.AGENT_IDS = AGENT_IDS;
|
|
226583
226727
|
exports.AGGREGATE_OPERATORS = AGGREGATE_OPERATORS;
|
|
226584
226728
|
exports.AI_OPERATIONS = AI_OPERATIONS;
|
|
@@ -226612,6 +226756,9 @@ exports.ArtifactComponentListResponse = ArtifactComponentListResponse;
|
|
|
226612
226756
|
exports.ArtifactComponentResponse = ArtifactComponentResponse;
|
|
226613
226757
|
exports.ArtifactComponentSelectSchema = ArtifactComponentSelectSchema;
|
|
226614
226758
|
exports.ArtifactComponentUpdateSchema = ArtifactComponentUpdateSchema;
|
|
226759
|
+
exports.CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT = CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT;
|
|
226760
|
+
exports.CONVERSATION_HISTORY_DEFAULT_LIMIT = CONVERSATION_HISTORY_DEFAULT_LIMIT;
|
|
226761
|
+
exports.CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT = CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT;
|
|
226615
226762
|
exports.CanUseItemSchema = CanUseItemSchema;
|
|
226616
226763
|
exports.ComponentAssociationSchema = ComponentAssociationSchema;
|
|
226617
226764
|
exports.ContextCache = ContextCache;
|
|
@@ -226728,6 +226875,11 @@ exports.MAX_ID_LENGTH = MAX_ID_LENGTH;
|
|
|
226728
226875
|
exports.MCPServerType = MCPServerType;
|
|
226729
226876
|
exports.MCPToolConfigSchema = MCPToolConfigSchema;
|
|
226730
226877
|
exports.MCPTransportType = MCPTransportType;
|
|
226878
|
+
exports.MCP_TOOL_CONNECTION_TIMEOUT_MS = MCP_TOOL_CONNECTION_TIMEOUT_MS;
|
|
226879
|
+
exports.MCP_TOOL_INITIAL_RECONNECTION_DELAY_MS = MCP_TOOL_INITIAL_RECONNECTION_DELAY_MS;
|
|
226880
|
+
exports.MCP_TOOL_MAX_RECONNECTION_DELAY_MS = MCP_TOOL_MAX_RECONNECTION_DELAY_MS;
|
|
226881
|
+
exports.MCP_TOOL_MAX_RETRIES = MCP_TOOL_MAX_RETRIES;
|
|
226882
|
+
exports.MCP_TOOL_RECONNECTION_DELAY_GROWTH_FACTOR = MCP_TOOL_RECONNECTION_DELAY_GROWTH_FACTOR;
|
|
226731
226883
|
exports.MIN_ID_LENGTH = MIN_ID_LENGTH;
|
|
226732
226884
|
exports.McpClient = McpClient;
|
|
226733
226885
|
exports.McpToolDefinitionSchema = McpToolDefinitionSchema;
|
|
@@ -226771,6 +226923,11 @@ exports.RelatedAgentInfoSchema = RelatedAgentInfoSchema;
|
|
|
226771
226923
|
exports.RemovedResponseSchema = RemovedResponseSchema;
|
|
226772
226924
|
exports.SPAN_KEYS = SPAN_KEYS;
|
|
226773
226925
|
exports.SPAN_NAMES = SPAN_NAMES;
|
|
226926
|
+
exports.STATUS_UPDATE_MAX_INTERVAL_SECONDS = STATUS_UPDATE_MAX_INTERVAL_SECONDS;
|
|
226927
|
+
exports.STATUS_UPDATE_MAX_NUM_EVENTS = STATUS_UPDATE_MAX_NUM_EVENTS;
|
|
226928
|
+
exports.SUB_AGENT_TURN_GENERATION_STEPS_DEFAULT = SUB_AGENT_TURN_GENERATION_STEPS_DEFAULT;
|
|
226929
|
+
exports.SUB_AGENT_TURN_GENERATION_STEPS_MAX = SUB_AGENT_TURN_GENERATION_STEPS_MAX;
|
|
226930
|
+
exports.SUB_AGENT_TURN_GENERATION_STEPS_MIN = SUB_AGENT_TURN_GENERATION_STEPS_MIN;
|
|
226774
226931
|
exports.SingleResponseSchema = SingleResponseSchema;
|
|
226775
226932
|
exports.StatusComponentSchema = StatusComponentSchema;
|
|
226776
226933
|
exports.StatusUpdateSchema = StatusUpdateSchema;
|
|
@@ -226873,6 +227030,8 @@ exports.ToolUpdateSchema = ToolUpdateSchema;
|
|
|
226873
227030
|
exports.TransferDataSchema = TransferDataSchema;
|
|
226874
227031
|
exports.UNKNOWN_VALUE = UNKNOWN_VALUE;
|
|
226875
227032
|
exports.URL_SAFE_ID_PATTERN = URL_SAFE_ID_PATTERN;
|
|
227033
|
+
exports.VALIDATION_AGENT_PROMPT_MAX_CHARS = VALIDATION_AGENT_PROMPT_MAX_CHARS;
|
|
227034
|
+
exports.VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS = VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS;
|
|
226876
227035
|
exports.VALID_RELATION_TYPES = VALID_RELATION_TYPES;
|
|
226877
227036
|
exports.addFunctionToolToSubAgent = addFunctionToolToSubAgent;
|
|
226878
227037
|
exports.addLedgerArtifacts = addLedgerArtifacts;
|
|
@@ -226986,6 +227145,7 @@ exports.determineContextTrigger = determineContextTrigger;
|
|
|
226986
227145
|
exports.errorResponseSchema = errorResponseSchema;
|
|
226987
227146
|
exports.errorSchemaFactory = errorSchemaFactory;
|
|
226988
227147
|
exports.exchangeMcpAuthorizationCode = exchangeMcpAuthorizationCode;
|
|
227148
|
+
exports.executionLimitsSharedDefaults = executionLimitsSharedDefaults;
|
|
226989
227149
|
exports.externalAgentExists = externalAgentExists;
|
|
226990
227150
|
exports.externalAgentUrlExists = externalAgentUrlExists;
|
|
226991
227151
|
exports.externalAgents = externalAgents;
|
|
@@ -227139,6 +227299,7 @@ exports.removeArtifactComponentFromAgent = removeArtifactComponentFromAgent;
|
|
|
227139
227299
|
exports.removeDataComponentFromAgent = removeDataComponentFromAgent;
|
|
227140
227300
|
exports.removeToolFromAgent = removeToolFromAgent;
|
|
227141
227301
|
exports.resourceIdSchema = resourceIdSchema;
|
|
227302
|
+
exports.schemaValidationDefaults = schemaValidationDefaults;
|
|
227142
227303
|
exports.setActiveAgentForConversation = setActiveAgentForConversation;
|
|
227143
227304
|
exports.setActiveAgentForThread = setActiveAgentForThread;
|
|
227144
227305
|
exports.setCacheEntry = setCacheEntry;
|
package/dist/index.d.cts
CHANGED
|
@@ -58,6 +58,58 @@ import 'drizzle-orm';
|
|
|
58
58
|
*/
|
|
59
59
|
declare function apiFetch(url: string, options?: RequestInit): Promise<Response>;
|
|
60
60
|
|
|
61
|
+
/**
|
|
62
|
+
* Shared execution limit default constants used for runtime behavior across services.
|
|
63
|
+
* These define limits and defaults for runtime execution, not schema validation.
|
|
64
|
+
*/
|
|
65
|
+
declare const executionLimitsSharedDefaults: {
|
|
66
|
+
readonly MCP_TOOL_CONNECTION_TIMEOUT_MS: 3000;
|
|
67
|
+
readonly MCP_TOOL_MAX_RETRIES: 3;
|
|
68
|
+
readonly MCP_TOOL_MAX_RECONNECTION_DELAY_MS: 30000;
|
|
69
|
+
readonly MCP_TOOL_INITIAL_RECONNECTION_DELAY_MS: 1000;
|
|
70
|
+
readonly MCP_TOOL_RECONNECTION_DELAY_GROWTH_FACTOR: 1.5;
|
|
71
|
+
readonly CONVERSATION_HISTORY_DEFAULT_LIMIT: 50;
|
|
72
|
+
readonly CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT: 4000;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
declare const MCP_TOOL_CONNECTION_TIMEOUT_MS: 3000;
|
|
76
|
+
declare const MCP_TOOL_MAX_RETRIES: 3;
|
|
77
|
+
declare const MCP_TOOL_MAX_RECONNECTION_DELAY_MS: 30000;
|
|
78
|
+
declare const MCP_TOOL_INITIAL_RECONNECTION_DELAY_MS: 1000;
|
|
79
|
+
declare const MCP_TOOL_RECONNECTION_DELAY_GROWTH_FACTOR: 1.5;
|
|
80
|
+
declare const CONVERSATION_HISTORY_DEFAULT_LIMIT: 50;
|
|
81
|
+
declare const CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT: 4000;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Schema validation default constants used in Zod schemas.
|
|
85
|
+
* These define limits and defaults for user-configurable values.
|
|
86
|
+
*/
|
|
87
|
+
declare const schemaValidationDefaults: {
|
|
88
|
+
readonly AGENT_EXECUTION_TRANSFER_COUNT_MIN: 1;
|
|
89
|
+
readonly AGENT_EXECUTION_TRANSFER_COUNT_MAX: 1000;
|
|
90
|
+
readonly AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT: 10;
|
|
91
|
+
readonly SUB_AGENT_TURN_GENERATION_STEPS_MIN: 1;
|
|
92
|
+
readonly SUB_AGENT_TURN_GENERATION_STEPS_MAX: 1000;
|
|
93
|
+
readonly SUB_AGENT_TURN_GENERATION_STEPS_DEFAULT: 12;
|
|
94
|
+
readonly STATUS_UPDATE_MAX_NUM_EVENTS: 100;
|
|
95
|
+
readonly STATUS_UPDATE_MAX_INTERVAL_SECONDS: 600;
|
|
96
|
+
readonly VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS: 2000;
|
|
97
|
+
readonly VALIDATION_AGENT_PROMPT_MAX_CHARS: 5000;
|
|
98
|
+
readonly CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT: 10000;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
declare const AGENT_EXECUTION_TRANSFER_COUNT_MIN: 1;
|
|
102
|
+
declare const AGENT_EXECUTION_TRANSFER_COUNT_MAX: 1000;
|
|
103
|
+
declare const AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT: 10;
|
|
104
|
+
declare const SUB_AGENT_TURN_GENERATION_STEPS_MIN: 1;
|
|
105
|
+
declare const SUB_AGENT_TURN_GENERATION_STEPS_MAX: 1000;
|
|
106
|
+
declare const SUB_AGENT_TURN_GENERATION_STEPS_DEFAULT: 12;
|
|
107
|
+
declare const STATUS_UPDATE_MAX_NUM_EVENTS: 100;
|
|
108
|
+
declare const STATUS_UPDATE_MAX_INTERVAL_SECONDS: 600;
|
|
109
|
+
declare const VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS: 2000;
|
|
110
|
+
declare const VALIDATION_AGENT_PROMPT_MAX_CHARS: 5000;
|
|
111
|
+
declare const CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT: 10000;
|
|
112
|
+
|
|
61
113
|
type Primitive = string | number | boolean | bigint | symbol | null | undefined | Date;
|
|
62
114
|
type JoinDot<P extends string, K extends string> = [P] extends [''] ? K : `${P}.${K}`;
|
|
63
115
|
type DotPaths<T, P extends string = ''> = [T] extends [Primitive] ? P : T extends ReadonlyArray<infer U> ? P | DotPaths<U, `${P}[${number}]`> | DotPaths<U, `${P}[*]`> : T extends Array<infer U> ? P | DotPaths<U, `${P}[${number}]`> | DotPaths<U, `${P}[*]`> : T extends object ? P | {
|
|
@@ -4617,4 +4669,4 @@ declare function setSpanWithError(span: Span, error: Error, logger?: {
|
|
|
4617
4669
|
*/
|
|
4618
4670
|
declare function getTracer(serviceName: string, serviceVersion?: string): Tracer;
|
|
4619
4671
|
|
|
4620
|
-
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 CredentialReferenceWithResources, 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, type FetchResult, FullAgentDefinition, FullProjectDefinition, FunctionApiInsert, FunctionToolApiInsert, FunctionToolApiUpdate, type GenerateServiceTokenParams, HTTP_REQUEST_PARTS, type HttpRequestPart, InMemoryCredentialStore, KeyChainStore, LedgerArtifactSelect, MCPToolConfig, MCPTransportType, McpClient, type McpClientOptions, type McpSSEConfig, type McpServerConfig, type McpStreamableHttpConfig, McpTool, MessageContent, MessageInsert, MessageMetadata, MessageUpdate, MessageVisibility, NangoCredentialStore, PaginationConfig, PaginationResult, type ParsedHttpRequest, PinoLogger, type ProblemDetails, ProjectInfo, ProjectInsert, type ProjectLogger, ProjectResourceCounts, ProjectScopeConfig, ProjectSelect, ProjectUpdate, type ResolvedContext, type ServiceTokenPayload, SubAgentExternalAgentRelationInsert, SubAgentInsert, SubAgentRelationInsert, SubAgentRelationUpdate, SubAgentScopeConfig, SubAgentSelect, SubAgentTeamAgentRelationInsert, SubAgentToolRelationUpdate, SubAgentUpdate, TaskInsert, TaskMetadataConfig, TaskSelect, type TemplateContext, TemplateEngine, type TemplateRenderOptions, ToolInsert, ToolMcpConfig, ToolSelect, ToolServerCapabilities, ToolUpdate, type VerifyServiceTokenResult, 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, createFullAgentServerSide, createFullProjectServerSide, createFunctionTool, createInMemoryDatabaseClient, createKeyChainStore, createMessage, createNangoCredentialStore, createOrGetConversation, createProject, createSubAgent, createSubAgentExternalAgentRelation, createSubAgentRelation, createSubAgentTeamAgentRelation, 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, deleteSubAgentExternalAgentRelation, deleteSubAgentExternalAgentRelationsByAgent, deleteSubAgentExternalAgentRelationsBySubAgent, deleteSubAgentRelation, deleteSubAgentTeamAgentRelation, deleteSubAgentTeamAgentRelationsByAgent, deleteSubAgentTeamAgentRelationsBySubAgent, deleteTool, determineContextTrigger, errorResponseSchema, errorSchemaFactory, externalAgentExists, externalAgentUrlExists, extractPublicId, fetchComponentRelationships, fetchDefinition, generateAndCreateApiKey, generateApiKey, generateId, generateServiceToken, 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, getCredentialReferenceWithResources, getCredentialStoreLookupKeyFromRetrievalParams, getDataComponent, getDataComponentsForAgent, getExternalAgent, getExternalAgentByUrl, getExternalAgentsForSubAgent, getFullAgent, getFullAgentDefinition, getFullProject, getFunction, getFunctionToolById, getFunctionToolsForSubAgent, getLedgerArtifacts, getLedgerArtifactsByContext, getLogger, getMessageById, getMessagesByConversation, getMessagesByTask, getProject, getProjectResourceCounts, getRelatedAgentsForAgent, getRequestExecutionContext, getSubAgentById, getSubAgentExternalAgentRelationById, getSubAgentExternalAgentRelationByParams, getSubAgentExternalAgentRelations, getSubAgentExternalAgentRelationsByAgent, getSubAgentExternalAgentRelationsByExternalAgent, getSubAgentRelationsByTarget, getSubAgentTeamAgentRelationById, getSubAgentTeamAgentRelationByParams, getSubAgentTeamAgentRelations, getSubAgentTeamAgentRelationsByAgent, getSubAgentTeamAgentRelationsByTeamAgent, getSubAgentsByIds, getSubAgentsForExternalAgent, getSubAgentsForTeamAgent, getTask, getTeamAgentsForSubAgent, 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, listSubAgentExternalAgentRelations, listSubAgentTeamAgentRelations, listSubAgents, listSubAgentsPaginated, listTaskIdsByContextId, listTools, loadEnvironmentFiles, 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, updateSubAgentExternalAgentRelation, updateSubAgentFunctionToolRelation, updateSubAgentTeamAgentRelation, updateTask, updateTool, upsertAgent, upsertAgentArtifactComponentRelation, upsertAgentDataComponentRelation, upsertArtifactComponent, upsertContextConfig, upsertCredentialReference, upsertDataComponent, upsertExternalAgent, upsertFunction, upsertFunctionTool, upsertLedgerArtifact, upsertSubAgent, upsertSubAgentExternalAgentRelation, upsertSubAgentFunctionToolRelation, upsertSubAgentRelation, upsertSubAgentTeamAgentRelation, upsertSubAgentToolRelation, upsertTool, validateAgainstJsonSchema, validateAndGetApiKey, validateApiKey, validateHeaders, validateHttpRequestHeaders, validateProjectExists, validateSubAgent, validateTargetAgent, validateTenantId, validationHelper, verifyAuthorizationHeader, verifyServiceToken, withProjectValidation };
|
|
4672
|
+
export { AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT, AGENT_EXECUTION_TRANSFER_COUNT_MAX, AGENT_EXECUTION_TRANSFER_COUNT_MIN, AgentInsert, type AgentLogger, AgentScopeConfig, AgentSelect, AgentUpdate, ApiKeyCreateResult, type ApiKeyGenerationResult, ApiKeyInsert, ApiKeySelect, ApiKeyUpdate, Artifact, ArtifactComponentInsert, ArtifactComponentSelect, ArtifactComponentUpdate, CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT, CONVERSATION_HISTORY_DEFAULT_LIMIT, CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT, 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 CredentialReferenceWithResources, 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, type FetchResult, FullAgentDefinition, FullProjectDefinition, FunctionApiInsert, FunctionToolApiInsert, FunctionToolApiUpdate, type GenerateServiceTokenParams, HTTP_REQUEST_PARTS, type HttpRequestPart, InMemoryCredentialStore, KeyChainStore, LedgerArtifactSelect, MCPToolConfig, MCPTransportType, MCP_TOOL_CONNECTION_TIMEOUT_MS, MCP_TOOL_INITIAL_RECONNECTION_DELAY_MS, MCP_TOOL_MAX_RECONNECTION_DELAY_MS, MCP_TOOL_MAX_RETRIES, MCP_TOOL_RECONNECTION_DELAY_GROWTH_FACTOR, McpClient, type McpClientOptions, type McpSSEConfig, type McpServerConfig, type McpStreamableHttpConfig, McpTool, MessageContent, MessageInsert, MessageMetadata, MessageUpdate, MessageVisibility, NangoCredentialStore, PaginationConfig, PaginationResult, type ParsedHttpRequest, PinoLogger, type ProblemDetails, ProjectInfo, ProjectInsert, type ProjectLogger, ProjectResourceCounts, ProjectScopeConfig, ProjectSelect, ProjectUpdate, type ResolvedContext, STATUS_UPDATE_MAX_INTERVAL_SECONDS, STATUS_UPDATE_MAX_NUM_EVENTS, SUB_AGENT_TURN_GENERATION_STEPS_DEFAULT, SUB_AGENT_TURN_GENERATION_STEPS_MAX, SUB_AGENT_TURN_GENERATION_STEPS_MIN, type ServiceTokenPayload, SubAgentExternalAgentRelationInsert, SubAgentInsert, SubAgentRelationInsert, SubAgentRelationUpdate, SubAgentScopeConfig, SubAgentSelect, SubAgentTeamAgentRelationInsert, SubAgentToolRelationUpdate, SubAgentUpdate, TaskInsert, TaskMetadataConfig, TaskSelect, type TemplateContext, TemplateEngine, type TemplateRenderOptions, ToolInsert, ToolMcpConfig, ToolSelect, ToolServerCapabilities, ToolUpdate, VALIDATION_AGENT_PROMPT_MAX_CHARS, VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS, type VerifyServiceTokenResult, 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, createFullAgentServerSide, createFullProjectServerSide, createFunctionTool, createInMemoryDatabaseClient, createKeyChainStore, createMessage, createNangoCredentialStore, createOrGetConversation, createProject, createSubAgent, createSubAgentExternalAgentRelation, createSubAgentRelation, createSubAgentTeamAgentRelation, 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, deleteSubAgentExternalAgentRelation, deleteSubAgentExternalAgentRelationsByAgent, deleteSubAgentExternalAgentRelationsBySubAgent, deleteSubAgentRelation, deleteSubAgentTeamAgentRelation, deleteSubAgentTeamAgentRelationsByAgent, deleteSubAgentTeamAgentRelationsBySubAgent, deleteTool, determineContextTrigger, errorResponseSchema, errorSchemaFactory, executionLimitsSharedDefaults, externalAgentExists, externalAgentUrlExists, extractPublicId, fetchComponentRelationships, fetchDefinition, generateAndCreateApiKey, generateApiKey, generateId, generateServiceToken, 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, getCredentialReferenceWithResources, getCredentialStoreLookupKeyFromRetrievalParams, getDataComponent, getDataComponentsForAgent, getExternalAgent, getExternalAgentByUrl, getExternalAgentsForSubAgent, getFullAgent, getFullAgentDefinition, getFullProject, getFunction, getFunctionToolById, getFunctionToolsForSubAgent, getLedgerArtifacts, getLedgerArtifactsByContext, getLogger, getMessageById, getMessagesByConversation, getMessagesByTask, getProject, getProjectResourceCounts, getRelatedAgentsForAgent, getRequestExecutionContext, getSubAgentById, getSubAgentExternalAgentRelationById, getSubAgentExternalAgentRelationByParams, getSubAgentExternalAgentRelations, getSubAgentExternalAgentRelationsByAgent, getSubAgentExternalAgentRelationsByExternalAgent, getSubAgentRelationsByTarget, getSubAgentTeamAgentRelationById, getSubAgentTeamAgentRelationByParams, getSubAgentTeamAgentRelations, getSubAgentTeamAgentRelationsByAgent, getSubAgentTeamAgentRelationsByTeamAgent, getSubAgentsByIds, getSubAgentsForExternalAgent, getSubAgentsForTeamAgent, getTask, getTeamAgentsForSubAgent, 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, listSubAgentExternalAgentRelations, listSubAgentTeamAgentRelations, listSubAgents, listSubAgentsPaginated, listTaskIdsByContextId, listTools, loadEnvironmentFiles, maskApiKey, problemDetailsSchema, projectExists, projectExistsInTable, projectHasResources, removeArtifactComponentFromAgent, removeDataComponentFromAgent, removeToolFromAgent, schemaValidationDefaults, setActiveAgentForConversation, setActiveAgentForThread, setCacheEntry, setSpanWithError, updateAgent, updateAgentRelation, updateAgentToolRelation, updateApiKey, updateApiKeyLastUsed, updateArtifactComponent, updateContextConfig, updateConversation, updateConversationActiveAgent, updateCredentialReference, updateDataComponent, updateExternalAgent, updateFullAgentServerSide, updateFullProjectServerSide, updateFunctionTool, updateMessage, updateProject, updateSubAgent, updateSubAgentExternalAgentRelation, updateSubAgentFunctionToolRelation, updateSubAgentTeamAgentRelation, updateTask, updateTool, upsertAgent, upsertAgentArtifactComponentRelation, upsertAgentDataComponentRelation, upsertArtifactComponent, upsertContextConfig, upsertCredentialReference, upsertDataComponent, upsertExternalAgent, upsertFunction, upsertFunctionTool, upsertLedgerArtifact, upsertSubAgent, upsertSubAgentExternalAgentRelation, upsertSubAgentFunctionToolRelation, upsertSubAgentRelation, upsertSubAgentTeamAgentRelation, upsertSubAgentToolRelation, upsertTool, validateAgainstJsonSchema, validateAndGetApiKey, validateApiKey, validateHeaders, validateHttpRequestHeaders, validateProjectExists, validateSubAgent, validateTargetAgent, validateTenantId, validationHelper, verifyAuthorizationHeader, verifyServiceToken, withProjectValidation };
|
package/dist/index.d.ts
CHANGED
|
@@ -58,6 +58,58 @@ import 'drizzle-orm';
|
|
|
58
58
|
*/
|
|
59
59
|
declare function apiFetch(url: string, options?: RequestInit): Promise<Response>;
|
|
60
60
|
|
|
61
|
+
/**
|
|
62
|
+
* Shared execution limit default constants used for runtime behavior across services.
|
|
63
|
+
* These define limits and defaults for runtime execution, not schema validation.
|
|
64
|
+
*/
|
|
65
|
+
declare const executionLimitsSharedDefaults: {
|
|
66
|
+
readonly MCP_TOOL_CONNECTION_TIMEOUT_MS: 3000;
|
|
67
|
+
readonly MCP_TOOL_MAX_RETRIES: 3;
|
|
68
|
+
readonly MCP_TOOL_MAX_RECONNECTION_DELAY_MS: 30000;
|
|
69
|
+
readonly MCP_TOOL_INITIAL_RECONNECTION_DELAY_MS: 1000;
|
|
70
|
+
readonly MCP_TOOL_RECONNECTION_DELAY_GROWTH_FACTOR: 1.5;
|
|
71
|
+
readonly CONVERSATION_HISTORY_DEFAULT_LIMIT: 50;
|
|
72
|
+
readonly CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT: 4000;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
declare const MCP_TOOL_CONNECTION_TIMEOUT_MS: 3000;
|
|
76
|
+
declare const MCP_TOOL_MAX_RETRIES: 3;
|
|
77
|
+
declare const MCP_TOOL_MAX_RECONNECTION_DELAY_MS: 30000;
|
|
78
|
+
declare const MCP_TOOL_INITIAL_RECONNECTION_DELAY_MS: 1000;
|
|
79
|
+
declare const MCP_TOOL_RECONNECTION_DELAY_GROWTH_FACTOR: 1.5;
|
|
80
|
+
declare const CONVERSATION_HISTORY_DEFAULT_LIMIT: 50;
|
|
81
|
+
declare const CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT: 4000;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Schema validation default constants used in Zod schemas.
|
|
85
|
+
* These define limits and defaults for user-configurable values.
|
|
86
|
+
*/
|
|
87
|
+
declare const schemaValidationDefaults: {
|
|
88
|
+
readonly AGENT_EXECUTION_TRANSFER_COUNT_MIN: 1;
|
|
89
|
+
readonly AGENT_EXECUTION_TRANSFER_COUNT_MAX: 1000;
|
|
90
|
+
readonly AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT: 10;
|
|
91
|
+
readonly SUB_AGENT_TURN_GENERATION_STEPS_MIN: 1;
|
|
92
|
+
readonly SUB_AGENT_TURN_GENERATION_STEPS_MAX: 1000;
|
|
93
|
+
readonly SUB_AGENT_TURN_GENERATION_STEPS_DEFAULT: 12;
|
|
94
|
+
readonly STATUS_UPDATE_MAX_NUM_EVENTS: 100;
|
|
95
|
+
readonly STATUS_UPDATE_MAX_INTERVAL_SECONDS: 600;
|
|
96
|
+
readonly VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS: 2000;
|
|
97
|
+
readonly VALIDATION_AGENT_PROMPT_MAX_CHARS: 5000;
|
|
98
|
+
readonly CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT: 10000;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
declare const AGENT_EXECUTION_TRANSFER_COUNT_MIN: 1;
|
|
102
|
+
declare const AGENT_EXECUTION_TRANSFER_COUNT_MAX: 1000;
|
|
103
|
+
declare const AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT: 10;
|
|
104
|
+
declare const SUB_AGENT_TURN_GENERATION_STEPS_MIN: 1;
|
|
105
|
+
declare const SUB_AGENT_TURN_GENERATION_STEPS_MAX: 1000;
|
|
106
|
+
declare const SUB_AGENT_TURN_GENERATION_STEPS_DEFAULT: 12;
|
|
107
|
+
declare const STATUS_UPDATE_MAX_NUM_EVENTS: 100;
|
|
108
|
+
declare const STATUS_UPDATE_MAX_INTERVAL_SECONDS: 600;
|
|
109
|
+
declare const VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS: 2000;
|
|
110
|
+
declare const VALIDATION_AGENT_PROMPT_MAX_CHARS: 5000;
|
|
111
|
+
declare const CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT: 10000;
|
|
112
|
+
|
|
61
113
|
type Primitive = string | number | boolean | bigint | symbol | null | undefined | Date;
|
|
62
114
|
type JoinDot<P extends string, K extends string> = [P] extends [''] ? K : `${P}.${K}`;
|
|
63
115
|
type DotPaths<T, P extends string = ''> = [T] extends [Primitive] ? P : T extends ReadonlyArray<infer U> ? P | DotPaths<U, `${P}[${number}]`> | DotPaths<U, `${P}[*]`> : T extends Array<infer U> ? P | DotPaths<U, `${P}[${number}]`> | DotPaths<U, `${P}[*]`> : T extends object ? P | {
|
|
@@ -4617,4 +4669,4 @@ declare function setSpanWithError(span: Span, error: Error, logger?: {
|
|
|
4617
4669
|
*/
|
|
4618
4670
|
declare function getTracer(serviceName: string, serviceVersion?: string): Tracer;
|
|
4619
4671
|
|
|
4620
|
-
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 CredentialReferenceWithResources, 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, type FetchResult, FullAgentDefinition, FullProjectDefinition, FunctionApiInsert, FunctionToolApiInsert, FunctionToolApiUpdate, type GenerateServiceTokenParams, HTTP_REQUEST_PARTS, type HttpRequestPart, InMemoryCredentialStore, KeyChainStore, LedgerArtifactSelect, MCPToolConfig, MCPTransportType, McpClient, type McpClientOptions, type McpSSEConfig, type McpServerConfig, type McpStreamableHttpConfig, McpTool, MessageContent, MessageInsert, MessageMetadata, MessageUpdate, MessageVisibility, NangoCredentialStore, PaginationConfig, PaginationResult, type ParsedHttpRequest, PinoLogger, type ProblemDetails, ProjectInfo, ProjectInsert, type ProjectLogger, ProjectResourceCounts, ProjectScopeConfig, ProjectSelect, ProjectUpdate, type ResolvedContext, type ServiceTokenPayload, SubAgentExternalAgentRelationInsert, SubAgentInsert, SubAgentRelationInsert, SubAgentRelationUpdate, SubAgentScopeConfig, SubAgentSelect, SubAgentTeamAgentRelationInsert, SubAgentToolRelationUpdate, SubAgentUpdate, TaskInsert, TaskMetadataConfig, TaskSelect, type TemplateContext, TemplateEngine, type TemplateRenderOptions, ToolInsert, ToolMcpConfig, ToolSelect, ToolServerCapabilities, ToolUpdate, type VerifyServiceTokenResult, 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, createFullAgentServerSide, createFullProjectServerSide, createFunctionTool, createInMemoryDatabaseClient, createKeyChainStore, createMessage, createNangoCredentialStore, createOrGetConversation, createProject, createSubAgent, createSubAgentExternalAgentRelation, createSubAgentRelation, createSubAgentTeamAgentRelation, 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, deleteSubAgentExternalAgentRelation, deleteSubAgentExternalAgentRelationsByAgent, deleteSubAgentExternalAgentRelationsBySubAgent, deleteSubAgentRelation, deleteSubAgentTeamAgentRelation, deleteSubAgentTeamAgentRelationsByAgent, deleteSubAgentTeamAgentRelationsBySubAgent, deleteTool, determineContextTrigger, errorResponseSchema, errorSchemaFactory, externalAgentExists, externalAgentUrlExists, extractPublicId, fetchComponentRelationships, fetchDefinition, generateAndCreateApiKey, generateApiKey, generateId, generateServiceToken, 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, getCredentialReferenceWithResources, getCredentialStoreLookupKeyFromRetrievalParams, getDataComponent, getDataComponentsForAgent, getExternalAgent, getExternalAgentByUrl, getExternalAgentsForSubAgent, getFullAgent, getFullAgentDefinition, getFullProject, getFunction, getFunctionToolById, getFunctionToolsForSubAgent, getLedgerArtifacts, getLedgerArtifactsByContext, getLogger, getMessageById, getMessagesByConversation, getMessagesByTask, getProject, getProjectResourceCounts, getRelatedAgentsForAgent, getRequestExecutionContext, getSubAgentById, getSubAgentExternalAgentRelationById, getSubAgentExternalAgentRelationByParams, getSubAgentExternalAgentRelations, getSubAgentExternalAgentRelationsByAgent, getSubAgentExternalAgentRelationsByExternalAgent, getSubAgentRelationsByTarget, getSubAgentTeamAgentRelationById, getSubAgentTeamAgentRelationByParams, getSubAgentTeamAgentRelations, getSubAgentTeamAgentRelationsByAgent, getSubAgentTeamAgentRelationsByTeamAgent, getSubAgentsByIds, getSubAgentsForExternalAgent, getSubAgentsForTeamAgent, getTask, getTeamAgentsForSubAgent, 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, listSubAgentExternalAgentRelations, listSubAgentTeamAgentRelations, listSubAgents, listSubAgentsPaginated, listTaskIdsByContextId, listTools, loadEnvironmentFiles, 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, updateSubAgentExternalAgentRelation, updateSubAgentFunctionToolRelation, updateSubAgentTeamAgentRelation, updateTask, updateTool, upsertAgent, upsertAgentArtifactComponentRelation, upsertAgentDataComponentRelation, upsertArtifactComponent, upsertContextConfig, upsertCredentialReference, upsertDataComponent, upsertExternalAgent, upsertFunction, upsertFunctionTool, upsertLedgerArtifact, upsertSubAgent, upsertSubAgentExternalAgentRelation, upsertSubAgentFunctionToolRelation, upsertSubAgentRelation, upsertSubAgentTeamAgentRelation, upsertSubAgentToolRelation, upsertTool, validateAgainstJsonSchema, validateAndGetApiKey, validateApiKey, validateHeaders, validateHttpRequestHeaders, validateProjectExists, validateSubAgent, validateTargetAgent, validateTenantId, validationHelper, verifyAuthorizationHeader, verifyServiceToken, withProjectValidation };
|
|
4672
|
+
export { AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT, AGENT_EXECUTION_TRANSFER_COUNT_MAX, AGENT_EXECUTION_TRANSFER_COUNT_MIN, AgentInsert, type AgentLogger, AgentScopeConfig, AgentSelect, AgentUpdate, ApiKeyCreateResult, type ApiKeyGenerationResult, ApiKeyInsert, ApiKeySelect, ApiKeyUpdate, Artifact, ArtifactComponentInsert, ArtifactComponentSelect, ArtifactComponentUpdate, CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT, CONVERSATION_HISTORY_DEFAULT_LIMIT, CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT, 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 CredentialReferenceWithResources, 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, type FetchResult, FullAgentDefinition, FullProjectDefinition, FunctionApiInsert, FunctionToolApiInsert, FunctionToolApiUpdate, type GenerateServiceTokenParams, HTTP_REQUEST_PARTS, type HttpRequestPart, InMemoryCredentialStore, KeyChainStore, LedgerArtifactSelect, MCPToolConfig, MCPTransportType, MCP_TOOL_CONNECTION_TIMEOUT_MS, MCP_TOOL_INITIAL_RECONNECTION_DELAY_MS, MCP_TOOL_MAX_RECONNECTION_DELAY_MS, MCP_TOOL_MAX_RETRIES, MCP_TOOL_RECONNECTION_DELAY_GROWTH_FACTOR, McpClient, type McpClientOptions, type McpSSEConfig, type McpServerConfig, type McpStreamableHttpConfig, McpTool, MessageContent, MessageInsert, MessageMetadata, MessageUpdate, MessageVisibility, NangoCredentialStore, PaginationConfig, PaginationResult, type ParsedHttpRequest, PinoLogger, type ProblemDetails, ProjectInfo, ProjectInsert, type ProjectLogger, ProjectResourceCounts, ProjectScopeConfig, ProjectSelect, ProjectUpdate, type ResolvedContext, STATUS_UPDATE_MAX_INTERVAL_SECONDS, STATUS_UPDATE_MAX_NUM_EVENTS, SUB_AGENT_TURN_GENERATION_STEPS_DEFAULT, SUB_AGENT_TURN_GENERATION_STEPS_MAX, SUB_AGENT_TURN_GENERATION_STEPS_MIN, type ServiceTokenPayload, SubAgentExternalAgentRelationInsert, SubAgentInsert, SubAgentRelationInsert, SubAgentRelationUpdate, SubAgentScopeConfig, SubAgentSelect, SubAgentTeamAgentRelationInsert, SubAgentToolRelationUpdate, SubAgentUpdate, TaskInsert, TaskMetadataConfig, TaskSelect, type TemplateContext, TemplateEngine, type TemplateRenderOptions, ToolInsert, ToolMcpConfig, ToolSelect, ToolServerCapabilities, ToolUpdate, VALIDATION_AGENT_PROMPT_MAX_CHARS, VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS, type VerifyServiceTokenResult, 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, createFullAgentServerSide, createFullProjectServerSide, createFunctionTool, createInMemoryDatabaseClient, createKeyChainStore, createMessage, createNangoCredentialStore, createOrGetConversation, createProject, createSubAgent, createSubAgentExternalAgentRelation, createSubAgentRelation, createSubAgentTeamAgentRelation, 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, deleteSubAgentExternalAgentRelation, deleteSubAgentExternalAgentRelationsByAgent, deleteSubAgentExternalAgentRelationsBySubAgent, deleteSubAgentRelation, deleteSubAgentTeamAgentRelation, deleteSubAgentTeamAgentRelationsByAgent, deleteSubAgentTeamAgentRelationsBySubAgent, deleteTool, determineContextTrigger, errorResponseSchema, errorSchemaFactory, executionLimitsSharedDefaults, externalAgentExists, externalAgentUrlExists, extractPublicId, fetchComponentRelationships, fetchDefinition, generateAndCreateApiKey, generateApiKey, generateId, generateServiceToken, 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, getCredentialReferenceWithResources, getCredentialStoreLookupKeyFromRetrievalParams, getDataComponent, getDataComponentsForAgent, getExternalAgent, getExternalAgentByUrl, getExternalAgentsForSubAgent, getFullAgent, getFullAgentDefinition, getFullProject, getFunction, getFunctionToolById, getFunctionToolsForSubAgent, getLedgerArtifacts, getLedgerArtifactsByContext, getLogger, getMessageById, getMessagesByConversation, getMessagesByTask, getProject, getProjectResourceCounts, getRelatedAgentsForAgent, getRequestExecutionContext, getSubAgentById, getSubAgentExternalAgentRelationById, getSubAgentExternalAgentRelationByParams, getSubAgentExternalAgentRelations, getSubAgentExternalAgentRelationsByAgent, getSubAgentExternalAgentRelationsByExternalAgent, getSubAgentRelationsByTarget, getSubAgentTeamAgentRelationById, getSubAgentTeamAgentRelationByParams, getSubAgentTeamAgentRelations, getSubAgentTeamAgentRelationsByAgent, getSubAgentTeamAgentRelationsByTeamAgent, getSubAgentsByIds, getSubAgentsForExternalAgent, getSubAgentsForTeamAgent, getTask, getTeamAgentsForSubAgent, 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, listSubAgentExternalAgentRelations, listSubAgentTeamAgentRelations, listSubAgents, listSubAgentsPaginated, listTaskIdsByContextId, listTools, loadEnvironmentFiles, maskApiKey, problemDetailsSchema, projectExists, projectExistsInTable, projectHasResources, removeArtifactComponentFromAgent, removeDataComponentFromAgent, removeToolFromAgent, schemaValidationDefaults, setActiveAgentForConversation, setActiveAgentForThread, setCacheEntry, setSpanWithError, updateAgent, updateAgentRelation, updateAgentToolRelation, updateApiKey, updateApiKeyLastUsed, updateArtifactComponent, updateContextConfig, updateConversation, updateConversationActiveAgent, updateCredentialReference, updateDataComponent, updateExternalAgent, updateFullAgentServerSide, updateFullProjectServerSide, updateFunctionTool, updateMessage, updateProject, updateSubAgent, updateSubAgentExternalAgentRelation, updateSubAgentFunctionToolRelation, updateSubAgentTeamAgentRelation, updateTask, updateTool, upsertAgent, upsertAgentArtifactComponentRelation, upsertAgentDataComponentRelation, upsertArtifactComponent, upsertContextConfig, upsertCredentialReference, upsertDataComponent, upsertExternalAgent, upsertFunction, upsertFunctionTool, upsertLedgerArtifact, upsertSubAgent, upsertSubAgentExternalAgentRelation, upsertSubAgentFunctionToolRelation, upsertSubAgentRelation, upsertSubAgentTeamAgentRelation, upsertSubAgentToolRelation, upsertTool, validateAgainstJsonSchema, validateAndGetApiKey, validateApiKey, validateHeaders, validateHttpRequestHeaders, validateProjectExists, validateSubAgent, validateTargetAgent, validateTenantId, validationHelper, verifyAuthorizationHeader, verifyServiceToken, withProjectValidation };
|