@inkeep/agents-core 0.43.0 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/auth.d.ts +4 -2
- package/dist/auth/auth.js +4 -3
- package/dist/auth/authz/client.d.ts +0 -1
- package/dist/auth/authz/client.js +0 -1
- package/dist/auth/authz/config.d.ts +1 -7
- package/dist/auth/authz/config.js +1 -9
- package/dist/auth/authz/index.d.ts +2 -2
- package/dist/auth/authz/index.js +2 -2
- package/dist/auth/authz/permissions.js +4 -8
- package/dist/auth/authz/sync.js +1 -11
- package/dist/auth/init.d.ts +1 -0
- package/dist/auth/init.js +115 -0
- package/dist/client-exports.d.ts +2 -6
- package/dist/client-exports.js +3 -7
- package/dist/constants/otel-attributes.d.ts +5 -0
- package/dist/constants/otel-attributes.js +8 -3
- package/dist/constants/signoz-queries.d.ts +1 -0
- package/dist/constants/signoz-queries.js +2 -1
- package/dist/data-access/index.d.ts +3 -2
- package/dist/data-access/index.js +3 -2
- package/dist/data-access/manage/agentFull.js +42 -1
- package/dist/data-access/manage/agents.d.ts +9 -9
- package/dist/data-access/manage/artifactComponents.d.ts +4 -4
- package/dist/data-access/manage/artifactComponents.js +1 -1
- package/dist/data-access/manage/contextConfigs.d.ts +12 -12
- package/dist/data-access/manage/dataComponents.d.ts +2 -2
- package/dist/data-access/manage/dataComponents.js +1 -1
- package/dist/data-access/manage/functionTools.d.ts +8 -8
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgentRelations.d.ts +22 -22
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgents.d.ts +3 -3
- package/dist/data-access/manage/tools.d.ts +26 -21
- package/dist/data-access/manage/tools.js +20 -1
- package/dist/data-access/runtime/apiKeys.d.ts +4 -4
- package/dist/data-access/runtime/cascade-delete.d.ts +48 -1
- package/dist/data-access/runtime/cascade-delete.js +52 -2
- package/dist/data-access/runtime/conversations.d.ts +19 -19
- package/dist/data-access/runtime/github-work-app-installations.d.ts +261 -0
- package/dist/data-access/runtime/github-work-app-installations.js +457 -0
- package/dist/data-access/runtime/messages.d.ts +15 -15
- package/dist/data-access/runtime/organizations.js +2 -2
- package/dist/data-access/runtime/tasks.d.ts +4 -4
- package/dist/db/manage/manage-schema.d.ts +318 -301
- package/dist/db/manage/manage-schema.js +1 -0
- package/dist/db/runtime/runtime-schema.d.ts +1009 -165
- package/dist/db/runtime/runtime-schema.js +173 -5
- package/dist/dolt/branch.js +1 -1
- package/dist/dolt/branches-api.js +1 -1
- package/dist/dolt/index.js +3 -3
- package/dist/dolt/migrate-all-branches.js +1 -1
- package/dist/dolt/ref-helpers.js +1 -1
- package/dist/dolt/ref-middleware.js +1 -1
- package/dist/dolt/ref-scope.js +1 -1
- package/dist/env.d.ts +6 -4
- package/dist/env.js +11 -10
- package/dist/index.d.ts +8 -9
- package/dist/index.js +18 -19
- package/dist/types/entities.d.ts +9 -2
- package/dist/types/index.d.ts +3 -3
- package/dist/types/utility.d.ts +16 -2
- package/dist/validation/agentFull.js +1 -1
- package/dist/validation/dolt-schemas.d.ts +1 -1
- package/dist/validation/drizzle-schema-helpers.d.ts +4 -23
- package/dist/validation/drizzle-schema-helpers.js +3 -30
- package/dist/validation/index.d.ts +2 -4
- package/dist/validation/index.js +4 -6
- package/dist/validation/schemas.d.ts +3233 -1440
- package/dist/validation/schemas.js +164 -79
- package/drizzle/manage/0006_fixed_umar.sql +1 -0
- package/drizzle/manage/meta/0006_snapshot.json +3148 -0
- package/drizzle/manage/meta/_journal.json +7 -0
- package/drizzle/runtime/0010_previous_black_knight.sql +84 -0
- package/drizzle/runtime/meta/0010_snapshot.json +3066 -0
- package/drizzle/runtime/meta/_journal.json +7 -0
- package/package.json +4 -2
- package/dist/validation/id-validation.d.ts +0 -24
- package/dist/validation/id-validation.js +0 -52
|
@@ -8,6 +8,8 @@ import { createSubAgentExternalAgentRelation, deleteSubAgentExternalAgentRelatio
|
|
|
8
8
|
import { createAgentToolRelation, createSubAgentRelation, deleteAgentRelationsByAgent, deleteAgentToolRelation, deleteAgentToolRelationByAgent, deleteSubAgentRelation, getAgentRelationById, getAgentRelationByParams, getAgentRelations, getAgentRelationsByAgent, getAgentRelationsBySource, getAgentToolRelationByAgent, getAgentToolRelationById, getAgentToolRelationByTool, getAgentsForTool, getRelatedAgentsForAgent, getSubAgentRelationsByTarget, getToolsForAgent, listAgentRelations, listAgentToolRelations, updateAgentRelation, updateAgentToolRelation, upsertSubAgentRelation, validateSubAgent } from "./manage/subAgentRelations.js";
|
|
9
9
|
import { SubAgentIsDefaultError, createSubAgent, deleteSubAgent, getSubAgentById, getSubAgentsByIds, listSubAgents, listSubAgentsPaginated, updateSubAgent, upsertSubAgent } from "./manage/subAgents.js";
|
|
10
10
|
import { createSubAgentTeamAgentRelation, deleteSubAgentTeamAgentRelation, deleteSubAgentTeamAgentRelationsByAgent, deleteSubAgentTeamAgentRelationsBySubAgent, getSubAgentTeamAgentRelationById, getSubAgentTeamAgentRelationByParams, getSubAgentTeamAgentRelations, getSubAgentTeamAgentRelationsByAgent, getSubAgentTeamAgentRelationsByTeamAgent, getSubAgentsForTeamAgent, getTeamAgentsForSubAgent, listSubAgentTeamAgentRelations, updateSubAgentTeamAgentRelation, upsertSubAgentTeamAgentRelation } from "./manage/subAgentTeamAgentRelations.js";
|
|
11
|
+
import { cascadeDeleteByAgent, cascadeDeleteByBranch, cascadeDeleteByContextConfig, cascadeDeleteByProject, cascadeDeleteBySubAgent, cascadeDeleteByTool, cascadeDeleteGitHubAccessByProject } from "./runtime/cascade-delete.js";
|
|
12
|
+
import { addRepositories, checkProjectRepositoryAccess, clearMcpToolRepositoryAccess, clearProjectRepositoryAccess, createInstallation, deleteInstallation, deleteMcpToolAccessMode, deleteProjectAccessMode, disconnectInstallation, getInstallationByGitHubId, getInstallationById, getInstallationsByTenantId, getMcpToolAccessMode, getMcpToolRepositoryAccess, getMcpToolRepositoryAccessWithDetails, getProjectAccessMode, getProjectRepositoryAccess, getProjectRepositoryAccessWithDetails, getRepositoriesByInstallationId, getRepositoriesByTenantId, getRepositoryByFullName, getRepositoryById, getRepositoryCount, getRepositoryCountsByTenantId, isGithubWorkAppTool, removeRepositories, setMcpToolAccessMode, setMcpToolRepositoryAccess, setProjectAccessMode, setProjectRepositoryAccess, syncRepositories, updateInstallationStatus, updateInstallationStatusByGitHubId, validateRepositoryOwnership } from "./runtime/github-work-app-installations.js";
|
|
11
13
|
import { countCredentialReferences, createCredentialReference, deleteCredentialReference, getCredentialReference, getCredentialReferenceById, getCredentialReferenceWithResources, getUserScopedCredentialReference, hasCredentialReference, listCredentialReferences, listCredentialReferencesPaginated, updateCredentialReference, upsertCredentialReference } from "./manage/credentialReferences.js";
|
|
12
14
|
import { addToolToAgent, createTool, dbResultToMcpTool, dbResultToMcpToolSkeleton, deleteTool, getMcpToolById, getToolById, listTools, removeToolFromAgent, updateTool, upsertSubAgentToolRelation, upsertTool } from "./manage/tools.js";
|
|
13
15
|
import { createTrigger, deleteTrigger, getTriggerById, listTriggers, listTriggersPaginated, updateTrigger, upsertTrigger } from "./manage/triggers.js";
|
|
@@ -21,7 +23,6 @@ import { createFullProjectServerSide, deleteFullProject, getFullProject, getFull
|
|
|
21
23
|
import { countProjectsInRuntime, createProjectMetadata, deleteProjectMetadata, getProjectMetadata, listProjectsMetadata, listProjectsMetadataPaginated, projectsMetadataExists } from "./runtime/projects.js";
|
|
22
24
|
import { createProjectMetadataAndBranch, deleteProjectWithBranch, getProjectMainBranchName, getProjectWithBranchInfo, getProjectWithMetadata, listProjectsWithMetadataPaginated } from "./manage/projectLifecycle.js";
|
|
23
25
|
import { countApiKeys, createApiKey, deleteApiKey, generateAndCreateApiKey, getApiKeyById, getApiKeyByPublicId, hasApiKey, listApiKeys, listApiKeysPaginated, updateApiKey, updateApiKeyLastUsed, validateAndGetApiKey } from "./runtime/apiKeys.js";
|
|
24
|
-
import { cascadeDeleteByAgent, cascadeDeleteByBranch, cascadeDeleteByContextConfig, cascadeDeleteByProject, cascadeDeleteBySubAgent } from "./runtime/cascade-delete.js";
|
|
25
26
|
import { cleanupTenantCache, clearContextConfigCache, clearConversationCache, getCacheEntry, getContextConfigCacheEntries, getConversationCacheEntries, invalidateHeadersCache, invalidateInvocationDefinitionsCache, setCacheEntry } from "./runtime/contextCache.js";
|
|
26
27
|
import { createConversation, createOrGetConversation, deleteConversation, getActiveAgentForConversation, getConversation, getConversationHistory, listConversations, setActiveAgentForConversation, setActiveAgentForThread, updateConversation, updateConversationActiveSubAgent } from "./runtime/conversations.js";
|
|
27
28
|
import { createDatasetRun, createDatasetRunConversationRelation, createDatasetRunConversationRelations, createEvaluationResult, createEvaluationResults, createEvaluationRun, deleteDatasetRun, deleteDatasetRunConversationRelation, deleteDatasetRunConversationRelationsByRun, deleteEvaluationResult, deleteEvaluationResultsByRun, deleteEvaluationRun, filterConversationsForJob, getDatasetRunById, getDatasetRunConversationRelationByConversation, getDatasetRunConversationRelations, getEvaluationResultById, getEvaluationRunById, getEvaluationRunByJobConfigId, listDatasetRuns, listDatasetRunsByConfig, listEvaluationResults, listEvaluationResultsByConversation, listEvaluationResultsByRun, listEvaluationRuns, listEvaluationRunsByJobConfigId, updateEvaluationResult, updateEvaluationRun } from "./runtime/evalRuns.js";
|
|
@@ -33,4 +34,4 @@ import { createTriggerInvocation, getTriggerInvocationById, listTriggerInvocatio
|
|
|
33
34
|
import { getUserByEmail, getUserById } from "./runtime/users.js";
|
|
34
35
|
import { createValidatedDataAccess, validateProjectExists, withProjectValidation } from "./validation.js";
|
|
35
36
|
|
|
36
|
-
export { SubAgentIsDefaultError, addFunctionToolToSubAgent, addLedgerArtifacts, addToolToAgent, addUserToOrganization, agentHasArtifactComponents, associateArtifactComponentWithAgent, associateDataComponentWithAgent, associateFunctionToolWithSubAgent, cascadeDeleteByAgent, cascadeDeleteByBranch, cascadeDeleteByContextConfig, cascadeDeleteByProject, cascadeDeleteBySubAgent, cleanupTenantCache, clearContextConfigCache, clearConversationCache, countApiKeys, countArtifactComponents, countArtifactComponentsForAgent, countContextConfigs, countCredentialReferences, countDataComponents, countExternalAgents, countLedgerArtifactsByTask, countMessagesByConversation, countProjects, countProjectsInRuntime, createAgent, createAgentManageDatabaseConnection, createAgentToolRelation, createAgentsManageDatabaseClient, createAgentsManageDatabasePool, createAgentsRunDatabaseClient, createApiKey, createArtifactComponent, createContextConfig, createConversation, createCredentialReference, createDataComponent, createDataset, createDatasetItem, createDatasetItems, createDatasetRun, createDatasetRunConfig, createDatasetRunConfigAgentRelation, createDatasetRunConversationRelation, createDatasetRunConversationRelations, createEvaluationJobConfig, createEvaluationJobConfigEvaluatorRelation, createEvaluationResult, createEvaluationResults, createEvaluationRun, createEvaluationRunConfig, createEvaluationRunConfigEvaluationSuiteConfigRelation, createEvaluationSuiteConfig, createEvaluationSuiteConfigEvaluatorRelation, createEvaluator, createExternalAgent, createFullAgentServerSide, createFullProjectServerSide, createFunctionTool, createMessage, createOrGetConversation, createProject, createProjectMetadata, createProjectMetadataAndBranch, createSubAgent, createSubAgentExternalAgentRelation, createSubAgentRelation, createSubAgentTeamAgentRelation, createTask, createTool, createTrigger, createTriggerInvocation, createValidatedDataAccess, dbResultToMcpTool, dbResultToMcpToolSkeleton, deleteAgent, deleteAgentArtifactComponentRelationByAgent, deleteAgentDataComponentRelationByAgent, deleteAgentRelationsByAgent, deleteAgentToolRelation, deleteAgentToolRelationByAgent, deleteApiKey, deleteArtifactComponent, deleteContextConfig, deleteConversation, deleteCredentialReference, deleteDataComponent, deleteDataset, deleteDatasetItem, deleteDatasetItemsByDataset, deleteDatasetRun, deleteDatasetRunConfig, deleteDatasetRunConfigAgentRelation, deleteDatasetRunConversationRelation, deleteDatasetRunConversationRelationsByRun, deleteEvaluationJobConfig, deleteEvaluationJobConfigEvaluatorRelation, deleteEvaluationJobConfigEvaluatorRelationsByEvaluator, deleteEvaluationResult, deleteEvaluationResultsByRun, deleteEvaluationRun, deleteEvaluationRunConfig, deleteEvaluationRunConfigEvaluationSuiteConfigRelation, deleteEvaluationSuiteConfig, deleteEvaluationSuiteConfigEvaluatorRelation, deleteEvaluationSuiteConfigEvaluatorRelationsByEvaluator, deleteEvaluator, deleteExternalAgent, deleteFullAgent, deleteFullProject, deleteFunction, deleteFunctionTool, deleteLedgerArtifactsByContext, deleteLedgerArtifactsByTask, deleteMessage, deleteProject, deleteProjectMetadata, deleteProjectWithBranch, deleteSubAgent, deleteSubAgentExternalAgentRelation, deleteSubAgentExternalAgentRelationsByAgent, deleteSubAgentExternalAgentRelationsBySubAgent, deleteSubAgentRelation, deleteSubAgentTeamAgentRelation, deleteSubAgentTeamAgentRelationsByAgent, deleteSubAgentTeamAgentRelationsBySubAgent, deleteTool, deleteTrigger, externalAgentExists, externalAgentUrlExists, fetchComponentRelationships, filterConversationsForJob, generateAndCreateApiKey, getActiveAgentForConversation, getAgentById, getAgentRelationById, getAgentRelationByParams, getAgentRelations, getAgentRelationsByAgent, getAgentRelationsBySource, getAgentSubAgentInfos, getAgentToolRelationByAgent, getAgentToolRelationById, getAgentToolRelationByTool, getAgentWithDefaultSubAgent, getAgentsForTool, getAgentsUsingArtifactComponent, getAgentsUsingDataComponent, getApiKeyById, getApiKeyByPublicId, getArtifactComponentById, getArtifactComponentsForAgent, getCacheEntry, getContextConfigById, getContextConfigCacheEntries, getConversation, getConversationCacheEntries, getConversationHistory, getCredentialReference, getCredentialReferenceById, getCredentialReferenceWithResources, getDataComponent, getDataComponentsForAgent, getDatasetById, getDatasetItemById, getDatasetRunById, getDatasetRunConfigAgentRelations, getDatasetRunConfigById, getDatasetRunConversationRelationByConversation, getDatasetRunConversationRelations, getEvaluationJobConfigById, getEvaluationJobConfigEvaluatorRelations, getEvaluationResultById, getEvaluationRunById, getEvaluationRunByJobConfigId, getEvaluationRunConfigById, getEvaluationRunConfigEvaluationSuiteConfigRelations, getEvaluationSuiteConfigById, getEvaluationSuiteConfigEvaluatorRelations, getEvaluatorById, getEvaluatorsByIds, getExternalAgent, getExternalAgentByUrl, getExternalAgentsForSubAgent, getFullAgent, getFullAgentDefinition, getFullAgentDefinitionWithRelationIds, getFullAgentWithRelationIds, getFullProject, getFullProjectWithRelationIds, getFunction, getFunctionToolById, getFunctionToolsForSubAgent, getLedgerArtifacts, getLedgerArtifactsByContext, getMcpToolById, getMessageById, getMessagesByConversation, getMessagesByTask, getPendingInvitationsByEmail, getProject, getProjectMainBranchName, getProjectMetadata, getProjectResourceCounts, getProjectWithBranchInfo, getProjectWithMetadata, getRelatedAgentsForAgent, getSubAgentById, getSubAgentExternalAgentRelationById, getSubAgentExternalAgentRelationByParams, getSubAgentExternalAgentRelations, getSubAgentExternalAgentRelationsByAgent, getSubAgentExternalAgentRelationsByExternalAgent, getSubAgentRelationsByTarget, getSubAgentTeamAgentRelationById, getSubAgentTeamAgentRelationByParams, getSubAgentTeamAgentRelations, getSubAgentTeamAgentRelationsByAgent, getSubAgentTeamAgentRelationsByTeamAgent, getSubAgentsByIds, getSubAgentsForExternalAgent, getSubAgentsForTeamAgent, getSubAgentsUsingFunctionTool, getTask, getTeamAgentsForSubAgent, getToolById, getToolsForAgent, getTriggerById, getTriggerInvocationById, getUserByEmail, getUserById, getUserOrganizationsFromDb, getUserScopedCredentialReference, getVisibleMessages, hasApiKey, hasContextConfig, hasCredentialReference, invalidateHeadersCache, invalidateInvocationDefinitionsCache, isArtifactComponentAssociatedWithAgent, isDataComponentAssociatedWithAgent, isFunctionToolAssociatedWithSubAgent, linkDatasetRunToEvaluationJobConfig, listAgentRelations, listAgentToolRelations, listAgents, listAgentsPaginated, listApiKeys, listApiKeysPaginated, listArtifactComponents, listArtifactComponentsPaginated, listContextConfigs, listContextConfigsPaginated, listConversations, listCredentialReferences, listCredentialReferencesPaginated, listDataComponents, listDataComponentsPaginated, listDatasetItems, listDatasetRunConfigs, listDatasetRuns, listDatasetRunsByConfig, listDatasets, listEvaluationJobConfigs, listEvaluationResults, listEvaluationResultsByConversation, listEvaluationResultsByRun, listEvaluationRunConfigs, listEvaluationRunConfigsWithSuiteConfigs, listEvaluationRuns, listEvaluationRunsByJobConfigId, listEvaluationSuiteConfigs, listEvaluators, listExternalAgents, listExternalAgentsPaginated, listFunctionTools, listFunctions, listFunctionsPaginated, listMessages, listProjects, listProjectsMetadata, listProjectsMetadataPaginated, listProjectsPaginated, listProjectsWithMetadataPaginated, listSubAgentExternalAgentRelations, listSubAgentTeamAgentRelations, listSubAgents, listSubAgentsPaginated, listTaskIdsByContextId, listTools, listTriggerInvocationsPaginated, listTriggers, listTriggersPaginated, projectExists, projectExistsInTable, projectHasResources, projectsMetadataExists, removeArtifactComponentFromAgent, removeDataComponentFromAgent, removeFunctionToolFromSubAgent, removeToolFromAgent, setActiveAgentForConversation, setActiveAgentForThread, setCacheEntry, updateAgent, updateAgentRelation, updateAgentToolRelation, updateApiKey, updateApiKeyLastUsed, updateArtifactComponent, updateContextConfig, updateConversation, updateConversationActiveSubAgent, updateCredentialReference, updateDataComponent, updateDataset, updateDatasetItem, updateDatasetRunConfig, updateEvaluationResult, updateEvaluationRun, updateEvaluationRunConfig, updateEvaluationSuiteConfig, updateEvaluator, updateExternalAgent, updateFullAgentServerSide, updateFullProjectServerSide, updateFunctionTool, updateMessage, updateProject, updateSubAgent, updateSubAgentExternalAgentRelation, updateSubAgentFunctionToolRelation, updateSubAgentTeamAgentRelation, updateTask, updateTool, updateTrigger, updateTriggerInvocationStatus, upsertAgent, upsertAgentArtifactComponentRelation, upsertAgentDataComponentRelation, upsertArtifactComponent, upsertContextConfig, upsertCredentialReference, upsertDataComponent, upsertExternalAgent, upsertFunction, upsertFunctionTool, upsertLedgerArtifact, upsertOrganization, upsertSubAgent, upsertSubAgentExternalAgentRelation, upsertSubAgentFunctionToolRelation, upsertSubAgentRelation, upsertSubAgentTeamAgentRelation, upsertSubAgentToolRelation, upsertTool, upsertTrigger, validateAndGetApiKey, validateProjectExists, validateSubAgent, withProjectValidation };
|
|
37
|
+
export { SubAgentIsDefaultError, addFunctionToolToSubAgent, addLedgerArtifacts, addRepositories, addToolToAgent, addUserToOrganization, agentHasArtifactComponents, associateArtifactComponentWithAgent, associateDataComponentWithAgent, associateFunctionToolWithSubAgent, cascadeDeleteByAgent, cascadeDeleteByBranch, cascadeDeleteByContextConfig, cascadeDeleteByProject, cascadeDeleteBySubAgent, cascadeDeleteByTool, cascadeDeleteGitHubAccessByProject, checkProjectRepositoryAccess, cleanupTenantCache, clearContextConfigCache, clearConversationCache, clearMcpToolRepositoryAccess, clearProjectRepositoryAccess, countApiKeys, countArtifactComponents, countArtifactComponentsForAgent, countContextConfigs, countCredentialReferences, countDataComponents, countExternalAgents, countLedgerArtifactsByTask, countMessagesByConversation, countProjects, countProjectsInRuntime, createAgent, createAgentManageDatabaseConnection, createAgentToolRelation, createAgentsManageDatabaseClient, createAgentsManageDatabasePool, createAgentsRunDatabaseClient, createApiKey, createArtifactComponent, createContextConfig, createConversation, createCredentialReference, createDataComponent, createDataset, createDatasetItem, createDatasetItems, createDatasetRun, createDatasetRunConfig, createDatasetRunConfigAgentRelation, createDatasetRunConversationRelation, createDatasetRunConversationRelations, createEvaluationJobConfig, createEvaluationJobConfigEvaluatorRelation, createEvaluationResult, createEvaluationResults, createEvaluationRun, createEvaluationRunConfig, createEvaluationRunConfigEvaluationSuiteConfigRelation, createEvaluationSuiteConfig, createEvaluationSuiteConfigEvaluatorRelation, createEvaluator, createExternalAgent, createFullAgentServerSide, createFullProjectServerSide, createFunctionTool, createInstallation, createMessage, createOrGetConversation, createProject, createProjectMetadata, createProjectMetadataAndBranch, createSubAgent, createSubAgentExternalAgentRelation, createSubAgentRelation, createSubAgentTeamAgentRelation, createTask, createTool, createTrigger, createTriggerInvocation, createValidatedDataAccess, dbResultToMcpTool, dbResultToMcpToolSkeleton, deleteAgent, deleteAgentArtifactComponentRelationByAgent, deleteAgentDataComponentRelationByAgent, deleteAgentRelationsByAgent, deleteAgentToolRelation, deleteAgentToolRelationByAgent, deleteApiKey, deleteArtifactComponent, deleteContextConfig, deleteConversation, deleteCredentialReference, deleteDataComponent, deleteDataset, deleteDatasetItem, deleteDatasetItemsByDataset, deleteDatasetRun, deleteDatasetRunConfig, deleteDatasetRunConfigAgentRelation, deleteDatasetRunConversationRelation, deleteDatasetRunConversationRelationsByRun, deleteEvaluationJobConfig, deleteEvaluationJobConfigEvaluatorRelation, deleteEvaluationJobConfigEvaluatorRelationsByEvaluator, deleteEvaluationResult, deleteEvaluationResultsByRun, deleteEvaluationRun, deleteEvaluationRunConfig, deleteEvaluationRunConfigEvaluationSuiteConfigRelation, deleteEvaluationSuiteConfig, deleteEvaluationSuiteConfigEvaluatorRelation, deleteEvaluationSuiteConfigEvaluatorRelationsByEvaluator, deleteEvaluator, deleteExternalAgent, deleteFullAgent, deleteFullProject, deleteFunction, deleteFunctionTool, deleteInstallation, deleteLedgerArtifactsByContext, deleteLedgerArtifactsByTask, deleteMcpToolAccessMode, deleteMessage, deleteProject, deleteProjectAccessMode, deleteProjectMetadata, deleteProjectWithBranch, deleteSubAgent, deleteSubAgentExternalAgentRelation, deleteSubAgentExternalAgentRelationsByAgent, deleteSubAgentExternalAgentRelationsBySubAgent, deleteSubAgentRelation, deleteSubAgentTeamAgentRelation, deleteSubAgentTeamAgentRelationsByAgent, deleteSubAgentTeamAgentRelationsBySubAgent, deleteTool, deleteTrigger, disconnectInstallation, externalAgentExists, externalAgentUrlExists, fetchComponentRelationships, filterConversationsForJob, generateAndCreateApiKey, getActiveAgentForConversation, getAgentById, getAgentRelationById, getAgentRelationByParams, getAgentRelations, getAgentRelationsByAgent, getAgentRelationsBySource, getAgentSubAgentInfos, getAgentToolRelationByAgent, getAgentToolRelationById, getAgentToolRelationByTool, getAgentWithDefaultSubAgent, getAgentsForTool, getAgentsUsingArtifactComponent, getAgentsUsingDataComponent, getApiKeyById, getApiKeyByPublicId, getArtifactComponentById, getArtifactComponentsForAgent, getCacheEntry, getContextConfigById, getContextConfigCacheEntries, getConversation, getConversationCacheEntries, getConversationHistory, getCredentialReference, getCredentialReferenceById, getCredentialReferenceWithResources, getDataComponent, getDataComponentsForAgent, getDatasetById, getDatasetItemById, getDatasetRunById, getDatasetRunConfigAgentRelations, getDatasetRunConfigById, getDatasetRunConversationRelationByConversation, getDatasetRunConversationRelations, getEvaluationJobConfigById, getEvaluationJobConfigEvaluatorRelations, getEvaluationResultById, getEvaluationRunById, getEvaluationRunByJobConfigId, getEvaluationRunConfigById, getEvaluationRunConfigEvaluationSuiteConfigRelations, getEvaluationSuiteConfigById, getEvaluationSuiteConfigEvaluatorRelations, getEvaluatorById, getEvaluatorsByIds, getExternalAgent, getExternalAgentByUrl, getExternalAgentsForSubAgent, getFullAgent, getFullAgentDefinition, getFullAgentDefinitionWithRelationIds, getFullAgentWithRelationIds, getFullProject, getFullProjectWithRelationIds, getFunction, getFunctionToolById, getFunctionToolsForSubAgent, getInstallationByGitHubId, getInstallationById, getInstallationsByTenantId, getLedgerArtifacts, getLedgerArtifactsByContext, getMcpToolAccessMode, getMcpToolById, getMcpToolRepositoryAccess, getMcpToolRepositoryAccessWithDetails, getMessageById, getMessagesByConversation, getMessagesByTask, getPendingInvitationsByEmail, getProject, getProjectAccessMode, getProjectMainBranchName, getProjectMetadata, getProjectRepositoryAccess, getProjectRepositoryAccessWithDetails, getProjectResourceCounts, getProjectWithBranchInfo, getProjectWithMetadata, getRelatedAgentsForAgent, getRepositoriesByInstallationId, getRepositoriesByTenantId, getRepositoryByFullName, getRepositoryById, getRepositoryCount, getRepositoryCountsByTenantId, getSubAgentById, getSubAgentExternalAgentRelationById, getSubAgentExternalAgentRelationByParams, getSubAgentExternalAgentRelations, getSubAgentExternalAgentRelationsByAgent, getSubAgentExternalAgentRelationsByExternalAgent, getSubAgentRelationsByTarget, getSubAgentTeamAgentRelationById, getSubAgentTeamAgentRelationByParams, getSubAgentTeamAgentRelations, getSubAgentTeamAgentRelationsByAgent, getSubAgentTeamAgentRelationsByTeamAgent, getSubAgentsByIds, getSubAgentsForExternalAgent, getSubAgentsForTeamAgent, getSubAgentsUsingFunctionTool, getTask, getTeamAgentsForSubAgent, getToolById, getToolsForAgent, getTriggerById, getTriggerInvocationById, getUserByEmail, getUserById, getUserOrganizationsFromDb, getUserScopedCredentialReference, getVisibleMessages, hasApiKey, hasContextConfig, hasCredentialReference, invalidateHeadersCache, invalidateInvocationDefinitionsCache, isArtifactComponentAssociatedWithAgent, isDataComponentAssociatedWithAgent, isFunctionToolAssociatedWithSubAgent, isGithubWorkAppTool, linkDatasetRunToEvaluationJobConfig, listAgentRelations, listAgentToolRelations, listAgents, listAgentsPaginated, listApiKeys, listApiKeysPaginated, listArtifactComponents, listArtifactComponentsPaginated, listContextConfigs, listContextConfigsPaginated, listConversations, listCredentialReferences, listCredentialReferencesPaginated, listDataComponents, listDataComponentsPaginated, listDatasetItems, listDatasetRunConfigs, listDatasetRuns, listDatasetRunsByConfig, listDatasets, listEvaluationJobConfigs, listEvaluationResults, listEvaluationResultsByConversation, listEvaluationResultsByRun, listEvaluationRunConfigs, listEvaluationRunConfigsWithSuiteConfigs, listEvaluationRuns, listEvaluationRunsByJobConfigId, listEvaluationSuiteConfigs, listEvaluators, listExternalAgents, listExternalAgentsPaginated, listFunctionTools, listFunctions, listFunctionsPaginated, listMessages, listProjects, listProjectsMetadata, listProjectsMetadataPaginated, listProjectsPaginated, listProjectsWithMetadataPaginated, listSubAgentExternalAgentRelations, listSubAgentTeamAgentRelations, listSubAgents, listSubAgentsPaginated, listTaskIdsByContextId, listTools, listTriggerInvocationsPaginated, listTriggers, listTriggersPaginated, projectExists, projectExistsInTable, projectHasResources, projectsMetadataExists, removeArtifactComponentFromAgent, removeDataComponentFromAgent, removeFunctionToolFromSubAgent, removeRepositories, removeToolFromAgent, setActiveAgentForConversation, setActiveAgentForThread, setCacheEntry, setMcpToolAccessMode, setMcpToolRepositoryAccess, setProjectAccessMode, setProjectRepositoryAccess, syncRepositories, updateAgent, updateAgentRelation, updateAgentToolRelation, updateApiKey, updateApiKeyLastUsed, updateArtifactComponent, updateContextConfig, updateConversation, updateConversationActiveSubAgent, updateCredentialReference, updateDataComponent, updateDataset, updateDatasetItem, updateDatasetRunConfig, updateEvaluationResult, updateEvaluationRun, updateEvaluationRunConfig, updateEvaluationSuiteConfig, updateEvaluator, updateExternalAgent, updateFullAgentServerSide, updateFullProjectServerSide, updateFunctionTool, updateInstallationStatus, updateInstallationStatusByGitHubId, updateMessage, updateProject, updateSubAgent, updateSubAgentExternalAgentRelation, updateSubAgentFunctionToolRelation, updateSubAgentTeamAgentRelation, updateTask, updateTool, updateTrigger, updateTriggerInvocationStatus, upsertAgent, upsertAgentArtifactComponentRelation, upsertAgentDataComponentRelation, upsertArtifactComponent, upsertContextConfig, upsertCredentialReference, upsertDataComponent, upsertExternalAgent, upsertFunction, upsertFunctionTool, upsertLedgerArtifact, upsertOrganization, upsertSubAgent, upsertSubAgentExternalAgentRelation, upsertSubAgentFunctionToolRelation, upsertSubAgentRelation, upsertSubAgentTeamAgentRelation, upsertSubAgentToolRelation, upsertTool, upsertTrigger, validateAndGetApiKey, validateProjectExists, validateRepositoryOwnership, validateSubAgent, withProjectValidation };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { projects, subAgentFunctionToolRelations, subAgentToolRelations, subAgents } from "../../db/manage/manage-schema.js";
|
|
2
|
-
import { generateId } from "../../utils/conversations.js";
|
|
3
2
|
import { validateAgentStructure, validateAndTypeAgentData } from "../../validation/agentFull.js";
|
|
3
|
+
import { generateId } from "../../utils/conversations.js";
|
|
4
4
|
import { upsertContextConfig } from "./contextConfigs.js";
|
|
5
5
|
import { upsertFunction } from "./functions.js";
|
|
6
6
|
import { deleteFunctionTool, listFunctionTools, upsertFunctionTool, upsertSubAgentFunctionToolRelation } from "./functionTools.js";
|
|
@@ -940,6 +940,47 @@ const updateFullAgentServerSide = (db, logger = defaultLogger) => async (scopes,
|
|
|
940
940
|
await Promise.all(subAgentPromises);
|
|
941
941
|
const subAgentCount = Object.entries(typedAgentDefinition.subAgents).length;
|
|
942
942
|
logger.info({ subAgentCount }, "All sub-agents created/updated successfully");
|
|
943
|
+
const relinkToolRelationPromises = [];
|
|
944
|
+
for (const [subAgentId, agentData$1] of Object.entries(typedAgentDefinition.subAgents)) if (agentData$1.canUse && Array.isArray(agentData$1.canUse)) for (const canUseItem of agentData$1.canUse) {
|
|
945
|
+
if (!canUseItem.agentToolRelationId) continue;
|
|
946
|
+
relinkToolRelationPromises.push((async () => {
|
|
947
|
+
try {
|
|
948
|
+
const { toolId, toolSelection, headers, toolPolicies, agentToolRelationId } = canUseItem;
|
|
949
|
+
if (typedAgentDefinition.functionTools && toolId in typedAgentDefinition.functionTools) await upsertSubAgentFunctionToolRelation(db)({
|
|
950
|
+
scopes: {
|
|
951
|
+
tenantId,
|
|
952
|
+
projectId,
|
|
953
|
+
agentId: finalAgentId
|
|
954
|
+
},
|
|
955
|
+
subAgentId,
|
|
956
|
+
functionToolId: toolId,
|
|
957
|
+
toolPolicies,
|
|
958
|
+
relationId: agentToolRelationId
|
|
959
|
+
});
|
|
960
|
+
else await upsertSubAgentToolRelation(db)({
|
|
961
|
+
scopes: {
|
|
962
|
+
tenantId,
|
|
963
|
+
projectId,
|
|
964
|
+
agentId: finalAgentId
|
|
965
|
+
},
|
|
966
|
+
subAgentId,
|
|
967
|
+
toolId,
|
|
968
|
+
selectedTools: toolSelection,
|
|
969
|
+
headers,
|
|
970
|
+
toolPolicies,
|
|
971
|
+
relationId: agentToolRelationId
|
|
972
|
+
});
|
|
973
|
+
} catch (error) {
|
|
974
|
+
logger.error({
|
|
975
|
+
subAgentId,
|
|
976
|
+
relationId: canUseItem.agentToolRelationId,
|
|
977
|
+
toolId: canUseItem.toolId,
|
|
978
|
+
error
|
|
979
|
+
}, "Failed to relink tool relation during sub-agent update");
|
|
980
|
+
}
|
|
981
|
+
})());
|
|
982
|
+
}
|
|
983
|
+
if (relinkToolRelationPromises.length > 0) await Promise.all(relinkToolRelationPromises);
|
|
943
984
|
logger.info({}, "External agents are project-scoped and managed at the project level.");
|
|
944
985
|
const incomingSubAgentIds = new Set(Object.keys(typedAgentDefinition.subAgents));
|
|
945
986
|
const existingSubAgents = await listSubAgents(db)({ scopes: {
|
|
@@ -13,10 +13,10 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
13
13
|
createdAt: string;
|
|
14
14
|
updatedAt: string;
|
|
15
15
|
description: string | null;
|
|
16
|
-
tenantId: string;
|
|
17
16
|
projectId: string;
|
|
18
|
-
|
|
17
|
+
tenantId: string;
|
|
19
18
|
defaultSubAgentId: string | null;
|
|
19
|
+
contextConfigId: string | null;
|
|
20
20
|
models: {
|
|
21
21
|
base?: {
|
|
22
22
|
model?: string | undefined;
|
|
@@ -59,10 +59,10 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
59
59
|
createdAt: string;
|
|
60
60
|
updatedAt: string;
|
|
61
61
|
description: string | null;
|
|
62
|
-
tenantId: string;
|
|
63
62
|
projectId: string;
|
|
64
|
-
|
|
63
|
+
tenantId: string;
|
|
65
64
|
defaultSubAgentId: string | null;
|
|
65
|
+
contextConfigId: string | null;
|
|
66
66
|
models: {
|
|
67
67
|
base?: {
|
|
68
68
|
model?: string | undefined;
|
|
@@ -102,9 +102,9 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
102
102
|
createdAt: string;
|
|
103
103
|
updatedAt: string;
|
|
104
104
|
description: string | null;
|
|
105
|
-
tenantId: string;
|
|
106
105
|
agentId: string;
|
|
107
106
|
projectId: string;
|
|
107
|
+
tenantId: string;
|
|
108
108
|
models: {
|
|
109
109
|
base?: {
|
|
110
110
|
model?: string | undefined;
|
|
@@ -134,10 +134,10 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
134
134
|
createdAt: string;
|
|
135
135
|
updatedAt: string;
|
|
136
136
|
description: string | null;
|
|
137
|
-
tenantId: string;
|
|
138
137
|
projectId: string;
|
|
139
|
-
|
|
138
|
+
tenantId: string;
|
|
140
139
|
defaultSubAgentId: string | null;
|
|
140
|
+
contextConfigId: string | null;
|
|
141
141
|
models: {
|
|
142
142
|
base?: {
|
|
143
143
|
model?: string | undefined;
|
|
@@ -233,10 +233,10 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
|
|
|
233
233
|
createdAt: string;
|
|
234
234
|
updatedAt: string;
|
|
235
235
|
description: string | null;
|
|
236
|
-
tenantId: string;
|
|
237
236
|
projectId: string;
|
|
238
|
-
|
|
237
|
+
tenantId: string;
|
|
239
238
|
defaultSubAgentId: string | null;
|
|
239
|
+
contextConfigId: string | null;
|
|
240
240
|
models: {
|
|
241
241
|
base?: {
|
|
242
242
|
model?: string | undefined;
|
|
@@ -12,8 +12,8 @@ declare const getArtifactComponentById: (db: AgentsManageDatabaseClient) => (par
|
|
|
12
12
|
createdAt: string;
|
|
13
13
|
updatedAt: string;
|
|
14
14
|
description: string | null;
|
|
15
|
-
tenantId: string;
|
|
16
15
|
projectId: string;
|
|
16
|
+
tenantId: string;
|
|
17
17
|
props: Record<string, unknown> | null;
|
|
18
18
|
render: {
|
|
19
19
|
component: string;
|
|
@@ -54,8 +54,8 @@ declare const createArtifactComponent: (db: AgentsManageDatabaseClient) => (para
|
|
|
54
54
|
createdAt: string;
|
|
55
55
|
updatedAt: string;
|
|
56
56
|
description: string | null;
|
|
57
|
-
tenantId: string;
|
|
58
57
|
projectId: string;
|
|
58
|
+
tenantId: string;
|
|
59
59
|
props: Record<string, unknown> | null;
|
|
60
60
|
render: {
|
|
61
61
|
component: string;
|
|
@@ -106,9 +106,9 @@ declare const associateArtifactComponentWithAgent: (db: AgentsManageDatabaseClie
|
|
|
106
106
|
}) => Promise<{
|
|
107
107
|
id: string;
|
|
108
108
|
createdAt: string;
|
|
109
|
-
tenantId: string;
|
|
110
109
|
agentId: string;
|
|
111
110
|
projectId: string;
|
|
111
|
+
tenantId: string;
|
|
112
112
|
subAgentId: string;
|
|
113
113
|
artifactComponentId: string;
|
|
114
114
|
}>;
|
|
@@ -149,9 +149,9 @@ declare const upsertAgentArtifactComponentRelation: (db: AgentsManageDatabaseCli
|
|
|
149
149
|
}) => Promise<{
|
|
150
150
|
id: string;
|
|
151
151
|
createdAt: string;
|
|
152
|
-
tenantId: string;
|
|
153
152
|
agentId: string;
|
|
154
153
|
projectId: string;
|
|
154
|
+
tenantId: string;
|
|
155
155
|
subAgentId: string;
|
|
156
156
|
artifactComponentId: string;
|
|
157
157
|
} | null>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { artifactComponents, subAgentArtifactComponents, subAgentRelations, subAgents } from "../../db/manage/manage-schema.js";
|
|
2
2
|
import { validatePropsAsJsonSchema } from "../../validation/props-validation.js";
|
|
3
|
-
import { generateId } from "../../utils/conversations.js";
|
|
4
3
|
import { validateRender } from "../../validation/render-validation.js";
|
|
4
|
+
import { generateId } from "../../utils/conversations.js";
|
|
5
5
|
import { and, count, desc, eq } from "drizzle-orm";
|
|
6
6
|
|
|
7
7
|
//#region src/data-access/manage/artifactComponents.ts
|
|
@@ -11,11 +11,11 @@ declare const getContextConfigById: (db: AgentsManageDatabaseClient) => (params:
|
|
|
11
11
|
id: string;
|
|
12
12
|
createdAt: string;
|
|
13
13
|
updatedAt: string;
|
|
14
|
-
tenantId: string;
|
|
15
|
-
agentId: string;
|
|
16
|
-
projectId: string;
|
|
17
14
|
headersSchema: unknown;
|
|
18
15
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
16
|
+
agentId: string;
|
|
17
|
+
projectId: string;
|
|
18
|
+
tenantId: string;
|
|
19
19
|
} | undefined>;
|
|
20
20
|
declare const listContextConfigs: (db: AgentsManageDatabaseClient) => (params: {
|
|
21
21
|
scopes: AgentScopeConfig;
|
|
@@ -23,11 +23,11 @@ declare const listContextConfigs: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
23
23
|
id: string;
|
|
24
24
|
createdAt: string;
|
|
25
25
|
updatedAt: string;
|
|
26
|
-
tenantId: string;
|
|
27
|
-
agentId: string;
|
|
28
|
-
projectId: string;
|
|
29
26
|
headersSchema: unknown;
|
|
30
27
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
28
|
+
agentId: string;
|
|
29
|
+
projectId: string;
|
|
30
|
+
tenantId: string;
|
|
31
31
|
}[]>;
|
|
32
32
|
declare const listContextConfigsPaginated: (db: AgentsManageDatabaseClient) => (params: {
|
|
33
33
|
scopes: AgentScopeConfig;
|
|
@@ -45,11 +45,11 @@ declare const createContextConfig: (db: AgentsManageDatabaseClient) => (params:
|
|
|
45
45
|
id: string;
|
|
46
46
|
createdAt: string;
|
|
47
47
|
updatedAt: string;
|
|
48
|
-
tenantId: string;
|
|
49
|
-
agentId: string;
|
|
50
|
-
projectId: string;
|
|
51
48
|
headersSchema: unknown;
|
|
52
49
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
50
|
+
agentId: string;
|
|
51
|
+
projectId: string;
|
|
52
|
+
tenantId: string;
|
|
53
53
|
}>;
|
|
54
54
|
declare const updateContextConfig: (db: AgentsManageDatabaseClient) => (params: {
|
|
55
55
|
scopes: AgentScopeConfig;
|
|
@@ -85,11 +85,11 @@ declare const upsertContextConfig: (db: AgentsManageDatabaseClient) => (params:
|
|
|
85
85
|
id: string;
|
|
86
86
|
createdAt: string;
|
|
87
87
|
updatedAt: string;
|
|
88
|
-
tenantId: string;
|
|
89
|
-
agentId: string;
|
|
90
|
-
projectId: string;
|
|
91
88
|
headersSchema: unknown;
|
|
92
89
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
90
|
+
agentId: string;
|
|
91
|
+
projectId: string;
|
|
92
|
+
tenantId: string;
|
|
93
93
|
}>;
|
|
94
94
|
//#endregion
|
|
95
95
|
export { countContextConfigs, createContextConfig, deleteContextConfig, getContextConfigById, hasContextConfig, listContextConfigs, listContextConfigsPaginated, updateContextConfig, upsertContextConfig };
|
|
@@ -66,9 +66,9 @@ declare const associateDataComponentWithAgent: (db: AgentsManageDatabaseClient)
|
|
|
66
66
|
}) => Promise<{
|
|
67
67
|
id: string;
|
|
68
68
|
createdAt: string;
|
|
69
|
-
tenantId: string;
|
|
70
69
|
agentId: string;
|
|
71
70
|
projectId: string;
|
|
71
|
+
tenantId: string;
|
|
72
72
|
subAgentId: string;
|
|
73
73
|
dataComponentId: string;
|
|
74
74
|
}>;
|
|
@@ -108,9 +108,9 @@ declare const upsertAgentDataComponentRelation: (db: AgentsManageDatabaseClient)
|
|
|
108
108
|
}) => Promise<{
|
|
109
109
|
id: string;
|
|
110
110
|
createdAt: string;
|
|
111
|
-
tenantId: string;
|
|
112
111
|
agentId: string;
|
|
113
112
|
projectId: string;
|
|
113
|
+
tenantId: string;
|
|
114
114
|
subAgentId: string;
|
|
115
115
|
dataComponentId: string;
|
|
116
116
|
} | null>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { dataComponents, subAgentDataComponents } from "../../db/manage/manage-schema.js";
|
|
2
2
|
import { validatePropsAsJsonSchema } from "../../validation/props-validation.js";
|
|
3
|
+
import { validateRender } from "../../validation/render-validation.js";
|
|
3
4
|
import { generateId } from "../../utils/conversations.js";
|
|
4
5
|
import { createApiError } from "../../utils/error.js";
|
|
5
6
|
import "../../utils/index.js";
|
|
6
|
-
import { validateRender } from "../../validation/render-validation.js";
|
|
7
7
|
import { and, count, desc, eq } from "drizzle-orm";
|
|
8
8
|
|
|
9
9
|
//#region src/data-access/manage/dataComponents.ts
|
|
@@ -58,9 +58,9 @@ declare const createFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
58
58
|
createdAt: string;
|
|
59
59
|
updatedAt: string;
|
|
60
60
|
description: string | null;
|
|
61
|
-
tenantId: string;
|
|
62
61
|
agentId: string;
|
|
63
62
|
projectId: string;
|
|
63
|
+
tenantId: string;
|
|
64
64
|
functionId: string;
|
|
65
65
|
}>;
|
|
66
66
|
/**
|
|
@@ -100,9 +100,9 @@ declare const upsertFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
100
100
|
createdAt: string;
|
|
101
101
|
updatedAt: string;
|
|
102
102
|
description: string | null;
|
|
103
|
-
tenantId: string;
|
|
104
103
|
agentId: string;
|
|
105
104
|
projectId: string;
|
|
105
|
+
tenantId: string;
|
|
106
106
|
functionId: string;
|
|
107
107
|
}>;
|
|
108
108
|
declare const getFunctionToolsForSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -164,14 +164,14 @@ declare const addFunctionToolToSubAgent: (db: AgentsManageDatabaseClient) => (pa
|
|
|
164
164
|
id: string;
|
|
165
165
|
createdAt: string;
|
|
166
166
|
updatedAt: string;
|
|
167
|
-
tenantId: string;
|
|
168
167
|
agentId: string;
|
|
169
168
|
projectId: string;
|
|
170
|
-
|
|
169
|
+
tenantId: string;
|
|
170
|
+
functionToolId: string;
|
|
171
171
|
toolPolicies: Record<string, {
|
|
172
172
|
needsApproval?: boolean;
|
|
173
173
|
}> | null;
|
|
174
|
-
|
|
174
|
+
subAgentId: string;
|
|
175
175
|
}>;
|
|
176
176
|
/**
|
|
177
177
|
* Update an agent-function tool relation
|
|
@@ -229,14 +229,14 @@ declare const associateFunctionToolWithSubAgent: (db: AgentsManageDatabaseClient
|
|
|
229
229
|
id: string;
|
|
230
230
|
createdAt: string;
|
|
231
231
|
updatedAt: string;
|
|
232
|
-
tenantId: string;
|
|
233
232
|
agentId: string;
|
|
234
233
|
projectId: string;
|
|
235
|
-
|
|
234
|
+
tenantId: string;
|
|
235
|
+
functionToolId: string;
|
|
236
236
|
toolPolicies: Record<string, {
|
|
237
237
|
needsApproval?: boolean;
|
|
238
238
|
}> | null;
|
|
239
|
-
|
|
239
|
+
subAgentId: string;
|
|
240
240
|
}>;
|
|
241
241
|
//#endregion
|
|
242
242
|
export { addFunctionToolToSubAgent, associateFunctionToolWithSubAgent, createFunctionTool, deleteFunctionTool, getFunctionToolById, getFunctionToolsForSubAgent, getSubAgentsUsingFunctionTool, isFunctionToolAssociatedWithSubAgent, listFunctionTools, removeFunctionToolFromSubAgent, updateFunctionTool, updateSubAgentFunctionToolRelation, upsertFunctionTool, upsertSubAgentFunctionToolRelation };
|
|
@@ -11,11 +11,11 @@ declare const getSubAgentExternalAgentRelationById: (db: AgentsManageDatabaseCli
|
|
|
11
11
|
id: string;
|
|
12
12
|
createdAt: string;
|
|
13
13
|
updatedAt: string;
|
|
14
|
-
|
|
14
|
+
headers: Record<string, string> | null;
|
|
15
15
|
agentId: string;
|
|
16
16
|
projectId: string;
|
|
17
|
+
tenantId: string;
|
|
17
18
|
subAgentId: string;
|
|
18
|
-
headers: Record<string, string> | null;
|
|
19
19
|
externalAgentId: string;
|
|
20
20
|
} | undefined>;
|
|
21
21
|
declare const listSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -46,11 +46,11 @@ declare const getSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient
|
|
|
46
46
|
id: string;
|
|
47
47
|
createdAt: string;
|
|
48
48
|
updatedAt: string;
|
|
49
|
-
|
|
49
|
+
headers: Record<string, string> | null;
|
|
50
50
|
agentId: string;
|
|
51
51
|
projectId: string;
|
|
52
|
+
tenantId: string;
|
|
52
53
|
subAgentId: string;
|
|
53
|
-
headers: Record<string, string> | null;
|
|
54
54
|
externalAgentId: string;
|
|
55
55
|
}[]>;
|
|
56
56
|
declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -59,11 +59,11 @@ declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabas
|
|
|
59
59
|
id: string;
|
|
60
60
|
createdAt: string;
|
|
61
61
|
updatedAt: string;
|
|
62
|
-
|
|
62
|
+
headers: Record<string, string> | null;
|
|
63
63
|
agentId: string;
|
|
64
64
|
projectId: string;
|
|
65
|
+
tenantId: string;
|
|
65
66
|
subAgentId: string;
|
|
66
|
-
headers: Record<string, string> | null;
|
|
67
67
|
externalAgentId: string;
|
|
68
68
|
}[]>;
|
|
69
69
|
declare const getSubAgentExternalAgentRelationsByExternalAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -182,11 +182,11 @@ declare const createSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
|
|
|
182
182
|
id: string;
|
|
183
183
|
createdAt: string;
|
|
184
184
|
updatedAt: string;
|
|
185
|
-
|
|
185
|
+
headers: Record<string, string> | null;
|
|
186
186
|
agentId: string;
|
|
187
187
|
projectId: string;
|
|
188
|
+
tenantId: string;
|
|
188
189
|
subAgentId: string;
|
|
189
|
-
headers: Record<string, string> | null;
|
|
190
190
|
externalAgentId: string;
|
|
191
191
|
}>;
|
|
192
192
|
/**
|
|
@@ -199,11 +199,11 @@ declare const getSubAgentExternalAgentRelationByParams: (db: AgentsManageDatabas
|
|
|
199
199
|
id: string;
|
|
200
200
|
createdAt: string;
|
|
201
201
|
updatedAt: string;
|
|
202
|
-
|
|
202
|
+
headers: Record<string, string> | null;
|
|
203
203
|
agentId: string;
|
|
204
204
|
projectId: string;
|
|
205
|
+
tenantId: string;
|
|
205
206
|
subAgentId: string;
|
|
206
|
-
headers: Record<string, string> | null;
|
|
207
207
|
externalAgentId: string;
|
|
208
208
|
} | undefined>;
|
|
209
209
|
/**
|
|
@@ -220,11 +220,11 @@ declare const upsertSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
|
|
|
220
220
|
id: string;
|
|
221
221
|
createdAt: string;
|
|
222
222
|
updatedAt: string;
|
|
223
|
-
|
|
223
|
+
headers: Record<string, string> | null;
|
|
224
224
|
agentId: string;
|
|
225
225
|
projectId: string;
|
|
226
|
+
tenantId: string;
|
|
226
227
|
subAgentId: string;
|
|
227
|
-
headers: Record<string, string> | null;
|
|
228
228
|
externalAgentId: string;
|
|
229
229
|
}>;
|
|
230
230
|
declare const updateSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -11,12 +11,12 @@ declare const getAgentRelationById: (db: AgentsManageDatabaseClient) => (params:
|
|
|
11
11
|
id: string;
|
|
12
12
|
createdAt: string;
|
|
13
13
|
updatedAt: string;
|
|
14
|
-
tenantId: string;
|
|
15
14
|
agentId: string;
|
|
16
15
|
projectId: string;
|
|
17
|
-
|
|
16
|
+
tenantId: string;
|
|
18
17
|
sourceSubAgentId: string;
|
|
19
18
|
targetSubAgentId: string | null;
|
|
19
|
+
relationType: string | null;
|
|
20
20
|
} | undefined>;
|
|
21
21
|
declare const listAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
22
22
|
scopes: AgentScopeConfig;
|
|
@@ -46,12 +46,12 @@ declare const getAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
46
46
|
id: string;
|
|
47
47
|
createdAt: string;
|
|
48
48
|
updatedAt: string;
|
|
49
|
-
tenantId: string;
|
|
50
49
|
agentId: string;
|
|
51
50
|
projectId: string;
|
|
52
|
-
|
|
51
|
+
tenantId: string;
|
|
53
52
|
sourceSubAgentId: string;
|
|
54
53
|
targetSubAgentId: string | null;
|
|
54
|
+
relationType: string | null;
|
|
55
55
|
}[]>;
|
|
56
56
|
declare const getAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
57
57
|
scopes: AgentScopeConfig;
|
|
@@ -59,12 +59,12 @@ declare const getAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (par
|
|
|
59
59
|
id: string;
|
|
60
60
|
createdAt: string;
|
|
61
61
|
updatedAt: string;
|
|
62
|
-
tenantId: string;
|
|
63
62
|
agentId: string;
|
|
64
63
|
projectId: string;
|
|
65
|
-
|
|
64
|
+
tenantId: string;
|
|
66
65
|
sourceSubAgentId: string;
|
|
67
66
|
targetSubAgentId: string | null;
|
|
67
|
+
relationType: string | null;
|
|
68
68
|
}[]>;
|
|
69
69
|
declare const getAgentRelationsBySource: (db: AgentsManageDatabaseClient) => (params: {
|
|
70
70
|
scopes: AgentScopeConfig;
|
|
@@ -128,12 +128,12 @@ declare const createSubAgentRelation: (db: AgentsManageDatabaseClient) => (param
|
|
|
128
128
|
id: string;
|
|
129
129
|
createdAt: string;
|
|
130
130
|
updatedAt: string;
|
|
131
|
-
tenantId: string;
|
|
132
131
|
agentId: string;
|
|
133
132
|
projectId: string;
|
|
134
|
-
|
|
133
|
+
tenantId: string;
|
|
135
134
|
sourceSubAgentId: string;
|
|
136
135
|
targetSubAgentId: string | null;
|
|
136
|
+
relationType: string | null;
|
|
137
137
|
}>;
|
|
138
138
|
/**
|
|
139
139
|
* Check if sub-agent relation exists by agent, source, target, and relation type
|
|
@@ -147,12 +147,12 @@ declare const getAgentRelationByParams: (db: AgentsManageDatabaseClient) => (par
|
|
|
147
147
|
id: string;
|
|
148
148
|
createdAt: string;
|
|
149
149
|
updatedAt: string;
|
|
150
|
-
tenantId: string;
|
|
151
150
|
agentId: string;
|
|
152
151
|
projectId: string;
|
|
153
|
-
|
|
152
|
+
tenantId: string;
|
|
154
153
|
sourceSubAgentId: string;
|
|
155
154
|
targetSubAgentId: string | null;
|
|
155
|
+
relationType: string | null;
|
|
156
156
|
} | undefined>;
|
|
157
157
|
/**
|
|
158
158
|
* Upsert agent relation (create if it doesn't exist, no-op if it does)
|
|
@@ -161,12 +161,12 @@ declare const upsertSubAgentRelation: (db: AgentsManageDatabaseClient) => (param
|
|
|
161
161
|
id: string;
|
|
162
162
|
createdAt: string;
|
|
163
163
|
updatedAt: string;
|
|
164
|
-
tenantId: string;
|
|
165
164
|
agentId: string;
|
|
166
165
|
projectId: string;
|
|
167
|
-
|
|
166
|
+
tenantId: string;
|
|
168
167
|
sourceSubAgentId: string;
|
|
169
168
|
targetSubAgentId: string | null;
|
|
169
|
+
relationType: string | null;
|
|
170
170
|
}>;
|
|
171
171
|
declare const updateAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
172
172
|
scopes: AgentScopeConfig;
|
|
@@ -206,16 +206,16 @@ declare const createAgentToolRelation: (db: AgentsManageDatabaseClient) => (para
|
|
|
206
206
|
id: string;
|
|
207
207
|
createdAt: string;
|
|
208
208
|
updatedAt: string;
|
|
209
|
-
|
|
209
|
+
headers: Record<string, string> | null;
|
|
210
210
|
agentId: string;
|
|
211
211
|
projectId: string;
|
|
212
|
-
|
|
213
|
-
headers: Record<string, string> | null;
|
|
214
|
-
toolId: string;
|
|
215
|
-
selectedTools: string[] | null;
|
|
212
|
+
tenantId: string;
|
|
216
213
|
toolPolicies: Record<string, {
|
|
217
214
|
needsApproval?: boolean;
|
|
218
215
|
}> | null;
|
|
216
|
+
subAgentId: string;
|
|
217
|
+
toolId: string;
|
|
218
|
+
selectedTools: string[] | null;
|
|
219
219
|
}>;
|
|
220
220
|
declare const updateAgentToolRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
221
221
|
scopes: AgentScopeConfig;
|
|
@@ -250,16 +250,16 @@ declare const getAgentToolRelationById: (db: AgentsManageDatabaseClient) => (par
|
|
|
250
250
|
id: string;
|
|
251
251
|
createdAt: string;
|
|
252
252
|
updatedAt: string;
|
|
253
|
-
|
|
253
|
+
headers: Record<string, string> | null;
|
|
254
254
|
agentId: string;
|
|
255
255
|
projectId: string;
|
|
256
|
-
|
|
257
|
-
headers: Record<string, string> | null;
|
|
258
|
-
toolId: string;
|
|
259
|
-
selectedTools: string[] | null;
|
|
256
|
+
tenantId: string;
|
|
260
257
|
toolPolicies: Record<string, {
|
|
261
258
|
needsApproval?: boolean;
|
|
262
259
|
}> | null;
|
|
260
|
+
subAgentId: string;
|
|
261
|
+
toolId: string;
|
|
262
|
+
selectedTools: string[] | null;
|
|
263
263
|
} | undefined>;
|
|
264
264
|
declare const getAgentToolRelationByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
265
265
|
scopes: SubAgentScopeConfig;
|