@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
@@ -0,0 +1,3115 @@
1
+ {
2
+ "id": "7e67373c-8e0d-4cdf-9816-8d43517eed65",
3
+ "prevId": "e3d08153-0e0d-43b9-a78e-bddb19ed4e9a",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.agent": {
8
+ "name": "agent",
9
+ "schema": "",
10
+ "columns": {
11
+ "tenant_id": {
12
+ "name": "tenant_id",
13
+ "type": "varchar(256)",
14
+ "primaryKey": false,
15
+ "notNull": true
16
+ },
17
+ "id": {
18
+ "name": "id",
19
+ "type": "varchar(256)",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "project_id": {
24
+ "name": "project_id",
25
+ "type": "varchar(256)",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "name": {
30
+ "name": "name",
31
+ "type": "varchar(256)",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "description": {
36
+ "name": "description",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": false
40
+ },
41
+ "default_sub_agent_id": {
42
+ "name": "default_sub_agent_id",
43
+ "type": "varchar(256)",
44
+ "primaryKey": false,
45
+ "notNull": false
46
+ },
47
+ "context_config_id": {
48
+ "name": "context_config_id",
49
+ "type": "varchar(256)",
50
+ "primaryKey": false,
51
+ "notNull": false
52
+ },
53
+ "models": {
54
+ "name": "models",
55
+ "type": "jsonb",
56
+ "primaryKey": false,
57
+ "notNull": false
58
+ },
59
+ "status_updates": {
60
+ "name": "status_updates",
61
+ "type": "jsonb",
62
+ "primaryKey": false,
63
+ "notNull": false
64
+ },
65
+ "prompt": {
66
+ "name": "prompt",
67
+ "type": "text",
68
+ "primaryKey": false,
69
+ "notNull": false
70
+ },
71
+ "stop_when": {
72
+ "name": "stop_when",
73
+ "type": "jsonb",
74
+ "primaryKey": false,
75
+ "notNull": false
76
+ },
77
+ "created_at": {
78
+ "name": "created_at",
79
+ "type": "timestamp",
80
+ "primaryKey": false,
81
+ "notNull": true,
82
+ "default": "now()"
83
+ },
84
+ "updated_at": {
85
+ "name": "updated_at",
86
+ "type": "timestamp",
87
+ "primaryKey": false,
88
+ "notNull": true,
89
+ "default": "now()"
90
+ }
91
+ },
92
+ "indexes": {},
93
+ "foreignKeys": {
94
+ "agent_project_fk": {
95
+ "name": "agent_project_fk",
96
+ "tableFrom": "agent",
97
+ "tableTo": "projects",
98
+ "columnsFrom": [
99
+ "tenant_id",
100
+ "project_id"
101
+ ],
102
+ "columnsTo": [
103
+ "tenant_id",
104
+ "id"
105
+ ],
106
+ "onDelete": "cascade",
107
+ "onUpdate": "no action"
108
+ }
109
+ },
110
+ "compositePrimaryKeys": {
111
+ "agent_tenant_id_project_id_id_pk": {
112
+ "name": "agent_tenant_id_project_id_id_pk",
113
+ "columns": [
114
+ "tenant_id",
115
+ "project_id",
116
+ "id"
117
+ ]
118
+ }
119
+ },
120
+ "uniqueConstraints": {},
121
+ "policies": {},
122
+ "checkConstraints": {},
123
+ "isRLSEnabled": false
124
+ },
125
+ "public.artifact_components": {
126
+ "name": "artifact_components",
127
+ "schema": "",
128
+ "columns": {
129
+ "tenant_id": {
130
+ "name": "tenant_id",
131
+ "type": "varchar(256)",
132
+ "primaryKey": false,
133
+ "notNull": true
134
+ },
135
+ "id": {
136
+ "name": "id",
137
+ "type": "varchar(256)",
138
+ "primaryKey": false,
139
+ "notNull": true
140
+ },
141
+ "project_id": {
142
+ "name": "project_id",
143
+ "type": "varchar(256)",
144
+ "primaryKey": false,
145
+ "notNull": true
146
+ },
147
+ "name": {
148
+ "name": "name",
149
+ "type": "varchar(256)",
150
+ "primaryKey": false,
151
+ "notNull": true
152
+ },
153
+ "description": {
154
+ "name": "description",
155
+ "type": "text",
156
+ "primaryKey": false,
157
+ "notNull": false
158
+ },
159
+ "props": {
160
+ "name": "props",
161
+ "type": "jsonb",
162
+ "primaryKey": false,
163
+ "notNull": false
164
+ },
165
+ "render": {
166
+ "name": "render",
167
+ "type": "jsonb",
168
+ "primaryKey": false,
169
+ "notNull": false
170
+ },
171
+ "created_at": {
172
+ "name": "created_at",
173
+ "type": "timestamp",
174
+ "primaryKey": false,
175
+ "notNull": true,
176
+ "default": "now()"
177
+ },
178
+ "updated_at": {
179
+ "name": "updated_at",
180
+ "type": "timestamp",
181
+ "primaryKey": false,
182
+ "notNull": true,
183
+ "default": "now()"
184
+ }
185
+ },
186
+ "indexes": {},
187
+ "foreignKeys": {
188
+ "artifact_components_project_fk": {
189
+ "name": "artifact_components_project_fk",
190
+ "tableFrom": "artifact_components",
191
+ "tableTo": "projects",
192
+ "columnsFrom": [
193
+ "tenant_id",
194
+ "project_id"
195
+ ],
196
+ "columnsTo": [
197
+ "tenant_id",
198
+ "id"
199
+ ],
200
+ "onDelete": "cascade",
201
+ "onUpdate": "no action"
202
+ }
203
+ },
204
+ "compositePrimaryKeys": {
205
+ "artifact_components_tenant_id_project_id_id_pk": {
206
+ "name": "artifact_components_tenant_id_project_id_id_pk",
207
+ "columns": [
208
+ "tenant_id",
209
+ "project_id",
210
+ "id"
211
+ ]
212
+ }
213
+ },
214
+ "uniqueConstraints": {},
215
+ "policies": {},
216
+ "checkConstraints": {},
217
+ "isRLSEnabled": false
218
+ },
219
+ "public.context_configs": {
220
+ "name": "context_configs",
221
+ "schema": "",
222
+ "columns": {
223
+ "tenant_id": {
224
+ "name": "tenant_id",
225
+ "type": "varchar(256)",
226
+ "primaryKey": false,
227
+ "notNull": true
228
+ },
229
+ "id": {
230
+ "name": "id",
231
+ "type": "varchar(256)",
232
+ "primaryKey": false,
233
+ "notNull": true
234
+ },
235
+ "project_id": {
236
+ "name": "project_id",
237
+ "type": "varchar(256)",
238
+ "primaryKey": false,
239
+ "notNull": true
240
+ },
241
+ "agent_id": {
242
+ "name": "agent_id",
243
+ "type": "varchar(256)",
244
+ "primaryKey": false,
245
+ "notNull": true
246
+ },
247
+ "headers_schema": {
248
+ "name": "headers_schema",
249
+ "type": "jsonb",
250
+ "primaryKey": false,
251
+ "notNull": false
252
+ },
253
+ "context_variables": {
254
+ "name": "context_variables",
255
+ "type": "jsonb",
256
+ "primaryKey": false,
257
+ "notNull": false
258
+ },
259
+ "created_at": {
260
+ "name": "created_at",
261
+ "type": "timestamp",
262
+ "primaryKey": false,
263
+ "notNull": true,
264
+ "default": "now()"
265
+ },
266
+ "updated_at": {
267
+ "name": "updated_at",
268
+ "type": "timestamp",
269
+ "primaryKey": false,
270
+ "notNull": true,
271
+ "default": "now()"
272
+ }
273
+ },
274
+ "indexes": {},
275
+ "foreignKeys": {
276
+ "context_configs_agent_fk": {
277
+ "name": "context_configs_agent_fk",
278
+ "tableFrom": "context_configs",
279
+ "tableTo": "agent",
280
+ "columnsFrom": [
281
+ "tenant_id",
282
+ "project_id",
283
+ "agent_id"
284
+ ],
285
+ "columnsTo": [
286
+ "tenant_id",
287
+ "project_id",
288
+ "id"
289
+ ],
290
+ "onDelete": "cascade",
291
+ "onUpdate": "no action"
292
+ }
293
+ },
294
+ "compositePrimaryKeys": {
295
+ "context_configs_tenant_id_project_id_agent_id_id_pk": {
296
+ "name": "context_configs_tenant_id_project_id_agent_id_id_pk",
297
+ "columns": [
298
+ "tenant_id",
299
+ "project_id",
300
+ "agent_id",
301
+ "id"
302
+ ]
303
+ }
304
+ },
305
+ "uniqueConstraints": {},
306
+ "policies": {},
307
+ "checkConstraints": {},
308
+ "isRLSEnabled": false
309
+ },
310
+ "public.credential_references": {
311
+ "name": "credential_references",
312
+ "schema": "",
313
+ "columns": {
314
+ "tenant_id": {
315
+ "name": "tenant_id",
316
+ "type": "varchar(256)",
317
+ "primaryKey": false,
318
+ "notNull": true
319
+ },
320
+ "id": {
321
+ "name": "id",
322
+ "type": "varchar(256)",
323
+ "primaryKey": false,
324
+ "notNull": true
325
+ },
326
+ "project_id": {
327
+ "name": "project_id",
328
+ "type": "varchar(256)",
329
+ "primaryKey": false,
330
+ "notNull": true
331
+ },
332
+ "name": {
333
+ "name": "name",
334
+ "type": "varchar(256)",
335
+ "primaryKey": false,
336
+ "notNull": true
337
+ },
338
+ "type": {
339
+ "name": "type",
340
+ "type": "varchar(256)",
341
+ "primaryKey": false,
342
+ "notNull": true
343
+ },
344
+ "credential_store_id": {
345
+ "name": "credential_store_id",
346
+ "type": "varchar(256)",
347
+ "primaryKey": false,
348
+ "notNull": true
349
+ },
350
+ "retrieval_params": {
351
+ "name": "retrieval_params",
352
+ "type": "jsonb",
353
+ "primaryKey": false,
354
+ "notNull": false
355
+ },
356
+ "tool_id": {
357
+ "name": "tool_id",
358
+ "type": "varchar(256)",
359
+ "primaryKey": false,
360
+ "notNull": false
361
+ },
362
+ "user_id": {
363
+ "name": "user_id",
364
+ "type": "varchar(256)",
365
+ "primaryKey": false,
366
+ "notNull": false
367
+ },
368
+ "created_by": {
369
+ "name": "created_by",
370
+ "type": "varchar(256)",
371
+ "primaryKey": false,
372
+ "notNull": false
373
+ },
374
+ "created_at": {
375
+ "name": "created_at",
376
+ "type": "timestamp",
377
+ "primaryKey": false,
378
+ "notNull": true,
379
+ "default": "now()"
380
+ },
381
+ "updated_at": {
382
+ "name": "updated_at",
383
+ "type": "timestamp",
384
+ "primaryKey": false,
385
+ "notNull": true,
386
+ "default": "now()"
387
+ }
388
+ },
389
+ "indexes": {},
390
+ "foreignKeys": {
391
+ "credential_references_project_fk": {
392
+ "name": "credential_references_project_fk",
393
+ "tableFrom": "credential_references",
394
+ "tableTo": "projects",
395
+ "columnsFrom": [
396
+ "tenant_id",
397
+ "project_id"
398
+ ],
399
+ "columnsTo": [
400
+ "tenant_id",
401
+ "id"
402
+ ],
403
+ "onDelete": "cascade",
404
+ "onUpdate": "no action"
405
+ }
406
+ },
407
+ "compositePrimaryKeys": {
408
+ "credential_references_tenant_id_project_id_id_pk": {
409
+ "name": "credential_references_tenant_id_project_id_id_pk",
410
+ "columns": [
411
+ "tenant_id",
412
+ "project_id",
413
+ "id"
414
+ ]
415
+ }
416
+ },
417
+ "uniqueConstraints": {
418
+ "credential_references_id_unique": {
419
+ "name": "credential_references_id_unique",
420
+ "nullsNotDistinct": false,
421
+ "columns": [
422
+ "id"
423
+ ]
424
+ },
425
+ "credential_references_tool_user_unique": {
426
+ "name": "credential_references_tool_user_unique",
427
+ "nullsNotDistinct": false,
428
+ "columns": [
429
+ "tool_id",
430
+ "user_id"
431
+ ]
432
+ }
433
+ },
434
+ "policies": {},
435
+ "checkConstraints": {},
436
+ "isRLSEnabled": false
437
+ },
438
+ "public.data_components": {
439
+ "name": "data_components",
440
+ "schema": "",
441
+ "columns": {
442
+ "tenant_id": {
443
+ "name": "tenant_id",
444
+ "type": "varchar(256)",
445
+ "primaryKey": false,
446
+ "notNull": true
447
+ },
448
+ "id": {
449
+ "name": "id",
450
+ "type": "varchar(256)",
451
+ "primaryKey": false,
452
+ "notNull": true
453
+ },
454
+ "project_id": {
455
+ "name": "project_id",
456
+ "type": "varchar(256)",
457
+ "primaryKey": false,
458
+ "notNull": true
459
+ },
460
+ "name": {
461
+ "name": "name",
462
+ "type": "varchar(256)",
463
+ "primaryKey": false,
464
+ "notNull": true
465
+ },
466
+ "description": {
467
+ "name": "description",
468
+ "type": "text",
469
+ "primaryKey": false,
470
+ "notNull": false
471
+ },
472
+ "props": {
473
+ "name": "props",
474
+ "type": "jsonb",
475
+ "primaryKey": false,
476
+ "notNull": false
477
+ },
478
+ "render": {
479
+ "name": "render",
480
+ "type": "jsonb",
481
+ "primaryKey": false,
482
+ "notNull": false
483
+ },
484
+ "created_at": {
485
+ "name": "created_at",
486
+ "type": "timestamp",
487
+ "primaryKey": false,
488
+ "notNull": true,
489
+ "default": "now()"
490
+ },
491
+ "updated_at": {
492
+ "name": "updated_at",
493
+ "type": "timestamp",
494
+ "primaryKey": false,
495
+ "notNull": true,
496
+ "default": "now()"
497
+ }
498
+ },
499
+ "indexes": {},
500
+ "foreignKeys": {
501
+ "data_components_project_fk": {
502
+ "name": "data_components_project_fk",
503
+ "tableFrom": "data_components",
504
+ "tableTo": "projects",
505
+ "columnsFrom": [
506
+ "tenant_id",
507
+ "project_id"
508
+ ],
509
+ "columnsTo": [
510
+ "tenant_id",
511
+ "id"
512
+ ],
513
+ "onDelete": "cascade",
514
+ "onUpdate": "no action"
515
+ }
516
+ },
517
+ "compositePrimaryKeys": {
518
+ "data_components_tenant_id_project_id_id_pk": {
519
+ "name": "data_components_tenant_id_project_id_id_pk",
520
+ "columns": [
521
+ "tenant_id",
522
+ "project_id",
523
+ "id"
524
+ ]
525
+ }
526
+ },
527
+ "uniqueConstraints": {},
528
+ "policies": {},
529
+ "checkConstraints": {},
530
+ "isRLSEnabled": false
531
+ },
532
+ "public.dataset": {
533
+ "name": "dataset",
534
+ "schema": "",
535
+ "columns": {
536
+ "tenant_id": {
537
+ "name": "tenant_id",
538
+ "type": "varchar(256)",
539
+ "primaryKey": false,
540
+ "notNull": true
541
+ },
542
+ "id": {
543
+ "name": "id",
544
+ "type": "varchar(256)",
545
+ "primaryKey": false,
546
+ "notNull": true
547
+ },
548
+ "project_id": {
549
+ "name": "project_id",
550
+ "type": "varchar(256)",
551
+ "primaryKey": false,
552
+ "notNull": true
553
+ },
554
+ "name": {
555
+ "name": "name",
556
+ "type": "varchar(256)",
557
+ "primaryKey": false,
558
+ "notNull": true
559
+ },
560
+ "created_at": {
561
+ "name": "created_at",
562
+ "type": "timestamp",
563
+ "primaryKey": false,
564
+ "notNull": true,
565
+ "default": "now()"
566
+ },
567
+ "updated_at": {
568
+ "name": "updated_at",
569
+ "type": "timestamp",
570
+ "primaryKey": false,
571
+ "notNull": true,
572
+ "default": "now()"
573
+ }
574
+ },
575
+ "indexes": {},
576
+ "foreignKeys": {
577
+ "dataset_project_fk": {
578
+ "name": "dataset_project_fk",
579
+ "tableFrom": "dataset",
580
+ "tableTo": "projects",
581
+ "columnsFrom": [
582
+ "tenant_id",
583
+ "project_id"
584
+ ],
585
+ "columnsTo": [
586
+ "tenant_id",
587
+ "id"
588
+ ],
589
+ "onDelete": "cascade",
590
+ "onUpdate": "no action"
591
+ }
592
+ },
593
+ "compositePrimaryKeys": {
594
+ "dataset_tenant_id_project_id_id_pk": {
595
+ "name": "dataset_tenant_id_project_id_id_pk",
596
+ "columns": [
597
+ "tenant_id",
598
+ "project_id",
599
+ "id"
600
+ ]
601
+ }
602
+ },
603
+ "uniqueConstraints": {},
604
+ "policies": {},
605
+ "checkConstraints": {},
606
+ "isRLSEnabled": false
607
+ },
608
+ "public.dataset_item": {
609
+ "name": "dataset_item",
610
+ "schema": "",
611
+ "columns": {
612
+ "tenant_id": {
613
+ "name": "tenant_id",
614
+ "type": "varchar(256)",
615
+ "primaryKey": false,
616
+ "notNull": true
617
+ },
618
+ "id": {
619
+ "name": "id",
620
+ "type": "varchar(256)",
621
+ "primaryKey": false,
622
+ "notNull": true
623
+ },
624
+ "project_id": {
625
+ "name": "project_id",
626
+ "type": "varchar(256)",
627
+ "primaryKey": false,
628
+ "notNull": true
629
+ },
630
+ "dataset_id": {
631
+ "name": "dataset_id",
632
+ "type": "text",
633
+ "primaryKey": false,
634
+ "notNull": true
635
+ },
636
+ "input": {
637
+ "name": "input",
638
+ "type": "jsonb",
639
+ "primaryKey": false,
640
+ "notNull": true
641
+ },
642
+ "expected_output": {
643
+ "name": "expected_output",
644
+ "type": "jsonb",
645
+ "primaryKey": false,
646
+ "notNull": false
647
+ },
648
+ "simulation_agent": {
649
+ "name": "simulation_agent",
650
+ "type": "jsonb",
651
+ "primaryKey": false,
652
+ "notNull": false
653
+ },
654
+ "created_at": {
655
+ "name": "created_at",
656
+ "type": "timestamp",
657
+ "primaryKey": false,
658
+ "notNull": true,
659
+ "default": "now()"
660
+ },
661
+ "updated_at": {
662
+ "name": "updated_at",
663
+ "type": "timestamp",
664
+ "primaryKey": false,
665
+ "notNull": true,
666
+ "default": "now()"
667
+ }
668
+ },
669
+ "indexes": {},
670
+ "foreignKeys": {
671
+ "dataset_item_dataset_fk": {
672
+ "name": "dataset_item_dataset_fk",
673
+ "tableFrom": "dataset_item",
674
+ "tableTo": "dataset",
675
+ "columnsFrom": [
676
+ "tenant_id",
677
+ "project_id",
678
+ "dataset_id"
679
+ ],
680
+ "columnsTo": [
681
+ "tenant_id",
682
+ "project_id",
683
+ "id"
684
+ ],
685
+ "onDelete": "cascade",
686
+ "onUpdate": "no action"
687
+ }
688
+ },
689
+ "compositePrimaryKeys": {
690
+ "dataset_item_tenant_id_project_id_id_pk": {
691
+ "name": "dataset_item_tenant_id_project_id_id_pk",
692
+ "columns": [
693
+ "tenant_id",
694
+ "project_id",
695
+ "id"
696
+ ]
697
+ }
698
+ },
699
+ "uniqueConstraints": {},
700
+ "policies": {},
701
+ "checkConstraints": {},
702
+ "isRLSEnabled": false
703
+ },
704
+ "public.dataset_run_config": {
705
+ "name": "dataset_run_config",
706
+ "schema": "",
707
+ "columns": {
708
+ "tenant_id": {
709
+ "name": "tenant_id",
710
+ "type": "varchar(256)",
711
+ "primaryKey": false,
712
+ "notNull": true
713
+ },
714
+ "id": {
715
+ "name": "id",
716
+ "type": "varchar(256)",
717
+ "primaryKey": false,
718
+ "notNull": true
719
+ },
720
+ "project_id": {
721
+ "name": "project_id",
722
+ "type": "varchar(256)",
723
+ "primaryKey": false,
724
+ "notNull": true
725
+ },
726
+ "name": {
727
+ "name": "name",
728
+ "type": "varchar(256)",
729
+ "primaryKey": false,
730
+ "notNull": true
731
+ },
732
+ "description": {
733
+ "name": "description",
734
+ "type": "text",
735
+ "primaryKey": false,
736
+ "notNull": false
737
+ },
738
+ "dataset_id": {
739
+ "name": "dataset_id",
740
+ "type": "text",
741
+ "primaryKey": false,
742
+ "notNull": true
743
+ },
744
+ "created_at": {
745
+ "name": "created_at",
746
+ "type": "timestamp",
747
+ "primaryKey": false,
748
+ "notNull": true,
749
+ "default": "now()"
750
+ },
751
+ "updated_at": {
752
+ "name": "updated_at",
753
+ "type": "timestamp",
754
+ "primaryKey": false,
755
+ "notNull": true,
756
+ "default": "now()"
757
+ }
758
+ },
759
+ "indexes": {},
760
+ "foreignKeys": {
761
+ "dataset_run_config_project_fk": {
762
+ "name": "dataset_run_config_project_fk",
763
+ "tableFrom": "dataset_run_config",
764
+ "tableTo": "projects",
765
+ "columnsFrom": [
766
+ "tenant_id",
767
+ "project_id"
768
+ ],
769
+ "columnsTo": [
770
+ "tenant_id",
771
+ "id"
772
+ ],
773
+ "onDelete": "cascade",
774
+ "onUpdate": "no action"
775
+ },
776
+ "dataset_run_config_dataset_fk": {
777
+ "name": "dataset_run_config_dataset_fk",
778
+ "tableFrom": "dataset_run_config",
779
+ "tableTo": "dataset",
780
+ "columnsFrom": [
781
+ "tenant_id",
782
+ "project_id",
783
+ "dataset_id"
784
+ ],
785
+ "columnsTo": [
786
+ "tenant_id",
787
+ "project_id",
788
+ "id"
789
+ ],
790
+ "onDelete": "cascade",
791
+ "onUpdate": "no action"
792
+ }
793
+ },
794
+ "compositePrimaryKeys": {
795
+ "dataset_run_config_tenant_id_project_id_id_pk": {
796
+ "name": "dataset_run_config_tenant_id_project_id_id_pk",
797
+ "columns": [
798
+ "tenant_id",
799
+ "project_id",
800
+ "id"
801
+ ]
802
+ }
803
+ },
804
+ "uniqueConstraints": {},
805
+ "policies": {},
806
+ "checkConstraints": {},
807
+ "isRLSEnabled": false
808
+ },
809
+ "public.dataset_run_config_agent_relations": {
810
+ "name": "dataset_run_config_agent_relations",
811
+ "schema": "",
812
+ "columns": {
813
+ "tenant_id": {
814
+ "name": "tenant_id",
815
+ "type": "varchar(256)",
816
+ "primaryKey": false,
817
+ "notNull": true
818
+ },
819
+ "id": {
820
+ "name": "id",
821
+ "type": "varchar(256)",
822
+ "primaryKey": false,
823
+ "notNull": true
824
+ },
825
+ "project_id": {
826
+ "name": "project_id",
827
+ "type": "varchar(256)",
828
+ "primaryKey": false,
829
+ "notNull": true
830
+ },
831
+ "dataset_run_config_id": {
832
+ "name": "dataset_run_config_id",
833
+ "type": "text",
834
+ "primaryKey": false,
835
+ "notNull": true
836
+ },
837
+ "agent_id": {
838
+ "name": "agent_id",
839
+ "type": "text",
840
+ "primaryKey": false,
841
+ "notNull": true
842
+ },
843
+ "created_at": {
844
+ "name": "created_at",
845
+ "type": "timestamp",
846
+ "primaryKey": false,
847
+ "notNull": true,
848
+ "default": "now()"
849
+ },
850
+ "updated_at": {
851
+ "name": "updated_at",
852
+ "type": "timestamp",
853
+ "primaryKey": false,
854
+ "notNull": true,
855
+ "default": "now()"
856
+ }
857
+ },
858
+ "indexes": {},
859
+ "foreignKeys": {
860
+ "dataset_run_config_agent_relations_dataset_run_config_fk": {
861
+ "name": "dataset_run_config_agent_relations_dataset_run_config_fk",
862
+ "tableFrom": "dataset_run_config_agent_relations",
863
+ "tableTo": "dataset_run_config",
864
+ "columnsFrom": [
865
+ "tenant_id",
866
+ "project_id",
867
+ "dataset_run_config_id"
868
+ ],
869
+ "columnsTo": [
870
+ "tenant_id",
871
+ "project_id",
872
+ "id"
873
+ ],
874
+ "onDelete": "cascade",
875
+ "onUpdate": "no action"
876
+ },
877
+ "dataset_run_config_agent_relations_agent_fk": {
878
+ "name": "dataset_run_config_agent_relations_agent_fk",
879
+ "tableFrom": "dataset_run_config_agent_relations",
880
+ "tableTo": "agent",
881
+ "columnsFrom": [
882
+ "tenant_id",
883
+ "project_id",
884
+ "agent_id"
885
+ ],
886
+ "columnsTo": [
887
+ "tenant_id",
888
+ "project_id",
889
+ "id"
890
+ ],
891
+ "onDelete": "cascade",
892
+ "onUpdate": "no action"
893
+ }
894
+ },
895
+ "compositePrimaryKeys": {
896
+ "dataset_run_config_agent_relations_tenant_id_project_id_id_pk": {
897
+ "name": "dataset_run_config_agent_relations_tenant_id_project_id_id_pk",
898
+ "columns": [
899
+ "tenant_id",
900
+ "project_id",
901
+ "id"
902
+ ]
903
+ }
904
+ },
905
+ "uniqueConstraints": {},
906
+ "policies": {},
907
+ "checkConstraints": {},
908
+ "isRLSEnabled": false
909
+ },
910
+ "public.evaluation_job_config": {
911
+ "name": "evaluation_job_config",
912
+ "schema": "",
913
+ "columns": {
914
+ "tenant_id": {
915
+ "name": "tenant_id",
916
+ "type": "varchar(256)",
917
+ "primaryKey": false,
918
+ "notNull": true
919
+ },
920
+ "id": {
921
+ "name": "id",
922
+ "type": "varchar(256)",
923
+ "primaryKey": false,
924
+ "notNull": true
925
+ },
926
+ "project_id": {
927
+ "name": "project_id",
928
+ "type": "varchar(256)",
929
+ "primaryKey": false,
930
+ "notNull": true
931
+ },
932
+ "job_filters": {
933
+ "name": "job_filters",
934
+ "type": "jsonb",
935
+ "primaryKey": false,
936
+ "notNull": false
937
+ },
938
+ "created_at": {
939
+ "name": "created_at",
940
+ "type": "timestamp",
941
+ "primaryKey": false,
942
+ "notNull": true,
943
+ "default": "now()"
944
+ },
945
+ "updated_at": {
946
+ "name": "updated_at",
947
+ "type": "timestamp",
948
+ "primaryKey": false,
949
+ "notNull": true,
950
+ "default": "now()"
951
+ }
952
+ },
953
+ "indexes": {},
954
+ "foreignKeys": {
955
+ "evaluation_job_config_project_fk": {
956
+ "name": "evaluation_job_config_project_fk",
957
+ "tableFrom": "evaluation_job_config",
958
+ "tableTo": "projects",
959
+ "columnsFrom": [
960
+ "tenant_id",
961
+ "project_id"
962
+ ],
963
+ "columnsTo": [
964
+ "tenant_id",
965
+ "id"
966
+ ],
967
+ "onDelete": "cascade",
968
+ "onUpdate": "no action"
969
+ }
970
+ },
971
+ "compositePrimaryKeys": {
972
+ "evaluation_job_config_tenant_id_project_id_id_pk": {
973
+ "name": "evaluation_job_config_tenant_id_project_id_id_pk",
974
+ "columns": [
975
+ "tenant_id",
976
+ "project_id",
977
+ "id"
978
+ ]
979
+ }
980
+ },
981
+ "uniqueConstraints": {},
982
+ "policies": {},
983
+ "checkConstraints": {},
984
+ "isRLSEnabled": false
985
+ },
986
+ "public.evaluation_job_config_evaluator_relations": {
987
+ "name": "evaluation_job_config_evaluator_relations",
988
+ "schema": "",
989
+ "columns": {
990
+ "tenant_id": {
991
+ "name": "tenant_id",
992
+ "type": "varchar(256)",
993
+ "primaryKey": false,
994
+ "notNull": true
995
+ },
996
+ "id": {
997
+ "name": "id",
998
+ "type": "varchar(256)",
999
+ "primaryKey": false,
1000
+ "notNull": true
1001
+ },
1002
+ "project_id": {
1003
+ "name": "project_id",
1004
+ "type": "varchar(256)",
1005
+ "primaryKey": false,
1006
+ "notNull": true
1007
+ },
1008
+ "evaluation_job_config_id": {
1009
+ "name": "evaluation_job_config_id",
1010
+ "type": "text",
1011
+ "primaryKey": false,
1012
+ "notNull": true
1013
+ },
1014
+ "evaluator_id": {
1015
+ "name": "evaluator_id",
1016
+ "type": "text",
1017
+ "primaryKey": false,
1018
+ "notNull": true
1019
+ },
1020
+ "created_at": {
1021
+ "name": "created_at",
1022
+ "type": "timestamp",
1023
+ "primaryKey": false,
1024
+ "notNull": true,
1025
+ "default": "now()"
1026
+ },
1027
+ "updated_at": {
1028
+ "name": "updated_at",
1029
+ "type": "timestamp",
1030
+ "primaryKey": false,
1031
+ "notNull": true,
1032
+ "default": "now()"
1033
+ }
1034
+ },
1035
+ "indexes": {},
1036
+ "foreignKeys": {
1037
+ "eval_job_cfg_evaluator_rel_job_cfg_fk": {
1038
+ "name": "eval_job_cfg_evaluator_rel_job_cfg_fk",
1039
+ "tableFrom": "evaluation_job_config_evaluator_relations",
1040
+ "tableTo": "evaluation_job_config",
1041
+ "columnsFrom": [
1042
+ "tenant_id",
1043
+ "project_id",
1044
+ "evaluation_job_config_id"
1045
+ ],
1046
+ "columnsTo": [
1047
+ "tenant_id",
1048
+ "project_id",
1049
+ "id"
1050
+ ],
1051
+ "onDelete": "cascade",
1052
+ "onUpdate": "no action"
1053
+ },
1054
+ "eval_job_cfg_evaluator_rel_evaluator_fk": {
1055
+ "name": "eval_job_cfg_evaluator_rel_evaluator_fk",
1056
+ "tableFrom": "evaluation_job_config_evaluator_relations",
1057
+ "tableTo": "evaluator",
1058
+ "columnsFrom": [
1059
+ "tenant_id",
1060
+ "project_id",
1061
+ "evaluator_id"
1062
+ ],
1063
+ "columnsTo": [
1064
+ "tenant_id",
1065
+ "project_id",
1066
+ "id"
1067
+ ],
1068
+ "onDelete": "cascade",
1069
+ "onUpdate": "no action"
1070
+ }
1071
+ },
1072
+ "compositePrimaryKeys": {
1073
+ "eval_job_cfg_evaluator_rel_pk": {
1074
+ "name": "eval_job_cfg_evaluator_rel_pk",
1075
+ "columns": [
1076
+ "tenant_id",
1077
+ "project_id",
1078
+ "id"
1079
+ ]
1080
+ }
1081
+ },
1082
+ "uniqueConstraints": {},
1083
+ "policies": {},
1084
+ "checkConstraints": {},
1085
+ "isRLSEnabled": false
1086
+ },
1087
+ "public.evaluation_run_config": {
1088
+ "name": "evaluation_run_config",
1089
+ "schema": "",
1090
+ "columns": {
1091
+ "tenant_id": {
1092
+ "name": "tenant_id",
1093
+ "type": "varchar(256)",
1094
+ "primaryKey": false,
1095
+ "notNull": true
1096
+ },
1097
+ "id": {
1098
+ "name": "id",
1099
+ "type": "varchar(256)",
1100
+ "primaryKey": false,
1101
+ "notNull": true
1102
+ },
1103
+ "project_id": {
1104
+ "name": "project_id",
1105
+ "type": "varchar(256)",
1106
+ "primaryKey": false,
1107
+ "notNull": true
1108
+ },
1109
+ "name": {
1110
+ "name": "name",
1111
+ "type": "varchar(256)",
1112
+ "primaryKey": false,
1113
+ "notNull": true
1114
+ },
1115
+ "description": {
1116
+ "name": "description",
1117
+ "type": "text",
1118
+ "primaryKey": false,
1119
+ "notNull": false
1120
+ },
1121
+ "is_active": {
1122
+ "name": "is_active",
1123
+ "type": "boolean",
1124
+ "primaryKey": false,
1125
+ "notNull": true,
1126
+ "default": true
1127
+ },
1128
+ "created_at": {
1129
+ "name": "created_at",
1130
+ "type": "timestamp",
1131
+ "primaryKey": false,
1132
+ "notNull": true,
1133
+ "default": "now()"
1134
+ },
1135
+ "updated_at": {
1136
+ "name": "updated_at",
1137
+ "type": "timestamp",
1138
+ "primaryKey": false,
1139
+ "notNull": true,
1140
+ "default": "now()"
1141
+ }
1142
+ },
1143
+ "indexes": {},
1144
+ "foreignKeys": {
1145
+ "evaluation_run_config_project_fk": {
1146
+ "name": "evaluation_run_config_project_fk",
1147
+ "tableFrom": "evaluation_run_config",
1148
+ "tableTo": "projects",
1149
+ "columnsFrom": [
1150
+ "tenant_id",
1151
+ "project_id"
1152
+ ],
1153
+ "columnsTo": [
1154
+ "tenant_id",
1155
+ "id"
1156
+ ],
1157
+ "onDelete": "cascade",
1158
+ "onUpdate": "no action"
1159
+ }
1160
+ },
1161
+ "compositePrimaryKeys": {
1162
+ "evaluation_run_config_tenant_id_project_id_id_pk": {
1163
+ "name": "evaluation_run_config_tenant_id_project_id_id_pk",
1164
+ "columns": [
1165
+ "tenant_id",
1166
+ "project_id",
1167
+ "id"
1168
+ ]
1169
+ }
1170
+ },
1171
+ "uniqueConstraints": {},
1172
+ "policies": {},
1173
+ "checkConstraints": {},
1174
+ "isRLSEnabled": false
1175
+ },
1176
+ "public.evaluation_run_config_evaluation_suite_config_relations": {
1177
+ "name": "evaluation_run_config_evaluation_suite_config_relations",
1178
+ "schema": "",
1179
+ "columns": {
1180
+ "tenant_id": {
1181
+ "name": "tenant_id",
1182
+ "type": "varchar(256)",
1183
+ "primaryKey": false,
1184
+ "notNull": true
1185
+ },
1186
+ "id": {
1187
+ "name": "id",
1188
+ "type": "varchar(256)",
1189
+ "primaryKey": false,
1190
+ "notNull": true
1191
+ },
1192
+ "project_id": {
1193
+ "name": "project_id",
1194
+ "type": "varchar(256)",
1195
+ "primaryKey": false,
1196
+ "notNull": true
1197
+ },
1198
+ "evaluation_run_config_id": {
1199
+ "name": "evaluation_run_config_id",
1200
+ "type": "text",
1201
+ "primaryKey": false,
1202
+ "notNull": true
1203
+ },
1204
+ "evaluation_suite_config_id": {
1205
+ "name": "evaluation_suite_config_id",
1206
+ "type": "text",
1207
+ "primaryKey": false,
1208
+ "notNull": true
1209
+ },
1210
+ "created_at": {
1211
+ "name": "created_at",
1212
+ "type": "timestamp",
1213
+ "primaryKey": false,
1214
+ "notNull": true,
1215
+ "default": "now()"
1216
+ },
1217
+ "updated_at": {
1218
+ "name": "updated_at",
1219
+ "type": "timestamp",
1220
+ "primaryKey": false,
1221
+ "notNull": true,
1222
+ "default": "now()"
1223
+ }
1224
+ },
1225
+ "indexes": {},
1226
+ "foreignKeys": {
1227
+ "eval_run_cfg_eval_suite_rel_run_cfg_fk": {
1228
+ "name": "eval_run_cfg_eval_suite_rel_run_cfg_fk",
1229
+ "tableFrom": "evaluation_run_config_evaluation_suite_config_relations",
1230
+ "tableTo": "evaluation_run_config",
1231
+ "columnsFrom": [
1232
+ "tenant_id",
1233
+ "project_id",
1234
+ "evaluation_run_config_id"
1235
+ ],
1236
+ "columnsTo": [
1237
+ "tenant_id",
1238
+ "project_id",
1239
+ "id"
1240
+ ],
1241
+ "onDelete": "cascade",
1242
+ "onUpdate": "no action"
1243
+ },
1244
+ "eval_run_cfg_eval_suite_rel_suite_cfg_fk": {
1245
+ "name": "eval_run_cfg_eval_suite_rel_suite_cfg_fk",
1246
+ "tableFrom": "evaluation_run_config_evaluation_suite_config_relations",
1247
+ "tableTo": "evaluation_suite_config",
1248
+ "columnsFrom": [
1249
+ "tenant_id",
1250
+ "project_id",
1251
+ "evaluation_suite_config_id"
1252
+ ],
1253
+ "columnsTo": [
1254
+ "tenant_id",
1255
+ "project_id",
1256
+ "id"
1257
+ ],
1258
+ "onDelete": "cascade",
1259
+ "onUpdate": "no action"
1260
+ }
1261
+ },
1262
+ "compositePrimaryKeys": {
1263
+ "eval_run_cfg_eval_suite_cfg_rel_pk": {
1264
+ "name": "eval_run_cfg_eval_suite_cfg_rel_pk",
1265
+ "columns": [
1266
+ "tenant_id",
1267
+ "project_id",
1268
+ "id"
1269
+ ]
1270
+ }
1271
+ },
1272
+ "uniqueConstraints": {},
1273
+ "policies": {},
1274
+ "checkConstraints": {},
1275
+ "isRLSEnabled": false
1276
+ },
1277
+ "public.evaluation_suite_config": {
1278
+ "name": "evaluation_suite_config",
1279
+ "schema": "",
1280
+ "columns": {
1281
+ "tenant_id": {
1282
+ "name": "tenant_id",
1283
+ "type": "varchar(256)",
1284
+ "primaryKey": false,
1285
+ "notNull": true
1286
+ },
1287
+ "id": {
1288
+ "name": "id",
1289
+ "type": "varchar(256)",
1290
+ "primaryKey": false,
1291
+ "notNull": true
1292
+ },
1293
+ "project_id": {
1294
+ "name": "project_id",
1295
+ "type": "varchar(256)",
1296
+ "primaryKey": false,
1297
+ "notNull": true
1298
+ },
1299
+ "filters": {
1300
+ "name": "filters",
1301
+ "type": "jsonb",
1302
+ "primaryKey": false,
1303
+ "notNull": false
1304
+ },
1305
+ "sample_rate": {
1306
+ "name": "sample_rate",
1307
+ "type": "double precision",
1308
+ "primaryKey": false,
1309
+ "notNull": false
1310
+ },
1311
+ "created_at": {
1312
+ "name": "created_at",
1313
+ "type": "timestamp",
1314
+ "primaryKey": false,
1315
+ "notNull": true,
1316
+ "default": "now()"
1317
+ },
1318
+ "updated_at": {
1319
+ "name": "updated_at",
1320
+ "type": "timestamp",
1321
+ "primaryKey": false,
1322
+ "notNull": true,
1323
+ "default": "now()"
1324
+ }
1325
+ },
1326
+ "indexes": {},
1327
+ "foreignKeys": {
1328
+ "evaluation_suite_config_project_fk": {
1329
+ "name": "evaluation_suite_config_project_fk",
1330
+ "tableFrom": "evaluation_suite_config",
1331
+ "tableTo": "projects",
1332
+ "columnsFrom": [
1333
+ "tenant_id",
1334
+ "project_id"
1335
+ ],
1336
+ "columnsTo": [
1337
+ "tenant_id",
1338
+ "id"
1339
+ ],
1340
+ "onDelete": "cascade",
1341
+ "onUpdate": "no action"
1342
+ }
1343
+ },
1344
+ "compositePrimaryKeys": {
1345
+ "evaluation_suite_config_tenant_id_project_id_id_pk": {
1346
+ "name": "evaluation_suite_config_tenant_id_project_id_id_pk",
1347
+ "columns": [
1348
+ "tenant_id",
1349
+ "project_id",
1350
+ "id"
1351
+ ]
1352
+ }
1353
+ },
1354
+ "uniqueConstraints": {},
1355
+ "policies": {},
1356
+ "checkConstraints": {},
1357
+ "isRLSEnabled": false
1358
+ },
1359
+ "public.evaluation_suite_config_evaluator_relations": {
1360
+ "name": "evaluation_suite_config_evaluator_relations",
1361
+ "schema": "",
1362
+ "columns": {
1363
+ "tenant_id": {
1364
+ "name": "tenant_id",
1365
+ "type": "varchar(256)",
1366
+ "primaryKey": false,
1367
+ "notNull": true
1368
+ },
1369
+ "id": {
1370
+ "name": "id",
1371
+ "type": "varchar(256)",
1372
+ "primaryKey": false,
1373
+ "notNull": true
1374
+ },
1375
+ "project_id": {
1376
+ "name": "project_id",
1377
+ "type": "varchar(256)",
1378
+ "primaryKey": false,
1379
+ "notNull": true
1380
+ },
1381
+ "evaluation_suite_config_id": {
1382
+ "name": "evaluation_suite_config_id",
1383
+ "type": "text",
1384
+ "primaryKey": false,
1385
+ "notNull": true
1386
+ },
1387
+ "evaluator_id": {
1388
+ "name": "evaluator_id",
1389
+ "type": "text",
1390
+ "primaryKey": false,
1391
+ "notNull": true
1392
+ },
1393
+ "created_at": {
1394
+ "name": "created_at",
1395
+ "type": "timestamp",
1396
+ "primaryKey": false,
1397
+ "notNull": true,
1398
+ "default": "now()"
1399
+ },
1400
+ "updated_at": {
1401
+ "name": "updated_at",
1402
+ "type": "timestamp",
1403
+ "primaryKey": false,
1404
+ "notNull": true,
1405
+ "default": "now()"
1406
+ }
1407
+ },
1408
+ "indexes": {},
1409
+ "foreignKeys": {
1410
+ "eval_suite_cfg_evaluator_rel_suite_cfg_fk": {
1411
+ "name": "eval_suite_cfg_evaluator_rel_suite_cfg_fk",
1412
+ "tableFrom": "evaluation_suite_config_evaluator_relations",
1413
+ "tableTo": "evaluation_suite_config",
1414
+ "columnsFrom": [
1415
+ "tenant_id",
1416
+ "project_id",
1417
+ "evaluation_suite_config_id"
1418
+ ],
1419
+ "columnsTo": [
1420
+ "tenant_id",
1421
+ "project_id",
1422
+ "id"
1423
+ ],
1424
+ "onDelete": "cascade",
1425
+ "onUpdate": "no action"
1426
+ },
1427
+ "eval_suite_cfg_evaluator_rel_evaluator_fk": {
1428
+ "name": "eval_suite_cfg_evaluator_rel_evaluator_fk",
1429
+ "tableFrom": "evaluation_suite_config_evaluator_relations",
1430
+ "tableTo": "evaluator",
1431
+ "columnsFrom": [
1432
+ "tenant_id",
1433
+ "project_id",
1434
+ "evaluator_id"
1435
+ ],
1436
+ "columnsTo": [
1437
+ "tenant_id",
1438
+ "project_id",
1439
+ "id"
1440
+ ],
1441
+ "onDelete": "cascade",
1442
+ "onUpdate": "no action"
1443
+ }
1444
+ },
1445
+ "compositePrimaryKeys": {
1446
+ "eval_suite_cfg_evaluator_rel_pk": {
1447
+ "name": "eval_suite_cfg_evaluator_rel_pk",
1448
+ "columns": [
1449
+ "tenant_id",
1450
+ "project_id",
1451
+ "id"
1452
+ ]
1453
+ }
1454
+ },
1455
+ "uniqueConstraints": {},
1456
+ "policies": {},
1457
+ "checkConstraints": {},
1458
+ "isRLSEnabled": false
1459
+ },
1460
+ "public.evaluator": {
1461
+ "name": "evaluator",
1462
+ "schema": "",
1463
+ "columns": {
1464
+ "tenant_id": {
1465
+ "name": "tenant_id",
1466
+ "type": "varchar(256)",
1467
+ "primaryKey": false,
1468
+ "notNull": true
1469
+ },
1470
+ "id": {
1471
+ "name": "id",
1472
+ "type": "varchar(256)",
1473
+ "primaryKey": false,
1474
+ "notNull": true
1475
+ },
1476
+ "project_id": {
1477
+ "name": "project_id",
1478
+ "type": "varchar(256)",
1479
+ "primaryKey": false,
1480
+ "notNull": true
1481
+ },
1482
+ "name": {
1483
+ "name": "name",
1484
+ "type": "varchar(256)",
1485
+ "primaryKey": false,
1486
+ "notNull": true
1487
+ },
1488
+ "description": {
1489
+ "name": "description",
1490
+ "type": "text",
1491
+ "primaryKey": false,
1492
+ "notNull": false
1493
+ },
1494
+ "prompt": {
1495
+ "name": "prompt",
1496
+ "type": "text",
1497
+ "primaryKey": false,
1498
+ "notNull": true
1499
+ },
1500
+ "schema": {
1501
+ "name": "schema",
1502
+ "type": "jsonb",
1503
+ "primaryKey": false,
1504
+ "notNull": true
1505
+ },
1506
+ "model": {
1507
+ "name": "model",
1508
+ "type": "jsonb",
1509
+ "primaryKey": false,
1510
+ "notNull": true
1511
+ },
1512
+ "pass_criteria": {
1513
+ "name": "pass_criteria",
1514
+ "type": "jsonb",
1515
+ "primaryKey": false,
1516
+ "notNull": false
1517
+ },
1518
+ "created_at": {
1519
+ "name": "created_at",
1520
+ "type": "timestamp",
1521
+ "primaryKey": false,
1522
+ "notNull": true,
1523
+ "default": "now()"
1524
+ },
1525
+ "updated_at": {
1526
+ "name": "updated_at",
1527
+ "type": "timestamp",
1528
+ "primaryKey": false,
1529
+ "notNull": true,
1530
+ "default": "now()"
1531
+ }
1532
+ },
1533
+ "indexes": {},
1534
+ "foreignKeys": {
1535
+ "evaluator_project_fk": {
1536
+ "name": "evaluator_project_fk",
1537
+ "tableFrom": "evaluator",
1538
+ "tableTo": "projects",
1539
+ "columnsFrom": [
1540
+ "tenant_id",
1541
+ "project_id"
1542
+ ],
1543
+ "columnsTo": [
1544
+ "tenant_id",
1545
+ "id"
1546
+ ],
1547
+ "onDelete": "cascade",
1548
+ "onUpdate": "no action"
1549
+ }
1550
+ },
1551
+ "compositePrimaryKeys": {
1552
+ "evaluator_tenant_id_project_id_id_pk": {
1553
+ "name": "evaluator_tenant_id_project_id_id_pk",
1554
+ "columns": [
1555
+ "tenant_id",
1556
+ "project_id",
1557
+ "id"
1558
+ ]
1559
+ }
1560
+ },
1561
+ "uniqueConstraints": {},
1562
+ "policies": {},
1563
+ "checkConstraints": {},
1564
+ "isRLSEnabled": false
1565
+ },
1566
+ "public.external_agents": {
1567
+ "name": "external_agents",
1568
+ "schema": "",
1569
+ "columns": {
1570
+ "tenant_id": {
1571
+ "name": "tenant_id",
1572
+ "type": "varchar(256)",
1573
+ "primaryKey": false,
1574
+ "notNull": true
1575
+ },
1576
+ "id": {
1577
+ "name": "id",
1578
+ "type": "varchar(256)",
1579
+ "primaryKey": false,
1580
+ "notNull": true
1581
+ },
1582
+ "project_id": {
1583
+ "name": "project_id",
1584
+ "type": "varchar(256)",
1585
+ "primaryKey": false,
1586
+ "notNull": true
1587
+ },
1588
+ "name": {
1589
+ "name": "name",
1590
+ "type": "varchar(256)",
1591
+ "primaryKey": false,
1592
+ "notNull": true
1593
+ },
1594
+ "description": {
1595
+ "name": "description",
1596
+ "type": "text",
1597
+ "primaryKey": false,
1598
+ "notNull": false
1599
+ },
1600
+ "base_url": {
1601
+ "name": "base_url",
1602
+ "type": "text",
1603
+ "primaryKey": false,
1604
+ "notNull": true
1605
+ },
1606
+ "credential_reference_id": {
1607
+ "name": "credential_reference_id",
1608
+ "type": "varchar(256)",
1609
+ "primaryKey": false,
1610
+ "notNull": false
1611
+ },
1612
+ "created_at": {
1613
+ "name": "created_at",
1614
+ "type": "timestamp",
1615
+ "primaryKey": false,
1616
+ "notNull": true,
1617
+ "default": "now()"
1618
+ },
1619
+ "updated_at": {
1620
+ "name": "updated_at",
1621
+ "type": "timestamp",
1622
+ "primaryKey": false,
1623
+ "notNull": true,
1624
+ "default": "now()"
1625
+ }
1626
+ },
1627
+ "indexes": {},
1628
+ "foreignKeys": {
1629
+ "external_agents_project_fk": {
1630
+ "name": "external_agents_project_fk",
1631
+ "tableFrom": "external_agents",
1632
+ "tableTo": "projects",
1633
+ "columnsFrom": [
1634
+ "tenant_id",
1635
+ "project_id"
1636
+ ],
1637
+ "columnsTo": [
1638
+ "tenant_id",
1639
+ "id"
1640
+ ],
1641
+ "onDelete": "cascade",
1642
+ "onUpdate": "no action"
1643
+ },
1644
+ "external_agents_credential_reference_fk": {
1645
+ "name": "external_agents_credential_reference_fk",
1646
+ "tableFrom": "external_agents",
1647
+ "tableTo": "credential_references",
1648
+ "columnsFrom": [
1649
+ "credential_reference_id"
1650
+ ],
1651
+ "columnsTo": [
1652
+ "id"
1653
+ ],
1654
+ "onDelete": "set null",
1655
+ "onUpdate": "no action"
1656
+ }
1657
+ },
1658
+ "compositePrimaryKeys": {
1659
+ "external_agents_tenant_id_project_id_id_pk": {
1660
+ "name": "external_agents_tenant_id_project_id_id_pk",
1661
+ "columns": [
1662
+ "tenant_id",
1663
+ "project_id",
1664
+ "id"
1665
+ ]
1666
+ }
1667
+ },
1668
+ "uniqueConstraints": {},
1669
+ "policies": {},
1670
+ "checkConstraints": {},
1671
+ "isRLSEnabled": false
1672
+ },
1673
+ "public.function_tools": {
1674
+ "name": "function_tools",
1675
+ "schema": "",
1676
+ "columns": {
1677
+ "tenant_id": {
1678
+ "name": "tenant_id",
1679
+ "type": "varchar(256)",
1680
+ "primaryKey": false,
1681
+ "notNull": true
1682
+ },
1683
+ "id": {
1684
+ "name": "id",
1685
+ "type": "varchar(256)",
1686
+ "primaryKey": false,
1687
+ "notNull": true
1688
+ },
1689
+ "project_id": {
1690
+ "name": "project_id",
1691
+ "type": "varchar(256)",
1692
+ "primaryKey": false,
1693
+ "notNull": true
1694
+ },
1695
+ "agent_id": {
1696
+ "name": "agent_id",
1697
+ "type": "varchar(256)",
1698
+ "primaryKey": false,
1699
+ "notNull": true
1700
+ },
1701
+ "name": {
1702
+ "name": "name",
1703
+ "type": "varchar(256)",
1704
+ "primaryKey": false,
1705
+ "notNull": true
1706
+ },
1707
+ "description": {
1708
+ "name": "description",
1709
+ "type": "text",
1710
+ "primaryKey": false,
1711
+ "notNull": false
1712
+ },
1713
+ "function_id": {
1714
+ "name": "function_id",
1715
+ "type": "varchar(256)",
1716
+ "primaryKey": false,
1717
+ "notNull": true
1718
+ },
1719
+ "created_at": {
1720
+ "name": "created_at",
1721
+ "type": "timestamp",
1722
+ "primaryKey": false,
1723
+ "notNull": true,
1724
+ "default": "now()"
1725
+ },
1726
+ "updated_at": {
1727
+ "name": "updated_at",
1728
+ "type": "timestamp",
1729
+ "primaryKey": false,
1730
+ "notNull": true,
1731
+ "default": "now()"
1732
+ }
1733
+ },
1734
+ "indexes": {},
1735
+ "foreignKeys": {
1736
+ "function_tools_agent_fk": {
1737
+ "name": "function_tools_agent_fk",
1738
+ "tableFrom": "function_tools",
1739
+ "tableTo": "agent",
1740
+ "columnsFrom": [
1741
+ "tenant_id",
1742
+ "project_id",
1743
+ "agent_id"
1744
+ ],
1745
+ "columnsTo": [
1746
+ "tenant_id",
1747
+ "project_id",
1748
+ "id"
1749
+ ],
1750
+ "onDelete": "cascade",
1751
+ "onUpdate": "no action"
1752
+ },
1753
+ "function_tools_function_fk": {
1754
+ "name": "function_tools_function_fk",
1755
+ "tableFrom": "function_tools",
1756
+ "tableTo": "functions",
1757
+ "columnsFrom": [
1758
+ "tenant_id",
1759
+ "project_id",
1760
+ "function_id"
1761
+ ],
1762
+ "columnsTo": [
1763
+ "tenant_id",
1764
+ "project_id",
1765
+ "id"
1766
+ ],
1767
+ "onDelete": "cascade",
1768
+ "onUpdate": "no action"
1769
+ }
1770
+ },
1771
+ "compositePrimaryKeys": {
1772
+ "function_tools_tenant_id_project_id_agent_id_id_pk": {
1773
+ "name": "function_tools_tenant_id_project_id_agent_id_id_pk",
1774
+ "columns": [
1775
+ "tenant_id",
1776
+ "project_id",
1777
+ "agent_id",
1778
+ "id"
1779
+ ]
1780
+ }
1781
+ },
1782
+ "uniqueConstraints": {},
1783
+ "policies": {},
1784
+ "checkConstraints": {},
1785
+ "isRLSEnabled": false
1786
+ },
1787
+ "public.functions": {
1788
+ "name": "functions",
1789
+ "schema": "",
1790
+ "columns": {
1791
+ "tenant_id": {
1792
+ "name": "tenant_id",
1793
+ "type": "varchar(256)",
1794
+ "primaryKey": false,
1795
+ "notNull": true
1796
+ },
1797
+ "id": {
1798
+ "name": "id",
1799
+ "type": "varchar(256)",
1800
+ "primaryKey": false,
1801
+ "notNull": true
1802
+ },
1803
+ "project_id": {
1804
+ "name": "project_id",
1805
+ "type": "varchar(256)",
1806
+ "primaryKey": false,
1807
+ "notNull": true
1808
+ },
1809
+ "input_schema": {
1810
+ "name": "input_schema",
1811
+ "type": "jsonb",
1812
+ "primaryKey": false,
1813
+ "notNull": false
1814
+ },
1815
+ "execute_code": {
1816
+ "name": "execute_code",
1817
+ "type": "text",
1818
+ "primaryKey": false,
1819
+ "notNull": true
1820
+ },
1821
+ "dependencies": {
1822
+ "name": "dependencies",
1823
+ "type": "jsonb",
1824
+ "primaryKey": false,
1825
+ "notNull": false
1826
+ },
1827
+ "created_at": {
1828
+ "name": "created_at",
1829
+ "type": "timestamp",
1830
+ "primaryKey": false,
1831
+ "notNull": true,
1832
+ "default": "now()"
1833
+ },
1834
+ "updated_at": {
1835
+ "name": "updated_at",
1836
+ "type": "timestamp",
1837
+ "primaryKey": false,
1838
+ "notNull": true,
1839
+ "default": "now()"
1840
+ }
1841
+ },
1842
+ "indexes": {},
1843
+ "foreignKeys": {
1844
+ "functions_project_fk": {
1845
+ "name": "functions_project_fk",
1846
+ "tableFrom": "functions",
1847
+ "tableTo": "projects",
1848
+ "columnsFrom": [
1849
+ "tenant_id",
1850
+ "project_id"
1851
+ ],
1852
+ "columnsTo": [
1853
+ "tenant_id",
1854
+ "id"
1855
+ ],
1856
+ "onDelete": "cascade",
1857
+ "onUpdate": "no action"
1858
+ }
1859
+ },
1860
+ "compositePrimaryKeys": {
1861
+ "functions_tenant_id_project_id_id_pk": {
1862
+ "name": "functions_tenant_id_project_id_id_pk",
1863
+ "columns": [
1864
+ "tenant_id",
1865
+ "project_id",
1866
+ "id"
1867
+ ]
1868
+ }
1869
+ },
1870
+ "uniqueConstraints": {},
1871
+ "policies": {},
1872
+ "checkConstraints": {},
1873
+ "isRLSEnabled": false
1874
+ },
1875
+ "public.projects": {
1876
+ "name": "projects",
1877
+ "schema": "",
1878
+ "columns": {
1879
+ "tenant_id": {
1880
+ "name": "tenant_id",
1881
+ "type": "varchar(256)",
1882
+ "primaryKey": false,
1883
+ "notNull": true
1884
+ },
1885
+ "id": {
1886
+ "name": "id",
1887
+ "type": "varchar(256)",
1888
+ "primaryKey": false,
1889
+ "notNull": true
1890
+ },
1891
+ "name": {
1892
+ "name": "name",
1893
+ "type": "varchar(256)",
1894
+ "primaryKey": false,
1895
+ "notNull": true
1896
+ },
1897
+ "description": {
1898
+ "name": "description",
1899
+ "type": "text",
1900
+ "primaryKey": false,
1901
+ "notNull": false
1902
+ },
1903
+ "models": {
1904
+ "name": "models",
1905
+ "type": "jsonb",
1906
+ "primaryKey": false,
1907
+ "notNull": false
1908
+ },
1909
+ "stop_when": {
1910
+ "name": "stop_when",
1911
+ "type": "jsonb",
1912
+ "primaryKey": false,
1913
+ "notNull": false
1914
+ },
1915
+ "created_at": {
1916
+ "name": "created_at",
1917
+ "type": "timestamp",
1918
+ "primaryKey": false,
1919
+ "notNull": true,
1920
+ "default": "now()"
1921
+ },
1922
+ "updated_at": {
1923
+ "name": "updated_at",
1924
+ "type": "timestamp",
1925
+ "primaryKey": false,
1926
+ "notNull": true,
1927
+ "default": "now()"
1928
+ }
1929
+ },
1930
+ "indexes": {},
1931
+ "foreignKeys": {},
1932
+ "compositePrimaryKeys": {
1933
+ "projects_tenant_id_id_pk": {
1934
+ "name": "projects_tenant_id_id_pk",
1935
+ "columns": [
1936
+ "tenant_id",
1937
+ "id"
1938
+ ]
1939
+ }
1940
+ },
1941
+ "uniqueConstraints": {},
1942
+ "policies": {},
1943
+ "checkConstraints": {},
1944
+ "isRLSEnabled": false
1945
+ },
1946
+ "public.sub_agent_artifact_components": {
1947
+ "name": "sub_agent_artifact_components",
1948
+ "schema": "",
1949
+ "columns": {
1950
+ "tenant_id": {
1951
+ "name": "tenant_id",
1952
+ "type": "varchar(256)",
1953
+ "primaryKey": false,
1954
+ "notNull": true
1955
+ },
1956
+ "id": {
1957
+ "name": "id",
1958
+ "type": "varchar(256)",
1959
+ "primaryKey": false,
1960
+ "notNull": true
1961
+ },
1962
+ "project_id": {
1963
+ "name": "project_id",
1964
+ "type": "varchar(256)",
1965
+ "primaryKey": false,
1966
+ "notNull": true
1967
+ },
1968
+ "agent_id": {
1969
+ "name": "agent_id",
1970
+ "type": "varchar(256)",
1971
+ "primaryKey": false,
1972
+ "notNull": true
1973
+ },
1974
+ "sub_agent_id": {
1975
+ "name": "sub_agent_id",
1976
+ "type": "varchar(256)",
1977
+ "primaryKey": false,
1978
+ "notNull": true
1979
+ },
1980
+ "artifact_component_id": {
1981
+ "name": "artifact_component_id",
1982
+ "type": "varchar(256)",
1983
+ "primaryKey": false,
1984
+ "notNull": true
1985
+ },
1986
+ "created_at": {
1987
+ "name": "created_at",
1988
+ "type": "timestamp",
1989
+ "primaryKey": false,
1990
+ "notNull": true,
1991
+ "default": "now()"
1992
+ }
1993
+ },
1994
+ "indexes": {},
1995
+ "foreignKeys": {
1996
+ "sub_agent_artifact_components_sub_agent_fk": {
1997
+ "name": "sub_agent_artifact_components_sub_agent_fk",
1998
+ "tableFrom": "sub_agent_artifact_components",
1999
+ "tableTo": "sub_agents",
2000
+ "columnsFrom": [
2001
+ "tenant_id",
2002
+ "project_id",
2003
+ "agent_id",
2004
+ "sub_agent_id"
2005
+ ],
2006
+ "columnsTo": [
2007
+ "tenant_id",
2008
+ "project_id",
2009
+ "agent_id",
2010
+ "id"
2011
+ ],
2012
+ "onDelete": "cascade",
2013
+ "onUpdate": "no action"
2014
+ },
2015
+ "sub_agent_artifact_components_artifact_component_fk": {
2016
+ "name": "sub_agent_artifact_components_artifact_component_fk",
2017
+ "tableFrom": "sub_agent_artifact_components",
2018
+ "tableTo": "artifact_components",
2019
+ "columnsFrom": [
2020
+ "tenant_id",
2021
+ "project_id",
2022
+ "artifact_component_id"
2023
+ ],
2024
+ "columnsTo": [
2025
+ "tenant_id",
2026
+ "project_id",
2027
+ "id"
2028
+ ],
2029
+ "onDelete": "cascade",
2030
+ "onUpdate": "no action"
2031
+ }
2032
+ },
2033
+ "compositePrimaryKeys": {
2034
+ "sub_agent_artifact_components_pk": {
2035
+ "name": "sub_agent_artifact_components_pk",
2036
+ "columns": [
2037
+ "tenant_id",
2038
+ "project_id",
2039
+ "agent_id",
2040
+ "sub_agent_id",
2041
+ "id"
2042
+ ]
2043
+ }
2044
+ },
2045
+ "uniqueConstraints": {},
2046
+ "policies": {},
2047
+ "checkConstraints": {},
2048
+ "isRLSEnabled": false
2049
+ },
2050
+ "public.sub_agent_data_components": {
2051
+ "name": "sub_agent_data_components",
2052
+ "schema": "",
2053
+ "columns": {
2054
+ "tenant_id": {
2055
+ "name": "tenant_id",
2056
+ "type": "varchar(256)",
2057
+ "primaryKey": false,
2058
+ "notNull": true
2059
+ },
2060
+ "id": {
2061
+ "name": "id",
2062
+ "type": "varchar(256)",
2063
+ "primaryKey": false,
2064
+ "notNull": true
2065
+ },
2066
+ "project_id": {
2067
+ "name": "project_id",
2068
+ "type": "varchar(256)",
2069
+ "primaryKey": false,
2070
+ "notNull": true
2071
+ },
2072
+ "agent_id": {
2073
+ "name": "agent_id",
2074
+ "type": "varchar(256)",
2075
+ "primaryKey": false,
2076
+ "notNull": true
2077
+ },
2078
+ "sub_agent_id": {
2079
+ "name": "sub_agent_id",
2080
+ "type": "varchar(256)",
2081
+ "primaryKey": false,
2082
+ "notNull": true
2083
+ },
2084
+ "data_component_id": {
2085
+ "name": "data_component_id",
2086
+ "type": "varchar(256)",
2087
+ "primaryKey": false,
2088
+ "notNull": true
2089
+ },
2090
+ "created_at": {
2091
+ "name": "created_at",
2092
+ "type": "timestamp",
2093
+ "primaryKey": false,
2094
+ "notNull": true,
2095
+ "default": "now()"
2096
+ }
2097
+ },
2098
+ "indexes": {},
2099
+ "foreignKeys": {
2100
+ "sub_agent_data_components_sub_agent_fk": {
2101
+ "name": "sub_agent_data_components_sub_agent_fk",
2102
+ "tableFrom": "sub_agent_data_components",
2103
+ "tableTo": "sub_agents",
2104
+ "columnsFrom": [
2105
+ "tenant_id",
2106
+ "project_id",
2107
+ "agent_id",
2108
+ "sub_agent_id"
2109
+ ],
2110
+ "columnsTo": [
2111
+ "tenant_id",
2112
+ "project_id",
2113
+ "agent_id",
2114
+ "id"
2115
+ ],
2116
+ "onDelete": "cascade",
2117
+ "onUpdate": "no action"
2118
+ },
2119
+ "sub_agent_data_components_data_component_fk": {
2120
+ "name": "sub_agent_data_components_data_component_fk",
2121
+ "tableFrom": "sub_agent_data_components",
2122
+ "tableTo": "data_components",
2123
+ "columnsFrom": [
2124
+ "tenant_id",
2125
+ "project_id",
2126
+ "data_component_id"
2127
+ ],
2128
+ "columnsTo": [
2129
+ "tenant_id",
2130
+ "project_id",
2131
+ "id"
2132
+ ],
2133
+ "onDelete": "cascade",
2134
+ "onUpdate": "no action"
2135
+ }
2136
+ },
2137
+ "compositePrimaryKeys": {
2138
+ "sub_agent_data_components_tenant_id_project_id_id_pk": {
2139
+ "name": "sub_agent_data_components_tenant_id_project_id_id_pk",
2140
+ "columns": [
2141
+ "tenant_id",
2142
+ "project_id",
2143
+ "id"
2144
+ ]
2145
+ }
2146
+ },
2147
+ "uniqueConstraints": {},
2148
+ "policies": {},
2149
+ "checkConstraints": {},
2150
+ "isRLSEnabled": false
2151
+ },
2152
+ "public.sub_agent_external_agent_relations": {
2153
+ "name": "sub_agent_external_agent_relations",
2154
+ "schema": "",
2155
+ "columns": {
2156
+ "tenant_id": {
2157
+ "name": "tenant_id",
2158
+ "type": "varchar(256)",
2159
+ "primaryKey": false,
2160
+ "notNull": true
2161
+ },
2162
+ "id": {
2163
+ "name": "id",
2164
+ "type": "varchar(256)",
2165
+ "primaryKey": false,
2166
+ "notNull": true
2167
+ },
2168
+ "project_id": {
2169
+ "name": "project_id",
2170
+ "type": "varchar(256)",
2171
+ "primaryKey": false,
2172
+ "notNull": true
2173
+ },
2174
+ "agent_id": {
2175
+ "name": "agent_id",
2176
+ "type": "varchar(256)",
2177
+ "primaryKey": false,
2178
+ "notNull": true
2179
+ },
2180
+ "sub_agent_id": {
2181
+ "name": "sub_agent_id",
2182
+ "type": "varchar(256)",
2183
+ "primaryKey": false,
2184
+ "notNull": true
2185
+ },
2186
+ "external_agent_id": {
2187
+ "name": "external_agent_id",
2188
+ "type": "varchar(256)",
2189
+ "primaryKey": false,
2190
+ "notNull": true
2191
+ },
2192
+ "headers": {
2193
+ "name": "headers",
2194
+ "type": "jsonb",
2195
+ "primaryKey": false,
2196
+ "notNull": false
2197
+ },
2198
+ "created_at": {
2199
+ "name": "created_at",
2200
+ "type": "timestamp",
2201
+ "primaryKey": false,
2202
+ "notNull": true,
2203
+ "default": "now()"
2204
+ },
2205
+ "updated_at": {
2206
+ "name": "updated_at",
2207
+ "type": "timestamp",
2208
+ "primaryKey": false,
2209
+ "notNull": true,
2210
+ "default": "now()"
2211
+ }
2212
+ },
2213
+ "indexes": {},
2214
+ "foreignKeys": {
2215
+ "sub_agent_external_agent_relations_sub_agent_fk": {
2216
+ "name": "sub_agent_external_agent_relations_sub_agent_fk",
2217
+ "tableFrom": "sub_agent_external_agent_relations",
2218
+ "tableTo": "sub_agents",
2219
+ "columnsFrom": [
2220
+ "tenant_id",
2221
+ "project_id",
2222
+ "agent_id",
2223
+ "sub_agent_id"
2224
+ ],
2225
+ "columnsTo": [
2226
+ "tenant_id",
2227
+ "project_id",
2228
+ "agent_id",
2229
+ "id"
2230
+ ],
2231
+ "onDelete": "cascade",
2232
+ "onUpdate": "no action"
2233
+ },
2234
+ "sub_agent_external_agent_relations_external_agent_fk": {
2235
+ "name": "sub_agent_external_agent_relations_external_agent_fk",
2236
+ "tableFrom": "sub_agent_external_agent_relations",
2237
+ "tableTo": "external_agents",
2238
+ "columnsFrom": [
2239
+ "tenant_id",
2240
+ "project_id",
2241
+ "external_agent_id"
2242
+ ],
2243
+ "columnsTo": [
2244
+ "tenant_id",
2245
+ "project_id",
2246
+ "id"
2247
+ ],
2248
+ "onDelete": "cascade",
2249
+ "onUpdate": "no action"
2250
+ }
2251
+ },
2252
+ "compositePrimaryKeys": {
2253
+ "sub_agent_external_agent_relations_pk": {
2254
+ "name": "sub_agent_external_agent_relations_pk",
2255
+ "columns": [
2256
+ "tenant_id",
2257
+ "project_id",
2258
+ "agent_id",
2259
+ "id"
2260
+ ]
2261
+ }
2262
+ },
2263
+ "uniqueConstraints": {},
2264
+ "policies": {},
2265
+ "checkConstraints": {},
2266
+ "isRLSEnabled": false
2267
+ },
2268
+ "public.sub_agent_function_tool_relations": {
2269
+ "name": "sub_agent_function_tool_relations",
2270
+ "schema": "",
2271
+ "columns": {
2272
+ "tenant_id": {
2273
+ "name": "tenant_id",
2274
+ "type": "varchar(256)",
2275
+ "primaryKey": false,
2276
+ "notNull": true
2277
+ },
2278
+ "id": {
2279
+ "name": "id",
2280
+ "type": "varchar(256)",
2281
+ "primaryKey": false,
2282
+ "notNull": true
2283
+ },
2284
+ "project_id": {
2285
+ "name": "project_id",
2286
+ "type": "varchar(256)",
2287
+ "primaryKey": false,
2288
+ "notNull": true
2289
+ },
2290
+ "agent_id": {
2291
+ "name": "agent_id",
2292
+ "type": "varchar(256)",
2293
+ "primaryKey": false,
2294
+ "notNull": true
2295
+ },
2296
+ "sub_agent_id": {
2297
+ "name": "sub_agent_id",
2298
+ "type": "varchar(256)",
2299
+ "primaryKey": false,
2300
+ "notNull": true
2301
+ },
2302
+ "function_tool_id": {
2303
+ "name": "function_tool_id",
2304
+ "type": "varchar(256)",
2305
+ "primaryKey": false,
2306
+ "notNull": true
2307
+ },
2308
+ "created_at": {
2309
+ "name": "created_at",
2310
+ "type": "timestamp",
2311
+ "primaryKey": false,
2312
+ "notNull": true,
2313
+ "default": "now()"
2314
+ },
2315
+ "updated_at": {
2316
+ "name": "updated_at",
2317
+ "type": "timestamp",
2318
+ "primaryKey": false,
2319
+ "notNull": true,
2320
+ "default": "now()"
2321
+ }
2322
+ },
2323
+ "indexes": {},
2324
+ "foreignKeys": {
2325
+ "sub_agent_function_tool_relations_sub_agent_fk": {
2326
+ "name": "sub_agent_function_tool_relations_sub_agent_fk",
2327
+ "tableFrom": "sub_agent_function_tool_relations",
2328
+ "tableTo": "sub_agents",
2329
+ "columnsFrom": [
2330
+ "tenant_id",
2331
+ "project_id",
2332
+ "agent_id",
2333
+ "sub_agent_id"
2334
+ ],
2335
+ "columnsTo": [
2336
+ "tenant_id",
2337
+ "project_id",
2338
+ "agent_id",
2339
+ "id"
2340
+ ],
2341
+ "onDelete": "cascade",
2342
+ "onUpdate": "no action"
2343
+ },
2344
+ "sub_agent_function_tool_relations_function_tool_fk": {
2345
+ "name": "sub_agent_function_tool_relations_function_tool_fk",
2346
+ "tableFrom": "sub_agent_function_tool_relations",
2347
+ "tableTo": "function_tools",
2348
+ "columnsFrom": [
2349
+ "tenant_id",
2350
+ "project_id",
2351
+ "agent_id",
2352
+ "function_tool_id"
2353
+ ],
2354
+ "columnsTo": [
2355
+ "tenant_id",
2356
+ "project_id",
2357
+ "agent_id",
2358
+ "id"
2359
+ ],
2360
+ "onDelete": "cascade",
2361
+ "onUpdate": "no action"
2362
+ }
2363
+ },
2364
+ "compositePrimaryKeys": {
2365
+ "sub_agent_function_tool_relations_pk": {
2366
+ "name": "sub_agent_function_tool_relations_pk",
2367
+ "columns": [
2368
+ "tenant_id",
2369
+ "project_id",
2370
+ "agent_id",
2371
+ "id"
2372
+ ]
2373
+ }
2374
+ },
2375
+ "uniqueConstraints": {},
2376
+ "policies": {},
2377
+ "checkConstraints": {},
2378
+ "isRLSEnabled": false
2379
+ },
2380
+ "public.sub_agent_relations": {
2381
+ "name": "sub_agent_relations",
2382
+ "schema": "",
2383
+ "columns": {
2384
+ "tenant_id": {
2385
+ "name": "tenant_id",
2386
+ "type": "varchar(256)",
2387
+ "primaryKey": false,
2388
+ "notNull": true
2389
+ },
2390
+ "id": {
2391
+ "name": "id",
2392
+ "type": "varchar(256)",
2393
+ "primaryKey": false,
2394
+ "notNull": true
2395
+ },
2396
+ "project_id": {
2397
+ "name": "project_id",
2398
+ "type": "varchar(256)",
2399
+ "primaryKey": false,
2400
+ "notNull": true
2401
+ },
2402
+ "agent_id": {
2403
+ "name": "agent_id",
2404
+ "type": "varchar(256)",
2405
+ "primaryKey": false,
2406
+ "notNull": true
2407
+ },
2408
+ "source_sub_agent_id": {
2409
+ "name": "source_sub_agent_id",
2410
+ "type": "varchar(256)",
2411
+ "primaryKey": false,
2412
+ "notNull": true
2413
+ },
2414
+ "target_sub_agent_id": {
2415
+ "name": "target_sub_agent_id",
2416
+ "type": "varchar(256)",
2417
+ "primaryKey": false,
2418
+ "notNull": false
2419
+ },
2420
+ "relation_type": {
2421
+ "name": "relation_type",
2422
+ "type": "varchar(256)",
2423
+ "primaryKey": false,
2424
+ "notNull": false
2425
+ },
2426
+ "created_at": {
2427
+ "name": "created_at",
2428
+ "type": "timestamp",
2429
+ "primaryKey": false,
2430
+ "notNull": true,
2431
+ "default": "now()"
2432
+ },
2433
+ "updated_at": {
2434
+ "name": "updated_at",
2435
+ "type": "timestamp",
2436
+ "primaryKey": false,
2437
+ "notNull": true,
2438
+ "default": "now()"
2439
+ }
2440
+ },
2441
+ "indexes": {},
2442
+ "foreignKeys": {
2443
+ "sub_agent_relations_agent_fk": {
2444
+ "name": "sub_agent_relations_agent_fk",
2445
+ "tableFrom": "sub_agent_relations",
2446
+ "tableTo": "agent",
2447
+ "columnsFrom": [
2448
+ "tenant_id",
2449
+ "project_id",
2450
+ "agent_id"
2451
+ ],
2452
+ "columnsTo": [
2453
+ "tenant_id",
2454
+ "project_id",
2455
+ "id"
2456
+ ],
2457
+ "onDelete": "cascade",
2458
+ "onUpdate": "no action"
2459
+ }
2460
+ },
2461
+ "compositePrimaryKeys": {
2462
+ "sub_agent_relations_tenant_id_project_id_agent_id_id_pk": {
2463
+ "name": "sub_agent_relations_tenant_id_project_id_agent_id_id_pk",
2464
+ "columns": [
2465
+ "tenant_id",
2466
+ "project_id",
2467
+ "agent_id",
2468
+ "id"
2469
+ ]
2470
+ }
2471
+ },
2472
+ "uniqueConstraints": {},
2473
+ "policies": {},
2474
+ "checkConstraints": {},
2475
+ "isRLSEnabled": false
2476
+ },
2477
+ "public.sub_agent_team_agent_relations": {
2478
+ "name": "sub_agent_team_agent_relations",
2479
+ "schema": "",
2480
+ "columns": {
2481
+ "tenant_id": {
2482
+ "name": "tenant_id",
2483
+ "type": "varchar(256)",
2484
+ "primaryKey": false,
2485
+ "notNull": true
2486
+ },
2487
+ "id": {
2488
+ "name": "id",
2489
+ "type": "varchar(256)",
2490
+ "primaryKey": false,
2491
+ "notNull": true
2492
+ },
2493
+ "project_id": {
2494
+ "name": "project_id",
2495
+ "type": "varchar(256)",
2496
+ "primaryKey": false,
2497
+ "notNull": true
2498
+ },
2499
+ "agent_id": {
2500
+ "name": "agent_id",
2501
+ "type": "varchar(256)",
2502
+ "primaryKey": false,
2503
+ "notNull": true
2504
+ },
2505
+ "sub_agent_id": {
2506
+ "name": "sub_agent_id",
2507
+ "type": "varchar(256)",
2508
+ "primaryKey": false,
2509
+ "notNull": true
2510
+ },
2511
+ "target_agent_id": {
2512
+ "name": "target_agent_id",
2513
+ "type": "varchar(256)",
2514
+ "primaryKey": false,
2515
+ "notNull": true
2516
+ },
2517
+ "headers": {
2518
+ "name": "headers",
2519
+ "type": "jsonb",
2520
+ "primaryKey": false,
2521
+ "notNull": false
2522
+ },
2523
+ "created_at": {
2524
+ "name": "created_at",
2525
+ "type": "timestamp",
2526
+ "primaryKey": false,
2527
+ "notNull": true,
2528
+ "default": "now()"
2529
+ },
2530
+ "updated_at": {
2531
+ "name": "updated_at",
2532
+ "type": "timestamp",
2533
+ "primaryKey": false,
2534
+ "notNull": true,
2535
+ "default": "now()"
2536
+ }
2537
+ },
2538
+ "indexes": {},
2539
+ "foreignKeys": {
2540
+ "sub_agent_team_agent_relations_sub_agent_fk": {
2541
+ "name": "sub_agent_team_agent_relations_sub_agent_fk",
2542
+ "tableFrom": "sub_agent_team_agent_relations",
2543
+ "tableTo": "sub_agents",
2544
+ "columnsFrom": [
2545
+ "tenant_id",
2546
+ "project_id",
2547
+ "agent_id",
2548
+ "sub_agent_id"
2549
+ ],
2550
+ "columnsTo": [
2551
+ "tenant_id",
2552
+ "project_id",
2553
+ "agent_id",
2554
+ "id"
2555
+ ],
2556
+ "onDelete": "cascade",
2557
+ "onUpdate": "no action"
2558
+ },
2559
+ "sub_agent_team_agent_relations_target_agent_fk": {
2560
+ "name": "sub_agent_team_agent_relations_target_agent_fk",
2561
+ "tableFrom": "sub_agent_team_agent_relations",
2562
+ "tableTo": "agent",
2563
+ "columnsFrom": [
2564
+ "tenant_id",
2565
+ "project_id",
2566
+ "target_agent_id"
2567
+ ],
2568
+ "columnsTo": [
2569
+ "tenant_id",
2570
+ "project_id",
2571
+ "id"
2572
+ ],
2573
+ "onDelete": "cascade",
2574
+ "onUpdate": "no action"
2575
+ }
2576
+ },
2577
+ "compositePrimaryKeys": {
2578
+ "sub_agent_team_agent_relations_pk": {
2579
+ "name": "sub_agent_team_agent_relations_pk",
2580
+ "columns": [
2581
+ "tenant_id",
2582
+ "project_id",
2583
+ "agent_id",
2584
+ "id"
2585
+ ]
2586
+ }
2587
+ },
2588
+ "uniqueConstraints": {},
2589
+ "policies": {},
2590
+ "checkConstraints": {},
2591
+ "isRLSEnabled": false
2592
+ },
2593
+ "public.sub_agent_tool_relations": {
2594
+ "name": "sub_agent_tool_relations",
2595
+ "schema": "",
2596
+ "columns": {
2597
+ "tenant_id": {
2598
+ "name": "tenant_id",
2599
+ "type": "varchar(256)",
2600
+ "primaryKey": false,
2601
+ "notNull": true
2602
+ },
2603
+ "id": {
2604
+ "name": "id",
2605
+ "type": "varchar(256)",
2606
+ "primaryKey": false,
2607
+ "notNull": true
2608
+ },
2609
+ "project_id": {
2610
+ "name": "project_id",
2611
+ "type": "varchar(256)",
2612
+ "primaryKey": false,
2613
+ "notNull": true
2614
+ },
2615
+ "agent_id": {
2616
+ "name": "agent_id",
2617
+ "type": "varchar(256)",
2618
+ "primaryKey": false,
2619
+ "notNull": true
2620
+ },
2621
+ "sub_agent_id": {
2622
+ "name": "sub_agent_id",
2623
+ "type": "varchar(256)",
2624
+ "primaryKey": false,
2625
+ "notNull": true
2626
+ },
2627
+ "tool_id": {
2628
+ "name": "tool_id",
2629
+ "type": "varchar(256)",
2630
+ "primaryKey": false,
2631
+ "notNull": true
2632
+ },
2633
+ "selected_tools": {
2634
+ "name": "selected_tools",
2635
+ "type": "jsonb",
2636
+ "primaryKey": false,
2637
+ "notNull": false
2638
+ },
2639
+ "headers": {
2640
+ "name": "headers",
2641
+ "type": "jsonb",
2642
+ "primaryKey": false,
2643
+ "notNull": false
2644
+ },
2645
+ "tool_policies": {
2646
+ "name": "tool_policies",
2647
+ "type": "jsonb",
2648
+ "primaryKey": false,
2649
+ "notNull": false
2650
+ },
2651
+ "created_at": {
2652
+ "name": "created_at",
2653
+ "type": "timestamp",
2654
+ "primaryKey": false,
2655
+ "notNull": true,
2656
+ "default": "now()"
2657
+ },
2658
+ "updated_at": {
2659
+ "name": "updated_at",
2660
+ "type": "timestamp",
2661
+ "primaryKey": false,
2662
+ "notNull": true,
2663
+ "default": "now()"
2664
+ }
2665
+ },
2666
+ "indexes": {},
2667
+ "foreignKeys": {
2668
+ "sub_agent_tool_relations_agent_fk": {
2669
+ "name": "sub_agent_tool_relations_agent_fk",
2670
+ "tableFrom": "sub_agent_tool_relations",
2671
+ "tableTo": "sub_agents",
2672
+ "columnsFrom": [
2673
+ "tenant_id",
2674
+ "project_id",
2675
+ "agent_id",
2676
+ "sub_agent_id"
2677
+ ],
2678
+ "columnsTo": [
2679
+ "tenant_id",
2680
+ "project_id",
2681
+ "agent_id",
2682
+ "id"
2683
+ ],
2684
+ "onDelete": "cascade",
2685
+ "onUpdate": "no action"
2686
+ },
2687
+ "sub_agent_tool_relations_tool_fk": {
2688
+ "name": "sub_agent_tool_relations_tool_fk",
2689
+ "tableFrom": "sub_agent_tool_relations",
2690
+ "tableTo": "tools",
2691
+ "columnsFrom": [
2692
+ "tenant_id",
2693
+ "project_id",
2694
+ "tool_id"
2695
+ ],
2696
+ "columnsTo": [
2697
+ "tenant_id",
2698
+ "project_id",
2699
+ "id"
2700
+ ],
2701
+ "onDelete": "cascade",
2702
+ "onUpdate": "no action"
2703
+ }
2704
+ },
2705
+ "compositePrimaryKeys": {
2706
+ "sub_agent_tool_relations_tenant_id_project_id_agent_id_id_pk": {
2707
+ "name": "sub_agent_tool_relations_tenant_id_project_id_agent_id_id_pk",
2708
+ "columns": [
2709
+ "tenant_id",
2710
+ "project_id",
2711
+ "agent_id",
2712
+ "id"
2713
+ ]
2714
+ }
2715
+ },
2716
+ "uniqueConstraints": {},
2717
+ "policies": {},
2718
+ "checkConstraints": {},
2719
+ "isRLSEnabled": false
2720
+ },
2721
+ "public.sub_agents": {
2722
+ "name": "sub_agents",
2723
+ "schema": "",
2724
+ "columns": {
2725
+ "tenant_id": {
2726
+ "name": "tenant_id",
2727
+ "type": "varchar(256)",
2728
+ "primaryKey": false,
2729
+ "notNull": true
2730
+ },
2731
+ "id": {
2732
+ "name": "id",
2733
+ "type": "varchar(256)",
2734
+ "primaryKey": false,
2735
+ "notNull": true
2736
+ },
2737
+ "project_id": {
2738
+ "name": "project_id",
2739
+ "type": "varchar(256)",
2740
+ "primaryKey": false,
2741
+ "notNull": true
2742
+ },
2743
+ "agent_id": {
2744
+ "name": "agent_id",
2745
+ "type": "varchar(256)",
2746
+ "primaryKey": false,
2747
+ "notNull": true
2748
+ },
2749
+ "name": {
2750
+ "name": "name",
2751
+ "type": "varchar(256)",
2752
+ "primaryKey": false,
2753
+ "notNull": true
2754
+ },
2755
+ "description": {
2756
+ "name": "description",
2757
+ "type": "text",
2758
+ "primaryKey": false,
2759
+ "notNull": false
2760
+ },
2761
+ "prompt": {
2762
+ "name": "prompt",
2763
+ "type": "text",
2764
+ "primaryKey": false,
2765
+ "notNull": false
2766
+ },
2767
+ "conversation_history_config": {
2768
+ "name": "conversation_history_config",
2769
+ "type": "jsonb",
2770
+ "primaryKey": false,
2771
+ "notNull": false,
2772
+ "default": "'{\"mode\":\"full\",\"limit\":50,\"maxOutputTokens\":4000,\"includeInternal\":false,\"messageTypes\":[\"chat\",\"tool-result\"]}'::jsonb"
2773
+ },
2774
+ "models": {
2775
+ "name": "models",
2776
+ "type": "jsonb",
2777
+ "primaryKey": false,
2778
+ "notNull": false
2779
+ },
2780
+ "stop_when": {
2781
+ "name": "stop_when",
2782
+ "type": "jsonb",
2783
+ "primaryKey": false,
2784
+ "notNull": false
2785
+ },
2786
+ "created_at": {
2787
+ "name": "created_at",
2788
+ "type": "timestamp",
2789
+ "primaryKey": false,
2790
+ "notNull": true,
2791
+ "default": "now()"
2792
+ },
2793
+ "updated_at": {
2794
+ "name": "updated_at",
2795
+ "type": "timestamp",
2796
+ "primaryKey": false,
2797
+ "notNull": true,
2798
+ "default": "now()"
2799
+ }
2800
+ },
2801
+ "indexes": {},
2802
+ "foreignKeys": {
2803
+ "sub_agents_agents_fk": {
2804
+ "name": "sub_agents_agents_fk",
2805
+ "tableFrom": "sub_agents",
2806
+ "tableTo": "agent",
2807
+ "columnsFrom": [
2808
+ "tenant_id",
2809
+ "project_id",
2810
+ "agent_id"
2811
+ ],
2812
+ "columnsTo": [
2813
+ "tenant_id",
2814
+ "project_id",
2815
+ "id"
2816
+ ],
2817
+ "onDelete": "cascade",
2818
+ "onUpdate": "no action"
2819
+ }
2820
+ },
2821
+ "compositePrimaryKeys": {
2822
+ "sub_agents_tenant_id_project_id_agent_id_id_pk": {
2823
+ "name": "sub_agents_tenant_id_project_id_agent_id_id_pk",
2824
+ "columns": [
2825
+ "tenant_id",
2826
+ "project_id",
2827
+ "agent_id",
2828
+ "id"
2829
+ ]
2830
+ }
2831
+ },
2832
+ "uniqueConstraints": {},
2833
+ "policies": {},
2834
+ "checkConstraints": {},
2835
+ "isRLSEnabled": false
2836
+ },
2837
+ "public.tools": {
2838
+ "name": "tools",
2839
+ "schema": "",
2840
+ "columns": {
2841
+ "tenant_id": {
2842
+ "name": "tenant_id",
2843
+ "type": "varchar(256)",
2844
+ "primaryKey": false,
2845
+ "notNull": true
2846
+ },
2847
+ "id": {
2848
+ "name": "id",
2849
+ "type": "varchar(256)",
2850
+ "primaryKey": false,
2851
+ "notNull": true
2852
+ },
2853
+ "project_id": {
2854
+ "name": "project_id",
2855
+ "type": "varchar(256)",
2856
+ "primaryKey": false,
2857
+ "notNull": true
2858
+ },
2859
+ "name": {
2860
+ "name": "name",
2861
+ "type": "varchar(256)",
2862
+ "primaryKey": false,
2863
+ "notNull": true
2864
+ },
2865
+ "description": {
2866
+ "name": "description",
2867
+ "type": "text",
2868
+ "primaryKey": false,
2869
+ "notNull": false
2870
+ },
2871
+ "config": {
2872
+ "name": "config",
2873
+ "type": "jsonb",
2874
+ "primaryKey": false,
2875
+ "notNull": true
2876
+ },
2877
+ "credential_reference_id": {
2878
+ "name": "credential_reference_id",
2879
+ "type": "varchar(256)",
2880
+ "primaryKey": false,
2881
+ "notNull": false
2882
+ },
2883
+ "credential_scope": {
2884
+ "name": "credential_scope",
2885
+ "type": "varchar(50)",
2886
+ "primaryKey": false,
2887
+ "notNull": true,
2888
+ "default": "'project'"
2889
+ },
2890
+ "headers": {
2891
+ "name": "headers",
2892
+ "type": "jsonb",
2893
+ "primaryKey": false,
2894
+ "notNull": false
2895
+ },
2896
+ "image_url": {
2897
+ "name": "image_url",
2898
+ "type": "text",
2899
+ "primaryKey": false,
2900
+ "notNull": false
2901
+ },
2902
+ "capabilities": {
2903
+ "name": "capabilities",
2904
+ "type": "jsonb",
2905
+ "primaryKey": false,
2906
+ "notNull": false
2907
+ },
2908
+ "last_error": {
2909
+ "name": "last_error",
2910
+ "type": "text",
2911
+ "primaryKey": false,
2912
+ "notNull": false
2913
+ },
2914
+ "created_at": {
2915
+ "name": "created_at",
2916
+ "type": "timestamp",
2917
+ "primaryKey": false,
2918
+ "notNull": true,
2919
+ "default": "now()"
2920
+ },
2921
+ "updated_at": {
2922
+ "name": "updated_at",
2923
+ "type": "timestamp",
2924
+ "primaryKey": false,
2925
+ "notNull": true,
2926
+ "default": "now()"
2927
+ }
2928
+ },
2929
+ "indexes": {},
2930
+ "foreignKeys": {
2931
+ "tools_project_fk": {
2932
+ "name": "tools_project_fk",
2933
+ "tableFrom": "tools",
2934
+ "tableTo": "projects",
2935
+ "columnsFrom": [
2936
+ "tenant_id",
2937
+ "project_id"
2938
+ ],
2939
+ "columnsTo": [
2940
+ "tenant_id",
2941
+ "id"
2942
+ ],
2943
+ "onDelete": "cascade",
2944
+ "onUpdate": "no action"
2945
+ },
2946
+ "tools_credential_reference_fk": {
2947
+ "name": "tools_credential_reference_fk",
2948
+ "tableFrom": "tools",
2949
+ "tableTo": "credential_references",
2950
+ "columnsFrom": [
2951
+ "credential_reference_id"
2952
+ ],
2953
+ "columnsTo": [
2954
+ "id"
2955
+ ],
2956
+ "onDelete": "set null",
2957
+ "onUpdate": "no action"
2958
+ }
2959
+ },
2960
+ "compositePrimaryKeys": {
2961
+ "tools_tenant_id_project_id_id_pk": {
2962
+ "name": "tools_tenant_id_project_id_id_pk",
2963
+ "columns": [
2964
+ "tenant_id",
2965
+ "project_id",
2966
+ "id"
2967
+ ]
2968
+ }
2969
+ },
2970
+ "uniqueConstraints": {},
2971
+ "policies": {},
2972
+ "checkConstraints": {},
2973
+ "isRLSEnabled": false
2974
+ },
2975
+ "public.triggers": {
2976
+ "name": "triggers",
2977
+ "schema": "",
2978
+ "columns": {
2979
+ "tenant_id": {
2980
+ "name": "tenant_id",
2981
+ "type": "varchar(256)",
2982
+ "primaryKey": false,
2983
+ "notNull": true
2984
+ },
2985
+ "id": {
2986
+ "name": "id",
2987
+ "type": "varchar(256)",
2988
+ "primaryKey": false,
2989
+ "notNull": true
2990
+ },
2991
+ "project_id": {
2992
+ "name": "project_id",
2993
+ "type": "varchar(256)",
2994
+ "primaryKey": false,
2995
+ "notNull": true
2996
+ },
2997
+ "agent_id": {
2998
+ "name": "agent_id",
2999
+ "type": "varchar(256)",
3000
+ "primaryKey": false,
3001
+ "notNull": true
3002
+ },
3003
+ "name": {
3004
+ "name": "name",
3005
+ "type": "varchar(256)",
3006
+ "primaryKey": false,
3007
+ "notNull": true
3008
+ },
3009
+ "description": {
3010
+ "name": "description",
3011
+ "type": "text",
3012
+ "primaryKey": false,
3013
+ "notNull": false
3014
+ },
3015
+ "enabled": {
3016
+ "name": "enabled",
3017
+ "type": "boolean",
3018
+ "primaryKey": false,
3019
+ "notNull": true,
3020
+ "default": true
3021
+ },
3022
+ "input_schema": {
3023
+ "name": "input_schema",
3024
+ "type": "jsonb",
3025
+ "primaryKey": false,
3026
+ "notNull": false
3027
+ },
3028
+ "output_transform": {
3029
+ "name": "output_transform",
3030
+ "type": "jsonb",
3031
+ "primaryKey": false,
3032
+ "notNull": false
3033
+ },
3034
+ "message_template": {
3035
+ "name": "message_template",
3036
+ "type": "text",
3037
+ "primaryKey": false,
3038
+ "notNull": true
3039
+ },
3040
+ "authentication": {
3041
+ "name": "authentication",
3042
+ "type": "jsonb",
3043
+ "primaryKey": false,
3044
+ "notNull": false
3045
+ },
3046
+ "signing_secret": {
3047
+ "name": "signing_secret",
3048
+ "type": "text",
3049
+ "primaryKey": false,
3050
+ "notNull": false
3051
+ },
3052
+ "created_at": {
3053
+ "name": "created_at",
3054
+ "type": "timestamp",
3055
+ "primaryKey": false,
3056
+ "notNull": true,
3057
+ "default": "now()"
3058
+ },
3059
+ "updated_at": {
3060
+ "name": "updated_at",
3061
+ "type": "timestamp",
3062
+ "primaryKey": false,
3063
+ "notNull": true,
3064
+ "default": "now()"
3065
+ }
3066
+ },
3067
+ "indexes": {},
3068
+ "foreignKeys": {
3069
+ "triggers_agent_fk": {
3070
+ "name": "triggers_agent_fk",
3071
+ "tableFrom": "triggers",
3072
+ "tableTo": "agent",
3073
+ "columnsFrom": [
3074
+ "tenant_id",
3075
+ "project_id",
3076
+ "agent_id"
3077
+ ],
3078
+ "columnsTo": [
3079
+ "tenant_id",
3080
+ "project_id",
3081
+ "id"
3082
+ ],
3083
+ "onDelete": "cascade",
3084
+ "onUpdate": "no action"
3085
+ }
3086
+ },
3087
+ "compositePrimaryKeys": {
3088
+ "triggers_tenant_id_project_id_agent_id_id_pk": {
3089
+ "name": "triggers_tenant_id_project_id_agent_id_id_pk",
3090
+ "columns": [
3091
+ "tenant_id",
3092
+ "project_id",
3093
+ "agent_id",
3094
+ "id"
3095
+ ]
3096
+ }
3097
+ },
3098
+ "uniqueConstraints": {},
3099
+ "policies": {},
3100
+ "checkConstraints": {},
3101
+ "isRLSEnabled": false
3102
+ }
3103
+ },
3104
+ "enums": {},
3105
+ "schemas": {},
3106
+ "sequences": {},
3107
+ "roles": {},
3108
+ "policies": {},
3109
+ "views": {},
3110
+ "_meta": {
3111
+ "columns": {},
3112
+ "schemas": {},
3113
+ "tables": {}
3114
+ }
3115
+ }