@inkeep/agents-core 0.41.2 → 0.42.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.
Files changed (228) hide show
  1. package/dist/api-client/base-client.d.ts +87 -8
  2. package/dist/api-client/base-client.js +174 -1
  3. package/dist/api-client/eval-api-client.d.ts +47 -0
  4. package/dist/api-client/eval-api-client.js +65 -0
  5. package/dist/api-client/index.d.ts +4 -0
  6. package/dist/api-client/index.js +5 -0
  7. package/dist/api-client/manage-api-client.d.ts +34 -0
  8. package/dist/api-client/manage-api-client.js +104 -0
  9. package/dist/auth/auth.d.ts +86 -20
  10. package/dist/auth/auth.js +55 -1
  11. package/dist/auth/authz/client.d.ts +81 -0
  12. package/dist/auth/authz/client.js +189 -0
  13. package/dist/auth/authz/config.d.ts +76 -0
  14. package/dist/auth/authz/config.js +76 -0
  15. package/dist/auth/authz/index.d.ts +5 -0
  16. package/dist/auth/authz/index.js +6 -0
  17. package/dist/auth/authz/permissions.d.ts +57 -0
  18. package/dist/auth/authz/permissions.js +83 -0
  19. package/dist/auth/authz/sync.d.ts +85 -0
  20. package/dist/auth/authz/sync.js +237 -0
  21. package/dist/auth/permissions.d.ts +13 -13
  22. package/dist/auth/permissions.js +2 -181
  23. package/dist/client-exports.d.ts +8 -3
  24. package/dist/client-exports.js +3 -2
  25. package/dist/constants/context-breakdown.d.ts +61 -0
  26. package/dist/constants/context-breakdown.js +124 -0
  27. package/dist/constants/otel-attributes.d.ts +4 -0
  28. package/dist/constants/otel-attributes.js +4 -0
  29. package/dist/context/ContextConfig.d.ts +2 -2
  30. package/dist/context/ContextConfig.js +3 -3
  31. package/dist/context/TemplateEngine.js +0 -1
  32. package/dist/context/index.d.ts +1 -5
  33. package/dist/context/index.js +1 -5
  34. package/dist/credential-stuffer/CredentialStuffer.d.ts +1 -1
  35. package/dist/data-access/index.d.ts +34 -26
  36. package/dist/data-access/index.js +34 -26
  37. package/dist/data-access/manage/agentFull.d.ts +36 -0
  38. package/dist/data-access/{agentFull.js → manage/agentFull.js} +205 -7
  39. package/dist/data-access/{agents.d.ts → manage/agents.d.ts} +23 -22
  40. package/dist/data-access/{agents.js → manage/agents.js} +52 -7
  41. package/dist/data-access/{artifactComponents.d.ts → manage/artifactComponents.d.ts} +21 -21
  42. package/dist/data-access/{artifactComponents.js → manage/artifactComponents.js} +5 -5
  43. package/dist/data-access/{contextConfigs.d.ts → manage/contextConfigs.d.ts} +14 -14
  44. package/dist/data-access/{contextConfigs.js → manage/contextConfigs.js} +3 -3
  45. package/dist/data-access/{credentialReferences.d.ts → manage/credentialReferences.d.ts} +17 -17
  46. package/dist/data-access/{credentialReferences.js → manage/credentialReferences.js} +2 -2
  47. package/dist/data-access/{dataComponents.d.ts → manage/dataComponents.d.ts} +20 -20
  48. package/dist/data-access/{dataComponents.js → manage/dataComponents.js} +7 -7
  49. package/dist/data-access/manage/evalConfig.d.ts +221 -0
  50. package/dist/data-access/manage/evalConfig.js +275 -0
  51. package/dist/data-access/{externalAgents.d.ts → manage/externalAgents.d.ts} +16 -16
  52. package/dist/data-access/{externalAgents.js → manage/externalAgents.js} +2 -2
  53. package/dist/data-access/{functionTools.d.ts → manage/functionTools.d.ts} +65 -15
  54. package/dist/data-access/{functionTools.js → manage/functionTools.js} +90 -8
  55. package/dist/data-access/{functions.d.ts → manage/functions.d.ts} +9 -9
  56. package/dist/data-access/{functions.js → manage/functions.js} +3 -3
  57. package/dist/data-access/manage/projectFull.d.ts +38 -0
  58. package/dist/data-access/{projectFull.js → manage/projectFull.js} +64 -65
  59. package/dist/data-access/manage/projectLifecycle.d.ts +119 -0
  60. package/dist/data-access/manage/projectLifecycle.js +234 -0
  61. package/dist/data-access/manage/projects.d.ts +75 -0
  62. package/dist/data-access/{projects.js → manage/projects.js} +15 -16
  63. package/dist/data-access/{subAgentExternalAgentRelations.d.ts → manage/subAgentExternalAgentRelations.d.ts} +19 -19
  64. package/dist/data-access/{subAgentExternalAgentRelations.js → manage/subAgentExternalAgentRelations.js} +2 -2
  65. package/dist/data-access/{subAgentRelations.d.ts → manage/subAgentRelations.d.ts} +29 -29
  66. package/dist/data-access/{subAgentRelations.js → manage/subAgentRelations.js} +3 -3
  67. package/dist/data-access/{subAgentTeamAgentRelations.d.ts → manage/subAgentTeamAgentRelations.d.ts} +19 -19
  68. package/dist/data-access/{subAgentTeamAgentRelations.js → manage/subAgentTeamAgentRelations.js} +2 -2
  69. package/dist/data-access/{subAgents.d.ts → manage/subAgents.d.ts} +13 -13
  70. package/dist/data-access/{subAgents.js → manage/subAgents.js} +4 -4
  71. package/dist/data-access/{tools.d.ts → manage/tools.d.ts} +26 -19
  72. package/dist/data-access/{tools.js → manage/tools.js} +57 -35
  73. package/dist/data-access/manage/triggers.d.ts +80 -0
  74. package/dist/data-access/manage/triggers.js +81 -0
  75. package/dist/data-access/{apiKeys.d.ts → runtime/apiKeys.d.ts} +17 -17
  76. package/dist/data-access/{apiKeys.js → runtime/apiKeys.js} +3 -3
  77. package/dist/data-access/runtime/cascade-delete.d.ts +77 -0
  78. package/dist/data-access/runtime/cascade-delete.js +111 -0
  79. package/dist/data-access/{contextCache.d.ts → runtime/contextCache.d.ts} +13 -13
  80. package/dist/data-access/{contextCache.js → runtime/contextCache.js} +5 -5
  81. package/dist/data-access/{conversations.d.ts → runtime/conversations.d.ts} +68 -19
  82. package/dist/data-access/{conversations.js → runtime/conversations.js} +13 -7
  83. package/dist/data-access/runtime/evalRuns.d.ts +120 -0
  84. package/dist/data-access/runtime/evalRuns.js +168 -0
  85. package/dist/data-access/{ledgerArtifacts.d.ts → runtime/ledgerArtifacts.d.ts} +13 -13
  86. package/dist/data-access/{ledgerArtifacts.js → runtime/ledgerArtifacts.js} +3 -3
  87. package/dist/data-access/{messages.d.ts → runtime/messages.d.ts} +15 -15
  88. package/dist/data-access/{messages.js → runtime/messages.js} +2 -2
  89. package/dist/data-access/{organizations.d.ts → runtime/organizations.d.ts} +16 -7
  90. package/dist/data-access/{organizations.js → runtime/organizations.js} +15 -3
  91. package/dist/data-access/runtime/projects.d.ts +62 -0
  92. package/dist/data-access/runtime/projects.js +90 -0
  93. package/dist/data-access/runtime/tasks.d.ts +55 -0
  94. package/dist/data-access/{tasks.js → runtime/tasks.js} +2 -2
  95. package/dist/data-access/runtime/triggerInvocations.d.ts +62 -0
  96. package/dist/data-access/runtime/triggerInvocations.js +54 -0
  97. package/dist/data-access/runtime/users.d.ts +19 -0
  98. package/dist/data-access/{users.js → runtime/users.js} +2 -2
  99. package/dist/data-access/validation.d.ts +4 -4
  100. package/dist/data-access/validation.js +1 -1
  101. package/dist/db/clean.d.ts +8 -4
  102. package/dist/db/clean.js +14 -105
  103. package/dist/db/delete.d.ts +1 -1
  104. package/dist/db/delete.js +7 -10
  105. package/dist/db/manage/dolt-cleanup.d.ts +51 -0
  106. package/dist/db/manage/dolt-cleanup.js +132 -0
  107. package/dist/db/manage/manage-client.d.ts +26 -0
  108. package/dist/db/manage/manage-client.js +68 -0
  109. package/dist/db/{schema.d.ts → manage/manage-schema.d.ts} +1459 -1285
  110. package/dist/db/{schema.js → manage/manage-schema.js} +433 -341
  111. package/dist/db/manage/test-manage-client.d.ts +27 -0
  112. package/dist/db/manage/test-manage-client.js +68 -0
  113. package/dist/db/runtime/runtime-client.d.ts +20 -0
  114. package/dist/db/runtime/runtime-client.js +30 -0
  115. package/dist/db/runtime/runtime-schema.d.ts +2834 -0
  116. package/dist/db/runtime/runtime-schema.js +483 -0
  117. package/dist/db/runtime/test-runtime-client.d.ts +27 -0
  118. package/dist/db/{test-client.js → runtime/test-runtime-client.js} +11 -25
  119. package/dist/dolt/branch.d.ts +62 -0
  120. package/dist/dolt/branch.js +82 -0
  121. package/dist/dolt/branches-api.d.ts +108 -0
  122. package/dist/dolt/branches-api.js +162 -0
  123. package/dist/dolt/commit.d.ts +94 -0
  124. package/dist/dolt/commit.js +103 -0
  125. package/dist/dolt/diff.d.ts +27 -0
  126. package/dist/dolt/diff.js +21 -0
  127. package/dist/dolt/index.d.ts +10 -0
  128. package/dist/dolt/index.js +11 -0
  129. package/dist/dolt/merge.d.ts +63 -0
  130. package/dist/dolt/merge.js +81 -0
  131. package/dist/dolt/migrate-all-branches.d.ts +4 -0
  132. package/dist/dolt/migrate-all-branches.js +78 -0
  133. package/dist/dolt/migrate-dolt.d.ts +1 -0
  134. package/dist/dolt/migrate-dolt.js +22 -0
  135. package/dist/dolt/ref-helpers.d.ts +19 -0
  136. package/dist/dolt/ref-helpers.js +65 -0
  137. package/dist/dolt/ref-middleware.d.ts +82 -0
  138. package/dist/dolt/ref-middleware.js +217 -0
  139. package/dist/dolt/ref-scope.d.ts +101 -0
  140. package/dist/dolt/ref-scope.js +231 -0
  141. package/dist/dolt/schema-sync.d.ts +134 -0
  142. package/dist/dolt/schema-sync.js +246 -0
  143. package/dist/env.d.ts +6 -4
  144. package/dist/env.js +3 -2
  145. package/dist/index.d.ts +71 -44
  146. package/dist/index.js +74 -47
  147. package/dist/types/entities.d.ts +81 -2
  148. package/dist/types/index.d.ts +3 -3
  149. package/dist/types/utility.d.ts +45 -4
  150. package/dist/utils/JsonTransformer.d.ts +44 -0
  151. package/dist/utils/JsonTransformer.js +112 -0
  152. package/dist/utils/apiKeys.d.ts +5 -1
  153. package/dist/utils/apiKeys.js +11 -1
  154. package/dist/utils/colors.d.ts +34 -0
  155. package/dist/utils/colors.js +49 -0
  156. package/dist/utils/credential-store-utils.d.ts +1 -1
  157. package/dist/utils/format-messages.d.ts +1 -1
  158. package/dist/utils/index.d.ts +7 -3
  159. package/dist/utils/index.js +7 -3
  160. package/dist/utils/internal-service-auth.d.ts +79 -0
  161. package/dist/utils/internal-service-auth.js +140 -0
  162. package/dist/utils/jwt-helpers.d.ts +56 -0
  163. package/dist/utils/jwt-helpers.js +90 -0
  164. package/dist/utils/service-token-auth.d.ts +9 -27
  165. package/dist/utils/service-token-auth.js +48 -96
  166. package/dist/utils/template-interpolation.d.ts +22 -0
  167. package/dist/utils/template-interpolation.js +62 -0
  168. package/dist/utils/third-party-mcp-servers/composio-client.js +23 -23
  169. package/dist/utils/trigger-auth.d.ts +62 -0
  170. package/dist/utils/trigger-auth.js +125 -0
  171. package/dist/validation/agentFull.js +2 -4
  172. package/dist/validation/dolt-schemas.d.ts +49 -0
  173. package/dist/validation/dolt-schemas.js +44 -0
  174. package/dist/validation/drizzle-schema-helpers.d.ts +4 -26
  175. package/dist/validation/drizzle-schema-helpers.js +5 -151
  176. package/dist/validation/index.d.ts +4 -3
  177. package/dist/validation/index.js +3 -2
  178. package/dist/validation/schemas.d.ts +17647 -4789
  179. package/dist/validation/schemas.js +328 -11
  180. package/drizzle/manage/0000_tearful_rhodey.sql +414 -0
  181. package/drizzle/manage/0001_broken_wendell_vaughn.sql +19 -0
  182. package/drizzle/manage/0002_bent_sunfire.sql +1 -0
  183. package/drizzle/manage/meta/0000_snapshot.json +2987 -0
  184. package/drizzle/manage/meta/0001_snapshot.json +3115 -0
  185. package/drizzle/manage/meta/0002_snapshot.json +3115 -0
  186. package/drizzle/manage/meta/_journal.json +27 -0
  187. package/drizzle/runtime/0008_silly_preak.sql +127 -0
  188. package/drizzle/runtime/0009_freezing_leo.sql +17 -0
  189. package/drizzle/runtime/meta/0008_snapshot.json +2263 -0
  190. package/drizzle/runtime/meta/0009_snapshot.json +2397 -0
  191. package/drizzle/{meta → runtime/meta}/_journal.json +14 -0
  192. package/package.json +48 -15
  193. package/dist/context/ContextFetcher.d.ts +0 -73
  194. package/dist/context/ContextFetcher.js +0 -291
  195. package/dist/context/ContextResolver.d.ts +0 -60
  196. package/dist/context/ContextResolver.js +0 -278
  197. package/dist/context/context.d.ts +0 -27
  198. package/dist/context/context.js +0 -128
  199. package/dist/context/contextCache.d.ts +0 -58
  200. package/dist/context/contextCache.js +0 -177
  201. package/dist/data-access/agentFull.d.ts +0 -33
  202. package/dist/data-access/projectFull.d.ts +0 -32
  203. package/dist/data-access/projects.d.ts +0 -71
  204. package/dist/data-access/tasks.d.ts +0 -45
  205. package/dist/data-access/users.d.ts +0 -19
  206. package/dist/db/client.d.ts +0 -20
  207. package/dist/db/client.js +0 -28
  208. package/dist/db/test-client.d.ts +0 -31
  209. package/dist/middleware/contextValidation.d.ts +0 -46
  210. package/dist/middleware/contextValidation.js +0 -280
  211. package/dist/middleware/index.d.ts +0 -2
  212. package/dist/middleware/index.js +0 -3
  213. package/dist/utils/execution.d.ts +0 -22
  214. package/dist/utils/execution.js +0 -25
  215. /package/drizzle/{0000_exotic_mysterio.sql → runtime/0000_exotic_mysterio.sql} +0 -0
  216. /package/drizzle/{0001_calm_sheva_callister.sql → runtime/0001_calm_sheva_callister.sql} +0 -0
  217. /package/drizzle/{0002_puzzling_goblin_queen.sql → runtime/0002_puzzling_goblin_queen.sql} +0 -0
  218. /package/drizzle/{0003_sweet_human_robot.sql → runtime/0003_sweet_human_robot.sql} +0 -0
  219. /package/drizzle/{0004_cuddly_shooting_star.sql → runtime/0004_cuddly_shooting_star.sql} +0 -0
  220. /package/drizzle/{0005_reflective_starfox.sql → runtime/0005_reflective_starfox.sql} +0 -0
  221. /package/drizzle/{0006_stale_thaddeus_ross.sql → runtime/0006_stale_thaddeus_ross.sql} +0 -0
  222. /package/drizzle/{0007_slim_karma.sql → runtime/0007_slim_karma.sql} +0 -0
  223. /package/drizzle/{meta → runtime/meta}/0000_snapshot.json +0 -0
  224. /package/drizzle/{meta → runtime/meta}/0001_snapshot.json +0 -0
  225. /package/drizzle/{meta → runtime/meta}/0003_snapshot.json +0 -0
  226. /package/drizzle/{meta → runtime/meta}/0005_snapshot.json +0 -0
  227. /package/drizzle/{meta → runtime/meta}/0006_snapshot.json +0 -0
  228. /package/drizzle/{meta → runtime/meta}/0007_snapshot.json +0 -0
package/dist/index.js CHANGED
@@ -2,89 +2,116 @@ import { schemaValidationDefaults } from "./constants/schema-validation/defaults
2
2
  import { TaskState } from "./types/a2a.js";
3
3
  import { normalizeToolSelections } from "./types/tool-policies.js";
4
4
  import { CredentialStoreType, MCPServerType, MCPTransportType, TOOL_STATUS_VALUES, VALID_RELATION_TYPES } from "./types/utility.js";
