@inkeep/agents-core 0.41.2 → 0.43.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 (258) 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 +60 -2
  11. package/dist/auth/authz/client.d.ts +87 -0
  12. package/dist/auth/authz/client.js +196 -0
  13. package/dist/auth/authz/config.d.ts +103 -0
  14. package/dist/auth/authz/config.js +93 -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 +53 -0
  18. package/dist/auth/authz/permissions.js +83 -0
  19. package/dist/auth/authz/sync.d.ts +106 -0
  20. package/dist/auth/authz/sync.js +321 -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 +9 -3
  24. package/dist/client-exports.js +4 -2
  25. package/dist/constants/context-breakdown.d.ts +61 -0
  26. package/dist/constants/context-breakdown.js +124 -0
  27. package/dist/constants/execution-limits-shared/defaults.d.ts +1 -1
  28. package/dist/constants/execution-limits-shared/defaults.js +1 -1
  29. package/dist/constants/execution-limits-shared/index.d.ts +1 -1
  30. package/dist/constants/otel-attributes.d.ts +4 -0
  31. package/dist/constants/otel-attributes.js +4 -0
  32. package/dist/context/ContextConfig.d.ts +2 -2
  33. package/dist/context/ContextConfig.js +3 -3
  34. package/dist/context/TemplateEngine.d.ts +0 -6
  35. package/dist/context/TemplateEngine.js +4 -19
  36. package/dist/context/index.d.ts +1 -5
  37. package/dist/context/index.js +1 -5
  38. package/dist/credential-stores/keychain-store.d.ts +20 -8
  39. package/dist/credential-stores/keychain-store.js +107 -43
  40. package/dist/credential-stuffer/CredentialStuffer.d.ts +1 -1
  41. package/dist/data-access/index.d.ts +34 -26
  42. package/dist/data-access/index.js +34 -26
  43. package/dist/data-access/manage/agentFull.d.ts +36 -0
  44. package/dist/data-access/{agentFull.js → manage/agentFull.js} +209 -7
  45. package/dist/data-access/{agents.d.ts → manage/agents.d.ts} +64 -63
  46. package/dist/data-access/{agents.js → manage/agents.js} +80 -27
  47. package/dist/data-access/{artifactComponents.d.ts → manage/artifactComponents.d.ts} +33 -33
  48. package/dist/data-access/{artifactComponents.js → manage/artifactComponents.js} +5 -5
  49. package/dist/data-access/{contextConfigs.d.ts → manage/contextConfigs.d.ts} +26 -26
  50. package/dist/data-access/{contextConfigs.js → manage/contextConfigs.js} +3 -3
  51. package/dist/data-access/{credentialReferences.d.ts → manage/credentialReferences.d.ts} +17 -17
  52. package/dist/data-access/{credentialReferences.js → manage/credentialReferences.js} +2 -2
  53. package/dist/data-access/{dataComponents.d.ts → manage/dataComponents.d.ts} +26 -26
  54. package/dist/data-access/{dataComponents.js → manage/dataComponents.js} +7 -7
  55. package/dist/data-access/manage/evalConfig.d.ts +221 -0
  56. package/dist/data-access/manage/evalConfig.js +275 -0
  57. package/dist/data-access/{externalAgents.d.ts → manage/externalAgents.d.ts} +16 -16
  58. package/dist/data-access/{externalAgents.js → manage/externalAgents.js} +2 -2
  59. package/dist/data-access/manage/functionTools.d.ts +242 -0
  60. package/dist/data-access/{functionTools.js → manage/functionTools.js} +124 -30
  61. package/dist/data-access/{functions.d.ts → manage/functions.d.ts} +9 -9
  62. package/dist/data-access/{functions.js → manage/functions.js} +3 -3
  63. package/dist/data-access/manage/projectFull.d.ts +38 -0
  64. package/dist/data-access/{projectFull.js → manage/projectFull.js} +64 -65
  65. package/dist/data-access/manage/projectLifecycle.d.ts +119 -0
  66. package/dist/data-access/manage/projectLifecycle.js +234 -0
  67. package/dist/data-access/manage/projects.d.ts +75 -0
  68. package/dist/data-access/{projects.js → manage/projects.js} +15 -16
  69. package/dist/data-access/{subAgentExternalAgentRelations.d.ts → manage/subAgentExternalAgentRelations.d.ts} +43 -43
  70. package/dist/data-access/{subAgentExternalAgentRelations.js → manage/subAgentExternalAgentRelations.js} +2 -2
  71. package/dist/data-access/{subAgentRelations.d.ts → manage/subAgentRelations.d.ts} +65 -65
  72. package/dist/data-access/{subAgentRelations.js → manage/subAgentRelations.js} +3 -3
  73. package/dist/data-access/{subAgentTeamAgentRelations.d.ts → manage/subAgentTeamAgentRelations.d.ts} +43 -43
  74. package/dist/data-access/{subAgentTeamAgentRelations.js → manage/subAgentTeamAgentRelations.js} +2 -2
  75. package/dist/data-access/{subAgents.d.ts → manage/subAgents.d.ts} +28 -28
  76. package/dist/data-access/{subAgents.js → manage/subAgents.js} +4 -4
  77. package/dist/data-access/{tools.d.ts → manage/tools.d.ts} +65 -52
  78. package/dist/data-access/{tools.js → manage/tools.js} +109 -64
  79. package/dist/data-access/manage/triggers.d.ts +106 -0
  80. package/dist/data-access/manage/triggers.js +81 -0
  81. package/dist/data-access/{apiKeys.d.ts → runtime/apiKeys.d.ts} +37 -37
  82. package/dist/data-access/{apiKeys.js → runtime/apiKeys.js} +3 -3
  83. package/dist/data-access/runtime/cascade-delete.d.ts +77 -0
  84. package/dist/data-access/runtime/cascade-delete.js +111 -0
  85. package/dist/data-access/{contextCache.d.ts → runtime/contextCache.d.ts} +13 -13
  86. package/dist/data-access/{contextCache.js → runtime/contextCache.js} +5 -5
  87. package/dist/data-access/{conversations.d.ts → runtime/conversations.d.ts} +80 -31
  88. package/dist/data-access/{conversations.js → runtime/conversations.js} +13 -7
  89. package/dist/data-access/runtime/evalRuns.d.ts +120 -0
  90. package/dist/data-access/runtime/evalRuns.js +168 -0
  91. package/dist/data-access/{ledgerArtifacts.d.ts → runtime/ledgerArtifacts.d.ts} +13 -13
  92. package/dist/data-access/{ledgerArtifacts.js → runtime/ledgerArtifacts.js} +3 -3
  93. package/dist/data-access/{messages.d.ts → runtime/messages.d.ts} +24 -24
  94. package/dist/data-access/{messages.js → runtime/messages.js} +2 -2
  95. package/dist/data-access/{organizations.d.ts → runtime/organizations.d.ts} +16 -7
  96. package/dist/data-access/{organizations.js → runtime/organizations.js} +16 -4
  97. package/dist/data-access/runtime/projects.d.ts +62 -0
  98. package/dist/data-access/runtime/projects.js +90 -0
  99. package/dist/data-access/runtime/tasks.d.ts +55 -0
  100. package/dist/data-access/{tasks.js → runtime/tasks.js} +2 -2
  101. package/dist/data-access/runtime/triggerInvocations.d.ts +62 -0
  102. package/dist/data-access/runtime/triggerInvocations.js +54 -0
  103. package/dist/data-access/runtime/users.d.ts +19 -0
  104. package/dist/data-access/{users.js → runtime/users.js} +2 -2
  105. package/dist/data-access/validation.d.ts +4 -4
  106. package/dist/data-access/validation.js +1 -1
  107. package/dist/db/clean.d.ts +8 -4
  108. package/dist/db/clean.js +14 -105
  109. package/dist/db/delete.d.ts +1 -1
  110. package/dist/db/delete.js +7 -10
  111. package/dist/db/manage/dolt-cleanup.d.ts +51 -0
  112. package/dist/db/manage/dolt-cleanup.js +132 -0
  113. package/dist/db/manage/manage-client.d.ts +26 -0
  114. package/dist/db/manage/manage-client.js +68 -0
  115. package/dist/db/{schema.d.ts → manage/manage-schema.d.ts} +1257 -969
  116. package/dist/db/{schema.js → manage/manage-schema.js} +436 -334
  117. package/dist/db/manage/test-manage-client.d.ts +27 -0
  118. package/dist/db/manage/test-manage-client.js +68 -0
  119. package/dist/db/runtime/runtime-client.d.ts +20 -0
  120. package/dist/db/runtime/runtime-client.js +30 -0
  121. package/dist/db/runtime/runtime-schema.d.ts +2834 -0
  122. package/dist/db/runtime/runtime-schema.js +483 -0
  123. package/dist/db/runtime/test-runtime-client.d.ts +27 -0
  124. package/dist/db/{test-client.js → runtime/test-runtime-client.js} +11 -25
  125. package/dist/db/utils.d.ts +6 -0
  126. package/dist/db/utils.js +42 -0
  127. package/dist/dolt/branch.d.ts +62 -0
  128. package/dist/dolt/branch.js +82 -0
  129. package/dist/dolt/branches-api.d.ts +108 -0
  130. package/dist/dolt/branches-api.js +162 -0
  131. package/dist/dolt/commit.d.ts +94 -0
  132. package/dist/dolt/commit.js +103 -0
  133. package/dist/dolt/diff.d.ts +27 -0
  134. package/dist/dolt/diff.js +21 -0
  135. package/dist/dolt/index.d.ts +10 -0
  136. package/dist/dolt/index.js +11 -0
  137. package/dist/dolt/merge.d.ts +63 -0
  138. package/dist/dolt/merge.js +81 -0
  139. package/dist/dolt/migrate-all-branches.d.ts +4 -0
  140. package/dist/dolt/migrate-all-branches.js +83 -0
  141. package/dist/dolt/migrate-dolt.d.ts +1 -0
  142. package/dist/dolt/migrate-dolt.js +25 -0
  143. package/dist/dolt/ref-helpers.d.ts +19 -0
  144. package/dist/dolt/ref-helpers.js +65 -0
  145. package/dist/dolt/ref-middleware.d.ts +82 -0
  146. package/dist/dolt/ref-middleware.js +217 -0
  147. package/dist/dolt/ref-scope.d.ts +101 -0
  148. package/dist/dolt/ref-scope.js +231 -0
  149. package/dist/dolt/schema-sync.d.ts +135 -0
  150. package/dist/dolt/schema-sync.js +255 -0
  151. package/dist/env.d.ts +6 -4
  152. package/dist/env.js +3 -2
  153. package/dist/index.d.ts +73 -46
  154. package/dist/index.js +76 -49
  155. package/dist/types/@napi-rs__keyring/index.d.ts +14 -0
  156. package/dist/types/entities.d.ts +81 -2
  157. package/dist/types/index.d.ts +3 -3
  158. package/dist/types/utility.d.ts +46 -5
  159. package/dist/types/utility.js +2 -1
  160. package/dist/utils/JsonTransformer.d.ts +42 -0
  161. package/dist/utils/JsonTransformer.js +103 -0
  162. package/dist/utils/apiKeys.d.ts +5 -1
  163. package/dist/utils/apiKeys.js +11 -1
  164. package/dist/utils/colors.d.ts +34 -0
  165. package/dist/utils/colors.js +49 -0
  166. package/dist/utils/credential-store-utils.d.ts +1 -1
  167. package/dist/utils/format-messages.d.ts +1 -1
  168. package/dist/utils/index.d.ts +8 -4
  169. package/dist/utils/index.js +8 -4
  170. package/dist/utils/internal-service-auth.d.ts +79 -0
  171. package/dist/utils/internal-service-auth.js +140 -0
  172. package/dist/utils/jmespath-utils.d.ts +152 -0
  173. package/dist/utils/jmespath-utils.js +213 -0
  174. package/dist/utils/jwt-helpers.d.ts +56 -0
  175. package/dist/utils/jwt-helpers.js +90 -0
  176. package/dist/utils/mcp-client.d.ts +1 -1
  177. package/dist/utils/mcp-client.js +1 -1
  178. package/dist/utils/service-token-auth.d.ts +9 -27
  179. package/dist/utils/service-token-auth.js +48 -96
  180. package/dist/utils/signature-validation.d.ts +2 -0
  181. package/dist/utils/signature-validation.js +3 -0
  182. package/dist/utils/template-interpolation.d.ts +22 -0
  183. package/dist/utils/template-interpolation.js +62 -0
  184. package/dist/utils/third-party-mcp-servers/composio-client.d.ts +13 -1
  185. package/dist/utils/third-party-mcp-servers/composio-client.js +47 -29
  186. package/dist/utils/third-party-mcp-servers/index.d.ts +2 -2
  187. package/dist/utils/third-party-mcp-servers/index.js +2 -2
  188. package/dist/utils/trigger-auth.d.ts +85 -0
  189. package/dist/utils/trigger-auth.js +233 -0
  190. package/dist/validation/agentFull.js +2 -4
  191. package/dist/validation/dolt-schemas.d.ts +49 -0
  192. package/dist/validation/dolt-schemas.js +44 -0
  193. package/dist/validation/drizzle-schema-helpers.d.ts +4 -26
  194. package/dist/validation/drizzle-schema-helpers.js +5 -151
  195. package/dist/validation/index.d.ts +5 -4
  196. package/dist/validation/index.js +4 -3
  197. package/dist/validation/render-validation.js +19 -0
  198. package/dist/validation/schemas.d.ts +18223 -5148
  199. package/dist/validation/schemas.js +559 -12
  200. package/dist/validation/stream-event-schemas.d.ts +96 -1
  201. package/dist/validation/stream-event-schemas.js +67 -2
  202. package/drizzle/manage/0000_tearful_rhodey.sql +414 -0
  203. package/drizzle/manage/0001_broken_wendell_vaughn.sql +19 -0
  204. package/drizzle/manage/0002_bent_sunfire.sql +1 -0
  205. package/drizzle/manage/0003_tiny_captain_universe.sql +8 -0
  206. package/drizzle/manage/0004_curious_phil_sheldon.sql +2 -0
  207. package/drizzle/manage/0005_silent_shatterstar.sql +53 -0
  208. package/drizzle/manage/meta/0000_snapshot.json +2987 -0
  209. package/drizzle/manage/meta/0001_snapshot.json +3115 -0
  210. package/drizzle/manage/meta/0002_snapshot.json +3115 -0
  211. package/drizzle/manage/meta/0003_snapshot.json +3134 -0
  212. package/drizzle/manage/meta/0004_snapshot.json +3141 -0
  213. package/drizzle/manage/meta/0005_snapshot.json +3141 -0
  214. package/drizzle/manage/meta/_journal.json +48 -0
  215. package/drizzle/runtime/0008_silly_preak.sql +127 -0
  216. package/drizzle/runtime/0009_freezing_leo.sql +17 -0
  217. package/drizzle/runtime/meta/0008_snapshot.json +2263 -0
  218. package/drizzle/runtime/meta/0009_snapshot.json +2397 -0
  219. package/drizzle/{meta → runtime/meta}/_journal.json +14 -0
  220. package/package.json +56 -18
  221. package/spicedb/schema.zed +114 -0
  222. package/dist/context/ContextFetcher.d.ts +0 -73
  223. package/dist/context/ContextFetcher.js +0 -291
  224. package/dist/context/ContextResolver.d.ts +0 -60
  225. package/dist/context/ContextResolver.js +0 -278
  226. package/dist/context/context.d.ts +0 -27
  227. package/dist/context/context.js +0 -128
  228. package/dist/context/contextCache.d.ts +0 -58
  229. package/dist/context/contextCache.js +0 -177
  230. package/dist/data-access/agentFull.d.ts +0 -33
  231. package/dist/data-access/functionTools.d.ts +0 -169
  232. package/dist/data-access/projectFull.d.ts +0 -32
  233. package/dist/data-access/projects.d.ts +0 -71
  234. package/dist/data-access/tasks.d.ts +0 -45
  235. package/dist/data-access/users.d.ts +0 -19
  236. package/dist/db/client.d.ts +0 -20
  237. package/dist/db/client.js +0 -28
  238. package/dist/db/test-client.d.ts +0 -31
  239. package/dist/middleware/contextValidation.d.ts +0 -46
  240. package/dist/middleware/contextValidation.js +0 -280
  241. package/dist/middleware/index.d.ts +0 -2
  242. package/dist/middleware/index.js +0 -3
  243. package/dist/utils/execution.d.ts +0 -22
  244. package/dist/utils/execution.js +0 -25
  245. /package/drizzle/{0000_exotic_mysterio.sql → runtime/0000_exotic_mysterio.sql} +0 -0
  246. /package/drizzle/{0001_calm_sheva_callister.sql → runtime/0001_calm_sheva_callister.sql} +0 -0
  247. /package/drizzle/{0002_puzzling_goblin_queen.sql → runtime/0002_puzzling_goblin_queen.sql} +0 -0
  248. /package/drizzle/{0003_sweet_human_robot.sql → runtime/0003_sweet_human_robot.sql} +0 -0
  249. /package/drizzle/{0004_cuddly_shooting_star.sql → runtime/0004_cuddly_shooting_star.sql} +0 -0
  250. /package/drizzle/{0005_reflective_starfox.sql → runtime/0005_reflective_starfox.sql} +0 -0
  251. /package/drizzle/{0006_stale_thaddeus_ross.sql → runtime/0006_stale_thaddeus_ross.sql} +0 -0
  252. /package/drizzle/{0007_slim_karma.sql → runtime/0007_slim_karma.sql} +0 -0
  253. /package/drizzle/{meta → runtime/meta}/0000_snapshot.json +0 -0
  254. /package/drizzle/{meta → runtime/meta}/0001_snapshot.json +0 -0
  255. /package/drizzle/{meta → runtime/meta}/0003_snapshot.json +0 -0
  256. /package/drizzle/{meta → runtime/meta}/0005_snapshot.json +0 -0
  257. /package/drizzle/{meta → runtime/meta}/0006_snapshot.json +0 -0
  258. /package/drizzle/{meta → runtime/meta}/0007_snapshot.json +0 -0
