@inkeep/agents-core 0.70.1 → 0.70.3

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.
Files changed (55) hide show
  1. package/dist/auth/auth-schema.d.ts +163 -163
  2. package/dist/auth/auth-validation-schemas.d.ts +154 -154
  3. package/dist/auth/permissions.d.ts +9 -9
  4. package/dist/client-exports.d.ts +2 -2
  5. package/dist/client-exports.js +2 -2
  6. package/dist/data-access/index.d.ts +4 -2
  7. package/dist/data-access/index.js +4 -2
  8. package/dist/data-access/manage/agents.d.ts +36 -36
  9. package/dist/data-access/manage/artifactComponents.d.ts +6 -6
  10. package/dist/data-access/manage/contextConfigs.d.ts +4 -4
  11. package/dist/data-access/manage/dataComponents.d.ts +2 -2
  12. package/dist/data-access/manage/functionTools.d.ts +8 -8
  13. package/dist/data-access/manage/improvementRowRevert.d.ts +29 -0
  14. package/dist/data-access/manage/improvementRowRevert.js +84 -0
  15. package/dist/data-access/manage/skills.d.ts +10 -10
  16. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +12 -12
  17. package/dist/data-access/manage/subAgentRelations.d.ts +12 -12
  18. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +12 -12
  19. package/dist/data-access/manage/subAgents.d.ts +12 -12
  20. package/dist/data-access/manage/tools.d.ts +18 -18
  21. package/dist/data-access/manage/triggers.d.ts +6 -6
  22. package/dist/data-access/runtime/apiKeys.d.ts +8 -8
  23. package/dist/data-access/runtime/apps.d.ts +12 -12
  24. package/dist/data-access/runtime/apps.js +2 -2
  25. package/dist/data-access/runtime/conversations.d.ts +24 -24
  26. package/dist/data-access/runtime/feedback.d.ts +16 -5
  27. package/dist/data-access/runtime/feedback.js +18 -2
  28. package/dist/data-access/runtime/improvementRuns.d.ts +49 -0
  29. package/dist/data-access/runtime/improvementRuns.js +41 -0
  30. package/dist/data-access/runtime/messages.d.ts +21 -21
  31. package/dist/data-access/runtime/scheduledTriggerUsers.d.ts +1 -1
  32. package/dist/data-access/runtime/tasks.d.ts +6 -6
  33. package/dist/db/manage/manage-schema.d.ts +366 -366
  34. package/dist/db/runtime/runtime-schema.d.ts +195 -12
  35. package/dist/db/runtime/runtime-schema.js +18 -1
  36. package/dist/dolt/diff.d.ts +2 -1
  37. package/dist/dolt/fk-map.d.ts +10 -1
  38. package/dist/dolt/fk-map.js +37 -1
  39. package/dist/dolt/index.d.ts +3 -3
  40. package/dist/dolt/index.js +3 -3
  41. package/dist/dolt/pk-map.d.ts +5 -1
  42. package/dist/dolt/pk-map.js +17 -1
  43. package/dist/index.d.ts +8 -6
  44. package/dist/index.js +8 -6
  45. package/dist/utils/error.d.ts +51 -51
  46. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  47. package/dist/validation/index.d.ts +2 -2
  48. package/dist/validation/index.js +2 -2
  49. package/dist/validation/schemas/skills.d.ts +48 -48
  50. package/dist/validation/schemas.d.ts +2401 -2168
  51. package/dist/validation/schemas.js +131 -2
  52. package/drizzle/runtime/0038_windy_kinsey_walden.sql +15 -0
  53. package/drizzle/runtime/meta/0038_snapshot.json +6111 -0
  54. package/drizzle/runtime/meta/_journal.json +7 -0
  55. package/package.json +1 -1