5
+ import { agentRelations, agentToolRelationsRelations, agents, artifactComponents, artifactComponentsRelations, contextConfigs, contextConfigsRelations, credentialReferences, credentialReferencesRelations, dataComponents, dataComponentsRelations, dataset, datasetItem, datasetRunConfig, datasetRunConfigAgentRelations, evaluationJobConfig, evaluationJobConfigEvaluatorRelations, evaluationRunConfig, evaluationRunConfigEvaluationSuiteConfigRelations, evaluationSuiteConfig, evaluationSuiteConfigEvaluatorRelations, evaluator, externalAgents, externalAgentsRelations, functionTools, functionToolsRelations, functions, functionsRelations, projects, projectsRelations, subAgentArtifactComponents, subAgentArtifactComponentsRelations, subAgentDataComponents, subAgentDataComponentsRelations, subAgentExternalAgentRelations, subAgentExternalAgentRelationsRelations, subAgentFunctionToolRelations, subAgentFunctionToolRelationsRelations, subAgentRelations, subAgentRelationsRelations, subAgentTeamAgentRelations, subAgentTeamAgentRelationsRelations, subAgentToolRelations, subAgents, subAgentsRelations, tools, toolsRelations, triggers } from "./db/manage/manage-schema.js";
5
6
  import { account, deviceCode, invitation, member, organization, session, ssoProvider, user, verification } from "./auth/auth-schema.js";
6
- import { agentRelations, agentToolRelationsRelations, agents, apiKeys, apiKeysRelations, artifactComponents, artifactComponentsRelations, contextCache, contextCacheRelations, contextConfigs, contextConfigsRelations, conversations, conversationsRelations, credentialReferences, credentialReferencesRelations, dataComponents, dataComponentsRelations, externalAgents, externalAgentsRelations, functionTools, functionToolsRelations, functions, functionsRelations, ledgerArtifacts, ledgerArtifactsRelations, messages, messagesRelations, projects, projectsRelations, subAgentArtifactComponents, subAgentArtifactComponentsRelations, subAgentDataComponents, subAgentDataComponentsRelations, subAgentExternalAgentRelations, subAgentExternalAgentRelationsRelations, subAgentFunctionToolRelations, subAgentFunctionToolRelationsRelations, subAgentRelations, subAgentRelationsRelations, subAgentTeamAgentRelations, subAgentTeamAgentRelationsRelations, subAgentToolRelations, subAgents, subAgentsRelations, taskRelations, taskRelationsRelations, tasks, tasksRelations, tools, toolsRelations } from "./db/schema.js";
7
+ import { apiKeys, contextCache, conversations, conversationsRelations, datasetRun, datasetRunConversationRelations, evaluationResult, evaluationRun, ledgerArtifacts, ledgerArtifactsRelations, messages, messagesRelations, projectMetadata, taskRelations, taskRelationsRelations, tasks, tasksRelations, triggerInvocations } from "./db/runtime/runtime-schema.js";
8
+ import { BranchInfoSchema, BranchListResponseSchema, BranchNameParamsSchema, BranchNameSchema, BranchResponseSchema, CreateBranchRequestSchema, ResolvedRefSchema } from "./validation/dolt-schemas.js";
7
9
  import { MAX_ID_LENGTH, MIN_ID_LENGTH, URL_SAFE_ID_PATTERN, resourceIdSchema } from "./validation/drizzle-schema-helpers.js";
8
- import { AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentInsertSchema, AgentListResponse, AgentResponse, AgentSelectSchema, AgentStopWhenSchema, AgentUpdateSchema, AgentWithinContextOfProjectResponse, AgentWithinContextOfProjectSchema, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeyListResponse, ApiKeyResponse, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentArrayResponse, ArtifactComponentInsertSchema, ArtifactComponentListResponse, ArtifactComponentResponse, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ComponentAssociationListResponse, ComponentAssociationSchema, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigInsertSchema, ContextConfigListResponse, ContextConfigResponse, ContextConfigSelectSchema, ContextConfigUpdateSchema, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationListResponse, ConversationResponse, ConversationSelectSchema, ConversationUpdateSchema, CreateCredentialInStoreRequestSchema, CreateCredentialInStoreResponseSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceListResponse, CredentialReferenceResponse, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, CredentialStoreListResponseSchema, CredentialStoreSchema, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentArrayResponse, DataComponentBaseSchema, DataComponentInsertSchema, DataComponentListResponse, DataComponentResponse, DataComponentSelectSchema, DataComponentUpdateSchema, ErrorResponseSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentListResponse, ExternalAgentResponse, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FetchConfigSchema, FetchDefinitionSchema, FullAgentAgentInsertSchema, FullProjectDefinitionResponse, FullProjectDefinitionSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, FunctionInsertSchema, FunctionListResponse, FunctionResponse, FunctionSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiSelectSchema, FunctionToolApiUpdateSchema, FunctionToolConfigSchema, FunctionToolInsertSchema, FunctionToolListResponse, FunctionToolResponse, FunctionToolSelectSchema, FunctionToolUpdateSchema, FunctionUpdateSchema, HeadersScopeSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiUpdateSchema, LedgerArtifactInsertSchema, LedgerArtifactSelectSchema, LedgerArtifactUpdateSchema, ListResponseSchema, MCPCatalogListResponse, MCPToolConfigSchema, McpToolDefinitionSchema, McpToolListResponse, McpToolResponse, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageListResponse, MessageResponse, MessageSelectSchema, MessageUpdateSchema, ModelSchema, ModelSettingsSchema, OAuthCallbackQuerySchema, OAuthLoginQuerySchema, PaginationQueryParamsSchema, PaginationSchema, PrebuiltMCPServerSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectListResponse, ProjectModelSchema, ProjectResponse, ProjectSelectSchema, ProjectUpdateSchema, RelatedAgentInfoListResponse, RelatedAgentInfoSchema, RemovedResponseSchema, SingleResponseSchema, StatusComponentSchema, StatusUpdateSchema, StopWhenSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiUpdateSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentListResponse, SubAgentArtifactComponentResponse, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentUpdateSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiUpdateSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentListResponse, SubAgentDataComponentResponse, SubAgentDataComponentSelectSchema, SubAgentDataComponentUpdateSchema, SubAgentExternalAgentRelationApiInsertSchema, SubAgentExternalAgentRelationApiSelectSchema, SubAgentExternalAgentRelationApiUpdateSchema, SubAgentExternalAgentRelationInsertSchema, SubAgentExternalAgentRelationListResponse, SubAgentExternalAgentRelationResponse, SubAgentExternalAgentRelationSelectSchema, SubAgentExternalAgentRelationUpdateSchema, SubAgentInsertSchema, SubAgentListResponse, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationListResponse, SubAgentRelationQuerySchema, SubAgentRelationResponse, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentResponse, SubAgentSelectSchema, SubAgentStopWhenSchema, SubAgentTeamAgentRelationApiInsertSchema, SubAgentTeamAgentRelationApiSelectSchema, SubAgentTeamAgentRelationApiUpdateSchema, SubAgentTeamAgentRelationInsertSchema, SubAgentTeamAgentRelationListResponse, SubAgentTeamAgentRelationResponse, SubAgentTeamAgentRelationSelectSchema, SubAgentTeamAgentRelationUpdateSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiUpdateSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationListResponse, SubAgentToolRelationResponse, SubAgentToolRelationSelectSchema, SubAgentToolRelationUpdateSchema, SubAgentUpdateSchema, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, TeamAgentSchema, TenantIdParamsSchema, TenantParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ThirdPartyMCPServerResponse, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolListResponse, ToolResponse, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, canDelegateToExternalAgentSchema, canDelegateToTeamAgentSchema } from "./validation/schemas.js";
10
+ import { AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentInsertSchema, AgentListResponse, AgentResponse, AgentSelectSchema, AgentStopWhenSchema, AgentUpdateSchema, AgentWithinContextOfProjectResponse, AgentWithinContextOfProjectSchema, AgentWithinContextOfProjectSelectResponse, AgentWithinContextOfProjectSelectSchema, AgentWithinContextOfProjectSelectSchemaWithRelationIds, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeyListResponse, ApiKeyResponse, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentArrayResponse, ArtifactComponentInsertSchema, ArtifactComponentListResponse, ArtifactComponentResponse, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ComponentAssociationListResponse, ComponentAssociationSchema, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigInsertSchema, ContextConfigListResponse, ContextConfigResponse, ContextConfigSelectSchema, ContextConfigUpdateSchema, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationListResponse, ConversationResponse, ConversationSelectSchema, ConversationUpdateSchema, CreateCredentialInStoreRequestSchema, CreateCredentialInStoreResponseSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceListResponse, CredentialReferenceResponse, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, CredentialStoreListResponseSchema, CredentialStoreSchema, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentArrayResponse, DataComponentBaseSchema, DataComponentInsertSchema, DataComponentListResponse, DataComponentResponse, DataComponentSelectSchema, DataComponentUpdateSchema, DatasetApiInsertSchema, DatasetApiSelectSchema, DatasetApiUpdateSchema, DatasetInsertSchema, DatasetItemApiInsertSchema, DatasetItemApiSelectSchema, DatasetItemApiUpdateSchema, DatasetItemInsertSchema, DatasetItemSelectSchema, DatasetItemUpdateSchema, DatasetRunApiInsertSchema, DatasetRunApiSelectSchema, DatasetRunApiUpdateSchema, DatasetRunConfigAgentRelationApiInsertSchema, DatasetRunConfigAgentRelationApiSelectSchema, DatasetRunConfigAgentRelationApiUpdateSchema, DatasetRunConfigAgentRelationInsertSchema, DatasetRunConfigAgentRelationSelectSchema, DatasetRunConfigAgentRelationUpdateSchema, DatasetRunConfigApiInsertSchema, DatasetRunConfigApiSelectSchema, DatasetRunConfigApiUpdateSchema, DatasetRunConfigInsertSchema, DatasetRunConfigSelectSchema, DatasetRunConfigUpdateSchema, DatasetRunConversationRelationApiInsertSchema, DatasetRunConversationRelationApiSelectSchema, DatasetRunConversationRelationApiUpdateSchema, DatasetRunConversationRelationInsertSchema, DatasetRunConversationRelationSelectSchema, DatasetRunConversationRelationUpdateSchema, DatasetRunInsertSchema, DatasetRunItemSchema, DatasetRunSelectSchema, DatasetRunUpdateSchema, DatasetSelectSchema, DatasetUpdateSchema, ErrorResponseSchema, EvaluationJobConfigApiInsertSchema, EvaluationJobConfigApiSelectSchema, EvaluationJobConfigApiUpdateSchema, EvaluationJobConfigEvaluatorRelationApiInsertSchema, EvaluationJobConfigEvaluatorRelationApiSelectSchema, EvaluationJobConfigEvaluatorRelationApiUpdateSchema, EvaluationJobConfigEvaluatorRelationInsertSchema, EvaluationJobConfigEvaluatorRelationSelectSchema, EvaluationJobConfigEvaluatorRelationUpdateSchema, EvaluationJobConfigInsertSchema, EvaluationJobConfigSelectSchema, EvaluationJobConfigUpdateSchema, EvaluationJobFilterCriteriaSchema, EvaluationResultApiInsertSchema, EvaluationResultApiSelectSchema, EvaluationResultApiUpdateSchema, EvaluationResultInsertSchema, EvaluationResultSelectSchema, EvaluationResultUpdateSchema, EvaluationRunApiInsertSchema, EvaluationRunApiSelectSchema, EvaluationRunApiUpdateSchema, EvaluationRunConfigApiInsertSchema, EvaluationRunConfigApiSelectSchema, EvaluationRunConfigApiUpdateSchema, EvaluationRunConfigEvaluationSuiteConfigRelationApiInsertSchema, EvaluationRunConfigEvaluationSuiteConfigRelationApiSelectSchema, EvaluationRunConfigEvaluationSuiteConfigRelationApiUpdateSchema, EvaluationRunConfigEvaluationSuiteConfigRelationInsertSchema, EvaluationRunConfigEvaluationSuiteConfigRelationSelectSchema, EvaluationRunConfigEvaluationSuiteConfigRelationUpdateSchema, EvaluationRunConfigInsertSchema, EvaluationRunConfigSelectSchema, EvaluationRunConfigUpdateSchema, EvaluationRunConfigWithSuiteConfigsApiSelectSchema, EvaluationRunInsertSchema, EvaluationRunSelectSchema, EvaluationRunUpdateSchema, EvaluationSuiteConfigApiInsertSchema, EvaluationSuiteConfigApiSelectSchema, EvaluationSuiteConfigApiUpdateSchema, EvaluationSuiteConfigEvaluatorRelationApiInsertSchema, EvaluationSuiteConfigEvaluatorRelationApiSelectSchema, EvaluationSuiteConfigEvaluatorRelationApiUpdateSchema, EvaluationSuiteConfigEvaluatorRelationInsertSchema, EvaluationSuiteConfigEvaluatorRelationSelectSchema, EvaluationSuiteConfigEvaluatorRelationUpdateSchema, EvaluationSuiteConfigInsertSchema, EvaluationSuiteConfigSelectSchema, EvaluationSuiteConfigUpdateSchema, EvaluatorApiInsertSchema, EvaluatorApiSelectSchema, EvaluatorApiUpdateSchema, EvaluatorInsertSchema, EvaluatorSelectSchema, EvaluatorUpdateSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentListResponse, ExternalAgentResponse, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FetchConfigSchema, FetchDefinitionSchema, FullAgentAgentInsertSchema, FullAgentSubAgentSelectSchema, FullAgentSubAgentSelectSchemaWithRelationIds, FullProjectDefinitionResponse, FullProjectDefinitionSchema, FullProjectSelectResponse, FullProjectSelectSchema, FullProjectSelectSchemaWithRelationIds, FullProjectSelectWithRelationIdsResponse, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, FunctionInsertSchema, FunctionListResponse, FunctionResponse, FunctionSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiSelectSchema, FunctionToolApiUpdateSchema, FunctionToolConfigSchema, FunctionToolInsertSchema, FunctionToolListResponse, FunctionToolResponse, FunctionToolSelectSchema, FunctionToolUpdateSchema, FunctionUpdateSchema, HeadersScopeSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiUpdateSchema, LedgerArtifactInsertSchema, LedgerArtifactSelectSchema, LedgerArtifactUpdateSchema, ListResponseSchema, MCPCatalogListResponse, MCPToolConfigSchema, McpToolDefinitionSchema, McpToolListResponse, McpToolResponse, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageListResponse, MessageResponse, MessageSelectSchema, MessageUpdateSchema, ModelSchema, ModelSettingsSchema, OAuthCallbackQuerySchema, OAuthLoginQuerySchema, PaginationQueryParamsSchema, PaginationSchema, PaginationWithRefQueryParamsSchema, PrebuiltMCPServerSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectListResponse, ProjectMetadataInsertSchema, ProjectMetadataSelectSchema, ProjectModelSchema, ProjectResponse, ProjectSelectSchema, ProjectUpdateSchema, RefQueryParamSchema, RelatedAgentInfoListResponse, RelatedAgentInfoSchema, RemovedResponseSchema, SimulationAgentSchema, SingleResponseSchema, StatusComponentSchema, StatusUpdateSchema, StopWhenSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiUpdateSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentListResponse, SubAgentArtifactComponentResponse, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentUpdateSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiUpdateSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentListResponse, SubAgentDataComponentResponse, SubAgentDataComponentSelectSchema, SubAgentDataComponentUpdateSchema, SubAgentExternalAgentRelationApiInsertSchema, SubAgentExternalAgentRelationApiSelectSchema, SubAgentExternalAgentRelationApiUpdateSchema, SubAgentExternalAgentRelationInsertSchema, SubAgentExternalAgentRelationListResponse, SubAgentExternalAgentRelationResponse, SubAgentExternalAgentRelationSelectSchema, SubAgentExternalAgentRelationUpdateSchema, SubAgentFunctionToolRelationApiInsertSchema, SubAgentFunctionToolRelationApiSelectSchema, SubAgentFunctionToolRelationInsertSchema, SubAgentFunctionToolRelationListResponse, SubAgentFunctionToolRelationResponse, SubAgentFunctionToolRelationSelectSchema, SubAgentInsertSchema, SubAgentListResponse, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationListResponse, SubAgentRelationQuerySchema, SubAgentRelationResponse, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentResponse, SubAgentSelectSchema, SubAgentStopWhenSchema, SubAgentTeamAgentRelationApiInsertSchema, SubAgentTeamAgentRelationApiSelectSchema, SubAgentTeamAgentRelationApiUpdateSchema, SubAgentTeamAgentRelationInsertSchema, SubAgentTeamAgentRelationListResponse, SubAgentTeamAgentRelationResponse, SubAgentTeamAgentRelationSelectSchema, SubAgentTeamAgentRelationUpdateSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiUpdateSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationListResponse, SubAgentToolRelationResponse, SubAgentToolRelationSelectSchema, SubAgentToolRelationUpdateSchema, SubAgentUpdateSchema, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, TeamAgentSchema, TenantIdParamsSchema, TenantParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ThirdPartyMCPServerResponse, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolListResponse, ToolResponse, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, TriggerApiInsertSchema, TriggerApiSelectSchema, TriggerApiUpdateSchema, TriggerAuthHeaderInputSchema, TriggerAuthHeaderStoredSchema, TriggerAuthHeaderUpdateSchema, TriggerAuthenticationInputSchema, TriggerAuthenticationSchema, TriggerAuthenticationStoredSchema, TriggerAuthenticationUpdateSchema, TriggerBatchConversationEvaluationSchema, TriggerConversationEvaluationSchema, TriggerDatasetRunSchema, TriggerEvaluationJobSchema, TriggerInsertSchema, TriggerInvocationApiInsertSchema, TriggerInvocationApiSelectSchema, TriggerInvocationApiUpdateSchema, TriggerInvocationInsertSchema, TriggerInvocationListResponse, TriggerInvocationResponse, TriggerInvocationSelectSchema, TriggerInvocationStatusEnum, TriggerInvocationUpdateSchema, TriggerListResponse, TriggerOutputTransformSchema, TriggerResponse, TriggerSelectSchema, TriggerUpdateSchema, canDelegateToExternalAgentInsertSchema, canDelegateToExternalAgentSchema, canDelegateToTeamAgentInsertSchema, canDelegateToTeamAgentSchema, canRelateToInternalSubAgentSchema } from "./validation/schemas.js";
9
11
  import { DEFAULT_NANGO_STORE_ID } from "./credential-stores/default-constants.js";