@@ -1,6 +1,9 @@
1
1
  import { schemaValidationDefaults } from "../constants/schema-validation/defaults.js";
2
2
  import { CredentialStoreType, MCPServerType, MCPTransportType, TOOL_STATUS_VALUES, VALID_RELATION_TYPES } from "../types/utility.js";
3
- import { agents, apiKeys, artifactComponents, contextCache, contextConfigs, conversations, credentialReferences, dataComponents, externalAgents, functionTools, functions, ledgerArtifacts, messages, projects, subAgentArtifactComponents, subAgentDataComponents, subAgentExternalAgentRelations, subAgentRelations, subAgentTeamAgentRelations, subAgentToolRelations, subAgents, taskRelations, tasks, tools } from "../db/schema.js";
3
+ import { jmespathString, validateJMESPathSecure, validateRegex } from "../utils/jmespath-utils.js";
4
+ import { agents, artifactComponents, contextConfigs, credentialReferences, dataComponents, dataset, datasetItem, datasetRunConfig, datasetRunConfigAgentRelations, evaluationJobConfig, evaluationJobConfigEvaluatorRelations, evaluationRunConfig, evaluationRunConfigEvaluationSuiteConfigRelations, evaluationSuiteConfig, evaluationSuiteConfigEvaluatorRelations, evaluator, externalAgents, functionTools, functions, projects, subAgentArtifactComponents, subAgentDataComponents, subAgentExternalAgentRelations, subAgentFunctionToolRelations, subAgentRelations, subAgentTeamAgentRelations, subAgentToolRelations, subAgents, tools, triggers } from "../db/manage/manage-schema.js";
5
+ import { apiKeys, contextCache, conversations, datasetRun, datasetRunConversationRelations, evaluationResult, evaluationRun, ledgerArtifacts, messages, projectMetadata, taskRelations, tasks, triggerInvocations } from "../db/runtime/runtime-schema.js";
6
+ import { ResolvedRefSchema } from "./dolt-schemas.js";
4
7
  import { MAX_ID_LENGTH, MIN_ID_LENGTH, URL_SAFE_ID_PATTERN, createInsertSchema, createResourceIdSchema, createSelectSchema, registerFieldSchemas, resourceIdSchema } from "./drizzle-schema-helpers.js";