@@ -26,6 +26,7 @@ import { associateDataComponentWithAgent, countDataComponents, createDataCompone
26
26
  import { createFullAgentServerSide, deleteFullAgent, getFullAgent, getFullAgentWithRelationIds, updateFullAgentServerSide } from "./manage/agentFull.js";
27
27
  import { listAgentIdsByProject, listContextConfigIdsByProject, listToolIdsByProject } from "./manage/audit-queries.js";
28
28
  import { createAgentDatasetRelation, createAgentEvaluatorRelation, createDataset, createDatasetItem, createDatasetItems, createDatasetRunConfig, createDatasetRunConfigAgentRelation, createEvaluationJobConfig, createEvaluationJobConfigEvaluatorRelation, createEvaluationRunConfig, createEvaluationRunConfigEvaluationSuiteConfigRelation, createEvaluationSuiteConfig, createEvaluationSuiteConfigEvaluatorRelation, createEvaluator, deleteAgentDatasetRelation, deleteAgentEvaluatorRelation, deleteDataset, deleteDatasetItem, deleteDatasetItemsByDataset, deleteDatasetRunConfig, deleteDatasetRunConfigAgentRelation, deleteEvaluationJobConfig, deleteEvaluationJobConfigEvaluatorRelation, deleteEvaluationJobConfigEvaluatorRelationsByEvaluator, deleteEvaluationRunConfig, deleteEvaluationRunConfigEvaluationSuiteConfigRelation, deleteEvaluationSuiteConfig, deleteEvaluationSuiteConfigEvaluatorRelation, deleteEvaluationSuiteConfigEvaluatorRelationsByEvaluator, deleteEvaluator, getAgentDatasetRelationsByAgent, getAgentDatasetRelationsByDataset, getAgentEvaluatorRelationsByAgent, getAgentEvaluatorRelationsByEvaluator, getAgentIdsForEvaluators, getDatasetById, getDatasetItemById, getDatasetRunConfigAgentRelations, getDatasetRunConfigById, getEvaluationJobConfigById, getEvaluationJobConfigEvaluatorRelations, getEvaluationRunConfigById, getEvaluationRunConfigEvaluationSuiteConfigRelations, getEvaluationSuiteConfigById, getEvaluationSuiteConfigEvaluatorRelations, getEvaluatorById, getEvaluatorsByIds, linkDatasetRunToEvaluationJobConfig, listDatasetItems, listDatasetRunConfigs, listDatasets, listDatasetsForAgent, listEvaluationJobConfigs, listEvaluationRunConfigs, listEvaluationRunConfigsWithSuiteConfigs, listEvaluationSuiteConfigs, listEvaluators, listEvaluatorsForAgent, updateDataset, updateDatasetItem, updateDatasetRunConfig, updateEvaluationRunConfig, updateEvaluationSuiteConfig, updateEvaluator } from "./manage/evalConfig.js";
29
+ import { revertImprovementRows } from "./manage/improvementRowRevert.js";
29
30
  import { countProjects, createProject, deleteProject, getProject, getProjectResourceCounts, listProjects, listProjectsPaginated, projectExists, projectExistsInTable, projectHasResources, updateProject } from "./manage/projects.js";
30
31
  import { createFullProjectServerSide, deleteFullProject, getFullProject, getFullProjectWithRelationIds, updateFullProjectServerSide } from "./manage/projectFull.js";
31
32
  import { countApiKeys, createApiKey, deleteApiKey, generateAndCreateApiKey, getApiKeyById, getApiKeyByPublicId, hasApiKey, listApiKeys, listApiKeysPaginated, updateApiKey, updateApiKeyLastUsed, validateAndGetApiKey } from "./runtime/apiKeys.js";
@@ -33,7 +34,8 @@ import { listApiKeysByProject, listContextCacheByProject, listGitHubToolAccessBy
33
34
  import { cleanupTenantCache, clearContextConfigCache, clearConversationCache, getCacheEntry, getContextConfigCacheEntries, getConversationCacheEntries, invalidateHeadersCache, invalidateInvocationDefinitionsCache, setCacheEntry } from "./runtime/contextCache.js";
34
35
  import { createConversation, createOrGetConversation, deleteConversation, getActiveAgentForConversation, getConversation, getConversationHistory, listConversations, setActiveAgentForConversation, setActiveAgentForThread, updateConversation, updateConversationActiveSubAgent } from "./runtime/conversations.js";
35
36
  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";
36
- import { createFeedback, deleteFeedback, getFeedbackById, listFeedback, listFeedbackByConversation, updateFeedback } from "./runtime/feedback.js";
37
+ import { createFeedback, deleteFeedback, getFeedbackById, getFeedbackByIds, listFeedback, listFeedbackByConversation, updateFeedback } from "./runtime/feedback.js";
38
+ import { createCoPilotRun, deleteCoPilotRunsByBranchName, getCoPilotRunByBranchName, getCoPilotRunByRef, listCoPilotRuns, listCoPilotRunsByBranchName, updateCoPilotRunStatusByConversationId } from "./runtime/improvementRuns.js";
37
39
  import { createInvitationProjectAssignments, deleteInvitationProjectAssignments, getProjectAssignmentsForInvitation } from "./runtime/invitationProjectAssignments.js";
38
40
  import { addLedgerArtifacts, countLedgerArtifactsByTask, deleteLedgerArtifactsByContext, deleteLedgerArtifactsByTask, getLedgerArtifacts, getLedgerArtifactsByContext, updateLedgerArtifactParts, upsertLedgerArtifact } from "./runtime/ledgerArtifacts.js";
39
41
  import { countMessagesByConversation, countVisibleMessages, createMessage, deleteMessage, getMessageById, getMessagesByConversation, getMessagesByTask, getVisibleMessages, listMessages, updateMessage } from "./runtime/messages.js";
@@ -50,4 +52,4 @@ import { getOrganizationMemberByEmail, getOrganizationMemberByUserId, getUserByE
50
52
  import { createWorkflowExecution, getWorkflowExecution, getWorkflowExecutionByConversation, updateWorkflowExecutionStatus } from "./runtime/workflowExecutions.js";
51
53
  import { createValidatedDataAccess, validateProjectExists, withProjectValidation } from "./validation.js";
52
54
 
53
- export { SubAgentIsDefaultError, addConversationIdToInvocation, addFunctionToolToSubAgent, addLedgerArtifacts, addRepositories, addToolToAgent, addUserToOrganization, advanceScheduledTriggerNextRunAt, agentHasArtifactComponents, allowedMethodsToMethodOptions, associateArtifactComponentWithAgent, associateDataComponentWithAgent, associateFunctionToolWithSubAgent, cancelPastPendingInvocationsForTrigger, cancelPendingInvocationsForTrigger, cascadeDeleteByAgent, cascadeDeleteByBranch, cascadeDeleteByContextConfig, cascadeDeleteByProject, cascadeDeleteBySubAgent, cascadeDeleteByTool, cascadeDeleteGitHubAccessByProject, checkProjectRepositoryAccess, cleanupExpiredStreamChunks, cleanupTenantCache, clearAppDefaultsByAgent, clearAppDefaultsByProject, clearContextConfigCache, clearConversationCache, clearDevConfigWorkspaceDefaultsByAgent, clearDevConfigWorkspaceDefaultsByProject, clearMcpToolRepositoryAccess, clearProjectRepositoryAccess, clearSchedulerState, clearWorkspaceDefaultsByAgent, clearWorkspaceDefaultsByProject, countApiKeys, countArtifactComponents, countArtifactComponentsForAgent, countContextConfigs, countCredentialReferences, countDataComponents, countExternalAgents, countLedgerArtifactsByTask, countMessagesByConversation, countProjects, countProjectsInRuntime, countVisibleMessages, createAgent, createAgentDatasetRelation, createAgentEvaluatorRelation, createAgentManageDatabaseConnection, createAgentToolRelation, createAgentsManageDatabaseClient, createAgentsManageDatabasePool, createAgentsRunDatabaseClient, createApiKey, createApp, createArtifactComponent, createContextConfig, createConversation, createCredentialReference, createDataComponent, createDataset, createDatasetItem, createDatasetItems, createDatasetRun, createDatasetRunConfig, createDatasetRunConfigAgentRelation, createDatasetRunConversationRelation, createDatasetRunConversationRelations, createEvaluationJobConfig, createEvaluationJobConfigEvaluatorRelation, createEvaluationResult, createEvaluationResults, createEvaluationRun, createEvaluationRunConfig, createEvaluationRunConfigEvaluationSuiteConfigRelation, createEvaluationSuiteConfig, createEvaluationSuiteConfigEvaluatorRelation, createEvaluator, createExternalAgent, createFeedback, createFullAgentServerSide, createFullProjectServerSide, createFunctionTool, createInstallation, createInvitationInDb, createInvitationProjectAssignments, createMessage, createOrGetConversation, createProject, createProjectMetadata, createProjectMetadataAndBranch, createScheduledTrigger, createScheduledTriggerInvocation, createScheduledTriggerUser, createSkill, createSkillFileById, createSubAgent, createSubAgentExternalAgentRelation, createSubAgentRelation, createSubAgentTeamAgentRelation, createTask, createTool, createTrigger, createTriggerInvocation, createTriggerUser, createTriggerWithUsers, createUserProfileIfNotExists, createValidatedDataAccess, createWorkAppSlackChannelAgentConfig, createWorkAppSlackUserMapping, createWorkAppSlackWorkspace, createWorkflowExecution, dalCountMembersByRoleBucket, dalGetServiceAccountUserId, dalResolveEntitlement, dalSelectEntitlementForUpdate, dalSumSeatEntitlements, dbResultToMcpTool, dbResultToMcpToolSkeleton, deleteAgent, deleteAgentArtifactComponentRelationByAgent, deleteAgentDataComponentRelationByAgent, deleteAgentDatasetRelation, deleteAgentEvaluatorRelation, deleteAgentRelationsByAgent, deleteAgentToolRelation, deleteAgentToolRelationByAgent, deleteAllSlackMcpToolAccessConfigsByTenant, deleteAllWorkAppSlackChannelAgentConfigsByTeam, deleteAllWorkAppSlackUserMappingsByTeam, deleteApiKey, deleteApp, deleteAppForProject, deleteAppForTenant, deleteAppsByProject, 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, deleteFeedback, deleteFullAgent, deleteFullProject, deleteFunction, deleteFunctionTool, deleteInstallation, deleteInvitationProjectAssignments, deleteLedgerArtifactsByContext, deleteLedgerArtifactsByTask, deleteMcpToolAccessMode, deleteMessage, deletePendingInvocationsForTrigger, deleteProject, deleteProjectAccessMode, deleteProjectAndBranches, deleteProjectMetadata, deleteScheduledTrigger, deleteScheduledTriggerUser, deleteScheduledTriggersByRunAsUserId, deleteSkill, deleteSkillFileById, deleteSlackMcpToolAccessConfig, deleteStreamChunks, deleteSubAgent, deleteSubAgentExternalAgentRelation, deleteSubAgentExternalAgentRelationsByAgent, deleteSubAgentExternalAgentRelationsBySubAgent, deleteSubAgentRelation, deleteSubAgentSkill, deleteSubAgentTeamAgentRelation, deleteSubAgentTeamAgentRelationsByAgent, deleteSubAgentTeamAgentRelationsBySubAgent, deleteTool, deleteTrigger, deleteTriggerUser, deleteTriggersByRunAsUserId, deleteWorkAppSlackChannelAgentConfig, deleteWorkAppSlackChannelAgentConfigsByAgent, deleteWorkAppSlackChannelAgentConfigsByProject, deleteWorkAppSlackUserMapping, deleteWorkAppSlackWorkspace, deleteWorkAppSlackWorkspaceByNangoConnectionId, disconnectInstallation, externalAgentExists, externalAgentUrlExists, fetchComponentRelationships, filterConversationsForJob, findDueScheduledTriggersAcrossProjects, findWorkAppSlackChannelAgentConfig, findWorkAppSlackUserMapping, findWorkAppSlackUserMappingByInkeepUserId, findWorkAppSlackUserMappingBySlackUser, findWorkAppSlackWorkspaceByNangoConnectionId, findWorkAppSlackWorkspaceBySlackTeamId, findWorkAppSlackWorkspaceByTeamId, generateAndCreateApiKey, getActiveAgentForConversation, getAgentById, getAgentDatasetRelationsByAgent, getAgentDatasetRelationsByDataset, getAgentEvaluatorRelationsByAgent, getAgentEvaluatorRelationsByEvaluator, getAgentIdsForEvaluators, getAgentRelationById, getAgentRelationByParams, getAgentRelations, getAgentRelationsByAgent, getAgentRelationsBySource, getAgentSubAgentInfos, getAgentToolRelationByAgent, getAgentToolRelationById, getAgentToolRelationByTool, getAgentWithDefaultSubAgent, getAgentsForTool, getAgentsUsingArtifactComponent, getAgentsUsingDataComponent, getAllowedAuthMethods, getApiKeyById, getApiKeyByPublicId, getAppAuthKeysForProject, getAppById, getAppByIdForProject, getAppByIdForTenant, getArtifactComponentById, getArtifactComponentsForAgent, getAuthLookupForEmail, 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, getFeedbackById, getFilteredAuthMethodsForEmail, getFullAgent, getFullAgentDefinition, getFullAgentDefinitionWithRelationIds, getFullAgentWithRelationIds, getFullProject, getFullProjectWithRelationIds, getFunction, getFunctionToolById, getFunctionToolsForSubAgent, getInstallationByGitHubId, getInstallationById, getInstallationsByTenantId, getLedgerArtifacts, getLedgerArtifactsByContext, getMcpToolAccessMode, getMcpToolById, getMcpToolRepositoryAccess, getMcpToolRepositoryAccessWithDetails, getMessageById, getMessagesByConversation, getMessagesByTask, getOrganizationMemberByEmail, getOrganizationMemberByUserId, getPendingInvitationsByEmail, getProject, getProjectAccessMode, getProjectAssignmentsForInvitation, getProjectMainBranchName, getProjectMetadata, getProjectRepositoryAccess, getProjectRepositoryAccessWithDetails, getProjectResourceCounts, getProjectWithBranchInfo, getProjectWithMetadata, getRelatedAgentsForAgent, getRepositoriesByInstallationId, getRepositoriesByTenantId, getRepositoryByFullName, getRepositoryById, getRepositoryCount, getRepositoryCountsByTenantId, getSSOProvidersByDomain, getScheduledTriggerById, getScheduledTriggerInvocationById, getScheduledTriggerInvocationByIdempotencyKey, getScheduledTriggerInvocationStatusSummary, getScheduledTriggerRunInfoBatch, getScheduledTriggerUserCount, getScheduledTriggerUsers, getScheduledTriggerUsersBatch, getSchedulerState, getSkillById, getSkillByIdWithFiles, getSkillFileById, getSkillFilesBySkillIds, getSkillsForSubAgents, getSlackMcpToolAccessConfig, getStreamChunks, getSubAgentById, getSubAgentExternalAgentRelationById, getSubAgentExternalAgentRelationByParams, getSubAgentExternalAgentRelations, getSubAgentExternalAgentRelationsByAgent, getSubAgentExternalAgentRelationsByExternalAgent, getSubAgentRelationsByTarget, getSubAgentTeamAgentRelationById, getSubAgentTeamAgentRelationByParams, getSubAgentTeamAgentRelations, getSubAgentTeamAgentRelationsByAgent, getSubAgentTeamAgentRelationsByTeamAgent, getSubAgentsByIds, getSubAgentsForExternalAgent, getSubAgentsForTeamAgent, getSubAgentsUsingFunctionTool, getTask, getTeamAgentsForSubAgent, getToolById, getToolsForAgent, getTriggerById, getTriggerIdsWithUser, getTriggerInvocationById, getTriggerUserCount, getTriggerUsers, getTriggerUsersBatch, getUserByEmail, getUserById, getUserOrganizationsFromDb, getUserProfile, getUserProvidersFromDb, getUserScopedCredentialReference, getVisibleMessages, getWebhookTriggerIdsWithUser, getWorkflowExecution, getWorkflowExecutionByConversation, hasApiKey, hasContextConfig, hasCredentialReference, insertStreamChunks, invalidateHeadersCache, invalidateInvocationDefinitionsCache, isArtifactComponentAssociatedWithAgent, isDataComponentAssociatedWithAgent, isFunctionToolAssociatedWithSubAgent, isGithubWorkAppTool, isSlackWorkAppTool, linkDatasetRunToEvaluationJobConfig, listAgentIdsByProject, listAgentRelations, listAgentToolRelations, listAgents, listAgentsAcrossProjectMainBranches, listAgentsPaginated, listApiKeys, listApiKeysByProject, listApiKeysPaginated, listAppsPaginated, listArtifactComponents, listArtifactComponentsPaginated, listContextCacheByProject, listContextConfigIdsByProject, listContextConfigs, listContextConfigsPaginated, listConversations, listCredentialReferences, listCredentialReferencesPaginated, listDataComponents, listDataComponentsPaginated, listDatasetItems, listDatasetRunConfigs, listDatasetRuns, listDatasetRunsByConfig, listDatasets, listDatasetsForAgent, listEvaluationJobConfigs, listEvaluationResults, listEvaluationResultsByConversation, listEvaluationResultsByRun, listEvaluationRunConfigs, listEvaluationRunConfigsWithSuiteConfigs, listEvaluationRuns, listEvaluationRunsByJobConfigId, listEvaluationSuiteConfigs, listEvaluators, listEvaluatorsForAgent, listExternalAgents, listExternalAgentsPaginated, listFeedback, listFeedbackByConversation, listFunctionTools, listFunctions, listFunctionsPaginated, listGitHubToolAccessByProject, listGitHubToolAccessModeByProject, listMessages, listOrgEntitlements, listPendingScheduledTriggerInvocations, listProjectScheduledTriggerInvocationsPaginated, listProjects, listProjectsMetadata, listProjectsMetadataPaginated, listProjectsPaginated, listProjectsWithMetadataPaginated, listScheduledTriggerInvocationsByTriggerId, listScheduledTriggerInvocationsPaginated, listScheduledTriggers, listScheduledTriggersPaginated, listSkills, listSkillsWithFiles, listSlackChannelAgentConfigsByProject, listSlackToolAccessConfigByProject, listSubAgentExternalAgentRelations, listSubAgentTeamAgentRelations, listSubAgents, listSubAgentsPaginated, listTaskIdsByContextId, listToolIdsByProject, listTools, listTriggerInvocationsPaginated, listTriggers, listTriggersPaginated, listUpcomingInvocationsForAgentPaginated, listWorkAppSlackChannelAgentConfigsByTeam, listWorkAppSlackUserMappingsByTeam, listWorkAppSlackWorkspacesByTenant, markScheduledTriggerInvocationCancelled, markScheduledTriggerInvocationCompleted, markScheduledTriggerInvocationFailed, markScheduledTriggerInvocationRunning, markStreamComplete, projectExists, projectExistsInTable, projectHasResources, projectsMetadataExists, removeArtifactComponentFromAgent, removeDataComponentFromAgent, removeFunctionToolFromSubAgent, removeRepositories, removeToolFromAgent, removeUserFromProjectScheduledTriggers, removeUserFromProjectTriggerUsers, resetCancelledInvocationToPending, resolveSlackUserContext, setActiveAgentForConversation, setActiveAgentForThread, setCacheEntry, setMcpToolAccessMode, setMcpToolRepositoryAccess, setProjectAccessMode, setProjectRepositoryAccess, setScheduledTriggerUsers, setSlackMcpToolAccessConfig, setTriggerUsers, syncRepositories, updateAgent, updateAgentRelation, updateAgentToolRelation, updateApiKey, updateApiKeyLastUsed, updateApp, updateAppAuthKeysForProject, updateAppForProject, updateAppForTenant, updateAppLastUsed, updateArtifactComponent, updateContextConfig, updateConversation, updateConversationActiveSubAgent, updateCredentialReference, updateDataComponent, updateDataset, updateDatasetItem, updateDatasetRunConfig, updateEvaluationResult, updateEvaluationRun, updateEvaluationRunConfig, updateEvaluationSuiteConfig, updateEvaluator, updateExternalAgent, updateFeedback, updateFullAgentServerSide, updateFullProjectServerSide, updateFunctionTool, updateInstallationStatus, updateInstallationStatusByGitHubId, updateLedgerArtifactParts, updateMessage, updateProject, updateScheduledTrigger, updateScheduledTriggerInvocationStatus, updateSkill, updateSkillFileById, updateSlackMcpToolAccessChannelIds, updateSubAgent, updateSubAgentExternalAgentRelation, updateSubAgentFunctionToolRelation, updateSubAgentTeamAgentRelation, updateTask, updateTool, updateTrigger, updateTriggerInvocationStatus, updateWorkAppSlackWorkspace, updateWorkflowExecutionStatus, upsertAgent, upsertAgentArtifactComponentRelation, upsertAgentDataComponentRelation, upsertArtifactComponent, upsertContextConfig, upsertCredentialReference, upsertDataComponent, upsertExternalAgent, upsertFunction, upsertFunctionTool, upsertLedgerArtifact, upsertOrganization, upsertScheduledTrigger, upsertSchedulerState, upsertSkill, upsertSubAgent, upsertSubAgentExternalAgentRelation, upsertSubAgentFunctionToolRelation, upsertSubAgentRelation, upsertSubAgentSkill, upsertSubAgentTeamAgentRelation, upsertSubAgentToolRelation, upsertTool, upsertTrigger, upsertUserProfile, upsertWorkAppSlackChannelAgentConfig, validateAndGetApiKey, validateProjectExists, validateRepositoryOwnership, validateSubAgent, withProjectValidation };
55
+ export { SubAgentIsDefaultError, addConversationIdToInvocation, addFunctionToolToSubAgent, addLedgerArtifacts, addRepositories, addToolToAgent, addUserToOrganization, advanceScheduledTriggerNextRunAt, agentHasArtifactComponents, allowedMethodsToMethodOptions, associateArtifactComponentWithAgent, associateDataComponentWithAgent, associateFunctionToolWithSubAgent, cancelPastPendingInvocationsForTrigger, cancelPendingInvocationsForTrigger, cascadeDeleteByAgent, cascadeDeleteByBranch, cascadeDeleteByContextConfig, cascadeDeleteByProject, cascadeDeleteBySubAgent, cascadeDeleteByTool, cascadeDeleteGitHubAccessByProject, checkProjectRepositoryAccess, cleanupExpiredStreamChunks, cleanupTenantCache, clearAppDefaultsByAgent, clearAppDefaultsByProject, clearContextConfigCache, clearConversationCache, clearDevConfigWorkspaceDefaultsByAgent, clearDevConfigWorkspaceDefaultsByProject, clearMcpToolRepositoryAccess, clearProjectRepositoryAccess, clearSchedulerState, clearWorkspaceDefaultsByAgent, clearWorkspaceDefaultsByProject, countApiKeys, countArtifactComponents, countArtifactComponentsForAgent, countContextConfigs, countCredentialReferences, countDataComponents, countExternalAgents, countLedgerArtifactsByTask, countMessagesByConversation, countProjects, countProjectsInRuntime, countVisibleMessages, createAgent, createAgentDatasetRelation, createAgentEvaluatorRelation, createAgentManageDatabaseConnection, createAgentToolRelation, createAgentsManageDatabaseClient, createAgentsManageDatabasePool, createAgentsRunDatabaseClient, createApiKey, createApp, createArtifactComponent, createCoPilotRun, createContextConfig, createConversation, createCredentialReference, createDataComponent, createDataset, createDatasetItem, createDatasetItems, createDatasetRun, createDatasetRunConfig, createDatasetRunConfigAgentRelation, createDatasetRunConversationRelation, createDatasetRunConversationRelations, createEvaluationJobConfig, createEvaluationJobConfigEvaluatorRelation, createEvaluationResult, createEvaluationResults, createEvaluationRun, createEvaluationRunConfig, createEvaluationRunConfigEvaluationSuiteConfigRelation, createEvaluationSuiteConfig, createEvaluationSuiteConfigEvaluatorRelation, createEvaluator, createExternalAgent, createFeedback, createFullAgentServerSide, createFullProjectServerSide, createFunctionTool, createInstallation, createInvitationInDb, createInvitationProjectAssignments, createMessage, createOrGetConversation, createProject, createProjectMetadata, createProjectMetadataAndBranch, createScheduledTrigger, createScheduledTriggerInvocation, createScheduledTriggerUser, createSkill, createSkillFileById, createSubAgent, createSubAgentExternalAgentRelation, createSubAgentRelation, createSubAgentTeamAgentRelation, createTask, createTool, createTrigger, createTriggerInvocation, createTriggerUser, createTriggerWithUsers, createUserProfileIfNotExists, createValidatedDataAccess, createWorkAppSlackChannelAgentConfig, createWorkAppSlackUserMapping, createWorkAppSlackWorkspace, createWorkflowExecution, dalCountMembersByRoleBucket, dalGetServiceAccountUserId, dalResolveEntitlement, dalSelectEntitlementForUpdate, dalSumSeatEntitlements, dbResultToMcpTool, dbResultToMcpToolSkeleton, deleteAgent, deleteAgentArtifactComponentRelationByAgent, deleteAgentDataComponentRelationByAgent, deleteAgentDatasetRelation, deleteAgentEvaluatorRelation, deleteAgentRelationsByAgent, deleteAgentToolRelation, deleteAgentToolRelationByAgent, deleteAllSlackMcpToolAccessConfigsByTenant, deleteAllWorkAppSlackChannelAgentConfigsByTeam, deleteAllWorkAppSlackUserMappingsByTeam, deleteApiKey, deleteApp, deleteAppForProject, deleteAppForTenant, deleteAppsByProject, deleteArtifactComponent, deleteCoPilotRunsByBranchName, 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, deleteFeedback, deleteFullAgent, deleteFullProject, deleteFunction, deleteFunctionTool, deleteInstallation, deleteInvitationProjectAssignments, deleteLedgerArtifactsByContext, deleteLedgerArtifactsByTask, deleteMcpToolAccessMode, deleteMessage, deletePendingInvocationsForTrigger, deleteProject, deleteProjectAccessMode, deleteProjectAndBranches, deleteProjectMetadata, deleteScheduledTrigger, deleteScheduledTriggerUser, deleteScheduledTriggersByRunAsUserId, deleteSkill, deleteSkillFileById, deleteSlackMcpToolAccessConfig, deleteStreamChunks, deleteSubAgent, deleteSubAgentExternalAgentRelation, deleteSubAgentExternalAgentRelationsByAgent, deleteSubAgentExternalAgentRelationsBySubAgent, deleteSubAgentRelation, deleteSubAgentSkill, deleteSubAgentTeamAgentRelation, deleteSubAgentTeamAgentRelationsByAgent, deleteSubAgentTeamAgentRelationsBySubAgent, deleteTool, deleteTrigger, deleteTriggerUser, deleteTriggersByRunAsUserId, deleteWorkAppSlackChannelAgentConfig, deleteWorkAppSlackChannelAgentConfigsByAgent, deleteWorkAppSlackChannelAgentConfigsByProject, deleteWorkAppSlackUserMapping, deleteWorkAppSlackWorkspace, deleteWorkAppSlackWorkspaceByNangoConnectionId, disconnectInstallation, externalAgentExists, externalAgentUrlExists, fetchComponentRelationships, filterConversationsForJob, findDueScheduledTriggersAcrossProjects, findWorkAppSlackChannelAgentConfig, findWorkAppSlackUserMapping, findWorkAppSlackUserMappingByInkeepUserId, findWorkAppSlackUserMappingBySlackUser, findWorkAppSlackWorkspaceByNangoConnectionId, findWorkAppSlackWorkspaceBySlackTeamId, findWorkAppSlackWorkspaceByTeamId, generateAndCreateApiKey, getActiveAgentForConversation, getAgentById, getAgentDatasetRelationsByAgent, getAgentDatasetRelationsByDataset, getAgentEvaluatorRelationsByAgent, getAgentEvaluatorRelationsByEvaluator, getAgentIdsForEvaluators, getAgentRelationById, getAgentRelationByParams, getAgentRelations, getAgentRelationsByAgent, getAgentRelationsBySource, getAgentSubAgentInfos, getAgentToolRelationByAgent, getAgentToolRelationById, getAgentToolRelationByTool, getAgentWithDefaultSubAgent, getAgentsForTool, getAgentsUsingArtifactComponent, getAgentsUsingDataComponent, getAllowedAuthMethods, getApiKeyById, getApiKeyByPublicId, getAppAuthKeysForProject, getAppById, getAppByIdForProject, getAppByIdForTenant, getArtifactComponentById, getArtifactComponentsForAgent, getAuthLookupForEmail, getCacheEntry, getCoPilotRunByBranchName, getCoPilotRunByRef, 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, getFeedbackById, getFeedbackByIds, getFilteredAuthMethodsForEmail, getFullAgent, getFullAgentDefinition, getFullAgentDefinitionWithRelationIds, getFullAgentWithRelationIds, getFullProject, getFullProjectWithRelationIds, getFunction, getFunctionToolById, getFunctionToolsForSubAgent, getInstallationByGitHubId, getInstallationById, getInstallationsByTenantId, getLedgerArtifacts, getLedgerArtifactsByContext, getMcpToolAccessMode, getMcpToolById, getMcpToolRepositoryAccess, getMcpToolRepositoryAccessWithDetails, getMessageById, getMessagesByConversation, getMessagesByTask, getOrganizationMemberByEmail, getOrganizationMemberByUserId, getPendingInvitationsByEmail, getProject, getProjectAccessMode, getProjectAssignmentsForInvitation, getProjectMainBranchName, getProjectMetadata, getProjectRepositoryAccess, getProjectRepositoryAccessWithDetails, getProjectResourceCounts, getProjectWithBranchInfo, getProjectWithMetadata, getRelatedAgentsForAgent, getRepositoriesByInstallationId, getRepositoriesByTenantId, getRepositoryByFullName, getRepositoryById, getRepositoryCount, getRepositoryCountsByTenantId, getSSOProvidersByDomain, getScheduledTriggerById, getScheduledTriggerInvocationById, getScheduledTriggerInvocationByIdempotencyKey, getScheduledTriggerInvocationStatusSummary, getScheduledTriggerRunInfoBatch, getScheduledTriggerUserCount, getScheduledTriggerUsers, getScheduledTriggerUsersBatch, getSchedulerState, getSkillById, getSkillByIdWithFiles, getSkillFileById, getSkillFilesBySkillIds, getSkillsForSubAgents, getSlackMcpToolAccessConfig, getStreamChunks, getSubAgentById, getSubAgentExternalAgentRelationById, getSubAgentExternalAgentRelationByParams, getSubAgentExternalAgentRelations, getSubAgentExternalAgentRelationsByAgent, getSubAgentExternalAgentRelationsByExternalAgent, getSubAgentRelationsByTarget, getSubAgentTeamAgentRelationById, getSubAgentTeamAgentRelationByParams, getSubAgentTeamAgentRelations, getSubAgentTeamAgentRelationsByAgent, getSubAgentTeamAgentRelationsByTeamAgent, getSubAgentsByIds, getSubAgentsForExternalAgent, getSubAgentsForTeamAgent, getSubAgentsUsingFunctionTool, getTask, getTeamAgentsForSubAgent, getToolById, getToolsForAgent, getTriggerById, getTriggerIdsWithUser, getTriggerInvocationById, getTriggerUserCount, getTriggerUsers, getTriggerUsersBatch, getUserByEmail, getUserById, getUserOrganizationsFromDb, getUserProfile, getUserProvidersFromDb, getUserScopedCredentialReference, getVisibleMessages, getWebhookTriggerIdsWithUser, getWorkflowExecution, getWorkflowExecutionByConversation, hasApiKey, hasContextConfig, hasCredentialReference, insertStreamChunks, invalidateHeadersCache, invalidateInvocationDefinitionsCache, isArtifactComponentAssociatedWithAgent, isDataComponentAssociatedWithAgent, isFunctionToolAssociatedWithSubAgent, isGithubWorkAppTool, isSlackWorkAppTool, linkDatasetRunToEvaluationJobConfig, listAgentIdsByProject, listAgentRelations, listAgentToolRelations, listAgents, listAgentsAcrossProjectMainBranches, listAgentsPaginated, listApiKeys, listApiKeysByProject, listApiKeysPaginated, listAppsPaginated, listArtifactComponents, listArtifactComponentsPaginated, listCoPilotRuns, listCoPilotRunsByBranchName, listContextCacheByProject, listContextConfigIdsByProject, listContextConfigs, listContextConfigsPaginated, listConversations, listCredentialReferences, listCredentialReferencesPaginated, listDataComponents, listDataComponentsPaginated, listDatasetItems, listDatasetRunConfigs, listDatasetRuns, listDatasetRunsByConfig, listDatasets, listDatasetsForAgent, listEvaluationJobConfigs, listEvaluationResults, listEvaluationResultsByConversation, listEvaluationResultsByRun, listEvaluationRunConfigs, listEvaluationRunConfigsWithSuiteConfigs, listEvaluationRuns, listEvaluationRunsByJobConfigId, listEvaluationSuiteConfigs, listEvaluators, listEvaluatorsForAgent, listExternalAgents, listExternalAgentsPaginated, listFeedback, listFeedbackByConversation, listFunctionTools, listFunctions, listFunctionsPaginated, listGitHubToolAccessByProject, listGitHubToolAccessModeByProject, listMessages, listOrgEntitlements, listPendingScheduledTriggerInvocations, listProjectScheduledTriggerInvocationsPaginated, listProjects, listProjectsMetadata, listProjectsMetadataPaginated, listProjectsPaginated, listProjectsWithMetadataPaginated, listScheduledTriggerInvocationsByTriggerId, listScheduledTriggerInvocationsPaginated, listScheduledTriggers, listScheduledTriggersPaginated, listSkills, listSkillsWithFiles, listSlackChannelAgentConfigsByProject, listSlackToolAccessConfigByProject, listSubAgentExternalAgentRelations, listSubAgentTeamAgentRelations, listSubAgents, listSubAgentsPaginated, listTaskIdsByContextId, listToolIdsByProject, listTools, listTriggerInvocationsPaginated, listTriggers, listTriggersPaginated, listUpcomingInvocationsForAgentPaginated, listWorkAppSlackChannelAgentConfigsByTeam, listWorkAppSlackUserMappingsByTeam, listWorkAppSlackWorkspacesByTenant, markScheduledTriggerInvocationCancelled, markScheduledTriggerInvocationCompleted, markScheduledTriggerInvocationFailed, markScheduledTriggerInvocationRunning, markStreamComplete, projectExists, projectExistsInTable, projectHasResources, projectsMetadataExists, removeArtifactComponentFromAgent, removeDataComponentFromAgent, removeFunctionToolFromSubAgent, removeRepositories, removeToolFromAgent, removeUserFromProjectScheduledTriggers, removeUserFromProjectTriggerUsers, resetCancelledInvocationToPending, resolveSlackUserContext, revertImprovementRows, setActiveAgentForConversation, setActiveAgentForThread, setCacheEntry, setMcpToolAccessMode, setMcpToolRepositoryAccess, setProjectAccessMode, setProjectRepositoryAccess, setScheduledTriggerUsers, setSlackMcpToolAccessConfig, setTriggerUsers, syncRepositories, updateAgent, updateAgentRelation, updateAgentToolRelation, updateApiKey, updateApiKeyLastUsed, updateApp, updateAppAuthKeysForProject, updateAppForProject, updateAppForTenant, updateAppLastUsed, updateArtifactComponent, updateCoPilotRunStatusByConversationId, updateContextConfig, updateConversation, updateConversationActiveSubAgent, updateCredentialReference, updateDataComponent, updateDataset, updateDatasetItem, updateDatasetRunConfig, updateEvaluationResult, updateEvaluationRun, updateEvaluationRunConfig, updateEvaluationSuiteConfig, updateEvaluator, updateExternalAgent, updateFeedback, updateFullAgentServerSide, updateFullProjectServerSide, updateFunctionTool, updateInstallationStatus, updateInstallationStatusByGitHubId, updateLedgerArtifactParts, updateMessage, updateProject, updateScheduledTrigger, updateScheduledTriggerInvocationStatus, updateSkill, updateSkillFileById, updateSlackMcpToolAccessChannelIds, updateSubAgent, updateSubAgentExternalAgentRelation, updateSubAgentFunctionToolRelation, updateSubAgentTeamAgentRelation, updateTask, updateTool, updateTrigger, updateTriggerInvocationStatus, updateWorkAppSlackWorkspace, updateWorkflowExecutionStatus, upsertAgent, upsertAgentArtifactComponentRelation, upsertAgentDataComponentRelation, upsertArtifactComponent, upsertContextConfig, upsertCredentialReference, upsertDataComponent, upsertExternalAgent, upsertFunction, upsertFunctionTool, upsertLedgerArtifact, upsertOrganization, upsertScheduledTrigger, upsertSchedulerState, upsertSkill, upsertSubAgent, upsertSubAgentExternalAgentRelation, upsertSubAgentFunctionToolRelation, upsertSubAgentRelation, upsertSubAgentSkill, upsertSubAgentTeamAgentRelation, upsertSubAgentToolRelation, upsertTool, upsertTrigger, upsertUserProfile, upsertWorkAppSlackChannelAgentConfig, validateAndGetApiKey, validateProjectExists, validateRepositoryOwnership, validateSubAgent, withProjectValidation };
@@ -12,11 +12,14 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
12
12
  }) => Promise<{
13
13
  id: string;
14
14
  name: string;
15
- description: string | null;
16
15
  createdAt: string;
17
16
  updatedAt: string;
18
- projectId: string;
17
+ description: string | null;
18
+ prompt: string | null;
19
19
  tenantId: string;
20
+ projectId: string;
21
+ defaultSubAgentId: string | null;
22
+ contextConfigId: string | null;
20
23
  models: {
21
24
  base?: {
22
25
  model?: string | undefined;
@@ -37,12 +40,6 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
37
40
  allowedProviders?: string[] | undefined;
38
41
  } | undefined;
39
42
  } | null;
40
- stopWhen: {
41
- transferCountIs?: number | undefined;
42
- } | null;
43
- defaultSubAgentId: string | null;
44
- contextConfigId: string | null;
45
- prompt: string | null;
46
43
  statusUpdates: {
47
44
  enabled?: boolean | undefined;
48
45
  numEvents?: number | undefined;
@@ -58,6 +55,9 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
58
55
  } | undefined;
59
56
  }[] | undefined;
60
57
  } | null;