10
12
  import { validatePropsAsJsonSchema } from "./validation/props-validation.js";
13
+ import { CONTEXT_BREAKDOWN_TOTAL_SPAN_ATTRIBUTE, V1_BREAKDOWN_SCHEMA, calculateBreakdownTotal, createEmptyBreakdown, parseContextBreakdownFromSpan } from "./constants/context-breakdown.js";
11
14
  import { ACTIVITY_NAMES, ACTIVITY_STATUS, ACTIVITY_TYPES, AGENT_IDS, AI_OPERATIONS, AI_TOOL_TYPES, DELEGATION_FROM_SUB_AGENT_ID, DELEGATION_ID, DELEGATION_TO_SUB_AGENT_ID, SPAN_KEYS, SPAN_NAMES, TRANSFER_FROM_SUB_AGENT_ID, TRANSFER_TO_SUB_AGENT_ID, UNKNOWN_VALUE } from "./constants/otel-attributes.js";
12
15
  import { AGGREGATE_OPERATORS, DATA_SOURCES, DATA_TYPES, FIELD_TYPES, OPERATORS, ORDER_DIRECTIONS, PANEL_TYPES, QUERY_DEFAULTS, QUERY_EXPRESSIONS, QUERY_FIELD_CONFIGS, QUERY_TYPES, REDUCE_OPERATIONS } from "./constants/signoz-queries.js";
13
16
  import { detectAuthenticationRequired, exchangeMcpAuthorizationCode, initiateMcpOAuthFlow } from "./utils/auth-detection.js";
14
17
  import { loadEnvironmentFiles } from "./env.js";
15
- import { apiFetch } from "./api-client/base-client.js";
18
+ import { PinoLogger, getLogger, loggerFactory } from "./utils/logger.js";
19
+ import { decodeJwtPayload, extractBearerToken, getJwtSecret, hasIssuer, signJwt, verifyJwt } from "./utils/jwt-helpers.js";
20
+ import { InternalServices, generateInternalServiceToken, isInternalServiceToken, validateInternalServiceProjectAccess, validateInternalServiceTenantAccess, verifyInternalServiceAuthHeader, verifyInternalServiceToken } from "./utils/internal-service-auth.js";
21
+ import { BaseApiClient, BaseApiError, apiFetch } from "./api-client/base-client.js";
22
+ import { EvalApiClient, EvalApiError } from "./api-client/eval-api-client.js";
23
+ import { ManageApiError, ManagementApiClient } from "./api-client/manage-api-client.js";
24
+ import "./api-client/index.js";
25
+ import { SpiceDbPermissions, SpiceDbRelations, SpiceDbResourceTypes, getSpiceDbConfig, isAuthzEnabled } from "./auth/authz/config.js";
26
+ import { checkBulkPermissions, checkPermission, deleteRelationship, getSpiceClient, lookupResources, readRelationships, resetSpiceClient, writeRelationship } from "./auth/authz/client.js";
27
+ import { canEditProject, canUseProject, canViewProject, listAccessibleProjectIds } from "./auth/authz/permissions.js";
28
+ import { changeProjectRole, grantProjectAccess, listProjectMembers, removeProjectFromSpiceDb, revokeProjectAccess, syncOrgMemberToSpiceDb, syncProjectToSpiceDb } from "./auth/authz/sync.js";
29
+ import "./auth/authz/index.js";
16
30
  import { executionLimitsSharedDefaults } from "./constants/execution-limits-shared/defaults.js";
17
31
  import { CONVERSATION_HISTORY_DEFAULT_LIMIT, CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT, MCP_TOOL_CONNECTION_TIMEOUT_MS, MCP_TOOL_INITIAL_RECONNECTION_DELAY_MS, MCP_TOOL_MAX_RECONNECTION_DELAY_MS, MCP_TOOL_MAX_RETRIES, MCP_TOOL_RECONNECTION_DELAY_GROWTH_FACTOR } from "./constants/execution-limits-shared/index.js";
18
32
  import { ANTHROPIC_MODELS, GOOGLE_MODELS, OPENAI_MODELS } from "./constants/models.js";
19
33
  import { AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT, AGENT_EXECUTION_TRANSFER_COUNT_MAX, AGENT_EXECUTION_TRANSFER_COUNT_MIN, CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT, STATUS_UPDATE_MAX_INTERVAL_SECONDS, STATUS_UPDATE_MAX_NUM_EVENTS, SUB_AGENT_TURN_GENERATION_STEPS_DEFAULT, SUB_AGENT_TURN_GENERATION_STEPS_MAX, SUB_AGENT_TURN_GENERATION_STEPS_MIN, VALIDATION_AGENT_PROMPT_MAX_CHARS, VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS } from "./constants/schema-validation/index.js";
20
- import { PinoLogger, getLogger, loggerFactory } from "./utils/logger.js";
21
34
  import { convertZodToJsonSchema, convertZodToJsonSchemaWithPreview, extractPreviewFields, isZodSchema, jsonSchemaToZod, preview } from "./utils/schema-conversion.js";
22
35
  import { ContextConfigBuilder, contextConfig, fetchDefinition, headers } from "./context/ContextConfig.js";
23
36
  import { TemplateEngine } from "./context/TemplateEngine.js";
37
+ import "./context/index.js";
38
+ import { CredentialStoreRegistry } from "./credential-stores/CredentialStoreRegistry.js";
39
+ import { KeyChainStore, createKeyChainStore } from "./credential-stores/keychain-store.js";
40
+ import { InMemoryCredentialStore } from "./credential-stores/memory-store.js";
41
+ import { NangoCredentialStore, createNangoCredentialStore } from "./credential-stores/nango-store.js";
42
+ import { createDefaultCredentialStores } from "./credential-stores/defaults.js";
43
+ import "./credential-stores/index.js";
24
44
  import { getCredentialStoreLookupKeyFromRetrievalParams } from "./utils/credential-store-utils.js";
25
45
  import { CredentialStuffer } from "./credential-stuffer/CredentialStuffer.js";
26
- import { createDatabaseClient } from "./db/client.js";
46
+ import "./credential-stuffer/index.js";
47
+ import { createAgentManageDatabaseConnection, createAgentsManageDatabaseClient, createAgentsManageDatabasePool } from "./db/manage/manage-client.js";
48
+ import { createAgentsRunDatabaseClient } from "./db/runtime/runtime-client.js";
27
49
  import { generateId, getConversationId } from "./utils/conversations.js";
28
50
  import { validateAgentRelationships, validateAgentStructure, validateAndTypeAgentData, validateArtifactComponentReferences, validateDataComponentReferences, validateSubAgentExternalAgentRelations, validateToolReferences } from "./validation/agentFull.js";
29
- import { countContextConfigs, createContextConfig, deleteContextConfig, getContextConfigById, hasContextConfig, listContextConfigs, listContextConfigsPaginated, updateContextConfig, upsertContextConfig } from "./data-access/contextConfigs.js";
30
- import { countExternalAgents, createExternalAgent, deleteExternalAgent, externalAgentExists, externalAgentUrlExists, getExternalAgent, getExternalAgentByUrl, listExternalAgents, listExternalAgentsPaginated, updateExternalAgent, upsertExternalAgent } from "./data-access/externalAgents.js";
31
- import { deleteFunction, getFunction, listFunctions, listFunctionsPaginated, upsertFunction } from "./data-access/functions.js";
32
- import { addFunctionToolToSubAgent, createFunctionTool, deleteFunctionTool, getFunctionToolById, getFunctionToolsForSubAgent, listFunctionTools, updateFunctionTool, updateSubAgentFunctionToolRelation, upsertFunctionTool, upsertSubAgentFunctionToolRelation } from "./data-access/functionTools.js";
33
- import { createSubAgentExternalAgentRelation, deleteSubAgentExternalAgentRelation, deleteSubAgentExternalAgentRelationsByAgent, deleteSubAgentExternalAgentRelationsBySubAgent, getExternalAgentsForSubAgent, getSubAgentExternalAgentRelationById, getSubAgentExternalAgentRelationByParams, getSubAgentExternalAgentRelations, getSubAgentExternalAgentRelationsByAgent, getSubAgentExternalAgentRelationsByExternalAgent, getSubAgentsForExternalAgent, listSubAgentExternalAgentRelations, updateSubAgentExternalAgentRelation, upsertSubAgentExternalAgentRelation } from "./data-access/subAgentExternalAgentRelations.js";
34
- 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 "./data-access/subAgentRelations.js";
35
- import { SubAgentIsDefaultError, createSubAgent, deleteSubAgent, getSubAgentById, getSubAgentsByIds, listSubAgents, listSubAgentsPaginated, updateSubAgent, upsertSubAgent } from "./data-access/subAgents.js";
36
- import { createSubAgentTeamAgentRelation, deleteSubAgentTeamAgentRelation, deleteSubAgentTeamAgentRelationsByAgent, deleteSubAgentTeamAgentRelationsBySubAgent, getSubAgentTeamAgentRelationById, getSubAgentTeamAgentRelationByParams, getSubAgentTeamAgentRelations, getSubAgentTeamAgentRelationsByAgent, getSubAgentTeamAgentRelationsByTeamAgent, getSubAgentsForTeamAgent, getTeamAgentsForSubAgent, listSubAgentTeamAgentRelations, updateSubAgentTeamAgentRelation, upsertSubAgentTeamAgentRelation } from "./data-access/subAgentTeamAgentRelations.js";
37
- import "./credential-stuffer/index.js";
38
- import { extractPublicId, generateApiKey, hashApiKey, isApiKeyExpired, maskApiKey, validateApiKey } from "./utils/apiKeys.js";
51
+ import { countContextConfigs, createContextConfig, deleteContextConfig, getContextConfigById, hasContextConfig, listContextConfigs, listContextConfigsPaginated, updateContextConfig, upsertContextConfig } from "./data-access/manage/contextConfigs.js";
52
+ import { countExternalAgents, createExternalAgent, deleteExternalAgent, externalAgentExists, externalAgentUrlExists, getExternalAgent, getExternalAgentByUrl, listExternalAgents, listExternalAgentsPaginated, updateExternalAgent, upsertExternalAgent } from "./data-access/manage/externalAgents.js";
53
+ import { deleteFunction, getFunction, listFunctions, listFunctionsPaginated, upsertFunction } from "./data-access/manage/functions.js";
54
+ import { addFunctionToolToSubAgent, associateFunctionToolWithSubAgent, createFunctionTool, deleteFunctionTool, getFunctionToolById, getFunctionToolsForSubAgent, getSubAgentsUsingFunctionTool, isFunctionToolAssociatedWithSubAgent, listFunctionTools, removeFunctionToolFromSubAgent, updateFunctionTool, updateSubAgentFunctionToolRelation, upsertFunctionTool, upsertSubAgentFunctionToolRelation } from "./data-access/manage/functionTools.js";
55
+ import { createSubAgentExternalAgentRelation, deleteSubAgentExternalAgentRelation, deleteSubAgentExternalAgentRelationsByAgent, deleteSubAgentExternalAgentRelationsBySubAgent, getExternalAgentsForSubAgent, getSubAgentExternalAgentRelationById, getSubAgentExternalAgentRelationByParams, getSubAgentExternalAgentRelations, getSubAgentExternalAgentRelationsByAgent, getSubAgentExternalAgentRelationsByExternalAgent, getSubAgentsForExternalAgent, listSubAgentExternalAgentRelations, updateSubAgentExternalAgentRelation, upsertSubAgentExternalAgentRelation } from "./data-access/manage/subAgentExternalAgentRelations.js";
56
+ 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 "./data-access/manage/subAgentRelations.js";
57
+ import { SubAgentIsDefaultError, createSubAgent, deleteSubAgent, getSubAgentById, getSubAgentsByIds, listSubAgents, listSubAgentsPaginated, updateSubAgent, upsertSubAgent } from "./data-access/manage/subAgents.js";
58
+ import { createSubAgentTeamAgentRelation, deleteSubAgentTeamAgentRelation, deleteSubAgentTeamAgentRelationsByAgent, deleteSubAgentTeamAgentRelationsBySubAgent, getSubAgentTeamAgentRelationById, getSubAgentTeamAgentRelationByParams, getSubAgentTeamAgentRelations, getSubAgentTeamAgentRelationsByAgent, getSubAgentTeamAgentRelationsByTeamAgent, getSubAgentsForTeamAgent, getTeamAgentsForSubAgent, listSubAgentTeamAgentRelations, updateSubAgentTeamAgentRelation, upsertSubAgentTeamAgentRelation } from "./data-access/manage/subAgentTeamAgentRelations.js";
59
+ import { extractPublicId, generateApiKey, getMetadataFromApiKey, hashApiKey, isApiKeyExpired, maskApiKey, validateApiKey } from "./utils/apiKeys.js";
39
60
  import { normalizeDateString, toISODateString } from "./utils/date.js";
40
61
  import { ERROR_DOCS_BASE_URL, ErrorCode, commonCreateErrorResponses, commonDeleteErrorResponses, commonGetErrorResponses, commonUpdateErrorResponses, createApiError, errorResponseSchema, errorSchemaFactory, handleApiError, problemDetailsSchema } from "./utils/error.js";
41
- import { createExecutionContext, getRequestExecutionContext } from "./utils/execution.js";
42
62
  import { formatMessagesForLLM, formatMessagesForLLMContext } from "./utils/format-messages.js";
63
+ import { JsonTransformer } from "./utils/JsonTransformer.js";
43
64
  import { parseEmbeddedJson } from "./utils/json-parser.js";
44
65
  import { McpClient } from "./utils/mcp-client.js";
45
66
  import { ModelFactory } from "./utils/model-factory.js";
46
67
  import { generateServiceToken, validateTargetAgent, validateTenantId, verifyAuthorizationHeader, verifyServiceToken } from "./utils/service-token-auth.js";
47
68
  import { signTempToken, verifyTempToken } from "./utils/temp-jwt.js";
69
+ import { interpolateTemplate } from "./utils/template-interpolation.js";
48
70
  import { extractComposioServerId, fetchComposioServers, fetchSingleComposioServer, getComposioOAuthRedirectUrl, getComposioUserId, isComposioMCPServerAuthenticated } from "./utils/third-party-mcp-servers/composio-client.js";
49
71
  import { isThirdPartyMCPServerAuthenticated } from "./utils/third-party-mcp-servers/third-party-check.js";
50
72
  import { getTracer, setSpanWithError } from "./utils/tracer-factory.js";
73
+ import { hashAuthenticationHeaders, hashTriggerHeaderValue, validateTriggerHeaderValue, verifySigningSecret, verifyTriggerAuth } from "./utils/trigger-auth.js";
51
74
  import "./utils/index.js";
52
- import { countCredentialReferences, createCredentialReference, deleteCredentialReference, getCredentialReference, getCredentialReferenceById, getCredentialReferenceWithResources, getUserScopedCredentialReference, hasCredentialReference, listCredentialReferences, listCredentialReferencesPaginated, updateCredentialReference, upsertCredentialReference } from "./data-access/credentialReferences.js";
53
- import { addToolToAgent, createTool, dbResultToMcpTool, deleteTool, getToolById, listTools, removeToolFromAgent, updateTool, upsertSubAgentToolRelation, upsertTool } from "./data-access/tools.js";
54
- import { createAgent, deleteAgent, fetchComponentRelationships, getAgentById, getAgentSubAgentInfos, getAgentWithDefaultSubAgent, getFullAgentDefinition, listAgents, listAgentsPaginated, updateAgent, upsertAgent } from "./data-access/agents.js";
75
+ import { countCredentialReferences, createCredentialReference, deleteCredentialReference, getCredentialReference, getCredentialReferenceById, getCredentialReferenceWithResources, getUserScopedCredentialReference, hasCredentialReference, listCredentialReferences, listCredentialReferencesPaginated, updateCredentialReference, upsertCredentialReference } from "./data-access/manage/credentialReferences.js";
76
+ import { addToolToAgent, createTool, dbResultToMcpTool, deleteTool, getMcpToolById, getToolById, listTools, removeToolFromAgent, updateTool, upsertSubAgentToolRelation, upsertTool } from "./data-access/manage/tools.js";
77
+ import { createTrigger, deleteTrigger, getTriggerById, listTriggers, listTriggersPaginated, updateTrigger, upsertTrigger } from "./data-access/manage/triggers.js";
78
+ import { createAgent, deleteAgent, fetchComponentRelationships, getAgentById, getAgentSubAgentInfos, getAgentWithDefaultSubAgent, getFullAgentDefinition, getFullAgentDefinitionWithRelationIds, listAgents, listAgentsPaginated, updateAgent, upsertAgent } from "./data-access/manage/agents.js";
55
79
  import { validateRender } from "./validation/render-validation.js";
