import { AgentScopeConfig, SubAgentScopeConfig } from "../../db/manage/scope-definitions.js"; import { ConversationHistoryConfig, PaginationConfig, ToolMcpConfig, ToolServerCapabilities } from "../../types/utility.js"; import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js"; import "../../index.js"; import { SubAgentRelationInsert, SubAgentRelationUpdate, SubAgentToolRelationUpdate } from "../../types/entities.js"; //#region src/data-access/manage/subAgentRelations.d.ts declare const getAgentRelationById: (db: AgentsManageDatabaseClient) => (params: { scopes: AgentScopeConfig; relationId: string; }) => Promise<{ id: string; createdAt: string; updatedAt: string; projectId: string; tenantId: string; agentId: string; sourceSubAgentId: string; targetSubAgentId: string | null; relationType: string | null; } | undefined>; declare const listAgentRelations: (db: AgentsManageDatabaseClient) => (params: { scopes: AgentScopeConfig; pagination?: PaginationConfig; }) => Promise<{ data: { createdAt: string; updatedAt: string; sourceSubAgentId: string; targetSubAgentId: string | null; relationType: string | null; agentId: string; projectId: string; tenantId: string; id: string; }[]; pagination: { page: number; limit: number; total: number; pages: number; }; }>; declare const getAgentRelations: (db: AgentsManageDatabaseClient) => (params: { scopes: SubAgentScopeConfig; }) => Promise<{ id: string; createdAt: string; updatedAt: string; projectId: string; tenantId: string; agentId: string; sourceSubAgentId: string; targetSubAgentId: string | null; relationType: string | null; }[]>; declare const getAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: { scopes: AgentScopeConfig; }) => Promise<{ id: string; createdAt: string; updatedAt: string; projectId: string; tenantId: string; agentId: string; sourceSubAgentId: string; targetSubAgentId: string | null; relationType: string | null; }[]>; declare const getAgentRelationsBySource: (db: AgentsManageDatabaseClient) => (params: { scopes: AgentScopeConfig; sourceSubAgentId: string; pagination?: PaginationConfig; }) => Promise<{ data: { createdAt: string; updatedAt: string; sourceSubAgentId: string; targetSubAgentId: string | null; relationType: string | null; agentId: string; projectId: string; tenantId: string; id: string; }[]; pagination: { page: number; limit: number; total: number; pages: number; }; }>; declare const getSubAgentRelationsByTarget: (db: AgentsManageDatabaseClient) => (params: { scopes: AgentScopeConfig; targetSubAgentId: string; pagination?: PaginationConfig; }) => Promise<{ data: { createdAt: string; updatedAt: string; sourceSubAgentId: string; targetSubAgentId: string | null; relationType: string | null; agentId: string; projectId: string; tenantId: string; id: string; }[]; pagination: { page: number; limit: number; total: number; pages: number; }; }>; declare const getRelatedAgentsForAgent: (db: AgentsManageDatabaseClient) => (params: { scopes: AgentScopeConfig; subAgentId: string; }) => Promise<{ data: { id: string; name: string; description: string | null; relationType: string | null; relationId: string; }[]; }>; declare const createSubAgentRelation: (db: AgentsManageDatabaseClient) => (params: SubAgentRelationInsert) => Promise<{ id: string; createdAt: string; updatedAt: string; projectId: string; tenantId: string; agentId: string; sourceSubAgentId: string; targetSubAgentId: string | null; relationType: string | null; }>; /** * Check if sub-agent relation exists by agent, source, target, and relation type */ declare const getAgentRelationByParams: (db: AgentsManageDatabaseClient) => (params: { scopes: AgentScopeConfig; sourceSubAgentId: string; targetSubAgentId?: string; relationType: string; }) => Promise<{ id: string; createdAt: string; updatedAt: string; projectId: string; tenantId: string; agentId: string; sourceSubAgentId: string; targetSubAgentId: string | null; relationType: string | null; } | undefined>; /** * Upsert agent relation (create if it doesn't exist, no-op if it does) */ declare const upsertSubAgentRelation: (db: AgentsManageDatabaseClient) => (params: SubAgentRelationInsert) => Promise<{ id: string; createdAt: string; updatedAt: string; projectId: string; tenantId: string; agentId: string; sourceSubAgentId: string; targetSubAgentId: string | null; relationType: string | null; }>; declare const updateAgentRelation: (db: AgentsManageDatabaseClient) => (params: { scopes: AgentScopeConfig; relationId: string; data: SubAgentRelationUpdate; }) => Promise<{ createdAt: string; updatedAt: string; sourceSubAgentId: string; targetSubAgentId: string | null; relationType: string | null; agentId: string; projectId: string; tenantId: string; id: string; }>; declare const deleteSubAgentRelation: (db: AgentsManageDatabaseClient) => (params: { scopes: AgentScopeConfig; relationId: string; }) => Promise; declare const deleteAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: { scopes: AgentScopeConfig; }) => Promise; declare const createAgentToolRelation: (db: AgentsManageDatabaseClient) => (params: { scopes: AgentScopeConfig; relationId?: string; data: { subAgentId: string; toolId: string; selectedTools?: string[] | null; headers?: Record | null; toolPolicies?: Record | null; }; }) => Promise<{ id: string; createdAt: string; updatedAt: string; headers: Record | null; projectId: string; tenantId: string; agentId: string; subAgentId: string; toolId: string; toolPolicies: Record | null; selectedTools: string[] | null; }>; declare const updateAgentToolRelation: (db: AgentsManageDatabaseClient) => (params: { scopes: AgentScopeConfig; relationId: string; data: SubAgentToolRelationUpdate; }) => Promise<{ createdAt: string; updatedAt: string; toolId: string; selectedTools: string[] | null; headers: Record | null; toolPolicies: Record | null; subAgentId: string; agentId: string; projectId: string; tenantId: string; id: string; }>; declare const deleteAgentToolRelation: (db: AgentsManageDatabaseClient) => (params: { scopes: AgentScopeConfig; relationId: string; }) => Promise; declare const deleteAgentToolRelationByAgent: (db: AgentsManageDatabaseClient) => (params: { scopes: SubAgentScopeConfig; }) => Promise; declare const getAgentToolRelationById: (db: AgentsManageDatabaseClient) => (params: { scopes: SubAgentScopeConfig; relationId: string; }) => Promise<{ id: string; createdAt: string; updatedAt: string; headers: Record | null; projectId: string; tenantId: string; agentId: string; subAgentId: string; toolId: string; toolPolicies: Record | null; selectedTools: string[] | null; } | undefined>; declare const getAgentToolRelationByAgent: (db: AgentsManageDatabaseClient) => (params: { scopes: SubAgentScopeConfig; pagination?: PaginationConfig; }) => Promise<{ data: { createdAt: string; updatedAt: string; toolId: string; selectedTools: string[] | null; headers: Record | null; toolPolicies: Record | null; subAgentId: string; agentId: string; projectId: string; tenantId: string; id: string; }[]; pagination: { page: number; limit: number; total: number; pages: number; }; }>; declare const getAgentToolRelationByTool: (db: AgentsManageDatabaseClient) => (params: { scopes: AgentScopeConfig; toolId: string; pagination?: PaginationConfig; }) => Promise<{ data: { createdAt: string; updatedAt: string; toolId: string; selectedTools: string[] | null; headers: Record | null; toolPolicies: Record | null; subAgentId: string; agentId: string; projectId: string; tenantId: string; id: string; }[]; pagination: { page: number; limit: number; total: number; pages: number; }; }>; declare const listAgentToolRelations: (db: AgentsManageDatabaseClient) => (params: { scopes: AgentScopeConfig; pagination?: PaginationConfig; }) => Promise<{ data: { createdAt: string; updatedAt: string; toolId: string; selectedTools: string[] | null; headers: Record | null; toolPolicies: Record | null; subAgentId: string; agentId: string; projectId: string; tenantId: string; id: string; }[]; pagination: { page: number; limit: number; total: number; pages: number; }; }>; declare const getToolsForAgent: (db: AgentsManageDatabaseClient) => (params: { scopes: SubAgentScopeConfig; pagination?: PaginationConfig; }) => Promise<{ data: { id: string; tenantId: string; subAgentId: string; toolId: string; selectedTools: string[] | null; headers: Record | null; toolPolicies: Record | null; createdAt: string; updatedAt: string; tool: { id: string; name: string; description: string | null; config: { type: "mcp"; mcp: ToolMcpConfig; }; createdAt: string; updatedAt: string; capabilities: ToolServerCapabilities | null; lastError: string | null; credentialReferenceId: string | null; credentialScope: string; tenantId: string; projectId: string; headers: Record | null; imageUrl: string | null; }; }[]; pagination: { page: number; limit: number; total: number; pages: number; }; }>; declare const getAgentsForTool: (db: AgentsManageDatabaseClient) => (params: { scopes: AgentScopeConfig; toolId: string; pagination?: PaginationConfig; }) => Promise<{ data: { id: string; tenantId: string; subAgentId: string; toolId: string; selectedTools: string[] | null; headers: Record | null; toolPolicies: Record | null; createdAt: string; updatedAt: string; subAgent: { id: string; name: string; description: string | null; prompt: string | null; conversationHistoryConfig: ConversationHistoryConfig | null; models: { base?: { model?: string | undefined; providerOptions?: Record | undefined; fallbackModels?: string[] | undefined; allowedProviders?: string[] | undefined; } | undefined; structuredOutput?: { model?: string | undefined; providerOptions?: Record | undefined; fallbackModels?: string[] | undefined; allowedProviders?: string[] | undefined; } | undefined; summarizer?: { model?: string | undefined; providerOptions?: Record | undefined; fallbackModels?: string[] | undefined; allowedProviders?: string[] | undefined; } | undefined; } | null; stopWhen: { stepCountIs?: number | undefined; } | null; createdAt: string; updatedAt: string; }; }[]; pagination: { page: number; limit: number; total: number; pages: number; }; }>; declare const validateSubAgent: (db: AgentsManageDatabaseClient) => (params: { scopes: SubAgentScopeConfig; }) => Promise; //#endregion export { createAgentToolRelation, createSubAgentRelation, deleteAgentRelationsByAgent, deleteAgentToolRelation, deleteAgentToolRelationByAgent, deleteSubAgentRelation, getAgentRelationById, getAgentRelationByParams, getAgentRelations, getAgentRelationsByAgent, getAgentRelationsBySource, getAgentToolRelationByAgent, getAgentToolRelationById, getAgentToolRelationByTool, getAgentsForTool, getRelatedAgentsForAgent, getSubAgentRelationsByTarget, getToolsForAgent, listAgentRelations, listAgentToolRelations, updateAgentRelation, updateAgentToolRelation, upsertSubAgentRelation, validateSubAgent };