@inkeep/agents-core 0.0.0-dev-20251124223719 → 0.0.0-dev-20251124234228
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/auth/auth.d.ts +3 -3
- package/dist/auth/auth.js +4 -3
- package/dist/{auth-detection-CGqhPDnj.d.ts → auth-detection-7G0Dxt55.d.ts} +11 -0
- package/dist/{chunk-32YRH2S7.js → chunk-6XW4J5LI.js} +1 -1
- package/dist/{chunk-SLQW43IV.js → chunk-ATWIYWOU.js} +1 -1
- package/dist/chunk-CMNLBV2A.js +39 -0
- package/dist/{chunk-ICZLNCX7.js → chunk-K3UNCRSA.js} +330 -40
- package/dist/{chunk-SG75RA63.js → chunk-K54FZSDH.js} +1 -1
- package/dist/{chunk-TGESM3JG.js → chunk-MQMMFK2K.js} +14 -3
- package/dist/{chunk-VQXQOGJU.js → chunk-N7TIJHWC.js} +6 -6
- package/dist/{chunk-Q5U2SVA6.js → chunk-NMBNWFIZ.js} +4 -1
- package/dist/{chunk-NFYCSHD3.js → chunk-OHZDHXP7.js} +1 -0
- package/dist/{client-CnpNkGsH.d.ts → client-B_3j-V4-.d.ts} +1 -1
- package/dist/client-exports.d.ts +6 -3
- package/dist/client-exports.js +3 -3
- package/dist/constants/schema-validation/index.js +1 -1
- package/dist/credential-stores/index.d.ts +3 -3
- package/dist/db/schema.d.ts +2 -2
- package/dist/db/schema.js +1 -1
- package/dist/db/test-client.d.ts +3 -3
- package/dist/db/test-client.js +1 -1
- package/dist/index.d.ts +126 -9
- package/dist/index.js +275 -57
- package/dist/{schema-Cgkp_geg.d.ts → schema-DKbG39on.d.ts} +24 -1
- package/dist/server-BXoUiBMg.d.ts +127 -0
- package/dist/types/index.d.ts +33 -113
- package/dist/types/index.js +1 -1
- package/dist/{utility-C_tTZ7-k.d.ts → utility-Lo5NoRHK.d.ts} +141 -11
- package/dist/validation/index.d.ts +2 -2
- package/dist/validation/index.js +2 -2
- package/drizzle/{0001_fair_malice.sql → 0001_calm_sheva_callister.sql} +1 -16
- package/drizzle/meta/0001_snapshot.json +7 -1
- package/drizzle/meta/_journal.json +2 -2
- package/package.json +7 -1
- package/dist/chunk-H2F72PDA.js +0 -15
package/dist/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export { cleanupTestDatabase, closeTestDatabase, createTestDatabaseClient, createTestOrganization, createTestProject } from './chunk-
|
|
2
|
-
import { validateRender, validateAndTypeAgentData, validateAgentStructure } from './chunk-
|
|
3
|
-
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-
|
|
4
|
-
export { AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT, AGENT_EXECUTION_TRANSFER_COUNT_MAX, AGENT_EXECUTION_TRANSFER_COUNT_MIN, CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT, 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, VALIDATION_AGENT_PROMPT_MAX_CHARS, VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS } from './chunk-
|
|
5
|
-
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 } from './chunk-
|
|
6
|
-
import { ContextConfigApiUpdateSchema, validatePropsAsJsonSchema } from './chunk-
|
|
7
|
-
export { AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentInsertSchema, AgentListResponse, AgentResponse, AgentSelectSchema, AgentStopWhenSchema, AgentUpdateSchema, AgentWithinContextOfProjectResponse, AgentWithinContextOfProjectSchema, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeyListResponse, ApiKeyResponse, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentArrayResponse, ArtifactComponentInsertSchema, ArtifactComponentListResponse, ArtifactComponentResponse, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ComponentAssociationListResponse, 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, DataComponentArrayResponse, DataComponentBaseSchema, DataComponentInsertSchema, DataComponentListResponse, DataComponentResponse, DataComponentSelectSchema, DataComponentUpdateSchema, ErrorResponseSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentListResponse, ExternalAgentResponse, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FetchConfigSchema, FetchDefinitionSchema, FullAgentAgentInsertSchema, FullProjectDefinitionResponse, 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, MCPCatalogListResponse, MCPToolConfigSchema, MIN_ID_LENGTH, McpToolDefinitionSchema, McpToolListResponse, McpToolResponse, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageListResponse, MessageResponse, MessageSelectSchema, MessageUpdateSchema, ModelSchema, ModelSettingsSchema, OAuthCallbackQuerySchema, OAuthLoginQuerySchema, PaginationQueryParamsSchema, PaginationSchema, PrebuiltMCPServerSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectListResponse, ProjectModelSchema, ProjectResponse, ProjectSelectSchema, ProjectUpdateSchema, RelatedAgentInfoListResponse, 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, SubAgentExternalAgentRelationListResponse, SubAgentExternalAgentRelationResponse, SubAgentExternalAgentRelationSelectSchema, SubAgentExternalAgentRelationUpdateSchema, SubAgentInsertSchema, SubAgentListResponse, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationListResponse, SubAgentRelationQuerySchema, SubAgentRelationResponse, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentResponse, SubAgentSelectSchema, SubAgentStopWhenSchema, SubAgentTeamAgentRelationApiInsertSchema, SubAgentTeamAgentRelationApiSelectSchema, SubAgentTeamAgentRelationApiUpdateSchema, SubAgentTeamAgentRelationInsertSchema, SubAgentTeamAgentRelationListResponse, SubAgentTeamAgentRelationResponse, 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, ThirdPartyMCPServerResponse, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolListResponse, ToolResponse, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, URL_SAFE_ID_PATTERN, canDelegateToExternalAgentSchema, canDelegateToTeamAgentSchema, resourceIdSchema, validatePropsAsJsonSchema } from './chunk-
|
|
8
|
-
import { schema_exports, contextConfigs, externalAgents, functions, functionTools, subAgentFunctionToolRelations, subAgentExternalAgentRelations, subAgents, subAgentRelations, subAgentToolRelations, tools,
|
|
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-
|
|
1
|
+
export { cleanupTestDatabase, closeTestDatabase, createTestDatabaseClient, createTestOrganization, createTestProject } from './chunk-K54FZSDH.js';
|
|
2
|
+
import { validateRender, validateAndTypeAgentData, validateAgentStructure } from './chunk-6XW4J5LI.js';
|
|
3
|
+
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-6XW4J5LI.js';
|
|
4
|
+
export { AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT, AGENT_EXECUTION_TRANSFER_COUNT_MAX, AGENT_EXECUTION_TRANSFER_COUNT_MIN, CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT, 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, VALIDATION_AGENT_PROMPT_MAX_CHARS, VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS } from './chunk-ATWIYWOU.js';
|
|
5
|
+
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 } from './chunk-MQMMFK2K.js';
|
|
6
|
+
import { ContextConfigApiUpdateSchema, validatePropsAsJsonSchema } from './chunk-N7TIJHWC.js';
|
|
7
|
+
export { AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentInsertSchema, AgentListResponse, AgentResponse, AgentSelectSchema, AgentStopWhenSchema, AgentUpdateSchema, AgentWithinContextOfProjectResponse, AgentWithinContextOfProjectSchema, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeyListResponse, ApiKeyResponse, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentArrayResponse, ArtifactComponentInsertSchema, ArtifactComponentListResponse, ArtifactComponentResponse, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ComponentAssociationListResponse, 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, DataComponentArrayResponse, DataComponentBaseSchema, DataComponentInsertSchema, DataComponentListResponse, DataComponentResponse, DataComponentSelectSchema, DataComponentUpdateSchema, ErrorResponseSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentListResponse, ExternalAgentResponse, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FetchConfigSchema, FetchDefinitionSchema, FullAgentAgentInsertSchema, FullProjectDefinitionResponse, 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, MCPCatalogListResponse, MCPToolConfigSchema, MIN_ID_LENGTH, McpToolDefinitionSchema, McpToolListResponse, McpToolResponse, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageListResponse, MessageResponse, MessageSelectSchema, MessageUpdateSchema, ModelSchema, ModelSettingsSchema, OAuthCallbackQuerySchema, OAuthLoginQuerySchema, PaginationQueryParamsSchema, PaginationSchema, PrebuiltMCPServerSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectListResponse, ProjectModelSchema, ProjectResponse, ProjectSelectSchema, ProjectUpdateSchema, RelatedAgentInfoListResponse, 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, SubAgentExternalAgentRelationListResponse, SubAgentExternalAgentRelationResponse, SubAgentExternalAgentRelationSelectSchema, SubAgentExternalAgentRelationUpdateSchema, SubAgentInsertSchema, SubAgentListResponse, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationListResponse, SubAgentRelationQuerySchema, SubAgentRelationResponse, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentResponse, SubAgentSelectSchema, SubAgentStopWhenSchema, SubAgentTeamAgentRelationApiInsertSchema, SubAgentTeamAgentRelationApiSelectSchema, SubAgentTeamAgentRelationApiUpdateSchema, SubAgentTeamAgentRelationInsertSchema, SubAgentTeamAgentRelationListResponse, SubAgentTeamAgentRelationResponse, 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, ThirdPartyMCPServerResponse, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolListResponse, ToolResponse, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, URL_SAFE_ID_PATTERN, canDelegateToExternalAgentSchema, canDelegateToTeamAgentSchema, resourceIdSchema, validatePropsAsJsonSchema } from './chunk-N7TIJHWC.js';
|
|
8
|
+
import { schema_exports, contextConfigs, externalAgents, functions, functionTools, subAgentFunctionToolRelations, subAgentExternalAgentRelations, subAgents, subAgentRelations, subAgentToolRelations, tools, agents, subAgentTeamAgentRelations, credentialReferences, subAgentDataComponents, subAgentArtifactComponents, dataComponents, artifactComponents, projects, apiKeys, contextCache, conversations, messages, ledgerArtifacts, tasks, taskRelations } from './chunk-OHZDHXP7.js';
|
|
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-OHZDHXP7.js';
|
|
10
10
|
export { schemaValidationDefaults } from './chunk-Z64UK4CA.js';
|
|
11
|
-
import { getTracer, getCredentialStoreLookupKeyFromRetrievalParams, generateId,
|
|
12
|
-
export { CONVERSATION_HISTORY_DEFAULT_LIMIT, CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT, ERROR_DOCS_BASE_URL, ErrorCode, 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, commonCreateErrorResponses, commonDeleteErrorResponses, commonGetErrorResponses, commonUpdateErrorResponses, createApiError, createExecutionContext, errorResponseSchema, errorSchemaFactory, executionLimitsSharedDefaults, extractComposioServerId, extractPublicId, fetchComposioServers, fetchSingleComposioServer, generateApiKey, generateId, generateServiceToken, getConversationId, getCredentialStoreLookupKeyFromRetrievalParams, getRequestExecutionContext, getTracer, handleApiError, hashApiKey, isApiKeyExpired, isComposioMCPServerAuthenticated, isThirdPartyMCPServerAuthenticated, maskApiKey, normalizeDateString, problemDetailsSchema, setSpanWithError, signTempToken, validateApiKey, validateTargetAgent, validateTenantId, verifyAuthorizationHeader, verifyServiceToken, verifyTempToken } from './chunk-
|
|
11
|
+
import { getTracer, getCredentialStoreLookupKeyFromRetrievalParams, generateId, toISODateString, isThirdPartyMCPServerAuthenticated, createApiError, generateApiKey, extractPublicId, validateApiKey, isApiKeyExpired, getConversationId, setSpanWithError, getRequestExecutionContext, McpClient } from './chunk-K3UNCRSA.js';
|
|
12
|
+
export { CONVERSATION_HISTORY_DEFAULT_LIMIT, CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT, ERROR_DOCS_BASE_URL, ErrorCode, 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, ModelFactory, commonCreateErrorResponses, commonDeleteErrorResponses, commonGetErrorResponses, commonUpdateErrorResponses, createApiError, createExecutionContext, errorResponseSchema, errorSchemaFactory, executionLimitsSharedDefaults, extractComposioServerId, extractPublicId, fetchComposioServers, fetchSingleComposioServer, formatMessagesForLLM, formatMessagesForLLMContext, generateApiKey, generateId, generateServiceToken, getConversationId, getCredentialStoreLookupKeyFromRetrievalParams, getRequestExecutionContext, getTracer, handleApiError, hashApiKey, isApiKeyExpired, isComposioMCPServerAuthenticated, isThirdPartyMCPServerAuthenticated, maskApiKey, normalizeDateString, problemDetailsSchema, setSpanWithError, signTempToken, toISODateString, validateApiKey, validateTargetAgent, validateTenantId, verifyAuthorizationHeader, verifyServiceToken, verifyTempToken } from './chunk-K3UNCRSA.js';
|
|
13
13
|
import { convertZodToJsonSchema } from './chunk-SSRRHYU4.js';
|
|
14
14
|
export { convertZodToJsonSchema, convertZodToJsonSchemaWithPreview, extractPreviewFields, isZodSchema, preview } from './chunk-SSRRHYU4.js';
|
|
15
|
-
import { loadEnvironmentFiles, env } from './chunk-
|
|
16
|
-
export { loadEnvironmentFiles } from './chunk-
|
|
15
|
+
import { loadEnvironmentFiles, env } from './chunk-NMBNWFIZ.js';
|
|
16
|
+
export { loadEnvironmentFiles } from './chunk-NMBNWFIZ.js';
|
|
17
17
|
import { detectAuthenticationRequired } from './chunk-4JZT4QEE.js';
|
|
18
18
|
export { detectAuthenticationRequired, exchangeMcpAuthorizationCode, initiateMcpOAuthFlow } from './chunk-4JZT4QEE.js';
|
|
19
19
|
import { organization, member, invitation, user } from './chunk-NOPEANIU.js';
|
|
@@ -22,7 +22,7 @@ export { ANTHROPIC_MODELS, GOOGLE_MODELS, OPENAI_MODELS } from './chunk-7CLFCY6J
|
|
|
22
22
|
export { CredentialStoreRegistry, InMemoryCredentialStore, KeyChainStore, NangoCredentialStore, createDefaultCredentialStores, createKeyChainStore, createNangoCredentialStore } from './chunk-MB2ZIPZS.js';
|
|
23
23
|
import { getLogger } from './chunk-DN4B564Y.js';
|
|
24
24
|
export { PinoLogger, getLogger, loggerFactory } from './chunk-DN4B564Y.js';
|
|
25
|
-
export { TaskState } from './chunk-
|
|
25
|
+
export { TaskState, normalizeToolSelections } from './chunk-CMNLBV2A.js';
|
|
26
26
|
import { CredentialStoreType, MCPServerType, MCPTransportType } from './chunk-YFHT5M2R.js';
|
|
27
27
|
export { CredentialStoreType, MCPServerType, MCPTransportType, TOOL_STATUS_VALUES, VALID_RELATION_TYPES } from './chunk-YFHT5M2R.js';
|
|
28
28
|
import { external_exports } from './chunk-OUXC23J7.js';
|
|
@@ -2492,7 +2492,7 @@ var require_typescript = __commonJS({
|
|
|
2492
2492
|
affectsEmitOptionDeclarations: () => affectsEmitOptionDeclarations,
|
|
2493
2493
|
allKeysStartWithDot: () => allKeysStartWithDot,
|
|
2494
2494
|
altDirectorySeparator: () => altDirectorySeparator,
|
|
2495
|
-
and: () =>
|
|
2495
|
+
and: () => and23,
|
|
2496
2496
|
append: () => append,
|
|
2497
2497
|
appendIfUnique: () => appendIfUnique,
|
|
2498
2498
|
arrayFrom: () => arrayFrom,
|
|
@@ -5943,7 +5943,7 @@ var require_typescript = __commonJS({
|
|
|
5943
5943
|
function isPatternMatch({ prefix, suffix }, candidate) {
|
|
5944
5944
|
return candidate.length >= prefix.length + suffix.length && startsWith(candidate, prefix) && endsWith(candidate, suffix);
|
|
5945
5945
|
}
|
|
5946
|
-
function
|
|
5946
|
+
function and23(f, g) {
|
|
5947
5947
|
return (arg) => f(arg) && g(arg);
|
|
5948
5948
|
}
|
|
5949
5949
|
function or(...fs) {
|
|
@@ -56938,7 +56938,7 @@ ${lanes.join("\n")}
|
|
|
56938
56938
|
SignatureCheckMode3[SignatureCheckMode3["Callback"] = 3] = "Callback";
|
|
56939
56939
|
return SignatureCheckMode3;
|
|
56940
56940
|
})(SignatureCheckMode || {});
|
|
56941
|
-
var isNotOverloadAndNotAccessor =
|
|
56941
|
+
var isNotOverloadAndNotAccessor = and23(isNotOverload, isNotAccessor);
|
|
56942
56942
|
var intrinsicTypeKinds = new Map(Object.entries({
|
|
56943
56943
|
Uppercase: 0,
|
|
56944
56944
|
Lowercase: 1,
|
|
@@ -99749,7 +99749,7 @@ ${lanes.join("\n")}
|
|
|
99749
99749
|
if (flags & (1920 | 384)) {
|
|
99750
99750
|
return;
|
|
99751
99751
|
}
|
|
99752
|
-
const exportedDeclarationsCount = countWhere(declarations,
|
|
99752
|
+
const exportedDeclarationsCount = countWhere(declarations, and23(isNotOverloadAndNotAccessor, not2(isInterfaceDeclaration)));
|
|
99753
99753
|
if (flags & 524288 && exportedDeclarationsCount <= 2) {
|
|
99754
99754
|
return;
|
|
99755
99755
|
}
|
|
@@ -170537,7 +170537,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
170537
170537
|
const maybeHeritageClauseSymbol = getHeritageClauseSymbolTable(classDeclaration, checker);
|
|
170538
170538
|
const implementedType = checker.getTypeAtLocation(implementedTypeNode);
|
|
170539
170539
|
const implementedTypeSymbols = checker.getPropertiesOfType(implementedType);
|
|
170540
|
-
const nonPrivateAndNotExistedInHeritageClauseMembers = implementedTypeSymbols.filter(
|
|
170540
|
+
const nonPrivateAndNotExistedInHeritageClauseMembers = implementedTypeSymbols.filter(and23(symbolPointsToNonPrivateMember, (symbol) => !maybeHeritageClauseSymbol.has(symbol.escapedName)));
|
|
170541
170541
|
const classType = checker.getTypeAtLocation(classDeclaration);
|
|
170542
170542
|
const constructor = find(classDeclaration.members, (m) => isConstructorDeclaration(m));
|
|
170543
170543
|
if (!classType.getNumberIndexType()) {
|
|
@@ -185194,8 +185194,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
185194
185194
|
function isAmbientModuleDeclaration(node) {
|
|
185195
185195
|
return node.kind === 268 && node.name.kind === 11;
|
|
185196
185196
|
}
|
|
185197
|
-
function isExternalModuleImportEquals(
|
|
185198
|
-
return
|
|
185197
|
+
function isExternalModuleImportEquals(eq24) {
|
|
185198
|
+
return eq24.moduleReference.kind === 284 && eq24.moduleReference.expression.kind === 11;
|
|
185199
185199
|
}
|
|
185200
185200
|
var DefinitionKind = /* @__PURE__ */ ((DefinitionKind2) => {
|
|
185201
185201
|
DefinitionKind2[DefinitionKind2["Symbol"] = 0] = "Symbol";
|
|
@@ -197827,7 +197827,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
197827
197827
|
affectsEmitOptionDeclarations: () => affectsEmitOptionDeclarations,
|
|
197828
197828
|
allKeysStartWithDot: () => allKeysStartWithDot,
|
|
197829
197829
|
altDirectorySeparator: () => altDirectorySeparator,
|
|
197830
|
-
and: () =>
|
|
197830
|
+
and: () => and23,
|
|
197831
197831
|
append: () => append,
|
|
197832
197832
|
appendIfUnique: () => appendIfUnique,
|
|
197833
197833
|
arrayFrom: () => arrayFrom,
|
|
@@ -214716,7 +214716,8 @@ var createAgentToolRelation = (db) => async (params) => {
|
|
|
214716
214716
|
subAgentId: params.data.subAgentId,
|
|
214717
214717
|
toolId: params.data.toolId,
|
|
214718
214718
|
selectedTools: params.data.selectedTools,
|
|
214719
|
-
headers: params.data.headers
|
|
214719
|
+
headers: params.data.headers,
|
|
214720
|
+
toolPolicies: params.data.toolPolicies
|
|
214720
214721
|
}).returning();
|
|
214721
214722
|
return relation[0];
|
|
214722
214723
|
};
|
|
@@ -214862,6 +214863,7 @@ var getToolsForAgent = (db) => async (params) => {
|
|
|
214862
214863
|
toolId: subAgentToolRelations.toolId,
|
|
214863
214864
|
selectedTools: subAgentToolRelations.selectedTools,
|
|
214864
214865
|
headers: subAgentToolRelations.headers,
|
|
214866
|
+
toolPolicies: subAgentToolRelations.toolPolicies,
|
|
214865
214867
|
createdAt: subAgentToolRelations.createdAt,
|
|
214866
214868
|
updatedAt: subAgentToolRelations.updatedAt,
|
|
214867
214869
|
tool: {
|
|
@@ -214922,6 +214924,7 @@ var getAgentsForTool = (db) => async (params) => {
|
|
|
214922
214924
|
toolId: subAgentToolRelations.toolId,
|
|
214923
214925
|
selectedTools: subAgentToolRelations.selectedTools,
|
|
214924
214926
|
headers: subAgentToolRelations.headers,
|
|
214927
|
+
toolPolicies: subAgentToolRelations.toolPolicies,
|
|
214925
214928
|
createdAt: subAgentToolRelations.createdAt,
|
|
214926
214929
|
updatedAt: subAgentToolRelations.updatedAt,
|
|
214927
214930
|
subAgent: {
|
|
@@ -215073,7 +215076,28 @@ var upsertSubAgent = (db) => async (params) => {
|
|
|
215073
215076
|
}
|
|
215074
215077
|
return await createSubAgent(db)(params.data);
|
|
215075
215078
|
};
|
|
215079
|
+
var SubAgentIsDefaultError = class extends Error {
|
|
215080
|
+
constructor(subAgentId, agentId) {
|
|
215081
|
+
super(
|
|
215082
|
+
`Cannot delete sub-agent "${subAgentId}" because it is set as the default sub-agent for agent "${agentId}". Please change the default sub-agent before deleting.`
|
|
215083
|
+
);
|
|
215084
|
+
this.subAgentId = subAgentId;
|
|
215085
|
+
this.agentId = agentId;
|
|
215086
|
+
this.name = "SubAgentIsDefaultError";
|
|
215087
|
+
}
|
|
215088
|
+
};
|
|
215076
215089
|
var deleteSubAgent = (db) => async (params) => {
|
|
215090
|
+
const agentUsingAsDefault = await db.select().from(agents).where(
|
|
215091
|
+
and(
|
|
215092
|
+
eq(agents.tenantId, params.scopes.tenantId),
|
|
215093
|
+
eq(agents.projectId, params.scopes.projectId),
|
|
215094
|
+
eq(agents.id, params.scopes.agentId),
|
|
215095
|
+
eq(agents.defaultSubAgentId, params.subAgentId)
|
|
215096
|
+
)
|
|
215097
|
+
).limit(1);
|
|
215098
|
+
if (agentUsingAsDefault.length > 0) {
|
|
215099
|
+
throw new SubAgentIsDefaultError(params.subAgentId, params.scopes.agentId);
|
|
215100
|
+
}
|
|
215077
215101
|
await db.delete(subAgents).where(
|
|
215078
215102
|
and(
|
|
215079
215103
|
eq(subAgents.tenantId, params.scopes.tenantId),
|
|
@@ -215660,8 +215684,8 @@ var dbResultToMcpTool = async (dbResult, dbClient, credentialStoreRegistry, rela
|
|
|
215660
215684
|
availableTools: [],
|
|
215661
215685
|
capabilities: capabilities || void 0,
|
|
215662
215686
|
credentialReferenceId: credentialReferenceId || void 0,
|
|
215663
|
-
createdAt:
|
|
215664
|
-
updatedAt:
|
|
215687
|
+
createdAt: toISODateString(createdAt),
|
|
215688
|
+
updatedAt: toISODateString(dbResult.updatedAt),
|
|
215665
215689
|
lastError: null,
|
|
215666
215690
|
headers: headers2 || void 0,
|
|
215667
215691
|
imageUrl: imageUrl || void 0,
|
|
@@ -215690,12 +215714,12 @@ var dbResultToMcpTool = async (dbResult, dbClient, credentialStoreRegistry, rela
|
|
|
215690
215714
|
if (credentialStore.type === CredentialStoreType.nango) {
|
|
215691
215715
|
const nangoCredentialData = JSON.parse(credentialDataString);
|
|
215692
215716
|
if (nangoCredentialData.expiresAt) {
|
|
215693
|
-
expiresAt = nangoCredentialData.expiresAt;
|
|
215717
|
+
expiresAt = toISODateString(nangoCredentialData.expiresAt);
|
|
215694
215718
|
}
|
|
215695
215719
|
} else if (credentialStore.type === CredentialStoreType.keychain) {
|
|
215696
215720
|
const oauthTokens = JSON.parse(credentialDataString);
|
|
215697
215721
|
if (oauthTokens.expires_at) {
|
|
215698
|
-
expiresAt =
|
|
215722
|
+
expiresAt = toISODateString(oauthTokens.expires_at);
|
|
215699
215723
|
}
|
|
215700
215724
|
}
|
|
215701
215725
|
}
|
|
@@ -215745,8 +215769,8 @@ var dbResultToMcpTool = async (dbResult, dbClient, credentialStoreRegistry, rela
|
|
|
215745
215769
|
availableTools,
|
|
215746
215770
|
capabilities: capabilities || void 0,
|
|
215747
215771
|
credentialReferenceId: credentialReferenceId || void 0,
|
|
215748
|
-
createdAt:
|
|
215749
|
-
updatedAt:
|
|
215772
|
+
createdAt: toISODateString(createdAt),
|
|
215773
|
+
updatedAt: toISODateString(now),
|
|
215750
215774
|
expiresAt,
|
|
215751
215775
|
lastError: lastErrorComputed,
|
|
215752
215776
|
headers: headers2 || void 0,
|
|
@@ -215828,6 +215852,7 @@ var addToolToAgent = (db) => async (params) => {
|
|
|
215828
215852
|
toolId: params.toolId,
|
|
215829
215853
|
selectedTools: params.selectedTools,
|
|
215830
215854
|
headers: params.headers,
|
|
215855
|
+
toolPolicies: params.toolPolicies,
|
|
215831
215856
|
createdAt: now,
|
|
215832
215857
|
updatedAt: now
|
|
215833
215858
|
}).returning();
|
|
@@ -215854,7 +215879,8 @@ var upsertSubAgentToolRelation = (db) => async (params) => {
|
|
|
215854
215879
|
subAgentId: params.subAgentId,
|
|
215855
215880
|
toolId: params.toolId,
|
|
215856
215881
|
selectedTools: params.selectedTools,
|
|
215857
|
-
headers: params.headers
|
|
215882
|
+
headers: params.headers,
|
|
215883
|
+
toolPolicies: params.toolPolicies
|
|
215858
215884
|
}
|
|
215859
215885
|
});
|
|
215860
215886
|
}
|
|
@@ -216108,6 +216134,7 @@ var getFullAgentDefinition = (db) => async ({
|
|
|
216108
216134
|
imageUrl: tools.imageUrl,
|
|
216109
216135
|
selectedTools: subAgentToolRelations.selectedTools,
|
|
216110
216136
|
headers: subAgentToolRelations.headers,
|
|
216137
|
+
toolPolicies: subAgentToolRelations.toolPolicies,
|
|
216111
216138
|
agentToolRelationId: subAgentToolRelations.id
|
|
216112
216139
|
}).from(subAgentToolRelations).innerJoin(
|
|
216113
216140
|
tools,
|
|
@@ -216171,15 +216198,18 @@ var getFullAgentDefinition = (db) => async ({
|
|
|
216171
216198
|
agentToolRelationId: tool.agentToolRelationId,
|
|
216172
216199
|
toolId: tool.id,
|
|
216173
216200
|
toolSelection: tool.selectedTools || null,
|
|
216174
|
-
headers: tool.headers || null
|
|
216201
|
+
headers: tool.headers || null,
|
|
216202
|
+
toolPolicies: tool.toolPolicies || null
|
|
216175
216203
|
}));
|
|
216176
216204
|
const functionToolCanUse = agentFunctionTools.map((tool) => ({
|
|
216177
216205
|
agentToolRelationId: tool.agentToolRelationId,
|
|
216178
216206
|
toolId: tool.id,
|
|
216179
216207
|
toolSelection: null,
|
|
216180
216208
|
// Function tools don't have tool selection
|
|
216181
|
-
headers: null
|
|
216209
|
+
headers: null,
|
|
216182
216210
|
// Function tools don't have headers
|
|
216211
|
+
toolPolicies: null
|
|
216212
|
+
// Function tools don't have tool policies (yet)
|
|
216183
216213
|
}));
|
|
216184
216214
|
const canUse = [...mcpToolCanUse, ...functionToolCanUse];
|
|
216185
216215
|
return {
|
|
@@ -217255,7 +217285,7 @@ var createFullAgentServerSide = (db, logger10 = defaultLogger) => async (scopes,
|
|
|
217255
217285
|
agentToolPromises.push(
|
|
217256
217286
|
(async () => {
|
|
217257
217287
|
try {
|
|
217258
|
-
const { toolId, toolSelection, headers: headers2, agentToolRelationId } = canUseItem;
|
|
217288
|
+
const { toolId, toolSelection, headers: headers2, toolPolicies, agentToolRelationId } = canUseItem;
|
|
217259
217289
|
const isFunctionTool = typed.functionTools && toolId in typed.functionTools;
|
|
217260
217290
|
logger10.info(
|
|
217261
217291
|
{
|
|
@@ -217287,6 +217317,7 @@ var createFullAgentServerSide = (db, logger10 = defaultLogger) => async (scopes,
|
|
|
217287
217317
|
toolId,
|
|
217288
217318
|
selectedTools: toolSelection || void 0,
|
|
217289
217319
|
headers: headers2 || void 0,
|
|
217320
|
+
toolPolicies: toolPolicies || void 0,
|
|
217290
217321
|
relationId: agentToolRelationId
|
|
217291
217322
|
});
|
|
217292
217323
|
logger10.info(
|
|
@@ -217996,7 +218027,7 @@ var updateFullAgentServerSide = (db, logger10 = defaultLogger) => async (scopes,
|
|
|
217996
218027
|
subAgentToolPromises.push(
|
|
217997
218028
|
(async () => {
|
|
217998
218029
|
try {
|
|
217999
|
-
const { toolId, toolSelection, headers: headers2, agentToolRelationId } = canUseItem;
|
|
218030
|
+
const { toolId, toolSelection, headers: headers2, toolPolicies, agentToolRelationId } = canUseItem;
|
|
218000
218031
|
const isFunctionTool = typedAgentDefinition.functionTools && toolId in typedAgentDefinition.functionTools;
|
|
218001
218032
|
if (isFunctionTool) {
|
|
218002
218033
|
logger10.info(
|
|
@@ -218021,6 +218052,7 @@ var updateFullAgentServerSide = (db, logger10 = defaultLogger) => async (scopes,
|
|
|
218021
218052
|
toolId,
|
|
218022
218053
|
selectedTools: toolSelection || void 0,
|
|
218023
218054
|
headers: headers2 || void 0,
|
|
218055
|
+
toolPolicies: toolPolicies || void 0,
|
|
218024
218056
|
relationId: agentToolRelationId
|
|
218025
218057
|
});
|
|
218026
218058
|
logger10.info(
|
|
@@ -220165,6 +220197,203 @@ var updateFullProjectServerSide = (db, logger10 = defaultLogger2) => async (scop
|
|
|
220165
220197
|
"All project artifactComponents updated successfully"
|
|
220166
220198
|
);
|
|
220167
220199
|
}
|
|
220200
|
+
const incomingToolIds = new Set(Object.keys(typed.tools || {}));
|
|
220201
|
+
const existingToolsResult = await listTools(db)({
|
|
220202
|
+
scopes: { tenantId, projectId: typed.id },
|
|
220203
|
+
pagination: { page: 1, limit: 1e3 }
|
|
220204
|
+
});
|
|
220205
|
+
const existingTools = existingToolsResult.data;
|
|
220206
|
+
let deletedToolCount = 0;
|
|
220207
|
+
for (const tool of existingTools) {
|
|
220208
|
+
if (!incomingToolIds.has(tool.id)) {
|
|
220209
|
+
try {
|
|
220210
|
+
await deleteTool(db)({
|
|
220211
|
+
toolId: tool.id,
|
|
220212
|
+
scopes: { tenantId, projectId: typed.id }
|
|
220213
|
+
});
|
|
220214
|
+
deletedToolCount++;
|
|
220215
|
+
logger10.info({ toolId: tool.id }, "Deleted orphaned tool from project");
|
|
220216
|
+
} catch (error) {
|
|
220217
|
+
logger10.error({ toolId: tool.id, error }, "Failed to delete orphaned tool from project");
|
|
220218
|
+
}
|
|
220219
|
+
}
|
|
220220
|
+
}
|
|
220221
|
+
if (deletedToolCount > 0) {
|
|
220222
|
+
logger10.info(
|
|
220223
|
+
{
|
|
220224
|
+
deletedToolCount,
|
|
220225
|
+
projectId: typed.id
|
|
220226
|
+
},
|
|
220227
|
+
"Deleted orphaned tools from project"
|
|
220228
|
+
);
|
|
220229
|
+
}
|
|
220230
|
+
const incomingFunctionIds = new Set(Object.keys(typed.functions || {}));
|
|
220231
|
+
const existingFunctions = await listFunctions(db)({
|
|
220232
|
+
scopes: { tenantId, projectId: typed.id }
|
|
220233
|
+
});
|
|
220234
|
+
let deletedFunctionCount = 0;
|
|
220235
|
+
for (const func of existingFunctions) {
|
|
220236
|
+
if (!incomingFunctionIds.has(func.id)) {
|
|
220237
|
+
try {
|
|
220238
|
+
await deleteFunction(db)({
|
|
220239
|
+
functionId: func.id,
|
|
220240
|
+
scopes: { tenantId, projectId: typed.id }
|
|
220241
|
+
});
|
|
220242
|
+
deletedFunctionCount++;
|
|
220243
|
+
logger10.info({ functionId: func.id }, "Deleted orphaned function from project");
|
|
220244
|
+
} catch (error) {
|
|
220245
|
+
logger10.error(
|
|
220246
|
+
{ functionId: func.id, error },
|
|
220247
|
+
"Failed to delete orphaned function from project"
|
|
220248
|
+
);
|
|
220249
|
+
}
|
|
220250
|
+
}
|
|
220251
|
+
}
|
|
220252
|
+
if (deletedFunctionCount > 0) {
|
|
220253
|
+
logger10.info(
|
|
220254
|
+
{
|
|
220255
|
+
deletedFunctionCount,
|
|
220256
|
+
projectId: typed.id
|
|
220257
|
+
},
|
|
220258
|
+
"Deleted orphaned functions from project"
|
|
220259
|
+
);
|
|
220260
|
+
}
|
|
220261
|
+
const incomingCredentialReferenceIds = new Set(Object.keys(typed.credentialReferences || {}));
|
|
220262
|
+
const existingCredentialReferences = await listCredentialReferences(db)({
|
|
220263
|
+
scopes: { tenantId, projectId: typed.id }
|
|
220264
|
+
});
|
|
220265
|
+
let deletedCredentialReferenceCount = 0;
|
|
220266
|
+
for (const credRef of existingCredentialReferences) {
|
|
220267
|
+
if (!incomingCredentialReferenceIds.has(credRef.id)) {
|
|
220268
|
+
try {
|
|
220269
|
+
await deleteCredentialReference(db)({
|
|
220270
|
+
id: credRef.id,
|
|
220271
|
+
scopes: { tenantId, projectId: typed.id }
|
|
220272
|
+
});
|
|
220273
|
+
deletedCredentialReferenceCount++;
|
|
220274
|
+
logger10.info(
|
|
220275
|
+
{ credentialReferenceId: credRef.id },
|
|
220276
|
+
"Deleted orphaned credentialReference from project"
|
|
220277
|
+
);
|
|
220278
|
+
} catch (error) {
|
|
220279
|
+
logger10.error(
|
|
220280
|
+
{ credentialReferenceId: credRef.id, error },
|
|
220281
|
+
"Failed to delete orphaned credentialReference from project"
|
|
220282
|
+
);
|
|
220283
|
+
}
|
|
220284
|
+
}
|
|
220285
|
+
}
|
|
220286
|
+
if (deletedCredentialReferenceCount > 0) {
|
|
220287
|
+
logger10.info(
|
|
220288
|
+
{
|
|
220289
|
+
deletedCredentialReferenceCount,
|
|
220290
|
+
projectId: typed.id
|
|
220291
|
+
},
|
|
220292
|
+
"Deleted orphaned credentialReferences from project"
|
|
220293
|
+
);
|
|
220294
|
+
}
|
|
220295
|
+
const incomingExternalAgentIds = new Set(Object.keys(typed.externalAgents || {}));
|
|
220296
|
+
const existingExternalAgents = await listExternalAgents(db)({
|
|
220297
|
+
scopes: { tenantId, projectId: typed.id }
|
|
220298
|
+
});
|
|
220299
|
+
let deletedExternalAgentCount = 0;
|
|
220300
|
+
for (const extAgent of existingExternalAgents) {
|
|
220301
|
+
if (!incomingExternalAgentIds.has(extAgent.id)) {
|
|
220302
|
+
try {
|
|
220303
|
+
await deleteExternalAgent(db)({
|
|
220304
|
+
externalAgentId: extAgent.id,
|
|
220305
|
+
scopes: { tenantId, projectId: typed.id }
|
|
220306
|
+
});
|
|
220307
|
+
deletedExternalAgentCount++;
|
|
220308
|
+
logger10.info(
|
|
220309
|
+
{ externalAgentId: extAgent.id },
|
|
220310
|
+
"Deleted orphaned externalAgent from project"
|
|
220311
|
+
);
|
|
220312
|
+
} catch (error) {
|
|
220313
|
+
logger10.error(
|
|
220314
|
+
{ externalAgentId: extAgent.id, error },
|
|
220315
|
+
"Failed to delete orphaned externalAgent from project"
|
|
220316
|
+
);
|
|
220317
|
+
}
|
|
220318
|
+
}
|
|
220319
|
+
}
|
|
220320
|
+
if (deletedExternalAgentCount > 0) {
|
|
220321
|
+
logger10.info(
|
|
220322
|
+
{
|
|
220323
|
+
deletedExternalAgentCount,
|
|
220324
|
+
projectId: typed.id
|
|
220325
|
+
},
|
|
220326
|
+
"Deleted orphaned externalAgents from project"
|
|
220327
|
+
);
|
|
220328
|
+
}
|
|
220329
|
+
const incomingDataComponentIds = new Set(Object.keys(typed.dataComponents || {}));
|
|
220330
|
+
const existingDataComponents = await listDataComponents(db)({
|
|
220331
|
+
scopes: { tenantId, projectId: typed.id }
|
|
220332
|
+
});
|
|
220333
|
+
let deletedDataComponentCount = 0;
|
|
220334
|
+
for (const dataComp of existingDataComponents) {
|
|
220335
|
+
if (!incomingDataComponentIds.has(dataComp.id)) {
|
|
220336
|
+
try {
|
|
220337
|
+
await deleteDataComponent(db)({
|
|
220338
|
+
dataComponentId: dataComp.id,
|
|
220339
|
+
scopes: { tenantId, projectId: typed.id }
|
|
220340
|
+
});
|
|
220341
|
+
deletedDataComponentCount++;
|
|
220342
|
+
logger10.info(
|
|
220343
|
+
{ dataComponentId: dataComp.id },
|
|
220344
|
+
"Deleted orphaned dataComponent from project"
|
|
220345
|
+
);
|
|
220346
|
+
} catch (error) {
|
|
220347
|
+
logger10.error(
|
|
220348
|
+
{ dataComponentId: dataComp.id, error },
|
|
220349
|
+
"Failed to delete orphaned dataComponent from project"
|
|
220350
|
+
);
|
|
220351
|
+
}
|
|
220352
|
+
}
|
|
220353
|
+
}
|
|
220354
|
+
if (deletedDataComponentCount > 0) {
|
|
220355
|
+
logger10.info(
|
|
220356
|
+
{
|
|
220357
|
+
deletedDataComponentCount,
|
|
220358
|
+
projectId: typed.id
|
|
220359
|
+
},
|
|
220360
|
+
"Deleted orphaned dataComponents from project"
|
|
220361
|
+
);
|
|
220362
|
+
}
|
|
220363
|
+
const incomingArtifactComponentIds = new Set(Object.keys(typed.artifactComponents || {}));
|
|
220364
|
+
const existingArtifactComponents = await listArtifactComponents(db)({
|
|
220365
|
+
scopes: { tenantId, projectId: typed.id }
|
|
220366
|
+
});
|
|
220367
|
+
let deletedArtifactComponentCount = 0;
|
|
220368
|
+
for (const artifactComp of existingArtifactComponents) {
|
|
220369
|
+
if (!incomingArtifactComponentIds.has(artifactComp.id)) {
|
|
220370
|
+
try {
|
|
220371
|
+
await deleteArtifactComponent(db)({
|
|
220372
|
+
id: artifactComp.id,
|
|
220373
|
+
scopes: { tenantId, projectId: typed.id }
|
|
220374
|
+
});
|
|
220375
|
+
deletedArtifactComponentCount++;
|
|
220376
|
+
logger10.info(
|
|
220377
|
+
{ artifactComponentId: artifactComp.id },
|
|
220378
|
+
"Deleted orphaned artifactComponent from project"
|
|
220379
|
+
);
|
|
220380
|
+
} catch (error) {
|
|
220381
|
+
logger10.error(
|
|
220382
|
+
{ artifactComponentId: artifactComp.id, error },
|
|
220383
|
+
"Failed to delete orphaned artifactComponent from project"
|
|
220384
|
+
);
|
|
220385
|
+
}
|
|
220386
|
+
}
|
|
220387
|
+
}
|
|
220388
|
+
if (deletedArtifactComponentCount > 0) {
|
|
220389
|
+
logger10.info(
|
|
220390
|
+
{
|
|
220391
|
+
deletedArtifactComponentCount,
|
|
220392
|
+
projectId: typed.id
|
|
220393
|
+
},
|
|
220394
|
+
"Deleted orphaned artifactComponents from project"
|
|
220395
|
+
);
|
|
220396
|
+
}
|
|
220168
220397
|
const incomingAgentIds = new Set(Object.keys(typed.agents || {}));
|
|
220169
220398
|
const existingAgents = await listAgents(db)({
|
|
220170
220399
|
scopes: { tenantId, projectId: typed.id }
|
|
@@ -220409,34 +220638,23 @@ var getFullProject = (db, logger10 = defaultLogger2) => async (params) => {
|
|
|
220409
220638
|
}
|
|
220410
220639
|
const projectFunctions = {};
|
|
220411
220640
|
try {
|
|
220412
|
-
const
|
|
220413
|
-
|
|
220414
|
-
|
|
220415
|
-
|
|
220416
|
-
|
|
220417
|
-
|
|
220418
|
-
|
|
220419
|
-
|
|
220420
|
-
|
|
220421
|
-
for (const item of functionToolsWithFunctions) {
|
|
220422
|
-
projectFunctions[item.functionToolId] = {
|
|
220423
|
-
id: item.functionId,
|
|
220424
|
-
name: item.functionToolName,
|
|
220425
|
-
description: item.functionToolDescription,
|
|
220426
|
-
inputSchema: item.inputSchema,
|
|
220427
|
-
executeCode: item.executeCode,
|
|
220428
|
-
dependencies: item.dependencies
|
|
220641
|
+
const functionsList = await listFunctions(db)({
|
|
220642
|
+
scopes: { tenantId, projectId }
|
|
220643
|
+
});
|
|
220644
|
+
for (const func of functionsList) {
|
|
220645
|
+
projectFunctions[func.id] = {
|
|
220646
|
+
id: func.id,
|
|
220647
|
+
inputSchema: func.inputSchema,
|
|
220648
|
+
executeCode: func.executeCode,
|
|
220649
|
+
dependencies: func.dependencies
|
|
220429
220650
|
};
|
|
220430
220651
|
}
|
|
220431
220652
|
logger10.info(
|
|
220432
220653
|
{ tenantId, projectId, functionCount: Object.keys(projectFunctions).length },
|
|
220433
|
-
"
|
|
220654
|
+
"Functions retrieved for project"
|
|
220434
220655
|
);
|
|
220435
220656
|
} catch (error) {
|
|
220436
|
-
logger10.warn(
|
|
220437
|
-
{ tenantId, projectId, error },
|
|
220438
|
-
"Failed to retrieve function tools for project"
|
|
220439
|
-
);
|
|
220657
|
+
logger10.warn({ tenantId, projectId, error }, "Failed to retrieve functions for project");
|
|
220440
220658
|
}
|
|
220441
220659
|
const agents2 = {};
|
|
220442
220660
|
if (agentList.length > 0) {
|
|
@@ -222058,4 +222276,4 @@ typescript/lib/typescript.js:
|
|
|
222058
222276
|
***************************************************************************** *)
|
|
222059
222277
|
*/
|
|
222060
222278
|
|
|
222061
|
-
export { ContextCache, ContextConfigBuilder, ContextFetcher, ContextResolver, CredentialStuffer, HTTP_REQUEST_PARTS, TemplateEngine, addFunctionToolToSubAgent, addLedgerArtifacts, addToolToAgent, addUserToOrganization, agentHasArtifactComponents, apiFetch, associateArtifactComponentWithAgent, associateDataComponentWithAgent, cleanupTenantCache, clearContextConfigCache, clearConversationCache, contextConfig, contextValidationMiddleware, countApiKeys, countArtifactComponents, countArtifactComponentsForAgent, countContextConfigs, countCredentialReferences, countDataComponents, countExternalAgents, countLedgerArtifactsByTask, countMessagesByConversation, countProjects, createAgent, createAgentToolRelation, createApiKey, createArtifactComponent, createContextConfig, createConversation, createCredentialReference, createDataComponent, createDatabaseClient, createExternalAgent, createFullAgentServerSide, createFullProjectServerSide, createFunctionTool, createMessage, 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, externalAgentExists, externalAgentUrlExists, fetchComponentRelationships, fetchDefinition, generateAndCreateApiKey, 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, getCredentialReference, getCredentialReferenceById, getCredentialReferenceWithResources, getDataComponent, getDataComponentsForAgent, getExternalAgent, getExternalAgentByUrl, getExternalAgentsForSubAgent, getFullAgent, getFullAgentDefinition, getFullProject, getFunction, getFunctionToolById, getFunctionToolsForSubAgent, getLedgerArtifacts, getLedgerArtifactsByContext, getMessageById, getMessagesByConversation, getMessagesByTask, getPendingInvitationsByEmail, getProject, getProjectResourceCounts, getRelatedAgentsForAgent, getSubAgentById, getSubAgentExternalAgentRelationById, getSubAgentExternalAgentRelationByParams, getSubAgentExternalAgentRelations, getSubAgentExternalAgentRelationsByAgent, getSubAgentExternalAgentRelationsByExternalAgent, getSubAgentRelationsByTarget, getSubAgentTeamAgentRelationById, getSubAgentTeamAgentRelationByParams, getSubAgentTeamAgentRelations, getSubAgentTeamAgentRelationsByAgent, getSubAgentTeamAgentRelationsByTeamAgent, getSubAgentsByIds, getSubAgentsForExternalAgent, getSubAgentsForTeamAgent, getTask, getTeamAgentsForSubAgent, getToolById, getToolsForAgent, getUserByEmail, getUserById, getUserOrganizations, getVisibleMessages, handleContextConfigChange, handleContextResolution, hasApiKey, hasContextConfig, hasCredentialReference, headers, invalidateHeadersCache, invalidateInvocationDefinitionsCache, 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, projectExists, projectExistsInTable, projectHasResources, removeArtifactComponentFromAgent, removeDataComponentFromAgent, removeToolFromAgent, setActiveAgentForConversation, setActiveAgentForThread, setCacheEntry, 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, validateHeaders, validateHttpRequestHeaders, validateProjectExists, validateSubAgent, validationHelper, withProjectValidation };
|
|
222279
|
+
export { ContextCache, ContextConfigBuilder, ContextFetcher, ContextResolver, CredentialStuffer, HTTP_REQUEST_PARTS, SubAgentIsDefaultError, TemplateEngine, addFunctionToolToSubAgent, addLedgerArtifacts, addToolToAgent, addUserToOrganization, agentHasArtifactComponents, apiFetch, associateArtifactComponentWithAgent, associateDataComponentWithAgent, cleanupTenantCache, clearContextConfigCache, clearConversationCache, contextConfig, contextValidationMiddleware, countApiKeys, countArtifactComponents, countArtifactComponentsForAgent, countContextConfigs, countCredentialReferences, countDataComponents, countExternalAgents, countLedgerArtifactsByTask, countMessagesByConversation, countProjects, createAgent, createAgentToolRelation, createApiKey, createArtifactComponent, createContextConfig, createConversation, createCredentialReference, createDataComponent, createDatabaseClient, createExternalAgent, createFullAgentServerSide, createFullProjectServerSide, createFunctionTool, createMessage, 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, externalAgentExists, externalAgentUrlExists, fetchComponentRelationships, fetchDefinition, generateAndCreateApiKey, 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, getCredentialReference, getCredentialReferenceById, getCredentialReferenceWithResources, getDataComponent, getDataComponentsForAgent, getExternalAgent, getExternalAgentByUrl, getExternalAgentsForSubAgent, getFullAgent, getFullAgentDefinition, getFullProject, getFunction, getFunctionToolById, getFunctionToolsForSubAgent, getLedgerArtifacts, getLedgerArtifactsByContext, getMessageById, getMessagesByConversation, getMessagesByTask, getPendingInvitationsByEmail, getProject, getProjectResourceCounts, getRelatedAgentsForAgent, getSubAgentById, getSubAgentExternalAgentRelationById, getSubAgentExternalAgentRelationByParams, getSubAgentExternalAgentRelations, getSubAgentExternalAgentRelationsByAgent, getSubAgentExternalAgentRelationsByExternalAgent, getSubAgentRelationsByTarget, getSubAgentTeamAgentRelationById, getSubAgentTeamAgentRelationByParams, getSubAgentTeamAgentRelations, getSubAgentTeamAgentRelationsByAgent, getSubAgentTeamAgentRelationsByTeamAgent, getSubAgentsByIds, getSubAgentsForExternalAgent, getSubAgentsForTeamAgent, getTask, getTeamAgentsForSubAgent, getToolById, getToolsForAgent, getUserByEmail, getUserById, getUserOrganizations, getVisibleMessages, handleContextConfigChange, handleContextResolution, hasApiKey, hasContextConfig, hasCredentialReference, headers, invalidateHeadersCache, invalidateInvocationDefinitionsCache, 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, projectExists, projectExistsInTable, projectHasResources, removeArtifactComponentFromAgent, removeDataComponentFromAgent, removeToolFromAgent, setActiveAgentForConversation, setActiveAgentForThread, setCacheEntry, 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, validateHeaders, validateHttpRequestHeaders, validateProjectExists, validateSubAgent, validationHelper, withProjectValidation };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as drizzle_orm from 'drizzle-orm';
|
|
2
2
|
import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
|
|
3
|
-
import { l as ContextFetchDefinition, C as ConversationHistoryConfig, T as TaskMetadataConfig, m as ToolMcpConfig, n as ToolServerCapabilities, o as ConversationMetadata, p as MessageContent, q as MessageMetadata, P as Part } from './utility-
|
|
3
|
+
import { l as ContextFetchDefinition, C as ConversationHistoryConfig, T as TaskMetadataConfig, m as ToolMcpConfig, n as ToolServerCapabilities, o as ConversationMetadata, p as MessageContent, q as MessageMetadata, P as Part } from './utility-Lo5NoRHK.js';
|
|
4
4
|
import { account, invitation, member, organization, session, ssoProvider, user, verification } from './auth/auth-schema.js';
|
|
5
5
|
|
|
6
6
|
declare const projects: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
@@ -3119,6 +3119,29 @@ declare const subAgentToolRelations: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
|
3119
3119
|
}, {}, {
|
|
3120
3120
|
$type: Record<string, string> | null;
|
|
3121
3121
|
}>;
|
|
3122
|
+
toolPolicies: drizzle_orm_pg_core.PgColumn<{
|
|
3123
|
+
name: "tool_policies";
|
|
3124
|
+
tableName: "sub_agent_tool_relations";
|
|
3125
|
+
dataType: "json";
|
|
3126
|
+
columnType: "PgJsonb";
|
|
3127
|
+
data: Record<string, {
|
|
3128
|
+
needsApproval?: boolean;
|
|
3129
|
+
}> | null;
|
|
3130
|
+
driverParam: unknown;
|
|
3131
|
+
notNull: false;
|
|
3132
|
+
hasDefault: false;
|
|
3133
|
+
isPrimaryKey: false;
|
|
3134
|
+
isAutoincrement: false;
|
|
3135
|
+
hasRuntimeDefault: false;
|
|
3136
|
+
enumValues: undefined;
|
|
3137
|
+
baseColumn: never;
|
|
3138
|
+
identity: undefined;
|
|
3139
|
+
generated: undefined;
|
|
3140
|
+
}, {}, {
|
|
3141
|
+
$type: Record<string, {
|
|
3142
|
+
needsApproval?: boolean;
|
|
3143
|
+
}> | null;
|
|
3144
|
+
}>;
|
|
3122
3145
|
subAgentId: drizzle_orm_pg_core.PgColumn<{
|
|
3123
3146
|
name: "sub_agent_id";
|
|
3124
3147
|
tableName: "sub_agent_tool_relations";
|