56
- import { agentHasArtifactComponents, associateArtifactComponentWithAgent, countArtifactComponents, countArtifactComponentsForAgent, createArtifactComponent, deleteAgentArtifactComponentRelationByAgent, deleteArtifactComponent, getAgentsUsingArtifactComponent, getArtifactComponentById, getArtifactComponentsForAgent, isArtifactComponentAssociatedWithAgent, listArtifactComponents, listArtifactComponentsPaginated, removeArtifactComponentFromAgent, updateArtifactComponent, upsertAgentArtifactComponentRelation, upsertArtifactComponent } from "./data-access/artifactComponents.js";
57
- import { associateDataComponentWithAgent, countDataComponents, createDataComponent, deleteAgentDataComponentRelationByAgent, deleteDataComponent, getAgentsUsingDataComponent, getDataComponent, getDataComponentsForAgent, isDataComponentAssociatedWithAgent, listDataComponents, listDataComponentsPaginated, removeDataComponentFromAgent, updateDataComponent, upsertAgentDataComponentRelation, upsertDataComponent } from "./data-access/dataComponents.js";
58
- import { createFullAgentServerSide, deleteFullAgent, getFullAgent, updateFullAgentServerSide } from "./data-access/agentFull.js";
59
- import { countApiKeys, createApiKey, deleteApiKey, generateAndCreateApiKey, getApiKeyById, getApiKeyByPublicId, hasApiKey, listApiKeys, listApiKeysPaginated, updateApiKey, updateApiKeyLastUsed, validateAndGetApiKey } from "./data-access/apiKeys.js";
60
- import { cleanupTenantCache, clearContextConfigCache, clearConversationCache, getCacheEntry, getContextConfigCacheEntries, getConversationCacheEntries, invalidateHeadersCache, invalidateInvocationDefinitionsCache, setCacheEntry } from "./data-access/contextCache.js";
61
- import { createConversation, createOrGetConversation, deleteConversation, getActiveAgentForConversation, getConversation, getConversationHistory, listConversations, setActiveAgentForConversation, setActiveAgentForThread, updateConversation, updateConversationActiveAgent } from "./data-access/conversations.js";
62
- import { addLedgerArtifacts, countLedgerArtifactsByTask, deleteLedgerArtifactsByContext, deleteLedgerArtifactsByTask, getLedgerArtifacts, getLedgerArtifactsByContext, upsertLedgerArtifact } from "./data-access/ledgerArtifacts.js";
63
- import { countMessagesByConversation, createMessage, deleteMessage, getMessageById, getMessagesByConversation, getMessagesByTask, getVisibleMessages, listMessages, updateMessage } from "./data-access/messages.js";
64
- import { addUserToOrganization, getPendingInvitationsByEmail, getUserOrganizations } from "./data-access/organizations.js";
65
- import { countProjects, createProject, deleteProject, getProject, getProjectResourceCounts, listProjects, listProjectsPaginated, projectExists, projectExistsInTable, projectHasResources, updateProject } from "./data-access/projects.js";
66
- import { createFullProjectServerSide, deleteFullProject, getFullProject, updateFullProjectServerSide } from "./data-access/projectFull.js";
67
- import { createTask, getTask, listTaskIdsByContextId, updateTask } from "./data-access/tasks.js";
68
- import { getUserByEmail, getUserById } from "./data-access/users.js";
80
+ import { agentHasArtifactComponents, associateArtifactComponentWithAgent, countArtifactComponents, countArtifactComponentsForAgent, createArtifactComponent, deleteAgentArtifactComponentRelationByAgent, deleteArtifactComponent, getAgentsUsingArtifactComponent, getArtifactComponentById, getArtifactComponentsForAgent, isArtifactComponentAssociatedWithAgent, listArtifactComponents, listArtifactComponentsPaginated, removeArtifactComponentFromAgent, updateArtifactComponent, upsertAgentArtifactComponentRelation, upsertArtifactComponent } from "./data-access/manage/artifactComponents.js";
81
+ import { associateDataComponentWithAgent, countDataComponents, createDataComponent, deleteAgentDataComponentRelationByAgent, deleteDataComponent, getAgentsUsingDataComponent, getDataComponent, getDataComponentsForAgent, isDataComponentAssociatedWithAgent, listDataComponents, listDataComponentsPaginated, removeDataComponentFromAgent, updateDataComponent, upsertAgentDataComponentRelation, upsertDataComponent } from "./data-access/manage/dataComponents.js";
82
+ import { createFullAgentServerSide, deleteFullAgent, getFullAgent, getFullAgentWithRelationIds, updateFullAgentServerSide } from "./data-access/manage/agentFull.js";
83
+ import { createDataset, createDatasetItem, createDatasetItems, createDatasetRunConfig, createDatasetRunConfigAgentRelation, createEvaluationJobConfig, createEvaluationJobConfigEvaluatorRelation, createEvaluationRunConfig, createEvaluationRunConfigEvaluationSuiteConfigRelation, createEvaluationSuiteConfig, createEvaluationSuiteConfigEvaluatorRelation, createEvaluator, deleteDataset, deleteDatasetItem, deleteDatasetItemsByDataset, deleteDatasetRunConfig, deleteDatasetRunConfigAgentRelation, deleteEvaluationJobConfig, deleteEvaluationJobConfigEvaluatorRelation, deleteEvaluationJobConfigEvaluatorRelationsByEvaluator, deleteEvaluationRunConfig, deleteEvaluationRunConfigEvaluationSuiteConfigRelation, deleteEvaluationSuiteConfig, deleteEvaluationSuiteConfigEvaluatorRelation, deleteEvaluationSuiteConfigEvaluatorRelationsByEvaluator, deleteEvaluator, getDatasetById, getDatasetItemById, getDatasetRunConfigAgentRelations, getDatasetRunConfigById, getEvaluationJobConfigById, getEvaluationJobConfigEvaluatorRelations, getEvaluationRunConfigById, getEvaluationRunConfigEvaluationSuiteConfigRelations, getEvaluationSuiteConfigById, getEvaluationSuiteConfigEvaluatorRelations, getEvaluatorById, getEvaluatorsByIds, linkDatasetRunToEvaluationJobConfig, listDatasetItems, listDatasetRunConfigs, listDatasets, listEvaluationJobConfigs, listEvaluationRunConfigs, listEvaluationRunConfigsWithSuiteConfigs, listEvaluationSuiteConfigs, listEvaluators, updateDataset, updateDatasetItem, updateDatasetRunConfig, updateEvaluationRunConfig, updateEvaluationSuiteConfig, updateEvaluator } from "./data-access/manage/evalConfig.js";
84
+ import { countProjects, createProject, deleteProject, getProject, getProjectResourceCounts, listProjects, listProjectsPaginated, projectExists, projectExistsInTable, projectHasResources, updateProject } from "./data-access/manage/projects.js";
85
+ import { createFullProjectServerSide, deleteFullProject, getFullProject, getFullProjectWithRelationIds, updateFullProjectServerSide } from "./data-access/manage/projectFull.js";
86
+ import { doltAdd, doltAddAndCommit, doltCommit, doltDeleteTag, doltHashOf, doltListTags, doltLog, doltReset, doltStatus, doltTag } from "./dolt/commit.js";
87
+ import { doltAbortMerge, doltConflicts, doltMerge, doltMergeStatus, doltResolveConflicts, doltSchemaConflicts, doltTableConflicts } from "./dolt/merge.js";
88
+ import { SCHEMA_SOURCE_BRANCH, areBranchesSchemaCompatible, ensureSchemaSync, formatSchemaDiffSummary, getActiveBranch, getSchemaDiff, hasSchemaDifferences, hasUncommittedChanges, syncSchemaFromMain } from "./dolt/schema-sync.js";
89
+ import { MAIN_BRANCH_SUFFIX, checkoutBranch, createBranch, deleteBranch, getBranch, getTenantMainBranch, isProtectedBranchName, listBranches, listBranchesForAgent } from "./dolt/branches-api.js";
90
+ import { checkoutRef, getCurrentBranchOrCommit, getProjectMainResolvedRef, getProjectScopedRef, getTenantScopedRef, isRefWritable, isValidCommitHash, resolveRef } from "./dolt/ref-helpers.js";
91
+ import { doltActiveBranch, doltBranch, doltBranchExists, doltCheckout, doltDeleteBranch, doltGetBranchNamespace, doltListBranches, doltRenameBranch, ensureBranchExists } from "./dolt/branch.js";
92
+ import { countProjectsInRuntime, createProjectMetadata, deleteProjectMetadata, getProjectMetadata, listProjectsMetadata, listProjectsMetadataPaginated, projectsMetadataExists } from "./data-access/runtime/projects.js";
93
+ import { createProjectMetadataAndBranch, deleteProjectWithBranch, getProjectMainBranchName, getProjectWithBranchInfo, getProjectWithMetadata, listProjectsWithMetadataPaginated } from "./data-access/manage/projectLifecycle.js";
94
+ import { countApiKeys, createApiKey, deleteApiKey, generateAndCreateApiKey, getApiKeyById, getApiKeyByPublicId, hasApiKey, listApiKeys, listApiKeysPaginated, updateApiKey, updateApiKeyLastUsed, validateAndGetApiKey } from "./data-access/runtime/apiKeys.js";
95
+ import { cascadeDeleteByAgent, cascadeDeleteByBranch, cascadeDeleteByContextConfig, cascadeDeleteByProject, cascadeDeleteBySubAgent } from "./data-access/runtime/cascade-delete.js";
96
+ import { cleanupTenantCache, clearContextConfigCache, clearConversationCache, getCacheEntry, getContextConfigCacheEntries, getConversationCacheEntries, invalidateHeadersCache, invalidateInvocationDefinitionsCache, setCacheEntry } from "./data-access/runtime/contextCache.js";
97
+ import { createConversation, createOrGetConversation, deleteConversation, getActiveAgentForConversation, getConversation, getConversationHistory, listConversations, setActiveAgentForConversation, setActiveAgentForThread, updateConversation, updateConversationActiveSubAgent } from "./data-access/runtime/conversations.js";
98
+ 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 "./data-access/runtime/evalRuns.js";
99
+ import { addLedgerArtifacts, countLedgerArtifactsByTask, deleteLedgerArtifactsByContext, deleteLedgerArtifactsByTask, getLedgerArtifacts, getLedgerArtifactsByContext, upsertLedgerArtifact } from "./data-access/runtime/ledgerArtifacts.js";
100
+ import { countMessagesByConversation, createMessage, deleteMessage, getMessageById, getMessagesByConversation, getMessagesByTask, getVisibleMessages, listMessages, updateMessage } from "./data-access/runtime/messages.js";
101
+ import { addUserToOrganization, getPendingInvitationsByEmail, getUserOrganizations, upsertOrganization } from "./data-access/runtime/organizations.js";
102
+ import { createTask, getTask, listTaskIdsByContextId, updateTask } from "./data-access/runtime/tasks.js";
103
+ import { createTriggerInvocation, getTriggerInvocationById, listTriggerInvocationsPaginated, updateTriggerInvocationStatus } from "./data-access/runtime/triggerInvocations.js";
104
+ import { getUserByEmail, getUserById } from "./data-access/runtime/users.js";
69
105
  import { createValidatedDataAccess, validateProjectExists, withProjectValidation } from "./data-access/validation.js";
70
106
  import "./data-access/index.js";
71
- import { ContextCache } from "./context/contextCache.js";
72
- import { ContextResolver } from "./context/ContextResolver.js";
73
- import { HTTP_REQUEST_PARTS, contextValidationMiddleware, getCachedValidator, isValidHttpRequest, validateAgainstJsonSchema, validateHeaders, validateHttpRequestHeaders, validationHelper } from "./middleware/contextValidation.js";
74
- import "./middleware/index.js";
75
- import { ContextFetcher, MissingRequiredVariableError } from "./context/ContextFetcher.js";
76
- import { determineContextTrigger, handleContextConfigChange, handleContextResolution } from "./context/context.js";
77
- import "./context/index.js";
78
- import { CredentialStoreRegistry } from "./credential-stores/CredentialStoreRegistry.js";
79
- import { KeyChainStore, createKeyChainStore } from "./credential-stores/keychain-store.js";
80
- import { InMemoryCredentialStore } from "./credential-stores/memory-store.js";
81
- import { NangoCredentialStore, createNangoCredentialStore } from "./credential-stores/nango-store.js";
82
- import { createDefaultCredentialStores } from "./credential-stores/defaults.js";
83
- import "./credential-stores/index.js";
84
- import { cleanupTestDatabase, closeTestDatabase, createTestDatabaseClient, createTestOrganization, createTestProject } from "./db/test-client.js";
107
+ import { cleanupBranches, cleanupBranchesByPrefix, cleanupTags, cleanupTagsByPrefix, cleanupTenant, cleanupTenantBranches, cleanupTenants, cleanupTestData, getIntegrationTestClient } from "./db/manage/dolt-cleanup.js";
108
+ import { doltDiff, doltDiffSummary } from "./dolt/diff.js";
109
+ import { createRefMiddleware, createWriteProtectionMiddleware, refMiddlewareFactory, writeProtectionMiddlewareFactory } from "./dolt/ref-middleware.js";
110
+ import { NestedRefScopeError, getCurrentRefScope, getRefScopedDb, isInRefScope, withRef } from "./dolt/ref-scope.js";
111
+ import "./dolt/index.js";
85
112
  import { A2AMessageMetadataSchema, DataOperationDetailsSchema, DataOperationEventSchema, DelegationReturnedDataSchema, DelegationSentDataSchema, TransferDataSchema } from "./validation/event-schemas.js";
86
113
  import { generateIdFromName, isValidResourceId } from "./validation/id-validation.js";
87
114
  import { DataComponentStreamEventSchema, DataOperationStreamEventSchema, DataSummaryStreamEventSchema, StreamErrorEventSchema, StreamEventSchema, StreamFinishEventSchema, TextDeltaEventSchema, TextEndEventSchema, TextStartEventSchema } from "./validation/stream-event-schemas.js";
88
115
  import "./validation/index.js";
89
116
 
