@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,2397 @@
1
+ {
2
+ "id": "96c3cd6f-dd73-4b24-bc2d-9737bd6df21a",
3
+ "prevId": "8e6d4a12-bcea-4d9e-a1dc-b2f8981ea0b8",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.account": {
8
+ "name": "account",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "account_id": {
18
+ "name": "account_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "provider_id": {
24
+ "name": "provider_id",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "user_id": {
30
+ "name": "user_id",
31
+ "type": "text",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "access_token": {
36
+ "name": "access_token",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": false
40
+ },
41
+ "refresh_token": {
42
+ "name": "refresh_token",
43
+ "type": "text",
44
+ "primaryKey": false,
45
+ "notNull": false
46
+ },
47
+ "id_token": {
48
+ "name": "id_token",
49
+ "type": "text",
50
+ "primaryKey": false,
51
+ "notNull": false
52
+ },
53
+ "access_token_expires_at": {
54
+ "name": "access_token_expires_at",
55
+ "type": "timestamp",
56
+ "primaryKey": false,
57
+ "notNull": false
58
+ },
59
+ "refresh_token_expires_at": {
60
+ "name": "refresh_token_expires_at",
61
+ "type": "timestamp",
62
+ "primaryKey": false,
63
+ "notNull": false
64
+ },
65
+ "scope": {
66
+ "name": "scope",
67
+ "type": "text",
68
+ "primaryKey": false,
69
+ "notNull": false
70
+ },
71
+ "password": {
72
+ "name": "password",
73
+ "type": "text",
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
+ }
90
+ },
91
+ "indexes": {
92
+ "account_userId_idx": {
93
+ "name": "account_userId_idx",
94
+ "columns": [
95
+ {
96
+ "expression": "user_id",
97
+ "isExpression": false,
98
+ "asc": true,
99
+ "nulls": "last"
100
+ }
101
+ ],
102
+ "isUnique": false,
103
+ "concurrently": false,
104
+ "method": "btree",
105
+ "with": {}
106
+ }
107
+ },
108
+ "foreignKeys": {
109
+ "account_user_id_user_id_fk": {
110
+ "name": "account_user_id_user_id_fk",
111
+ "tableFrom": "account",
112
+ "tableTo": "user",
113
+ "columnsFrom": [
114
+ "user_id"
115
+ ],
116
+ "columnsTo": [
117
+ "id"
118
+ ],
119
+ "onDelete": "cascade",
120
+ "onUpdate": "no action"
121
+ }
122
+ },
123
+ "compositePrimaryKeys": {},
124
+ "uniqueConstraints": {},
125
+ "policies": {},
126
+ "checkConstraints": {},
127
+ "isRLSEnabled": false
128
+ },
129
+ "public.api_keys": {
130
+ "name": "api_keys",
131
+ "schema": "",
132
+ "columns": {
133
+ "tenant_id": {
134
+ "name": "tenant_id",
135
+ "type": "varchar(256)",
136
+ "primaryKey": false,
137
+ "notNull": true
138
+ },
139
+ "id": {
140
+ "name": "id",
141
+ "type": "varchar(256)",
142
+ "primaryKey": false,
143
+ "notNull": true
144
+ },
145
+ "project_id": {
146
+ "name": "project_id",
147
+ "type": "varchar(256)",
148
+ "primaryKey": false,
149
+ "notNull": true
150
+ },
151
+ "agent_id": {
152
+ "name": "agent_id",
153
+ "type": "varchar(256)",
154
+ "primaryKey": false,
155
+ "notNull": true
156
+ },
157
+ "public_id": {
158
+ "name": "public_id",
159
+ "type": "varchar(256)",
160
+ "primaryKey": false,
161
+ "notNull": true
162
+ },
163
+ "key_hash": {
164
+ "name": "key_hash",
165
+ "type": "varchar(256)",
166
+ "primaryKey": false,
167
+ "notNull": true
168
+ },
169
+ "key_prefix": {
170
+ "name": "key_prefix",
171
+ "type": "varchar(256)",
172
+ "primaryKey": false,
173
+ "notNull": true
174
+ },
175
+ "name": {
176
+ "name": "name",
177
+ "type": "varchar(256)",
178
+ "primaryKey": false,
179
+ "notNull": false
180
+ },
181
+ "last_used_at": {
182
+ "name": "last_used_at",
183
+ "type": "timestamp",
184
+ "primaryKey": false,
185
+ "notNull": false
186
+ },
187
+ "expires_at": {
188
+ "name": "expires_at",
189
+ "type": "timestamp",
190
+ "primaryKey": false,
191
+ "notNull": false
192
+ },
193
+ "created_at": {
194
+ "name": "created_at",
195
+ "type": "timestamp",
196
+ "primaryKey": false,
197
+ "notNull": true,
198
+ "default": "now()"
199
+ },
200
+ "updated_at": {
201
+ "name": "updated_at",
202
+ "type": "timestamp",
203
+ "primaryKey": false,
204
+ "notNull": true,
205
+ "default": "now()"
206
+ }
207
+ },
208
+ "indexes": {
209
+ "api_keys_tenant_agent_idx": {
210
+ "name": "api_keys_tenant_agent_idx",
211
+ "columns": [
212
+ {
213
+ "expression": "tenant_id",
214
+ "isExpression": false,
215
+ "asc": true,
216
+ "nulls": "last"
217
+ },
218
+ {
219
+ "expression": "agent_id",
220
+ "isExpression": false,
221
+ "asc": true,
222
+ "nulls": "last"
223
+ }
224
+ ],
225
+ "isUnique": false,
226
+ "concurrently": false,
227
+ "method": "btree",
228
+ "with": {}
229
+ },
230
+ "api_keys_prefix_idx": {
231
+ "name": "api_keys_prefix_idx",
232
+ "columns": [
233
+ {
234
+ "expression": "key_prefix",
235
+ "isExpression": false,
236
+ "asc": true,
237
+ "nulls": "last"
238
+ }
239
+ ],
240
+ "isUnique": false,
241
+ "concurrently": false,
242
+ "method": "btree",
243
+ "with": {}
244
+ },
245
+ "api_keys_public_id_idx": {
246
+ "name": "api_keys_public_id_idx",
247
+ "columns": [
248
+ {
249
+ "expression": "public_id",
250
+ "isExpression": false,
251
+ "asc": true,
252
+ "nulls": "last"
253
+ }
254
+ ],
255
+ "isUnique": false,
256
+ "concurrently": false,
257
+ "method": "btree",
258
+ "with": {}
259
+ }
260
+ },
261
+ "foreignKeys": {
262
+ "api_keys_organization_fk": {
263
+ "name": "api_keys_organization_fk",
264
+ "tableFrom": "api_keys",
265
+ "tableTo": "organization",
266
+ "columnsFrom": [
267
+ "tenant_id"
268
+ ],
269
+ "columnsTo": [
270
+ "id"
271
+ ],
272
+ "onDelete": "cascade",
273
+ "onUpdate": "no action"
274
+ }
275
+ },
276
+ "compositePrimaryKeys": {},
277
+ "uniqueConstraints": {
278
+ "api_keys_public_id_unique": {
279
+ "name": "api_keys_public_id_unique",
280
+ "nullsNotDistinct": false,
281
+ "columns": [
282
+ "public_id"
283
+ ]
284
+ }
285
+ },
286
+ "policies": {},
287
+ "checkConstraints": {},
288
+ "isRLSEnabled": false
289
+ },
290
+ "public.context_cache": {
291
+ "name": "context_cache",
292
+ "schema": "",
293
+ "columns": {
294
+ "tenant_id": {
295
+ "name": "tenant_id",
296
+ "type": "varchar(256)",
297
+ "primaryKey": false,
298
+ "notNull": true
299
+ },
300
+ "id": {
301
+ "name": "id",
302
+ "type": "varchar(256)",
303
+ "primaryKey": false,
304
+ "notNull": true
305
+ },
306
+ "project_id": {
307
+ "name": "project_id",
308
+ "type": "varchar(256)",
309
+ "primaryKey": false,
310
+ "notNull": true
311
+ },
312
+ "conversation_id": {
313
+ "name": "conversation_id",
314
+ "type": "varchar(256)",
315
+ "primaryKey": false,
316
+ "notNull": true
317
+ },
318
+ "context_config_id": {
319
+ "name": "context_config_id",
320
+ "type": "varchar(256)",
321
+ "primaryKey": false,
322
+ "notNull": true
323
+ },
324
+ "context_variable_key": {
325
+ "name": "context_variable_key",
326
+ "type": "varchar(256)",
327
+ "primaryKey": false,
328
+ "notNull": true
329
+ },
330
+ "ref": {
331
+ "name": "ref",
332
+ "type": "jsonb",
333
+ "primaryKey": false,
334
+ "notNull": false
335
+ },
336
+ "value": {
337
+ "name": "value",
338
+ "type": "jsonb",
339
+ "primaryKey": false,
340
+ "notNull": true
341
+ },
342
+ "request_hash": {
343
+ "name": "request_hash",
344
+ "type": "varchar(256)",
345
+ "primaryKey": false,
346
+ "notNull": false
347
+ },
348
+ "fetched_at": {
349
+ "name": "fetched_at",
350
+ "type": "timestamp",
351
+ "primaryKey": false,
352
+ "notNull": true,
353
+ "default": "now()"
354
+ },
355
+ "fetch_source": {
356
+ "name": "fetch_source",
357
+ "type": "varchar(256)",
358
+ "primaryKey": false,
359
+ "notNull": false
360
+ },
361
+ "created_at": {
362
+ "name": "created_at",
363
+ "type": "timestamp",
364
+ "primaryKey": false,
365
+ "notNull": true,
366
+ "default": "now()"
367
+ },
368
+ "updated_at": {
369
+ "name": "updated_at",
370
+ "type": "timestamp",
371
+ "primaryKey": false,
372
+ "notNull": true,
373
+ "default": "now()"
374
+ }
375
+ },
376
+ "indexes": {
377
+ "context_cache_lookup_idx": {
378
+ "name": "context_cache_lookup_idx",
379
+ "columns": [
380
+ {
381
+ "expression": "conversation_id",
382
+ "isExpression": false,
383
+ "asc": true,
384
+ "nulls": "last"
385
+ },
386
+ {
387
+ "expression": "context_config_id",
388
+ "isExpression": false,
389
+ "asc": true,
390
+ "nulls": "last"
391
+ },
392
+ {
393
+ "expression": "context_variable_key",
394
+ "isExpression": false,
395
+ "asc": true,
396
+ "nulls": "last"
397
+ }
398
+ ],
399
+ "isUnique": false,
400
+ "concurrently": false,
401
+ "method": "btree",
402
+ "with": {}
403
+ }
404
+ },
405
+ "foreignKeys": {
406
+ "context_cache_conversation_fk": {
407
+ "name": "context_cache_conversation_fk",
408
+ "tableFrom": "context_cache",
409
+ "tableTo": "conversations",
410
+ "columnsFrom": [
411
+ "tenant_id",
412
+ "project_id",
413
+ "conversation_id"
414
+ ],
415
+ "columnsTo": [
416
+ "tenant_id",
417
+ "project_id",
418
+ "id"
419
+ ],
420
+ "onDelete": "cascade",
421
+ "onUpdate": "no action"
422
+ }
423
+ },
424
+ "compositePrimaryKeys": {
425
+ "context_cache_tenant_id_project_id_id_pk": {
426
+ "name": "context_cache_tenant_id_project_id_id_pk",
427
+ "columns": [
428
+ "tenant_id",
429
+ "project_id",
430
+ "id"
431
+ ]
432
+ }
433
+ },
434
+ "uniqueConstraints": {},
435
+ "policies": {},
436
+ "checkConstraints": {},
437
+ "isRLSEnabled": false
438
+ },
439
+ "public.conversations": {
440
+ "name": "conversations",
441
+ "schema": "",
442
+ "columns": {
443
+ "tenant_id": {
444
+ "name": "tenant_id",
445
+ "type": "varchar(256)",
446
+ "primaryKey": false,
447
+ "notNull": true
448
+ },
449
+ "id": {
450
+ "name": "id",
451
+ "type": "varchar(256)",
452
+ "primaryKey": false,
453
+ "notNull": true
454
+ },
455
+ "project_id": {
456
+ "name": "project_id",
457
+ "type": "varchar(256)",
458
+ "primaryKey": false,
459
+ "notNull": true
460
+ },
461
+ "user_id": {
462
+ "name": "user_id",
463
+ "type": "varchar(256)",
464
+ "primaryKey": false,
465
+ "notNull": false
466
+ },
467
+ "agent_id": {
468
+ "name": "agent_id",
469
+ "type": "varchar(256)",
470
+ "primaryKey": false,
471
+ "notNull": false
472
+ },
473
+ "active_sub_agent_id": {
474
+ "name": "active_sub_agent_id",
475
+ "type": "varchar(256)",
476
+ "primaryKey": false,
477
+ "notNull": true
478
+ },
479
+ "ref": {
480
+ "name": "ref",
481
+ "type": "jsonb",
482
+ "primaryKey": false,
483
+ "notNull": false
484
+ },
485
+ "title": {
486
+ "name": "title",
487
+ "type": "text",
488
+ "primaryKey": false,
489
+ "notNull": false
490
+ },
491
+ "last_context_resolution": {
492
+ "name": "last_context_resolution",
493
+ "type": "timestamp",
494
+ "primaryKey": false,
495
+ "notNull": false
496
+ },
497
+ "metadata": {
498
+ "name": "metadata",
499
+ "type": "jsonb",
500
+ "primaryKey": false,
501
+ "notNull": false
502
+ },
503
+ "created_at": {
504
+ "name": "created_at",
505
+ "type": "timestamp",
506
+ "primaryKey": false,
507
+ "notNull": true,
508
+ "default": "now()"
509
+ },
510
+ "updated_at": {
511
+ "name": "updated_at",
512
+ "type": "timestamp",
513
+ "primaryKey": false,
514
+ "notNull": true,
515
+ "default": "now()"
516
+ }
517
+ },
518
+ "indexes": {},
519
+ "foreignKeys": {},
520
+ "compositePrimaryKeys": {
521
+ "conversations_tenant_id_project_id_id_pk": {
522
+ "name": "conversations_tenant_id_project_id_id_pk",
523
+ "columns": [
524
+ "tenant_id",
525
+ "project_id",
526
+ "id"
527
+ ]
528
+ }
529
+ },
530
+ "uniqueConstraints": {},
531
+ "policies": {},
532
+ "checkConstraints": {},
533
+ "isRLSEnabled": false
534
+ },
535
+ "public.dataset_run": {
536
+ "name": "dataset_run",
537
+ "schema": "",
538
+ "columns": {
539
+ "tenant_id": {
540
+ "name": "tenant_id",
541
+ "type": "varchar(256)",
542
+ "primaryKey": false,
543
+ "notNull": true
544
+ },
545
+ "id": {
546
+ "name": "id",
547
+ "type": "varchar(256)",
548
+ "primaryKey": false,
549
+ "notNull": true
550
+ },
551
+ "project_id": {
552
+ "name": "project_id",
553
+ "type": "varchar(256)",
554
+ "primaryKey": false,
555
+ "notNull": true
556
+ },
557
+ "dataset_id": {
558
+ "name": "dataset_id",
559
+ "type": "text",
560
+ "primaryKey": false,
561
+ "notNull": true
562
+ },
563
+ "dataset_run_config_id": {
564
+ "name": "dataset_run_config_id",
565
+ "type": "text",
566
+ "primaryKey": false,
567
+ "notNull": false
568
+ },
569
+ "evaluation_job_config_id": {
570
+ "name": "evaluation_job_config_id",
571
+ "type": "text",
572
+ "primaryKey": false,
573
+ "notNull": false
574
+ },
575
+ "created_at": {
576
+ "name": "created_at",
577
+ "type": "timestamp",
578
+ "primaryKey": false,
579
+ "notNull": true,
580
+ "default": "now()"
581
+ },
582
+ "updated_at": {
583
+ "name": "updated_at",
584
+ "type": "timestamp",
585
+ "primaryKey": false,
586
+ "notNull": true,
587
+ "default": "now()"
588
+ }
589
+ },
590
+ "indexes": {},
591
+ "foreignKeys": {},
592
+ "compositePrimaryKeys": {
593
+ "dataset_run_tenant_id_project_id_id_pk": {
594
+ "name": "dataset_run_tenant_id_project_id_id_pk",
595
+ "columns": [
596
+ "tenant_id",
597
+ "project_id",
598
+ "id"
599
+ ]
600
+ }
601
+ },
602
+ "uniqueConstraints": {},
603
+ "policies": {},
604
+ "checkConstraints": {},
605
+ "isRLSEnabled": false
606
+ },
607
+ "public.dataset_run_conversation_relations": {
608
+ "name": "dataset_run_conversation_relations",
609
+ "schema": "",
610
+ "columns": {
611
+ "tenant_id": {
612
+ "name": "tenant_id",
613
+ "type": "varchar(256)",
614
+ "primaryKey": false,
615
+ "notNull": true
616
+ },
617
+ "id": {
618
+ "name": "id",
619
+ "type": "varchar(256)",
620
+ "primaryKey": false,
621
+ "notNull": true
622
+ },
623
+ "project_id": {
624
+ "name": "project_id",
625
+ "type": "varchar(256)",
626
+ "primaryKey": false,
627
+ "notNull": true
628
+ },
629
+ "dataset_run_id": {
630
+ "name": "dataset_run_id",
631
+ "type": "text",
632
+ "primaryKey": false,
633
+ "notNull": true
634
+ },
635
+ "conversation_id": {
636
+ "name": "conversation_id",
637
+ "type": "text",
638
+ "primaryKey": false,
639
+ "notNull": true
640
+ },
641
+ "dataset_item_id": {
642
+ "name": "dataset_item_id",
643
+ "type": "text",
644
+ "primaryKey": false,
645
+ "notNull": true
646
+ },
647
+ "created_at": {
648
+ "name": "created_at",
649
+ "type": "timestamp",
650
+ "primaryKey": false,
651
+ "notNull": true,
652
+ "default": "now()"
653
+ },
654
+ "updated_at": {
655
+ "name": "updated_at",
656
+ "type": "timestamp",
657
+ "primaryKey": false,
658
+ "notNull": true,
659
+ "default": "now()"
660
+ }
661
+ },
662
+ "indexes": {},
663
+ "foreignKeys": {
664
+ "dataset_run_conversation_relations_run_fk": {
665
+ "name": "dataset_run_conversation_relations_run_fk",
666
+ "tableFrom": "dataset_run_conversation_relations",
667
+ "tableTo": "dataset_run",
668
+ "columnsFrom": [
669
+ "tenant_id",
670
+ "project_id",
671
+ "dataset_run_id"
672
+ ],
673
+ "columnsTo": [
674
+ "tenant_id",
675
+ "project_id",
676
+ "id"
677
+ ],
678
+ "onDelete": "cascade",
679
+ "onUpdate": "no action"
680
+ },
681
+ "dataset_run_conversation_relations_conversation_fk": {
682
+ "name": "dataset_run_conversation_relations_conversation_fk",
683
+ "tableFrom": "dataset_run_conversation_relations",
684
+ "tableTo": "conversations",
685
+ "columnsFrom": [
686
+ "tenant_id",
687
+ "project_id",
688
+ "conversation_id"
689
+ ],
690
+ "columnsTo": [
691
+ "tenant_id",
692
+ "project_id",
693
+ "id"
694
+ ],
695
+ "onDelete": "cascade",
696
+ "onUpdate": "no action"
697
+ }
698
+ },
699
+ "compositePrimaryKeys": {
700
+ "dataset_run_conversation_relations_tenant_id_project_id_id_pk": {
701
+ "name": "dataset_run_conversation_relations_tenant_id_project_id_id_pk",
702
+ "columns": [
703
+ "tenant_id",
704
+ "project_id",
705
+ "id"
706
+ ]
707
+ }
708
+ },
709
+ "uniqueConstraints": {
710
+ "dataset_run_conversation_relations_unique": {
711
+ "name": "dataset_run_conversation_relations_unique",
712
+ "nullsNotDistinct": false,
713
+ "columns": [
714
+ "dataset_run_id",
715
+ "conversation_id"
716
+ ]
717
+ }
718
+ },
719
+ "policies": {},
720
+ "checkConstraints": {},
721
+ "isRLSEnabled": false
722
+ },
723
+ "public.device_code": {
724
+ "name": "device_code",
725
+ "schema": "",
726
+ "columns": {
727
+ "id": {
728
+ "name": "id",
729
+ "type": "text",
730
+ "primaryKey": true,
731
+ "notNull": true
732
+ },
733
+ "device_code": {
734
+ "name": "device_code",
735
+ "type": "text",
736
+ "primaryKey": false,
737
+ "notNull": true
738
+ },
739
+ "user_code": {
740
+ "name": "user_code",
741
+ "type": "text",
742
+ "primaryKey": false,
743
+ "notNull": true
744
+ },
745
+ "user_id": {
746
+ "name": "user_id",
747
+ "type": "text",
748
+ "primaryKey": false,
749
+ "notNull": false
750
+ },
751
+ "expires_at": {
752
+ "name": "expires_at",
753
+ "type": "timestamp",
754
+ "primaryKey": false,
755
+ "notNull": true
756
+ },
757
+ "status": {
758
+ "name": "status",
759
+ "type": "text",
760
+ "primaryKey": false,
761
+ "notNull": true
762
+ },
763
+ "last_polled_at": {
764
+ "name": "last_polled_at",
765
+ "type": "timestamp",
766
+ "primaryKey": false,
767
+ "notNull": false
768
+ },
769
+ "polling_interval": {
770
+ "name": "polling_interval",
771
+ "type": "integer",
772
+ "primaryKey": false,
773
+ "notNull": false
774
+ },
775
+ "client_id": {
776
+ "name": "client_id",
777
+ "type": "text",
778
+ "primaryKey": false,
779
+ "notNull": false
780
+ },
781
+ "scope": {
782
+ "name": "scope",
783
+ "type": "text",
784
+ "primaryKey": false,
785
+ "notNull": false
786
+ }
787
+ },
788
+ "indexes": {},
789
+ "foreignKeys": {},
790
+ "compositePrimaryKeys": {},
791
+ "uniqueConstraints": {},
792
+ "policies": {},
793
+ "checkConstraints": {},
794
+ "isRLSEnabled": false
795
+ },
796
+ "public.evaluation_result": {
797
+ "name": "evaluation_result",
798
+ "schema": "",
799
+ "columns": {
800
+ "tenant_id": {
801
+ "name": "tenant_id",
802
+ "type": "varchar(256)",
803
+ "primaryKey": false,
804
+ "notNull": true
805
+ },
806
+ "id": {
807
+ "name": "id",
808
+ "type": "varchar(256)",
809
+ "primaryKey": false,
810
+ "notNull": true
811
+ },
812
+ "project_id": {
813
+ "name": "project_id",
814
+ "type": "varchar(256)",
815
+ "primaryKey": false,
816
+ "notNull": true
817
+ },
818
+ "conversation_id": {
819
+ "name": "conversation_id",
820
+ "type": "text",
821
+ "primaryKey": false,
822
+ "notNull": true
823
+ },
824
+ "evaluator_id": {
825
+ "name": "evaluator_id",
826
+ "type": "text",
827
+ "primaryKey": false,
828
+ "notNull": true
829
+ },
830
+ "evaluation_run_id": {
831
+ "name": "evaluation_run_id",
832
+ "type": "text",
833
+ "primaryKey": false,
834
+ "notNull": false
835
+ },
836
+ "output": {
837
+ "name": "output",
838
+ "type": "jsonb",
839
+ "primaryKey": false,
840
+ "notNull": false
841
+ },
842
+ "created_at": {
843
+ "name": "created_at",
844
+ "type": "timestamp",
845
+ "primaryKey": false,
846
+ "notNull": true,
847
+ "default": "now()"
848
+ },
849
+ "updated_at": {
850
+ "name": "updated_at",
851
+ "type": "timestamp",
852
+ "primaryKey": false,
853
+ "notNull": true,
854
+ "default": "now()"
855
+ }
856
+ },
857
+ "indexes": {},
858
+ "foreignKeys": {
859
+ "evaluation_result_conversation_fk": {
860
+ "name": "evaluation_result_conversation_fk",
861
+ "tableFrom": "evaluation_result",
862
+ "tableTo": "conversations",
863
+ "columnsFrom": [
864
+ "tenant_id",
865
+ "project_id",
866
+ "conversation_id"
867
+ ],
868
+ "columnsTo": [
869
+ "tenant_id",
870
+ "project_id",
871
+ "id"
872
+ ],
873
+ "onDelete": "cascade",
874
+ "onUpdate": "no action"
875
+ },
876
+ "evaluation_result_evaluation_run_fk": {
877
+ "name": "evaluation_result_evaluation_run_fk",
878
+ "tableFrom": "evaluation_result",
879
+ "tableTo": "evaluation_run",
880
+ "columnsFrom": [
881
+ "tenant_id",
882
+ "project_id",
883
+ "evaluation_run_id"
884
+ ],
885
+ "columnsTo": [
886
+ "tenant_id",
887
+ "project_id",
888
+ "id"
889
+ ],
890
+ "onDelete": "cascade",
891
+ "onUpdate": "no action"
892
+ }
893
+ },
894
+ "compositePrimaryKeys": {
895
+ "evaluation_result_tenant_id_project_id_id_pk": {
896
+ "name": "evaluation_result_tenant_id_project_id_id_pk",
897
+ "columns": [
898
+ "tenant_id",
899
+ "project_id",
900
+ "id"
901
+ ]
902
+ }
903
+ },
904
+ "uniqueConstraints": {},
905
+ "policies": {},
906
+ "checkConstraints": {},
907
+ "isRLSEnabled": false
908
+ },
909
+ "public.evaluation_run": {
910
+ "name": "evaluation_run",
911
+ "schema": "",
912
+ "columns": {
913
+ "tenant_id": {
914
+ "name": "tenant_id",
915
+ "type": "varchar(256)",
916
+ "primaryKey": false,
917
+ "notNull": true
918
+ },
919
+ "id": {
920
+ "name": "id",
921
+ "type": "varchar(256)",
922
+ "primaryKey": false,
923
+ "notNull": true
924
+ },
925
+ "project_id": {
926
+ "name": "project_id",
927
+ "type": "varchar(256)",
928
+ "primaryKey": false,
929
+ "notNull": true
930
+ },
931
+ "evaluation_job_config_id": {
932
+ "name": "evaluation_job_config_id",
933
+ "type": "text",
934
+ "primaryKey": false,
935
+ "notNull": false
936
+ },
937
+ "evaluation_run_config_id": {
938
+ "name": "evaluation_run_config_id",
939
+ "type": "text",
940
+ "primaryKey": false,
941
+ "notNull": false
942
+ },
943
+ "created_at": {
944
+ "name": "created_at",
945
+ "type": "timestamp",
946
+ "primaryKey": false,
947
+ "notNull": true,
948
+ "default": "now()"
949
+ },
950
+ "updated_at": {
951
+ "name": "updated_at",
952
+ "type": "timestamp",
953
+ "primaryKey": false,
954
+ "notNull": true,
955
+ "default": "now()"
956
+ }
957
+ },
958
+ "indexes": {},
959
+ "foreignKeys": {},
960
+ "compositePrimaryKeys": {
961
+ "evaluation_run_tenant_id_project_id_id_pk": {
962
+ "name": "evaluation_run_tenant_id_project_id_id_pk",
963
+ "columns": [
964
+ "tenant_id",
965
+ "project_id",
966
+ "id"
967
+ ]
968
+ }
969
+ },
970
+ "uniqueConstraints": {},
971
+ "policies": {},
972
+ "checkConstraints": {},
973
+ "isRLSEnabled": false
974
+ },
975
+ "public.invitation": {
976
+ "name": "invitation",
977
+ "schema": "",
978
+ "columns": {
979
+ "id": {
980
+ "name": "id",
981
+ "type": "text",
982
+ "primaryKey": true,
983
+ "notNull": true
984
+ },
985
+ "organization_id": {
986
+ "name": "organization_id",
987
+ "type": "text",
988
+ "primaryKey": false,
989
+ "notNull": true
990
+ },
991
+ "email": {
992
+ "name": "email",
993
+ "type": "text",
994
+ "primaryKey": false,
995
+ "notNull": true
996
+ },
997
+ "role": {
998
+ "name": "role",
999
+ "type": "text",
1000
+ "primaryKey": false,
1001
+ "notNull": false
1002
+ },
1003
+ "status": {
1004
+ "name": "status",
1005
+ "type": "text",
1006
+ "primaryKey": false,
1007
+ "notNull": true,
1008
+ "default": "'pending'"
1009
+ },
1010
+ "expires_at": {
1011
+ "name": "expires_at",
1012
+ "type": "timestamp",
1013
+ "primaryKey": false,
1014
+ "notNull": true
1015
+ },
1016
+ "created_at": {
1017
+ "name": "created_at",
1018
+ "type": "timestamp",
1019
+ "primaryKey": false,
1020
+ "notNull": true,
1021
+ "default": "now()"
1022
+ },
1023
+ "inviter_id": {
1024
+ "name": "inviter_id",
1025
+ "type": "text",
1026
+ "primaryKey": false,
1027
+ "notNull": true
1028
+ }
1029
+ },
1030
+ "indexes": {
1031
+ "invitation_organizationId_idx": {
1032
+ "name": "invitation_organizationId_idx",
1033
+ "columns": [
1034
+ {
1035
+ "expression": "organization_id",
1036
+ "isExpression": false,
1037
+ "asc": true,
1038
+ "nulls": "last"
1039
+ }
1040
+ ],
1041
+ "isUnique": false,
1042
+ "concurrently": false,
1043
+ "method": "btree",
1044
+ "with": {}
1045
+ },
1046
+ "invitation_email_idx": {
1047
+ "name": "invitation_email_idx",
1048
+ "columns": [
1049
+ {
1050
+ "expression": "email",
1051
+ "isExpression": false,
1052
+ "asc": true,
1053
+ "nulls": "last"
1054
+ }
1055
+ ],
1056
+ "isUnique": false,
1057
+ "concurrently": false,
1058
+ "method": "btree",
1059
+ "with": {}
1060
+ }
1061
+ },
1062
+ "foreignKeys": {
1063
+ "invitation_organization_id_organization_id_fk": {
1064
+ "name": "invitation_organization_id_organization_id_fk",
1065
+ "tableFrom": "invitation",
1066
+ "tableTo": "organization",
1067
+ "columnsFrom": [
1068
+ "organization_id"
1069
+ ],
1070
+ "columnsTo": [
1071
+ "id"
1072
+ ],
1073
+ "onDelete": "cascade",
1074
+ "onUpdate": "no action"
1075
+ },
1076
+ "invitation_inviter_id_user_id_fk": {
1077
+ "name": "invitation_inviter_id_user_id_fk",
1078
+ "tableFrom": "invitation",
1079
+ "tableTo": "user",
1080
+ "columnsFrom": [
1081
+ "inviter_id"
1082
+ ],
1083
+ "columnsTo": [
1084
+ "id"
1085
+ ],
1086
+ "onDelete": "cascade",
1087
+ "onUpdate": "no action"
1088
+ }
1089
+ },
1090
+ "compositePrimaryKeys": {},
1091
+ "uniqueConstraints": {},
1092
+ "policies": {},
1093
+ "checkConstraints": {},
1094
+ "isRLSEnabled": false
1095
+ },
1096
+ "public.ledger_artifacts": {
1097
+ "name": "ledger_artifacts",
1098
+ "schema": "",
1099
+ "columns": {
1100
+ "tenant_id": {
1101
+ "name": "tenant_id",
1102
+ "type": "varchar(256)",
1103
+ "primaryKey": false,
1104
+ "notNull": true
1105
+ },
1106
+ "id": {
1107
+ "name": "id",
1108
+ "type": "varchar(256)",
1109
+ "primaryKey": false,
1110
+ "notNull": true
1111
+ },
1112
+ "project_id": {
1113
+ "name": "project_id",
1114
+ "type": "varchar(256)",
1115
+ "primaryKey": false,
1116
+ "notNull": true
1117
+ },
1118
+ "task_id": {
1119
+ "name": "task_id",
1120
+ "type": "varchar(256)",
1121
+ "primaryKey": false,
1122
+ "notNull": true
1123
+ },
1124
+ "tool_call_id": {
1125
+ "name": "tool_call_id",
1126
+ "type": "varchar(256)",
1127
+ "primaryKey": false,
1128
+ "notNull": false
1129
+ },
1130
+ "context_id": {
1131
+ "name": "context_id",
1132
+ "type": "varchar(256)",
1133
+ "primaryKey": false,
1134
+ "notNull": true
1135
+ },
1136
+ "type": {
1137
+ "name": "type",
1138
+ "type": "varchar(256)",
1139
+ "primaryKey": false,
1140
+ "notNull": true,
1141
+ "default": "'source'"
1142
+ },
1143
+ "name": {
1144
+ "name": "name",
1145
+ "type": "varchar(256)",
1146
+ "primaryKey": false,
1147
+ "notNull": false
1148
+ },
1149
+ "description": {
1150
+ "name": "description",
1151
+ "type": "text",
1152
+ "primaryKey": false,
1153
+ "notNull": false
1154
+ },
1155
+ "parts": {
1156
+ "name": "parts",
1157
+ "type": "jsonb",
1158
+ "primaryKey": false,
1159
+ "notNull": false
1160
+ },
1161
+ "metadata": {
1162
+ "name": "metadata",
1163
+ "type": "jsonb",
1164
+ "primaryKey": false,
1165
+ "notNull": false
1166
+ },
1167
+ "summary": {
1168
+ "name": "summary",
1169
+ "type": "text",
1170
+ "primaryKey": false,
1171
+ "notNull": false
1172
+ },
1173
+ "mime": {
1174
+ "name": "mime",
1175
+ "type": "jsonb",
1176
+ "primaryKey": false,
1177
+ "notNull": false
1178
+ },
1179
+ "visibility": {
1180
+ "name": "visibility",
1181
+ "type": "varchar(256)",
1182
+ "primaryKey": false,
1183
+ "notNull": false,
1184
+ "default": "'context'"
1185
+ },
1186
+ "allowed_agents": {
1187
+ "name": "allowed_agents",
1188
+ "type": "jsonb",
1189
+ "primaryKey": false,
1190
+ "notNull": false
1191
+ },
1192
+ "derived_from": {
1193
+ "name": "derived_from",
1194
+ "type": "varchar(256)",
1195
+ "primaryKey": false,
1196
+ "notNull": false
1197
+ },
1198
+ "created_at": {
1199
+ "name": "created_at",
1200
+ "type": "timestamp",
1201
+ "primaryKey": false,
1202
+ "notNull": true,
1203
+ "default": "now()"
1204
+ },
1205
+ "updated_at": {
1206
+ "name": "updated_at",
1207
+ "type": "timestamp",
1208
+ "primaryKey": false,
1209
+ "notNull": true,
1210
+ "default": "now()"
1211
+ }
1212
+ },
1213
+ "indexes": {
1214
+ "ledger_artifacts_task_id_idx": {
1215
+ "name": "ledger_artifacts_task_id_idx",
1216
+ "columns": [
1217
+ {
1218
+ "expression": "task_id",
1219
+ "isExpression": false,
1220
+ "asc": true,
1221
+ "nulls": "last"
1222
+ }
1223
+ ],
1224
+ "isUnique": false,
1225
+ "concurrently": false,
1226
+ "method": "btree",
1227
+ "with": {}
1228
+ },
1229
+ "ledger_artifacts_tool_call_id_idx": {
1230
+ "name": "ledger_artifacts_tool_call_id_idx",
1231
+ "columns": [
1232
+ {
1233
+ "expression": "tool_call_id",
1234
+ "isExpression": false,
1235
+ "asc": true,
1236
+ "nulls": "last"
1237
+ }
1238
+ ],
1239
+ "isUnique": false,
1240
+ "concurrently": false,
1241
+ "method": "btree",
1242
+ "with": {}
1243
+ },
1244
+ "ledger_artifacts_context_id_idx": {
1245
+ "name": "ledger_artifacts_context_id_idx",
1246
+ "columns": [
1247
+ {
1248
+ "expression": "context_id",
1249
+ "isExpression": false,
1250
+ "asc": true,
1251
+ "nulls": "last"
1252
+ }
1253
+ ],
1254
+ "isUnique": false,
1255
+ "concurrently": false,
1256
+ "method": "btree",
1257
+ "with": {}
1258
+ }
1259
+ },
1260
+ "foreignKeys": {
1261
+ "ledger_artifacts_conversation_fk": {
1262
+ "name": "ledger_artifacts_conversation_fk",
1263
+ "tableFrom": "ledger_artifacts",
1264
+ "tableTo": "conversations",
1265
+ "columnsFrom": [
1266
+ "tenant_id",
1267
+ "project_id",
1268
+ "context_id"
1269
+ ],
1270
+ "columnsTo": [
1271
+ "tenant_id",
1272
+ "project_id",
1273
+ "id"
1274
+ ],
1275
+ "onDelete": "cascade",
1276
+ "onUpdate": "no action"
1277
+ }
1278
+ },
1279
+ "compositePrimaryKeys": {
1280
+ "ledger_artifacts_tenant_id_project_id_id_task_id_pk": {
1281
+ "name": "ledger_artifacts_tenant_id_project_id_id_task_id_pk",
1282
+ "columns": [
1283
+ "tenant_id",
1284
+ "project_id",
1285
+ "id",
1286
+ "task_id"
1287
+ ]
1288
+ }
1289
+ },
1290
+ "uniqueConstraints": {
1291
+ "ledger_artifacts_task_context_name_unique": {
1292
+ "name": "ledger_artifacts_task_context_name_unique",
1293
+ "nullsNotDistinct": false,
1294
+ "columns": [
1295
+ "task_id",
1296
+ "context_id",
1297
+ "name"
1298
+ ]
1299
+ }
1300
+ },
1301
+ "policies": {},
1302
+ "checkConstraints": {},
1303
+ "isRLSEnabled": false
1304
+ },
1305
+ "public.member": {
1306
+ "name": "member",
1307
+ "schema": "",
1308
+ "columns": {
1309
+ "id": {
1310
+ "name": "id",
1311
+ "type": "text",
1312
+ "primaryKey": true,
1313
+ "notNull": true
1314
+ },
1315
+ "organization_id": {
1316
+ "name": "organization_id",
1317
+ "type": "text",
1318
+ "primaryKey": false,
1319
+ "notNull": true
1320
+ },
1321
+ "user_id": {
1322
+ "name": "user_id",
1323
+ "type": "text",
1324
+ "primaryKey": false,
1325
+ "notNull": true
1326
+ },
1327
+ "role": {
1328
+ "name": "role",
1329
+ "type": "text",
1330
+ "primaryKey": false,
1331
+ "notNull": true,
1332
+ "default": "'member'"
1333
+ },
1334
+ "created_at": {
1335
+ "name": "created_at",
1336
+ "type": "timestamp",
1337
+ "primaryKey": false,
1338
+ "notNull": true
1339
+ }
1340
+ },
1341
+ "indexes": {
1342
+ "member_organizationId_idx": {
1343
+ "name": "member_organizationId_idx",
1344
+ "columns": [
1345
+ {
1346
+ "expression": "organization_id",
1347
+ "isExpression": false,
1348
+ "asc": true,
1349
+ "nulls": "last"
1350
+ }
1351
+ ],
1352
+ "isUnique": false,
1353
+ "concurrently": false,
1354
+ "method": "btree",
1355
+ "with": {}
1356
+ },
1357
+ "member_userId_idx": {
1358
+ "name": "member_userId_idx",
1359
+ "columns": [
1360
+ {
1361
+ "expression": "user_id",
1362
+ "isExpression": false,
1363
+ "asc": true,
1364
+ "nulls": "last"
1365
+ }
1366
+ ],
1367
+ "isUnique": false,
1368
+ "concurrently": false,
1369
+ "method": "btree",
1370
+ "with": {}
1371
+ }
1372
+ },
1373
+ "foreignKeys": {
1374
+ "member_organization_id_organization_id_fk": {
1375
+ "name": "member_organization_id_organization_id_fk",
1376
+ "tableFrom": "member",
1377
+ "tableTo": "organization",
1378
+ "columnsFrom": [
1379
+ "organization_id"
1380
+ ],
1381
+ "columnsTo": [
1382
+ "id"
1383
+ ],
1384
+ "onDelete": "cascade",
1385
+ "onUpdate": "no action"
1386
+ },
1387
+ "member_user_id_user_id_fk": {
1388
+ "name": "member_user_id_user_id_fk",
1389
+ "tableFrom": "member",
1390
+ "tableTo": "user",
1391
+ "columnsFrom": [
1392
+ "user_id"
1393
+ ],
1394
+ "columnsTo": [
1395
+ "id"
1396
+ ],
1397
+ "onDelete": "cascade",
1398
+ "onUpdate": "no action"
1399
+ }
1400
+ },
1401
+ "compositePrimaryKeys": {},
1402
+ "uniqueConstraints": {},
1403
+ "policies": {},
1404
+ "checkConstraints": {},
1405
+ "isRLSEnabled": false
1406
+ },
1407
+ "public.messages": {
1408
+ "name": "messages",
1409
+ "schema": "",
1410
+ "columns": {
1411
+ "tenant_id": {
1412
+ "name": "tenant_id",
1413
+ "type": "varchar(256)",
1414
+ "primaryKey": false,
1415
+ "notNull": true
1416
+ },
1417
+ "id": {
1418
+ "name": "id",
1419
+ "type": "varchar(256)",
1420
+ "primaryKey": false,
1421
+ "notNull": true
1422
+ },
1423
+ "project_id": {
1424
+ "name": "project_id",
1425
+ "type": "varchar(256)",
1426
+ "primaryKey": false,
1427
+ "notNull": true
1428
+ },
1429
+ "conversation_id": {
1430
+ "name": "conversation_id",
1431
+ "type": "varchar(256)",
1432
+ "primaryKey": false,
1433
+ "notNull": true
1434
+ },
1435
+ "role": {
1436
+ "name": "role",
1437
+ "type": "varchar(256)",
1438
+ "primaryKey": false,
1439
+ "notNull": true
1440
+ },
1441
+ "from_sub_agent_id": {
1442
+ "name": "from_sub_agent_id",
1443
+ "type": "varchar(256)",
1444
+ "primaryKey": false,
1445
+ "notNull": false
1446
+ },
1447
+ "to_sub_agent_id": {
1448
+ "name": "to_sub_agent_id",
1449
+ "type": "varchar(256)",
1450
+ "primaryKey": false,
1451
+ "notNull": false
1452
+ },
1453
+ "from_external_sub_agent_id": {
1454
+ "name": "from_external_sub_agent_id",
1455
+ "type": "varchar(256)",
1456
+ "primaryKey": false,
1457
+ "notNull": false
1458
+ },
1459
+ "to_external_sub_agent_id": {
1460
+ "name": "to_external_sub_agent_id",
1461
+ "type": "varchar(256)",
1462
+ "primaryKey": false,
1463
+ "notNull": false
1464
+ },
1465
+ "from_team_agent_id": {
1466
+ "name": "from_team_agent_id",
1467
+ "type": "varchar(256)",
1468
+ "primaryKey": false,
1469
+ "notNull": false
1470
+ },
1471
+ "to_team_agent_id": {
1472
+ "name": "to_team_agent_id",
1473
+ "type": "varchar(256)",
1474
+ "primaryKey": false,
1475
+ "notNull": false
1476
+ },
1477
+ "content": {
1478
+ "name": "content",
1479
+ "type": "jsonb",
1480
+ "primaryKey": false,
1481
+ "notNull": true
1482
+ },
1483
+ "visibility": {
1484
+ "name": "visibility",
1485
+ "type": "varchar(256)",
1486
+ "primaryKey": false,
1487
+ "notNull": true,
1488
+ "default": "'user-facing'"
1489
+ },
1490
+ "message_type": {
1491
+ "name": "message_type",
1492
+ "type": "varchar(256)",
1493
+ "primaryKey": false,
1494
+ "notNull": true,
1495
+ "default": "'chat'"
1496
+ },
1497
+ "task_id": {
1498
+ "name": "task_id",
1499
+ "type": "varchar(256)",
1500
+ "primaryKey": false,
1501
+ "notNull": false
1502
+ },
1503
+ "parent_message_id": {
1504
+ "name": "parent_message_id",
1505
+ "type": "varchar(256)",
1506
+ "primaryKey": false,
1507
+ "notNull": false
1508
+ },
1509
+ "a2a_task_id": {
1510
+ "name": "a2a_task_id",
1511
+ "type": "varchar(256)",
1512
+ "primaryKey": false,
1513
+ "notNull": false
1514
+ },
1515
+ "a2a_session_id": {
1516
+ "name": "a2a_session_id",
1517
+ "type": "varchar(256)",
1518
+ "primaryKey": false,
1519
+ "notNull": false
1520
+ },
1521
+ "metadata": {
1522
+ "name": "metadata",
1523
+ "type": "jsonb",
1524
+ "primaryKey": false,
1525
+ "notNull": false
1526
+ },
1527
+ "created_at": {
1528
+ "name": "created_at",
1529
+ "type": "timestamp",
1530
+ "primaryKey": false,
1531
+ "notNull": true,
1532
+ "default": "now()"
1533
+ },
1534
+ "updated_at": {
1535
+ "name": "updated_at",
1536
+ "type": "timestamp",
1537
+ "primaryKey": false,
1538
+ "notNull": true,
1539
+ "default": "now()"
1540
+ }
1541
+ },
1542
+ "indexes": {},
1543
+ "foreignKeys": {
1544
+ "messages_conversation_fk": {
1545
+ "name": "messages_conversation_fk",
1546
+ "tableFrom": "messages",
1547
+ "tableTo": "conversations",
1548
+ "columnsFrom": [
1549
+ "tenant_id",
1550
+ "project_id",
1551
+ "conversation_id"
1552
+ ],
1553
+ "columnsTo": [
1554
+ "tenant_id",
1555
+ "project_id",
1556
+ "id"
1557
+ ],
1558
+ "onDelete": "cascade",
1559
+ "onUpdate": "no action"
1560
+ }
1561
+ },
1562
+ "compositePrimaryKeys": {
1563
+ "messages_tenant_id_project_id_id_pk": {
1564
+ "name": "messages_tenant_id_project_id_id_pk",
1565
+ "columns": [
1566
+ "tenant_id",
1567
+ "project_id",
1568
+ "id"
1569
+ ]
1570
+ }
1571
+ },
1572
+ "uniqueConstraints": {},
1573
+ "policies": {},
1574
+ "checkConstraints": {},
1575
+ "isRLSEnabled": false
1576
+ },
1577
+ "public.organization": {
1578
+ "name": "organization",
1579
+ "schema": "",
1580
+ "columns": {
1581
+ "id": {
1582
+ "name": "id",
1583
+ "type": "text",
1584
+ "primaryKey": true,
1585
+ "notNull": true
1586
+ },
1587
+ "name": {
1588
+ "name": "name",
1589
+ "type": "text",
1590
+ "primaryKey": false,
1591
+ "notNull": true
1592
+ },
1593
+ "slug": {
1594
+ "name": "slug",
1595
+ "type": "text",
1596
+ "primaryKey": false,
1597
+ "notNull": true
1598
+ },
1599
+ "logo": {
1600
+ "name": "logo",
1601
+ "type": "text",
1602
+ "primaryKey": false,
1603
+ "notNull": false
1604
+ },
1605
+ "created_at": {
1606
+ "name": "created_at",
1607
+ "type": "timestamp",
1608
+ "primaryKey": false,
1609
+ "notNull": true
1610
+ },
1611
+ "metadata": {
1612
+ "name": "metadata",
1613
+ "type": "text",
1614
+ "primaryKey": false,
1615
+ "notNull": false
1616
+ }
1617
+ },
1618
+ "indexes": {},
1619
+ "foreignKeys": {},
1620
+ "compositePrimaryKeys": {},
1621
+ "uniqueConstraints": {
1622
+ "organization_slug_unique": {
1623
+ "name": "organization_slug_unique",
1624
+ "nullsNotDistinct": false,
1625
+ "columns": [
1626
+ "slug"
1627
+ ]
1628
+ }
1629
+ },
1630
+ "policies": {},
1631
+ "checkConstraints": {},
1632
+ "isRLSEnabled": false
1633
+ },
1634
+ "public.project_metadata": {
1635
+ "name": "project_metadata",
1636
+ "schema": "",
1637
+ "columns": {
1638
+ "id": {
1639
+ "name": "id",
1640
+ "type": "varchar(256)",
1641
+ "primaryKey": false,
1642
+ "notNull": true
1643
+ },
1644
+ "tenant_id": {
1645
+ "name": "tenant_id",
1646
+ "type": "varchar(256)",
1647
+ "primaryKey": false,
1648
+ "notNull": true
1649
+ },
1650
+ "created_at": {
1651
+ "name": "created_at",
1652
+ "type": "timestamp",
1653
+ "primaryKey": false,
1654
+ "notNull": true,
1655
+ "default": "now()"
1656
+ },
1657
+ "created_by": {
1658
+ "name": "created_by",
1659
+ "type": "varchar(256)",
1660
+ "primaryKey": false,
1661
+ "notNull": false
1662
+ },
1663
+ "main_branch_name": {
1664
+ "name": "main_branch_name",
1665
+ "type": "varchar(512)",
1666
+ "primaryKey": false,
1667
+ "notNull": true
1668
+ }
1669
+ },
1670
+ "indexes": {
1671
+ "project_metadata_tenant_idx": {
1672
+ "name": "project_metadata_tenant_idx",
1673
+ "columns": [
1674
+ {
1675
+ "expression": "tenant_id",
1676
+ "isExpression": false,
1677
+ "asc": true,
1678
+ "nulls": "last"
1679
+ }
1680
+ ],
1681
+ "isUnique": false,
1682
+ "concurrently": false,
1683
+ "method": "btree",
1684
+ "with": {}
1685
+ },
1686
+ "project_metadata_main_branch_idx": {
1687
+ "name": "project_metadata_main_branch_idx",
1688
+ "columns": [
1689
+ {
1690
+ "expression": "main_branch_name",
1691
+ "isExpression": false,
1692
+ "asc": true,
1693
+ "nulls": "last"
1694
+ }
1695
+ ],
1696
+ "isUnique": false,
1697
+ "concurrently": false,
1698
+ "method": "btree",
1699
+ "with": {}
1700
+ }
1701
+ },
1702
+ "foreignKeys": {
1703
+ "project_metadata_organization_fk": {
1704
+ "name": "project_metadata_organization_fk",
1705
+ "tableFrom": "project_metadata",
1706
+ "tableTo": "organization",
1707
+ "columnsFrom": [
1708
+ "tenant_id"
1709
+ ],
1710
+ "columnsTo": [
1711
+ "id"
1712
+ ],
1713
+ "onDelete": "cascade",
1714
+ "onUpdate": "no action"
1715
+ }
1716
+ },
1717
+ "compositePrimaryKeys": {
1718
+ "project_metadata_tenant_id_id_pk": {
1719
+ "name": "project_metadata_tenant_id_id_pk",
1720
+ "columns": [
1721
+ "tenant_id",
1722
+ "id"
1723
+ ]
1724
+ }
1725
+ },
1726
+ "uniqueConstraints": {},
1727
+ "policies": {},
1728
+ "checkConstraints": {},
1729
+ "isRLSEnabled": false
1730
+ },
1731
+ "public.session": {
1732
+ "name": "session",
1733
+ "schema": "",
1734
+ "columns": {
1735
+ "id": {
1736
+ "name": "id",
1737
+ "type": "text",
1738
+ "primaryKey": true,
1739
+ "notNull": true
1740
+ },
1741
+ "expires_at": {
1742
+ "name": "expires_at",
1743
+ "type": "timestamp",
1744
+ "primaryKey": false,
1745
+ "notNull": true
1746
+ },
1747
+ "token": {
1748
+ "name": "token",
1749
+ "type": "text",
1750
+ "primaryKey": false,
1751
+ "notNull": true
1752
+ },
1753
+ "created_at": {
1754
+ "name": "created_at",
1755
+ "type": "timestamp",
1756
+ "primaryKey": false,
1757
+ "notNull": true,
1758
+ "default": "now()"
1759
+ },
1760
+ "updated_at": {
1761
+ "name": "updated_at",
1762
+ "type": "timestamp",
1763
+ "primaryKey": false,
1764
+ "notNull": true
1765
+ },
1766
+ "ip_address": {
1767
+ "name": "ip_address",
1768
+ "type": "text",
1769
+ "primaryKey": false,
1770
+ "notNull": false
1771
+ },
1772
+ "user_agent": {
1773
+ "name": "user_agent",
1774
+ "type": "text",
1775
+ "primaryKey": false,
1776
+ "notNull": false
1777
+ },
1778
+ "user_id": {
1779
+ "name": "user_id",
1780
+ "type": "text",
1781
+ "primaryKey": false,
1782
+ "notNull": true
1783
+ },
1784
+ "active_organization_id": {
1785
+ "name": "active_organization_id",
1786
+ "type": "text",
1787
+ "primaryKey": false,
1788
+ "notNull": false
1789
+ }
1790
+ },
1791
+ "indexes": {
1792
+ "session_userId_idx": {
1793
+ "name": "session_userId_idx",
1794
+ "columns": [
1795
+ {
1796
+ "expression": "user_id",
1797
+ "isExpression": false,
1798
+ "asc": true,
1799
+ "nulls": "last"
1800
+ }
1801
+ ],
1802
+ "isUnique": false,
1803
+ "concurrently": false,
1804
+ "method": "btree",
1805
+ "with": {}
1806
+ }
1807
+ },
1808
+ "foreignKeys": {
1809
+ "session_user_id_user_id_fk": {
1810
+ "name": "session_user_id_user_id_fk",
1811
+ "tableFrom": "session",
1812
+ "tableTo": "user",
1813
+ "columnsFrom": [
1814
+ "user_id"
1815
+ ],
1816
+ "columnsTo": [
1817
+ "id"
1818
+ ],
1819
+ "onDelete": "cascade",
1820
+ "onUpdate": "no action"
1821
+ }
1822
+ },
1823
+ "compositePrimaryKeys": {},
1824
+ "uniqueConstraints": {
1825
+ "session_token_unique": {
1826
+ "name": "session_token_unique",
1827
+ "nullsNotDistinct": false,
1828
+ "columns": [
1829
+ "token"
1830
+ ]
1831
+ }
1832
+ },
1833
+ "policies": {},
1834
+ "checkConstraints": {},
1835
+ "isRLSEnabled": false
1836
+ },
1837
+ "public.sso_provider": {
1838
+ "name": "sso_provider",
1839
+ "schema": "",
1840
+ "columns": {
1841
+ "id": {
1842
+ "name": "id",
1843
+ "type": "text",
1844
+ "primaryKey": true,
1845
+ "notNull": true
1846
+ },
1847
+ "issuer": {
1848
+ "name": "issuer",
1849
+ "type": "text",
1850
+ "primaryKey": false,
1851
+ "notNull": true
1852
+ },
1853
+ "oidc_config": {
1854
+ "name": "oidc_config",
1855
+ "type": "text",
1856
+ "primaryKey": false,
1857
+ "notNull": false
1858
+ },
1859
+ "saml_config": {
1860
+ "name": "saml_config",
1861
+ "type": "text",
1862
+ "primaryKey": false,
1863
+ "notNull": false
1864
+ },
1865
+ "user_id": {
1866
+ "name": "user_id",
1867
+ "type": "text",
1868
+ "primaryKey": false,
1869
+ "notNull": false
1870
+ },
1871
+ "provider_id": {
1872
+ "name": "provider_id",
1873
+ "type": "text",
1874
+ "primaryKey": false,
1875
+ "notNull": true
1876
+ },
1877
+ "organization_id": {
1878
+ "name": "organization_id",
1879
+ "type": "text",
1880
+ "primaryKey": false,
1881
+ "notNull": false
1882
+ },
1883
+ "domain": {
1884
+ "name": "domain",
1885
+ "type": "text",
1886
+ "primaryKey": false,
1887
+ "notNull": true
1888
+ }
1889
+ },
1890
+ "indexes": {},
1891
+ "foreignKeys": {
1892
+ "sso_provider_user_id_user_id_fk": {
1893
+ "name": "sso_provider_user_id_user_id_fk",
1894
+ "tableFrom": "sso_provider",
1895
+ "tableTo": "user",
1896
+ "columnsFrom": [
1897
+ "user_id"
1898
+ ],
1899
+ "columnsTo": [
1900
+ "id"
1901
+ ],
1902
+ "onDelete": "cascade",
1903
+ "onUpdate": "no action"
1904
+ }
1905
+ },
1906
+ "compositePrimaryKeys": {},
1907
+ "uniqueConstraints": {
1908
+ "sso_provider_provider_id_unique": {
1909
+ "name": "sso_provider_provider_id_unique",
1910
+ "nullsNotDistinct": false,
1911
+ "columns": [
1912
+ "provider_id"
1913
+ ]
1914
+ }
1915
+ },
1916
+ "policies": {},
1917
+ "checkConstraints": {},
1918
+ "isRLSEnabled": false
1919
+ },
1920
+ "public.task_relations": {
1921
+ "name": "task_relations",
1922
+ "schema": "",
1923
+ "columns": {
1924
+ "tenant_id": {
1925
+ "name": "tenant_id",
1926
+ "type": "varchar(256)",
1927
+ "primaryKey": false,
1928
+ "notNull": true
1929
+ },
1930
+ "id": {
1931
+ "name": "id",
1932
+ "type": "varchar(256)",
1933
+ "primaryKey": false,
1934
+ "notNull": true
1935
+ },
1936
+ "project_id": {
1937
+ "name": "project_id",
1938
+ "type": "varchar(256)",
1939
+ "primaryKey": false,
1940
+ "notNull": true
1941
+ },
1942
+ "parent_task_id": {
1943
+ "name": "parent_task_id",
1944
+ "type": "varchar(256)",
1945
+ "primaryKey": false,
1946
+ "notNull": true
1947
+ },
1948
+ "child_task_id": {
1949
+ "name": "child_task_id",
1950
+ "type": "varchar(256)",
1951
+ "primaryKey": false,
1952
+ "notNull": true
1953
+ },
1954
+ "relation_type": {
1955
+ "name": "relation_type",
1956
+ "type": "varchar(256)",
1957
+ "primaryKey": false,
1958
+ "notNull": false,
1959
+ "default": "'parent_child'"
1960
+ },
1961
+ "created_at": {
1962
+ "name": "created_at",
1963
+ "type": "timestamp",
1964
+ "primaryKey": false,
1965
+ "notNull": true,
1966
+ "default": "now()"
1967
+ },
1968
+ "updated_at": {
1969
+ "name": "updated_at",
1970
+ "type": "timestamp",
1971
+ "primaryKey": false,
1972
+ "notNull": true,
1973
+ "default": "now()"
1974
+ }
1975
+ },
1976
+ "indexes": {},
1977
+ "foreignKeys": {
1978
+ "task_relations_parent_fk": {
1979
+ "name": "task_relations_parent_fk",
1980
+ "tableFrom": "task_relations",
1981
+ "tableTo": "tasks",
1982
+ "columnsFrom": [
1983
+ "tenant_id",
1984
+ "project_id",
1985
+ "parent_task_id"
1986
+ ],
1987
+ "columnsTo": [
1988
+ "tenant_id",
1989
+ "project_id",
1990
+ "id"
1991
+ ],
1992
+ "onDelete": "cascade",
1993
+ "onUpdate": "no action"
1994
+ },
1995
+ "task_relations_child_fk": {
1996
+ "name": "task_relations_child_fk",
1997
+ "tableFrom": "task_relations",
1998
+ "tableTo": "tasks",
1999
+ "columnsFrom": [
2000
+ "tenant_id",
2001
+ "project_id",
2002
+ "child_task_id"
2003
+ ],
2004
+ "columnsTo": [
2005
+ "tenant_id",
2006
+ "project_id",
2007
+ "id"
2008
+ ],
2009
+ "onDelete": "cascade",
2010
+ "onUpdate": "no action"
2011
+ }
2012
+ },
2013
+ "compositePrimaryKeys": {
2014
+ "task_relations_tenant_id_project_id_id_pk": {
2015
+ "name": "task_relations_tenant_id_project_id_id_pk",
2016
+ "columns": [
2017
+ "tenant_id",
2018
+ "project_id",
2019
+ "id"
2020
+ ]
2021
+ }
2022
+ },
2023
+ "uniqueConstraints": {},
2024
+ "policies": {},
2025
+ "checkConstraints": {},
2026
+ "isRLSEnabled": false
2027
+ },
2028
+ "public.tasks": {
2029
+ "name": "tasks",
2030
+ "schema": "",
2031
+ "columns": {
2032
+ "tenant_id": {
2033
+ "name": "tenant_id",
2034
+ "type": "varchar(256)",
2035
+ "primaryKey": false,
2036
+ "notNull": true
2037
+ },
2038
+ "id": {
2039
+ "name": "id",
2040
+ "type": "varchar(256)",
2041
+ "primaryKey": false,
2042
+ "notNull": true
2043
+ },
2044
+ "project_id": {
2045
+ "name": "project_id",
2046
+ "type": "varchar(256)",
2047
+ "primaryKey": false,
2048
+ "notNull": true
2049
+ },
2050
+ "agent_id": {
2051
+ "name": "agent_id",
2052
+ "type": "varchar(256)",
2053
+ "primaryKey": false,
2054
+ "notNull": true
2055
+ },
2056
+ "sub_agent_id": {
2057
+ "name": "sub_agent_id",
2058
+ "type": "varchar(256)",
2059
+ "primaryKey": false,
2060
+ "notNull": true
2061
+ },
2062
+ "context_id": {
2063
+ "name": "context_id",
2064
+ "type": "varchar(256)",
2065
+ "primaryKey": false,
2066
+ "notNull": true
2067
+ },
2068
+ "ref": {
2069
+ "name": "ref",
2070
+ "type": "jsonb",
2071
+ "primaryKey": false,
2072
+ "notNull": false
2073
+ },
2074
+ "status": {
2075
+ "name": "status",
2076
+ "type": "varchar(256)",
2077
+ "primaryKey": false,
2078
+ "notNull": true
2079
+ },
2080
+ "metadata": {
2081
+ "name": "metadata",
2082
+ "type": "jsonb",
2083
+ "primaryKey": false,
2084
+ "notNull": false
2085
+ },
2086
+ "created_at": {
2087
+ "name": "created_at",
2088
+ "type": "timestamp",
2089
+ "primaryKey": false,
2090
+ "notNull": true,
2091
+ "default": "now()"
2092
+ },
2093
+ "updated_at": {
2094
+ "name": "updated_at",
2095
+ "type": "timestamp",
2096
+ "primaryKey": false,
2097
+ "notNull": true,
2098
+ "default": "now()"
2099
+ }
2100
+ },
2101
+ "indexes": {},
2102
+ "foreignKeys": {},
2103
+ "compositePrimaryKeys": {
2104
+ "tasks_tenant_id_project_id_id_pk": {
2105
+ "name": "tasks_tenant_id_project_id_id_pk",
2106
+ "columns": [
2107
+ "tenant_id",
2108
+ "project_id",
2109
+ "id"
2110
+ ]
2111
+ }
2112
+ },
2113
+ "uniqueConstraints": {},
2114
+ "policies": {},
2115
+ "checkConstraints": {},
2116
+ "isRLSEnabled": false
2117
+ },
2118
+ "public.trigger_invocations": {
2119
+ "name": "trigger_invocations",
2120
+ "schema": "",
2121
+ "columns": {
2122
+ "tenant_id": {
2123
+ "name": "tenant_id",
2124
+ "type": "varchar(256)",
2125
+ "primaryKey": false,
2126
+ "notNull": true
2127
+ },
2128
+ "id": {
2129
+ "name": "id",
2130
+ "type": "varchar(256)",
2131
+ "primaryKey": false,
2132
+ "notNull": true
2133
+ },
2134
+ "project_id": {
2135
+ "name": "project_id",
2136
+ "type": "varchar(256)",
2137
+ "primaryKey": false,
2138
+ "notNull": true
2139
+ },
2140
+ "agent_id": {
2141
+ "name": "agent_id",
2142
+ "type": "varchar(256)",
2143
+ "primaryKey": false,
2144
+ "notNull": true
2145
+ },
2146
+ "trigger_id": {
2147
+ "name": "trigger_id",
2148
+ "type": "varchar(256)",
2149
+ "primaryKey": false,
2150
+ "notNull": true
2151
+ },
2152
+ "conversation_id": {
2153
+ "name": "conversation_id",
2154
+ "type": "varchar(256)",
2155
+ "primaryKey": false,
2156
+ "notNull": false
2157
+ },
2158
+ "status": {
2159
+ "name": "status",
2160
+ "type": "varchar(20)",
2161
+ "primaryKey": false,
2162
+ "notNull": true,
2163
+ "default": "'pending'"
2164
+ },
2165
+ "request_payload": {
2166
+ "name": "request_payload",
2167
+ "type": "jsonb",
2168
+ "primaryKey": false,
2169
+ "notNull": true
2170
+ },
2171
+ "transformed_payload": {
2172
+ "name": "transformed_payload",
2173
+ "type": "jsonb",
2174
+ "primaryKey": false,
2175
+ "notNull": false
2176
+ },
2177
+ "error_message": {
2178
+ "name": "error_message",
2179
+ "type": "text",
2180
+ "primaryKey": false,
2181
+ "notNull": false
2182
+ },
2183
+ "created_at": {
2184
+ "name": "created_at",
2185
+ "type": "timestamp",
2186
+ "primaryKey": false,
2187
+ "notNull": true,
2188
+ "default": "now()"
2189
+ }
2190
+ },
2191
+ "indexes": {
2192
+ "trigger_invocations_trigger_idx": {
2193
+ "name": "trigger_invocations_trigger_idx",
2194
+ "columns": [
2195
+ {
2196
+ "expression": "trigger_id",
2197
+ "isExpression": false,
2198
+ "asc": true,
2199
+ "nulls": "last"
2200
+ },
2201
+ {
2202
+ "expression": "created_at",
2203
+ "isExpression": false,
2204
+ "asc": true,
2205
+ "nulls": "last"
2206
+ }
2207
+ ],
2208
+ "isUnique": false,
2209
+ "concurrently": false,
2210
+ "method": "btree",
2211
+ "with": {}
2212
+ },
2213
+ "trigger_invocations_status_idx": {
2214
+ "name": "trigger_invocations_status_idx",
2215
+ "columns": [
2216
+ {
2217
+ "expression": "trigger_id",
2218
+ "isExpression": false,
2219
+ "asc": true,
2220
+ "nulls": "last"
2221
+ },
2222
+ {
2223
+ "expression": "status",
2224
+ "isExpression": false,
2225
+ "asc": true,
2226
+ "nulls": "last"
2227
+ }
2228
+ ],
2229
+ "isUnique": false,
2230
+ "concurrently": false,
2231
+ "method": "btree",
2232
+ "with": {}
2233
+ }
2234
+ },
2235
+ "foreignKeys": {},
2236
+ "compositePrimaryKeys": {
2237
+ "trigger_invocations_tenant_id_project_id_agent_id_id_pk": {
2238
+ "name": "trigger_invocations_tenant_id_project_id_agent_id_id_pk",
2239
+ "columns": [
2240
+ "tenant_id",
2241
+ "project_id",
2242
+ "agent_id",
2243
+ "id"
2244
+ ]
2245
+ }
2246
+ },
2247
+ "uniqueConstraints": {},
2248
+ "policies": {},
2249
+ "checkConstraints": {},
2250
+ "isRLSEnabled": false
2251
+ },
2252
+ "public.user": {
2253
+ "name": "user",
2254
+ "schema": "",
2255
+ "columns": {
2256
+ "id": {
2257
+ "name": "id",
2258
+ "type": "text",
2259
+ "primaryKey": true,
2260
+ "notNull": true
2261
+ },
2262
+ "name": {
2263
+ "name": "name",
2264
+ "type": "text",
2265
+ "primaryKey": false,
2266
+ "notNull": true
2267
+ },
2268
+ "email": {
2269
+ "name": "email",
2270
+ "type": "text",
2271
+ "primaryKey": false,
2272
+ "notNull": true
2273
+ },
2274
+ "email_verified": {
2275
+ "name": "email_verified",
2276
+ "type": "boolean",
2277
+ "primaryKey": false,
2278
+ "notNull": true,
2279
+ "default": false
2280
+ },
2281
+ "image": {
2282
+ "name": "image",
2283
+ "type": "text",
2284
+ "primaryKey": false,
2285
+ "notNull": false
2286
+ },
2287
+ "created_at": {
2288
+ "name": "created_at",
2289
+ "type": "timestamp",
2290
+ "primaryKey": false,
2291
+ "notNull": true,
2292
+ "default": "now()"
2293
+ },
2294
+ "updated_at": {
2295
+ "name": "updated_at",
2296
+ "type": "timestamp",
2297
+ "primaryKey": false,
2298
+ "notNull": true,
2299
+ "default": "now()"
2300
+ }
2301
+ },
2302
+ "indexes": {},
2303
+ "foreignKeys": {},
2304
+ "compositePrimaryKeys": {},
2305
+ "uniqueConstraints": {
2306
+ "user_email_unique": {
2307
+ "name": "user_email_unique",
2308
+ "nullsNotDistinct": false,
2309
+ "columns": [
2310
+ "email"
2311
+ ]
2312
+ }
2313
+ },
2314
+ "policies": {},
2315
+ "checkConstraints": {},
2316
+ "isRLSEnabled": false
2317
+ },
2318
+ "public.verification": {
2319
+ "name": "verification",
2320
+ "schema": "",
2321
+ "columns": {
2322
+ "id": {
2323
+ "name": "id",
2324
+ "type": "text",
2325
+ "primaryKey": true,
2326
+ "notNull": true
2327
+ },
2328
+ "identifier": {
2329
+ "name": "identifier",
2330
+ "type": "text",
2331
+ "primaryKey": false,
2332
+ "notNull": true
2333
+ },
2334
+ "value": {
2335
+ "name": "value",
2336
+ "type": "text",
2337
+ "primaryKey": false,
2338
+ "notNull": true
2339
+ },
2340
+ "expires_at": {
2341
+ "name": "expires_at",
2342
+ "type": "timestamp",
2343
+ "primaryKey": false,
2344
+ "notNull": true
2345
+ },
2346
+ "created_at": {
2347
+ "name": "created_at",
2348
+ "type": "timestamp",
2349
+ "primaryKey": false,
2350
+ "notNull": true,
2351
+ "default": "now()"
2352
+ },
2353
+ "updated_at": {
2354
+ "name": "updated_at",
2355
+ "type": "timestamp",
2356
+ "primaryKey": false,
2357
+ "notNull": true,
2358
+ "default": "now()"
2359
+ }
2360
+ },
2361
+ "indexes": {
2362
+ "verification_identifier_idx": {
2363
+ "name": "verification_identifier_idx",
2364
+ "columns": [
2365
+ {
2366
+ "expression": "identifier",
2367
+ "isExpression": false,
2368
+ "asc": true,
2369
+ "nulls": "last"
2370
+ }
2371
+ ],
2372
+ "isUnique": false,
2373
+ "concurrently": false,
2374
+ "method": "btree",
2375
+ "with": {}
2376
+ }
2377
+ },
2378
+ "foreignKeys": {},
2379
+ "compositePrimaryKeys": {},
2380
+ "uniqueConstraints": {},
2381
+ "policies": {},
2382
+ "checkConstraints": {},
2383
+ "isRLSEnabled": false
2384
+ }
2385
+ },
2386
+ "enums": {},
2387
+ "schemas": {},
2388
+ "sequences": {},
2389
+ "roles": {},
2390
+ "policies": {},
2391
+ "views": {},
2392
+ "_meta": {
2393
+ "columns": {},
2394
+ "schemas": {},
2395
+ "tables": {}
2396
+ }
2397
+ }