58
+ stopWhen: {
59
+ transferCountIs?: number | undefined;
60
+ } | null;
61
61
  executionMode: "classic" | "durable";
62
62
  } | null>;
63
63
  declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -65,11 +65,14 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
65
65
  }) => Promise<{
66
66
  id: string;
67
67
  name: string;
68
- description: string | null;
69
68
  createdAt: string;
70
69
  updatedAt: string;
71
- projectId: string;
70
+ description: string | null;
71
+ prompt: string | null;
72
72
  tenantId: string;
73
+ projectId: string;
74
+ defaultSubAgentId: string | null;
75
+ contextConfigId: string | null;
73
76
  models: {
74
77
  base?: {
75
78
  model?: string | undefined;
@@ -90,12 +93,6 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
90
93
  allowedProviders?: string[] | undefined;
91
94
  } | undefined;
92
95
  } | null;
93
- stopWhen: {
94
- transferCountIs?: number | undefined;
95
- } | null;
96
- defaultSubAgentId: string | null;
97
- contextConfigId: string | null;
98
- prompt: string | null;
99
96
  statusUpdates: {
100
97
  enabled?: boolean | undefined;
101
98
  numEvents?: number | undefined;
@@ -111,15 +108,20 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
111
108
  } | undefined;
112
109
  }[] | undefined;