5
8
  import { z } from "@hono/zod-openapi";
6
9
 
@@ -18,6 +21,11 @@ const ModelSettingsSchema = z.object({
18
21
  model: z.string().optional().describe("The model to use for the project."),
19
22
  providerOptions: z.record(z.string(), z.any()).optional().describe("The provider options to use for the project.")
20
23
  }).openapi("ModelSettings");
24
+ const SimulationAgentSchema = z.object({
25
+ stopWhen: StopWhenSchema.optional(),
26
+ prompt: z.string(),
27
+ model: ModelSettingsSchema
28
+ }).openapi("SimulationAgent");
21
29
  const ModelSchema = z.object({
22
30
  base: ModelSettingsSchema.optional(),
23
31
  structuredOutput: ModelSettingsSchema.optional(),
@@ -136,10 +144,302 @@ const AgentUpdateSchema = AgentInsertSchema.partial();
136
144
  const AgentApiSelectSchema = createApiSchema(AgentSelectSchema).openapi("Agent");
137
145
  const AgentApiInsertSchema = createApiInsertSchema(AgentInsertSchema).extend({ id: resourceIdSchema }).openapi("AgentCreate");
138
146
  const AgentApiUpdateSchema = createApiUpdateSchema(AgentUpdateSchema).openapi("AgentUpdate");
147
+ const TriggerAuthHeaderInputSchema = z.object({
148
+ name: z.string().min(1).describe("Header name (e.g., X-API-Key, Authorization)"),
149
+ value: z.string().min(1).describe("Expected header value (plaintext)")
150
+ });
151
+ const TriggerAuthHeaderUpdateSchema = z.object({
152
+ name: z.string().min(1).describe("Header name (e.g., X-API-Key, Authorization)"),
153
+ value: z.string().optional().describe("New header value (plaintext). If omitted, existing value is kept."),
154
+ keepExisting: z.boolean().optional().describe("If true, keep the existing hashed value for this header")
155
+ });
156
+ const TriggerAuthenticationInputSchema = z.object({ headers: z.array(TriggerAuthHeaderInputSchema).optional().describe("Array of headers to validate on incoming requests") }).openapi("TriggerAuthenticationInput");
157
+ const TriggerAuthenticationUpdateSchema = z.object({ headers: z.array(TriggerAuthHeaderUpdateSchema).optional().describe("Array of headers. Use keepExisting:true to preserve existing hashed value.") }).openapi("TriggerAuthenticationUpdate");
158
+ const TriggerAuthHeaderStoredSchema = z.object({
159
+ name: z.string().describe("Header name"),
160
+ valueHash: z.string().describe("Hash of the expected header value"),
161
+ valuePrefix: z.string().describe("First 8 chars of value for display")
162
+ });
163
+ const TriggerAuthenticationStoredSchema = z.object({ headers: z.array(TriggerAuthHeaderStoredSchema).optional().describe("Array of headers with hashed values") }).openapi("TriggerAuthenticationStored");
164
+ const TriggerAuthenticationSchema = TriggerAuthenticationInputSchema;
165
+ const TriggerOutputTransformSchema = z.object({
166
+ jmespath: jmespathString().optional(),
167
+ objectTransformation: z.record(z.string(), z.string()).optional().describe("Object transformation mapping")
168
+ }).openapi("TriggerOutputTransform");
169
+ /**
170
+ * Configuration for extracting the webhook signature from an incoming request.
171
+ *
172
+ * The signature can be located in HTTP headers, query parameters, or the request body.
173
+ * Supports prefix stripping and regex extraction for complex signature formats.
174
+ *
175
+ * @example
176
+ * // GitHub: Extract from header with prefix
177
+ * { source: 'header', key: 'X-Hub-Signature-256', prefix: 'sha256=' }
178
+ *
179
+ * @example
180
+ * // Stripe: Extract from header using regex
181
+ * { source: 'header', key: 'Stripe-Signature', regex: 'v1=([a-f0-9]+)' }
182
+ *
183
+ * @example
184
+ * // Custom: Extract from body using JMESPath
185
+ * { source: 'body', key: 'metadata.signature' }
186
+ */
187
+ const SignatureSourceSchema = z.object({
188
+ source: z.enum([
189
+ "header",
190
+ "query",
191
+ "body"
192
+ ]).describe("Location of the signature in the incoming request"),
193
+ key: z.string().describe("Key name for the signature (header name, query param, or JMESPath)"),
194
+ prefix: z.string().optional().describe("Optional prefix to strip from signature value (e.g., \"sha256=\", \"v0=\")"),
195
+ regex: z.string().optional().describe("Optional regex pattern to extract signature from value (first capture group used)")
196
+ }).openapi("SignatureSource");
197
+ /**
198
+ * Configuration for a single component that is part of the signed data.
199
+ *
200
+ * Webhook providers often sign multiple pieces of data together (e.g., timestamp + body).
201
+ * Components are extracted from the request and joined in order before verification.
202
+ *
203
+ * @example
204
+ * // GitHub: Sign only the body
205
+ * { source: 'body', required: true }
206
+ *
207
+ * @example
208
+ * // Slack: Sign literal version + timestamp header + body
209
+ * { source: 'literal', value: 'v0', required: true }
210
+ * { source: 'header', key: 'X-Slack-Request-Timestamp', required: true }
211
+ * { source: 'body', required: true }
212
+ *
213
+ * @example
214
+ * // Stripe: Extract timestamp from header using regex
215
+ * { source: 'header', key: 'Stripe-Signature', regex: 't=([0-9]+)', required: true }
216
+ */
217
+ const SignedComponentSchema = z.object({
218
+ source: z.enum([
219
+ "header",
220
+ "body",
221
+ "literal"
222
+ ]).describe("Source of the component: header value, body via JMESPath, or literal string"),
223
+ key: z.string().optional().describe("Key for header name or JMESPath expression (required for header/body sources)"),
224
+ value: z.string().optional().describe("Literal string value (required for literal source)"),
225
+ regex: z.string().optional().describe("Optional regex pattern to extract from component value (first capture group)"),
226
+ required: z.boolean().default(true).describe("If false, missing component results in empty string instead of error")
227
+ }).openapi("SignedComponent");
228
+ /**
229
+ * Configuration for how to join multiple signed components into a single string.
230
+ *
231
+ * Different webhook providers use different separators between components.
232
+ *
233
+ * @example
234
+ * // GitHub/Zendesk: Direct concatenation (empty separator)
235
+ * { strategy: 'concatenate', separator: '' }
236
+ *
237
+ * @example
238
+ * // Slack: Colon separator
239
+ * { strategy: 'concatenate', separator: ':' }
240
+ *
241
+ * @example
242
+ * // Stripe: Dot separator
243
+ * { strategy: 'concatenate', separator: '.' }
244
+ */
245
+ const ComponentJoinSchema = z.object({
246
+ strategy: z.enum(["concatenate"]).describe("Strategy for joining components"),
247
+ separator: z.string().describe("String to insert between joined components")
248
+ }).openapi("ComponentJoin");
249
+ /**
250
+ * Advanced validation options for fine-grained control over signature verification.
251
+ *
252
+ * These options control edge case behavior and should generally use default values.
253
+ *
254
+ * @example
255
+ * // Strict validation for security-critical webhooks
256
+ * {
257
+ * headerCaseSensitive: true,
258
+ * allowEmptyBody: false,
259
+ * normalizeUnicode: true
260
+ * }
261
+ */
262
+ const SignatureValidationOptionsSchema = z.object({
263
+ headerCaseSensitive: z.boolean().default(false).describe("If true, header names are matched case-sensitively"),
264
+ allowEmptyBody: z.boolean().default(true).describe("If true, allow empty request body for verification"),
265
+ normalizeUnicode: z.boolean().default(false).describe("If true, normalize Unicode strings to NFC form before signing")
266
+ }).openapi("SignatureValidationOptions");
267
+ /**
268
+ * Complete configuration for webhook HMAC signature verification.
269
+ *
270
+ * Supports flexible, provider-agnostic signature verification for webhooks from
271
+ * GitHub, Slack, Stripe, Zendesk, and other providers.
272
+ *
273
+ * SECURITY: Always use credential references to store signing secrets. Never hardcode
274
+ * secrets in your configuration. Prefer sha256 or stronger algorithms.
275
+ *
276
+ * @example
277
+ * // GitHub webhook verification
278
+ * {
279
+ * algorithm: 'sha256',
280
+ * encoding: 'hex',
281
+ * signature: { source: 'header', key: 'X-Hub-Signature-256', prefix: 'sha256=' },
282
+ * signedComponents: [{ source: 'body', required: true }],
283
+ * componentJoin: { strategy: 'concatenate', separator: '' }
284
+ * }
285
+ *
286
+ * @example
287
+ * // Slack webhook verification with multi-component signing
288
+ * {
289
+ * algorithm: 'sha256',
290
+ * encoding: 'hex',
291
+ * signature: { source: 'header', key: 'X-Slack-Signature', prefix: 'v0=' },
292
+ * signedComponents: [
293
+ * { source: 'literal', value: 'v0', required: true },
294
+ * { source: 'header', key: 'X-Slack-Request-Timestamp', required: true },
295
+ * { source: 'body', required: true }
296
+ * ],
297
+ * componentJoin: { strategy: 'concatenate', separator: ':' }
298
+ * }
299
+ *
300
+ * @example
301
+ * // Stripe webhook verification with regex extraction
302
+ * {
303
+ * algorithm: 'sha256',
304
+ * encoding: 'hex',
305
+ * signature: { source: 'header', key: 'Stripe-Signature', regex: 'v1=([a-f0-9]+)' },
306
+ * signedComponents: [
307
+ * { source: 'header', key: 'Stripe-Signature', regex: 't=([0-9]+)', required: true },
308
+ * { source: 'body', required: true }
309
+ * ],
310
+ * componentJoin: { strategy: 'concatenate', separator: '.' }
311
+ * }
312
+ */
313
+ const SignatureVerificationConfigSchema = z.object({
314
+ algorithm: z.enum([
315
+ "sha256",
316
+ "sha512",
317
+ "sha384",
318
+ "sha1",
319
+ "md5"
320
+ ]).describe("HMAC algorithm to use for signature verification"),
321
+ encoding: z.enum(["hex", "base64"]).describe("Encoding format of the signature (hex or base64)"),
322
+ signature: SignatureSourceSchema.describe("Configuration for extracting the signature"),
323
+ signedComponents: z.array(SignedComponentSchema).min(1).describe("Array of components that are signed (order matters)"),
324
+ componentJoin: ComponentJoinSchema.describe("How to join signed components"),
325
+ validation: SignatureValidationOptionsSchema.optional().describe("Advanced validation options")
326
+ }).openapi("SignatureVerificationConfig");
327
+ const TriggerInvocationStatusEnum = z.enum([
328
+ "pending",
329
+ "success",
330
+ "failed"
331
+ ]);
332
+ const TriggerSelectSchema = registerFieldSchemas(createSelectSchema(triggers).extend({
333
+ signingSecretCredentialReferenceId: z.string().nullable().optional(),
334
+ signatureVerification: SignatureVerificationConfigSchema.nullable().optional()
335
+ }));
336
+ const TriggerInsertSchemaBase = createInsertSchema(triggers, {
337
+ id: () => resourceIdSchema,
338
+ name: () => z.string().trim().nonempty().describe("Trigger name"),
339
+ description: () => z.string().optional().describe("Trigger description"),
340
+ enabled: () => z.boolean().default(true).describe("Whether the trigger is enabled"),
341
+ inputSchema: () => z.record(z.string(), z.unknown()).optional().describe("JSON Schema for input validation"),
342
+ outputTransform: () => TriggerOutputTransformSchema.optional(),
343
+ messageTemplate: () => z.string().trim().nonempty().describe("Message template with {{placeholder}} syntax").optional(),
344
+ authentication: () => TriggerAuthenticationInputSchema.optional(),
345
+ signingSecretCredentialReferenceId: () => z.string().optional().describe("Reference to credential containing signing secret"),
346
+ signatureVerification: () => SignatureVerificationConfigSchema.nullable().optional().describe("Configuration for webhook signature verification")
347
+ });
348
+ const TriggerInsertSchema = TriggerInsertSchemaBase.superRefine((data, ctx) => {
349
+ const config = data.signatureVerification;
350
+ if (!config) return;
351
+ if (config.signature.regex) {
352
+ const regexResult = validateRegex(config.signature.regex);
353
+ if (!regexResult.valid) ctx.addIssue({
354
+ code: z.ZodIssueCode.custom,
355
+ message: `Invalid regex pattern in signature.regex: ${regexResult.error}`,
356
+ path: [
357
+ "signatureVerification",
358
+ "signature",
359
+ "regex"
360
+ ]
361
+ });
362
+ }
363
+ if (config.signature.source === "body" && config.signature.key) {
364
+ const jmespathResult = validateJMESPathSecure(config.signature.key);
365
+ if (!jmespathResult.valid) ctx.addIssue({
366
+ code: z.ZodIssueCode.custom,
367
+ message: `Invalid JMESPath expression in signature.key: ${jmespathResult.error}`,
368
+ path: [
369
+ "signatureVerification",
370
+ "signature",
371
+ "key"
372
+ ]
373
+ });
374
+ }
375
+ config.signedComponents.forEach((component, index) => {
376
+ if (component.regex) {
377
+ const regexResult = validateRegex(component.regex);
378
+ if (!regexResult.valid) ctx.addIssue({
379
+ code: z.ZodIssueCode.custom,
380
+ message: `Invalid regex pattern in signedComponents[${index}].regex: ${regexResult.error}`,
381
+ path: [
382
+ "signatureVerification",
383
+ "signedComponents",
384
+ index,
385
+ "regex"
386
+ ]
387
+ });
388
+ }
389
+ if (component.source === "body" && component.key) {
390
+ const jmespathResult = validateJMESPathSecure(component.key);
391
+ if (!jmespathResult.valid) ctx.addIssue({
392
+ code: z.ZodIssueCode.custom,
393
+ message: `Invalid JMESPath expression in signedComponents[${index}].key: ${jmespathResult.error}`,
394
+ path: [
395
+ "signatureVerification",
396
+ "signedComponents",
397
+ index,
398
+ "key"
399
+ ]
400
+ });
401
+ }
402
+ if (component.value && component.source !== "literal") {
403
+ if (component.value.includes(".") || component.value.includes("[")) {
404
+ const jmespathResult = validateJMESPathSecure(component.value);
405
+ if (!jmespathResult.valid) ctx.addIssue({
406
+ code: z.ZodIssueCode.custom,
407
+ message: `Invalid JMESPath expression in signedComponents[${index}].value: ${jmespathResult.error}`,
408
+ path: [
409
+ "signatureVerification",
410
+ "signedComponents",
411
+ index,
412
+ "value"
413
+ ]
414
+ });
415
+ }
416
+ }
417
+ });
418
+ });
419
+ const TriggerUpdateSchema = TriggerInsertSchemaBase.extend({ enabled: z.boolean().optional().describe("Whether the trigger is enabled") }).partial();
420
+ const TriggerApiSelectSchema = createAgentScopedApiSchema(TriggerSelectSchema).openapi("Trigger");
421
+ const TriggerApiInsertSchema = createAgentScopedApiInsertSchema(TriggerInsertSchema).extend({ id: resourceIdSchema.optional() }).openapi("TriggerCreate");
422
+ const TriggerApiUpdateSchema = TriggerUpdateSchema.openapi("TriggerUpdate");
423
+ const TriggerWithWebhookUrlSchema = TriggerApiSelectSchema.extend({ webhookUrl: z.string().describe("Fully qualified webhook URL for this trigger") }).openapi("TriggerWithWebhookUrl");
424
+ const TriggerInvocationSelectSchema = createSelectSchema(triggerInvocations);
425
+ const TriggerInvocationInsertSchema = createInsertSchema(triggerInvocations, {
426
+ id: () => resourceIdSchema,
427
+ triggerId: () => resourceIdSchema,
428
+ conversationId: () => resourceIdSchema.optional(),
429
+ status: () => TriggerInvocationStatusEnum.default("pending"),
430
+ requestPayload: () => z.record(z.string(), z.unknown()).describe("Original webhook payload"),
431
+ transformedPayload: () => z.record(z.string(), z.unknown()).optional().describe("Transformed payload"),
432
+ errorMessage: () => z.string().optional().describe("Error message if status is failed")
433
+ });
434
+ const TriggerInvocationUpdateSchema = TriggerInvocationInsertSchema.partial();
435
+ const TriggerInvocationApiSelectSchema = createAgentScopedApiSchema(TriggerInvocationSelectSchema).openapi("TriggerInvocation");
436
+ const TriggerInvocationApiInsertSchema = createAgentScopedApiInsertSchema(TriggerInvocationInsertSchema).extend({ id: resourceIdSchema }).openapi("TriggerInvocationCreate");
437
+ const TriggerInvocationApiUpdateSchema = createAgentScopedApiUpdateSchema(TriggerInvocationUpdateSchema).openapi("TriggerInvocationUpdate");
139
438
  const TaskSelectSchema = createSelectSchema(tasks);
140
439
  const TaskInsertSchema = createInsertSchema(tasks).extend({
141
440
  id: resourceIdSchema,
142
- conversationId: resourceIdSchema.optional()
441
+ conversationId: resourceIdSchema.optional(),
442
+ ref: ResolvedRefSchema
143
443
  });
144
444
  const TaskUpdateSchema = TaskInsertSchema.partial();
145
445
  const TaskApiSelectSchema = createApiSchema(TaskSelectSchema);
@@ -203,14 +503,22 @@ const ToolInsertSchema = createInsertSchema(tools).extend({
203
503
  }),
204
504
  sessionId: z.string().optional()
205
505
  }).optional(),
