@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.js
CHANGED
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
import { detectAuthenticationRequired } from './chunk-OP3KPT4T.js';
|
|
2
2
|
export { ACTIVITY_NAMES, ACTIVITY_STATUS, ACTIVITY_TYPES, AGENT_IDS, AGGREGATE_OPERATORS, AI_OPERATIONS, AI_TOOL_TYPES, DATA_SOURCES, DATA_TYPES, DELEGATION_FROM_SUB_AGENT_ID, DELEGATION_ID, DELEGATION_TO_SUB_AGENT_ID, FIELD_TYPES, OPERATORS, ORDER_DIRECTIONS, PANEL_TYPES, QUERY_DEFAULTS, QUERY_EXPRESSIONS, QUERY_FIELD_CONFIGS, QUERY_TYPES, REDUCE_OPERATIONS, SPAN_KEYS, SPAN_NAMES, TRANSFER_FROM_SUB_AGENT_ID, TRANSFER_TO_SUB_AGENT_ID, UNKNOWN_VALUE, detectAuthenticationRequired, exchangeMcpAuthorizationCode, initiateMcpOAuthFlow } from './chunk-OP3KPT4T.js';
|
|
3
|
-
export { TaskState } from './chunk-H2F72PDA.js';
|
|
4
3
|
export { ANTHROPIC_MODELS, GOOGLE_MODELS, OPENAI_MODELS } from './chunk-MQTANAMG.js';
|
|
5
|
-
import {
|
|
6
|
-
export {
|
|
7
|
-
import {
|
|
8
|
-
export {
|
|
9
|
-
import { ContextConfigApiUpdateSchema, validatePropsAsJsonSchema } from './chunk-RBUBOGX6.js';
|
|
10
|
-
export { AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentInsertSchema, AgentListResponse, AgentResponse, AgentSelectSchema, AgentStopWhenSchema, AgentUpdateSchema, AgentWithinContextOfProjectSchema, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeyListResponse, ApiKeyResponse, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentInsertSchema, ArtifactComponentListResponse, ArtifactComponentResponse, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ComponentAssociationSchema, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigInsertSchema, ContextConfigListResponse, ContextConfigResponse, ContextConfigSelectSchema, ContextConfigUpdateSchema, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationListResponse, ConversationResponse, ConversationSelectSchema, ConversationUpdateSchema, CreateCredentialInStoreRequestSchema, CreateCredentialInStoreResponseSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceListResponse, CredentialReferenceResponse, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, CredentialStoreListResponseSchema, CredentialStoreSchema, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentBaseSchema, DataComponentInsertSchema, DataComponentListResponse, DataComponentResponse, DataComponentSelectSchema, DataComponentUpdateSchema, ErrorResponseSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentListResponse, ExternalAgentResponse, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FetchConfigSchema, FetchDefinitionSchema, FullAgentAgentInsertSchema, FullProjectDefinitionSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, FunctionInsertSchema, FunctionListResponse, FunctionResponse, FunctionSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiSelectSchema, FunctionToolApiUpdateSchema, FunctionToolConfigSchema, FunctionToolInsertSchema, FunctionToolListResponse, FunctionToolResponse, FunctionToolSelectSchema, FunctionToolUpdateSchema, FunctionUpdateSchema, HeadersScopeSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiUpdateSchema, LedgerArtifactInsertSchema, LedgerArtifactSelectSchema, LedgerArtifactUpdateSchema, ListResponseSchema, MAX_ID_LENGTH, MCPToolConfigSchema, MIN_ID_LENGTH, McpToolDefinitionSchema, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageListResponse, MessageResponse, MessageSelectSchema, MessageUpdateSchema, ModelSchema, ModelSettingsSchema, OAuthCallbackQuerySchema, OAuthLoginQuerySchema, PaginationQueryParamsSchema, PaginationSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectListResponse, ProjectModelSchema, ProjectResponse, ProjectSelectSchema, ProjectUpdateSchema, RelatedAgentInfoSchema, RemovedResponseSchema, SingleResponseSchema, StatusComponentSchema, StatusUpdateSchema, StopWhenSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiUpdateSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentListResponse, SubAgentArtifactComponentResponse, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentUpdateSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiUpdateSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentListResponse, SubAgentDataComponentResponse, SubAgentDataComponentSelectSchema, SubAgentDataComponentUpdateSchema, SubAgentExternalAgentRelationApiInsertSchema, SubAgentExternalAgentRelationApiSelectSchema, SubAgentExternalAgentRelationApiUpdateSchema, SubAgentExternalAgentRelationInsertSchema, SubAgentExternalAgentRelationSelectSchema, SubAgentExternalAgentRelationUpdateSchema, SubAgentInsertSchema, SubAgentListResponse, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationListResponse, SubAgentRelationQuerySchema, SubAgentRelationResponse, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentResponse, SubAgentSelectSchema, SubAgentStopWhenSchema, SubAgentTeamAgentRelationApiInsertSchema, SubAgentTeamAgentRelationApiSelectSchema, SubAgentTeamAgentRelationApiUpdateSchema, SubAgentTeamAgentRelationInsertSchema, SubAgentTeamAgentRelationSelectSchema, SubAgentTeamAgentRelationUpdateSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiUpdateSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationListResponse, SubAgentToolRelationResponse, SubAgentToolRelationSelectSchema, SubAgentToolRelationUpdateSchema, SubAgentUpdateSchema, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, TeamAgentSchema, TenantIdParamsSchema, TenantParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolListResponse, ToolResponse, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, URL_SAFE_ID_PATTERN, canDelegateToExternalAgentSchema, canDelegateToTeamAgentSchema, resourceIdSchema, validatePropsAsJsonSchema } from './chunk-RBUBOGX6.js';
|
|
4
|
+
import { validateRender, validateAndTypeAgentData, validateAgentStructure } from './chunk-DCMDYQKE.js';
|
|
5
|
+
export { A2AMessageMetadataSchema, DataComponentStreamEventSchema, DataOperationDetailsSchema, DataOperationEventSchema, DataOperationStreamEventSchema, DataSummaryStreamEventSchema, DelegationReturnedDataSchema, DelegationSentDataSchema, StreamErrorEventSchema, StreamEventSchema, StreamFinishEventSchema, TextDeltaEventSchema, TextEndEventSchema, TextStartEventSchema, TransferDataSchema, generateIdFromName, isValidResourceId, validateAgentRelationships, validateAgentStructure, validateAndTypeAgentData, validateArtifactComponentReferences, validateDataComponentReferences, validateRender, validateSubAgentExternalAgentRelations, validateToolReferences } from './chunk-DCMDYQKE.js';
|
|
6
|
+
import { schemaValidationDefaults, ContextConfigApiUpdateSchema, validatePropsAsJsonSchema } from './chunk-SLRVWIQY.js';
|
|
7
|
+
export { AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentInsertSchema, AgentListResponse, AgentResponse, AgentSelectSchema, AgentStopWhenSchema, AgentUpdateSchema, AgentWithinContextOfProjectSchema, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeyListResponse, ApiKeyResponse, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentInsertSchema, ArtifactComponentListResponse, ArtifactComponentResponse, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ComponentAssociationSchema, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigInsertSchema, ContextConfigListResponse, ContextConfigResponse, ContextConfigSelectSchema, ContextConfigUpdateSchema, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationListResponse, ConversationResponse, ConversationSelectSchema, ConversationUpdateSchema, CreateCredentialInStoreRequestSchema, CreateCredentialInStoreResponseSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceListResponse, CredentialReferenceResponse, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, CredentialStoreListResponseSchema, CredentialStoreSchema, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentBaseSchema, DataComponentInsertSchema, DataComponentListResponse, DataComponentResponse, DataComponentSelectSchema, DataComponentUpdateSchema, ErrorResponseSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentListResponse, ExternalAgentResponse, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FetchConfigSchema, FetchDefinitionSchema, FullAgentAgentInsertSchema, FullProjectDefinitionSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, FunctionInsertSchema, FunctionListResponse, FunctionResponse, FunctionSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiSelectSchema, FunctionToolApiUpdateSchema, FunctionToolConfigSchema, FunctionToolInsertSchema, FunctionToolListResponse, FunctionToolResponse, FunctionToolSelectSchema, FunctionToolUpdateSchema, FunctionUpdateSchema, HeadersScopeSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiUpdateSchema, LedgerArtifactInsertSchema, LedgerArtifactSelectSchema, LedgerArtifactUpdateSchema, ListResponseSchema, MAX_ID_LENGTH, MCPToolConfigSchema, MIN_ID_LENGTH, McpToolDefinitionSchema, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageListResponse, MessageResponse, MessageSelectSchema, MessageUpdateSchema, ModelSchema, ModelSettingsSchema, OAuthCallbackQuerySchema, OAuthLoginQuerySchema, PaginationQueryParamsSchema, PaginationSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectListResponse, ProjectModelSchema, ProjectResponse, ProjectSelectSchema, ProjectUpdateSchema, RelatedAgentInfoSchema, RemovedResponseSchema, SingleResponseSchema, StatusComponentSchema, StatusUpdateSchema, StopWhenSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiUpdateSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentListResponse, SubAgentArtifactComponentResponse, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentUpdateSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiUpdateSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentListResponse, SubAgentDataComponentResponse, SubAgentDataComponentSelectSchema, SubAgentDataComponentUpdateSchema, SubAgentExternalAgentRelationApiInsertSchema, SubAgentExternalAgentRelationApiSelectSchema, SubAgentExternalAgentRelationApiUpdateSchema, SubAgentExternalAgentRelationInsertSchema, SubAgentExternalAgentRelationSelectSchema, SubAgentExternalAgentRelationUpdateSchema, SubAgentInsertSchema, SubAgentListResponse, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationListResponse, SubAgentRelationQuerySchema, SubAgentRelationResponse, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentResponse, SubAgentSelectSchema, SubAgentStopWhenSchema, SubAgentTeamAgentRelationApiInsertSchema, SubAgentTeamAgentRelationApiSelectSchema, SubAgentTeamAgentRelationApiUpdateSchema, SubAgentTeamAgentRelationInsertSchema, SubAgentTeamAgentRelationSelectSchema, SubAgentTeamAgentRelationUpdateSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiUpdateSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationListResponse, SubAgentToolRelationResponse, SubAgentToolRelationSelectSchema, SubAgentToolRelationUpdateSchema, SubAgentUpdateSchema, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, TeamAgentSchema, TenantIdParamsSchema, TenantParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolListResponse, ToolResponse, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, URL_SAFE_ID_PATTERN, canDelegateToExternalAgentSchema, canDelegateToTeamAgentSchema, resourceIdSchema, schemaValidationDefaults, validatePropsAsJsonSchema } from './chunk-SLRVWIQY.js';
|
|
11
8
|
import { schema_exports, contextConfigs, externalAgents, functions, functionTools, subAgentFunctionToolRelations, subAgentExternalAgentRelations, subAgents, subAgentRelations, subAgentToolRelations, tools, subAgentTeamAgentRelations, agents, credentialReferences, subAgentDataComponents, subAgentArtifactComponents, dataComponents, artifactComponents, projects, apiKeys, contextCache, conversations, messages, ledgerArtifacts, tasks, taskRelations } from './chunk-T5TTDZ6L.js';
|
|
12
9
|
export { agentRelations, agentToolRelationsRelations, agents, apiKeys, apiKeysRelations, artifactComponents, artifactComponentsRelations, contextCache, contextCacheRelations, contextConfigs, contextConfigsRelations, conversations, conversationsRelations, credentialReferences, credentialReferencesRelations, dataComponents, dataComponentsRelations, externalAgents, externalAgentsRelations, functionTools, functionToolsRelations, functions, functionsRelations, ledgerArtifacts, ledgerArtifactsRelations, messages, messagesRelations, projects, projectsRelations, subAgentArtifactComponents, subAgentArtifactComponentsRelations, subAgentDataComponents, subAgentDataComponentsRelations, subAgentExternalAgentRelations, subAgentExternalAgentRelationsRelations, subAgentFunctionToolRelations, subAgentFunctionToolRelationsRelations, subAgentRelations, subAgentRelationsRelations, subAgentTeamAgentRelations, subAgentTeamAgentRelationsRelations, subAgentToolRelations, subAgents, subAgentsRelations, taskRelations, taskRelationsRelations, tasks, tasksRelations, tools, toolsRelations } from './chunk-T5TTDZ6L.js';
|
|
10
|
+
import { getLogger, convertZodToJsonSchema } from './chunk-YECQCT5N.js';
|
|
11
|
+
export { PinoLogger, convertZodToJsonSchema, convertZodToJsonSchemaWithPreview, extractPreviewFields, getLogger, isZodSchema, loggerFactory, preview } from './chunk-YECQCT5N.js';
|
|
12
|
+
export { TaskState } from './chunk-H2F72PDA.js';
|
|
13
13
|
import { CredentialStoreType, MCPServerType, MCPTransportType } from './chunk-YFHT5M2R.js';
|
|
14
14
|
export { CredentialStoreType, MCPServerType, MCPTransportType, TOOL_STATUS_VALUES, VALID_RELATION_TYPES } from './chunk-YFHT5M2R.js';
|
|
15
15
|
import { __commonJS, __require, __publicField } from './chunk-E6R6PML7.js';
|
|
16
|
-
import { z
|
|
16
|
+
import { z } from 'zod';
|
|
17
|
+
import fs from 'fs';
|
|
18
|
+
import os from 'os';
|
|
19
|
+
import path from 'path';
|
|
20
|
+
import dotenv from 'dotenv';
|
|
21
|
+
import { expand } from 'dotenv-expand';
|
|
22
|
+
import { findUpSync } from 'find-up';
|
|
17
23
|
import jmespath from 'jmespath';
|
|
18
24
|
import { createClient } from '@libsql/client';
|
|
19
25
|
import { drizzle } from 'drizzle-orm/libsql';
|
|
@@ -21,7 +27,7 @@ import { and, eq, desc, sql, count, asc, isNotNull, inArray, not } from 'drizzle
|
|
|
21
27
|
import { customAlphabet, nanoid } from 'nanoid';
|
|
22
28
|
import crypto, { scrypt, randomBytes, timingSafeEqual } from 'crypto';
|
|
23
29
|
import { promisify } from 'util';
|
|
24
|
-
import { z } from '@hono/zod-openapi';
|
|
30
|
+
import { z as z$1 } from '@hono/zod-openapi';
|
|
25
31
|
import { HTTPException } from 'hono/http-exception';
|
|
26
32
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
27
33
|
import { SSEClientTransport } from '@modelcontextprotocol/sdk/client/sse.js';
|
|
@@ -32,12 +38,6 @@ import { tool } from 'ai';
|
|
|
32
38
|
import { asyncExitHook, gracefulExit } from 'exit-hook';
|
|
33
39
|
import { match } from 'ts-pattern';
|
|
34
40
|
import { SignJWT, jwtVerify } from 'jose';
|
|
35
|
-
import fs from 'fs';
|
|
36
|
-
import os from 'os';
|
|
37
|
-
import path from 'path';
|
|
38
|
-
import dotenv from 'dotenv';
|
|
39
|
-
import { expand } from 'dotenv-expand';
|
|
40
|
-
import { findUpSync } from 'find-up';
|
|
41
41
|
import { trace, SpanStatusCode } from '@opentelemetry/api';
|
|
42
42
|
import Ajv from 'ajv';
|
|
43
43
|
import { Nango } from '@nangohq/node';
|
|
@@ -212876,6 +212876,145 @@ async function apiFetch(url, options = {}) {
|
|
|
212876
212876
|
headers: headers2
|
|
212877
212877
|
});
|
|
212878
212878
|
}
|
|
212879
|
+
var loadEnvironmentFiles = () => {
|
|
212880
|
+
const environmentFiles = [];
|
|
212881
|
+
const currentEnv = path.resolve(process.cwd(), ".env");
|
|
212882
|
+
if (fs.existsSync(currentEnv)) {
|
|
212883
|
+
environmentFiles.push(currentEnv);
|
|
212884
|
+
}
|
|
212885
|
+
const rootEnv = findUpSync(".env", { cwd: path.dirname(process.cwd()) });
|
|
212886
|
+
if (rootEnv) {
|
|
212887
|
+
if (rootEnv !== currentEnv) {
|
|
212888
|
+
environmentFiles.push(rootEnv);
|
|
212889
|
+
}
|
|
212890
|
+
}
|
|
212891
|
+
const userConfigPath = path.join(os.homedir(), ".inkeep", "config");
|
|
212892
|
+
if (fs.existsSync(userConfigPath)) {
|
|
212893
|
+
dotenv.config({ path: userConfigPath, override: true, quiet: true });
|
|
212894
|
+
}
|
|
212895
|
+
if (environmentFiles.length > 0) {
|
|
212896
|
+
dotenv.config({
|
|
212897
|
+
path: environmentFiles,
|
|
212898
|
+
override: false,
|
|
212899
|
+
quiet: true
|
|
212900
|
+
});
|
|
212901
|
+
expand({ processEnv: process.env });
|
|
212902
|
+
}
|
|
212903
|
+
};
|
|
212904
|
+
loadEnvironmentFiles();
|
|
212905
|
+
var envSchema = z.object({
|
|
212906
|
+
ENVIRONMENT: z.enum(["development", "production", "pentest", "test"]).optional(),
|
|
212907
|
+
DB_FILE_NAME: z.string().optional(),
|
|
212908
|
+
TURSO_DATABASE_URL: z.string().optional(),
|
|
212909
|
+
TURSO_AUTH_TOKEN: z.string().optional(),
|
|
212910
|
+
INKEEP_AGENTS_JWT_SIGNING_SECRET: z.string().min(32, "INKEEP_AGENTS_JWT_SIGNING_SECRET must be at least 32 characters").optional()
|
|
212911
|
+
});
|
|
212912
|
+
var parseEnv = () => {
|
|
212913
|
+
try {
|
|
212914
|
+
const parsedEnv = envSchema.parse(process.env);
|
|
212915
|
+
return parsedEnv;
|
|
212916
|
+
} catch (error) {
|
|
212917
|
+
if (error instanceof z.ZodError) {
|
|
212918
|
+
const missingVars = error.issues.map((issue) => issue.path.join("."));
|
|
212919
|
+
throw new Error(
|
|
212920
|
+
`\u274C Invalid environment variables: ${missingVars.join(", ")}
|
|
212921
|
+
${error.message}`
|
|
212922
|
+
);
|
|
212923
|
+
}
|
|
212924
|
+
throw error;
|
|
212925
|
+
}
|
|
212926
|
+
};
|
|
212927
|
+
var env = parseEnv();
|
|
212928
|
+
|
|
212929
|
+
// src/constants/execution-limits-shared/defaults.ts
|
|
212930
|
+
var executionLimitsSharedDefaults = {
|
|
212931
|
+
// MCP Tool Connection and Retry Behavior
|
|
212932
|
+
// Model Context Protocol (MCP) enables agents to connect to external tools and services.
|
|
212933
|
+
// These constants control connection timeouts and retry strategy with exponential backoff.
|
|
212934
|
+
// CONNECTION_TIMEOUT_MS: Maximum wait time for initial MCP server connection
|
|
212935
|
+
// MAX_RETRIES: Maximum number of connection retry attempts before failing
|
|
212936
|
+
// INITIAL_RECONNECTION_DELAY_MS: Starting delay between retry attempts
|
|
212937
|
+
// MAX_RECONNECTION_DELAY_MS: Maximum delay between retry attempts (after exponential growth)
|
|
212938
|
+
// RECONNECTION_DELAY_GROWTH_FACTOR: Multiplier applied to delay after each failed retry (exponential backoff)
|
|
212939
|
+
MCP_TOOL_CONNECTION_TIMEOUT_MS: 3e3,
|
|
212940
|
+
// 3 seconds
|
|
212941
|
+
MCP_TOOL_MAX_RETRIES: 3,
|
|
212942
|
+
MCP_TOOL_MAX_RECONNECTION_DELAY_MS: 3e4,
|
|
212943
|
+
// 30 seconds
|
|
212944
|
+
MCP_TOOL_INITIAL_RECONNECTION_DELAY_MS: 1e3,
|
|
212945
|
+
// 1 second
|
|
212946
|
+
MCP_TOOL_RECONNECTION_DELAY_GROWTH_FACTOR: 1.5,
|
|
212947
|
+
// Conversation History Context Window
|
|
212948
|
+
// CONVERSATION_HISTORY_DEFAULT_LIMIT: Default number of recent messages to retrieve from conversation history.
|
|
212949
|
+
// Used when fetching conversation context for status updates and other operations.
|
|
212950
|
+
CONVERSATION_HISTORY_DEFAULT_LIMIT: 50,
|
|
212951
|
+
// CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT: Maximum number of tokens from previous conversation messages
|
|
212952
|
+
// to include in the LLM prompt. Prevents excessive token usage while maintaining relevant conversation context.
|
|
212953
|
+
// Messages exceeding this limit are truncated from the beginning of the conversation.
|
|
212954
|
+
CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT: 4e3
|
|
212955
|
+
};
|
|
212956
|
+
|
|
212957
|
+
// src/constants/execution-limits-shared/index.ts
|
|
212958
|
+
loadEnvironmentFiles();
|
|
212959
|
+
var constantsSchema = z.object(
|
|
212960
|
+
Object.fromEntries(
|
|
212961
|
+
Object.keys(executionLimitsSharedDefaults).map((key) => [
|
|
212962
|
+
`AGENTS_${key}`,
|
|
212963
|
+
z.coerce.number().optional()
|
|
212964
|
+
])
|
|
212965
|
+
)
|
|
212966
|
+
);
|
|
212967
|
+
var parseConstants = () => {
|
|
212968
|
+
const envOverrides = constantsSchema.parse(process.env);
|
|
212969
|
+
return Object.fromEntries(
|
|
212970
|
+
Object.entries(executionLimitsSharedDefaults).map(([key, defaultValue]) => [
|
|
212971
|
+
key,
|
|
212972
|
+
envOverrides[`AGENTS_${key}`] ?? defaultValue
|
|
212973
|
+
])
|
|
212974
|
+
);
|
|
212975
|
+
};
|
|
212976
|
+
var constants = parseConstants();
|
|
212977
|
+
var {
|
|
212978
|
+
MCP_TOOL_CONNECTION_TIMEOUT_MS,
|
|
212979
|
+
MCP_TOOL_MAX_RETRIES,
|
|
212980
|
+
MCP_TOOL_MAX_RECONNECTION_DELAY_MS,
|
|
212981
|
+
MCP_TOOL_INITIAL_RECONNECTION_DELAY_MS,
|
|
212982
|
+
MCP_TOOL_RECONNECTION_DELAY_GROWTH_FACTOR,
|
|
212983
|
+
CONVERSATION_HISTORY_DEFAULT_LIMIT,
|
|
212984
|
+
CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT
|
|
212985
|
+
} = constants;
|
|
212986
|
+
loadEnvironmentFiles();
|
|
212987
|
+
var constantsSchema2 = z.object(
|
|
212988
|
+
Object.fromEntries(
|
|
212989
|
+
Object.keys(schemaValidationDefaults).map((key) => [
|
|
212990
|
+
`AGENTS_${key}`,
|
|
212991
|
+
z.coerce.number().optional()
|
|
212992
|
+
])
|
|
212993
|
+
)
|
|
212994
|
+
);
|
|
212995
|
+
var parseConstants2 = () => {
|
|
212996
|
+
const envOverrides = constantsSchema2.parse(process.env);
|
|
212997
|
+
return Object.fromEntries(
|
|
212998
|
+
Object.entries(schemaValidationDefaults).map(([key, defaultValue]) => [
|
|
212999
|
+
key,
|
|
213000
|
+
envOverrides[`AGENTS_${key}`] ?? defaultValue
|
|
213001
|
+
])
|
|
213002
|
+
);
|
|
213003
|
+
};
|
|
213004
|
+
var constants2 = parseConstants2();
|
|
213005
|
+
var {
|
|
213006
|
+
AGENT_EXECUTION_TRANSFER_COUNT_MIN,
|
|
213007
|
+
AGENT_EXECUTION_TRANSFER_COUNT_MAX,
|
|
213008
|
+
AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT,
|
|
213009
|
+
SUB_AGENT_TURN_GENERATION_STEPS_MIN,
|
|
213010
|
+
SUB_AGENT_TURN_GENERATION_STEPS_MAX,
|
|
213011
|
+
SUB_AGENT_TURN_GENERATION_STEPS_DEFAULT,
|
|
213012
|
+
STATUS_UPDATE_MAX_NUM_EVENTS,
|
|
213013
|
+
STATUS_UPDATE_MAX_INTERVAL_SECONDS,
|
|
213014
|
+
VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS,
|
|
213015
|
+
VALIDATION_AGENT_PROMPT_MAX_CHARS,
|
|
213016
|
+
CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT
|
|
213017
|
+
} = constants2;
|
|
212879
213018
|
var logger = getLogger("context-config");
|
|
212880
213019
|
var HeadersSchemaBuilder = class {
|
|
212881
213020
|
constructor(options) {
|
|
@@ -213028,7 +213167,7 @@ var ContextConfigBuilder = class {
|
|
|
213028
213167
|
});
|
|
213029
213168
|
return { valid: true, errors: [] };
|
|
213030
213169
|
} catch (error) {
|
|
213031
|
-
if (error instanceof z
|
|
213170
|
+
if (error instanceof z.ZodError) {
|
|
213032
213171
|
return {
|
|
213033
213172
|
valid: false,
|
|
213034
213173
|
errors: error.issues.map((e) => `${e.path.join(".")}: ${e.message}`)
|
|
@@ -215427,7 +215566,7 @@ function extractPublicId(key) {
|
|
|
215427
215566
|
function maskApiKey(keyPrefix) {
|
|
215428
215567
|
return `${keyPrefix}...`;
|
|
215429
215568
|
}
|
|
215430
|
-
var ErrorCode = z.enum([
|
|
215569
|
+
var ErrorCode = z$1.enum([
|
|
215431
215570
|
"bad_request",
|
|
215432
215571
|
"unauthorized",
|
|
215433
215572
|
"forbidden",
|
|
@@ -215446,28 +215585,28 @@ var errorCodeToHttpStatus = {
|
|
|
215446
215585
|
internal_server_error: 500
|
|
215447
215586
|
};
|
|
215448
215587
|
var ERROR_DOCS_BASE_URL = "https://docs.inkeep.com/agents-api/errors";
|
|
215449
|
-
var problemDetailsSchema = z.object({
|
|
215588
|
+
var problemDetailsSchema = z$1.object({
|
|
215450
215589
|
// type: z.string().url().openapi({
|
|
215451
215590
|
// description: "A URI reference that identifies the problem type.",
|
|
215452
215591
|
// example: `${ERROR_DOCS_BASE_URL}#not-found`,
|
|
215453
215592
|
// }),
|
|
215454
|
-
title: z.string().openapi({
|
|
215593
|
+
title: z$1.string().openapi({
|
|
215455
215594
|
description: "A short, human-readable summary of the problem type.",
|
|
215456
215595
|
example: "Resource Not Found"
|
|
215457
215596
|
}),
|
|
215458
|
-
status: z.number().int().openapi({
|
|
215597
|
+
status: z$1.number().int().openapi({
|
|
215459
215598
|
description: "The HTTP status code.",
|
|
215460
215599
|
example: 404
|
|
215461
215600
|
}),
|
|
215462
|
-
detail: z.string().openapi({
|
|
215601
|
+
detail: z$1.string().openapi({
|
|
215463
215602
|
description: "A human-readable explanation specific to this occurrence of the problem.",
|
|
215464
215603
|
example: "The requested resource was not found."
|
|
215465
215604
|
}),
|
|
215466
|
-
instance: z.string().optional().openapi({
|
|
215605
|
+
instance: z$1.string().optional().openapi({
|
|
215467
215606
|
description: "A URI reference that identifies the specific occurrence of the problem.",
|
|
215468
215607
|
example: "/conversations/123"
|
|
215469
215608
|
}),
|
|
215470
|
-
requestId: z.string().optional().openapi({
|
|
215609
|
+
requestId: z$1.string().optional().openapi({
|
|
215471
215610
|
description: "A unique identifier for the request, useful for troubleshooting.",
|
|
215472
215611
|
example: "req_1234567890"
|
|
215473
215612
|
}),
|
|
@@ -215476,13 +215615,13 @@ var problemDetailsSchema = z.object({
|
|
|
215476
215615
|
example: "not_found"
|
|
215477
215616
|
})
|
|
215478
215617
|
}).openapi("ProblemDetails");
|
|
215479
|
-
var errorResponseSchema = z.object({
|
|
215480
|
-
error: z.object({
|
|
215618
|
+
var errorResponseSchema = z$1.object({
|
|
215619
|
+
error: z$1.object({
|
|
215481
215620
|
code: ErrorCode.openapi({
|
|
215482
215621
|
description: "A short code indicating the error code returned.",
|
|
215483
215622
|
example: "not_found"
|
|
215484
215623
|
}),
|
|
215485
|
-
message: z.string().openapi({
|
|
215624
|
+
message: z$1.string().openapi({
|
|
215486
215625
|
description: "A human readable error message.",
|
|
215487
215626
|
example: "The requested resource was not found."
|
|
215488
215627
|
})
|
|
@@ -215620,15 +215759,15 @@ var errorSchemaFactory = (code, description) => ({
|
|
|
215620
215759
|
content: {
|
|
215621
215760
|
"application/problem+json": {
|
|
215622
215761
|
schema: problemDetailsSchema.extend({
|
|
215623
|
-
code: z.literal(code).openapi({
|
|
215762
|
+
code: z$1.literal(code).openapi({
|
|
215624
215763
|
description: "A short code indicating the error code returned.",
|
|
215625
215764
|
example: code
|
|
215626
215765
|
}),
|
|
215627
|
-
detail: z.string().openapi({
|
|
215766
|
+
detail: z$1.string().openapi({
|
|
215628
215767
|
description: "A detailed explanation specific to this occurrence of the problem, providing context and specifics about what went wrong.",
|
|
215629
215768
|
example: description
|
|
215630
215769
|
}),
|
|
215631
|
-
title: z.string().openapi({
|
|
215770
|
+
title: z$1.string().openapi({
|
|
215632
215771
|
description: "A short, human-readable summary of the problem type.",
|
|
215633
215772
|
example: getTitleFromCode(code)
|
|
215634
215773
|
}),
|
|
@@ -215636,16 +215775,16 @@ var errorSchemaFactory = (code, description) => ({
|
|
|
215636
215775
|
// description: "A URI reference that identifies the problem type.",
|
|
215637
215776
|
// example: `${ERROR_DOCS_BASE_URL}#${code}`,
|
|
215638
215777
|
// }),
|
|
215639
|
-
status: z.literal(errorCodeToHttpStatus[code]).openapi({
|
|
215778
|
+
status: z$1.literal(errorCodeToHttpStatus[code]).openapi({
|
|
215640
215779
|
description: "The HTTP status code.",
|
|
215641
215780
|
example: errorCodeToHttpStatus[code]
|
|
215642
215781
|
}),
|
|
215643
|
-
error: z.object({
|
|
215644
|
-
code: z.literal(code).openapi({
|
|
215782
|
+
error: z$1.object({
|
|
215783
|
+
code: z$1.literal(code).openapi({
|
|
215645
215784
|
description: "A short code indicating the error code returned.",
|
|
215646
215785
|
example: code
|
|
215647
215786
|
}),
|
|
215648
|
-
message: z.string().openapi({
|
|
215787
|
+
message: z$1.string().openapi({
|
|
215649
215788
|
description: "A concise error message suitable for display to end users. May be truncated if the full detail is long.",
|
|
215650
215789
|
example: description.length > 100 ? `${description.substring(0, 97)}...` : description
|
|
215651
215790
|
})
|
|
@@ -215764,15 +215903,15 @@ var McpClient = class {
|
|
|
215764
215903
|
this.transport = new StreamableHTTPClientTransport(new URL(urlString), {
|
|
215765
215904
|
requestInit: mergedRequestInit,
|
|
215766
215905
|
reconnectionOptions: {
|
|
215767
|
-
maxRetries:
|
|
215768
|
-
maxReconnectionDelay:
|
|
215769
|
-
initialReconnectionDelay:
|
|
215770
|
-
reconnectionDelayGrowFactor:
|
|
215906
|
+
maxRetries: MCP_TOOL_MAX_RETRIES,
|
|
215907
|
+
maxReconnectionDelay: MCP_TOOL_MAX_RECONNECTION_DELAY_MS,
|
|
215908
|
+
initialReconnectionDelay: MCP_TOOL_INITIAL_RECONNECTION_DELAY_MS,
|
|
215909
|
+
reconnectionDelayGrowFactor: MCP_TOOL_RECONNECTION_DELAY_GROWTH_FACTOR,
|
|
215771
215910
|
...config.reconnectionOptions
|
|
215772
215911
|
},
|
|
215773
215912
|
sessionId: config.sessionId
|
|
215774
215913
|
});
|
|
215775
|
-
await this.client.connect(this.transport, { timeout:
|
|
215914
|
+
await this.client.connect(this.transport, { timeout: MCP_TOOL_CONNECTION_TIMEOUT_MS });
|
|
215776
215915
|
}
|
|
215777
215916
|
async disconnect() {
|
|
215778
215917
|
if (!this.transport) {
|
|
@@ -215823,7 +215962,7 @@ var McpClient = class {
|
|
|
215823
215962
|
try {
|
|
215824
215963
|
const createZodSchema = (inputSchema) => {
|
|
215825
215964
|
if (!inputSchema || !inputSchema.properties) {
|
|
215826
|
-
return z
|
|
215965
|
+
return z.object({});
|
|
215827
215966
|
}
|
|
215828
215967
|
const zodProperties = {};
|
|
215829
215968
|
for (const [key, prop] of Object.entries(inputSchema.properties)) {
|
|
@@ -215831,19 +215970,19 @@ var McpClient = class {
|
|
|
215831
215970
|
let zodType;
|
|
215832
215971
|
switch (propDef.type) {
|
|
215833
215972
|
case "string":
|
|
215834
|
-
zodType = z
|
|
215973
|
+
zodType = z.string();
|
|
215835
215974
|
break;
|
|
215836
215975
|
case "number":
|
|
215837
|
-
zodType = z
|
|
215976
|
+
zodType = z.number();
|
|
215838
215977
|
break;
|
|
215839
215978
|
case "boolean":
|
|
215840
|
-
zodType = z
|
|
215979
|
+
zodType = z.boolean();
|
|
215841
215980
|
break;
|
|
215842
215981
|
case "array":
|
|
215843
|
-
zodType = z
|
|
215982
|
+
zodType = z.array(z.any());
|
|
215844
215983
|
break;
|
|
215845
215984
|
default:
|
|
215846
|
-
zodType = z
|
|
215985
|
+
zodType = z.any();
|
|
215847
215986
|
}
|
|
215848
215987
|
if (propDef.description) {
|
|
215849
215988
|
zodType = zodType.describe(propDef.description);
|
|
@@ -215854,7 +215993,7 @@ var McpClient = class {
|
|
|
215854
215993
|
}
|
|
215855
215994
|
zodProperties[key] = zodType;
|
|
215856
215995
|
}
|
|
215857
|
-
return z
|
|
215996
|
+
return z.object(zodProperties);
|
|
215858
215997
|
};
|
|
215859
215998
|
const schema = createZodSchema(def.inputSchema);
|
|
215860
215999
|
const createdTool = tool({
|
|
@@ -215880,57 +216019,6 @@ var McpClient = class {
|
|
|
215880
216019
|
return results;
|
|
215881
216020
|
}
|
|
215882
216021
|
};
|
|
215883
|
-
var loadEnvironmentFiles = () => {
|
|
215884
|
-
const environmentFiles = [];
|
|
215885
|
-
const currentEnv = path.resolve(process.cwd(), ".env");
|
|
215886
|
-
if (fs.existsSync(currentEnv)) {
|
|
215887
|
-
environmentFiles.push(currentEnv);
|
|
215888
|
-
}
|
|
215889
|
-
const rootEnv = findUpSync(".env", { cwd: path.dirname(process.cwd()) });
|
|
215890
|
-
if (rootEnv) {
|
|
215891
|
-
if (rootEnv !== currentEnv) {
|
|
215892
|
-
environmentFiles.push(rootEnv);
|
|
215893
|
-
}
|
|
215894
|
-
}
|
|
215895
|
-
const userConfigPath = path.join(os.homedir(), ".inkeep", "config");
|
|
215896
|
-
if (fs.existsSync(userConfigPath)) {
|
|
215897
|
-
dotenv.config({ path: userConfigPath, override: true, quiet: true });
|
|
215898
|
-
}
|
|
215899
|
-
if (environmentFiles.length > 0) {
|
|
215900
|
-
dotenv.config({
|
|
215901
|
-
path: environmentFiles,
|
|
215902
|
-
override: false,
|
|
215903
|
-
quiet: true
|
|
215904
|
-
});
|
|
215905
|
-
expand({ processEnv: process.env });
|
|
215906
|
-
}
|
|
215907
|
-
};
|
|
215908
|
-
loadEnvironmentFiles();
|
|
215909
|
-
var envSchema = z$1.object({
|
|
215910
|
-
ENVIRONMENT: z$1.enum(["development", "production", "pentest", "test"]).optional(),
|
|
215911
|
-
DB_FILE_NAME: z$1.string().optional(),
|
|
215912
|
-
TURSO_DATABASE_URL: z$1.string().optional(),
|
|
215913
|
-
TURSO_AUTH_TOKEN: z$1.string().optional(),
|
|
215914
|
-
INKEEP_AGENTS_JWT_SIGNING_SECRET: z$1.string().min(32, "INKEEP_AGENTS_JWT_SIGNING_SECRET must be at least 32 characters").optional()
|
|
215915
|
-
});
|
|
215916
|
-
var parseEnv = () => {
|
|
215917
|
-
try {
|
|
215918
|
-
const parsedEnv = envSchema.parse(process.env);
|
|
215919
|
-
return parsedEnv;
|
|
215920
|
-
} catch (error) {
|
|
215921
|
-
if (error instanceof z$1.ZodError) {
|
|
215922
|
-
const missingVars = error.issues.map((issue) => issue.path.join("."));
|
|
215923
|
-
throw new Error(
|
|
215924
|
-
`\u274C Invalid environment variables: ${missingVars.join(", ")}
|
|
215925
|
-
${error.message}`
|
|
215926
|
-
);
|
|
215927
|
-
}
|
|
215928
|
-
throw error;
|
|
215929
|
-
}
|
|
215930
|
-
};
|
|
215931
|
-
var env = parseEnv();
|
|
215932
|
-
|
|
215933
|
-
// src/utils/service-token-auth.ts
|
|
215934
216022
|
var logger5 = getLogger("service-token-auth");
|
|
215935
216023
|
function getJwtSecret() {
|
|
215936
216024
|
const secret = env.INKEEP_AGENTS_JWT_SIGNING_SECRET;
|
|
@@ -223053,10 +223141,10 @@ var InMemoryCredentialStore = class {
|
|
|
223053
223141
|
}
|
|
223054
223142
|
};
|
|
223055
223143
|
var logger13 = getLogger("nango-credential-store");
|
|
223056
|
-
var CredentialKeySchema = z
|
|
223057
|
-
connectionId: z
|
|
223058
|
-
providerConfigKey: z
|
|
223059
|
-
integrationDisplayName: z
|
|
223144
|
+
var CredentialKeySchema = z.object({
|
|
223145
|
+
connectionId: z.string().min(1, "connectionId must be a non-empty string"),
|
|
223146
|
+
providerConfigKey: z.string().min(1, "providerConfigKey must be a non-empty string"),
|
|
223147
|
+
integrationDisplayName: z.string().nullish()
|
|
223060
223148
|
});
|
|
223061
223149
|
function parseCredentialKey(key) {
|
|
223062
223150
|
try {
|
|
@@ -223482,4 +223570,4 @@ typescript/lib/typescript.js:
|
|
|
223482
223570
|
***************************************************************************** *)
|
|
223483
223571
|
*/
|
|
223484
223572
|
|
|
223485
|
-
export { ContextCache, ContextConfigBuilder, ContextFetcher, ContextResolver, CredentialStoreRegistry, CredentialStuffer, ERROR_DOCS_BASE_URL, ErrorCode, HTTP_REQUEST_PARTS, InMemoryCredentialStore, KeyChainStore, McpClient, NangoCredentialStore, TemplateEngine, 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, 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 };
|
|
223573
|
+
export { AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT, AGENT_EXECUTION_TRANSFER_COUNT_MAX, AGENT_EXECUTION_TRANSFER_COUNT_MIN, CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT, CONVERSATION_HISTORY_DEFAULT_LIMIT, CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT, ContextCache, ContextConfigBuilder, ContextFetcher, ContextResolver, CredentialStoreRegistry, CredentialStuffer, ERROR_DOCS_BASE_URL, ErrorCode, HTTP_REQUEST_PARTS, InMemoryCredentialStore, KeyChainStore, 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, NangoCredentialStore, 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, TemplateEngine, VALIDATION_AGENT_PROMPT_MAX_CHARS, VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS, 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, 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 };
|
|
@@ -55,6 +55,38 @@ function buildDelegationGraph(agentData) {
|
|
|
55
55
|
}
|
|
56
56
|
return graph;
|
|
57
57
|
}
|
|
58
|
+
|
|
59
|
+
// src/constants/schema-validation/defaults.ts
|
|
60
|
+
var schemaValidationDefaults = {
|
|
61
|
+
// Agent Execution Transfer Count
|
|
62
|
+
// Controls how many times an agent can transfer control to sub-agents in a single conversation turn.
|
|
63
|
+
// This prevents infinite transfer loops while allowing multi-agent collaboration workflows.
|
|
64
|
+
AGENT_EXECUTION_TRANSFER_COUNT_MIN: 1,
|
|
65
|
+
AGENT_EXECUTION_TRANSFER_COUNT_MAX: 1e3,
|
|
66
|
+
// Sub-Agent Turn Generation Steps
|
|
67
|
+
// Limits how many AI generation steps a sub-agent can perform within a single turn.
|
|
68
|
+
// Each generation step typically involves sending a prompt to the LLM and processing its response.
|
|
69
|
+
// This prevents runaway token usage while allowing complex multi-step reasoning.
|
|
70
|
+
SUB_AGENT_TURN_GENERATION_STEPS_MIN: 1,
|
|
71
|
+
SUB_AGENT_TURN_GENERATION_STEPS_MAX: 1e3,
|
|
72
|
+
// Status Update Thresholds
|
|
73
|
+
// Real-time status updates are triggered when either threshold is exceeded during longer operations.
|
|
74
|
+
// MAX_NUM_EVENTS: Maximum number of internal events before forcing a status update to the client.
|
|
75
|
+
// MAX_INTERVAL_SECONDS: Maximum time between status updates regardless of event count.
|
|
76
|
+
STATUS_UPDATE_MAX_NUM_EVENTS: 100,
|
|
77
|
+
STATUS_UPDATE_MAX_INTERVAL_SECONDS: 600,
|
|
78
|
+
// 10 minutes
|
|
79
|
+
// Prompt Text Length Validation
|
|
80
|
+
// Maximum character limits for agent and sub-agent system prompts to prevent excessive token usage.
|
|
81
|
+
// Enforced during agent configuration to ensure prompts remain focused and manageable.
|
|
82
|
+
VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS: 2e3,
|
|
83
|
+
VALIDATION_AGENT_PROMPT_MAX_CHARS: 5e3,
|
|
84
|
+
// Context Fetcher HTTP Timeout
|
|
85
|
+
// Maximum time allowed for HTTP requests made by Context Fetchers (e.g., CRM lookups, external API calls).
|
|
86
|
+
// Context Fetchers automatically retrieve external data at the start of a conversation to enrich agent context.
|
|
87
|
+
CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT: 1e4
|
|
88
|
+
// 10 seconds
|
|
89
|
+
};
|
|
58
90
|
var tenantScoped = {
|
|
59
91
|
tenantId: sqliteCore.text("tenant_id").notNull(),
|
|
60
92
|
id: sqliteCore.text("id").notNull()
|
|
@@ -1004,9 +1036,20 @@ var CredentialStoreType = {
|
|
|
1004
1036
|
};
|
|
1005
1037
|
|
|
1006
1038
|
// src/validation/schemas.ts
|
|
1039
|
+
var {
|
|
1040
|
+
AGENT_EXECUTION_TRANSFER_COUNT_MAX,
|
|
1041
|
+
AGENT_EXECUTION_TRANSFER_COUNT_MIN,
|
|
1042
|
+
CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT,
|
|
1043
|
+
STATUS_UPDATE_MAX_INTERVAL_SECONDS,
|
|
1044
|
+
STATUS_UPDATE_MAX_NUM_EVENTS,
|
|
1045
|
+
SUB_AGENT_TURN_GENERATION_STEPS_MAX,
|
|
1046
|
+
SUB_AGENT_TURN_GENERATION_STEPS_MIN,
|
|
1047
|
+
VALIDATION_AGENT_PROMPT_MAX_CHARS,
|
|
1048
|
+
VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS
|
|
1049
|
+
} = schemaValidationDefaults;
|
|
1007
1050
|
var StopWhenSchema = zodOpenapi.z.object({
|
|
1008
|
-
transferCountIs: zodOpenapi.z.number().min(
|
|
1009
|
-
stepCountIs: zodOpenapi.z.number().min(
|
|
1051
|
+
transferCountIs: zodOpenapi.z.number().min(AGENT_EXECUTION_TRANSFER_COUNT_MIN).max(AGENT_EXECUTION_TRANSFER_COUNT_MAX).optional().describe("The maximum number of transfers to trigger the stop condition."),
|
|
1052
|
+
stepCountIs: zodOpenapi.z.number().min(SUB_AGENT_TURN_GENERATION_STEPS_MIN).max(SUB_AGENT_TURN_GENERATION_STEPS_MAX).optional().describe("The maximum number of steps to trigger the stop condition.")
|
|
1010
1053
|
}).openapi("StopWhen");
|
|
1011
1054
|
var AgentStopWhenSchema = StopWhenSchema.pick({ transferCountIs: true }).openapi(
|
|
1012
1055
|
"AgentStopWhen"
|
|
@@ -1485,7 +1528,7 @@ var FetchConfigSchema = zodOpenapi.z.object({
|
|
|
1485
1528
|
body: zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.unknown()).optional(),
|
|
1486
1529
|
transform: zodOpenapi.z.string().optional(),
|
|
1487
1530
|
// JSONPath or JS transform function
|
|
1488
|
-
timeout: zodOpenapi.z.number().min(0).optional().default(
|
|
1531
|
+
timeout: zodOpenapi.z.number().min(0).optional().default(CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT).optional()
|
|
1489
1532
|
}).openapi("FetchConfig");
|
|
1490
1533
|
var FetchDefinitionSchema = zodOpenapi.z.object({
|
|
1491
1534
|
id: zodOpenapi.z.string().min(1, "Fetch definition ID is required"),
|
|
@@ -1604,9 +1647,12 @@ var StatusComponentSchema = zodOpenapi.z.object({
|
|
|
1604
1647
|
}).openapi("StatusComponent");
|
|
1605
1648
|
var StatusUpdateSchema = zodOpenapi.z.object({
|
|
1606
1649
|
enabled: zodOpenapi.z.boolean().optional(),
|
|
1607
|
-
numEvents: zodOpenapi.z.number().min(1).max(
|
|
1608
|
-
timeInSeconds: zodOpenapi.z.number().min(1).max(
|
|
1609
|
-
prompt: zodOpenapi.z.string().max(
|
|
1650
|
+
numEvents: zodOpenapi.z.number().min(1).max(STATUS_UPDATE_MAX_NUM_EVENTS).optional(),
|
|
1651
|
+
timeInSeconds: zodOpenapi.z.number().min(1).max(STATUS_UPDATE_MAX_INTERVAL_SECONDS).optional(),
|
|
1652
|
+
prompt: zodOpenapi.z.string().max(
|
|
1653
|
+
VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS,
|
|
1654
|
+
`Custom prompt cannot exceed ${VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS} characters`
|
|
1655
|
+
).optional(),
|
|
1610
1656
|
statusComponents: zodOpenapi.z.array(StatusComponentSchema).optional()
|
|
1611
1657
|
}).openapi("StatusUpdate");
|
|
1612
1658
|
var CanUseItemSchema = zodOpenapi.z.object({
|
|
@@ -1665,7 +1711,10 @@ var AgentWithinContextOfProjectSchema = AgentApiInsertSchema.extend({
|
|
|
1665
1711
|
statusUpdates: zodOpenapi.z.optional(StatusUpdateSchema),
|
|
1666
1712
|
models: ModelSchema.optional(),
|
|
1667
1713
|
stopWhen: AgentStopWhenSchema.optional(),
|
|
1668
|
-
prompt: zodOpenapi.z.string().max(
|
|
1714
|
+
prompt: zodOpenapi.z.string().max(
|
|
1715
|
+
VALIDATION_AGENT_PROMPT_MAX_CHARS,
|
|
1716
|
+
`Agent prompt cannot exceed ${VALIDATION_AGENT_PROMPT_MAX_CHARS} characters`
|
|
1717
|
+
).optional()
|
|
1669
1718
|
});
|
|
1670
1719
|
var PaginationSchema = zodOpenapi.z.object({
|
|
1671
1720
|
page: zodOpenapi.z.coerce.number().min(1).default(1),
|
package/dist/validation/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A2AMessageMetadataSchema, DataComponentStreamEventSchema, DataOperationDetailsSchema, DataOperationEventSchema, DataOperationStreamEventSchema, DataSummaryStreamEventSchema, DelegationReturnedDataSchema, DelegationSentDataSchema, StreamErrorEventSchema, StreamEventSchema, StreamFinishEventSchema, TextDeltaEventSchema, TextEndEventSchema, TextStartEventSchema, TransferDataSchema, generateIdFromName, isValidResourceId, validateAgentRelationships, validateAgentStructure, validateAndTypeAgentData, validateArtifactComponentReferences, validateDataComponentReferences, validateRender, validateSubAgentExternalAgentRelations, validateToolReferences } from '../chunk-
|
|
2
|
-
export { AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentInsertSchema, AgentListResponse, AgentResponse, AgentSelectSchema, AgentStopWhenSchema, AgentUpdateSchema, AgentWithinContextOfProjectSchema, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeyListResponse, ApiKeyResponse, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentInsertSchema, ArtifactComponentListResponse, ArtifactComponentResponse, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ComponentAssociationSchema, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigInsertSchema, ContextConfigListResponse, ContextConfigResponse, ContextConfigSelectSchema, ContextConfigUpdateSchema, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationListResponse, ConversationResponse, ConversationSelectSchema, ConversationUpdateSchema, CreateCredentialInStoreRequestSchema, CreateCredentialInStoreResponseSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceListResponse, CredentialReferenceResponse, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, CredentialStoreListResponseSchema, CredentialStoreSchema, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentBaseSchema, DataComponentInsertSchema, DataComponentListResponse, DataComponentResponse, DataComponentSelectSchema, DataComponentUpdateSchema, ErrorResponseSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentListResponse, ExternalAgentResponse, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FetchConfigSchema, FetchDefinitionSchema, FullAgentAgentInsertSchema, FullProjectDefinitionSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, FunctionInsertSchema, FunctionListResponse, FunctionResponse, FunctionSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiSelectSchema, FunctionToolApiUpdateSchema, FunctionToolConfigSchema, FunctionToolInsertSchema, FunctionToolListResponse, FunctionToolResponse, FunctionToolSelectSchema, FunctionToolUpdateSchema, FunctionUpdateSchema, HeadersScopeSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiUpdateSchema, LedgerArtifactInsertSchema, LedgerArtifactSelectSchema, LedgerArtifactUpdateSchema, ListResponseSchema, MAX_ID_LENGTH, MCPToolConfigSchema, MIN_ID_LENGTH, McpToolDefinitionSchema, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageListResponse, MessageResponse, MessageSelectSchema, MessageUpdateSchema, ModelSchema, ModelSettingsSchema, OAuthCallbackQuerySchema, OAuthLoginQuerySchema, PaginationQueryParamsSchema, PaginationSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectListResponse, ProjectModelSchema, ProjectResponse, ProjectSelectSchema, ProjectUpdateSchema, RelatedAgentInfoSchema, RemovedResponseSchema, SingleResponseSchema, StatusComponentSchema, StatusUpdateSchema, StopWhenSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiUpdateSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentListResponse, SubAgentArtifactComponentResponse, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentUpdateSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiUpdateSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentListResponse, SubAgentDataComponentResponse, SubAgentDataComponentSelectSchema, SubAgentDataComponentUpdateSchema, SubAgentExternalAgentRelationApiInsertSchema, SubAgentExternalAgentRelationApiSelectSchema, SubAgentExternalAgentRelationApiUpdateSchema, SubAgentExternalAgentRelationInsertSchema, SubAgentExternalAgentRelationSelectSchema, SubAgentExternalAgentRelationUpdateSchema, SubAgentInsertSchema, SubAgentListResponse, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationListResponse, SubAgentRelationQuerySchema, SubAgentRelationResponse, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentResponse, SubAgentSelectSchema, SubAgentStopWhenSchema, SubAgentTeamAgentRelationApiInsertSchema, SubAgentTeamAgentRelationApiSelectSchema, SubAgentTeamAgentRelationApiUpdateSchema, SubAgentTeamAgentRelationInsertSchema, SubAgentTeamAgentRelationSelectSchema, SubAgentTeamAgentRelationUpdateSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiUpdateSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationListResponse, SubAgentToolRelationResponse, SubAgentToolRelationSelectSchema, SubAgentToolRelationUpdateSchema, SubAgentUpdateSchema, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, TeamAgentSchema, TenantIdParamsSchema, TenantParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolListResponse, ToolResponse, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, URL_SAFE_ID_PATTERN, canDelegateToExternalAgentSchema, canDelegateToTeamAgentSchema, resourceIdSchema, validatePropsAsJsonSchema } from '../chunk-
|
|
1
|
+
export { A2AMessageMetadataSchema, DataComponentStreamEventSchema, DataOperationDetailsSchema, DataOperationEventSchema, DataOperationStreamEventSchema, DataSummaryStreamEventSchema, DelegationReturnedDataSchema, DelegationSentDataSchema, StreamErrorEventSchema, StreamEventSchema, StreamFinishEventSchema, TextDeltaEventSchema, TextEndEventSchema, TextStartEventSchema, TransferDataSchema, generateIdFromName, isValidResourceId, validateAgentRelationships, validateAgentStructure, validateAndTypeAgentData, validateArtifactComponentReferences, validateDataComponentReferences, validateRender, validateSubAgentExternalAgentRelations, validateToolReferences } from '../chunk-DCMDYQKE.js';
|
|
2
|
+
export { AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentInsertSchema, AgentListResponse, AgentResponse, AgentSelectSchema, AgentStopWhenSchema, AgentUpdateSchema, AgentWithinContextOfProjectSchema, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeyListResponse, ApiKeyResponse, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentInsertSchema, ArtifactComponentListResponse, ArtifactComponentResponse, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ComponentAssociationSchema, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigInsertSchema, ContextConfigListResponse, ContextConfigResponse, ContextConfigSelectSchema, ContextConfigUpdateSchema, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationListResponse, ConversationResponse, ConversationSelectSchema, ConversationUpdateSchema, CreateCredentialInStoreRequestSchema, CreateCredentialInStoreResponseSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceListResponse, CredentialReferenceResponse, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, CredentialStoreListResponseSchema, CredentialStoreSchema, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentBaseSchema, DataComponentInsertSchema, DataComponentListResponse, DataComponentResponse, DataComponentSelectSchema, DataComponentUpdateSchema, ErrorResponseSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentListResponse, ExternalAgentResponse, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FetchConfigSchema, FetchDefinitionSchema, FullAgentAgentInsertSchema, FullProjectDefinitionSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, FunctionInsertSchema, FunctionListResponse, FunctionResponse, FunctionSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiSelectSchema, FunctionToolApiUpdateSchema, FunctionToolConfigSchema, FunctionToolInsertSchema, FunctionToolListResponse, FunctionToolResponse, FunctionToolSelectSchema, FunctionToolUpdateSchema, FunctionUpdateSchema, HeadersScopeSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiUpdateSchema, LedgerArtifactInsertSchema, LedgerArtifactSelectSchema, LedgerArtifactUpdateSchema, ListResponseSchema, MAX_ID_LENGTH, MCPToolConfigSchema, MIN_ID_LENGTH, McpToolDefinitionSchema, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageListResponse, MessageResponse, MessageSelectSchema, MessageUpdateSchema, ModelSchema, ModelSettingsSchema, OAuthCallbackQuerySchema, OAuthLoginQuerySchema, PaginationQueryParamsSchema, PaginationSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectListResponse, ProjectModelSchema, ProjectResponse, ProjectSelectSchema, ProjectUpdateSchema, RelatedAgentInfoSchema, RemovedResponseSchema, SingleResponseSchema, StatusComponentSchema, StatusUpdateSchema, StopWhenSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiUpdateSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentListResponse, SubAgentArtifactComponentResponse, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentUpdateSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiUpdateSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentListResponse, SubAgentDataComponentResponse, SubAgentDataComponentSelectSchema, SubAgentDataComponentUpdateSchema, SubAgentExternalAgentRelationApiInsertSchema, SubAgentExternalAgentRelationApiSelectSchema, SubAgentExternalAgentRelationApiUpdateSchema, SubAgentExternalAgentRelationInsertSchema, SubAgentExternalAgentRelationSelectSchema, SubAgentExternalAgentRelationUpdateSchema, SubAgentInsertSchema, SubAgentListResponse, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationListResponse, SubAgentRelationQuerySchema, SubAgentRelationResponse, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentResponse, SubAgentSelectSchema, SubAgentStopWhenSchema, SubAgentTeamAgentRelationApiInsertSchema, SubAgentTeamAgentRelationApiSelectSchema, SubAgentTeamAgentRelationApiUpdateSchema, SubAgentTeamAgentRelationInsertSchema, SubAgentTeamAgentRelationSelectSchema, SubAgentTeamAgentRelationUpdateSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiUpdateSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationListResponse, SubAgentToolRelationResponse, SubAgentToolRelationSelectSchema, SubAgentToolRelationUpdateSchema, SubAgentUpdateSchema, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, TeamAgentSchema, TenantIdParamsSchema, TenantParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolListResponse, ToolResponse, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, URL_SAFE_ID_PATTERN, canDelegateToExternalAgentSchema, canDelegateToTeamAgentSchema, resourceIdSchema, validatePropsAsJsonSchema } from '../chunk-SLRVWIQY.js';
|