113
110
  } | null;
111
+ stopWhen: {
112
+ transferCountIs?: number | undefined;
113
+ } | null;
114
114
  executionMode: "classic" | "durable";
115
115
  defaultSubAgent: {
116
116
  id: string;
117
117
  name: string;
118
- description: string | null;
119
118
  createdAt: string;
120
119
  updatedAt: string;
121
- projectId: string;
120
+ description: string | null;
121
+ prompt: string | null;
122
122
  tenantId: string;
123
+ projectId: string;
124
+ agentId: string;
123
125
  models: {
124
126
  base?: {
125
127
  model?: string | undefined;
@@ -143,8 +145,6 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
143
145
  stopWhen: {
144
146
  stepCountIs?: number | undefined;
145
147
  } | null;
146
- agentId: string;
147
- prompt: string | null;
148
148
  conversationHistoryConfig: ConversationHistoryConfig | null;
149
149
  } | null;
150
150
  } | null>;
@@ -153,11 +153,14 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
153
153
  }) => Promise<{
154
154
  id: string;
155
155
  name: string;
156
- description: string | null;
157
156
  createdAt: string;
158
157
  updatedAt: string;
159
- projectId: string;
158
+ description: string | null;
159
+ prompt: string | null;
160
160
  tenantId: string;
161
+ projectId: string;
162
+ defaultSubAgentId: string | null;
163
+ contextConfigId: string | null;
161
164
  models: {
162
165
  base?: {
163
166
  model?: string | undefined;
@@ -178,12 +181,6 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
178
181
  allowedProviders?: string[] | undefined;
179
182
  } | undefined;
180
183
  } | null;
181
- stopWhen: {
182
- transferCountIs?: number | undefined;
183
- } | null;
184
- defaultSubAgentId: string | null;
185
- contextConfigId: string | null;
186
- prompt: string | null;
187
184
  statusUpdates: {
188
185
  enabled?: boolean | undefined;
189
186
  numEvents?: number | undefined;
@@ -199,6 +196,9 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
199
196
  } | undefined;
200
197
  }[] | undefined;