90
- export { A2AMessageMetadataSchema, ACTIVITY_NAMES, ACTIVITY_STATUS, ACTIVITY_TYPES, AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT, AGENT_EXECUTION_TRANSFER_COUNT_MAX, AGENT_EXECUTION_TRANSFER_COUNT_MIN, AGENT_IDS, AGGREGATE_OPERATORS, AI_OPERATIONS, AI_TOOL_TYPES, ANTHROPIC_MODELS, AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentInsertSchema, AgentListResponse, AgentResponse, AgentSelectSchema, AgentStopWhenSchema, AgentUpdateSchema, AgentWithinContextOfProjectResponse, AgentWithinContextOfProjectSchema, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeyListResponse, ApiKeyResponse, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentArrayResponse, ArtifactComponentInsertSchema, ArtifactComponentListResponse, ArtifactComponentResponse, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT, CONVERSATION_HISTORY_DEFAULT_LIMIT, CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT, CanUseItemSchema, ComponentAssociationListResponse, ComponentAssociationSchema, ContextCache, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigBuilder, ContextConfigInsertSchema, ContextConfigListResponse, ContextConfigResponse, ContextConfigSelectSchema, ContextConfigUpdateSchema, ContextFetcher, ContextResolver, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationListResponse, ConversationResponse, ConversationSelectSchema, ConversationUpdateSchema, CreateCredentialInStoreRequestSchema, CreateCredentialInStoreResponseSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceListResponse, CredentialReferenceResponse, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, CredentialStoreListResponseSchema, CredentialStoreRegistry, CredentialStoreSchema, CredentialStoreType, CredentialStuffer, DATA_SOURCES, DATA_TYPES, DEFAULT_NANGO_STORE_ID, DELEGATION_FROM_SUB_AGENT_ID, DELEGATION_ID, DELEGATION_TO_SUB_AGENT_ID, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentArrayResponse, DataComponentBaseSchema, DataComponentInsertSchema, DataComponentListResponse, DataComponentResponse, DataComponentSelectSchema, DataComponentStreamEventSchema, DataComponentUpdateSchema, DataOperationDetailsSchema, DataOperationEventSchema, DataOperationStreamEventSchema, DataSummaryStreamEventSchema, DelegationReturnedDataSchema, DelegationSentDataSchema, ERROR_DOCS_BASE_URL, ErrorCode, ErrorResponseSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentListResponse, ExternalAgentResponse, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FIELD_TYPES, FetchConfigSchema, FetchDefinitionSchema, FullAgentAgentInsertSchema, FullProjectDefinitionResponse, FullProjectDefinitionSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, FunctionInsertSchema, FunctionListResponse, FunctionResponse, FunctionSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiSelectSchema, FunctionToolApiUpdateSchema, FunctionToolConfigSchema, FunctionToolInsertSchema, FunctionToolListResponse, FunctionToolResponse, FunctionToolSelectSchema, FunctionToolUpdateSchema, FunctionUpdateSchema, GOOGLE_MODELS, HTTP_REQUEST_PARTS, HeadersScopeSchema, InMemoryCredentialStore, KeyChainStore, LedgerArtifactApiInsertSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiUpdateSchema, LedgerArtifactInsertSchema, LedgerArtifactSelectSchema, LedgerArtifactUpdateSchema, ListResponseSchema, MAX_ID_LENGTH, MCPCatalogListResponse, MCPServerType, MCPToolConfigSchema, MCPTransportType, MCP_TOOL_CONNECTION_TIMEOUT_MS, MCP_TOOL_INITIAL_RECONNECTION_DELAY_MS, MCP_TOOL_MAX_RECONNECTION_DELAY_MS, MCP_TOOL_MAX_RETRIES, MCP_TOOL_RECONNECTION_DELAY_GROWTH_FACTOR, MIN_ID_LENGTH, McpClient, McpToolDefinitionSchema, McpToolListResponse, McpToolResponse, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageListResponse, MessageResponse, MessageSelectSchema, MessageUpdateSchema, MissingRequiredVariableError, ModelFactory, ModelSchema, ModelSettingsSchema, NangoCredentialStore, OAuthCallbackQuerySchema, OAuthLoginQuerySchema, OPENAI_MODELS, OPERATORS, ORDER_DIRECTIONS, PANEL_TYPES, PaginationQueryParamsSchema, PaginationSchema, PinoLogger, PrebuiltMCPServerSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectListResponse, ProjectModelSchema, ProjectResponse, ProjectSelectSchema, ProjectUpdateSchema, QUERY_DEFAULTS, QUERY_EXPRESSIONS, QUERY_FIELD_CONFIGS, QUERY_TYPES, REDUCE_OPERATIONS, RelatedAgentInfoListResponse, RelatedAgentInfoSchema, RemovedResponseSchema, SPAN_KEYS, SPAN_NAMES, STATUS_UPDATE_MAX_INTERVAL_SECONDS, STATUS_UPDATE_MAX_NUM_EVENTS, SUB_AGENT_TURN_GENERATION_STEPS_DEFAULT, SUB_AGENT_TURN_GENERATION_STEPS_MAX, SUB_AGENT_TURN_GENERATION_STEPS_MIN, SingleResponseSchema, StatusComponentSchema, StatusUpdateSchema, StopWhenSchema, StreamErrorEventSchema, StreamEventSchema, StreamFinishEventSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiUpdateSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentListResponse, SubAgentArtifactComponentResponse, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentUpdateSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiUpdateSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentListResponse, SubAgentDataComponentResponse, SubAgentDataComponentSelectSchema, SubAgentDataComponentUpdateSchema, SubAgentExternalAgentRelationApiInsertSchema, SubAgentExternalAgentRelationApiSelectSchema, SubAgentExternalAgentRelationApiUpdateSchema, SubAgentExternalAgentRelationInsertSchema, SubAgentExternalAgentRelationListResponse, SubAgentExternalAgentRelationResponse, SubAgentExternalAgentRelationSelectSchema, SubAgentExternalAgentRelationUpdateSchema, SubAgentInsertSchema, SubAgentIsDefaultError, SubAgentListResponse, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationListResponse, SubAgentRelationQuerySchema, SubAgentRelationResponse, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentResponse, SubAgentSelectSchema, SubAgentStopWhenSchema, SubAgentTeamAgentRelationApiInsertSchema, SubAgentTeamAgentRelationApiSelectSchema, SubAgentTeamAgentRelationApiUpdateSchema, SubAgentTeamAgentRelationInsertSchema, SubAgentTeamAgentRelationListResponse, SubAgentTeamAgentRelationResponse, SubAgentTeamAgentRelationSelectSchema, SubAgentTeamAgentRelationUpdateSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiUpdateSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationListResponse, SubAgentToolRelationResponse, SubAgentToolRelationSelectSchema, SubAgentToolRelationUpdateSchema, SubAgentUpdateSchema, TOOL_STATUS_VALUES, TRANSFER_FROM_SUB_AGENT_ID, TRANSFER_TO_SUB_AGENT_ID, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskState, TaskUpdateSchema, TeamAgentSchema, TemplateEngine, TenantIdParamsSchema, TenantParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, TextDeltaEventSchema, TextEndEventSchema, TextStartEventSchema, ThirdPartyMCPServerResponse, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolListResponse, ToolResponse, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, TransferDataSchema, UNKNOWN_VALUE, URL_SAFE_ID_PATTERN, VALIDATION_AGENT_PROMPT_MAX_CHARS, VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS, VALID_RELATION_TYPES, account, addFunctionToolToSubAgent, addLedgerArtifacts, addToolToAgent, addUserToOrganization, agentHasArtifactComponents, agentRelations, agentToolRelationsRelations, agents, apiFetch, apiKeys, apiKeysRelations, artifactComponents, artifactComponentsRelations, associateArtifactComponentWithAgent, associateDataComponentWithAgent, canDelegateToExternalAgentSchema, canDelegateToTeamAgentSchema, cleanupTenantCache, cleanupTestDatabase, clearContextConfigCache, clearConversationCache, closeTestDatabase, commonCreateErrorResponses, commonDeleteErrorResponses, commonGetErrorResponses, commonUpdateErrorResponses, contextCache, contextCacheRelations, contextConfig, contextConfigs, contextConfigsRelations, contextValidationMiddleware, conversations, conversationsRelations, convertZodToJsonSchema, convertZodToJsonSchemaWithPreview, countApiKeys, countArtifactComponents, countArtifactComponentsForAgent, countContextConfigs, countCredentialReferences, countDataComponents, countExternalAgents, countLedgerArtifactsByTask, countMessagesByConversation, countProjects, createAgent, createAgentToolRelation, createApiError, createApiKey, createArtifactComponent, createContextConfig, createConversation, createCredentialReference, createDataComponent, createDatabaseClient, createDefaultCredentialStores, createExecutionContext, createExternalAgent, createFullAgentServerSide, createFullProjectServerSide, createFunctionTool, createKeyChainStore, createMessage, createNangoCredentialStore, createOrGetConversation, createProject, createSubAgent, createSubAgentExternalAgentRelation, createSubAgentRelation, createSubAgentTeamAgentRelation, createTask, createTestDatabaseClient, createTestOrganization, createTestProject, createTool, createValidatedDataAccess, credentialReferences, credentialReferencesRelations, dataComponents, dataComponentsRelations, dbResultToMcpTool, deleteAgent, deleteAgentArtifactComponentRelationByAgent, deleteAgentDataComponentRelationByAgent, deleteAgentRelationsByAgent, deleteAgentToolRelation, deleteAgentToolRelationByAgent, deleteApiKey, deleteArtifactComponent, deleteContextConfig, deleteConversation, deleteCredentialReference, deleteDataComponent, deleteExternalAgent, deleteFullAgent, deleteFullProject, deleteFunction, deleteFunctionTool, deleteLedgerArtifactsByContext, deleteLedgerArtifactsByTask, deleteMessage, deleteProject, deleteSubAgent, deleteSubAgentExternalAgentRelation, deleteSubAgentExternalAgentRelationsByAgent, deleteSubAgentExternalAgentRelationsBySubAgent, deleteSubAgentRelation, deleteSubAgentTeamAgentRelation, deleteSubAgentTeamAgentRelationsByAgent, deleteSubAgentTeamAgentRelationsBySubAgent, deleteTool, detectAuthenticationRequired, determineContextTrigger, deviceCode, errorResponseSchema, errorSchemaFactory, exchangeMcpAuthorizationCode, executionLimitsSharedDefaults, externalAgentExists, externalAgentUrlExists, externalAgents, externalAgentsRelations, extractComposioServerId, extractPreviewFields, extractPublicId, fetchComponentRelationships, fetchComposioServers, fetchDefinition, fetchSingleComposioServer, formatMessagesForLLM, formatMessagesForLLMContext, functionTools, functionToolsRelations, functions, functionsRelations, generateAndCreateApiKey, generateApiKey, generateId, generateIdFromName, generateServiceToken, getActiveAgentForConversation, getAgentById, getAgentRelationById, getAgentRelationByParams, getAgentRelations, getAgentRelationsByAgent, getAgentRelationsBySource, getAgentSubAgentInfos, getAgentToolRelationByAgent, getAgentToolRelationById, getAgentToolRelationByTool, getAgentWithDefaultSubAgent, getAgentsForTool, getAgentsUsingArtifactComponent, getAgentsUsingDataComponent, getApiKeyById, getApiKeyByPublicId, getArtifactComponentById, getArtifactComponentsForAgent, getCacheEntry, getCachedValidator, getComposioOAuthRedirectUrl, getComposioUserId, getContextConfigById, getContextConfigCacheEntries, getConversation, getConversationCacheEntries, getConversationHistory, getConversationId, getCredentialReference, getCredentialReferenceById, getCredentialReferenceWithResources, getCredentialStoreLookupKeyFromRetrievalParams, getDataComponent, getDataComponentsForAgent, getExternalAgent, getExternalAgentByUrl, getExternalAgentsForSubAgent, getFullAgent, getFullAgentDefinition, getFullProject, getFunction, getFunctionToolById, getFunctionToolsForSubAgent, getLedgerArtifacts, getLedgerArtifactsByContext, getLogger, getMessageById, getMessagesByConversation, getMessagesByTask, getPendingInvitationsByEmail, getProject, getProjectResourceCounts, getRelatedAgentsForAgent, getRequestExecutionContext, getSubAgentById, getSubAgentExternalAgentRelationById, getSubAgentExternalAgentRelationByParams, getSubAgentExternalAgentRelations, getSubAgentExternalAgentRelationsByAgent, getSubAgentExternalAgentRelationsByExternalAgent, getSubAgentRelationsByTarget, getSubAgentTeamAgentRelationById, getSubAgentTeamAgentRelationByParams, getSubAgentTeamAgentRelations, getSubAgentTeamAgentRelationsByAgent, getSubAgentTeamAgentRelationsByTeamAgent, getSubAgentsByIds, getSubAgentsForExternalAgent, getSubAgentsForTeamAgent, getTask, getTeamAgentsForSubAgent, getToolById, getToolsForAgent, getTracer, getUserByEmail, getUserById, getUserOrganizations, getUserScopedCredentialReference, getVisibleMessages, handleApiError, handleContextConfigChange, handleContextResolution, hasApiKey, hasContextConfig, hasCredentialReference, hashApiKey, headers, initiateMcpOAuthFlow, invalidateHeadersCache, invalidateInvocationDefinitionsCache, invitation, isApiKeyExpired, isArtifactComponentAssociatedWithAgent, isComposioMCPServerAuthenticated, isDataComponentAssociatedWithAgent, isThirdPartyMCPServerAuthenticated, isValidHttpRequest, isValidResourceId, isZodSchema, jsonSchemaToZod, ledgerArtifacts, ledgerArtifactsRelations, listAgentRelations, listAgentToolRelations, listAgents, listAgentsPaginated, listApiKeys, listApiKeysPaginated, listArtifactComponents, listArtifactComponentsPaginated, listContextConfigs, listContextConfigsPaginated, listConversations, listCredentialReferences, listCredentialReferencesPaginated, listDataComponents, listDataComponentsPaginated, listExternalAgents, listExternalAgentsPaginated, listFunctionTools, listFunctions, listFunctionsPaginated, listMessages, listProjects, listProjectsPaginated, listSubAgentExternalAgentRelations, listSubAgentTeamAgentRelations, listSubAgents, listSubAgentsPaginated, listTaskIdsByContextId, listTools, loadEnvironmentFiles, loggerFactory, maskApiKey, member, messages, messagesRelations, normalizeDateString, normalizeToolSelections, organization, parseEmbeddedJson, preview, problemDetailsSchema, projectExists, projectExistsInTable, projectHasResources, projects, projectsRelations, removeArtifactComponentFromAgent, removeDataComponentFromAgent, removeToolFromAgent, resourceIdSchema, schemaValidationDefaults, session, setActiveAgentForConversation, setActiveAgentForThread, setCacheEntry, setSpanWithError, signTempToken, ssoProvider, subAgentArtifactComponents, subAgentArtifactComponentsRelations, subAgentDataComponents, subAgentDataComponentsRelations, subAgentExternalAgentRelations, subAgentExternalAgentRelationsRelations, subAgentFunctionToolRelations, subAgentFunctionToolRelationsRelations, subAgentRelations, subAgentRelationsRelations, subAgentTeamAgentRelations, subAgentTeamAgentRelationsRelations, subAgentToolRelations, subAgents, subAgentsRelations, taskRelations, taskRelationsRelations, tasks, tasksRelations, toISODateString, tools, toolsRelations, updateAgent, updateAgentRelation, updateAgentToolRelation, updateApiKey, updateApiKeyLastUsed, updateArtifactComponent, updateContextConfig, updateConversation, updateConversationActiveAgent, updateCredentialReference, updateDataComponent, updateExternalAgent, updateFullAgentServerSide, updateFullProjectServerSide, updateFunctionTool, updateMessage, updateProject, updateSubAgent, updateSubAgentExternalAgentRelation, updateSubAgentFunctionToolRelation, updateSubAgentTeamAgentRelation, updateTask, updateTool, upsertAgent, upsertAgentArtifactComponentRelation, upsertAgentDataComponentRelation, upsertArtifactComponent, upsertContextConfig, upsertCredentialReference, upsertDataComponent, upsertExternalAgent, upsertFunction, upsertFunctionTool, upsertLedgerArtifact, upsertSubAgent, upsertSubAgentExternalAgentRelation, upsertSubAgentFunctionToolRelation, upsertSubAgentRelation, upsertSubAgentTeamAgentRelation, upsertSubAgentToolRelation, upsertTool, user, validateAgainstJsonSchema, validateAgentRelationships, validateAgentStructure, validateAndGetApiKey, validateAndTypeAgentData, validateApiKey, validateArtifactComponentReferences, validateDataComponentReferences, validateHeaders, validateHttpRequestHeaders, validateProjectExists, validatePropsAsJsonSchema, validateRender, validateSubAgent, validateSubAgentExternalAgentRelations, validateTargetAgent, validateTenantId, validateToolReferences, validationHelper, verification, verifyAuthorizationHeader, verifyServiceToken, verifyTempToken, withProjectValidation };
117
+ export { A2AMessageMetadataSchema, ACTIVITY_NAMES, ACTIVITY_STATUS, ACTIVITY_TYPES, AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT, AGENT_EXECUTION_TRANSFER_COUNT_MAX, AGENT_EXECUTION_TRANSFER_COUNT_MIN, AGENT_IDS, AGGREGATE_OPERATORS, AI_OPERATIONS, AI_TOOL_TYPES, ANTHROPIC_MODELS, AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentInsertSchema, AgentListResponse, AgentResponse, AgentSelectSchema, AgentStopWhenSchema, AgentUpdateSchema, AgentWithinContextOfProjectResponse, AgentWithinContextOfProjectSchema, AgentWithinContextOfProjectSelectResponse, AgentWithinContextOfProjectSelectSchema, AgentWithinContextOfProjectSelectSchemaWithRelationIds, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeyListResponse, ApiKeyResponse, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentArrayResponse, ArtifactComponentInsertSchema, ArtifactComponentListResponse, ArtifactComponentResponse, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, BaseApiClient, BaseApiError, BranchInfoSchema, BranchListResponseSchema, BranchNameParamsSchema, BranchNameSchema, BranchResponseSchema, CONTEXT_BREAKDOWN_TOTAL_SPAN_ATTRIBUTE, CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT, CONVERSATION_HISTORY_DEFAULT_LIMIT, CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT, CanUseItemSchema, ComponentAssociationListResponse, ComponentAssociationSchema, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigBuilder, ContextConfigInsertSchema, ContextConfigListResponse, ContextConfigResponse, ContextConfigSelectSchema, ContextConfigUpdateSchema, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationListResponse, ConversationResponse, ConversationSelectSchema, ConversationUpdateSchema, CreateBranchRequestSchema, CreateCredentialInStoreRequestSchema, CreateCredentialInStoreResponseSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceListResponse, CredentialReferenceResponse, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, CredentialStoreListResponseSchema, CredentialStoreRegistry, CredentialStoreSchema, CredentialStoreType, CredentialStuffer, DATA_SOURCES, DATA_TYPES, DEFAULT_NANGO_STORE_ID, DELEGATION_FROM_SUB_AGENT_ID, DELEGATION_ID, DELEGATION_TO_SUB_AGENT_ID, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentArrayResponse, DataComponentBaseSchema, DataComponentInsertSchema, DataComponentListResponse, DataComponentResponse, DataComponentSelectSchema, DataComponentStreamEventSchema, DataComponentUpdateSchema, DataOperationDetailsSchema, DataOperationEventSchema, DataOperationStreamEventSchema, DataSummaryStreamEventSchema, DatasetApiInsertSchema, DatasetApiSelectSchema, DatasetApiUpdateSchema, DatasetInsertSchema, DatasetItemApiInsertSchema, DatasetItemApiSelectSchema, DatasetItemApiUpdateSchema, DatasetItemInsertSchema, DatasetItemSelectSchema, DatasetItemUpdateSchema, DatasetRunApiInsertSchema, DatasetRunApiSelectSchema, DatasetRunApiUpdateSchema, DatasetRunConfigAgentRelationApiInsertSchema, DatasetRunConfigAgentRelationApiSelectSchema, DatasetRunConfigAgentRelationApiUpdateSchema, DatasetRunConfigAgentRelationInsertSchema, DatasetRunConfigAgentRelationSelectSchema, DatasetRunConfigAgentRelationUpdateSchema, DatasetRunConfigApiInsertSchema, DatasetRunConfigApiSelectSchema, DatasetRunConfigApiUpdateSchema, DatasetRunConfigInsertSchema, DatasetRunConfigSelectSchema, DatasetRunConfigUpdateSchema, DatasetRunConversationRelationApiInsertSchema, DatasetRunConversationRelationApiSelectSchema, DatasetRunConversationRelationApiUpdateSchema, DatasetRunConversationRelationInsertSchema, DatasetRunConversationRelationSelectSchema, DatasetRunConversationRelationUpdateSchema, DatasetRunInsertSchema, DatasetRunItemSchema, DatasetRunSelectSchema, DatasetRunUpdateSchema, DatasetSelectSchema, DatasetUpdateSchema, DelegationReturnedDataSchema, DelegationSentDataSchema, ERROR_DOCS_BASE_URL, ErrorCode, ErrorResponseSchema, EvalApiClient, EvalApiError, EvaluationJobConfigApiInsertSchema, EvaluationJobConfigApiSelectSchema, EvaluationJobConfigApiUpdateSchema, EvaluationJobConfigEvaluatorRelationApiInsertSchema, EvaluationJobConfigEvaluatorRelationApiSelectSchema, EvaluationJobConfigEvaluatorRelationApiUpdateSchema, EvaluationJobConfigEvaluatorRelationInsertSchema, EvaluationJobConfigEvaluatorRelationSelectSchema, EvaluationJobConfigEvaluatorRelationUpdateSchema, EvaluationJobConfigInsertSchema, EvaluationJobConfigSelectSchema, EvaluationJobConfigUpdateSchema, EvaluationJobFilterCriteriaSchema, EvaluationResultApiInsertSchema, EvaluationResultApiSelectSchema, EvaluationResultApiUpdateSchema, EvaluationResultInsertSchema, EvaluationResultSelectSchema, EvaluationResultUpdateSchema, EvaluationRunApiInsertSchema, EvaluationRunApiSelectSchema, EvaluationRunApiUpdateSchema, EvaluationRunConfigApiInsertSchema, EvaluationRunConfigApiSelectSchema, EvaluationRunConfigApiUpdateSchema, EvaluationRunConfigEvaluationSuiteConfigRelationApiInsertSchema, EvaluationRunConfigEvaluationSuiteConfigRelationApiSelectSchema, EvaluationRunConfigEvaluationSuiteConfigRelationApiUpdateSchema, EvaluationRunConfigEvaluationSuiteConfigRelationInsertSchema, EvaluationRunConfigEvaluationSuiteConfigRelationSelectSchema, EvaluationRunConfigEvaluationSuiteConfigRelationUpdateSchema, EvaluationRunConfigInsertSchema, EvaluationRunConfigSelectSchema, EvaluationRunConfigUpdateSchema, EvaluationRunConfigWithSuiteConfigsApiSelectSchema, EvaluationRunInsertSchema, EvaluationRunSelectSchema, EvaluationRunUpdateSchema, EvaluationSuiteConfigApiInsertSchema, EvaluationSuiteConfigApiSelectSchema, EvaluationSuiteConfigApiUpdateSchema, EvaluationSuiteConfigEvaluatorRelationApiInsertSchema, EvaluationSuiteConfigEvaluatorRelationApiSelectSchema, EvaluationSuiteConfigEvaluatorRelationApiUpdateSchema, EvaluationSuiteConfigEvaluatorRelationInsertSchema, EvaluationSuiteConfigEvaluatorRelationSelectSchema, EvaluationSuiteConfigEvaluatorRelationUpdateSchema, EvaluationSuiteConfigInsertSchema, EvaluationSuiteConfigSelectSchema, EvaluationSuiteConfigUpdateSchema, EvaluatorApiInsertSchema, EvaluatorApiSelectSchema, EvaluatorApiUpdateSchema, EvaluatorInsertSchema, EvaluatorSelectSchema, EvaluatorUpdateSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentListResponse, ExternalAgentResponse, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FIELD_TYPES, FetchConfigSchema, FetchDefinitionSchema, FullAgentAgentInsertSchema, FullAgentSubAgentSelectSchema, FullAgentSubAgentSelectSchemaWithRelationIds, FullProjectDefinitionResponse, FullProjectDefinitionSchema, FullProjectSelectResponse, FullProjectSelectSchema, FullProjectSelectSchemaWithRelationIds, FullProjectSelectWithRelationIdsResponse, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, FunctionInsertSchema, FunctionListResponse, FunctionResponse, FunctionSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiSelectSchema, FunctionToolApiUpdateSchema, FunctionToolConfigSchema, FunctionToolInsertSchema, FunctionToolListResponse, FunctionToolResponse, FunctionToolSelectSchema, FunctionToolUpdateSchema, FunctionUpdateSchema, GOOGLE_MODELS, HeadersScopeSchema, InMemoryCredentialStore, InternalServices, JsonTransformer, KeyChainStore, LedgerArtifactApiInsertSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiUpdateSchema, LedgerArtifactInsertSchema, LedgerArtifactSelectSchema, LedgerArtifactUpdateSchema, ListResponseSchema, MAIN_BRANCH_SUFFIX, MAX_ID_LENGTH, MCPCatalogListResponse, MCPServerType, MCPToolConfigSchema, MCPTransportType, MCP_TOOL_CONNECTION_TIMEOUT_MS, MCP_TOOL_INITIAL_RECONNECTION_DELAY_MS, MCP_TOOL_MAX_RECONNECTION_DELAY_MS, MCP_TOOL_MAX_RETRIES, MCP_TOOL_RECONNECTION_DELAY_GROWTH_FACTOR, MIN_ID_LENGTH, ManageApiError, ManagementApiClient, McpClient, McpToolDefinitionSchema, McpToolListResponse, McpToolResponse, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageListResponse, MessageResponse, MessageSelectSchema, MessageUpdateSchema, ModelFactory, ModelSchema, ModelSettingsSchema, NangoCredentialStore, NestedRefScopeError, OAuthCallbackQuerySchema, OAuthLoginQuerySchema, OPENAI_MODELS, OPERATORS, ORDER_DIRECTIONS, PANEL_TYPES, PaginationQueryParamsSchema, PaginationSchema, PaginationWithRefQueryParamsSchema, PinoLogger, PrebuiltMCPServerSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectListResponse, ProjectMetadataInsertSchema, ProjectMetadataSelectSchema, ProjectModelSchema, ProjectResponse, ProjectSelectSchema, ProjectUpdateSchema, QUERY_DEFAULTS, QUERY_EXPRESSIONS, QUERY_FIELD_CONFIGS, QUERY_TYPES, REDUCE_OPERATIONS, RefQueryParamSchema, RelatedAgentInfoListResponse, RelatedAgentInfoSchema, RemovedResponseSchema, ResolvedRefSchema, SCHEMA_SOURCE_BRANCH, SPAN_KEYS, SPAN_NAMES, STATUS_UPDATE_MAX_INTERVAL_SECONDS, STATUS_UPDATE_MAX_NUM_EVENTS, SUB_AGENT_TURN_GENERATION_STEPS_DEFAULT, SUB_AGENT_TURN_GENERATION_STEPS_MAX, SUB_AGENT_TURN_GENERATION_STEPS_MIN, SimulationAgentSchema, SingleResponseSchema, SpiceDbPermissions, SpiceDbRelations, SpiceDbResourceTypes, StatusComponentSchema, StatusUpdateSchema, StopWhenSchema, StreamErrorEventSchema, StreamEventSchema, StreamFinishEventSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiUpdateSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentListResponse, SubAgentArtifactComponentResponse, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentUpdateSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiUpdateSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentListResponse, SubAgentDataComponentResponse, SubAgentDataComponentSelectSchema, SubAgentDataComponentUpdateSchema, SubAgentExternalAgentRelationApiInsertSchema, SubAgentExternalAgentRelationApiSelectSchema, SubAgentExternalAgentRelationApiUpdateSchema, SubAgentExternalAgentRelationInsertSchema, SubAgentExternalAgentRelationListResponse, SubAgentExternalAgentRelationResponse, SubAgentExternalAgentRelationSelectSchema, SubAgentExternalAgentRelationUpdateSchema, SubAgentFunctionToolRelationApiInsertSchema, SubAgentFunctionToolRelationApiSelectSchema, SubAgentFunctionToolRelationInsertSchema, SubAgentFunctionToolRelationListResponse, SubAgentFunctionToolRelationResponse, SubAgentFunctionToolRelationSelectSchema, SubAgentInsertSchema, SubAgentIsDefaultError, SubAgentListResponse, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationListResponse, SubAgentRelationQuerySchema, SubAgentRelationResponse, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentResponse, SubAgentSelectSchema, SubAgentStopWhenSchema, SubAgentTeamAgentRelationApiInsertSchema, SubAgentTeamAgentRelationApiSelectSchema, SubAgentTeamAgentRelationApiUpdateSchema, SubAgentTeamAgentRelationInsertSchema, SubAgentTeamAgentRelationListResponse, SubAgentTeamAgentRelationResponse, SubAgentTeamAgentRelationSelectSchema, SubAgentTeamAgentRelationUpdateSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiUpdateSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationListResponse, SubAgentToolRelationResponse, SubAgentToolRelationSelectSchema, SubAgentToolRelationUpdateSchema, SubAgentUpdateSchema, TOOL_STATUS_VALUES, TRANSFER_FROM_SUB_AGENT_ID, TRANSFER_TO_SUB_AGENT_ID, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskState, TaskUpdateSchema, TeamAgentSchema, TemplateEngine, TenantIdParamsSchema, TenantParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, TextDeltaEventSchema, TextEndEventSchema, TextStartEventSchema, ThirdPartyMCPServerResponse, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolListResponse, ToolResponse, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, TransferDataSchema, TriggerApiInsertSchema, TriggerApiSelectSchema, TriggerApiUpdateSchema, TriggerAuthHeaderInputSchema, TriggerAuthHeaderStoredSchema, TriggerAuthHeaderUpdateSchema, TriggerAuthenticationInputSchema, TriggerAuthenticationSchema, TriggerAuthenticationStoredSchema, TriggerAuthenticationUpdateSchema, TriggerBatchConversationEvaluationSchema, TriggerConversationEvaluationSchema, TriggerDatasetRunSchema, TriggerEvaluationJobSchema, TriggerInsertSchema, TriggerInvocationApiInsertSchema, TriggerInvocationApiSelectSchema, TriggerInvocationApiUpdateSchema, TriggerInvocationInsertSchema, TriggerInvocationListResponse, TriggerInvocationResponse, TriggerInvocationSelectSchema, TriggerInvocationStatusEnum, TriggerInvocationUpdateSchema, TriggerListResponse, TriggerOutputTransformSchema, TriggerResponse, TriggerSelectSchema, TriggerUpdateSchema, UNKNOWN_VALUE, URL_SAFE_ID_PATTERN, V1_BREAKDOWN_SCHEMA, VALIDATION_AGENT_PROMPT_MAX_CHARS, VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS, VALID_RELATION_TYPES, account, addFunctionToolToSubAgent, addLedgerArtifacts, addToolToAgent, addUserToOrganization, agentHasArtifactComponents, agentRelations, agentToolRelationsRelations, agents, apiFetch, apiKeys, areBranchesSchemaCompatible, artifactComponents, artifactComponentsRelations, associateArtifactComponentWithAgent, associateDataComponentWithAgent, associateFunctionToolWithSubAgent, calculateBreakdownTotal, canDelegateToExternalAgentInsertSchema, canDelegateToExternalAgentSchema, canDelegateToTeamAgentInsertSchema, canDelegateToTeamAgentSchema, canEditProject, canRelateToInternalSubAgentSchema, canUseProject, canViewProject, cascadeDeleteByAgent, cascadeDeleteByBranch, cascadeDeleteByContextConfig, cascadeDeleteByProject, cascadeDeleteBySubAgent, changeProjectRole, checkBulkPermissions, checkPermission, checkoutBranch, checkoutRef, cleanupBranches, cleanupBranchesByPrefix, cleanupTags, cleanupTagsByPrefix, cleanupTenant, cleanupTenantBranches, cleanupTenantCache, cleanupTenants, cleanupTestData, clearContextConfigCache, clearConversationCache, commonCreateErrorResponses, commonDeleteErrorResponses, commonGetErrorResponses, commonUpdateErrorResponses, contextCache, contextConfig, contextConfigs, contextConfigsRelations, conversations, conversationsRelations, convertZodToJsonSchema, convertZodToJsonSchemaWithPreview, countApiKeys, countArtifactComponents, countArtifactComponentsForAgent, countContextConfigs, countCredentialReferences, countDataComponents, countExternalAgents, countLedgerArtifactsByTask, countMessagesByConversation, countProjects, countProjectsInRuntime, createAgent, createAgentManageDatabaseConnection, createAgentToolRelation, createAgentsManageDatabaseClient, createAgentsManageDatabasePool, createAgentsRunDatabaseClient, createApiError, createApiKey, createArtifactComponent, createBranch, createContextConfig, createConversation, createCredentialReference, createDataComponent, createDataset, createDatasetItem, createDatasetItems, createDatasetRun, createDatasetRunConfig, createDatasetRunConfigAgentRelation, createDatasetRunConversationRelation, createDatasetRunConversationRelations, createDefaultCredentialStores, createEmptyBreakdown, createEvaluationJobConfig, createEvaluationJobConfigEvaluatorRelation, createEvaluationResult, createEvaluationResults, createEvaluationRun, createEvaluationRunConfig, createEvaluationRunConfigEvaluationSuiteConfigRelation, createEvaluationSuiteConfig, createEvaluationSuiteConfigEvaluatorRelation, createEvaluator, createExternalAgent, createFullAgentServerSide, createFullProjectServerSide, createFunctionTool, createKeyChainStore, createMessage, createNangoCredentialStore, createOrGetConversation, createProject, createProjectMetadata, createProjectMetadataAndBranch, createRefMiddleware, createSubAgent, createSubAgentExternalAgentRelation, createSubAgentRelation, createSubAgentTeamAgentRelation, createTask, createTool, createTrigger, createTriggerInvocation, createValidatedDataAccess, createWriteProtectionMiddleware, credentialReferences, credentialReferencesRelations, dataComponents, dataComponentsRelations, dataset, datasetItem, datasetRun, datasetRunConfig, datasetRunConfigAgentRelations, datasetRunConversationRelations, dbResultToMcpTool, decodeJwtPayload, deleteAgent, deleteAgentArtifactComponentRelationByAgent, deleteAgentDataComponentRelationByAgent, deleteAgentRelationsByAgent, deleteAgentToolRelation, deleteAgentToolRelationByAgent, deleteApiKey, deleteArtifactComponent, deleteBranch, 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, deleteRelationship, deleteSubAgent, deleteSubAgentExternalAgentRelation, deleteSubAgentExternalAgentRelationsByAgent, deleteSubAgentExternalAgentRelationsBySubAgent, deleteSubAgentRelation, deleteSubAgentTeamAgentRelation, deleteSubAgentTeamAgentRelationsByAgent, deleteSubAgentTeamAgentRelationsBySubAgent, deleteTool, deleteTrigger, detectAuthenticationRequired, deviceCode, doltAbortMerge, doltActiveBranch, doltAdd, doltAddAndCommit, doltBranch, doltBranchExists, doltCheckout, doltCommit, doltConflicts, doltDeleteBranch, doltDeleteTag, doltDiff, doltDiffSummary, doltGetBranchNamespace, doltHashOf, doltListBranches, doltListTags, doltLog, doltMerge, doltMergeStatus, doltRenameBranch, doltReset, doltResolveConflicts, doltSchemaConflicts, doltStatus, doltTableConflicts, doltTag, ensureBranchExists, ensureSchemaSync, errorResponseSchema, errorSchemaFactory, evaluationJobConfig, evaluationJobConfigEvaluatorRelations, evaluationResult, evaluationRun, evaluationRunConfig, evaluationRunConfigEvaluationSuiteConfigRelations, evaluationSuiteConfig, evaluationSuiteConfigEvaluatorRelations, evaluator, exchangeMcpAuthorizationCode, executionLimitsSharedDefaults, externalAgentExists, externalAgentUrlExists, externalAgents, externalAgentsRelations, extractBearerToken, extractComposioServerId, extractPreviewFields, extractPublicId, fetchComponentRelationships, fetchComposioServers, fetchDefinition, fetchSingleComposioServer, filterConversationsForJob, formatMessagesForLLM, formatMessagesForLLMContext, formatSchemaDiffSummary, functionTools, functionToolsRelations, functions, functionsRelations, generateAndCreateApiKey, generateApiKey, generateId, generateIdFromName, generateInternalServiceToken, generateServiceToken, getActiveAgentForConversation, getActiveBranch, getAgentById, getAgentRelationById, getAgentRelationByParams, getAgentRelations, getAgentRelationsByAgent, getAgentRelationsBySource, getAgentSubAgentInfos, getAgentToolRelationByAgent, getAgentToolRelationById, getAgentToolRelationByTool, getAgentWithDefaultSubAgent, getAgentsForTool, getAgentsUsingArtifactComponent, getAgentsUsingDataComponent, getApiKeyById, getApiKeyByPublicId, getArtifactComponentById, getArtifactComponentsForAgent, getBranch, getCacheEntry, getComposioOAuthRedirectUrl, getComposioUserId, getContextConfigById, getContextConfigCacheEntries, getConversation, getConversationCacheEntries, getConversationHistory, getConversationId, getCredentialReference, getCredentialReferenceById, getCredentialReferenceWithResources, getCredentialStoreLookupKeyFromRetrievalParams, getCurrentBranchOrCommit, getCurrentRefScope, 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, getIntegrationTestClient, getJwtSecret, getLedgerArtifacts, getLedgerArtifactsByContext, getLogger, getMcpToolById, getMessageById, getMessagesByConversation, getMessagesByTask, getMetadataFromApiKey, getPendingInvitationsByEmail, getProject, getProjectMainBranchName, getProjectMainResolvedRef, getProjectMetadata, getProjectResourceCounts, getProjectScopedRef, getProjectWithBranchInfo, getProjectWithMetadata, getRefScopedDb, getRelatedAgentsForAgent, getSchemaDiff, getSpiceClient, getSpiceDbConfig, getSubAgentById, getSubAgentExternalAgentRelationById, getSubAgentExternalAgentRelationByParams, getSubAgentExternalAgentRelations, getSubAgentExternalAgentRelationsByAgent, getSubAgentExternalAgentRelationsByExternalAgent, getSubAgentRelationsByTarget, getSubAgentTeamAgentRelationById, getSubAgentTeamAgentRelationByParams, getSubAgentTeamAgentRelations, getSubAgentTeamAgentRelationsByAgent, getSubAgentTeamAgentRelationsByTeamAgent, getSubAgentsByIds, getSubAgentsForExternalAgent, getSubAgentsForTeamAgent, getSubAgentsUsingFunctionTool, getTask, getTeamAgentsForSubAgent, getTenantMainBranch, getTenantScopedRef, getToolById, getToolsForAgent, getTracer, getTriggerById, getTriggerInvocationById, getUserByEmail, getUserById, getUserOrganizations, getUserScopedCredentialReference, getVisibleMessages, grantProjectAccess, handleApiError, hasApiKey, hasContextConfig, hasCredentialReference, hasIssuer, hasSchemaDifferences, hasUncommittedChanges, hashApiKey, hashAuthenticationHeaders, hashTriggerHeaderValue, headers, initiateMcpOAuthFlow, interpolateTemplate, invalidateHeadersCache, invalidateInvocationDefinitionsCache, invitation, isApiKeyExpired, isArtifactComponentAssociatedWithAgent, isAuthzEnabled, isComposioMCPServerAuthenticated, isDataComponentAssociatedWithAgent, isFunctionToolAssociatedWithSubAgent, isInRefScope, isInternalServiceToken, isProtectedBranchName, isRefWritable, isThirdPartyMCPServerAuthenticated, isValidCommitHash, isValidResourceId, isZodSchema, jsonSchemaToZod, ledgerArtifacts, ledgerArtifactsRelations, linkDatasetRunToEvaluationJobConfig, listAccessibleProjectIds, listAgentRelations, listAgentToolRelations, listAgents, listAgentsPaginated, listApiKeys, listApiKeysPaginated, listArtifactComponents, listArtifactComponentsPaginated, listBranches, listBranchesForAgent, 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, listProjectMembers, listProjects, listProjectsMetadata, listProjectsMetadataPaginated, listProjectsPaginated, listProjectsWithMetadataPaginated, listSubAgentExternalAgentRelations, listSubAgentTeamAgentRelations, listSubAgents, listSubAgentsPaginated, listTaskIdsByContextId, listTools, listTriggerInvocationsPaginated, listTriggers, listTriggersPaginated, loadEnvironmentFiles, loggerFactory, lookupResources, maskApiKey, member, messages, messagesRelations, normalizeDateString, normalizeToolSelections, organization, parseContextBreakdownFromSpan, parseEmbeddedJson, preview, problemDetailsSchema, projectExists, projectExistsInTable, projectHasResources, projectMetadata, projects, projectsMetadataExists, projectsRelations, readRelationships, refMiddlewareFactory, removeArtifactComponentFromAgent, removeDataComponentFromAgent, removeFunctionToolFromSubAgent, removeProjectFromSpiceDb, removeToolFromAgent, resetSpiceClient, resolveRef, resourceIdSchema, revokeProjectAccess, schemaValidationDefaults, session, setActiveAgentForConversation, setActiveAgentForThread, setCacheEntry, setSpanWithError, signJwt, signTempToken, ssoProvider, subAgentArtifactComponents, subAgentArtifactComponentsRelations, subAgentDataComponents, subAgentDataComponentsRelations, subAgentExternalAgentRelations, subAgentExternalAgentRelationsRelations, subAgentFunctionToolRelations, subAgentFunctionToolRelationsRelations, subAgentRelations, subAgentRelationsRelations, subAgentTeamAgentRelations, subAgentTeamAgentRelationsRelations, subAgentToolRelations, subAgents, subAgentsRelations, syncOrgMemberToSpiceDb, syncProjectToSpiceDb, syncSchemaFromMain, taskRelations, taskRelationsRelations, tasks, tasksRelations, toISODateString, tools, toolsRelations, triggerInvocations, triggers, 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, user, validateAgentRelationships, validateAgentStructure, validateAndGetApiKey, validateAndTypeAgentData, validateApiKey, validateArtifactComponentReferences, validateDataComponentReferences, validateInternalServiceProjectAccess, validateInternalServiceTenantAccess, validateProjectExists, validatePropsAsJsonSchema, validateRender, validateSubAgent, validateSubAgentExternalAgentRelations, validateTargetAgent, validateTenantId, validateToolReferences, validateTriggerHeaderValue, verification, verifyAuthorizationHeader, verifyInternalServiceAuthHeader, verifyInternalServiceToken, verifyJwt, verifyServiceToken, verifySigningSecret, verifyTempToken, verifyTriggerAuth, withProjectValidation, withRef, writeProtectionMiddlewareFactory, writeRelationship };
@@ -1,7 +1,58 @@
1
- import { AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentInsertSchema, AgentSelectSchema, AgentUpdateSchema, AgentWithinContextOfProjectSchema, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentInsertSchema, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigInsertSchema, ContextConfigSelectSchema, ContextConfigUpdateSchema, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationSelectSchema, ConversationUpdateSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentInsertSchema, DataComponentSelectSchema, DataComponentUpdateSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FetchConfigSchema, FetchDefinitionSchema, FullAgentAgentInsertSchema, FullProjectDefinitionSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, FunctionInsertSchema, FunctionSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiSelectSchema, FunctionToolApiUpdateSchema, FunctionUpdateSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiUpdateSchema, LedgerArtifactInsertSchema, LedgerArtifactSelectSchema, LedgerArtifactUpdateSchema, MCPToolConfigSchema, McpToolSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageSelectSchema, MessageUpdateSchema, PaginationSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectSelectSchema, ProjectUpdateSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiUpdateSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentUpdateSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiUpdateSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentSelectSchema, SubAgentDataComponentUpdateSchema, SubAgentExternalAgentRelationApiInsertSchema, SubAgentExternalAgentRelationApiSelectSchema, SubAgentExternalAgentRelationApiUpdateSchema, SubAgentExternalAgentRelationInsertSchema, SubAgentExternalAgentRelationSelectSchema, SubAgentExternalAgentRelationUpdateSchema, SubAgentInsertSchema, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationQuerySchema, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentSelectSchema, SubAgentTeamAgentRelationApiInsertSchema, SubAgentTeamAgentRelationApiSelectSchema, SubAgentTeamAgentRelationApiUpdateSchema, SubAgentTeamAgentRelationInsertSchema, SubAgentTeamAgentRelationSelectSchema, SubAgentTeamAgentRelationUpdateSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiUpdateSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationSelectSchema, SubAgentToolRelationUpdateSchema, SubAgentUpdateSchema, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolSelectSchema, ToolUpdateSchema, canDelegateToExternalAgentSchema } from "../validation/schemas.js";
1
+ import { AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentInsertSchema, AgentSelectSchema, AgentUpdateSchema, AgentWithinContextOfProjectSchema, AgentWithinContextOfProjectSelectSchema, AgentWithinContextOfProjectSelectSchemaWithRelationIds, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentInsertSchema, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigInsertSchema, ContextConfigSelectSchema, ContextConfigUpdateSchema, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationSelectSchema, ConversationUpdateSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentInsertSchema, DataComponentSelectSchema, DataComponentUpdateSchema, DatasetInsertSchema, DatasetItemInsertSchema, DatasetItemSelectSchema, DatasetItemUpdateSchema, DatasetRunConfigAgentRelationInsertSchema, DatasetRunConfigAgentRelationSelectSchema, DatasetRunConfigAgentRelationUpdateSchema, DatasetRunConfigInsertSchema, DatasetRunConfigSelectSchema, DatasetRunConfigUpdateSchema, DatasetRunConversationRelationInsertSchema, DatasetRunConversationRelationSelectSchema, DatasetRunConversationRelationUpdateSchema, DatasetRunInsertSchema, DatasetRunItemSchema, DatasetRunSelectSchema, DatasetRunUpdateSchema, DatasetSelectSchema, DatasetUpdateSchema, EvaluationJobConfigEvaluatorRelationInsertSchema, EvaluationJobConfigEvaluatorRelationSelectSchema, EvaluationJobConfigEvaluatorRelationUpdateSchema, EvaluationJobConfigInsertSchema, EvaluationJobConfigSelectSchema, EvaluationJobConfigUpdateSchema, EvaluationResultInsertSchema, EvaluationResultSelectSchema, EvaluationResultUpdateSchema, EvaluationRunConfigEvaluationSuiteConfigRelationInsertSchema, EvaluationRunConfigEvaluationSuiteConfigRelationSelectSchema, EvaluationRunConfigEvaluationSuiteConfigRelationUpdateSchema, EvaluationRunConfigInsertSchema, EvaluationRunConfigSelectSchema, EvaluationRunConfigUpdateSchema, EvaluationRunConfigWithSuiteConfigsApiSelectSchema, EvaluationRunInsertSchema, EvaluationRunSelectSchema, EvaluationRunUpdateSchema, EvaluationSuiteConfigEvaluatorRelationInsertSchema, EvaluationSuiteConfigEvaluatorRelationSelectSchema, EvaluationSuiteConfigEvaluatorRelationUpdateSchema, EvaluationSuiteConfigInsertSchema, EvaluationSuiteConfigSelectSchema, EvaluationSuiteConfigUpdateSchema, EvaluatorInsertSchema, EvaluatorSelectSchema, EvaluatorUpdateSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FetchConfigSchema, FetchDefinitionSchema, FullAgentAgentInsertSchema, FullAgentSubAgentSelectSchema, FullAgentSubAgentSelectSchemaWithRelationIds, FullProjectDefinitionSchema, FullProjectSelectSchema, FullProjectSelectSchemaWithRelationIds, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, FunctionInsertSchema, FunctionSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiSelectSchema, FunctionToolApiUpdateSchema, FunctionUpdateSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiUpdateSchema, LedgerArtifactInsertSchema, LedgerArtifactSelectSchema, LedgerArtifactUpdateSchema, MCPToolConfigSchema, McpToolSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageSelectSchema, MessageUpdateSchema, PaginationSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectMetadataInsertSchema, ProjectMetadataSelectSchema, ProjectSelectSchema, ProjectUpdateSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiUpdateSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentUpdateSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiUpdateSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentSelectSchema, SubAgentDataComponentUpdateSchema, SubAgentExternalAgentRelationApiInsertSchema, SubAgentExternalAgentRelationApiSelectSchema, SubAgentExternalAgentRelationApiUpdateSchema, SubAgentExternalAgentRelationInsertSchema, SubAgentExternalAgentRelationSelectSchema, SubAgentExternalAgentRelationUpdateSchema, SubAgentInsertSchema, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationQuerySchema, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentSelectSchema, SubAgentTeamAgentRelationApiInsertSchema, SubAgentTeamAgentRelationApiSelectSchema, SubAgentTeamAgentRelationApiUpdateSchema, SubAgentTeamAgentRelationInsertSchema, SubAgentTeamAgentRelationSelectSchema, SubAgentTeamAgentRelationUpdateSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiUpdateSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationSelectSchema, SubAgentToolRelationUpdateSchema, SubAgentUpdateSchema, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolSelectSchema, ToolUpdateSchema, TriggerApiInsertSchema, TriggerApiSelectSchema, TriggerApiUpdateSchema, TriggerBatchConversationEvaluationSchema, TriggerConversationEvaluationSchema, TriggerDatasetRunSchema, TriggerEvaluationJobSchema, TriggerInsertSchema, TriggerInvocationApiInsertSchema, TriggerInvocationApiSelectSchema, TriggerInvocationApiUpdateSchema, TriggerInvocationInsertSchema, TriggerInvocationSelectSchema, TriggerInvocationUpdateSchema, TriggerSelectSchema, TriggerUpdateSchema, canDelegateToExternalAgentInsertSchema, canDelegateToExternalAgentSchema, canDelegateToTeamAgentInsertSchema, canDelegateToTeamAgentSchema, canRelateToInternalSubAgentSchema } from "../validation/schemas.js";
2
2
  import { z } from "@hono/zod-openapi";