206
- activeTools: z.array(z.string()).optional()
506
+ activeTools: z.array(z.string()).optional(),
507
+ toolOverrides: z.record(z.string(), z.object({
508
+ displayName: z.string().optional(),
509
+ description: z.string().optional(),
510
+ schema: z.any().optional(),
511
+ transformation: z.union([z.string(), z.record(z.string(), z.string())]).optional()
512
+ })).optional(),
513
+ prompt: z.string().optional()
207
514
  })
208
515
  })
209
516
  });
210
517
  const ConversationSelectSchema = createSelectSchema(conversations);
211
518
  const ConversationInsertSchema = createInsertSchema(conversations).extend({
212
519
  id: resourceIdSchema,
213
- contextConfigId: resourceIdSchema.optional()
520
+ contextConfigId: resourceIdSchema.optional(),
521
+ ref: ResolvedRefSchema
214
522
  });
215
523
  const ConversationUpdateSchema = ConversationInsertSchema.partial();
216
524
  const ConversationApiSelectSchema = createApiSchema(ConversationSelectSchema).openapi("Conversation");
@@ -227,11 +535,139 @@ const MessageApiSelectSchema = createApiSchema(MessageSelectSchema).openapi("Mes
227
535
  const MessageApiInsertSchema = createApiInsertSchema(MessageInsertSchema).openapi("MessageCreate");
228
536
  const MessageApiUpdateSchema = createApiUpdateSchema(MessageUpdateSchema).openapi("MessageUpdate");
229
537
  const ContextCacheSelectSchema = createSelectSchema(contextCache);
230
- const ContextCacheInsertSchema = createInsertSchema(contextCache);
538
+ const ContextCacheInsertSchema = createInsertSchema(contextCache).extend({ ref: ResolvedRefSchema });
231
539
  const ContextCacheUpdateSchema = ContextCacheInsertSchema.partial();
232
540
  const ContextCacheApiSelectSchema = createApiSchema(ContextCacheSelectSchema);
233
541
  const ContextCacheApiInsertSchema = createApiInsertSchema(ContextCacheInsertSchema);
234
542
  const ContextCacheApiUpdateSchema = createApiUpdateSchema(ContextCacheUpdateSchema);
543
+ const DatasetRunSelectSchema = createSelectSchema(datasetRun);
544
+ const DatasetRunInsertSchema = createInsertSchema(datasetRun).extend({ id: resourceIdSchema });
545
+ const DatasetRunUpdateSchema = DatasetRunInsertSchema.partial();
546
+ const DatasetRunApiSelectSchema = createApiSchema(DatasetRunSelectSchema).openapi("DatasetRun");
547
+ const DatasetRunApiInsertSchema = createApiInsertSchema(DatasetRunInsertSchema).omit({ id: true }).openapi("DatasetRunCreate");
548
+ const DatasetRunApiUpdateSchema = createApiUpdateSchema(DatasetRunUpdateSchema).omit({ id: true }).openapi("DatasetRunUpdate");
549
+ const DatasetRunConversationRelationSelectSchema = createSelectSchema(datasetRunConversationRelations);
550
+ const DatasetRunConversationRelationInsertSchema = createInsertSchema(datasetRunConversationRelations).extend({ id: resourceIdSchema });
551
+ const DatasetRunConversationRelationUpdateSchema = DatasetRunConversationRelationInsertSchema.partial();
552
+ const DatasetRunConversationRelationApiSelectSchema = createApiSchema(DatasetRunConversationRelationSelectSchema).openapi("DatasetRunConversationRelation");
553
+ const DatasetRunConversationRelationApiInsertSchema = createApiInsertSchema(DatasetRunConversationRelationInsertSchema).omit({ id: true }).openapi("DatasetRunConversationRelationCreate");
554
+ const DatasetRunConversationRelationApiUpdateSchema = createApiUpdateSchema(DatasetRunConversationRelationUpdateSchema).omit({ id: true }).openapi("DatasetRunConversationRelationUpdate");
555
+ const EvaluationResultSelectSchema = createSelectSchema(evaluationResult);
556
+ const EvaluationResultInsertSchema = createInsertSchema(evaluationResult).extend({ id: resourceIdSchema });
557
+ const EvaluationResultUpdateSchema = EvaluationResultInsertSchema.partial();
558
+ const EvaluationResultApiSelectSchema = createApiSchema(EvaluationResultSelectSchema).openapi("EvaluationResult");
559
+ const EvaluationResultApiInsertSchema = createApiInsertSchema(EvaluationResultInsertSchema).omit({ id: true }).openapi("EvaluationResultCreate");
560
+ const EvaluationResultApiUpdateSchema = createApiUpdateSchema(EvaluationResultUpdateSchema).omit({ id: true }).openapi("EvaluationResultUpdate");
561
+ const EvaluationRunSelectSchema = createSelectSchema(evaluationRun);
562
+ const EvaluationRunInsertSchema = createInsertSchema(evaluationRun).extend({ id: resourceIdSchema });
563
+ const EvaluationRunUpdateSchema = EvaluationRunInsertSchema.partial();
564
+ const EvaluationRunApiSelectSchema = createApiSchema(EvaluationRunSelectSchema).openapi("EvaluationRun");
565
+ const EvaluationRunApiInsertSchema = createApiInsertSchema(EvaluationRunInsertSchema).omit({ id: true }).openapi("EvaluationRunCreate");
566
+ const EvaluationRunApiUpdateSchema = createApiUpdateSchema(EvaluationRunUpdateSchema).omit({ id: true }).openapi("EvaluationRunUpdate");
567
+ const EvaluationRunConfigSelectSchema = createSelectSchema(evaluationRunConfig);
568
+ const EvaluationRunConfigInsertSchema = createInsertSchema(evaluationRunConfig).extend({ id: resourceIdSchema });
569
+ const EvaluationRunConfigUpdateSchema = EvaluationRunConfigInsertSchema.partial();
570
+ const EvaluationRunConfigApiSelectSchema = createApiSchema(EvaluationRunConfigSelectSchema).openapi("EvaluationRunConfig");
571
+ const EvaluationRunConfigApiInsertSchema = createApiInsertSchema(EvaluationRunConfigInsertSchema).omit({ id: true }).extend({ suiteConfigIds: z.array(z.string()).min(1, "At least one suite config is required") }).openapi("EvaluationRunConfigCreate");
572
+ const EvaluationRunConfigApiUpdateSchema = createApiUpdateSchema(EvaluationRunConfigUpdateSchema).omit({ id: true }).extend({ suiteConfigIds: z.array(z.string()).optional() }).openapi("EvaluationRunConfigUpdate");
573
+ const EvaluationRunConfigWithSuiteConfigsApiSelectSchema = EvaluationRunConfigApiSelectSchema.extend({ suiteConfigIds: z.array(z.string()) }).openapi("EvaluationRunConfigWithSuiteConfigs");
574
+ const EvaluationJobConfigSelectSchema = createSelectSchema(evaluationJobConfig);
575
+ const EvaluationJobConfigInsertSchema = createInsertSchema(evaluationJobConfig).extend({ id: resourceIdSchema });
576
+ const EvaluationJobConfigUpdateSchema = EvaluationJobConfigInsertSchema.partial();
577
+ const EvaluationJobConfigApiSelectSchema = createApiSchema(EvaluationJobConfigSelectSchema).openapi("EvaluationJobConfig");
578
+ const EvaluationJobConfigApiInsertSchema = createApiInsertSchema(EvaluationJobConfigInsertSchema).omit({ id: true }).extend({ evaluatorIds: z.array(z.string()).min(1, "At least one evaluator is required") }).openapi("EvaluationJobConfigCreate");
579
+ const EvaluationJobConfigApiUpdateSchema = createApiUpdateSchema(EvaluationJobConfigUpdateSchema).omit({ id: true }).openapi("EvaluationJobConfigUpdate");
580
+ const EvaluationSuiteConfigSelectSchema = createSelectSchema(evaluationSuiteConfig);
581
+ const EvaluationSuiteConfigInsertSchema = createInsertSchema(evaluationSuiteConfig).extend({ id: resourceIdSchema });
582
+ const EvaluationSuiteConfigUpdateSchema = EvaluationSuiteConfigInsertSchema.partial();
583
+ const EvaluationSuiteConfigApiSelectSchema = createApiSchema(EvaluationSuiteConfigSelectSchema).openapi("EvaluationSuiteConfig");
584
+ const EvaluationSuiteConfigApiInsertSchema = createApiInsertSchema(EvaluationSuiteConfigInsertSchema).omit({ id: true }).extend({ evaluatorIds: z.array(z.string()).min(1, "At least one evaluator is required") }).openapi("EvaluationSuiteConfigCreate");
585
+ const EvaluationSuiteConfigApiUpdateSchema = createApiUpdateSchema(EvaluationSuiteConfigUpdateSchema).omit({ id: true }).extend({ evaluatorIds: z.array(z.string()).optional() }).openapi("EvaluationSuiteConfigUpdate");
586
+ const EvaluationRunConfigEvaluationSuiteConfigRelationSelectSchema = createSelectSchema(evaluationRunConfigEvaluationSuiteConfigRelations);
587
+ const EvaluationRunConfigEvaluationSuiteConfigRelationInsertSchema = createInsertSchema(evaluationRunConfigEvaluationSuiteConfigRelations).extend({ id: resourceIdSchema });
588
+ const EvaluationRunConfigEvaluationSuiteConfigRelationUpdateSchema = EvaluationRunConfigEvaluationSuiteConfigRelationInsertSchema.partial();
589
+ const EvaluationRunConfigEvaluationSuiteConfigRelationApiSelectSchema = createApiSchema(EvaluationRunConfigEvaluationSuiteConfigRelationSelectSchema).openapi("EvaluationRunConfigEvaluationSuiteConfigRelation");
590
+ const EvaluationRunConfigEvaluationSuiteConfigRelationApiInsertSchema = createApiInsertSchema(EvaluationRunConfigEvaluationSuiteConfigRelationInsertSchema).omit({ id: true }).openapi("EvaluationRunConfigEvaluationSuiteConfigRelationCreate");
591
+ const EvaluationRunConfigEvaluationSuiteConfigRelationApiUpdateSchema = createApiUpdateSchema(EvaluationRunConfigEvaluationSuiteConfigRelationUpdateSchema).omit({ id: true }).openapi("EvaluationRunConfigEvaluationSuiteConfigRelationUpdate");
592
+ const EvaluationJobConfigEvaluatorRelationSelectSchema = createSelectSchema(evaluationJobConfigEvaluatorRelations);
593
+ const EvaluationJobConfigEvaluatorRelationInsertSchema = createInsertSchema(evaluationJobConfigEvaluatorRelations).extend({ id: resourceIdSchema });
594
+ const EvaluationJobConfigEvaluatorRelationUpdateSchema = EvaluationJobConfigEvaluatorRelationInsertSchema.partial();
595
+ const EvaluationJobConfigEvaluatorRelationApiSelectSchema = createApiSchema(EvaluationJobConfigEvaluatorRelationSelectSchema).openapi("EvaluationJobConfigEvaluatorRelation");
596
+ const EvaluationJobConfigEvaluatorRelationApiInsertSchema = createApiInsertSchema(EvaluationJobConfigEvaluatorRelationInsertSchema).omit({ id: true }).openapi("EvaluationJobConfigEvaluatorRelationCreate");
597
+ const EvaluationJobConfigEvaluatorRelationApiUpdateSchema = createApiUpdateSchema(EvaluationJobConfigEvaluatorRelationUpdateSchema).omit({ id: true }).openapi("EvaluationJobConfigEvaluatorRelationUpdate");
598
+ const EvaluationSuiteConfigEvaluatorRelationSelectSchema = createSelectSchema(evaluationSuiteConfigEvaluatorRelations);
599
+ const EvaluationSuiteConfigEvaluatorRelationInsertSchema = createInsertSchema(evaluationSuiteConfigEvaluatorRelations).extend({ id: resourceIdSchema });
600
+ const EvaluationSuiteConfigEvaluatorRelationUpdateSchema = EvaluationSuiteConfigEvaluatorRelationInsertSchema.partial();
601
+ const EvaluationSuiteConfigEvaluatorRelationApiSelectSchema = createApiSchema(EvaluationSuiteConfigEvaluatorRelationSelectSchema).openapi("EvaluationSuiteConfigEvaluatorRelation");
602
+ const EvaluationSuiteConfigEvaluatorRelationApiInsertSchema = createApiInsertSchema(EvaluationSuiteConfigEvaluatorRelationInsertSchema).omit({ id: true }).openapi("EvaluationSuiteConfigEvaluatorRelationCreate");
603
+ const EvaluationSuiteConfigEvaluatorRelationApiUpdateSchema = createApiUpdateSchema(EvaluationSuiteConfigEvaluatorRelationUpdateSchema).omit({ id: true }).openapi("EvaluationSuiteConfigEvaluatorRelationUpdate");
604
+ const EvaluatorSelectSchema = createSelectSchema(evaluator);
605
+ const EvaluatorInsertSchema = createInsertSchema(evaluator).extend({ id: resourceIdSchema });
606
+ const EvaluatorUpdateSchema = EvaluatorInsertSchema.partial();
607
+ const EvaluatorApiSelectSchema = createApiSchema(EvaluatorSelectSchema).openapi("Evaluator");
608
+ const EvaluatorApiInsertSchema = createApiInsertSchema(EvaluatorInsertSchema).omit({ id: true }).openapi("EvaluatorCreate");
609
+ const EvaluatorApiUpdateSchema = createApiUpdateSchema(EvaluatorUpdateSchema).omit({ id: true }).openapi("EvaluatorUpdate");
610
+ const DatasetSelectSchema = createSelectSchema(dataset);
611
+ const DatasetInsertSchema = createInsertSchema(dataset).extend({ id: resourceIdSchema });
612
+ const DatasetUpdateSchema = DatasetInsertSchema.partial();
613
+ const DatasetApiSelectSchema = createApiSchema(DatasetSelectSchema).openapi("Dataset");
614
+ const DatasetApiInsertSchema = createApiInsertSchema(DatasetInsertSchema).omit({ id: true }).openapi("DatasetCreate");
615
+ const DatasetApiUpdateSchema = createApiUpdateSchema(DatasetUpdateSchema).omit({ id: true }).openapi("DatasetUpdate");
616
+ const DatasetItemSelectSchema = createSelectSchema(datasetItem);
617
+ const DatasetItemInsertSchema = createInsertSchema(datasetItem).extend({ id: resourceIdSchema });
618
+ const DatasetItemUpdateSchema = DatasetItemInsertSchema.partial();
619
+ const DatasetItemApiSelectSchema = createApiSchema(DatasetItemSelectSchema).openapi("DatasetItem");
620
+ const DatasetItemApiInsertSchema = createApiInsertSchema(DatasetItemInsertSchema).omit({
621
+ id: true,
622
+ datasetId: true
623
+ }).openapi("DatasetItemCreate");
624
+ const DatasetItemApiUpdateSchema = createApiUpdateSchema(DatasetItemUpdateSchema).omit({
625
+ id: true,
626
+ datasetId: true
627
+ }).openapi("DatasetItemUpdate");
628
+ const DatasetRunItemSchema = DatasetItemApiSelectSchema.pick({
629
+ id: true,
630
+ input: true,
631
+ expectedOutput: true,
632
+ simulationAgent: true
633
+ }).partial().extend({ agentId: z.string() }).openapi("DatasetRunItem");
634
+ const TriggerDatasetRunSchema = z.object({
635
+ datasetRunId: z.string(),
636
+ items: z.array(DatasetRunItemSchema),
637
+ evaluatorIds: z.array(z.string()).optional(),
638
+ evaluationRunId: z.string().optional()
639
+ }).openapi("TriggerDatasetRun");
640
+ const TriggerConversationEvaluationSchema = z.object({ conversationId: z.string() }).openapi("TriggerConversationEvaluation");
641
+ const TriggerBatchConversationEvaluationSchema = z.object({ conversations: z.array(z.object({
642
+ conversationId: z.string(),
643
+ evaluatorIds: z.array(z.string()),
644
+ evaluationRunId: z.string()
645
+ })) }).openapi("TriggerBatchConversationEvaluation");
646
+ const EvaluationJobFilterCriteriaSchema = z.object({
647
+ datasetRunIds: z.array(z.string()).optional(),
648
+ conversationIds: z.array(z.string()).optional(),
649
+ dateRange: z.object({
650
+ startDate: z.string(),
651
+ endDate: z.string()
652
+ }).optional()
653
+ }).openapi("EvaluationJobFilterCriteria");
654
+ const TriggerEvaluationJobSchema = z.object({
655
+ evaluationJobConfigId: z.string(),
656
+ evaluatorIds: z.array(z.string()),
657
+ jobFilters: EvaluationJobFilterCriteriaSchema.nullable().optional()
658
+ }).openapi("TriggerEvaluationJob");
659
+ const DatasetRunConfigSelectSchema = createSelectSchema(datasetRunConfig);
660
+ const DatasetRunConfigInsertSchema = createInsertSchema(datasetRunConfig).extend({ id: resourceIdSchema });
661
+ const DatasetRunConfigUpdateSchema = DatasetRunConfigInsertSchema.partial();
662
+ const DatasetRunConfigApiSelectSchema = createApiSchema(DatasetRunConfigSelectSchema).openapi("DatasetRunConfig");
663
+ const DatasetRunConfigApiInsertSchema = createApiInsertSchema(DatasetRunConfigInsertSchema).omit({ id: true }).openapi("DatasetRunConfigCreate");
664
+ const DatasetRunConfigApiUpdateSchema = createApiUpdateSchema(DatasetRunConfigUpdateSchema).omit({ id: true }).openapi("DatasetRunConfigUpdate");
665
+ const DatasetRunConfigAgentRelationSelectSchema = createSelectSchema(datasetRunConfigAgentRelations);
666
+ const DatasetRunConfigAgentRelationInsertSchema = createInsertSchema(datasetRunConfigAgentRelations).extend({ id: resourceIdSchema });
667
+ const DatasetRunConfigAgentRelationUpdateSchema = DatasetRunConfigAgentRelationInsertSchema.partial();
668
+ const DatasetRunConfigAgentRelationApiSelectSchema = createApiSchema(DatasetRunConfigAgentRelationSelectSchema).openapi("DatasetRunConfigAgentRelation");
669
+ const DatasetRunConfigAgentRelationApiInsertSchema = createApiInsertSchema(DatasetRunConfigAgentRelationInsertSchema).omit({ id: true }).openapi("DatasetRunConfigAgentRelationCreate");
670
+ const DatasetRunConfigAgentRelationApiUpdateSchema = createApiUpdateSchema(DatasetRunConfigAgentRelationUpdateSchema).omit({ id: true }).openapi("DatasetRunConfigAgentRelationUpdate");
235
671
  const DataComponentSelectSchema = createSelectSchema(dataComponents);
236
672
  const DataComponentInsertSchema = createInsertSchema(dataComponents).extend({ id: resourceIdSchema });
237
673
  const DataComponentBaseSchema = DataComponentInsertSchema.omit({
@@ -397,7 +833,14 @@ const MCPToolConfigSchema = McpToolSchema.omit({
397
833
  activeTools: z.array(z.string()).optional(),
398
834
  mcpType: z.enum(MCPServerType).optional(),
399
835
  transport: McpTransportConfigSchema.optional(),
400
- credential: CredentialReferenceApiInsertSchema.optional()
836
+ credential: CredentialReferenceApiInsertSchema.optional(),
837
+ toolOverrides: z.record(z.string(), z.object({
838
+ displayName: z.string().optional(),
839
+ description: z.string().optional(),
840
+ schema: z.any().optional(),
841
+ transformation: z.union([z.string(), z.record(z.string(), z.string())]).optional()
842
+ })).optional(),
843
+ prompt: z.string().optional()
401
844
  });
402
845
  const ToolUpdateSchema = ToolInsertSchema.partial();
403
846
  const ToolApiSelectSchema = createApiSchema(ToolSelectSchema).openapi("Tool");
@@ -406,9 +849,24 @@ const ToolApiUpdateSchema = createApiUpdateSchema(ToolUpdateSchema).openapi("Too
406
849
  const FunctionToolSelectSchema = createSelectSchema(functionTools);
407
850
  const FunctionToolInsertSchema = createInsertSchema(functionTools).extend({ id: resourceIdSchema });
408
851
  const FunctionToolUpdateSchema = FunctionToolInsertSchema.partial();
409
- const FunctionToolApiSelectSchema = createApiSchema(FunctionToolSelectSchema).openapi("FunctionTool");
852
+ const FunctionToolApiSelectSchema = createApiSchema(FunctionToolSelectSchema).extend({ relationshipId: z.string().optional() }).openapi("FunctionTool");
410
853
  const FunctionToolApiInsertSchema = createAgentScopedApiInsertSchema(FunctionToolInsertSchema).openapi("FunctionToolCreate");
411
854
  const FunctionToolApiUpdateSchema = createApiUpdateSchema(FunctionToolUpdateSchema).openapi("FunctionToolUpdate");
855
+ const SubAgentFunctionToolRelationSelectSchema = createSelectSchema(subAgentFunctionToolRelations);
856
+ const SubAgentFunctionToolRelationInsertSchema = createInsertSchema(subAgentFunctionToolRelations).extend({
857
+ id: resourceIdSchema,
858
+ subAgentId: resourceIdSchema,
859
+ functionToolId: resourceIdSchema
860
+ });
861
+ const SubAgentFunctionToolRelationApiSelectSchema = createAgentScopedApiSchema(SubAgentFunctionToolRelationSelectSchema).openapi("SubAgentFunctionToolRelation");
862
+ const SubAgentFunctionToolRelationApiInsertSchema = SubAgentFunctionToolRelationInsertSchema.omit({
863
+ tenantId: true,
864
+ projectId: true,
865
+ agentId: true,
866
+ id: true,
867
+ createdAt: true,
868
+ updatedAt: true
869
+ }).openapi("SubAgentFunctionToolRelationCreate");
412
870
  const FunctionSelectSchema = createSelectSchema(functions);
413
871
  const FunctionInsertSchema = createInsertSchema(functions).extend({ id: resourceIdSchema });
414
872
  const FunctionUpdateSchema = FunctionInsertSchema.partial();
@@ -531,14 +989,28 @@ const CanUseItemSchema = z.object({
531
989
  headers: z.record(z.string(), z.string()).nullish(),
532
990
  toolPolicies: z.record(z.string(), z.object({ needsApproval: z.boolean().optional() })).nullish()
533
991
  }).openapi("CanUseItem");
534
- const canDelegateToExternalAgentSchema = z.object({
992
+ const canRelateToInternalSubAgentSchema = z.object({
993
+ subAgentId: z.string(),
994
+ subAgentSubAgentRelationId: z.string()
995
+ }).openapi("CanRelateToInternalSubAgent");
996
+ const canDelegateToExternalAgentInsertSchema = z.object({
535
997
  externalAgentId: z.string(),
536
998
  subAgentExternalAgentRelationId: z.string().optional(),
537
999
  headers: z.record(z.string(), z.string()).nullish()
1000
+ }).openapi("CanDelegateToExternalAgentInsert");
1001
+ const canDelegateToTeamAgentInsertSchema = z.object({
1002
+ agentId: z.string(),
1003
+ subAgentTeamAgentRelationId: z.string().optional(),
1004
+ headers: z.record(z.string(), z.string()).nullish()
1005
+ }).openapi("CanDelegateToTeamAgentInsert");
1006
+ const canDelegateToExternalAgentSchema = z.object({
1007
+ externalAgentId: z.string(),
1008
+ subAgentExternalAgentRelationId: z.string(),
1009
+ headers: z.record(z.string(), z.string()).nullish()
538
1010
  }).openapi("CanDelegateToExternalAgent");
539
1011
  const canDelegateToTeamAgentSchema = z.object({
540
1012
  agentId: z.string(),
541
- subAgentTeamAgentRelationId: z.string().optional(),
1013
+ subAgentTeamAgentRelationId: z.string(),
542
1014
  headers: z.record(z.string(), z.string()).nullish()
543
1015
  }).openapi("CanDelegateToTeamAgent");
544
1016
  const TeamAgentSchema = z.object({
@@ -555,8 +1027,8 @@ const FullAgentAgentInsertSchema = SubAgentApiInsertSchema.extend({
555
1027
  prompt: z.string().trim().optional(),
556
1028
  canDelegateTo: z.array(z.union([
557
1029
  z.string(),
558
- canDelegateToExternalAgentSchema,
559
- canDelegateToTeamAgentSchema
1030
+ canDelegateToExternalAgentInsertSchema,
1031
+ canDelegateToTeamAgentInsertSchema
560
1032
  ])).optional()
561
1033
  }).openapi("FullAgentAgentInsert");
562
1034
  const AgentWithinContextOfProjectSchema = AgentApiInsertSchema.extend({
@@ -566,6 +1038,7 @@ const AgentWithinContextOfProjectSchema = AgentApiInsertSchema.extend({
566
1038
  teamAgents: z.record(z.string(), TeamAgentSchema).optional(),
567
1039
  functionTools: z.record(z.string(), FunctionToolApiInsertSchema).optional(),
568
1040
  functions: z.record(z.string(), FunctionApiInsertSchema).optional(),
1041
+ triggers: z.record(z.string(), TriggerApiInsertSchema).optional(),
569
1042
  contextConfig: z.optional(ContextConfigApiInsertSchema),
570
1043
  statusUpdates: z.optional(StatusUpdateSchema),
571
1044
  models: ModelSchema.optional(),
@@ -624,6 +1097,53 @@ const FullProjectDefinitionSchema = ProjectApiInsertSchema.extend({
624
1097
  createdAt: z.string().optional(),
625
1098
  updatedAt: z.string().optional()
626
1099
  }).openapi("FullProjectDefinition");
1100
+ const FullAgentSubAgentSelectSchema = SubAgentApiSelectSchema.extend({
1101
+ type: z.literal("internal"),
1102
+ canUse: z.array(CanUseItemSchema),
1103
+ dataComponents: z.array(z.string()).nullable(),
1104
+ artifactComponents: z.array(z.string()).nullable(),
1105
+ canTransferTo: z.array(z.string()).nullable(),
1106
+ prompt: z.string().nullable(),
1107
+ canDelegateTo: z.array(z.union([
1108
+ z.string(),
1109
+ canDelegateToExternalAgentSchema,
1110
+ canDelegateToTeamAgentSchema
1111
+ ])).nullable()
1112
+ }).openapi("FullAgentSubAgentSelect");
1113
+ const FullAgentSubAgentSelectSchemaWithRelationIds = FullAgentSubAgentSelectSchema.extend({
1114
+ canTransferTo: z.array(canRelateToInternalSubAgentSchema).nullable(),
1115
+ canDelegateTo: z.array(z.union([
1116
+ canRelateToInternalSubAgentSchema,
1117
+ canDelegateToExternalAgentSchema,
1118
+ canDelegateToTeamAgentSchema
1119
+ ])).nullable()
1120
+ }).openapi("FullAgentSubAgentSelectWithRelationIds");
1121
+ const AgentWithinContextOfProjectSelectSchema = AgentApiSelectSchema.extend({
1122
+ subAgents: z.record(z.string(), FullAgentSubAgentSelectSchema),
1123
+ tools: z.record(z.string(), ToolApiSelectSchema).nullable(),
1124
+ externalAgents: z.record(z.string(), ExternalAgentApiSelectSchema).nullable(),
1125
+ teamAgents: z.record(z.string(), TeamAgentSchema).nullable(),
1126
+ functionTools: z.record(z.string(), FunctionToolApiSelectSchema).nullable(),
1127
+ functions: z.record(z.string(), FunctionApiSelectSchema).nullable(),
1128
+ contextConfig: ContextConfigApiSelectSchema.nullable(),
1129
+ statusUpdates: StatusUpdateSchema.nullable(),
1130
+ models: ModelSchema.nullable(),
1131
+ stopWhen: AgentStopWhenSchema.nullable(),
1132
+ prompt: z.string().nullable()
1133
+ }).openapi("AgentWithinContextOfProjectSelect");
1134
+ const AgentWithinContextOfProjectSelectSchemaWithRelationIds = AgentWithinContextOfProjectSelectSchema.extend({ subAgents: z.record(z.string(), FullAgentSubAgentSelectSchemaWithRelationIds) }).openapi("AgentWithinContextOfProjectSelectWithRelationIds");
1135
+ const FullProjectSelectSchema = ProjectApiSelectSchema.extend({
1136
+ agents: z.record(z.string(), AgentWithinContextOfProjectSelectSchema),
1137
+ tools: z.record(z.string(), ToolApiSelectSchema),
1138
+ functionTools: z.record(z.string(), FunctionToolApiSelectSchema).nullable(),
1139
+ functions: z.record(z.string(), FunctionApiSelectSchema).nullable(),
1140
+ dataComponents: z.record(z.string(), DataComponentApiSelectSchema).nullable(),
1141
+ artifactComponents: z.record(z.string(), ArtifactComponentApiSelectSchema).nullable(),
1142
+ externalAgents: z.record(z.string(), ExternalAgentApiSelectSchema).nullable(),
1143
+ statusUpdates: StatusUpdateSchema.nullable(),
1144
+ credentialReferences: z.record(z.string(), CredentialReferenceApiSelectSchema).nullable()
1145
+ }).openapi("FullProjectSelect");
1146
+ const FullProjectSelectSchemaWithRelationIds = FullProjectSelectSchema.extend({ agents: z.record(z.string(), AgentWithinContextOfProjectSelectSchemaWithRelationIds) }).openapi("FullProjectSelectWithRelationIds");
627
1147
  const ProjectResponse = z.object({ data: ProjectApiSelectSchema }).openapi("ProjectResponse");
628
1148
  const SubAgentResponse = z.object({ data: SubAgentApiSelectSchema }).openapi("SubAgentResponse");
629
1149
  const AgentResponse = z.object({ data: AgentApiSelectSchema }).openapi("AgentResponse");
@@ -634,12 +1154,15 @@ const ApiKeyResponse = z.object({ data: ApiKeyApiSelectSchema }).openapi("ApiKey
634
1154
  const CredentialReferenceResponse = z.object({ data: CredentialReferenceApiSelectSchema }).openapi("CredentialReferenceResponse");
635
1155
  const FunctionResponse = z.object({ data: FunctionApiSelectSchema }).openapi("FunctionResponse");
636
1156
  const FunctionToolResponse = z.object({ data: FunctionToolApiSelectSchema }).openapi("FunctionToolResponse");
1157
+ const SubAgentFunctionToolRelationResponse = z.object({ data: SubAgentFunctionToolRelationApiSelectSchema }).openapi("SubAgentFunctionToolRelationResponse");
637
1158
  const DataComponentResponse = z.object({ data: DataComponentApiSelectSchema }).openapi("DataComponentResponse");
638
1159
  const ArtifactComponentResponse = z.object({ data: ArtifactComponentApiSelectSchema }).openapi("ArtifactComponentResponse");
639
1160
  const SubAgentRelationResponse = z.object({ data: SubAgentRelationApiSelectSchema }).openapi("SubAgentRelationResponse");
640
1161
  const SubAgentToolRelationResponse = z.object({ data: SubAgentToolRelationApiSelectSchema }).openapi("SubAgentToolRelationResponse");
641
1162
  const ConversationResponse = z.object({ data: ConversationApiSelectSchema }).openapi("ConversationResponse");
642
1163
  const MessageResponse = z.object({ data: MessageApiSelectSchema }).openapi("MessageResponse");
1164
+ const TriggerResponse = z.object({ data: TriggerApiSelectSchema }).openapi("TriggerResponse");
1165
+ const TriggerInvocationResponse = z.object({ data: TriggerInvocationApiSelectSchema }).openapi("TriggerInvocationResponse");
643
1166
  const ProjectListResponse = z.object({
644
1167
  data: z.array(ProjectApiSelectSchema),
645
1168
  pagination: PaginationSchema
@@ -680,6 +1203,10 @@ const FunctionToolListResponse = z.object({
680
1203
  data: z.array(FunctionToolApiSelectSchema),
681
1204
  pagination: PaginationSchema
682
1205
  }).openapi("FunctionToolListResponse");
1206
+ const SubAgentFunctionToolRelationListResponse = z.object({
1207
+ data: z.array(SubAgentFunctionToolRelationApiSelectSchema),
1208
+ pagination: PaginationSchema
1209
+ }).openapi("SubAgentFunctionToolRelationListResponse");
683
1210
  const DataComponentListResponse = z.object({
684
1211
  data: z.array(DataComponentApiSelectSchema),
685
1212
  pagination: PaginationSchema
@@ -704,6 +1231,19 @@ const MessageListResponse = z.object({
704
1231
  data: z.array(MessageApiSelectSchema),
705
1232
  pagination: PaginationSchema
706
1233
  }).openapi("MessageListResponse");
1234
+ const TriggerListResponse = z.object({
1235
+ data: z.array(TriggerApiSelectSchema),
1236
+ pagination: PaginationSchema
1237
+ }).openapi("TriggerListResponse");
1238
+ const TriggerInvocationListResponse = z.object({
1239
+ data: z.array(TriggerInvocationApiSelectSchema),
1240
+ pagination: PaginationSchema
1241
+ }).openapi("TriggerInvocationListResponse");
1242
+ const TriggerWithWebhookUrlResponse = z.object({ data: TriggerWithWebhookUrlSchema }).openapi("TriggerWithWebhookUrlResponse");
1243
+ const TriggerWithWebhookUrlListResponse = z.object({
1244
+ data: z.array(TriggerWithWebhookUrlSchema),
1245
+ pagination: PaginationSchema
1246
+ }).openapi("TriggerWithWebhookUrlListResponse");
707
1247
  const SubAgentDataComponentResponse = z.object({ data: SubAgentDataComponentApiSelectSchema }).openapi("SubAgentDataComponentResponse");
708
1248
  const SubAgentArtifactComponentResponse = z.object({ data: SubAgentArtifactComponentApiSelectSchema }).openapi("SubAgentArtifactComponentResponse");
709
1249
  const SubAgentDataComponentListResponse = z.object({
@@ -715,7 +1255,10 @@ const SubAgentArtifactComponentListResponse = z.object({
715
1255
  pagination: PaginationSchema
716
1256
  }).openapi("SubAgentArtifactComponentListResponse");
717
1257
  const FullProjectDefinitionResponse = z.object({ data: FullProjectDefinitionSchema }).openapi("FullProjectDefinitionResponse");
1258
+ const FullProjectSelectResponse = z.object({ data: FullProjectSelectSchema }).openapi("FullProjectSelectResponse");
1259
+ const FullProjectSelectWithRelationIdsResponse = z.object({ data: FullProjectSelectSchemaWithRelationIds }).openapi("FullProjectSelectWithRelationIdsResponse");
718
1260
  const AgentWithinContextOfProjectResponse = z.object({ data: AgentWithinContextOfProjectSchema }).openapi("AgentWithinContextOfProjectResponse");
1261
+ const AgentWithinContextOfProjectSelectResponse = z.object({ data: AgentWithinContextOfProjectSelectSchema }).openapi("AgentWithinContextOfProjectSelectResponse");
719
1262
  const RelatedAgentInfoListResponse = z.object({
720
1263
  data: z.array(RelatedAgentInfoSchema),
721
1264
  pagination: PaginationSchema
@@ -792,6 +1335,7 @@ const TenantProjectAgentParamsSchema = TenantProjectParamsSchema.extend({ agentI
792
1335
  const TenantProjectAgentIdParamsSchema = TenantProjectAgentParamsSchema.extend({ id: resourceIdSchema });
793
1336
  const TenantProjectAgentSubAgentParamsSchema = TenantProjectAgentParamsSchema.extend({ subAgentId: SubAgentId });
794
1337
  const TenantProjectAgentSubAgentIdParamsSchema = TenantProjectAgentSubAgentParamsSchema.extend({ id: resourceIdSchema });
1338
+ const RefQueryParamSchema = z.object({ ref: z.string().optional().describe("Branch name, tag name, or commit hash to query from") });
795
1339
  const PaginationQueryParamsSchema = z.object({
796
1340
  page: pageNumber,
797
1341
  limit: limitNumber
@@ -809,6 +1353,9 @@ const PrebuiltMCPServerSchema = z.object({
809
1353
  });
810
1354
  const MCPCatalogListResponse = z.object({ data: z.array(PrebuiltMCPServerSchema) }).openapi("MCPCatalogListResponse");
811
1355
  const ThirdPartyMCPServerResponse = z.object({ data: PrebuiltMCPServerSchema.nullable() }).openapi("ThirdPartyMCPServerResponse");
1356
+ const PaginationWithRefQueryParamsSchema = PaginationQueryParamsSchema.merge(RefQueryParamSchema);
1357
+ const ProjectMetadataSelectSchema = createSelectSchema(projectMetadata);
1358
+ const ProjectMetadataInsertSchema = createInsertSchema(projectMetadata).omit({ createdAt: true });
812
1359
 
813
1360
  //#endregion
814
- export { AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentInsertSchema, AgentListResponse, AgentResponse, AgentSelectSchema, AgentStopWhenSchema, AgentUpdateSchema, AgentWithinContextOfProjectResponse, AgentWithinContextOfProjectSchema, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeyListResponse, ApiKeyResponse, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentArrayResponse, ArtifactComponentInsertSchema, ArtifactComponentListResponse, ArtifactComponentResponse, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ComponentAssociationListResponse, ComponentAssociationSchema, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigInsertSchema, ContextConfigListResponse, ContextConfigResponse, ContextConfigSelectSchema, ContextConfigUpdateSchema, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationListResponse, ConversationResponse, ConversationSelectSchema, ConversationUpdateSchema, CreateCredentialInStoreRequestSchema, CreateCredentialInStoreResponseSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceListResponse, CredentialReferenceResponse, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, CredentialStoreListResponseSchema, CredentialStoreSchema, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentArrayResponse, DataComponentBaseSchema, DataComponentInsertSchema, DataComponentListResponse, DataComponentResponse, DataComponentSelectSchema, DataComponentUpdateSchema, ErrorResponseSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentListResponse, ExternalAgentResponse, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FetchConfigSchema, FetchDefinitionSchema, FullAgentAgentInsertSchema, FullProjectDefinitionResponse, FullProjectDefinitionSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, FunctionInsertSchema, FunctionListResponse, FunctionResponse, FunctionSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiSelectSchema, FunctionToolApiUpdateSchema, FunctionToolConfigSchema, FunctionToolInsertSchema, FunctionToolListResponse, FunctionToolResponse, FunctionToolSelectSchema, FunctionToolUpdateSchema, FunctionUpdateSchema, HeadersScopeSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiUpdateSchema, LedgerArtifactInsertSchema, LedgerArtifactSelectSchema, LedgerArtifactUpdateSchema, ListResponseSchema, MAX_ID_LENGTH, MCPCatalogListResponse, MCPToolConfigSchema, MIN_ID_LENGTH, McpToolDefinitionSchema, McpToolListResponse, McpToolResponse, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageListResponse, MessageResponse, MessageSelectSchema, MessageUpdateSchema, ModelSchema, ModelSettingsSchema, OAuthCallbackQuerySchema, OAuthLoginQuerySchema, PaginationQueryParamsSchema, PaginationSchema, PrebuiltMCPServerSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectListResponse, ProjectModelSchema, ProjectResponse, ProjectSelectSchema, ProjectUpdateSchema, RelatedAgentInfoListResponse, RelatedAgentInfoSchema, RemovedResponseSchema, SingleResponseSchema, StatusComponentSchema, StatusUpdateSchema, StopWhenSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiUpdateSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentListResponse, SubAgentArtifactComponentResponse, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentUpdateSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiUpdateSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentListResponse, SubAgentDataComponentResponse, SubAgentDataComponentSelectSchema, SubAgentDataComponentUpdateSchema, SubAgentExternalAgentRelationApiInsertSchema, SubAgentExternalAgentRelationApiSelectSchema, SubAgentExternalAgentRelationApiUpdateSchema, SubAgentExternalAgentRelationInsertSchema, SubAgentExternalAgentRelationListResponse, SubAgentExternalAgentRelationResponse, SubAgentExternalAgentRelationSelectSchema, SubAgentExternalAgentRelationUpdateSchema, SubAgentInsertSchema, SubAgentListResponse, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationListResponse, SubAgentRelationQuerySchema, SubAgentRelationResponse, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentResponse, SubAgentSelectSchema, SubAgentStopWhenSchema, SubAgentTeamAgentRelationApiInsertSchema, SubAgentTeamAgentRelationApiSelectSchema, SubAgentTeamAgentRelationApiUpdateSchema, SubAgentTeamAgentRelationInsertSchema, SubAgentTeamAgentRelationListResponse, SubAgentTeamAgentRelationResponse, SubAgentTeamAgentRelationSelectSchema, SubAgentTeamAgentRelationUpdateSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiUpdateSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationListResponse, SubAgentToolRelationResponse, SubAgentToolRelationSelectSchema, SubAgentToolRelationUpdateSchema, SubAgentUpdateSchema, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, TeamAgentSchema, TenantIdParamsSchema, TenantParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ThirdPartyMCPServerResponse, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolListResponse, ToolResponse, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, URL_SAFE_ID_PATTERN, canDelegateToExternalAgentSchema, canDelegateToTeamAgentSchema, resourceIdSchema };
1361
+ export { 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, ComponentJoinSchema, 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, MAX_ID_LENGTH, MCPCatalogListResponse, MCPToolConfigSchema, MIN_ID_LENGTH, McpToolDefinitionSchema, McpToolListResponse, McpToolResponse, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageListResponse, MessageResponse, MessageSelectSchema, MessageUpdateSchema, ModelSchema, ModelSettingsSchema, OAuthCallbackQuerySchema, OAuthLoginQuerySchema, PaginationQueryParamsSchema, PaginationSchema, PaginationWithRefQueryParamsSchema, PrebuiltMCPServerSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectListResponse, ProjectMetadataInsertSchema, ProjectMetadataSelectSchema, ProjectModelSchema, ProjectResponse, ProjectSelectSchema, ProjectUpdateSchema, RefQueryParamSchema, RelatedAgentInfoListResponse, RelatedAgentInfoSchema, RemovedResponseSchema, SignatureSourceSchema, SignatureValidationOptionsSchema, SignatureVerificationConfigSchema, SignedComponentSchema, 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, TriggerWithWebhookUrlListResponse, TriggerWithWebhookUrlResponse, TriggerWithWebhookUrlSchema, URL_SAFE_ID_PATTERN, canDelegateToExternalAgentInsertSchema, canDelegateToExternalAgentSchema, canDelegateToTeamAgentInsertSchema, canDelegateToTeamAgentSchema, canRelateToInternalSubAgentSchema, resourceIdSchema };