201
198
  } | null;
199
+ stopWhen: {
200
+ transferCountIs?: number | undefined;
201
+ } | null;
202
202
  executionMode: "classic" | "durable";
203
203
  }[]>;
204
204
  declare const listAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
@@ -283,11 +283,14 @@ declare function listAgentsAcrossProjectMainBranches(db: AgentsManageDatabaseCli
283
283
  declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInsert) => Promise<{
284
284
  id: string;
285
285
  name: string;
286
- description: string | null;
287
286
  createdAt: string;
288
287
  updatedAt: string;
289
- projectId: string;
288
+ description: string | null;
289
+ prompt: string | null;
290
290
  tenantId: string;
291
+ projectId: string;
292
+ defaultSubAgentId: string | null;
293
+ contextConfigId: string | null;
291
294
  models: {
292
295
  base?: {
293
296
  model?: string | undefined;
@@ -308,12 +311,6 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
308
311
  allowedProviders?: string[] | undefined;
309
312
  } | undefined;
310
313
  } | null;
311
- stopWhen: {
312
- transferCountIs?: number | undefined;
313
- } | null;
314
- defaultSubAgentId: string | null;
315
- contextConfigId: string | null;
316
- prompt: string | null;
317
314
  statusUpdates: {
318
315
  enabled?: boolean | undefined;
319
316
  numEvents?: number | undefined;
@@ -329,6 +326,9 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
329
326
  } | undefined;
330
327
  }[] | undefined;