3
3
 
4
4
  //#region src/types/entities.d.ts
5
+ type DatasetRunSelect = z.infer<typeof DatasetRunSelectSchema>;
6
+ type DatasetRunInsert = z.infer<typeof DatasetRunInsertSchema>;
7
+ type DatasetRunUpdate = z.infer<typeof DatasetRunUpdateSchema>;
8
+ type DatasetRunConversationRelationSelect = z.infer<typeof DatasetRunConversationRelationSelectSchema>;
9
+ type DatasetRunConversationRelationInsert = z.infer<typeof DatasetRunConversationRelationInsertSchema>;
10
+ type DatasetRunConversationRelationUpdate = z.infer<typeof DatasetRunConversationRelationUpdateSchema>;
11
+ type EvaluationResultSelect = z.infer<typeof EvaluationResultSelectSchema>;
12
+ type EvaluationResultInsert = z.infer<typeof EvaluationResultInsertSchema>;
13
+ type EvaluationResultUpdate = z.infer<typeof EvaluationResultUpdateSchema>;
14
+ type EvaluationRunSelect = z.infer<typeof EvaluationRunSelectSchema>;
15
+ type EvaluationRunInsert = z.infer<typeof EvaluationRunInsertSchema>;
16
+ type EvaluationRunUpdate = z.infer<typeof EvaluationRunUpdateSchema>;
17
+ type EvaluationRunConfigSelect = z.infer<typeof EvaluationRunConfigSelectSchema>;
18
+ type EvaluationRunConfigInsert = z.infer<typeof EvaluationRunConfigInsertSchema>;
19
+ type EvaluationRunConfigUpdate = z.infer<typeof EvaluationRunConfigUpdateSchema>;
20
+ type EvaluationRunConfigWithSuiteConfigs = z.infer<typeof EvaluationRunConfigWithSuiteConfigsApiSelectSchema>;
21
+ type EvaluationJobConfigSelect = z.infer<typeof EvaluationJobConfigSelectSchema>;
22
+ type EvaluationJobConfigInsert = z.infer<typeof EvaluationJobConfigInsertSchema>;
23
+ type EvaluationJobConfigUpdate = z.infer<typeof EvaluationJobConfigUpdateSchema>;
24
+ type EvaluationSuiteConfigSelect = z.infer<typeof EvaluationSuiteConfigSelectSchema>;
25
+ type EvaluationSuiteConfigInsert = z.infer<typeof EvaluationSuiteConfigInsertSchema>;
26
+ type EvaluationSuiteConfigUpdate = z.infer<typeof EvaluationSuiteConfigUpdateSchema>;
27
+ type EvaluationRunConfigEvaluationSuiteConfigRelationSelect = z.infer<typeof EvaluationRunConfigEvaluationSuiteConfigRelationSelectSchema>;
28
+ type EvaluationRunConfigEvaluationSuiteConfigRelationInsert = z.infer<typeof EvaluationRunConfigEvaluationSuiteConfigRelationInsertSchema>;
29
+ type EvaluationRunConfigEvaluationSuiteConfigRelationUpdate = z.infer<typeof EvaluationRunConfigEvaluationSuiteConfigRelationUpdateSchema>;
30
+ type EvaluationJobConfigEvaluatorRelationSelect = z.infer<typeof EvaluationJobConfigEvaluatorRelationSelectSchema>;
31
+ type EvaluationJobConfigEvaluatorRelationInsert = z.infer<typeof EvaluationJobConfigEvaluatorRelationInsertSchema>;
32
+ type EvaluationJobConfigEvaluatorRelationUpdate = z.infer<typeof EvaluationJobConfigEvaluatorRelationUpdateSchema>;
33
+ type EvaluationSuiteConfigEvaluatorRelationSelect = z.infer<typeof EvaluationSuiteConfigEvaluatorRelationSelectSchema>;
34
+ type EvaluationSuiteConfigEvaluatorRelationInsert = z.infer<typeof EvaluationSuiteConfigEvaluatorRelationInsertSchema>;
35
+ type EvaluationSuiteConfigEvaluatorRelationUpdate = z.infer<typeof EvaluationSuiteConfigEvaluatorRelationUpdateSchema>;
36
+ type EvaluatorSelect = z.infer<typeof EvaluatorSelectSchema>;
37
+ type EvaluatorInsert = z.infer<typeof EvaluatorInsertSchema>;
38
+ type EvaluatorUpdate = z.infer<typeof EvaluatorUpdateSchema>;
39
+ type DatasetSelect = z.infer<typeof DatasetSelectSchema>;
40
+ type DatasetInsert = z.infer<typeof DatasetInsertSchema>;
41
+ type DatasetUpdate = z.infer<typeof DatasetUpdateSchema>;
42
+ type DatasetItemSelect = z.infer<typeof DatasetItemSelectSchema>;
43
+ type DatasetItemInsert = z.infer<typeof DatasetItemInsertSchema>;
44
+ type DatasetItemUpdate = z.infer<typeof DatasetItemUpdateSchema>;
45
+ type DatasetRunConfigSelect = z.infer<typeof DatasetRunConfigSelectSchema>;
46
+ type DatasetRunConfigInsert = z.infer<typeof DatasetRunConfigInsertSchema>;
47
+ type DatasetRunConfigUpdate = z.infer<typeof DatasetRunConfigUpdateSchema>;
48
+ type DatasetRunConfigAgentRelationSelect = z.infer<typeof DatasetRunConfigAgentRelationSelectSchema>;
49
+ type DatasetRunConfigAgentRelationInsert = z.infer<typeof DatasetRunConfigAgentRelationInsertSchema>;
50
+ type DatasetRunConfigAgentRelationUpdate = z.infer<typeof DatasetRunConfigAgentRelationUpdateSchema>;
51
+ type DatasetRunItem = z.infer<typeof DatasetRunItemSchema>;
52
+ type TriggerDatasetRunRequest = z.infer<typeof TriggerDatasetRunSchema>;
53
+ type TriggerConversationEvaluationRequest = z.infer<typeof TriggerConversationEvaluationSchema>;
54
+ type TriggerBatchConversationEvaluationRequest = z.infer<typeof TriggerBatchConversationEvaluationSchema>;
55
+ type TriggerEvaluationJobRequest = z.infer<typeof TriggerEvaluationJobSchema>;
5
56
  type SubAgentSelect = z.infer<typeof SubAgentSelectSchema>;