331
328
  } | null;
329
+ stopWhen: {
330
+ transferCountIs?: number | undefined;
331
+ } | null;
332
332
  executionMode: "classic" | "durable";
333
333
  }>;
334
334
  declare const updateAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -11,11 +11,11 @@ declare const getArtifactComponentById: (db: AgentsManageDatabaseClient) => (par
11
11
  }) => Promise<{
12
12
  id: string;
13
13
  name: string;
14
- description: string | null;
15
14
  createdAt: string;
16
15
  updatedAt: string;
17
- projectId: string;
16
+ description: string | null;
18
17
  tenantId: string;
18
+ projectId: string;
19
19
  props: {
20
20
  [x: string]: unknown;
21
21
  type: "object";
@@ -67,11 +67,11 @@ declare const listArtifactComponentsPaginated: (db: AgentsManageDatabaseClient)
67
67
  declare const createArtifactComponent: (db: AgentsManageDatabaseClient) => (params: ArtifactComponentInsert) => Promise<{
68
68
  id: string;
69
69
  name: string;
70
- description: string | null;
71
70
  createdAt: string;
72
71
  updatedAt: string;
73
- projectId: string;
72
+ description: string | null;
74
73
  tenantId: string;
74
+ projectId: string;
75
75
  props: {
76
76
  [x: string]: unknown;
77
77
  type: "object";
@@ -143,8 +143,8 @@ declare const associateArtifactComponentWithAgent: (db: AgentsManageDatabaseClie
143
143
  }) => Promise<{
144
144
  id: string;
145
145
  createdAt: string;
146
- projectId: string;
147
146
  tenantId: string;
147
+ projectId: string;
148
148
  agentId: string;
149
149
  subAgentId: string;
150
150
  artifactComponentId: string;
@@ -186,8 +186,8 @@ declare const upsertAgentArtifactComponentRelation: (db: AgentsManageDatabaseCli
186
186
  }) => Promise<{
187
187
  id: string;
188
188
  createdAt: string;
189
- projectId: string;
190
189
  tenantId: string;
190
+ projectId: string;
191
191
  agentId: string;
192
192
  subAgentId: string;
193
193
  artifactComponentId: string;
@@ -12,8 +12,8 @@ declare const getContextConfigById: (db: AgentsManageDatabaseClient) => (params:
12
12
  id: string;
13
13
  createdAt: string;
14
14
  updatedAt: string;
15
- projectId: string;
16
15
  tenantId: string;
16
+ projectId: string;
17
17
  agentId: string;
18
18
  headersSchema: unknown;
19
19
  contextVariables: Record<string, ContextFetchDefinition> | null;
@@ -24,8 +24,8 @@ declare const listContextConfigs: (db: AgentsManageDatabaseClient) => (params: {
24
24
  id: string;
25
25
  createdAt: string;
26
26
  updatedAt: string;
27
- projectId: string;
28
27
  tenantId: string;
28
+ projectId: string;
29
29
  agentId: string;
30
30
  headersSchema: unknown;
31
31
  contextVariables: Record<string, ContextFetchDefinition> | null;
@@ -46,8 +46,8 @@ declare const createContextConfig: (db: AgentsManageDatabaseClient) => (params:
46
46
  id: string;
47
47
  createdAt: string;
48
48
  updatedAt: string;
49
- projectId: string;
50
49
  tenantId: string;
50
+ projectId: string;
51
51
  agentId: string;
52
52
  headersSchema: unknown;
53
53
  contextVariables: Record<string, ContextFetchDefinition> | null;
@@ -86,8 +86,8 @@ declare const upsertContextConfig: (db: AgentsManageDatabaseClient) => (params:
86
86
  id: string;
87
87
  createdAt: string;
88
88
  updatedAt: string;
89
- projectId: string;
90
89
  tenantId: string;
90
+ projectId: string;
91
91
  agentId: string;
92
92
  headersSchema: unknown;
93
93
  contextVariables: Record<string, ContextFetchDefinition> | null;
@@ -67,8 +67,8 @@ declare const associateDataComponentWithAgent: (db: AgentsManageDatabaseClient)
67
67
  }) => Promise<{
68
68
  id: string;
69
69
  createdAt: string;
70
- projectId: string;
71
70
  tenantId: string;
71
+ projectId: string;
72
72
  agentId: string;
73
73
  subAgentId: string;
74
74
  dataComponentId: string;
@@ -109,8 +109,8 @@ declare const upsertAgentDataComponentRelation: (db: AgentsManageDatabaseClient)
109
109
  }) => Promise<{
110
110
  id: string;
111
111
  createdAt: string;
112
- projectId: string;
113
112
  tenantId: string;
113
+ projectId: string;
114
114
  agentId: string;
115
115
  subAgentId: string;
116
116
  dataComponentId: string;
@@ -55,11 +55,11 @@ declare const createFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
55
55
  }) => Promise<{
56
56
  id: string;
57
57
  name: string;
58
- description: string | null;
59
58
  createdAt: string;
60
59
  updatedAt: string;
61
- projectId: string;
60
+ description: string | null;
62
61
  tenantId: string;
62
+ projectId: string;
63
63
  agentId: string;
64
64
  functionId: string;
65
65
  }>;
@@ -97,11 +97,11 @@ declare const upsertFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
97
97
  }) => Promise<{
98
98
  id: string;
99
99
  name: string;
100
- description: string | null;
101
100
  createdAt: string;
102
101
  updatedAt: string;
103
- projectId: string;
102
+ description: string | null;
104
103
  tenantId: string;
104
+ projectId: string;
105
105
  agentId: string;
106
106
  functionId: string;
107
107
  }>;
@@ -160,14 +160,14 @@ declare const addFunctionToolToSubAgent: (db: AgentsManageDatabaseClient) => (pa
160
160
  id: string;
161
161
  createdAt: string;
162
162
  updatedAt: string;
163
- projectId: string;
164
163
  tenantId: string;
164
+ projectId: string;
165
165
  agentId: string;
166
166
  subAgentId: string;
167
+ functionToolId: string;
167
168
  toolPolicies: Record<string, {
168
169
  needsApproval?: boolean;
169
170
  }> | null;
170
- functionToolId: string;
171
171
  }>;
172
172
  /**
173
173
  * Update an agent-function tool relation
@@ -225,14 +225,14 @@ declare const associateFunctionToolWithSubAgent: (db: AgentsManageDatabaseClient
225
225
  id: string;
226
226
  createdAt: string;
227
227
  updatedAt: string;
228
- projectId: string;
229
228
  tenantId: string;
229
+ projectId: string;
230
230
  agentId: string;
231
231
  subAgentId: string;
232
+ functionToolId: string;
232
233
  toolPolicies: Record<string, {
233
234
  needsApproval?: boolean;
234
235
  }> | null;
235
- functionToolId: string;
236
236
  }>;
237
237
  //#endregion
238
238
  export { addFunctionToolToSubAgent, associateFunctionToolWithSubAgent, createFunctionTool, deleteFunctionTool, getFunctionToolById, getFunctionToolsForSubAgent, getSubAgentsUsingFunctionTool, isFunctionToolAssociatedWithSubAgent, listFunctionTools, removeFunctionToolFromSubAgent, updateFunctionTool, updateSubAgentFunctionToolRelation, upsertFunctionTool, upsertSubAgentFunctionToolRelation };
@@ -0,0 +1,29 @@
1
+ import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
2
+
3
+ //#region src/data-access/manage/improvementRowRevert.d.ts
4
+ type RevertDiffType = 'added' | 'modified' | 'removed';
5
+ interface RevertRowInput {
6
+ table: string;
7
+ primaryKey: Record<string, string>;
8
+ diffType: RevertDiffType;
9
+ }
10
+ interface RevertImprovementRowsResult {
11
+ processedRows: number;
12
+ committed: boolean;
13
+ }
14
+ /**
15
+ * Revert the specified rows on an improvement branch to their baseline values
16
+ * from the target branch. Added rows are deleted, modified rows are reset to
17
+ * their target-branch values, and removed rows are re-inserted. The reverts
18
+ * are then committed on the improvement branch.
19
+ *
20
+ * Leaves the improvement (source) branch checked out on return.
21
+ */
22
+ declare const revertImprovementRows: (db: AgentsManageDatabaseClient) => (params: {
23
+ sourceBranchFullName: string;
24
+ targetBranchFullName: string;
25
+ rows: RevertRowInput[];
26
+ commitMessage: string;
27
+ }) => Promise<RevertImprovementRowsResult>;
28
+ //#endregion
29
+ export { RevertDiffType, RevertImprovementRowsResult, RevertRowInput, revertImprovementRows };
@@ -0,0 +1,84 @@
1
+ import { doltAddAndCommit } from "../../dolt/commit.js";
2
+ import { managePkMap, manageTableMap } from "../../dolt/pk-map.js";
3
+ import { doltCheckout } from "../../dolt/branch.js";
4
+ import { and, eq, getTableColumns } from "drizzle-orm";
5
+
6
+ //#region src/data-access/manage/improvementRowRevert.ts
7
+ function buildPrimaryKeyWhere(tableObj, tableName, pk) {
8
+ const pkColumns = managePkMap[tableName];
9
+ if (!pkColumns || pkColumns.length === 0) throw new Error(`No primary key known for table: ${tableName}`);
10
+ const allowed = new Set(pkColumns);
11
+ const provided = Object.keys(pk);
12
+ if (provided.length !== pkColumns.length || provided.some((k) => !allowed.has(k))) throw new Error(`Invalid primary key for table ${tableName}: expected keys [${pkColumns.join(", ")}]`);
13
+ const columns = getTableColumns(tableObj);
14
+ const colByDbName = new Map(Object.values(columns).map((c) => [c.name, c]));
15
+ const combined = and(...pkColumns.map((dbName) => {
16
+ const col = colByDbName.get(dbName);
17
+ if (!col) throw new Error(`Column ${dbName} not found on table ${tableName}`);
18
+ return eq(col, pk[dbName]);
19
+ }));
20
+ if (!combined) throw new Error(`Failed to build where clause for ${tableName}`);
21
+ return combined;
22
+ }
23
+ /**
24
+ * Revert the specified rows on an improvement branch to their baseline values
25
+ * from the target branch. Added rows are deleted, modified rows are reset to
26
+ * their target-branch values, and removed rows are re-inserted. The reverts
27
+ * are then committed on the improvement branch.
28
+ *
29
+ * Leaves the improvement (source) branch checked out on return.
30
+ */
31
+ const revertImprovementRows = (db) => async (params) => {
32
+ const { sourceBranchFullName, targetBranchFullName, rows, commitMessage } = params;
33
+ if (rows.length === 0) return {
34
+ processedRows: 0,
35
+ committed: false
36
+ };
37
+ const rowsNeedingBaseline = rows.filter((r) => r.diffType === "modified" || r.diffType === "removed");
38
+ const baselineData = /* @__PURE__ */ new Map();
39
+ if (rowsNeedingBaseline.length > 0) {
40
+ await doltCheckout(db)({ branch: targetBranchFullName });
41
+ for (const row of rowsNeedingBaseline) {
42
+ const table = row.table.replace(/^public\./, "");
43
+ const tableObj = manageTableMap[table];
44
+ if (!tableObj) continue;
45
+ const whereCondition = buildPrimaryKeyWhere(tableObj, table, row.primaryKey);
46
+ const [baselineRow] = await db.select().from(tableObj).where(whereCondition).limit(1);
47
+ if (baselineRow) baselineData.set(`${row.table}:${JSON.stringify(row.primaryKey)}`, baselineRow);
48
+ }
49
+ }
50
+ await doltCheckout(db)({ branch: sourceBranchFullName });
51
+ for (const row of rows) {
52
+ const table = row.table.replace(/^public\./, "");
53
+ const tableObj = manageTableMap[table];
54
+ if (!tableObj) continue;
55
+ const whereCondition = buildPrimaryKeyWhere(tableObj, table, row.primaryKey);
56
+ if (row.diffType === "added") await db.delete(tableObj).where(whereCondition);
57
+ else if (row.diffType === "modified") {
58
+ const baselineRow = baselineData.get(`${row.table}:${JSON.stringify(row.primaryKey)}`);
59
+ if (baselineRow) {
60
+ const pkCols = new Set(managePkMap[table] ?? []);
61
+ const columns = getTableColumns(tableObj);
62
+ const setData = {};
63
+ for (const [prop, col] of Object.entries(columns)) if (!pkCols.has(col.name)) setData[prop] = baselineRow[prop];
64
+ await db.update(tableObj).set(setData).where(whereCondition);
65
+ }
66
+ } else if (row.diffType === "removed") {
67
+ const baselineRow = baselineData.get(`${row.table}:${JSON.stringify(row.primaryKey)}`);
68
+ if (baselineRow) await db.insert(tableObj).values(baselineRow);
69
+ }
70
+ }
71
+ let committed = true;
72
+ try {
73
+ await doltAddAndCommit(db)({ message: commitMessage });
74
+ } catch {
75
+ committed = false;
76
+ }
77
+ return {
78
+ processedRows: rows.length,
79
+ committed
80
+ };
81
+ };
82
+
83
+ //#endregion
84
+ export { revertImprovementRows };
@@ -17,13 +17,13 @@ declare const getSkillById: (db: AgentsManageDatabaseClient) => (params: {
17
17
  }) => Promise<{
18
18
  id: string;
19
19
  name: string;
20
- description: string;
21
- content: string;
22
- metadata: Record<string, string> | null;
23
20
  createdAt: string;
24
21
  updatedAt: string;
25
- projectId: string;
22
+ metadata: Record<string, string> | null;
23
+ description: string;
26
24
  tenantId: string;
25
+ projectId: string;
26
+ content: string;
27
27
  } | null>;
28
28
  declare const getSkillByIdWithFiles: (db: AgentsManageDatabaseClient) => (params: {
29
29
  scopes: ProjectScopeConfig;
@@ -112,13 +112,13 @@ declare const createSkill: (db: AgentsManageDatabaseClient) => (data: SkillApiIn
112
112
  declare const upsertSkill: (db: AgentsManageDatabaseClient) => (data: SkillApiInsert & WithTenantIdProjectId) => Promise<{
113
113
  id: string;
114
114
  name: string;
115
- description: string;
116
- content: string;
117
- metadata: Record<string, string> | null;
118
115
  createdAt: string;
119
116
  updatedAt: string;
120
- projectId: string;
117
+ metadata: Record<string, string> | null;
118
+ description: string;
121
119
  tenantId: string;
120
+ projectId: string;
121
+ content: string;
122
122
  }>;
123
123
  declare const updateSkill: (db: AgentsManageDatabaseClient) => (params: {
124
124
  scopes: ProjectScopeConfig;
@@ -142,13 +142,13 @@ declare const upsertSubAgentSkill: (db: AgentsManageDatabaseClient) => (params:
142
142
  id: string;
143
143
  createdAt: string;
144
144
  updatedAt: string;
145
- projectId: string;
146
145
  tenantId: string;
146
+ projectId: string;
147
147
  agentId: string;
148
148
  subAgentId: string;
149
- skillId: string;
150
149
  index: number;
151
150
  alwaysLoaded: boolean;
151
+ skillId: string;
152
152
  }>;
153
153
  declare const deleteSubAgentSkill: (db: AgentsManageDatabaseClient) => (params: {
154
154
  scopes: AgentScopeConfig;