6
57
  type SubAgentInsert = z.infer<typeof SubAgentInsertSchema>;
7
58
  type SubAgentUpdate = z.infer<typeof SubAgentUpdateSchema>;
@@ -41,6 +92,18 @@ type ToolUpdate = z.infer<typeof ToolUpdateSchema>;
41
92
  type ToolApiSelect = z.infer<typeof ToolApiSelectSchema>;
42
93
  type ToolApiInsert = z.infer<typeof ToolApiInsertSchema>;
43
94
  type ToolApiUpdate = z.infer<typeof ToolApiUpdateSchema>;
95
+ type TriggerSelect = z.infer<typeof TriggerSelectSchema>;
96
+ type TriggerInsert = z.infer<typeof TriggerInsertSchema>;
97
+ type TriggerUpdate = z.infer<typeof TriggerUpdateSchema>;
98
+ type TriggerApiSelect = z.infer<typeof TriggerApiSelectSchema>;
99
+ type TriggerApiInsert = z.infer<typeof TriggerApiInsertSchema>;
100
+ type TriggerApiUpdate = z.infer<typeof TriggerApiUpdateSchema>;
101
+ type TriggerInvocationSelect = z.infer<typeof TriggerInvocationSelectSchema>;
102
+ type TriggerInvocationInsert = z.infer<typeof TriggerInvocationInsertSchema>;
103
+ type TriggerInvocationUpdate = z.infer<typeof TriggerInvocationUpdateSchema>;
104
+ type TriggerInvocationApiSelect = z.infer<typeof TriggerInvocationApiSelectSchema>;
105
+ type TriggerInvocationApiInsert = z.infer<typeof TriggerInvocationApiInsertSchema>;
106
+ type TriggerInvocationApiUpdate = z.infer<typeof TriggerInvocationApiUpdateSchema>;
44
107
  type McpTool = z.infer<typeof McpToolSchema>;
45
108
  type MCPToolConfig = z.infer<typeof MCPToolConfigSchema>;
46
109
  type FunctionSelect = z.infer<typeof FunctionSelectSchema>;
@@ -147,10 +210,24 @@ type LedgerArtifactApiSelect = z.infer<typeof LedgerArtifactApiSelectSchema>;
147
210
  type LedgerArtifactApiInsert = z.infer<typeof LedgerArtifactApiInsertSchema>;
148
211
  type LedgerArtifactApiUpdate = z.infer<typeof LedgerArtifactApiUpdateSchema>;
149
212
  type FullAgentDefinition = z.infer<typeof AgentWithinContextOfProjectSchema>;
213
+ type FullAgentSelect = z.infer<typeof AgentWithinContextOfProjectSelectSchema>;
214
+ type FullAgentSelectWithRelationIds = z.infer<typeof AgentWithinContextOfProjectSelectSchemaWithRelationIds>;
150
215
  type FullAgentAgentInsert = z.infer<typeof FullAgentAgentInsertSchema>;
216
+ type FullAgentSubAgentSelect = z.infer<typeof FullAgentSubAgentSelectSchema>;
217
+ type FullAgentSubAgentSelectWithRelationIds = z.infer<typeof FullAgentSubAgentSelectSchemaWithRelationIds>;
151
218
  type FullProjectDefinition = z.infer<typeof FullProjectDefinitionSchema>;
219
+ type FullProjectSelect = z.infer<typeof FullProjectSelectSchema>;
220
+ type FullProjectSelectWithRelationIds = z.infer<typeof FullProjectSelectSchemaWithRelationIds>;
221
+ type AgentWithinContextOfProjectSelect = z.infer<typeof AgentWithinContextOfProjectSelectSchema>;
222
+ type AgentWithinContextOfProjectSelectWithRelationIds = z.infer<typeof AgentWithinContextOfProjectSelectSchemaWithRelationIds>;
152
223
  type CanUseItem = z.infer<typeof CanUseItemSchema>;
153
224
  type CanDelegateToExternalAgent = z.infer<typeof canDelegateToExternalAgentSchema>;
225
+ type CanDelegateToExternalAgentInsert = z.infer<typeof canDelegateToExternalAgentInsertSchema>;
226
+ type CanDelegateToTeamAgent = z.infer<typeof canDelegateToTeamAgentSchema>;
227
+ type CanDelegateToTeamAgentInsert = z.infer<typeof canDelegateToTeamAgentInsertSchema>;
228
+ type CanDelegateToItem = CanRelateToInternalSubAgent | CanDelegateToExternalAgent | CanDelegateToTeamAgent;
229
+ type CanDelegateToItemInsert = string | CanDelegateToExternalAgentInsert | CanDelegateToTeamAgentInsert;
230
+ type CanRelateToInternalSubAgent = z.infer<typeof canRelateToInternalSubAgentSchema>;
154
231
  type SubAgentDefinition = z.infer<typeof SubAgentApiInsertSchema> & {
155
232
  canUse: CanUseItem[];
156
233
  dataComponents?: string[];
@@ -167,6 +244,8 @@ type ProjectUpdate = z.infer<typeof ProjectUpdateSchema>;
167
244
  type ProjectApiSelect = z.infer<typeof ProjectApiSelectSchema>;
168
245
  type ProjectApiInsert = z.infer<typeof ProjectApiInsertSchema>;
169
246
  type ProjectApiUpdate = z.infer<typeof ProjectApiUpdateSchema>;
247
+ type ProjectMetadataSelect = z.infer<typeof ProjectMetadataSelectSchema>;
248
+ type ProjectMetadataInsert = z.infer<typeof ProjectMetadataInsertSchema>;
170
249
  type Pagination = z.infer<typeof PaginationSchema>;
171
250
  interface SummaryEvent {
172
251
  type: string;
@@ -176,4 +255,4 @@ interface SummaryEvent {
176
255
  };
177
256
  }
178
257
  //#endregion
179
- export { AgentApiInsert, AgentApiSelect, AgentApiUpdate, AgentInsert, AgentSelect, AgentUpdate, AllAgentSelect, ApiKeyApiCreationResponse, ApiKeyApiInsert, ApiKeyApiSelect, ApiKeyApiUpdate, ApiKeyInsert, ApiKeySelect, ApiKeyUpdate, ArtifactComponentApiInsert, ArtifactComponentApiSelect, ArtifactComponentApiUpdate, ArtifactComponentInsert, ArtifactComponentSelect, ArtifactComponentUpdate, CanDelegateToExternalAgent, CanUseItem, ContextCacheApiInsert, ContextCacheApiSelect, ContextCacheApiUpdate, ContextCacheInsert, ContextCacheSelect, ContextCacheUpdate, ContextConfigApiInsert, ContextConfigApiSelect, ContextConfigApiUpdate, ContextConfigInsert, ContextConfigSelect, ContextConfigUpdate, ConversationApiInsert, ConversationApiSelect, ConversationApiUpdate, ConversationInsert, ConversationSelect, ConversationUpdate, CredentialReferenceApiInsert, CredentialReferenceApiSelect, CredentialReferenceApiUpdate, CredentialReferenceInsert, CredentialReferenceSelect, CredentialReferenceUpdate, DataComponentApiInsert, DataComponentApiSelect, DataComponentApiUpdate, DataComponentInsert, DataComponentSelect, DataComponentUpdate, ExternalAgentApiInsert, ExternalAgentApiSelect, ExternalAgentApiUpdate, ExternalAgentInsert, ExternalAgentSelect, ExternalAgentUpdate, ExternalSubAgentRelationApiInsert, ExternalSubAgentRelationInsert, FetchConfig, FetchDefinition, FullAgentAgentInsert, FullAgentDefinition, FullProjectDefinition, FunctionApiInsert, FunctionApiSelect, FunctionApiUpdate, FunctionInsert, FunctionSelect, FunctionToolApiInsert, FunctionToolApiSelect, FunctionToolApiUpdate, FunctionUpdate, LedgerArtifactApiInsert, LedgerArtifactApiSelect, LedgerArtifactApiUpdate, LedgerArtifactInsert, LedgerArtifactSelect, LedgerArtifactUpdate, MCPToolConfig, McpTool, MessageApiInsert, MessageApiSelect, MessageApiUpdate, MessageInsert, MessageSelect, MessageUpdate, Pagination, ProjectApiInsert, ProjectApiSelect, ProjectApiUpdate, ProjectInsert, ProjectSelect, ProjectUpdate, SubAgentApiInsert, SubAgentApiSelect, SubAgentApiUpdate, SubAgentArtifactComponentApiInsert, SubAgentArtifactComponentApiSelect, SubAgentArtifactComponentApiUpdate, SubAgentArtifactComponentInsert, SubAgentArtifactComponentSelect, SubAgentArtifactComponentUpdate, SubAgentDataComponentApiInsert, SubAgentDataComponentApiSelect, SubAgentDataComponentApiUpdate, SubAgentDataComponentInsert, SubAgentDataComponentSelect, SubAgentDataComponentUpdate, SubAgentDefinition, SubAgentExternalAgentRelationApiInsert, SubAgentExternalAgentRelationApiSelect, SubAgentExternalAgentRelationApiUpdate, SubAgentExternalAgentRelationInsert, SubAgentExternalAgentRelationSelect, SubAgentExternalAgentRelationUpdate, SubAgentInsert, SubAgentRelationApiInsert, SubAgentRelationApiSelect, SubAgentRelationApiUpdate, SubAgentRelationInsert, SubAgentRelationQuery, SubAgentRelationSelect, SubAgentRelationUpdate, SubAgentSelect, SubAgentTeamAgentRelationApiInsert, SubAgentTeamAgentRelationApiSelect, SubAgentTeamAgentRelationApiUpdate, SubAgentTeamAgentRelationInsert, SubAgentTeamAgentRelationSelect, SubAgentTeamAgentRelationUpdate, SubAgentToolRelationApiInsert, SubAgentToolRelationApiSelect, SubAgentToolRelationApiUpdate, SubAgentToolRelationInsert, SubAgentToolRelationSelect, SubAgentToolRelationUpdate, SubAgentUpdate, SummaryEvent, TaskApiInsert, TaskApiSelect, TaskApiUpdate, TaskInsert, TaskRelationApiInsert, TaskRelationApiSelect, TaskRelationApiUpdate, TaskRelationInsert, TaskRelationSelect, TaskRelationUpdate, TaskSelect, TaskUpdate, ToolApiInsert, ToolApiSelect, ToolApiUpdate, ToolDefinition, ToolInsert, ToolSelect, ToolUpdate };
258
+ export { AgentApiInsert, AgentApiSelect, AgentApiUpdate, AgentInsert, AgentSelect, AgentUpdate, AgentWithinContextOfProjectSelect, AgentWithinContextOfProjectSelectWithRelationIds, AllAgentSelect, ApiKeyApiCreationResponse, ApiKeyApiInsert, ApiKeyApiSelect, ApiKeyApiUpdate, ApiKeyInsert, ApiKeySelect, ApiKeyUpdate, ArtifactComponentApiInsert, ArtifactComponentApiSelect, ArtifactComponentApiUpdate, ArtifactComponentInsert, ArtifactComponentSelect, ArtifactComponentUpdate, CanDelegateToExternalAgent, CanDelegateToExternalAgentInsert, CanDelegateToItem, CanDelegateToItemInsert, CanDelegateToTeamAgent, CanDelegateToTeamAgentInsert, CanRelateToInternalSubAgent, CanUseItem, ContextCacheApiInsert, ContextCacheApiSelect, ContextCacheApiUpdate, ContextCacheInsert, ContextCacheSelect, ContextCacheUpdate, ContextConfigApiInsert, ContextConfigApiSelect, ContextConfigApiUpdate, ContextConfigInsert, ContextConfigSelect, ContextConfigUpdate, ConversationApiInsert, ConversationApiSelect, ConversationApiUpdate, ConversationInsert, ConversationSelect, ConversationUpdate, CredentialReferenceApiInsert, CredentialReferenceApiSelect, CredentialReferenceApiUpdate, CredentialReferenceInsert, CredentialReferenceSelect, CredentialReferenceUpdate, DataComponentApiInsert, DataComponentApiSelect, DataComponentApiUpdate, DataComponentInsert, DataComponentSelect, DataComponentUpdate, DatasetInsert, DatasetItemInsert, DatasetItemSelect, DatasetItemUpdate, DatasetRunConfigAgentRelationInsert, DatasetRunConfigAgentRelationSelect, DatasetRunConfigAgentRelationUpdate, DatasetRunConfigInsert, DatasetRunConfigSelect, DatasetRunConfigUpdate, DatasetRunConversationRelationInsert, DatasetRunConversationRelationSelect, DatasetRunConversationRelationUpdate, DatasetRunInsert, DatasetRunItem, DatasetRunSelect, DatasetRunUpdate, DatasetSelect, DatasetUpdate, EvaluationJobConfigEvaluatorRelationInsert, EvaluationJobConfigEvaluatorRelationSelect, EvaluationJobConfigEvaluatorRelationUpdate, EvaluationJobConfigInsert, EvaluationJobConfigSelect, EvaluationJobConfigUpdate, EvaluationResultInsert, EvaluationResultSelect, EvaluationResultUpdate, EvaluationRunConfigEvaluationSuiteConfigRelationInsert, EvaluationRunConfigEvaluationSuiteConfigRelationSelect, EvaluationRunConfigEvaluationSuiteConfigRelationUpdate, EvaluationRunConfigInsert, EvaluationRunConfigSelect, EvaluationRunConfigUpdate, EvaluationRunConfigWithSuiteConfigs, EvaluationRunInsert, EvaluationRunSelect, EvaluationRunUpdate, EvaluationSuiteConfigEvaluatorRelationInsert, EvaluationSuiteConfigEvaluatorRelationSelect, EvaluationSuiteConfigEvaluatorRelationUpdate, EvaluationSuiteConfigInsert, EvaluationSuiteConfigSelect, EvaluationSuiteConfigUpdate, EvaluatorInsert, EvaluatorSelect, EvaluatorUpdate, ExternalAgentApiInsert, ExternalAgentApiSelect, ExternalAgentApiUpdate, ExternalAgentInsert, ExternalAgentSelect, ExternalAgentUpdate, ExternalSubAgentRelationApiInsert, ExternalSubAgentRelationInsert, FetchConfig, FetchDefinition, FullAgentAgentInsert, FullAgentDefinition, FullAgentSelect, FullAgentSelectWithRelationIds, FullAgentSubAgentSelect, FullAgentSubAgentSelectWithRelationIds, FullProjectDefinition, FullProjectSelect, FullProjectSelectWithRelationIds, FunctionApiInsert, FunctionApiSelect, FunctionApiUpdate, FunctionInsert, FunctionSelect, FunctionToolApiInsert, FunctionToolApiSelect, FunctionToolApiUpdate, FunctionUpdate, LedgerArtifactApiInsert, LedgerArtifactApiSelect, LedgerArtifactApiUpdate, LedgerArtifactInsert, LedgerArtifactSelect, LedgerArtifactUpdate, MCPToolConfig, McpTool, MessageApiInsert, MessageApiSelect, MessageApiUpdate, MessageInsert, MessageSelect, MessageUpdate, Pagination, ProjectApiInsert, ProjectApiSelect, ProjectApiUpdate, ProjectInsert, ProjectMetadataInsert, ProjectMetadataSelect, ProjectSelect, ProjectUpdate, SubAgentApiInsert, SubAgentApiSelect, SubAgentApiUpdate, SubAgentArtifactComponentApiInsert, SubAgentArtifactComponentApiSelect, SubAgentArtifactComponentApiUpdate, SubAgentArtifactComponentInsert, SubAgentArtifactComponentSelect, SubAgentArtifactComponentUpdate, SubAgentDataComponentApiInsert, SubAgentDataComponentApiSelect, SubAgentDataComponentApiUpdate, SubAgentDataComponentInsert, SubAgentDataComponentSelect, SubAgentDataComponentUpdate, SubAgentDefinition, SubAgentExternalAgentRelationApiInsert, SubAgentExternalAgentRelationApiSelect, SubAgentExternalAgentRelationApiUpdate, SubAgentExternalAgentRelationInsert, SubAgentExternalAgentRelationSelect, SubAgentExternalAgentRelationUpdate, SubAgentInsert, SubAgentRelationApiInsert, SubAgentRelationApiSelect, SubAgentRelationApiUpdate, SubAgentRelationInsert, SubAgentRelationQuery, SubAgentRelationSelect, SubAgentRelationUpdate, SubAgentSelect, SubAgentTeamAgentRelationApiInsert, SubAgentTeamAgentRelationApiSelect, SubAgentTeamAgentRelationApiUpdate, SubAgentTeamAgentRelationInsert, SubAgentTeamAgentRelationSelect, SubAgentTeamAgentRelationUpdate, SubAgentToolRelationApiInsert, SubAgentToolRelationApiSelect, SubAgentToolRelationApiUpdate, SubAgentToolRelationInsert, SubAgentToolRelationSelect, SubAgentToolRelationUpdate, SubAgentUpdate, SummaryEvent, TaskApiInsert, TaskApiSelect, TaskApiUpdate, TaskInsert, TaskRelationApiInsert, TaskRelationApiSelect, TaskRelationApiUpdate, TaskRelationInsert, TaskRelationSelect, TaskRelationUpdate, TaskSelect, TaskUpdate, ToolApiInsert, ToolApiSelect, ToolApiUpdate, ToolDefinition, ToolInsert, ToolSelect, ToolUpdate, TriggerApiInsert, TriggerApiSelect, TriggerApiUpdate, TriggerBatchConversationEvaluationRequest, TriggerConversationEvaluationRequest, TriggerDatasetRunRequest, TriggerEvaluationJobRequest, TriggerInsert, TriggerInvocationApiInsert, TriggerInvocationApiSelect, TriggerInvocationApiUpdate, TriggerInvocationInsert, TriggerInvocationSelect, TriggerInvocationUpdate, TriggerSelect, TriggerUpdate };