nodal-agents 0.1.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 (239) hide show
  1. package/README.md +81 -0
  2. package/cli.js +14113 -0
  3. package/migrations/0000_flashy_clea.sql +529 -0
  4. package/migrations/0001_exotic_shooting_star.sql +3 -0
  5. package/migrations/0002_gray_devos.sql +39 -0
  6. package/migrations/0003_stormy_thaddeus_ross.sql +1 -0
  7. package/migrations/0004_married_deadpool.sql +3 -0
  8. package/migrations/0005_tense_hedge_knight.sql +1 -0
  9. package/migrations/0006_credentials_table.sql +25 -0
  10. package/migrations/0007_free_speed.sql +16 -0
  11. package/migrations/0008_curious_thor_girl.sql +17 -0
  12. package/migrations/meta/0000_snapshot.json +3957 -0
  13. package/migrations/meta/0001_snapshot.json +3977 -0
  14. package/migrations/meta/0002_snapshot.json +4210 -0
  15. package/migrations/meta/0003_snapshot.json +4216 -0
  16. package/migrations/meta/0004_snapshot.json +4237 -0
  17. package/migrations/meta/0005_snapshot.json +4244 -0
  18. package/migrations/meta/0006_snapshot.json +4330 -0
  19. package/migrations/meta/0007_snapshot.json +4330 -0
  20. package/migrations/meta/0008_snapshot.json +4447 -0
  21. package/migrations/meta/_journal.json +69 -0
  22. package/package.json +63 -0
  23. package/runner.js +13181 -0
  24. package/web/.next/BUILD_ID +1 -0
  25. package/web/.next/app-path-routes-manifest.json +28 -0
  26. package/web/.next/build-manifest.json +20 -0
  27. package/web/.next/package.json +1 -0
  28. package/web/.next/prerender-manifest.json +109 -0
  29. package/web/.next/react-loadable-manifest.json +14 -0
  30. package/web/.next/required-server-files.json +351 -0
  31. package/web/.next/routes-manifest.json +216 -0
  32. package/web/.next/server/app/(dashboard)/agents/[id]/edit/page.js +2 -0
  33. package/web/.next/server/app/(dashboard)/agents/[id]/edit/page.js.nft.json +1 -0
  34. package/web/.next/server/app/(dashboard)/agents/[id]/edit/page_client-reference-manifest.js +1 -0
  35. package/web/.next/server/app/(dashboard)/agents/[id]/telegram/page.js +2 -0
  36. package/web/.next/server/app/(dashboard)/agents/[id]/telegram/page.js.nft.json +1 -0
  37. package/web/.next/server/app/(dashboard)/agents/[id]/telegram/page_client-reference-manifest.js +1 -0
  38. package/web/.next/server/app/(dashboard)/agents/page.js +2 -0
  39. package/web/.next/server/app/(dashboard)/agents/page.js.nft.json +1 -0
  40. package/web/.next/server/app/(dashboard)/agents/page_client-reference-manifest.js +1 -0
  41. package/web/.next/server/app/(dashboard)/approvals/page.js +2 -0
  42. package/web/.next/server/app/(dashboard)/approvals/page.js.nft.json +1 -0
  43. package/web/.next/server/app/(dashboard)/approvals/page_client-reference-manifest.js +1 -0
  44. package/web/.next/server/app/(dashboard)/automations/page.js +2 -0
  45. package/web/.next/server/app/(dashboard)/automations/page.js.nft.json +1 -0
  46. package/web/.next/server/app/(dashboard)/automations/page_client-reference-manifest.js +1 -0
  47. package/web/.next/server/app/(dashboard)/billing/page.js +2 -0
  48. package/web/.next/server/app/(dashboard)/billing/page.js.nft.json +1 -0
  49. package/web/.next/server/app/(dashboard)/billing/page_client-reference-manifest.js +1 -0
  50. package/web/.next/server/app/(dashboard)/connectors/page.js +2 -0
  51. package/web/.next/server/app/(dashboard)/connectors/page.js.nft.json +1 -0
  52. package/web/.next/server/app/(dashboard)/connectors/page_client-reference-manifest.js +1 -0
  53. package/web/.next/server/app/(dashboard)/credentials/page.js +2 -0
  54. package/web/.next/server/app/(dashboard)/credentials/page.js.nft.json +1 -0
  55. package/web/.next/server/app/(dashboard)/credentials/page_client-reference-manifest.js +1 -0
  56. package/web/.next/server/app/(dashboard)/jobs/[id]/page.js +2 -0
  57. package/web/.next/server/app/(dashboard)/jobs/[id]/page.js.nft.json +1 -0
  58. package/web/.next/server/app/(dashboard)/jobs/[id]/page_client-reference-manifest.js +1 -0
  59. package/web/.next/server/app/(dashboard)/jobs/page.js +2 -0
  60. package/web/.next/server/app/(dashboard)/jobs/page.js.nft.json +1 -0
  61. package/web/.next/server/app/(dashboard)/jobs/page_client-reference-manifest.js +1 -0
  62. package/web/.next/server/app/(dashboard)/logs/page.js +2 -0
  63. package/web/.next/server/app/(dashboard)/logs/page.js.nft.json +1 -0
  64. package/web/.next/server/app/(dashboard)/logs/page_client-reference-manifest.js +1 -0
  65. package/web/.next/server/app/(dashboard)/memories/page.js +2 -0
  66. package/web/.next/server/app/(dashboard)/memories/page.js.nft.json +1 -0
  67. package/web/.next/server/app/(dashboard)/memories/page_client-reference-manifest.js +1 -0
  68. package/web/.next/server/app/(dashboard)/settings/page.js +2 -0
  69. package/web/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -0
  70. package/web/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -0
  71. package/web/.next/server/app/(dashboard)/skills/[id]/edit/page.js +2 -0
  72. package/web/.next/server/app/(dashboard)/skills/[id]/edit/page.js.nft.json +1 -0
  73. package/web/.next/server/app/(dashboard)/skills/[id]/edit/page_client-reference-manifest.js +1 -0
  74. package/web/.next/server/app/(dashboard)/skills/page.js +2 -0
  75. package/web/.next/server/app/(dashboard)/skills/page.js.nft.json +1 -0
  76. package/web/.next/server/app/(dashboard)/skills/page_client-reference-manifest.js +1 -0
  77. package/web/.next/server/app/(dashboard)/stats/page.js +2 -0
  78. package/web/.next/server/app/(dashboard)/stats/page.js.nft.json +1 -0
  79. package/web/.next/server/app/(dashboard)/stats/page_client-reference-manifest.js +1 -0
  80. package/web/.next/server/app/_global-error/page.js +32 -0
  81. package/web/.next/server/app/_global-error/page.js.nft.json +1 -0
  82. package/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -0
  83. package/web/.next/server/app/_global-error.html +1 -0
  84. package/web/.next/server/app/_global-error.meta +16 -0
  85. package/web/.next/server/app/_global-error.rsc +18 -0
  86. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +18 -0
  87. package/web/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +5 -0
  88. package/web/.next/server/app/_global-error.segments/_global-error.segment.rsc +5 -0
  89. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +5 -0
  90. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +7 -0
  91. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
  92. package/web/.next/server/app/_not-found/page.js +2 -0
  93. package/web/.next/server/app/_not-found/page.js.nft.json +1 -0
  94. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
  95. package/web/.next/server/app/_not-found.html +1 -0
  96. package/web/.next/server/app/_not-found.meta +16 -0
  97. package/web/.next/server/app/_not-found.rsc +17 -0
  98. package/web/.next/server/app/_not-found.segments/_full.segment.rsc +17 -0
  99. package/web/.next/server/app/_not-found.segments/_head.segment.rsc +5 -0
  100. package/web/.next/server/app/_not-found.segments/_index.segment.rsc +7 -0
  101. package/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +6 -0
  102. package/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +5 -0
  103. package/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -0
  104. package/web/.next/server/app/api/auth/[...all]/route.js +1 -0
  105. package/web/.next/server/app/api/auth/[...all]/route.js.nft.json +1 -0
  106. package/web/.next/server/app/api/auth/[...all]/route_client-reference-manifest.js +1 -0
  107. package/web/.next/server/app/api/health/route.js +1 -0
  108. package/web/.next/server/app/api/health/route.js.nft.json +1 -0
  109. package/web/.next/server/app/api/health/route_client-reference-manifest.js +1 -0
  110. package/web/.next/server/app/api/oauth/[provider]/callback/route.js +1 -0
  111. package/web/.next/server/app/api/oauth/[provider]/callback/route.js.nft.json +1 -0
  112. package/web/.next/server/app/api/oauth/[provider]/callback/route_client-reference-manifest.js +1 -0
  113. package/web/.next/server/app/api/oauth/[provider]/start/route.js +1 -0
  114. package/web/.next/server/app/api/oauth/[provider]/start/route.js.nft.json +1 -0
  115. package/web/.next/server/app/api/oauth/[provider]/start/route_client-reference-manifest.js +1 -0
  116. package/web/.next/server/app/auth/callback/route.js +1 -0
  117. package/web/.next/server/app/auth/callback/route.js.nft.json +1 -0
  118. package/web/.next/server/app/auth/callback/route_client-reference-manifest.js +1 -0
  119. package/web/.next/server/app/index.html +1 -0
  120. package/web/.next/server/app/index.meta +16 -0
  121. package/web/.next/server/app/index.rsc +16 -0
  122. package/web/.next/server/app/index.segments/__PAGE__.segment.rsc +6 -0
  123. package/web/.next/server/app/index.segments/_full.segment.rsc +16 -0
  124. package/web/.next/server/app/index.segments/_head.segment.rsc +5 -0
  125. package/web/.next/server/app/index.segments/_index.segment.rsc +7 -0
  126. package/web/.next/server/app/index.segments/_tree.segment.rsc +2 -0
  127. package/web/.next/server/app/login/page.js +2 -0
  128. package/web/.next/server/app/login/page.js.nft.json +1 -0
  129. package/web/.next/server/app/login/page_client-reference-manifest.js +1 -0
  130. package/web/.next/server/app/onboarding/page.js +2 -0
  131. package/web/.next/server/app/onboarding/page.js.nft.json +1 -0
  132. package/web/.next/server/app/onboarding/page_client-reference-manifest.js +1 -0
  133. package/web/.next/server/app/onboarding.html +1 -0
  134. package/web/.next/server/app/onboarding.meta +15 -0
  135. package/web/.next/server/app/onboarding.rsc +17 -0
  136. package/web/.next/server/app/onboarding.segments/_full.segment.rsc +17 -0
  137. package/web/.next/server/app/onboarding.segments/_head.segment.rsc +5 -0
  138. package/web/.next/server/app/onboarding.segments/_index.segment.rsc +7 -0
  139. package/web/.next/server/app/onboarding.segments/_tree.segment.rsc +2 -0
  140. package/web/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +5 -0
  141. package/web/.next/server/app/onboarding.segments/onboarding.segment.rsc +5 -0
  142. package/web/.next/server/app/page.js +2 -0
  143. package/web/.next/server/app/page.js.nft.json +1 -0
  144. package/web/.next/server/app/page_client-reference-manifest.js +1 -0
  145. package/web/.next/server/app-paths-manifest.json +28 -0
  146. package/web/.next/server/chunks/1006.js +1 -0
  147. package/web/.next/server/chunks/168.js +8 -0
  148. package/web/.next/server/chunks/2187.js +1 -0
  149. package/web/.next/server/chunks/2275.js +120 -0
  150. package/web/.next/server/chunks/2422.js +1 -0
  151. package/web/.next/server/chunks/3159.js +45 -0
  152. package/web/.next/server/chunks/3699.js +1 -0
  153. package/web/.next/server/chunks/3807.js +1 -0
  154. package/web/.next/server/chunks/3865.js +9 -0
  155. package/web/.next/server/chunks/3869.js +1 -0
  156. package/web/.next/server/chunks/3938.js +1 -0
  157. package/web/.next/server/chunks/4574.js +1 -0
  158. package/web/.next/server/chunks/4674.js +18 -0
  159. package/web/.next/server/chunks/5376.js +1 -0
  160. package/web/.next/server/chunks/5402.js +65 -0
  161. package/web/.next/server/chunks/5449.js +1 -0
  162. package/web/.next/server/chunks/5754.js +62 -0
  163. package/web/.next/server/chunks/5962.js +1 -0
  164. package/web/.next/server/chunks/6128.js +1 -0
  165. package/web/.next/server/chunks/6402.js +1 -0
  166. package/web/.next/server/chunks/6605.js +12 -0
  167. package/web/.next/server/chunks/6697.js +1 -0
  168. package/web/.next/server/chunks/6764.js +1 -0
  169. package/web/.next/server/chunks/6896.js +2 -0
  170. package/web/.next/server/chunks/8464.js +2 -0
  171. package/web/.next/server/chunks/9606.js +428 -0
  172. package/web/.next/server/functions-config-manifest.json +14 -0
  173. package/web/.next/server/middleware-build-manifest.js +1 -0
  174. package/web/.next/server/middleware-manifest.json +6 -0
  175. package/web/.next/server/middleware-react-loadable-manifest.js +1 -0
  176. package/web/.next/server/middleware.js +18 -0
  177. package/web/.next/server/next-font-manifest.js +1 -0
  178. package/web/.next/server/next-font-manifest.json +1 -0
  179. package/web/.next/server/pages/404.html +1 -0
  180. package/web/.next/server/pages/500.html +1 -0
  181. package/web/.next/server/pages-manifest.json +4 -0
  182. package/web/.next/server/prefetch-hints.json +1 -0
  183. package/web/.next/server/server-reference-manifest.js +1 -0
  184. package/web/.next/server/server-reference-manifest.json +1 -0
  185. package/web/.next/server/webpack-runtime.js +1 -0
  186. package/web/.next/static/chunks/174.f5bd28884efa0000.js +1 -0
  187. package/web/.next/static/chunks/203.02a2bd001ebbe608.js +1 -0
  188. package/web/.next/static/chunks/231-fbb2baea2de90085.js +1 -0
  189. package/web/.next/static/chunks/363-483f33abe1809381.js +1 -0
  190. package/web/.next/static/chunks/45-b78e94bb1c396542.js +1 -0
  191. package/web/.next/static/chunks/504-baed39064a242351.js +1 -0
  192. package/web/.next/static/chunks/511-487710d0fe16fbe3.js +1 -0
  193. package/web/.next/static/chunks/678-46261e73dea11bc7.js +1 -0
  194. package/web/.next/static/chunks/724-1d09b7ea367babbe.js +32 -0
  195. package/web/.next/static/chunks/a7a8b010-64b9ea0922a3e9c1.js +1 -0
  196. package/web/.next/static/chunks/app/(dashboard)/agents/[id]/edit/page-1cbc88f6ea30c04e.js +1 -0
  197. package/web/.next/static/chunks/app/(dashboard)/agents/[id]/telegram/page-c3393e2e0665b0a7.js +1 -0
  198. package/web/.next/static/chunks/app/(dashboard)/agents/page-fe6937dec50415e9.js +1 -0
  199. package/web/.next/static/chunks/app/(dashboard)/approvals/page-9509351c92665fc1.js +1 -0
  200. package/web/.next/static/chunks/app/(dashboard)/automations/page-d06b5eb3ec1ada30.js +1 -0
  201. package/web/.next/static/chunks/app/(dashboard)/billing/page-88165ec8f0c4df6b.js +1 -0
  202. package/web/.next/static/chunks/app/(dashboard)/connectors/page-9189af92fc7cddd4.js +1 -0
  203. package/web/.next/static/chunks/app/(dashboard)/credentials/page-9ad4cfdfb3fda068.js +1 -0
  204. package/web/.next/static/chunks/app/(dashboard)/jobs/[id]/page-fdaeff5be0544e4c.js +1 -0
  205. package/web/.next/static/chunks/app/(dashboard)/jobs/page-c1ddb55d4de1ae7d.js +1 -0
  206. package/web/.next/static/chunks/app/(dashboard)/layout-7ad84dfaa376ab9f.js +2 -0
  207. package/web/.next/static/chunks/app/(dashboard)/logs/page-a6006d9cc2590a0a.js +1 -0
  208. package/web/.next/static/chunks/app/(dashboard)/memories/page-8466e02527ae909b.js +1 -0
  209. package/web/.next/static/chunks/app/(dashboard)/settings/page-d7dd2b7586e23ec9.js +1 -0
  210. package/web/.next/static/chunks/app/(dashboard)/skills/[id]/edit/page-7c1e1566a93b3a65.js +1 -0
  211. package/web/.next/static/chunks/app/(dashboard)/skills/page-30cbb1e29d7e5147.js +1 -0
  212. package/web/.next/static/chunks/app/(dashboard)/stats/page-ddf08b608a2840c5.js +1 -0
  213. package/web/.next/static/chunks/app/_global-error/page-ddf08b608a2840c5.js +1 -0
  214. package/web/.next/static/chunks/app/_not-found/page-ddf08b608a2840c5.js +1 -0
  215. package/web/.next/static/chunks/app/api/auth/[...all]/route-ddf08b608a2840c5.js +1 -0
  216. package/web/.next/static/chunks/app/api/health/route-ddf08b608a2840c5.js +1 -0
  217. package/web/.next/static/chunks/app/api/oauth/[provider]/callback/route-ddf08b608a2840c5.js +1 -0
  218. package/web/.next/static/chunks/app/api/oauth/[provider]/start/route-ddf08b608a2840c5.js +1 -0
  219. package/web/.next/static/chunks/app/auth/callback/route-ddf08b608a2840c5.js +1 -0
  220. package/web/.next/static/chunks/app/error-41d8134c91e8652d.js +1 -0
  221. package/web/.next/static/chunks/app/layout-fb836a3464648614.js +1 -0
  222. package/web/.next/static/chunks/app/login/page-176e4c02453c9ce9.js +1 -0
  223. package/web/.next/static/chunks/app/not-found-88165ec8f0c4df6b.js +1 -0
  224. package/web/.next/static/chunks/app/onboarding/page-ddf08b608a2840c5.js +1 -0
  225. package/web/.next/static/chunks/app/page-ddf08b608a2840c5.js +1 -0
  226. package/web/.next/static/chunks/e5009a55-3b270d90dfdebefa.js +1 -0
  227. package/web/.next/static/chunks/framework-a208e71e7c780968.js +1 -0
  228. package/web/.next/static/chunks/main-949172f5a58d52c4.js +5 -0
  229. package/web/.next/static/chunks/main-app-ad34d1b1511b9a1c.js +1 -0
  230. package/web/.next/static/chunks/next/dist/client/components/builtin/app-error-ddf08b608a2840c5.js +1 -0
  231. package/web/.next/static/chunks/next/dist/client/components/builtin/forbidden-ddf08b608a2840c5.js +1 -0
  232. package/web/.next/static/chunks/next/dist/client/components/builtin/global-error-c836ffb6bc7442ca.js +1 -0
  233. package/web/.next/static/chunks/next/dist/client/components/builtin/unauthorized-ddf08b608a2840c5.js +1 -0
  234. package/web/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  235. package/web/.next/static/chunks/webpack-ea6870dc3308aa05.js +1 -0
  236. package/web/.next/static/css/bd2cf2f17af36e40.css +1 -0
  237. package/web/.next/static/vTtlbto9aMl3tYcTyV1GL/_buildManifest.js +1 -0
  238. package/web/.next/static/vTtlbto9aMl3tYcTyV1GL/_ssgManifest.js +1 -0
  239. package/web/server.js +44 -0
@@ -0,0 +1,4210 @@
1
+ {
2
+ "id": "9d80773e-8da4-4a47-b0d7-377d9bce450e",
3
+ "prevId": "231e4072-7b09-45fc-b832-dcfbabbff6c5",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.user_profiles": {
8
+ "name": "user_profiles",
9
+ "schema": "",
10
+ "columns": {
11
+ "user_id": {
12
+ "name": "user_id",
13
+ "type": "uuid",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "display_name": {
18
+ "name": "display_name",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": false
22
+ },
23
+ "avatar_url": {
24
+ "name": "avatar_url",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": false
28
+ },
29
+ "timezone": {
30
+ "name": "timezone",
31
+ "type": "text",
32
+ "primaryKey": false,
33
+ "notNull": true,
34
+ "default": "'UTC'"
35
+ },
36
+ "locale": {
37
+ "name": "locale",
38
+ "type": "text",
39
+ "primaryKey": false,
40
+ "notNull": true,
41
+ "default": "'en'"
42
+ },
43
+ "created_at": {
44
+ "name": "created_at",
45
+ "type": "timestamp with time zone",
46
+ "primaryKey": false,
47
+ "notNull": true,
48
+ "default": "now()"
49
+ },
50
+ "updated_at": {
51
+ "name": "updated_at",
52
+ "type": "timestamp with time zone",
53
+ "primaryKey": false,
54
+ "notNull": true,
55
+ "default": "now()"
56
+ }
57
+ },
58
+ "indexes": {},
59
+ "foreignKeys": {
60
+ "user_profiles_user_id_users_id_fk": {
61
+ "name": "user_profiles_user_id_users_id_fk",
62
+ "tableFrom": "user_profiles",
63
+ "tableTo": "users",
64
+ "columnsFrom": ["user_id"],
65
+ "columnsTo": ["id"],
66
+ "onDelete": "cascade",
67
+ "onUpdate": "no action"
68
+ }
69
+ },
70
+ "compositePrimaryKeys": {},
71
+ "uniqueConstraints": {},
72
+ "policies": {},
73
+ "checkConstraints": {},
74
+ "isRLSEnabled": false
75
+ },
76
+ "public.users": {
77
+ "name": "users",
78
+ "schema": "",
79
+ "columns": {
80
+ "id": {
81
+ "name": "id",
82
+ "type": "uuid",
83
+ "primaryKey": true,
84
+ "notNull": true,
85
+ "default": "gen_random_uuid()"
86
+ },
87
+ "email": {
88
+ "name": "email",
89
+ "type": "text",
90
+ "primaryKey": false,
91
+ "notNull": true
92
+ },
93
+ "password_hash": {
94
+ "name": "password_hash",
95
+ "type": "text",
96
+ "primaryKey": false,
97
+ "notNull": false
98
+ },
99
+ "name": {
100
+ "name": "name",
101
+ "type": "text",
102
+ "primaryKey": false,
103
+ "notNull": true,
104
+ "default": "''"
105
+ },
106
+ "email_verified": {
107
+ "name": "email_verified",
108
+ "type": "boolean",
109
+ "primaryKey": false,
110
+ "notNull": true,
111
+ "default": false
112
+ },
113
+ "image": {
114
+ "name": "image",
115
+ "type": "text",
116
+ "primaryKey": false,
117
+ "notNull": false
118
+ },
119
+ "created_at": {
120
+ "name": "created_at",
121
+ "type": "timestamp with time zone",
122
+ "primaryKey": false,
123
+ "notNull": true,
124
+ "default": "now()"
125
+ },
126
+ "updated_at": {
127
+ "name": "updated_at",
128
+ "type": "timestamp with time zone",
129
+ "primaryKey": false,
130
+ "notNull": true,
131
+ "default": "now()"
132
+ }
133
+ },
134
+ "indexes": {},
135
+ "foreignKeys": {},
136
+ "compositePrimaryKeys": {},
137
+ "uniqueConstraints": {
138
+ "users_email_unique": {
139
+ "name": "users_email_unique",
140
+ "nullsNotDistinct": false,
141
+ "columns": ["email"]
142
+ }
143
+ },
144
+ "policies": {},
145
+ "checkConstraints": {},
146
+ "isRLSEnabled": false
147
+ },
148
+ "public.entities": {
149
+ "name": "entities",
150
+ "schema": "",
151
+ "columns": {
152
+ "id": {
153
+ "name": "id",
154
+ "type": "uuid",
155
+ "primaryKey": true,
156
+ "notNull": true,
157
+ "default": "gen_random_uuid()"
158
+ },
159
+ "user_id": {
160
+ "name": "user_id",
161
+ "type": "uuid",
162
+ "primaryKey": false,
163
+ "notNull": true
164
+ },
165
+ "name": {
166
+ "name": "name",
167
+ "type": "text",
168
+ "primaryKey": false,
169
+ "notNull": true
170
+ },
171
+ "slug": {
172
+ "name": "slug",
173
+ "type": "text",
174
+ "primaryKey": false,
175
+ "notNull": true
176
+ },
177
+ "description": {
178
+ "name": "description",
179
+ "type": "text",
180
+ "primaryKey": false,
181
+ "notNull": false
182
+ },
183
+ "icon": {
184
+ "name": "icon",
185
+ "type": "text",
186
+ "primaryKey": false,
187
+ "notNull": false,
188
+ "default": "'🏢'"
189
+ },
190
+ "industry": {
191
+ "name": "industry",
192
+ "type": "text",
193
+ "primaryKey": false,
194
+ "notNull": false
195
+ },
196
+ "goal": {
197
+ "name": "goal",
198
+ "type": "text",
199
+ "primaryKey": false,
200
+ "notNull": false
201
+ },
202
+ "mcp_token": {
203
+ "name": "mcp_token",
204
+ "type": "uuid",
205
+ "primaryKey": false,
206
+ "notNull": false,
207
+ "default": "gen_random_uuid()"
208
+ },
209
+ "created_at": {
210
+ "name": "created_at",
211
+ "type": "timestamp with time zone",
212
+ "primaryKey": false,
213
+ "notNull": false,
214
+ "default": "now()"
215
+ },
216
+ "updated_at": {
217
+ "name": "updated_at",
218
+ "type": "timestamp with time zone",
219
+ "primaryKey": false,
220
+ "notNull": false,
221
+ "default": "now()"
222
+ }
223
+ },
224
+ "indexes": {
225
+ "entities_mcp_token_idx": {
226
+ "name": "entities_mcp_token_idx",
227
+ "columns": [
228
+ {
229
+ "expression": "mcp_token",
230
+ "isExpression": false,
231
+ "asc": true,
232
+ "nulls": "last"
233
+ }
234
+ ],
235
+ "isUnique": true,
236
+ "concurrently": false,
237
+ "method": "btree",
238
+ "with": {}
239
+ },
240
+ "idx_entities_user_id": {
241
+ "name": "idx_entities_user_id",
242
+ "columns": [
243
+ {
244
+ "expression": "user_id",
245
+ "isExpression": false,
246
+ "asc": true,
247
+ "nulls": "last"
248
+ }
249
+ ],
250
+ "isUnique": false,
251
+ "concurrently": false,
252
+ "method": "btree",
253
+ "with": {}
254
+ }
255
+ },
256
+ "foreignKeys": {
257
+ "entities_user_id_users_id_fk": {
258
+ "name": "entities_user_id_users_id_fk",
259
+ "tableFrom": "entities",
260
+ "tableTo": "users",
261
+ "columnsFrom": ["user_id"],
262
+ "columnsTo": ["id"],
263
+ "onDelete": "cascade",
264
+ "onUpdate": "no action"
265
+ }
266
+ },
267
+ "compositePrimaryKeys": {},
268
+ "uniqueConstraints": {
269
+ "entities_slug_unique": {
270
+ "name": "entities_slug_unique",
271
+ "nullsNotDistinct": false,
272
+ "columns": ["slug"]
273
+ }
274
+ },
275
+ "policies": {},
276
+ "checkConstraints": {},
277
+ "isRLSEnabled": false
278
+ },
279
+ "public.entity_members": {
280
+ "name": "entity_members",
281
+ "schema": "",
282
+ "columns": {
283
+ "id": {
284
+ "name": "id",
285
+ "type": "uuid",
286
+ "primaryKey": true,
287
+ "notNull": true,
288
+ "default": "gen_random_uuid()"
289
+ },
290
+ "entity_id": {
291
+ "name": "entity_id",
292
+ "type": "uuid",
293
+ "primaryKey": false,
294
+ "notNull": true
295
+ },
296
+ "user_id": {
297
+ "name": "user_id",
298
+ "type": "uuid",
299
+ "primaryKey": false,
300
+ "notNull": true
301
+ },
302
+ "role": {
303
+ "name": "role",
304
+ "type": "text",
305
+ "primaryKey": false,
306
+ "notNull": false,
307
+ "default": "'owner'"
308
+ },
309
+ "created_at": {
310
+ "name": "created_at",
311
+ "type": "timestamp with time zone",
312
+ "primaryKey": false,
313
+ "notNull": false,
314
+ "default": "now()"
315
+ }
316
+ },
317
+ "indexes": {
318
+ "idx_entity_members_entity_id": {
319
+ "name": "idx_entity_members_entity_id",
320
+ "columns": [
321
+ {
322
+ "expression": "entity_id",
323
+ "isExpression": false,
324
+ "asc": true,
325
+ "nulls": "last"
326
+ }
327
+ ],
328
+ "isUnique": false,
329
+ "concurrently": false,
330
+ "method": "btree",
331
+ "with": {}
332
+ },
333
+ "idx_entity_members_user_id": {
334
+ "name": "idx_entity_members_user_id",
335
+ "columns": [
336
+ {
337
+ "expression": "user_id",
338
+ "isExpression": false,
339
+ "asc": true,
340
+ "nulls": "last"
341
+ }
342
+ ],
343
+ "isUnique": false,
344
+ "concurrently": false,
345
+ "method": "btree",
346
+ "with": {}
347
+ },
348
+ "idx_entity_members_user": {
349
+ "name": "idx_entity_members_user",
350
+ "columns": [
351
+ {
352
+ "expression": "user_id",
353
+ "isExpression": false,
354
+ "asc": true,
355
+ "nulls": "last"
356
+ },
357
+ {
358
+ "expression": "entity_id",
359
+ "isExpression": false,
360
+ "asc": true,
361
+ "nulls": "last"
362
+ }
363
+ ],
364
+ "isUnique": false,
365
+ "concurrently": false,
366
+ "method": "btree",
367
+ "with": {}
368
+ }
369
+ },
370
+ "foreignKeys": {
371
+ "entity_members_entity_id_entities_id_fk": {
372
+ "name": "entity_members_entity_id_entities_id_fk",
373
+ "tableFrom": "entity_members",
374
+ "tableTo": "entities",
375
+ "columnsFrom": ["entity_id"],
376
+ "columnsTo": ["id"],
377
+ "onDelete": "cascade",
378
+ "onUpdate": "no action"
379
+ },
380
+ "entity_members_user_id_users_id_fk": {
381
+ "name": "entity_members_user_id_users_id_fk",
382
+ "tableFrom": "entity_members",
383
+ "tableTo": "users",
384
+ "columnsFrom": ["user_id"],
385
+ "columnsTo": ["id"],
386
+ "onDelete": "cascade",
387
+ "onUpdate": "no action"
388
+ }
389
+ },
390
+ "compositePrimaryKeys": {},
391
+ "uniqueConstraints": {},
392
+ "policies": {},
393
+ "checkConstraints": {
394
+ "entity_members_role_check": {
395
+ "name": "entity_members_role_check",
396
+ "value": "\"entity_members\".\"role\" IN ('owner', 'admin', 'member', 'viewer')"
397
+ }
398
+ },
399
+ "isRLSEnabled": false
400
+ },
401
+ "public.agent_assignments": {
402
+ "name": "agent_assignments",
403
+ "schema": "",
404
+ "columns": {
405
+ "id": {
406
+ "name": "id",
407
+ "type": "uuid",
408
+ "primaryKey": true,
409
+ "notNull": true,
410
+ "default": "gen_random_uuid()"
411
+ },
412
+ "orchestrator_id": {
413
+ "name": "orchestrator_id",
414
+ "type": "uuid",
415
+ "primaryKey": false,
416
+ "notNull": true
417
+ },
418
+ "sub_agent_id": {
419
+ "name": "sub_agent_id",
420
+ "type": "uuid",
421
+ "primaryKey": false,
422
+ "notNull": true
423
+ },
424
+ "entity_id": {
425
+ "name": "entity_id",
426
+ "type": "uuid",
427
+ "primaryKey": false,
428
+ "notNull": true
429
+ },
430
+ "instructions": {
431
+ "name": "instructions",
432
+ "type": "text",
433
+ "primaryKey": false,
434
+ "notNull": false
435
+ },
436
+ "created_at": {
437
+ "name": "created_at",
438
+ "type": "timestamp with time zone",
439
+ "primaryKey": false,
440
+ "notNull": true,
441
+ "default": "now()"
442
+ }
443
+ },
444
+ "indexes": {},
445
+ "foreignKeys": {
446
+ "agent_assignments_orchestrator_id_agents_id_fk": {
447
+ "name": "agent_assignments_orchestrator_id_agents_id_fk",
448
+ "tableFrom": "agent_assignments",
449
+ "tableTo": "agents",
450
+ "columnsFrom": ["orchestrator_id"],
451
+ "columnsTo": ["id"],
452
+ "onDelete": "cascade",
453
+ "onUpdate": "no action"
454
+ },
455
+ "agent_assignments_sub_agent_id_agents_id_fk": {
456
+ "name": "agent_assignments_sub_agent_id_agents_id_fk",
457
+ "tableFrom": "agent_assignments",
458
+ "tableTo": "agents",
459
+ "columnsFrom": ["sub_agent_id"],
460
+ "columnsTo": ["id"],
461
+ "onDelete": "cascade",
462
+ "onUpdate": "no action"
463
+ },
464
+ "agent_assignments_entity_id_entities_id_fk": {
465
+ "name": "agent_assignments_entity_id_entities_id_fk",
466
+ "tableFrom": "agent_assignments",
467
+ "tableTo": "entities",
468
+ "columnsFrom": ["entity_id"],
469
+ "columnsTo": ["id"],
470
+ "onDelete": "cascade",
471
+ "onUpdate": "no action"
472
+ }
473
+ },
474
+ "compositePrimaryKeys": {},
475
+ "uniqueConstraints": {},
476
+ "policies": {},
477
+ "checkConstraints": {},
478
+ "isRLSEnabled": false
479
+ },
480
+ "public.agent_budgets": {
481
+ "name": "agent_budgets",
482
+ "schema": "",
483
+ "columns": {
484
+ "id": {
485
+ "name": "id",
486
+ "type": "uuid",
487
+ "primaryKey": true,
488
+ "notNull": true,
489
+ "default": "gen_random_uuid()"
490
+ },
491
+ "agent_id": {
492
+ "name": "agent_id",
493
+ "type": "uuid",
494
+ "primaryKey": false,
495
+ "notNull": false
496
+ },
497
+ "entity_id": {
498
+ "name": "entity_id",
499
+ "type": "uuid",
500
+ "primaryKey": false,
501
+ "notNull": false
502
+ },
503
+ "daily_token_limit": {
504
+ "name": "daily_token_limit",
505
+ "type": "bigint",
506
+ "primaryKey": false,
507
+ "notNull": false,
508
+ "default": 0
509
+ },
510
+ "monthly_token_limit": {
511
+ "name": "monthly_token_limit",
512
+ "type": "bigint",
513
+ "primaryKey": false,
514
+ "notNull": false,
515
+ "default": 0
516
+ },
517
+ "alert_threshold_pct": {
518
+ "name": "alert_threshold_pct",
519
+ "type": "integer",
520
+ "primaryKey": false,
521
+ "notNull": false,
522
+ "default": 80
523
+ },
524
+ "auto_pause": {
525
+ "name": "auto_pause",
526
+ "type": "boolean",
527
+ "primaryKey": false,
528
+ "notNull": false,
529
+ "default": false
530
+ },
531
+ "max_job_tokens": {
532
+ "name": "max_job_tokens",
533
+ "type": "integer",
534
+ "primaryKey": false,
535
+ "notNull": false,
536
+ "default": 150000
537
+ },
538
+ "created_at": {
539
+ "name": "created_at",
540
+ "type": "timestamp with time zone",
541
+ "primaryKey": false,
542
+ "notNull": false,
543
+ "default": "now()"
544
+ },
545
+ "updated_at": {
546
+ "name": "updated_at",
547
+ "type": "timestamp with time zone",
548
+ "primaryKey": false,
549
+ "notNull": false,
550
+ "default": "now()"
551
+ }
552
+ },
553
+ "indexes": {
554
+ "idx_agent_budgets_entity_id": {
555
+ "name": "idx_agent_budgets_entity_id",
556
+ "columns": [
557
+ {
558
+ "expression": "entity_id",
559
+ "isExpression": false,
560
+ "asc": true,
561
+ "nulls": "last"
562
+ }
563
+ ],
564
+ "isUnique": false,
565
+ "concurrently": false,
566
+ "method": "btree",
567
+ "with": {}
568
+ }
569
+ },
570
+ "foreignKeys": {
571
+ "agent_budgets_agent_id_agents_id_fk": {
572
+ "name": "agent_budgets_agent_id_agents_id_fk",
573
+ "tableFrom": "agent_budgets",
574
+ "tableTo": "agents",
575
+ "columnsFrom": ["agent_id"],
576
+ "columnsTo": ["id"],
577
+ "onDelete": "cascade",
578
+ "onUpdate": "no action"
579
+ },
580
+ "agent_budgets_entity_id_entities_id_fk": {
581
+ "name": "agent_budgets_entity_id_entities_id_fk",
582
+ "tableFrom": "agent_budgets",
583
+ "tableTo": "entities",
584
+ "columnsFrom": ["entity_id"],
585
+ "columnsTo": ["id"],
586
+ "onDelete": "cascade",
587
+ "onUpdate": "no action"
588
+ }
589
+ },
590
+ "compositePrimaryKeys": {},
591
+ "uniqueConstraints": {
592
+ "agent_budgets_agent_id_unique": {
593
+ "name": "agent_budgets_agent_id_unique",
594
+ "nullsNotDistinct": false,
595
+ "columns": ["agent_id"]
596
+ }
597
+ },
598
+ "policies": {},
599
+ "checkConstraints": {
600
+ "agent_budgets_alert_threshold_pct_check": {
601
+ "name": "agent_budgets_alert_threshold_pct_check",
602
+ "value": "\"agent_budgets\".\"alert_threshold_pct\" >= 0 AND \"agent_budgets\".\"alert_threshold_pct\" <= 100"
603
+ }
604
+ },
605
+ "isRLSEnabled": false
606
+ },
607
+ "public.agents": {
608
+ "name": "agents",
609
+ "schema": "",
610
+ "columns": {
611
+ "id": {
612
+ "name": "id",
613
+ "type": "uuid",
614
+ "primaryKey": true,
615
+ "notNull": true,
616
+ "default": "gen_random_uuid()"
617
+ },
618
+ "entity_id": {
619
+ "name": "entity_id",
620
+ "type": "uuid",
621
+ "primaryKey": false,
622
+ "notNull": false
623
+ },
624
+ "name": {
625
+ "name": "name",
626
+ "type": "text",
627
+ "primaryKey": false,
628
+ "notNull": true
629
+ },
630
+ "slug": {
631
+ "name": "slug",
632
+ "type": "text",
633
+ "primaryKey": false,
634
+ "notNull": true
635
+ },
636
+ "personality": {
637
+ "name": "personality",
638
+ "type": "text",
639
+ "primaryKey": false,
640
+ "notNull": true
641
+ },
642
+ "model": {
643
+ "name": "model",
644
+ "type": "text",
645
+ "primaryKey": false,
646
+ "notNull": false,
647
+ "default": "'claude-sonnet-4-6-20260217'"
648
+ },
649
+ "active": {
650
+ "name": "active",
651
+ "type": "boolean",
652
+ "primaryKey": false,
653
+ "notNull": false,
654
+ "default": true
655
+ },
656
+ "is_default": {
657
+ "name": "is_default",
658
+ "type": "boolean",
659
+ "primaryKey": false,
660
+ "notNull": false,
661
+ "default": false
662
+ },
663
+ "role": {
664
+ "name": "role",
665
+ "type": "text",
666
+ "primaryKey": false,
667
+ "notNull": false,
668
+ "default": "'agent'"
669
+ },
670
+ "orchestrator_mode": {
671
+ "name": "orchestrator_mode",
672
+ "type": "text",
673
+ "primaryKey": false,
674
+ "notNull": false
675
+ },
676
+ "telegram_bot_token": {
677
+ "name": "telegram_bot_token",
678
+ "type": "text",
679
+ "primaryKey": false,
680
+ "notNull": false
681
+ },
682
+ "telegram_bot_username": {
683
+ "name": "telegram_bot_username",
684
+ "type": "text",
685
+ "primaryKey": false,
686
+ "notNull": false
687
+ },
688
+ "telegram_offset": {
689
+ "name": "telegram_offset",
690
+ "type": "bigint",
691
+ "primaryKey": false,
692
+ "notNull": false
693
+ },
694
+ "requires_approval": {
695
+ "name": "requires_approval",
696
+ "type": "text[]",
697
+ "primaryKey": false,
698
+ "notNull": false,
699
+ "default": "'{}'::text[]"
700
+ },
701
+ "capabilities": {
702
+ "name": "capabilities",
703
+ "type": "text[]",
704
+ "primaryKey": false,
705
+ "notNull": false,
706
+ "default": "'{}'::text[]"
707
+ },
708
+ "task_context_template": {
709
+ "name": "task_context_template",
710
+ "type": "text",
711
+ "primaryKey": false,
712
+ "notNull": false
713
+ },
714
+ "avatar_url": {
715
+ "name": "avatar_url",
716
+ "type": "text",
717
+ "primaryKey": false,
718
+ "notNull": false
719
+ },
720
+ "system_agent": {
721
+ "name": "system_agent",
722
+ "type": "boolean",
723
+ "primaryKey": false,
724
+ "notNull": false,
725
+ "default": false
726
+ },
727
+ "max_tokens_per_job": {
728
+ "name": "max_tokens_per_job",
729
+ "type": "integer",
730
+ "primaryKey": false,
731
+ "notNull": true,
732
+ "default": 0
733
+ },
734
+ "enabled_builtin_tools": {
735
+ "name": "enabled_builtin_tools",
736
+ "type": "text[]",
737
+ "primaryKey": false,
738
+ "notNull": false
739
+ },
740
+ "created_at": {
741
+ "name": "created_at",
742
+ "type": "timestamp with time zone",
743
+ "primaryKey": false,
744
+ "notNull": false,
745
+ "default": "now()"
746
+ },
747
+ "updated_at": {
748
+ "name": "updated_at",
749
+ "type": "timestamp with time zone",
750
+ "primaryKey": false,
751
+ "notNull": false,
752
+ "default": "now()"
753
+ }
754
+ },
755
+ "indexes": {
756
+ "idx_agents_entity_id": {
757
+ "name": "idx_agents_entity_id",
758
+ "columns": [
759
+ {
760
+ "expression": "entity_id",
761
+ "isExpression": false,
762
+ "asc": true,
763
+ "nulls": "last"
764
+ }
765
+ ],
766
+ "isUnique": false,
767
+ "concurrently": false,
768
+ "method": "btree",
769
+ "with": {}
770
+ }
771
+ },
772
+ "foreignKeys": {
773
+ "agents_entity_id_entities_id_fk": {
774
+ "name": "agents_entity_id_entities_id_fk",
775
+ "tableFrom": "agents",
776
+ "tableTo": "entities",
777
+ "columnsFrom": ["entity_id"],
778
+ "columnsTo": ["id"],
779
+ "onDelete": "cascade",
780
+ "onUpdate": "no action"
781
+ }
782
+ },
783
+ "compositePrimaryKeys": {},
784
+ "uniqueConstraints": {
785
+ "agents_slug_unique": {
786
+ "name": "agents_slug_unique",
787
+ "nullsNotDistinct": false,
788
+ "columns": ["slug"]
789
+ }
790
+ },
791
+ "policies": {},
792
+ "checkConstraints": {
793
+ "agents_role_check": {
794
+ "name": "agents_role_check",
795
+ "value": "\"agents\".\"role\" IN ('agent', 'orchestrator', 'system')"
796
+ },
797
+ "agents_orchestrator_mode_check": {
798
+ "name": "agents_orchestrator_mode_check",
799
+ "value": "\"agents\".\"orchestrator_mode\" IN ('router', 'planner') OR \"agents\".\"orchestrator_mode\" IS NULL"
800
+ },
801
+ "agents_max_tokens_per_job_check": {
802
+ "name": "agents_max_tokens_per_job_check",
803
+ "value": "\"agents\".\"max_tokens_per_job\" >= 0"
804
+ }
805
+ },
806
+ "isRLSEnabled": false
807
+ },
808
+ "public.agent_jobs": {
809
+ "name": "agent_jobs",
810
+ "schema": "",
811
+ "columns": {
812
+ "id": {
813
+ "name": "id",
814
+ "type": "uuid",
815
+ "primaryKey": true,
816
+ "notNull": true,
817
+ "default": "gen_random_uuid()"
818
+ },
819
+ "entity_id": {
820
+ "name": "entity_id",
821
+ "type": "uuid",
822
+ "primaryKey": false,
823
+ "notNull": false
824
+ },
825
+ "agent_id": {
826
+ "name": "agent_id",
827
+ "type": "uuid",
828
+ "primaryKey": false,
829
+ "notNull": false
830
+ },
831
+ "status": {
832
+ "name": "status",
833
+ "type": "text",
834
+ "primaryKey": false,
835
+ "notNull": false,
836
+ "default": "'pending'"
837
+ },
838
+ "channel": {
839
+ "name": "channel",
840
+ "type": "text",
841
+ "primaryKey": false,
842
+ "notNull": true
843
+ },
844
+ "task": {
845
+ "name": "task",
846
+ "type": "text",
847
+ "primaryKey": false,
848
+ "notNull": true
849
+ },
850
+ "original_task": {
851
+ "name": "original_task",
852
+ "type": "text",
853
+ "primaryKey": false,
854
+ "notNull": false
855
+ },
856
+ "chat_id": {
857
+ "name": "chat_id",
858
+ "type": "text",
859
+ "primaryKey": false,
860
+ "notNull": false
861
+ },
862
+ "system_prompt": {
863
+ "name": "system_prompt",
864
+ "type": "text",
865
+ "primaryKey": false,
866
+ "notNull": false
867
+ },
868
+ "messages": {
869
+ "name": "messages",
870
+ "type": "jsonb",
871
+ "primaryKey": false,
872
+ "notNull": false,
873
+ "default": "'[]'::jsonb"
874
+ },
875
+ "tools_used": {
876
+ "name": "tools_used",
877
+ "type": "text[]",
878
+ "primaryKey": false,
879
+ "notNull": false,
880
+ "default": "'{}'::text[]"
881
+ },
882
+ "turn": {
883
+ "name": "turn",
884
+ "type": "integer",
885
+ "primaryKey": false,
886
+ "notNull": false,
887
+ "default": 0
888
+ },
889
+ "result": {
890
+ "name": "result",
891
+ "type": "text",
892
+ "primaryKey": false,
893
+ "notNull": false
894
+ },
895
+ "error": {
896
+ "name": "error",
897
+ "type": "text",
898
+ "primaryKey": false,
899
+ "notNull": false
900
+ },
901
+ "chain_count": {
902
+ "name": "chain_count",
903
+ "type": "integer",
904
+ "primaryKey": false,
905
+ "notNull": false,
906
+ "default": 0
907
+ },
908
+ "request_id": {
909
+ "name": "request_id",
910
+ "type": "text",
911
+ "primaryKey": false,
912
+ "notNull": false
913
+ },
914
+ "parent_job_id": {
915
+ "name": "parent_job_id",
916
+ "type": "uuid",
917
+ "primaryKey": false,
918
+ "notNull": false
919
+ },
920
+ "parent_request_id": {
921
+ "name": "parent_request_id",
922
+ "type": "text",
923
+ "primaryKey": false,
924
+ "notNull": false
925
+ },
926
+ "total_duration_ms": {
927
+ "name": "total_duration_ms",
928
+ "type": "integer",
929
+ "primaryKey": false,
930
+ "notNull": false,
931
+ "default": 0
932
+ },
933
+ "input_tokens": {
934
+ "name": "input_tokens",
935
+ "type": "integer",
936
+ "primaryKey": false,
937
+ "notNull": false,
938
+ "default": 0
939
+ },
940
+ "output_tokens": {
941
+ "name": "output_tokens",
942
+ "type": "integer",
943
+ "primaryKey": false,
944
+ "notNull": false,
945
+ "default": 0
946
+ },
947
+ "delegation_depth": {
948
+ "name": "delegation_depth",
949
+ "type": "integer",
950
+ "primaryKey": false,
951
+ "notNull": false,
952
+ "default": 0
953
+ },
954
+ "pending_delegation": {
955
+ "name": "pending_delegation",
956
+ "type": "jsonb",
957
+ "primaryKey": false,
958
+ "notNull": false
959
+ },
960
+ "completed_at": {
961
+ "name": "completed_at",
962
+ "type": "timestamp with time zone",
963
+ "primaryKey": false,
964
+ "notNull": false
965
+ },
966
+ "created_at": {
967
+ "name": "created_at",
968
+ "type": "timestamp with time zone",
969
+ "primaryKey": false,
970
+ "notNull": false,
971
+ "default": "now()"
972
+ },
973
+ "updated_at": {
974
+ "name": "updated_at",
975
+ "type": "timestamp with time zone",
976
+ "primaryKey": false,
977
+ "notNull": false,
978
+ "default": "now()"
979
+ }
980
+ },
981
+ "indexes": {
982
+ "idx_agent_jobs_entity_id": {
983
+ "name": "idx_agent_jobs_entity_id",
984
+ "columns": [
985
+ {
986
+ "expression": "entity_id",
987
+ "isExpression": false,
988
+ "asc": true,
989
+ "nulls": "last"
990
+ }
991
+ ],
992
+ "isUnique": false,
993
+ "concurrently": false,
994
+ "method": "btree",
995
+ "with": {}
996
+ },
997
+ "idx_agent_jobs_entity_created": {
998
+ "name": "idx_agent_jobs_entity_created",
999
+ "columns": [
1000
+ {
1001
+ "expression": "entity_id",
1002
+ "isExpression": false,
1003
+ "asc": true,
1004
+ "nulls": "last"
1005
+ },
1006
+ {
1007
+ "expression": "\"created_at\" DESC",
1008
+ "asc": true,
1009
+ "isExpression": true,
1010
+ "nulls": "last"
1011
+ }
1012
+ ],
1013
+ "isUnique": false,
1014
+ "concurrently": false,
1015
+ "method": "btree",
1016
+ "with": {}
1017
+ },
1018
+ "idx_agent_jobs_entity_status_created": {
1019
+ "name": "idx_agent_jobs_entity_status_created",
1020
+ "columns": [
1021
+ {
1022
+ "expression": "entity_id",
1023
+ "isExpression": false,
1024
+ "asc": true,
1025
+ "nulls": "last"
1026
+ },
1027
+ {
1028
+ "expression": "status",
1029
+ "isExpression": false,
1030
+ "asc": true,
1031
+ "nulls": "last"
1032
+ },
1033
+ {
1034
+ "expression": "\"created_at\" DESC",
1035
+ "asc": true,
1036
+ "isExpression": true,
1037
+ "nulls": "last"
1038
+ }
1039
+ ],
1040
+ "isUnique": false,
1041
+ "concurrently": false,
1042
+ "method": "btree",
1043
+ "with": {}
1044
+ },
1045
+ "idx_agent_jobs_parent_job_id": {
1046
+ "name": "idx_agent_jobs_parent_job_id",
1047
+ "columns": [
1048
+ {
1049
+ "expression": "parent_job_id",
1050
+ "isExpression": false,
1051
+ "asc": true,
1052
+ "nulls": "last"
1053
+ }
1054
+ ],
1055
+ "isUnique": false,
1056
+ "concurrently": false,
1057
+ "method": "btree",
1058
+ "with": {}
1059
+ },
1060
+ "idx_jobs_parent": {
1061
+ "name": "idx_jobs_parent",
1062
+ "columns": [
1063
+ {
1064
+ "expression": "parent_job_id",
1065
+ "isExpression": false,
1066
+ "asc": true,
1067
+ "nulls": "last"
1068
+ }
1069
+ ],
1070
+ "isUnique": false,
1071
+ "concurrently": false,
1072
+ "method": "btree",
1073
+ "with": {}
1074
+ },
1075
+ "idx_jobs_status": {
1076
+ "name": "idx_jobs_status",
1077
+ "columns": [
1078
+ {
1079
+ "expression": "status",
1080
+ "isExpression": false,
1081
+ "asc": true,
1082
+ "nulls": "last"
1083
+ },
1084
+ {
1085
+ "expression": "created_at",
1086
+ "isExpression": false,
1087
+ "asc": true,
1088
+ "nulls": "last"
1089
+ }
1090
+ ],
1091
+ "isUnique": false,
1092
+ "concurrently": false,
1093
+ "method": "btree",
1094
+ "with": {}
1095
+ }
1096
+ },
1097
+ "foreignKeys": {
1098
+ "agent_jobs_entity_id_entities_id_fk": {
1099
+ "name": "agent_jobs_entity_id_entities_id_fk",
1100
+ "tableFrom": "agent_jobs",
1101
+ "tableTo": "entities",
1102
+ "columnsFrom": ["entity_id"],
1103
+ "columnsTo": ["id"],
1104
+ "onDelete": "cascade",
1105
+ "onUpdate": "no action"
1106
+ },
1107
+ "agent_jobs_agent_id_agents_id_fk": {
1108
+ "name": "agent_jobs_agent_id_agents_id_fk",
1109
+ "tableFrom": "agent_jobs",
1110
+ "tableTo": "agents",
1111
+ "columnsFrom": ["agent_id"],
1112
+ "columnsTo": ["id"],
1113
+ "onDelete": "no action",
1114
+ "onUpdate": "no action"
1115
+ }
1116
+ },
1117
+ "compositePrimaryKeys": {},
1118
+ "uniqueConstraints": {},
1119
+ "policies": {},
1120
+ "checkConstraints": {
1121
+ "agent_jobs_status_check": {
1122
+ "name": "agent_jobs_status_check",
1123
+ "value": "\"agent_jobs\".\"status\" IN ('pending','processing','completed','failed','awaiting_approval','awaiting_delegation','cancelled')"
1124
+ },
1125
+ "agent_jobs_channel_check": {
1126
+ "name": "agent_jobs_channel_check",
1127
+ "value": "\"agent_jobs\".\"channel\" IN ('telegram','api','whatsapp','internal','cron','task-board','slack','discord')"
1128
+ }
1129
+ },
1130
+ "isRLSEnabled": false
1131
+ },
1132
+ "public.agent_tasks": {
1133
+ "name": "agent_tasks",
1134
+ "schema": "",
1135
+ "columns": {
1136
+ "id": {
1137
+ "name": "id",
1138
+ "type": "uuid",
1139
+ "primaryKey": true,
1140
+ "notNull": true,
1141
+ "default": "gen_random_uuid()"
1142
+ },
1143
+ "entity_id": {
1144
+ "name": "entity_id",
1145
+ "type": "uuid",
1146
+ "primaryKey": false,
1147
+ "notNull": true
1148
+ },
1149
+ "orchestrator_id": {
1150
+ "name": "orchestrator_id",
1151
+ "type": "uuid",
1152
+ "primaryKey": false,
1153
+ "notNull": true
1154
+ },
1155
+ "title": {
1156
+ "name": "title",
1157
+ "type": "text",
1158
+ "primaryKey": false,
1159
+ "notNull": true
1160
+ },
1161
+ "description": {
1162
+ "name": "description",
1163
+ "type": "text",
1164
+ "primaryKey": false,
1165
+ "notNull": false
1166
+ },
1167
+ "status": {
1168
+ "name": "status",
1169
+ "type": "text",
1170
+ "primaryKey": false,
1171
+ "notNull": true,
1172
+ "default": "'todo'"
1173
+ },
1174
+ "priority": {
1175
+ "name": "priority",
1176
+ "type": "text",
1177
+ "primaryKey": false,
1178
+ "notNull": true,
1179
+ "default": "'medium'"
1180
+ },
1181
+ "job_id": {
1182
+ "name": "job_id",
1183
+ "type": "uuid",
1184
+ "primaryKey": false,
1185
+ "notNull": false
1186
+ },
1187
+ "result": {
1188
+ "name": "result",
1189
+ "type": "text",
1190
+ "primaryKey": false,
1191
+ "notNull": false
1192
+ },
1193
+ "created_by_agent_id": {
1194
+ "name": "created_by_agent_id",
1195
+ "type": "uuid",
1196
+ "primaryKey": false,
1197
+ "notNull": false
1198
+ },
1199
+ "assigned_agent_id": {
1200
+ "name": "assigned_agent_id",
1201
+ "type": "uuid",
1202
+ "primaryKey": false,
1203
+ "notNull": false
1204
+ },
1205
+ "input_tokens": {
1206
+ "name": "input_tokens",
1207
+ "type": "integer",
1208
+ "primaryKey": false,
1209
+ "notNull": false,
1210
+ "default": 0
1211
+ },
1212
+ "output_tokens": {
1213
+ "name": "output_tokens",
1214
+ "type": "integer",
1215
+ "primaryKey": false,
1216
+ "notNull": false,
1217
+ "default": 0
1218
+ },
1219
+ "cost_usd": {
1220
+ "name": "cost_usd",
1221
+ "type": "numeric(10, 6)",
1222
+ "primaryKey": false,
1223
+ "notNull": false,
1224
+ "default": "'0'"
1225
+ },
1226
+ "depends_on": {
1227
+ "name": "depends_on",
1228
+ "type": "uuid[]",
1229
+ "primaryKey": false,
1230
+ "notNull": false,
1231
+ "default": "'{}'::uuid[]"
1232
+ },
1233
+ "context": {
1234
+ "name": "context",
1235
+ "type": "jsonb",
1236
+ "primaryKey": false,
1237
+ "notNull": false,
1238
+ "default": "'{}'::jsonb"
1239
+ },
1240
+ "root_job_id": {
1241
+ "name": "root_job_id",
1242
+ "type": "uuid",
1243
+ "primaryKey": false,
1244
+ "notNull": false
1245
+ },
1246
+ "locked_at": {
1247
+ "name": "locked_at",
1248
+ "type": "timestamp with time zone",
1249
+ "primaryKey": false,
1250
+ "notNull": false
1251
+ },
1252
+ "locked_by": {
1253
+ "name": "locked_by",
1254
+ "type": "text",
1255
+ "primaryKey": false,
1256
+ "notNull": false
1257
+ },
1258
+ "created_at": {
1259
+ "name": "created_at",
1260
+ "type": "timestamp with time zone",
1261
+ "primaryKey": false,
1262
+ "notNull": true,
1263
+ "default": "now()"
1264
+ },
1265
+ "updated_at": {
1266
+ "name": "updated_at",
1267
+ "type": "timestamp with time zone",
1268
+ "primaryKey": false,
1269
+ "notNull": true,
1270
+ "default": "now()"
1271
+ }
1272
+ },
1273
+ "indexes": {
1274
+ "idx_agent_tasks_entity": {
1275
+ "name": "idx_agent_tasks_entity",
1276
+ "columns": [
1277
+ {
1278
+ "expression": "entity_id",
1279
+ "isExpression": false,
1280
+ "asc": true,
1281
+ "nulls": "last"
1282
+ }
1283
+ ],
1284
+ "isUnique": false,
1285
+ "concurrently": false,
1286
+ "method": "btree",
1287
+ "with": {}
1288
+ },
1289
+ "idx_agent_tasks_entity_status_created": {
1290
+ "name": "idx_agent_tasks_entity_status_created",
1291
+ "columns": [
1292
+ {
1293
+ "expression": "entity_id",
1294
+ "isExpression": false,
1295
+ "asc": true,
1296
+ "nulls": "last"
1297
+ },
1298
+ {
1299
+ "expression": "status",
1300
+ "isExpression": false,
1301
+ "asc": true,
1302
+ "nulls": "last"
1303
+ },
1304
+ {
1305
+ "expression": "\"created_at\" DESC",
1306
+ "asc": true,
1307
+ "isExpression": true,
1308
+ "nulls": "last"
1309
+ }
1310
+ ],
1311
+ "isUnique": false,
1312
+ "concurrently": false,
1313
+ "method": "btree",
1314
+ "with": {}
1315
+ },
1316
+ "idx_agent_tasks_orchestrator_status": {
1317
+ "name": "idx_agent_tasks_orchestrator_status",
1318
+ "columns": [
1319
+ {
1320
+ "expression": "orchestrator_id",
1321
+ "isExpression": false,
1322
+ "asc": true,
1323
+ "nulls": "last"
1324
+ },
1325
+ {
1326
+ "expression": "status",
1327
+ "isExpression": false,
1328
+ "asc": true,
1329
+ "nulls": "last"
1330
+ }
1331
+ ],
1332
+ "isUnique": false,
1333
+ "concurrently": false,
1334
+ "method": "btree",
1335
+ "with": {}
1336
+ },
1337
+ "idx_agent_tasks_status": {
1338
+ "name": "idx_agent_tasks_status",
1339
+ "columns": [
1340
+ {
1341
+ "expression": "status",
1342
+ "isExpression": false,
1343
+ "asc": true,
1344
+ "nulls": "last"
1345
+ }
1346
+ ],
1347
+ "isUnique": false,
1348
+ "concurrently": false,
1349
+ "method": "btree",
1350
+ "with": {}
1351
+ },
1352
+ "idx_agent_tasks_assigned": {
1353
+ "name": "idx_agent_tasks_assigned",
1354
+ "columns": [
1355
+ {
1356
+ "expression": "assigned_agent_id",
1357
+ "isExpression": false,
1358
+ "asc": true,
1359
+ "nulls": "last"
1360
+ }
1361
+ ],
1362
+ "isUnique": false,
1363
+ "concurrently": false,
1364
+ "method": "btree",
1365
+ "with": {}
1366
+ }
1367
+ },
1368
+ "foreignKeys": {
1369
+ "agent_tasks_entity_id_entities_id_fk": {
1370
+ "name": "agent_tasks_entity_id_entities_id_fk",
1371
+ "tableFrom": "agent_tasks",
1372
+ "tableTo": "entities",
1373
+ "columnsFrom": ["entity_id"],
1374
+ "columnsTo": ["id"],
1375
+ "onDelete": "cascade",
1376
+ "onUpdate": "no action"
1377
+ },
1378
+ "agent_tasks_orchestrator_id_agents_id_fk": {
1379
+ "name": "agent_tasks_orchestrator_id_agents_id_fk",
1380
+ "tableFrom": "agent_tasks",
1381
+ "tableTo": "agents",
1382
+ "columnsFrom": ["orchestrator_id"],
1383
+ "columnsTo": ["id"],
1384
+ "onDelete": "cascade",
1385
+ "onUpdate": "no action"
1386
+ },
1387
+ "agent_tasks_job_id_agent_jobs_id_fk": {
1388
+ "name": "agent_tasks_job_id_agent_jobs_id_fk",
1389
+ "tableFrom": "agent_tasks",
1390
+ "tableTo": "agent_jobs",
1391
+ "columnsFrom": ["job_id"],
1392
+ "columnsTo": ["id"],
1393
+ "onDelete": "set null",
1394
+ "onUpdate": "no action"
1395
+ },
1396
+ "agent_tasks_created_by_agent_id_agents_id_fk": {
1397
+ "name": "agent_tasks_created_by_agent_id_agents_id_fk",
1398
+ "tableFrom": "agent_tasks",
1399
+ "tableTo": "agents",
1400
+ "columnsFrom": ["created_by_agent_id"],
1401
+ "columnsTo": ["id"],
1402
+ "onDelete": "no action",
1403
+ "onUpdate": "no action"
1404
+ },
1405
+ "agent_tasks_assigned_agent_id_agents_id_fk": {
1406
+ "name": "agent_tasks_assigned_agent_id_agents_id_fk",
1407
+ "tableFrom": "agent_tasks",
1408
+ "tableTo": "agents",
1409
+ "columnsFrom": ["assigned_agent_id"],
1410
+ "columnsTo": ["id"],
1411
+ "onDelete": "no action",
1412
+ "onUpdate": "no action"
1413
+ }
1414
+ },
1415
+ "compositePrimaryKeys": {},
1416
+ "uniqueConstraints": {},
1417
+ "policies": {},
1418
+ "checkConstraints": {
1419
+ "agent_tasks_status_check": {
1420
+ "name": "agent_tasks_status_check",
1421
+ "value": "\"agent_tasks\".\"status\" IN ('todo','in_progress','done','cancelled','blocked')"
1422
+ },
1423
+ "agent_tasks_priority_check": {
1424
+ "name": "agent_tasks_priority_check",
1425
+ "value": "\"agent_tasks\".\"priority\" IN ('low','medium','high')"
1426
+ },
1427
+ "agent_tasks_title_check": {
1428
+ "name": "agent_tasks_title_check",
1429
+ "value": "char_length(\"agent_tasks\".\"title\") <= 200"
1430
+ },
1431
+ "agent_tasks_description_check": {
1432
+ "name": "agent_tasks_description_check",
1433
+ "value": "\"agent_tasks\".\"description\" IS NULL OR char_length(\"agent_tasks\".\"description\") <= 2000"
1434
+ }
1435
+ },
1436
+ "isRLSEnabled": false
1437
+ },
1438
+ "public.connectors": {
1439
+ "name": "connectors",
1440
+ "schema": "",
1441
+ "columns": {
1442
+ "id": {
1443
+ "name": "id",
1444
+ "type": "uuid",
1445
+ "primaryKey": true,
1446
+ "notNull": true,
1447
+ "default": "gen_random_uuid()"
1448
+ },
1449
+ "entity_id": {
1450
+ "name": "entity_id",
1451
+ "type": "uuid",
1452
+ "primaryKey": false,
1453
+ "notNull": false
1454
+ },
1455
+ "name": {
1456
+ "name": "name",
1457
+ "type": "text",
1458
+ "primaryKey": false,
1459
+ "notNull": true
1460
+ },
1461
+ "slug": {
1462
+ "name": "slug",
1463
+ "type": "text",
1464
+ "primaryKey": false,
1465
+ "notNull": true
1466
+ },
1467
+ "base_url": {
1468
+ "name": "base_url",
1469
+ "type": "text",
1470
+ "primaryKey": false,
1471
+ "notNull": false
1472
+ },
1473
+ "api_key": {
1474
+ "name": "api_key",
1475
+ "type": "text",
1476
+ "primaryKey": false,
1477
+ "notNull": false
1478
+ },
1479
+ "active": {
1480
+ "name": "active",
1481
+ "type": "boolean",
1482
+ "primaryKey": false,
1483
+ "notNull": false,
1484
+ "default": true
1485
+ },
1486
+ "auth_type": {
1487
+ "name": "auth_type",
1488
+ "type": "text",
1489
+ "primaryKey": false,
1490
+ "notNull": true,
1491
+ "default": "'api_key'"
1492
+ },
1493
+ "oauth_client_id": {
1494
+ "name": "oauth_client_id",
1495
+ "type": "text",
1496
+ "primaryKey": false,
1497
+ "notNull": false
1498
+ },
1499
+ "oauth_client_secret": {
1500
+ "name": "oauth_client_secret",
1501
+ "type": "text",
1502
+ "primaryKey": false,
1503
+ "notNull": false
1504
+ },
1505
+ "oauth_refresh_token": {
1506
+ "name": "oauth_refresh_token",
1507
+ "type": "text",
1508
+ "primaryKey": false,
1509
+ "notNull": false
1510
+ },
1511
+ "oauth_access_token": {
1512
+ "name": "oauth_access_token",
1513
+ "type": "text",
1514
+ "primaryKey": false,
1515
+ "notNull": false
1516
+ },
1517
+ "oauth_token_expires_at": {
1518
+ "name": "oauth_token_expires_at",
1519
+ "type": "timestamp with time zone",
1520
+ "primaryKey": false,
1521
+ "notNull": false
1522
+ },
1523
+ "oauth_token_url": {
1524
+ "name": "oauth_token_url",
1525
+ "type": "text",
1526
+ "primaryKey": false,
1527
+ "notNull": false
1528
+ },
1529
+ "oauth_scopes": {
1530
+ "name": "oauth_scopes",
1531
+ "type": "text",
1532
+ "primaryKey": false,
1533
+ "notNull": false
1534
+ },
1535
+ "oauth_account_name": {
1536
+ "name": "oauth_account_name",
1537
+ "type": "text",
1538
+ "primaryKey": false,
1539
+ "notNull": false
1540
+ },
1541
+ "created_at": {
1542
+ "name": "created_at",
1543
+ "type": "timestamp with time zone",
1544
+ "primaryKey": false,
1545
+ "notNull": false,
1546
+ "default": "now()"
1547
+ },
1548
+ "updated_at": {
1549
+ "name": "updated_at",
1550
+ "type": "timestamp with time zone",
1551
+ "primaryKey": false,
1552
+ "notNull": false,
1553
+ "default": "now()"
1554
+ }
1555
+ },
1556
+ "indexes": {
1557
+ "idx_connectors_entity_id": {
1558
+ "name": "idx_connectors_entity_id",
1559
+ "columns": [
1560
+ {
1561
+ "expression": "entity_id",
1562
+ "isExpression": false,
1563
+ "asc": true,
1564
+ "nulls": "last"
1565
+ }
1566
+ ],
1567
+ "isUnique": false,
1568
+ "concurrently": false,
1569
+ "method": "btree",
1570
+ "with": {}
1571
+ }
1572
+ },
1573
+ "foreignKeys": {
1574
+ "connectors_entity_id_entities_id_fk": {
1575
+ "name": "connectors_entity_id_entities_id_fk",
1576
+ "tableFrom": "connectors",
1577
+ "tableTo": "entities",
1578
+ "columnsFrom": ["entity_id"],
1579
+ "columnsTo": ["id"],
1580
+ "onDelete": "cascade",
1581
+ "onUpdate": "no action"
1582
+ }
1583
+ },
1584
+ "compositePrimaryKeys": {},
1585
+ "uniqueConstraints": {
1586
+ "connectors_slug_unique": {
1587
+ "name": "connectors_slug_unique",
1588
+ "nullsNotDistinct": false,
1589
+ "columns": ["slug"]
1590
+ }
1591
+ },
1592
+ "policies": {},
1593
+ "checkConstraints": {
1594
+ "connectors_auth_type_check": {
1595
+ "name": "connectors_auth_type_check",
1596
+ "value": "\"connectors\".\"auth_type\" IN ('api_key','oauth2','bearer','basic','none')"
1597
+ }
1598
+ },
1599
+ "isRLSEnabled": false
1600
+ },
1601
+ "public.tool_calls": {
1602
+ "name": "tool_calls",
1603
+ "schema": "",
1604
+ "columns": {
1605
+ "id": {
1606
+ "name": "id",
1607
+ "type": "uuid",
1608
+ "primaryKey": true,
1609
+ "notNull": true,
1610
+ "default": "gen_random_uuid()"
1611
+ },
1612
+ "entity_id": {
1613
+ "name": "entity_id",
1614
+ "type": "uuid",
1615
+ "primaryKey": false,
1616
+ "notNull": false
1617
+ },
1618
+ "job_id": {
1619
+ "name": "job_id",
1620
+ "type": "uuid",
1621
+ "primaryKey": false,
1622
+ "notNull": false
1623
+ },
1624
+ "tool_name": {
1625
+ "name": "tool_name",
1626
+ "type": "text",
1627
+ "primaryKey": false,
1628
+ "notNull": true
1629
+ },
1630
+ "tool_input": {
1631
+ "name": "tool_input",
1632
+ "type": "jsonb",
1633
+ "primaryKey": false,
1634
+ "notNull": false
1635
+ },
1636
+ "tool_output": {
1637
+ "name": "tool_output",
1638
+ "type": "text",
1639
+ "primaryKey": false,
1640
+ "notNull": false
1641
+ },
1642
+ "duration_ms": {
1643
+ "name": "duration_ms",
1644
+ "type": "integer",
1645
+ "primaryKey": false,
1646
+ "notNull": false
1647
+ },
1648
+ "turn": {
1649
+ "name": "turn",
1650
+ "type": "integer",
1651
+ "primaryKey": false,
1652
+ "notNull": false
1653
+ },
1654
+ "created_at": {
1655
+ "name": "created_at",
1656
+ "type": "timestamp with time zone",
1657
+ "primaryKey": false,
1658
+ "notNull": false,
1659
+ "default": "now()"
1660
+ }
1661
+ },
1662
+ "indexes": {
1663
+ "idx_tool_calls_entity_id": {
1664
+ "name": "idx_tool_calls_entity_id",
1665
+ "columns": [
1666
+ {
1667
+ "expression": "entity_id",
1668
+ "isExpression": false,
1669
+ "asc": true,
1670
+ "nulls": "last"
1671
+ }
1672
+ ],
1673
+ "isUnique": false,
1674
+ "concurrently": false,
1675
+ "method": "btree",
1676
+ "with": {}
1677
+ },
1678
+ "idx_tool_calls_job": {
1679
+ "name": "idx_tool_calls_job",
1680
+ "columns": [
1681
+ {
1682
+ "expression": "job_id",
1683
+ "isExpression": false,
1684
+ "asc": true,
1685
+ "nulls": "last"
1686
+ }
1687
+ ],
1688
+ "isUnique": false,
1689
+ "concurrently": false,
1690
+ "method": "btree",
1691
+ "with": {}
1692
+ },
1693
+ "idx_tool_calls_job_created": {
1694
+ "name": "idx_tool_calls_job_created",
1695
+ "columns": [
1696
+ {
1697
+ "expression": "job_id",
1698
+ "isExpression": false,
1699
+ "asc": true,
1700
+ "nulls": "last"
1701
+ },
1702
+ {
1703
+ "expression": "\"created_at\" DESC",
1704
+ "asc": true,
1705
+ "isExpression": true,
1706
+ "nulls": "last"
1707
+ }
1708
+ ],
1709
+ "isUnique": false,
1710
+ "concurrently": false,
1711
+ "method": "btree",
1712
+ "with": {}
1713
+ },
1714
+ "idx_tool_calls_recent": {
1715
+ "name": "idx_tool_calls_recent",
1716
+ "columns": [
1717
+ {
1718
+ "expression": "\"created_at\" DESC",
1719
+ "asc": true,
1720
+ "isExpression": true,
1721
+ "nulls": "last"
1722
+ }
1723
+ ],
1724
+ "isUnique": false,
1725
+ "concurrently": false,
1726
+ "method": "btree",
1727
+ "with": {}
1728
+ }
1729
+ },
1730
+ "foreignKeys": {
1731
+ "tool_calls_entity_id_entities_id_fk": {
1732
+ "name": "tool_calls_entity_id_entities_id_fk",
1733
+ "tableFrom": "tool_calls",
1734
+ "tableTo": "entities",
1735
+ "columnsFrom": ["entity_id"],
1736
+ "columnsTo": ["id"],
1737
+ "onDelete": "cascade",
1738
+ "onUpdate": "no action"
1739
+ },
1740
+ "tool_calls_job_id_agent_jobs_id_fk": {
1741
+ "name": "tool_calls_job_id_agent_jobs_id_fk",
1742
+ "tableFrom": "tool_calls",
1743
+ "tableTo": "agent_jobs",
1744
+ "columnsFrom": ["job_id"],
1745
+ "columnsTo": ["id"],
1746
+ "onDelete": "cascade",
1747
+ "onUpdate": "no action"
1748
+ }
1749
+ },
1750
+ "compositePrimaryKeys": {},
1751
+ "uniqueConstraints": {},
1752
+ "policies": {},
1753
+ "checkConstraints": {},
1754
+ "isRLSEnabled": false
1755
+ },
1756
+ "public.approval_requests": {
1757
+ "name": "approval_requests",
1758
+ "schema": "",
1759
+ "columns": {
1760
+ "id": {
1761
+ "name": "id",
1762
+ "type": "uuid",
1763
+ "primaryKey": true,
1764
+ "notNull": true,
1765
+ "default": "gen_random_uuid()"
1766
+ },
1767
+ "entity_id": {
1768
+ "name": "entity_id",
1769
+ "type": "uuid",
1770
+ "primaryKey": false,
1771
+ "notNull": false
1772
+ },
1773
+ "job_id": {
1774
+ "name": "job_id",
1775
+ "type": "uuid",
1776
+ "primaryKey": false,
1777
+ "notNull": true
1778
+ },
1779
+ "agent_id": {
1780
+ "name": "agent_id",
1781
+ "type": "uuid",
1782
+ "primaryKey": false,
1783
+ "notNull": false
1784
+ },
1785
+ "tool_name": {
1786
+ "name": "tool_name",
1787
+ "type": "text",
1788
+ "primaryKey": false,
1789
+ "notNull": true
1790
+ },
1791
+ "tool_input": {
1792
+ "name": "tool_input",
1793
+ "type": "jsonb",
1794
+ "primaryKey": false,
1795
+ "notNull": true
1796
+ },
1797
+ "status": {
1798
+ "name": "status",
1799
+ "type": "text",
1800
+ "primaryKey": false,
1801
+ "notNull": false,
1802
+ "default": "'pending'"
1803
+ },
1804
+ "requested_at": {
1805
+ "name": "requested_at",
1806
+ "type": "timestamp with time zone",
1807
+ "primaryKey": false,
1808
+ "notNull": false,
1809
+ "default": "now()"
1810
+ },
1811
+ "resolved_at": {
1812
+ "name": "resolved_at",
1813
+ "type": "timestamp with time zone",
1814
+ "primaryKey": false,
1815
+ "notNull": false
1816
+ },
1817
+ "resolved_by": {
1818
+ "name": "resolved_by",
1819
+ "type": "text",
1820
+ "primaryKey": false,
1821
+ "notNull": false
1822
+ },
1823
+ "expires_at": {
1824
+ "name": "expires_at",
1825
+ "type": "timestamp with time zone",
1826
+ "primaryKey": false,
1827
+ "notNull": false,
1828
+ "default": "now() + interval '1 hour'"
1829
+ },
1830
+ "notes": {
1831
+ "name": "notes",
1832
+ "type": "text",
1833
+ "primaryKey": false,
1834
+ "notNull": false
1835
+ }
1836
+ },
1837
+ "indexes": {
1838
+ "idx_approval_requests_entity_id": {
1839
+ "name": "idx_approval_requests_entity_id",
1840
+ "columns": [
1841
+ {
1842
+ "expression": "entity_id",
1843
+ "isExpression": false,
1844
+ "asc": true,
1845
+ "nulls": "last"
1846
+ }
1847
+ ],
1848
+ "isUnique": false,
1849
+ "concurrently": false,
1850
+ "method": "btree",
1851
+ "with": {}
1852
+ },
1853
+ "idx_approval_status": {
1854
+ "name": "idx_approval_status",
1855
+ "columns": [
1856
+ {
1857
+ "expression": "status",
1858
+ "isExpression": false,
1859
+ "asc": true,
1860
+ "nulls": "last"
1861
+ },
1862
+ {
1863
+ "expression": "requested_at",
1864
+ "isExpression": false,
1865
+ "asc": true,
1866
+ "nulls": "last"
1867
+ }
1868
+ ],
1869
+ "isUnique": false,
1870
+ "concurrently": false,
1871
+ "method": "btree",
1872
+ "with": {}
1873
+ },
1874
+ "idx_approval_requests_agent_id": {
1875
+ "name": "idx_approval_requests_agent_id",
1876
+ "columns": [
1877
+ {
1878
+ "expression": "agent_id",
1879
+ "isExpression": false,
1880
+ "asc": true,
1881
+ "nulls": "last"
1882
+ }
1883
+ ],
1884
+ "isUnique": false,
1885
+ "concurrently": false,
1886
+ "method": "btree",
1887
+ "with": {}
1888
+ },
1889
+ "idx_approval_requests_job_id": {
1890
+ "name": "idx_approval_requests_job_id",
1891
+ "columns": [
1892
+ {
1893
+ "expression": "job_id",
1894
+ "isExpression": false,
1895
+ "asc": true,
1896
+ "nulls": "last"
1897
+ }
1898
+ ],
1899
+ "isUnique": false,
1900
+ "concurrently": false,
1901
+ "method": "btree",
1902
+ "with": {}
1903
+ }
1904
+ },
1905
+ "foreignKeys": {
1906
+ "approval_requests_entity_id_entities_id_fk": {
1907
+ "name": "approval_requests_entity_id_entities_id_fk",
1908
+ "tableFrom": "approval_requests",
1909
+ "tableTo": "entities",
1910
+ "columnsFrom": ["entity_id"],
1911
+ "columnsTo": ["id"],
1912
+ "onDelete": "cascade",
1913
+ "onUpdate": "no action"
1914
+ },
1915
+ "approval_requests_job_id_agent_jobs_id_fk": {
1916
+ "name": "approval_requests_job_id_agent_jobs_id_fk",
1917
+ "tableFrom": "approval_requests",
1918
+ "tableTo": "agent_jobs",
1919
+ "columnsFrom": ["job_id"],
1920
+ "columnsTo": ["id"],
1921
+ "onDelete": "cascade",
1922
+ "onUpdate": "no action"
1923
+ },
1924
+ "approval_requests_agent_id_agents_id_fk": {
1925
+ "name": "approval_requests_agent_id_agents_id_fk",
1926
+ "tableFrom": "approval_requests",
1927
+ "tableTo": "agents",
1928
+ "columnsFrom": ["agent_id"],
1929
+ "columnsTo": ["id"],
1930
+ "onDelete": "no action",
1931
+ "onUpdate": "no action"
1932
+ }
1933
+ },
1934
+ "compositePrimaryKeys": {},
1935
+ "uniqueConstraints": {},
1936
+ "policies": {},
1937
+ "checkConstraints": {
1938
+ "approval_requests_status_check": {
1939
+ "name": "approval_requests_status_check",
1940
+ "value": "\"approval_requests\".\"status\" IN ('pending','approved','rejected','expired')"
1941
+ }
1942
+ },
1943
+ "isRLSEnabled": false
1944
+ },
1945
+ "public.approval_rules": {
1946
+ "name": "approval_rules",
1947
+ "schema": "",
1948
+ "columns": {
1949
+ "id": {
1950
+ "name": "id",
1951
+ "type": "uuid",
1952
+ "primaryKey": true,
1953
+ "notNull": true,
1954
+ "default": "gen_random_uuid()"
1955
+ },
1956
+ "entity_id": {
1957
+ "name": "entity_id",
1958
+ "type": "uuid",
1959
+ "primaryKey": false,
1960
+ "notNull": false
1961
+ },
1962
+ "agent_id": {
1963
+ "name": "agent_id",
1964
+ "type": "uuid",
1965
+ "primaryKey": false,
1966
+ "notNull": false
1967
+ },
1968
+ "tool_name": {
1969
+ "name": "tool_name",
1970
+ "type": "text",
1971
+ "primaryKey": false,
1972
+ "notNull": true
1973
+ },
1974
+ "action": {
1975
+ "name": "action",
1976
+ "type": "text",
1977
+ "primaryKey": false,
1978
+ "notNull": true
1979
+ },
1980
+ "condition_json": {
1981
+ "name": "condition_json",
1982
+ "type": "jsonb",
1983
+ "primaryKey": false,
1984
+ "notNull": false,
1985
+ "default": "'{}'::jsonb"
1986
+ },
1987
+ "created_at": {
1988
+ "name": "created_at",
1989
+ "type": "timestamp with time zone",
1990
+ "primaryKey": false,
1991
+ "notNull": false,
1992
+ "default": "now()"
1993
+ },
1994
+ "updated_at": {
1995
+ "name": "updated_at",
1996
+ "type": "timestamp with time zone",
1997
+ "primaryKey": false,
1998
+ "notNull": false,
1999
+ "default": "now()"
2000
+ }
2001
+ },
2002
+ "indexes": {
2003
+ "idx_approval_rules_entity_id": {
2004
+ "name": "idx_approval_rules_entity_id",
2005
+ "columns": [
2006
+ {
2007
+ "expression": "entity_id",
2008
+ "isExpression": false,
2009
+ "asc": true,
2010
+ "nulls": "last"
2011
+ }
2012
+ ],
2013
+ "isUnique": false,
2014
+ "concurrently": false,
2015
+ "method": "btree",
2016
+ "with": {}
2017
+ }
2018
+ },
2019
+ "foreignKeys": {
2020
+ "approval_rules_entity_id_entities_id_fk": {
2021
+ "name": "approval_rules_entity_id_entities_id_fk",
2022
+ "tableFrom": "approval_rules",
2023
+ "tableTo": "entities",
2024
+ "columnsFrom": ["entity_id"],
2025
+ "columnsTo": ["id"],
2026
+ "onDelete": "cascade",
2027
+ "onUpdate": "no action"
2028
+ },
2029
+ "approval_rules_agent_id_agents_id_fk": {
2030
+ "name": "approval_rules_agent_id_agents_id_fk",
2031
+ "tableFrom": "approval_rules",
2032
+ "tableTo": "agents",
2033
+ "columnsFrom": ["agent_id"],
2034
+ "columnsTo": ["id"],
2035
+ "onDelete": "cascade",
2036
+ "onUpdate": "no action"
2037
+ }
2038
+ },
2039
+ "compositePrimaryKeys": {},
2040
+ "uniqueConstraints": {},
2041
+ "policies": {},
2042
+ "checkConstraints": {
2043
+ "approval_rules_action_check": {
2044
+ "name": "approval_rules_action_check",
2045
+ "value": "\"approval_rules\".\"action\" IN ('auto_approve','require_approval','block')"
2046
+ }
2047
+ },
2048
+ "isRLSEnabled": false
2049
+ },
2050
+ "public.agent_memory": {
2051
+ "name": "agent_memory",
2052
+ "schema": "",
2053
+ "columns": {
2054
+ "id": {
2055
+ "name": "id",
2056
+ "type": "uuid",
2057
+ "primaryKey": true,
2058
+ "notNull": true,
2059
+ "default": "gen_random_uuid()"
2060
+ },
2061
+ "entity_id": {
2062
+ "name": "entity_id",
2063
+ "type": "uuid",
2064
+ "primaryKey": false,
2065
+ "notNull": false
2066
+ },
2067
+ "agent_id": {
2068
+ "name": "agent_id",
2069
+ "type": "uuid",
2070
+ "primaryKey": false,
2071
+ "notNull": false
2072
+ },
2073
+ "fact": {
2074
+ "name": "fact",
2075
+ "type": "text",
2076
+ "primaryKey": false,
2077
+ "notNull": true
2078
+ },
2079
+ "category": {
2080
+ "name": "category",
2081
+ "type": "text",
2082
+ "primaryKey": false,
2083
+ "notNull": false,
2084
+ "default": "'context'"
2085
+ },
2086
+ "importance": {
2087
+ "name": "importance",
2088
+ "type": "integer",
2089
+ "primaryKey": false,
2090
+ "notNull": false,
2091
+ "default": 3
2092
+ },
2093
+ "source": {
2094
+ "name": "source",
2095
+ "type": "text",
2096
+ "primaryKey": false,
2097
+ "notNull": false,
2098
+ "default": "'agent'"
2099
+ },
2100
+ "skill_tags": {
2101
+ "name": "skill_tags",
2102
+ "type": "text[]",
2103
+ "primaryKey": false,
2104
+ "notNull": false,
2105
+ "default": "'{}'::text[]"
2106
+ },
2107
+ "memory_layer": {
2108
+ "name": "memory_layer",
2109
+ "type": "text",
2110
+ "primaryKey": false,
2111
+ "notNull": false
2112
+ },
2113
+ "embedding": {
2114
+ "name": "embedding",
2115
+ "type": "vector(1536)",
2116
+ "primaryKey": false,
2117
+ "notNull": false
2118
+ },
2119
+ "valid_from": {
2120
+ "name": "valid_from",
2121
+ "type": "timestamp with time zone",
2122
+ "primaryKey": false,
2123
+ "notNull": false,
2124
+ "default": "now()"
2125
+ },
2126
+ "valid_to": {
2127
+ "name": "valid_to",
2128
+ "type": "timestamp with time zone",
2129
+ "primaryKey": false,
2130
+ "notNull": false
2131
+ },
2132
+ "fact_hash": {
2133
+ "name": "fact_hash",
2134
+ "type": "text",
2135
+ "primaryKey": false,
2136
+ "notNull": false
2137
+ },
2138
+ "archived": {
2139
+ "name": "archived",
2140
+ "type": "boolean",
2141
+ "primaryKey": false,
2142
+ "notNull": false,
2143
+ "default": false
2144
+ },
2145
+ "last_accessed_at": {
2146
+ "name": "last_accessed_at",
2147
+ "type": "timestamp with time zone",
2148
+ "primaryKey": false,
2149
+ "notNull": false,
2150
+ "default": "now()"
2151
+ },
2152
+ "access_count": {
2153
+ "name": "access_count",
2154
+ "type": "integer",
2155
+ "primaryKey": false,
2156
+ "notNull": false,
2157
+ "default": 0
2158
+ },
2159
+ "created_at": {
2160
+ "name": "created_at",
2161
+ "type": "timestamp with time zone",
2162
+ "primaryKey": false,
2163
+ "notNull": false,
2164
+ "default": "now()"
2165
+ },
2166
+ "updated_at": {
2167
+ "name": "updated_at",
2168
+ "type": "timestamp with time zone",
2169
+ "primaryKey": false,
2170
+ "notNull": false,
2171
+ "default": "now()"
2172
+ }
2173
+ },
2174
+ "indexes": {
2175
+ "idx_agent_memory_entity_id": {
2176
+ "name": "idx_agent_memory_entity_id",
2177
+ "columns": [
2178
+ {
2179
+ "expression": "entity_id",
2180
+ "isExpression": false,
2181
+ "asc": true,
2182
+ "nulls": "last"
2183
+ }
2184
+ ],
2185
+ "isUnique": false,
2186
+ "concurrently": false,
2187
+ "method": "btree",
2188
+ "with": {}
2189
+ },
2190
+ "idx_agent_memory_entity_active": {
2191
+ "name": "idx_agent_memory_entity_active",
2192
+ "columns": [
2193
+ {
2194
+ "expression": "entity_id",
2195
+ "isExpression": false,
2196
+ "asc": true,
2197
+ "nulls": "last"
2198
+ },
2199
+ {
2200
+ "expression": "archived",
2201
+ "isExpression": false,
2202
+ "asc": true,
2203
+ "nulls": "last"
2204
+ },
2205
+ {
2206
+ "expression": "valid_to",
2207
+ "isExpression": false,
2208
+ "asc": true,
2209
+ "nulls": "last"
2210
+ }
2211
+ ],
2212
+ "isUnique": false,
2213
+ "concurrently": false,
2214
+ "method": "btree",
2215
+ "with": {}
2216
+ },
2217
+ "idx_agent_memory_archived": {
2218
+ "name": "idx_agent_memory_archived",
2219
+ "columns": [
2220
+ {
2221
+ "expression": "archived",
2222
+ "isExpression": false,
2223
+ "asc": true,
2224
+ "nulls": "last"
2225
+ }
2226
+ ],
2227
+ "isUnique": false,
2228
+ "concurrently": false,
2229
+ "method": "btree",
2230
+ "with": {}
2231
+ },
2232
+ "idx_agent_memory_last_accessed": {
2233
+ "name": "idx_agent_memory_last_accessed",
2234
+ "columns": [
2235
+ {
2236
+ "expression": "last_accessed_at",
2237
+ "isExpression": false,
2238
+ "asc": true,
2239
+ "nulls": "last"
2240
+ }
2241
+ ],
2242
+ "isUnique": false,
2243
+ "concurrently": false,
2244
+ "method": "btree",
2245
+ "with": {}
2246
+ },
2247
+ "idx_agent_memory_layer": {
2248
+ "name": "idx_agent_memory_layer",
2249
+ "columns": [
2250
+ {
2251
+ "expression": "memory_layer",
2252
+ "isExpression": false,
2253
+ "asc": true,
2254
+ "nulls": "last"
2255
+ }
2256
+ ],
2257
+ "isUnique": false,
2258
+ "concurrently": false,
2259
+ "method": "btree",
2260
+ "with": {}
2261
+ },
2262
+ "idx_agent_memory_fact_hash": {
2263
+ "name": "idx_agent_memory_fact_hash",
2264
+ "columns": [
2265
+ {
2266
+ "expression": "fact_hash",
2267
+ "isExpression": false,
2268
+ "asc": true,
2269
+ "nulls": "last"
2270
+ }
2271
+ ],
2272
+ "isUnique": false,
2273
+ "concurrently": false,
2274
+ "method": "btree",
2275
+ "with": {}
2276
+ },
2277
+ "idx_memory_category": {
2278
+ "name": "idx_memory_category",
2279
+ "columns": [
2280
+ {
2281
+ "expression": "category",
2282
+ "isExpression": false,
2283
+ "asc": true,
2284
+ "nulls": "last"
2285
+ },
2286
+ {
2287
+ "expression": "\"importance\" DESC",
2288
+ "asc": true,
2289
+ "isExpression": true,
2290
+ "nulls": "last"
2291
+ }
2292
+ ],
2293
+ "isUnique": false,
2294
+ "concurrently": false,
2295
+ "method": "btree",
2296
+ "with": {}
2297
+ }
2298
+ },
2299
+ "foreignKeys": {
2300
+ "agent_memory_entity_id_entities_id_fk": {
2301
+ "name": "agent_memory_entity_id_entities_id_fk",
2302
+ "tableFrom": "agent_memory",
2303
+ "tableTo": "entities",
2304
+ "columnsFrom": ["entity_id"],
2305
+ "columnsTo": ["id"],
2306
+ "onDelete": "cascade",
2307
+ "onUpdate": "no action"
2308
+ },
2309
+ "agent_memory_agent_id_agents_id_fk": {
2310
+ "name": "agent_memory_agent_id_agents_id_fk",
2311
+ "tableFrom": "agent_memory",
2312
+ "tableTo": "agents",
2313
+ "columnsFrom": ["agent_id"],
2314
+ "columnsTo": ["id"],
2315
+ "onDelete": "no action",
2316
+ "onUpdate": "no action"
2317
+ }
2318
+ },
2319
+ "compositePrimaryKeys": {},
2320
+ "uniqueConstraints": {},
2321
+ "policies": {},
2322
+ "checkConstraints": {
2323
+ "agent_memory_category_check": {
2324
+ "name": "agent_memory_category_check",
2325
+ "value": "\"agent_memory\".\"category\" IN ('preference','context','outcome','learned_rule')"
2326
+ },
2327
+ "agent_memory_importance_check": {
2328
+ "name": "agent_memory_importance_check",
2329
+ "value": "\"agent_memory\".\"importance\" >= 1 AND \"agent_memory\".\"importance\" <= 5"
2330
+ },
2331
+ "agent_memory_source_check": {
2332
+ "name": "agent_memory_source_check",
2333
+ "value": "\"agent_memory\".\"source\" IN ('agent','reflection','manual')"
2334
+ }
2335
+ },
2336
+ "isRLSEnabled": false
2337
+ },
2338
+ "public.webhook_triggers": {
2339
+ "name": "webhook_triggers",
2340
+ "schema": "",
2341
+ "columns": {
2342
+ "id": {
2343
+ "name": "id",
2344
+ "type": "uuid",
2345
+ "primaryKey": true,
2346
+ "notNull": true,
2347
+ "default": "gen_random_uuid()"
2348
+ },
2349
+ "entity_id": {
2350
+ "name": "entity_id",
2351
+ "type": "uuid",
2352
+ "primaryKey": false,
2353
+ "notNull": false
2354
+ },
2355
+ "agent_id": {
2356
+ "name": "agent_id",
2357
+ "type": "uuid",
2358
+ "primaryKey": false,
2359
+ "notNull": false
2360
+ },
2361
+ "name": {
2362
+ "name": "name",
2363
+ "type": "text",
2364
+ "primaryKey": false,
2365
+ "notNull": true
2366
+ },
2367
+ "slug": {
2368
+ "name": "slug",
2369
+ "type": "text",
2370
+ "primaryKey": false,
2371
+ "notNull": true
2372
+ },
2373
+ "task_template": {
2374
+ "name": "task_template",
2375
+ "type": "text",
2376
+ "primaryKey": false,
2377
+ "notNull": true
2378
+ },
2379
+ "active": {
2380
+ "name": "active",
2381
+ "type": "boolean",
2382
+ "primaryKey": false,
2383
+ "notNull": false,
2384
+ "default": true
2385
+ },
2386
+ "secret": {
2387
+ "name": "secret",
2388
+ "type": "text",
2389
+ "primaryKey": false,
2390
+ "notNull": false
2391
+ },
2392
+ "last_triggered_at": {
2393
+ "name": "last_triggered_at",
2394
+ "type": "timestamp with time zone",
2395
+ "primaryKey": false,
2396
+ "notNull": false
2397
+ },
2398
+ "trigger_count": {
2399
+ "name": "trigger_count",
2400
+ "type": "integer",
2401
+ "primaryKey": false,
2402
+ "notNull": false,
2403
+ "default": 0
2404
+ },
2405
+ "created_at": {
2406
+ "name": "created_at",
2407
+ "type": "timestamp with time zone",
2408
+ "primaryKey": false,
2409
+ "notNull": false,
2410
+ "default": "now()"
2411
+ },
2412
+ "updated_at": {
2413
+ "name": "updated_at",
2414
+ "type": "timestamp with time zone",
2415
+ "primaryKey": false,
2416
+ "notNull": false,
2417
+ "default": "now()"
2418
+ }
2419
+ },
2420
+ "indexes": {
2421
+ "idx_webhook_triggers_entity_id": {
2422
+ "name": "idx_webhook_triggers_entity_id",
2423
+ "columns": [
2424
+ {
2425
+ "expression": "entity_id",
2426
+ "isExpression": false,
2427
+ "asc": true,
2428
+ "nulls": "last"
2429
+ }
2430
+ ],
2431
+ "isUnique": false,
2432
+ "concurrently": false,
2433
+ "method": "btree",
2434
+ "with": {}
2435
+ }
2436
+ },
2437
+ "foreignKeys": {
2438
+ "webhook_triggers_entity_id_entities_id_fk": {
2439
+ "name": "webhook_triggers_entity_id_entities_id_fk",
2440
+ "tableFrom": "webhook_triggers",
2441
+ "tableTo": "entities",
2442
+ "columnsFrom": ["entity_id"],
2443
+ "columnsTo": ["id"],
2444
+ "onDelete": "cascade",
2445
+ "onUpdate": "no action"
2446
+ },
2447
+ "webhook_triggers_agent_id_agents_id_fk": {
2448
+ "name": "webhook_triggers_agent_id_agents_id_fk",
2449
+ "tableFrom": "webhook_triggers",
2450
+ "tableTo": "agents",
2451
+ "columnsFrom": ["agent_id"],
2452
+ "columnsTo": ["id"],
2453
+ "onDelete": "cascade",
2454
+ "onUpdate": "no action"
2455
+ }
2456
+ },
2457
+ "compositePrimaryKeys": {},
2458
+ "uniqueConstraints": {
2459
+ "webhook_triggers_slug_unique": {
2460
+ "name": "webhook_triggers_slug_unique",
2461
+ "nullsNotDistinct": false,
2462
+ "columns": ["slug"]
2463
+ }
2464
+ },
2465
+ "policies": {},
2466
+ "checkConstraints": {},
2467
+ "isRLSEnabled": false
2468
+ },
2469
+ "public.agent_skill_assignments": {
2470
+ "name": "agent_skill_assignments",
2471
+ "schema": "",
2472
+ "columns": {
2473
+ "id": {
2474
+ "name": "id",
2475
+ "type": "uuid",
2476
+ "primaryKey": true,
2477
+ "notNull": true,
2478
+ "default": "gen_random_uuid()"
2479
+ },
2480
+ "entity_id": {
2481
+ "name": "entity_id",
2482
+ "type": "uuid",
2483
+ "primaryKey": false,
2484
+ "notNull": true
2485
+ },
2486
+ "agent_id": {
2487
+ "name": "agent_id",
2488
+ "type": "uuid",
2489
+ "primaryKey": false,
2490
+ "notNull": true
2491
+ },
2492
+ "skill_id": {
2493
+ "name": "skill_id",
2494
+ "type": "uuid",
2495
+ "primaryKey": false,
2496
+ "notNull": true
2497
+ },
2498
+ "approval_overrides": {
2499
+ "name": "approval_overrides",
2500
+ "type": "jsonb",
2501
+ "primaryKey": false,
2502
+ "notNull": false,
2503
+ "default": "'{}'::jsonb"
2504
+ },
2505
+ "use_custom_instructions": {
2506
+ "name": "use_custom_instructions",
2507
+ "type": "boolean",
2508
+ "primaryKey": false,
2509
+ "notNull": true,
2510
+ "default": false
2511
+ },
2512
+ "enabled_operations": {
2513
+ "name": "enabled_operations",
2514
+ "type": "text[]",
2515
+ "primaryKey": false,
2516
+ "notNull": false
2517
+ },
2518
+ "created_at": {
2519
+ "name": "created_at",
2520
+ "type": "timestamp with time zone",
2521
+ "primaryKey": false,
2522
+ "notNull": true,
2523
+ "default": "now()"
2524
+ }
2525
+ },
2526
+ "indexes": {},
2527
+ "foreignKeys": {
2528
+ "agent_skill_assignments_entity_id_entities_id_fk": {
2529
+ "name": "agent_skill_assignments_entity_id_entities_id_fk",
2530
+ "tableFrom": "agent_skill_assignments",
2531
+ "tableTo": "entities",
2532
+ "columnsFrom": ["entity_id"],
2533
+ "columnsTo": ["id"],
2534
+ "onDelete": "cascade",
2535
+ "onUpdate": "no action"
2536
+ },
2537
+ "agent_skill_assignments_agent_id_agents_id_fk": {
2538
+ "name": "agent_skill_assignments_agent_id_agents_id_fk",
2539
+ "tableFrom": "agent_skill_assignments",
2540
+ "tableTo": "agents",
2541
+ "columnsFrom": ["agent_id"],
2542
+ "columnsTo": ["id"],
2543
+ "onDelete": "cascade",
2544
+ "onUpdate": "no action"
2545
+ },
2546
+ "agent_skill_assignments_skill_id_agent_skills_id_fk": {
2547
+ "name": "agent_skill_assignments_skill_id_agent_skills_id_fk",
2548
+ "tableFrom": "agent_skill_assignments",
2549
+ "tableTo": "agent_skills",
2550
+ "columnsFrom": ["skill_id"],
2551
+ "columnsTo": ["id"],
2552
+ "onDelete": "cascade",
2553
+ "onUpdate": "no action"
2554
+ }
2555
+ },
2556
+ "compositePrimaryKeys": {},
2557
+ "uniqueConstraints": {},
2558
+ "policies": {},
2559
+ "checkConstraints": {},
2560
+ "isRLSEnabled": false
2561
+ },
2562
+ "public.agent_skills": {
2563
+ "name": "agent_skills",
2564
+ "schema": "",
2565
+ "columns": {
2566
+ "id": {
2567
+ "name": "id",
2568
+ "type": "uuid",
2569
+ "primaryKey": true,
2570
+ "notNull": true,
2571
+ "default": "gen_random_uuid()"
2572
+ },
2573
+ "entity_id": {
2574
+ "name": "entity_id",
2575
+ "type": "uuid",
2576
+ "primaryKey": false,
2577
+ "notNull": false
2578
+ },
2579
+ "name": {
2580
+ "name": "name",
2581
+ "type": "text",
2582
+ "primaryKey": false,
2583
+ "notNull": true
2584
+ },
2585
+ "slug": {
2586
+ "name": "slug",
2587
+ "type": "text",
2588
+ "primaryKey": false,
2589
+ "notNull": true
2590
+ },
2591
+ "content": {
2592
+ "name": "content",
2593
+ "type": "text",
2594
+ "primaryKey": false,
2595
+ "notNull": true
2596
+ },
2597
+ "active": {
2598
+ "name": "active",
2599
+ "type": "boolean",
2600
+ "primaryKey": false,
2601
+ "notNull": false,
2602
+ "default": true
2603
+ },
2604
+ "description": {
2605
+ "name": "description",
2606
+ "type": "text",
2607
+ "primaryKey": false,
2608
+ "notNull": false
2609
+ },
2610
+ "default_content": {
2611
+ "name": "default_content",
2612
+ "type": "text",
2613
+ "primaryKey": false,
2614
+ "notNull": false
2615
+ },
2616
+ "content_overridden": {
2617
+ "name": "content_overridden",
2618
+ "type": "boolean",
2619
+ "primaryKey": false,
2620
+ "notNull": false,
2621
+ "default": false
2622
+ },
2623
+ "required_config": {
2624
+ "name": "required_config",
2625
+ "type": "jsonb",
2626
+ "primaryKey": false,
2627
+ "notNull": false,
2628
+ "default": "'[]'::jsonb"
2629
+ },
2630
+ "operations": {
2631
+ "name": "operations",
2632
+ "type": "jsonb",
2633
+ "primaryKey": false,
2634
+ "notNull": false,
2635
+ "default": "'[]'::jsonb"
2636
+ },
2637
+ "required_builtins": {
2638
+ "name": "required_builtins",
2639
+ "type": "text[]",
2640
+ "primaryKey": false,
2641
+ "notNull": true,
2642
+ "default": "'{}'::text[]"
2643
+ },
2644
+ "created_at": {
2645
+ "name": "created_at",
2646
+ "type": "timestamp with time zone",
2647
+ "primaryKey": false,
2648
+ "notNull": false,
2649
+ "default": "now()"
2650
+ },
2651
+ "updated_at": {
2652
+ "name": "updated_at",
2653
+ "type": "timestamp with time zone",
2654
+ "primaryKey": false,
2655
+ "notNull": false,
2656
+ "default": "now()"
2657
+ }
2658
+ },
2659
+ "indexes": {
2660
+ "idx_agent_skills_entity_id": {
2661
+ "name": "idx_agent_skills_entity_id",
2662
+ "columns": [
2663
+ {
2664
+ "expression": "entity_id",
2665
+ "isExpression": false,
2666
+ "asc": true,
2667
+ "nulls": "last"
2668
+ }
2669
+ ],
2670
+ "isUnique": false,
2671
+ "concurrently": false,
2672
+ "method": "btree",
2673
+ "with": {}
2674
+ },
2675
+ "idx_skills_active": {
2676
+ "name": "idx_skills_active",
2677
+ "columns": [
2678
+ {
2679
+ "expression": "active",
2680
+ "isExpression": false,
2681
+ "asc": true,
2682
+ "nulls": "last"
2683
+ },
2684
+ {
2685
+ "expression": "slug",
2686
+ "isExpression": false,
2687
+ "asc": true,
2688
+ "nulls": "last"
2689
+ }
2690
+ ],
2691
+ "isUnique": false,
2692
+ "concurrently": false,
2693
+ "method": "btree",
2694
+ "with": {}
2695
+ }
2696
+ },
2697
+ "foreignKeys": {
2698
+ "agent_skills_entity_id_entities_id_fk": {
2699
+ "name": "agent_skills_entity_id_entities_id_fk",
2700
+ "tableFrom": "agent_skills",
2701
+ "tableTo": "entities",
2702
+ "columnsFrom": ["entity_id"],
2703
+ "columnsTo": ["id"],
2704
+ "onDelete": "cascade",
2705
+ "onUpdate": "no action"
2706
+ }
2707
+ },
2708
+ "compositePrimaryKeys": {},
2709
+ "uniqueConstraints": {
2710
+ "agent_skills_name_unique": {
2711
+ "name": "agent_skills_name_unique",
2712
+ "nullsNotDistinct": false,
2713
+ "columns": ["name"]
2714
+ },
2715
+ "agent_skills_slug_unique": {
2716
+ "name": "agent_skills_slug_unique",
2717
+ "nullsNotDistinct": false,
2718
+ "columns": ["slug"]
2719
+ }
2720
+ },
2721
+ "policies": {},
2722
+ "checkConstraints": {},
2723
+ "isRLSEnabled": false
2724
+ },
2725
+ "public.skill_connectors": {
2726
+ "name": "skill_connectors",
2727
+ "schema": "",
2728
+ "columns": {
2729
+ "skill_id": {
2730
+ "name": "skill_id",
2731
+ "type": "uuid",
2732
+ "primaryKey": false,
2733
+ "notNull": true
2734
+ },
2735
+ "connector_id": {
2736
+ "name": "connector_id",
2737
+ "type": "uuid",
2738
+ "primaryKey": false,
2739
+ "notNull": true
2740
+ },
2741
+ "entity_id": {
2742
+ "name": "entity_id",
2743
+ "type": "uuid",
2744
+ "primaryKey": false,
2745
+ "notNull": false
2746
+ }
2747
+ },
2748
+ "indexes": {
2749
+ "idx_skill_connectors_entity_id": {
2750
+ "name": "idx_skill_connectors_entity_id",
2751
+ "columns": [
2752
+ {
2753
+ "expression": "entity_id",
2754
+ "isExpression": false,
2755
+ "asc": true,
2756
+ "nulls": "last"
2757
+ }
2758
+ ],
2759
+ "isUnique": false,
2760
+ "concurrently": false,
2761
+ "method": "btree",
2762
+ "with": {}
2763
+ },
2764
+ "idx_skill_connectors_skill_id": {
2765
+ "name": "idx_skill_connectors_skill_id",
2766
+ "columns": [
2767
+ {
2768
+ "expression": "skill_id",
2769
+ "isExpression": false,
2770
+ "asc": true,
2771
+ "nulls": "last"
2772
+ }
2773
+ ],
2774
+ "isUnique": false,
2775
+ "concurrently": false,
2776
+ "method": "btree",
2777
+ "with": {}
2778
+ }
2779
+ },
2780
+ "foreignKeys": {
2781
+ "skill_connectors_skill_id_agent_skills_id_fk": {
2782
+ "name": "skill_connectors_skill_id_agent_skills_id_fk",
2783
+ "tableFrom": "skill_connectors",
2784
+ "tableTo": "agent_skills",
2785
+ "columnsFrom": ["skill_id"],
2786
+ "columnsTo": ["id"],
2787
+ "onDelete": "cascade",
2788
+ "onUpdate": "no action"
2789
+ },
2790
+ "skill_connectors_connector_id_connectors_id_fk": {
2791
+ "name": "skill_connectors_connector_id_connectors_id_fk",
2792
+ "tableFrom": "skill_connectors",
2793
+ "tableTo": "connectors",
2794
+ "columnsFrom": ["connector_id"],
2795
+ "columnsTo": ["id"],
2796
+ "onDelete": "cascade",
2797
+ "onUpdate": "no action"
2798
+ },
2799
+ "skill_connectors_entity_id_entities_id_fk": {
2800
+ "name": "skill_connectors_entity_id_entities_id_fk",
2801
+ "tableFrom": "skill_connectors",
2802
+ "tableTo": "entities",
2803
+ "columnsFrom": ["entity_id"],
2804
+ "columnsTo": ["id"],
2805
+ "onDelete": "cascade",
2806
+ "onUpdate": "no action"
2807
+ }
2808
+ },
2809
+ "compositePrimaryKeys": {},
2810
+ "uniqueConstraints": {},
2811
+ "policies": {},
2812
+ "checkConstraints": {},
2813
+ "isRLSEnabled": false
2814
+ },
2815
+ "public.skill_versions": {
2816
+ "name": "skill_versions",
2817
+ "schema": "",
2818
+ "columns": {
2819
+ "id": {
2820
+ "name": "id",
2821
+ "type": "uuid",
2822
+ "primaryKey": true,
2823
+ "notNull": true,
2824
+ "default": "gen_random_uuid()"
2825
+ },
2826
+ "entity_id": {
2827
+ "name": "entity_id",
2828
+ "type": "uuid",
2829
+ "primaryKey": false,
2830
+ "notNull": false
2831
+ },
2832
+ "skill_id": {
2833
+ "name": "skill_id",
2834
+ "type": "uuid",
2835
+ "primaryKey": false,
2836
+ "notNull": false
2837
+ },
2838
+ "version": {
2839
+ "name": "version",
2840
+ "type": "integer",
2841
+ "primaryKey": false,
2842
+ "notNull": true
2843
+ },
2844
+ "content": {
2845
+ "name": "content",
2846
+ "type": "text",
2847
+ "primaryKey": false,
2848
+ "notNull": true
2849
+ },
2850
+ "name": {
2851
+ "name": "name",
2852
+ "type": "text",
2853
+ "primaryKey": false,
2854
+ "notNull": true
2855
+ },
2856
+ "created_at": {
2857
+ "name": "created_at",
2858
+ "type": "timestamp with time zone",
2859
+ "primaryKey": false,
2860
+ "notNull": false,
2861
+ "default": "now()"
2862
+ }
2863
+ },
2864
+ "indexes": {
2865
+ "idx_skill_versions_entity_id": {
2866
+ "name": "idx_skill_versions_entity_id",
2867
+ "columns": [
2868
+ {
2869
+ "expression": "entity_id",
2870
+ "isExpression": false,
2871
+ "asc": true,
2872
+ "nulls": "last"
2873
+ }
2874
+ ],
2875
+ "isUnique": false,
2876
+ "concurrently": false,
2877
+ "method": "btree",
2878
+ "with": {}
2879
+ },
2880
+ "idx_skill_versions_skill_id": {
2881
+ "name": "idx_skill_versions_skill_id",
2882
+ "columns": [
2883
+ {
2884
+ "expression": "skill_id",
2885
+ "isExpression": false,
2886
+ "asc": true,
2887
+ "nulls": "last"
2888
+ },
2889
+ {
2890
+ "expression": "\"version\" DESC",
2891
+ "asc": true,
2892
+ "isExpression": true,
2893
+ "nulls": "last"
2894
+ }
2895
+ ],
2896
+ "isUnique": false,
2897
+ "concurrently": false,
2898
+ "method": "btree",
2899
+ "with": {}
2900
+ }
2901
+ },
2902
+ "foreignKeys": {
2903
+ "skill_versions_entity_id_entities_id_fk": {
2904
+ "name": "skill_versions_entity_id_entities_id_fk",
2905
+ "tableFrom": "skill_versions",
2906
+ "tableTo": "entities",
2907
+ "columnsFrom": ["entity_id"],
2908
+ "columnsTo": ["id"],
2909
+ "onDelete": "cascade",
2910
+ "onUpdate": "no action"
2911
+ },
2912
+ "skill_versions_skill_id_agent_skills_id_fk": {
2913
+ "name": "skill_versions_skill_id_agent_skills_id_fk",
2914
+ "tableFrom": "skill_versions",
2915
+ "tableTo": "agent_skills",
2916
+ "columnsFrom": ["skill_id"],
2917
+ "columnsTo": ["id"],
2918
+ "onDelete": "cascade",
2919
+ "onUpdate": "no action"
2920
+ }
2921
+ },
2922
+ "compositePrimaryKeys": {},
2923
+ "uniqueConstraints": {},
2924
+ "policies": {},
2925
+ "checkConstraints": {},
2926
+ "isRLSEnabled": false
2927
+ },
2928
+ "public.agent_schedules": {
2929
+ "name": "agent_schedules",
2930
+ "schema": "",
2931
+ "columns": {
2932
+ "id": {
2933
+ "name": "id",
2934
+ "type": "uuid",
2935
+ "primaryKey": true,
2936
+ "notNull": true,
2937
+ "default": "gen_random_uuid()"
2938
+ },
2939
+ "entity_id": {
2940
+ "name": "entity_id",
2941
+ "type": "uuid",
2942
+ "primaryKey": false,
2943
+ "notNull": false
2944
+ },
2945
+ "agent_id": {
2946
+ "name": "agent_id",
2947
+ "type": "uuid",
2948
+ "primaryKey": false,
2949
+ "notNull": true
2950
+ },
2951
+ "type": {
2952
+ "name": "type",
2953
+ "type": "text",
2954
+ "primaryKey": false,
2955
+ "notNull": true,
2956
+ "default": "'cron'"
2957
+ },
2958
+ "name": {
2959
+ "name": "name",
2960
+ "type": "text",
2961
+ "primaryKey": false,
2962
+ "notNull": true
2963
+ },
2964
+ "cron_expr": {
2965
+ "name": "cron_expr",
2966
+ "type": "text",
2967
+ "primaryKey": false,
2968
+ "notNull": true
2969
+ },
2970
+ "task": {
2971
+ "name": "task",
2972
+ "type": "text",
2973
+ "primaryKey": false,
2974
+ "notNull": false
2975
+ },
2976
+ "objectives": {
2977
+ "name": "objectives",
2978
+ "type": "text",
2979
+ "primaryKey": false,
2980
+ "notNull": false
2981
+ },
2982
+ "active": {
2983
+ "name": "active",
2984
+ "type": "boolean",
2985
+ "primaryKey": false,
2986
+ "notNull": false,
2987
+ "default": true
2988
+ },
2989
+ "last_run": {
2990
+ "name": "last_run",
2991
+ "type": "timestamp with time zone",
2992
+ "primaryKey": false,
2993
+ "notNull": false
2994
+ },
2995
+ "next_run": {
2996
+ "name": "next_run",
2997
+ "type": "timestamp with time zone",
2998
+ "primaryKey": false,
2999
+ "notNull": false
3000
+ },
3001
+ "last_status": {
3002
+ "name": "last_status",
3003
+ "type": "text",
3004
+ "primaryKey": false,
3005
+ "notNull": false
3006
+ },
3007
+ "chat_id": {
3008
+ "name": "chat_id",
3009
+ "type": "text",
3010
+ "primaryKey": false,
3011
+ "notNull": false
3012
+ },
3013
+ "created_at": {
3014
+ "name": "created_at",
3015
+ "type": "timestamp with time zone",
3016
+ "primaryKey": false,
3017
+ "notNull": false,
3018
+ "default": "now()"
3019
+ },
3020
+ "updated_at": {
3021
+ "name": "updated_at",
3022
+ "type": "timestamp with time zone",
3023
+ "primaryKey": false,
3024
+ "notNull": false,
3025
+ "default": "now()"
3026
+ }
3027
+ },
3028
+ "indexes": {
3029
+ "idx_agent_schedules_entity_id": {
3030
+ "name": "idx_agent_schedules_entity_id",
3031
+ "columns": [
3032
+ {
3033
+ "expression": "entity_id",
3034
+ "isExpression": false,
3035
+ "asc": true,
3036
+ "nulls": "last"
3037
+ }
3038
+ ],
3039
+ "isUnique": false,
3040
+ "concurrently": false,
3041
+ "method": "btree",
3042
+ "with": {}
3043
+ },
3044
+ "idx_schedules_active": {
3045
+ "name": "idx_schedules_active",
3046
+ "columns": [
3047
+ {
3048
+ "expression": "active",
3049
+ "isExpression": false,
3050
+ "asc": true,
3051
+ "nulls": "last"
3052
+ },
3053
+ {
3054
+ "expression": "next_run",
3055
+ "isExpression": false,
3056
+ "asc": true,
3057
+ "nulls": "last"
3058
+ }
3059
+ ],
3060
+ "isUnique": false,
3061
+ "concurrently": false,
3062
+ "method": "btree",
3063
+ "with": {}
3064
+ }
3065
+ },
3066
+ "foreignKeys": {
3067
+ "agent_schedules_entity_id_entities_id_fk": {
3068
+ "name": "agent_schedules_entity_id_entities_id_fk",
3069
+ "tableFrom": "agent_schedules",
3070
+ "tableTo": "entities",
3071
+ "columnsFrom": ["entity_id"],
3072
+ "columnsTo": ["id"],
3073
+ "onDelete": "cascade",
3074
+ "onUpdate": "no action"
3075
+ },
3076
+ "agent_schedules_agent_id_agents_id_fk": {
3077
+ "name": "agent_schedules_agent_id_agents_id_fk",
3078
+ "tableFrom": "agent_schedules",
3079
+ "tableTo": "agents",
3080
+ "columnsFrom": ["agent_id"],
3081
+ "columnsTo": ["id"],
3082
+ "onDelete": "cascade",
3083
+ "onUpdate": "no action"
3084
+ }
3085
+ },
3086
+ "compositePrimaryKeys": {},
3087
+ "uniqueConstraints": {},
3088
+ "policies": {},
3089
+ "checkConstraints": {
3090
+ "agent_schedules_type_check": {
3091
+ "name": "agent_schedules_type_check",
3092
+ "value": "\"agent_schedules\".\"type\" IN ('cron','heartbeat')"
3093
+ },
3094
+ "agent_schedules_last_status_check": {
3095
+ "name": "agent_schedules_last_status_check",
3096
+ "value": "\"agent_schedules\".\"last_status\" IN ('success','failed','no_action') OR \"agent_schedules\".\"last_status\" IS NULL"
3097
+ }
3098
+ },
3099
+ "isRLSEnabled": false
3100
+ },
3101
+ "public.entity_llm_keys": {
3102
+ "name": "entity_llm_keys",
3103
+ "schema": "",
3104
+ "columns": {
3105
+ "id": {
3106
+ "name": "id",
3107
+ "type": "uuid",
3108
+ "primaryKey": true,
3109
+ "notNull": true,
3110
+ "default": "gen_random_uuid()"
3111
+ },
3112
+ "entity_id": {
3113
+ "name": "entity_id",
3114
+ "type": "uuid",
3115
+ "primaryKey": false,
3116
+ "notNull": true
3117
+ },
3118
+ "provider": {
3119
+ "name": "provider",
3120
+ "type": "text",
3121
+ "primaryKey": false,
3122
+ "notNull": true
3123
+ },
3124
+ "api_key": {
3125
+ "name": "api_key",
3126
+ "type": "text",
3127
+ "primaryKey": false,
3128
+ "notNull": true,
3129
+ "default": "''"
3130
+ },
3131
+ "base_url": {
3132
+ "name": "base_url",
3133
+ "type": "text",
3134
+ "primaryKey": false,
3135
+ "notNull": false
3136
+ },
3137
+ "nickname": {
3138
+ "name": "nickname",
3139
+ "type": "text",
3140
+ "primaryKey": false,
3141
+ "notNull": false
3142
+ },
3143
+ "is_active": {
3144
+ "name": "is_active",
3145
+ "type": "boolean",
3146
+ "primaryKey": false,
3147
+ "notNull": true,
3148
+ "default": true
3149
+ },
3150
+ "created_at": {
3151
+ "name": "created_at",
3152
+ "type": "timestamp with time zone",
3153
+ "primaryKey": false,
3154
+ "notNull": true,
3155
+ "default": "now()"
3156
+ },
3157
+ "updated_at": {
3158
+ "name": "updated_at",
3159
+ "type": "timestamp with time zone",
3160
+ "primaryKey": false,
3161
+ "notNull": true,
3162
+ "default": "now()"
3163
+ }
3164
+ },
3165
+ "indexes": {
3166
+ "idx_entity_llm_keys_entity_id": {
3167
+ "name": "idx_entity_llm_keys_entity_id",
3168
+ "columns": [
3169
+ {
3170
+ "expression": "entity_id",
3171
+ "isExpression": false,
3172
+ "asc": true,
3173
+ "nulls": "last"
3174
+ }
3175
+ ],
3176
+ "isUnique": false,
3177
+ "concurrently": false,
3178
+ "method": "btree",
3179
+ "with": {}
3180
+ }
3181
+ },
3182
+ "foreignKeys": {
3183
+ "entity_llm_keys_entity_id_entities_id_fk": {
3184
+ "name": "entity_llm_keys_entity_id_entities_id_fk",
3185
+ "tableFrom": "entity_llm_keys",
3186
+ "tableTo": "entities",
3187
+ "columnsFrom": ["entity_id"],
3188
+ "columnsTo": ["id"],
3189
+ "onDelete": "cascade",
3190
+ "onUpdate": "no action"
3191
+ }
3192
+ },
3193
+ "compositePrimaryKeys": {},
3194
+ "uniqueConstraints": {},
3195
+ "policies": {},
3196
+ "checkConstraints": {},
3197
+ "isRLSEnabled": false
3198
+ },
3199
+ "public.agent_runs": {
3200
+ "name": "agent_runs",
3201
+ "schema": "",
3202
+ "columns": {
3203
+ "id": {
3204
+ "name": "id",
3205
+ "type": "uuid",
3206
+ "primaryKey": true,
3207
+ "notNull": true,
3208
+ "default": "gen_random_uuid()"
3209
+ },
3210
+ "entity_id": {
3211
+ "name": "entity_id",
3212
+ "type": "uuid",
3213
+ "primaryKey": false,
3214
+ "notNull": false
3215
+ },
3216
+ "agent_id": {
3217
+ "name": "agent_id",
3218
+ "type": "uuid",
3219
+ "primaryKey": false,
3220
+ "notNull": false
3221
+ },
3222
+ "task": {
3223
+ "name": "task",
3224
+ "type": "text",
3225
+ "primaryKey": false,
3226
+ "notNull": true
3227
+ },
3228
+ "result": {
3229
+ "name": "result",
3230
+ "type": "text",
3231
+ "primaryKey": false,
3232
+ "notNull": false
3233
+ },
3234
+ "success": {
3235
+ "name": "success",
3236
+ "type": "boolean",
3237
+ "primaryKey": false,
3238
+ "notNull": false,
3239
+ "default": true
3240
+ },
3241
+ "tools_used": {
3242
+ "name": "tools_used",
3243
+ "type": "text[]",
3244
+ "primaryKey": false,
3245
+ "notNull": false,
3246
+ "default": "'{}'::text[]"
3247
+ },
3248
+ "tokens_used": {
3249
+ "name": "tokens_used",
3250
+ "type": "integer",
3251
+ "primaryKey": false,
3252
+ "notNull": false
3253
+ },
3254
+ "input_tokens": {
3255
+ "name": "input_tokens",
3256
+ "type": "integer",
3257
+ "primaryKey": false,
3258
+ "notNull": false
3259
+ },
3260
+ "output_tokens": {
3261
+ "name": "output_tokens",
3262
+ "type": "integer",
3263
+ "primaryKey": false,
3264
+ "notNull": false
3265
+ },
3266
+ "duration_ms": {
3267
+ "name": "duration_ms",
3268
+ "type": "integer",
3269
+ "primaryKey": false,
3270
+ "notNull": false
3271
+ },
3272
+ "key_source": {
3273
+ "name": "key_source",
3274
+ "type": "text",
3275
+ "primaryKey": false,
3276
+ "notNull": false
3277
+ },
3278
+ "created_at": {
3279
+ "name": "created_at",
3280
+ "type": "timestamp with time zone",
3281
+ "primaryKey": false,
3282
+ "notNull": false,
3283
+ "default": "now()"
3284
+ }
3285
+ },
3286
+ "indexes": {
3287
+ "idx_agent_runs_entity_id": {
3288
+ "name": "idx_agent_runs_entity_id",
3289
+ "columns": [
3290
+ {
3291
+ "expression": "entity_id",
3292
+ "isExpression": false,
3293
+ "asc": true,
3294
+ "nulls": "last"
3295
+ }
3296
+ ],
3297
+ "isUnique": false,
3298
+ "concurrently": false,
3299
+ "method": "btree",
3300
+ "with": {}
3301
+ },
3302
+ "idx_agent_runs_agent_created": {
3303
+ "name": "idx_agent_runs_agent_created",
3304
+ "columns": [
3305
+ {
3306
+ "expression": "agent_id",
3307
+ "isExpression": false,
3308
+ "asc": true,
3309
+ "nulls": "last"
3310
+ },
3311
+ {
3312
+ "expression": "\"created_at\" DESC",
3313
+ "asc": true,
3314
+ "isExpression": true,
3315
+ "nulls": "last"
3316
+ }
3317
+ ],
3318
+ "isUnique": false,
3319
+ "concurrently": false,
3320
+ "method": "btree",
3321
+ "with": {}
3322
+ },
3323
+ "idx_runs_agent": {
3324
+ "name": "idx_runs_agent",
3325
+ "columns": [
3326
+ {
3327
+ "expression": "agent_id",
3328
+ "isExpression": false,
3329
+ "asc": true,
3330
+ "nulls": "last"
3331
+ },
3332
+ {
3333
+ "expression": "\"created_at\" DESC",
3334
+ "asc": true,
3335
+ "isExpression": true,
3336
+ "nulls": "last"
3337
+ }
3338
+ ],
3339
+ "isUnique": false,
3340
+ "concurrently": false,
3341
+ "method": "btree",
3342
+ "with": {}
3343
+ },
3344
+ "idx_runs_recent": {
3345
+ "name": "idx_runs_recent",
3346
+ "columns": [
3347
+ {
3348
+ "expression": "\"created_at\" DESC",
3349
+ "asc": true,
3350
+ "isExpression": true,
3351
+ "nulls": "last"
3352
+ }
3353
+ ],
3354
+ "isUnique": false,
3355
+ "concurrently": false,
3356
+ "method": "btree",
3357
+ "with": {}
3358
+ }
3359
+ },
3360
+ "foreignKeys": {
3361
+ "agent_runs_entity_id_entities_id_fk": {
3362
+ "name": "agent_runs_entity_id_entities_id_fk",
3363
+ "tableFrom": "agent_runs",
3364
+ "tableTo": "entities",
3365
+ "columnsFrom": ["entity_id"],
3366
+ "columnsTo": ["id"],
3367
+ "onDelete": "cascade",
3368
+ "onUpdate": "no action"
3369
+ },
3370
+ "agent_runs_agent_id_agents_id_fk": {
3371
+ "name": "agent_runs_agent_id_agents_id_fk",
3372
+ "tableFrom": "agent_runs",
3373
+ "tableTo": "agents",
3374
+ "columnsFrom": ["agent_id"],
3375
+ "columnsTo": ["id"],
3376
+ "onDelete": "no action",
3377
+ "onUpdate": "no action"
3378
+ }
3379
+ },
3380
+ "compositePrimaryKeys": {},
3381
+ "uniqueConstraints": {},
3382
+ "policies": {},
3383
+ "checkConstraints": {
3384
+ "agent_runs_key_source_check": {
3385
+ "name": "agent_runs_key_source_check",
3386
+ "value": "\"agent_runs\".\"key_source\" IN ('entity','operator') OR \"agent_runs\".\"key_source\" IS NULL"
3387
+ }
3388
+ },
3389
+ "isRLSEnabled": false
3390
+ },
3391
+ "public.agent_mcp_servers": {
3392
+ "name": "agent_mcp_servers",
3393
+ "schema": "",
3394
+ "columns": {
3395
+ "id": {
3396
+ "name": "id",
3397
+ "type": "uuid",
3398
+ "primaryKey": true,
3399
+ "notNull": true,
3400
+ "default": "gen_random_uuid()"
3401
+ },
3402
+ "entity_id": {
3403
+ "name": "entity_id",
3404
+ "type": "uuid",
3405
+ "primaryKey": false,
3406
+ "notNull": true
3407
+ },
3408
+ "agent_id": {
3409
+ "name": "agent_id",
3410
+ "type": "uuid",
3411
+ "primaryKey": false,
3412
+ "notNull": true
3413
+ },
3414
+ "mcp_server_id": {
3415
+ "name": "mcp_server_id",
3416
+ "type": "uuid",
3417
+ "primaryKey": false,
3418
+ "notNull": true
3419
+ },
3420
+ "enabled_tools": {
3421
+ "name": "enabled_tools",
3422
+ "type": "jsonb",
3423
+ "primaryKey": false,
3424
+ "notNull": false
3425
+ },
3426
+ "created_at": {
3427
+ "name": "created_at",
3428
+ "type": "timestamp with time zone",
3429
+ "primaryKey": false,
3430
+ "notNull": true,
3431
+ "default": "now()"
3432
+ },
3433
+ "updated_at": {
3434
+ "name": "updated_at",
3435
+ "type": "timestamp with time zone",
3436
+ "primaryKey": false,
3437
+ "notNull": true,
3438
+ "default": "now()"
3439
+ }
3440
+ },
3441
+ "indexes": {
3442
+ "idx_agent_mcp_servers_agent": {
3443
+ "name": "idx_agent_mcp_servers_agent",
3444
+ "columns": [
3445
+ {
3446
+ "expression": "agent_id",
3447
+ "isExpression": false,
3448
+ "asc": true,
3449
+ "nulls": "last"
3450
+ }
3451
+ ],
3452
+ "isUnique": false,
3453
+ "concurrently": false,
3454
+ "method": "btree",
3455
+ "with": {}
3456
+ },
3457
+ "idx_agent_mcp_servers_entity": {
3458
+ "name": "idx_agent_mcp_servers_entity",
3459
+ "columns": [
3460
+ {
3461
+ "expression": "entity_id",
3462
+ "isExpression": false,
3463
+ "asc": true,
3464
+ "nulls": "last"
3465
+ }
3466
+ ],
3467
+ "isUnique": false,
3468
+ "concurrently": false,
3469
+ "method": "btree",
3470
+ "with": {}
3471
+ }
3472
+ },
3473
+ "foreignKeys": {
3474
+ "agent_mcp_servers_entity_id_entities_id_fk": {
3475
+ "name": "agent_mcp_servers_entity_id_entities_id_fk",
3476
+ "tableFrom": "agent_mcp_servers",
3477
+ "tableTo": "entities",
3478
+ "columnsFrom": ["entity_id"],
3479
+ "columnsTo": ["id"],
3480
+ "onDelete": "cascade",
3481
+ "onUpdate": "no action"
3482
+ },
3483
+ "agent_mcp_servers_agent_id_agents_id_fk": {
3484
+ "name": "agent_mcp_servers_agent_id_agents_id_fk",
3485
+ "tableFrom": "agent_mcp_servers",
3486
+ "tableTo": "agents",
3487
+ "columnsFrom": ["agent_id"],
3488
+ "columnsTo": ["id"],
3489
+ "onDelete": "cascade",
3490
+ "onUpdate": "no action"
3491
+ },
3492
+ "agent_mcp_servers_mcp_server_id_mcp_servers_id_fk": {
3493
+ "name": "agent_mcp_servers_mcp_server_id_mcp_servers_id_fk",
3494
+ "tableFrom": "agent_mcp_servers",
3495
+ "tableTo": "mcp_servers",
3496
+ "columnsFrom": ["mcp_server_id"],
3497
+ "columnsTo": ["id"],
3498
+ "onDelete": "cascade",
3499
+ "onUpdate": "no action"
3500
+ }
3501
+ },
3502
+ "compositePrimaryKeys": {},
3503
+ "uniqueConstraints": {},
3504
+ "policies": {},
3505
+ "checkConstraints": {},
3506
+ "isRLSEnabled": false
3507
+ },
3508
+ "public.mcp_connections": {
3509
+ "name": "mcp_connections",
3510
+ "schema": "",
3511
+ "columns": {
3512
+ "id": {
3513
+ "name": "id",
3514
+ "type": "uuid",
3515
+ "primaryKey": true,
3516
+ "notNull": true,
3517
+ "default": "gen_random_uuid()"
3518
+ },
3519
+ "entity_id": {
3520
+ "name": "entity_id",
3521
+ "type": "uuid",
3522
+ "primaryKey": false,
3523
+ "notNull": true
3524
+ },
3525
+ "slug": {
3526
+ "name": "slug",
3527
+ "type": "text",
3528
+ "primaryKey": false,
3529
+ "notNull": true
3530
+ },
3531
+ "active": {
3532
+ "name": "active",
3533
+ "type": "boolean",
3534
+ "primaryKey": false,
3535
+ "notNull": true,
3536
+ "default": true
3537
+ },
3538
+ "tool_config": {
3539
+ "name": "tool_config",
3540
+ "type": "jsonb",
3541
+ "primaryKey": false,
3542
+ "notNull": true,
3543
+ "default": "'{}'::jsonb"
3544
+ },
3545
+ "created_at": {
3546
+ "name": "created_at",
3547
+ "type": "timestamp with time zone",
3548
+ "primaryKey": false,
3549
+ "notNull": true,
3550
+ "default": "now()"
3551
+ },
3552
+ "updated_at": {
3553
+ "name": "updated_at",
3554
+ "type": "timestamp with time zone",
3555
+ "primaryKey": false,
3556
+ "notNull": true,
3557
+ "default": "now()"
3558
+ }
3559
+ },
3560
+ "indexes": {
3561
+ "idx_mcp_connections_entity": {
3562
+ "name": "idx_mcp_connections_entity",
3563
+ "columns": [
3564
+ {
3565
+ "expression": "entity_id",
3566
+ "isExpression": false,
3567
+ "asc": true,
3568
+ "nulls": "last"
3569
+ }
3570
+ ],
3571
+ "isUnique": false,
3572
+ "concurrently": false,
3573
+ "method": "btree",
3574
+ "with": {}
3575
+ }
3576
+ },
3577
+ "foreignKeys": {
3578
+ "mcp_connections_entity_id_entities_id_fk": {
3579
+ "name": "mcp_connections_entity_id_entities_id_fk",
3580
+ "tableFrom": "mcp_connections",
3581
+ "tableTo": "entities",
3582
+ "columnsFrom": ["entity_id"],
3583
+ "columnsTo": ["id"],
3584
+ "onDelete": "cascade",
3585
+ "onUpdate": "no action"
3586
+ }
3587
+ },
3588
+ "compositePrimaryKeys": {},
3589
+ "uniqueConstraints": {},
3590
+ "policies": {},
3591
+ "checkConstraints": {},
3592
+ "isRLSEnabled": false
3593
+ },
3594
+ "public.mcp_servers": {
3595
+ "name": "mcp_servers",
3596
+ "schema": "",
3597
+ "columns": {
3598
+ "id": {
3599
+ "name": "id",
3600
+ "type": "uuid",
3601
+ "primaryKey": true,
3602
+ "notNull": true,
3603
+ "default": "gen_random_uuid()"
3604
+ },
3605
+ "entity_id": {
3606
+ "name": "entity_id",
3607
+ "type": "uuid",
3608
+ "primaryKey": false,
3609
+ "notNull": false
3610
+ },
3611
+ "name": {
3612
+ "name": "name",
3613
+ "type": "text",
3614
+ "primaryKey": false,
3615
+ "notNull": true
3616
+ },
3617
+ "slug": {
3618
+ "name": "slug",
3619
+ "type": "text",
3620
+ "primaryKey": false,
3621
+ "notNull": true
3622
+ },
3623
+ "transport": {
3624
+ "name": "transport",
3625
+ "type": "text",
3626
+ "primaryKey": false,
3627
+ "notNull": true
3628
+ },
3629
+ "url": {
3630
+ "name": "url",
3631
+ "type": "text",
3632
+ "primaryKey": false,
3633
+ "notNull": false
3634
+ },
3635
+ "command": {
3636
+ "name": "command",
3637
+ "type": "text",
3638
+ "primaryKey": false,
3639
+ "notNull": false
3640
+ },
3641
+ "args": {
3642
+ "name": "args",
3643
+ "type": "text[]",
3644
+ "primaryKey": false,
3645
+ "notNull": false,
3646
+ "default": "'{}'::text[]"
3647
+ },
3648
+ "env_vars": {
3649
+ "name": "env_vars",
3650
+ "type": "jsonb",
3651
+ "primaryKey": false,
3652
+ "notNull": false,
3653
+ "default": "'{}'::jsonb"
3654
+ },
3655
+ "active": {
3656
+ "name": "active",
3657
+ "type": "boolean",
3658
+ "primaryKey": false,
3659
+ "notNull": false,
3660
+ "default": true
3661
+ },
3662
+ "available_tools": {
3663
+ "name": "available_tools",
3664
+ "type": "jsonb",
3665
+ "primaryKey": false,
3666
+ "notNull": false
3667
+ },
3668
+ "created_at": {
3669
+ "name": "created_at",
3670
+ "type": "timestamp with time zone",
3671
+ "primaryKey": false,
3672
+ "notNull": false,
3673
+ "default": "now()"
3674
+ },
3675
+ "updated_at": {
3676
+ "name": "updated_at",
3677
+ "type": "timestamp with time zone",
3678
+ "primaryKey": false,
3679
+ "notNull": false,
3680
+ "default": "now()"
3681
+ }
3682
+ },
3683
+ "indexes": {},
3684
+ "foreignKeys": {
3685
+ "mcp_servers_entity_id_entities_id_fk": {
3686
+ "name": "mcp_servers_entity_id_entities_id_fk",
3687
+ "tableFrom": "mcp_servers",
3688
+ "tableTo": "entities",
3689
+ "columnsFrom": ["entity_id"],
3690
+ "columnsTo": ["id"],
3691
+ "onDelete": "cascade",
3692
+ "onUpdate": "no action"
3693
+ }
3694
+ },
3695
+ "compositePrimaryKeys": {},
3696
+ "uniqueConstraints": {},
3697
+ "policies": {},
3698
+ "checkConstraints": {
3699
+ "mcp_servers_transport_check": {
3700
+ "name": "mcp_servers_transport_check",
3701
+ "value": "\"mcp_servers\".\"transport\" IN ('http','stdio')"
3702
+ }
3703
+ },
3704
+ "isRLSEnabled": false
3705
+ },
3706
+ "public.agent_plugins": {
3707
+ "name": "agent_plugins",
3708
+ "schema": "",
3709
+ "columns": {
3710
+ "id": {
3711
+ "name": "id",
3712
+ "type": "uuid",
3713
+ "primaryKey": true,
3714
+ "notNull": true,
3715
+ "default": "gen_random_uuid()"
3716
+ },
3717
+ "entity_id": {
3718
+ "name": "entity_id",
3719
+ "type": "uuid",
3720
+ "primaryKey": false,
3721
+ "notNull": false
3722
+ },
3723
+ "name": {
3724
+ "name": "name",
3725
+ "type": "text",
3726
+ "primaryKey": false,
3727
+ "notNull": true
3728
+ },
3729
+ "slug": {
3730
+ "name": "slug",
3731
+ "type": "text",
3732
+ "primaryKey": false,
3733
+ "notNull": true
3734
+ },
3735
+ "description": {
3736
+ "name": "description",
3737
+ "type": "text",
3738
+ "primaryKey": false,
3739
+ "notNull": false
3740
+ },
3741
+ "plugin_type": {
3742
+ "name": "plugin_type",
3743
+ "type": "text",
3744
+ "primaryKey": false,
3745
+ "notNull": true
3746
+ },
3747
+ "config": {
3748
+ "name": "config",
3749
+ "type": "jsonb",
3750
+ "primaryKey": false,
3751
+ "notNull": false,
3752
+ "default": "'{}'::jsonb"
3753
+ },
3754
+ "active": {
3755
+ "name": "active",
3756
+ "type": "boolean",
3757
+ "primaryKey": false,
3758
+ "notNull": false,
3759
+ "default": true
3760
+ },
3761
+ "hook": {
3762
+ "name": "hook",
3763
+ "type": "text",
3764
+ "primaryKey": false,
3765
+ "notNull": true
3766
+ },
3767
+ "webhook_url": {
3768
+ "name": "webhook_url",
3769
+ "type": "text",
3770
+ "primaryKey": false,
3771
+ "notNull": false
3772
+ },
3773
+ "created_at": {
3774
+ "name": "created_at",
3775
+ "type": "timestamp with time zone",
3776
+ "primaryKey": false,
3777
+ "notNull": false,
3778
+ "default": "now()"
3779
+ },
3780
+ "updated_at": {
3781
+ "name": "updated_at",
3782
+ "type": "timestamp with time zone",
3783
+ "primaryKey": false,
3784
+ "notNull": false,
3785
+ "default": "now()"
3786
+ }
3787
+ },
3788
+ "indexes": {},
3789
+ "foreignKeys": {
3790
+ "agent_plugins_entity_id_entities_id_fk": {
3791
+ "name": "agent_plugins_entity_id_entities_id_fk",
3792
+ "tableFrom": "agent_plugins",
3793
+ "tableTo": "entities",
3794
+ "columnsFrom": ["entity_id"],
3795
+ "columnsTo": ["id"],
3796
+ "onDelete": "cascade",
3797
+ "onUpdate": "no action"
3798
+ }
3799
+ },
3800
+ "compositePrimaryKeys": {},
3801
+ "uniqueConstraints": {},
3802
+ "policies": {},
3803
+ "checkConstraints": {
3804
+ "agent_plugins_plugin_type_check": {
3805
+ "name": "agent_plugins_plugin_type_check",
3806
+ "value": "\"agent_plugins\".\"plugin_type\" IN ('webhook','transform','schedule')"
3807
+ },
3808
+ "agent_plugins_hook_check": {
3809
+ "name": "agent_plugins_hook_check",
3810
+ "value": "\"agent_plugins\".\"hook\" IN ('pre_task','post_task','pre_tool','post_tool','on_memory_save')"
3811
+ }
3812
+ },
3813
+ "isRLSEnabled": false
3814
+ },
3815
+ "public.configurator_sessions": {
3816
+ "name": "configurator_sessions",
3817
+ "schema": "",
3818
+ "columns": {
3819
+ "id": {
3820
+ "name": "id",
3821
+ "type": "uuid",
3822
+ "primaryKey": true,
3823
+ "notNull": true,
3824
+ "default": "gen_random_uuid()"
3825
+ },
3826
+ "entity_id": {
3827
+ "name": "entity_id",
3828
+ "type": "uuid",
3829
+ "primaryKey": false,
3830
+ "notNull": true
3831
+ },
3832
+ "agent_id": {
3833
+ "name": "agent_id",
3834
+ "type": "uuid",
3835
+ "primaryKey": false,
3836
+ "notNull": false
3837
+ },
3838
+ "messages": {
3839
+ "name": "messages",
3840
+ "type": "jsonb",
3841
+ "primaryKey": false,
3842
+ "notNull": true,
3843
+ "default": "'[]'::jsonb"
3844
+ },
3845
+ "status": {
3846
+ "name": "status",
3847
+ "type": "text",
3848
+ "primaryKey": false,
3849
+ "notNull": true,
3850
+ "default": "'active'"
3851
+ },
3852
+ "turn_count": {
3853
+ "name": "turn_count",
3854
+ "type": "integer",
3855
+ "primaryKey": false,
3856
+ "notNull": true,
3857
+ "default": 0
3858
+ },
3859
+ "created_at": {
3860
+ "name": "created_at",
3861
+ "type": "timestamp with time zone",
3862
+ "primaryKey": false,
3863
+ "notNull": true,
3864
+ "default": "now()"
3865
+ },
3866
+ "updated_at": {
3867
+ "name": "updated_at",
3868
+ "type": "timestamp with time zone",
3869
+ "primaryKey": false,
3870
+ "notNull": true,
3871
+ "default": "now()"
3872
+ }
3873
+ },
3874
+ "indexes": {
3875
+ "idx_configurator_sessions_entity": {
3876
+ "name": "idx_configurator_sessions_entity",
3877
+ "columns": [
3878
+ {
3879
+ "expression": "entity_id",
3880
+ "isExpression": false,
3881
+ "asc": true,
3882
+ "nulls": "last"
3883
+ }
3884
+ ],
3885
+ "isUnique": false,
3886
+ "concurrently": false,
3887
+ "method": "btree",
3888
+ "with": {}
3889
+ },
3890
+ "idx_configurator_sessions_agent": {
3891
+ "name": "idx_configurator_sessions_agent",
3892
+ "columns": [
3893
+ {
3894
+ "expression": "agent_id",
3895
+ "isExpression": false,
3896
+ "asc": true,
3897
+ "nulls": "last"
3898
+ }
3899
+ ],
3900
+ "isUnique": false,
3901
+ "concurrently": false,
3902
+ "method": "btree",
3903
+ "with": {}
3904
+ }
3905
+ },
3906
+ "foreignKeys": {
3907
+ "configurator_sessions_entity_id_entities_id_fk": {
3908
+ "name": "configurator_sessions_entity_id_entities_id_fk",
3909
+ "tableFrom": "configurator_sessions",
3910
+ "tableTo": "entities",
3911
+ "columnsFrom": ["entity_id"],
3912
+ "columnsTo": ["id"],
3913
+ "onDelete": "cascade",
3914
+ "onUpdate": "no action"
3915
+ },
3916
+ "configurator_sessions_agent_id_agents_id_fk": {
3917
+ "name": "configurator_sessions_agent_id_agents_id_fk",
3918
+ "tableFrom": "configurator_sessions",
3919
+ "tableTo": "agents",
3920
+ "columnsFrom": ["agent_id"],
3921
+ "columnsTo": ["id"],
3922
+ "onDelete": "cascade",
3923
+ "onUpdate": "no action"
3924
+ }
3925
+ },
3926
+ "compositePrimaryKeys": {},
3927
+ "uniqueConstraints": {},
3928
+ "policies": {},
3929
+ "checkConstraints": {},
3930
+ "isRLSEnabled": false
3931
+ },
3932
+ "public.rate_limits": {
3933
+ "name": "rate_limits",
3934
+ "schema": "",
3935
+ "columns": {
3936
+ "key": {
3937
+ "name": "key",
3938
+ "type": "text",
3939
+ "primaryKey": true,
3940
+ "notNull": true
3941
+ },
3942
+ "count": {
3943
+ "name": "count",
3944
+ "type": "integer",
3945
+ "primaryKey": false,
3946
+ "notNull": false,
3947
+ "default": 1
3948
+ },
3949
+ "window_start": {
3950
+ "name": "window_start",
3951
+ "type": "timestamp with time zone",
3952
+ "primaryKey": false,
3953
+ "notNull": false,
3954
+ "default": "now()"
3955
+ }
3956
+ },
3957
+ "indexes": {},
3958
+ "foreignKeys": {},
3959
+ "compositePrimaryKeys": {},
3960
+ "uniqueConstraints": {},
3961
+ "policies": {},
3962
+ "checkConstraints": {},
3963
+ "isRLSEnabled": false
3964
+ },
3965
+ "public.accounts": {
3966
+ "name": "accounts",
3967
+ "schema": "",
3968
+ "columns": {
3969
+ "id": {
3970
+ "name": "id",
3971
+ "type": "text",
3972
+ "primaryKey": true,
3973
+ "notNull": true
3974
+ },
3975
+ "user_id": {
3976
+ "name": "user_id",
3977
+ "type": "uuid",
3978
+ "primaryKey": false,
3979
+ "notNull": true
3980
+ },
3981
+ "provider_id": {
3982
+ "name": "provider_id",
3983
+ "type": "text",
3984
+ "primaryKey": false,
3985
+ "notNull": true
3986
+ },
3987
+ "account_id": {
3988
+ "name": "account_id",
3989
+ "type": "text",
3990
+ "primaryKey": false,
3991
+ "notNull": true
3992
+ },
3993
+ "access_token": {
3994
+ "name": "access_token",
3995
+ "type": "text",
3996
+ "primaryKey": false,
3997
+ "notNull": false
3998
+ },
3999
+ "refresh_token": {
4000
+ "name": "refresh_token",
4001
+ "type": "text",
4002
+ "primaryKey": false,
4003
+ "notNull": false
4004
+ },
4005
+ "id_token": {
4006
+ "name": "id_token",
4007
+ "type": "text",
4008
+ "primaryKey": false,
4009
+ "notNull": false
4010
+ },
4011
+ "access_token_expires_at": {
4012
+ "name": "access_token_expires_at",
4013
+ "type": "timestamp with time zone",
4014
+ "primaryKey": false,
4015
+ "notNull": false
4016
+ },
4017
+ "refresh_token_expires_at": {
4018
+ "name": "refresh_token_expires_at",
4019
+ "type": "timestamp with time zone",
4020
+ "primaryKey": false,
4021
+ "notNull": false
4022
+ },
4023
+ "scope": {
4024
+ "name": "scope",
4025
+ "type": "text",
4026
+ "primaryKey": false,
4027
+ "notNull": false
4028
+ },
4029
+ "password": {
4030
+ "name": "password",
4031
+ "type": "text",
4032
+ "primaryKey": false,
4033
+ "notNull": false
4034
+ },
4035
+ "created_at": {
4036
+ "name": "created_at",
4037
+ "type": "timestamp with time zone",
4038
+ "primaryKey": false,
4039
+ "notNull": true,
4040
+ "default": "now()"
4041
+ },
4042
+ "updated_at": {
4043
+ "name": "updated_at",
4044
+ "type": "timestamp with time zone",
4045
+ "primaryKey": false,
4046
+ "notNull": true,
4047
+ "default": "now()"
4048
+ }
4049
+ },
4050
+ "indexes": {},
4051
+ "foreignKeys": {
4052
+ "accounts_user_id_users_id_fk": {
4053
+ "name": "accounts_user_id_users_id_fk",
4054
+ "tableFrom": "accounts",
4055
+ "tableTo": "users",
4056
+ "columnsFrom": ["user_id"],
4057
+ "columnsTo": ["id"],
4058
+ "onDelete": "cascade",
4059
+ "onUpdate": "no action"
4060
+ }
4061
+ },
4062
+ "compositePrimaryKeys": {},
4063
+ "uniqueConstraints": {},
4064
+ "policies": {},
4065
+ "checkConstraints": {},
4066
+ "isRLSEnabled": false
4067
+ },
4068
+ "public.sessions": {
4069
+ "name": "sessions",
4070
+ "schema": "",
4071
+ "columns": {
4072
+ "id": {
4073
+ "name": "id",
4074
+ "type": "text",
4075
+ "primaryKey": true,
4076
+ "notNull": true
4077
+ },
4078
+ "user_id": {
4079
+ "name": "user_id",
4080
+ "type": "uuid",
4081
+ "primaryKey": false,
4082
+ "notNull": true
4083
+ },
4084
+ "expires_at": {
4085
+ "name": "expires_at",
4086
+ "type": "timestamp with time zone",
4087
+ "primaryKey": false,
4088
+ "notNull": true
4089
+ },
4090
+ "token": {
4091
+ "name": "token",
4092
+ "type": "text",
4093
+ "primaryKey": false,
4094
+ "notNull": true
4095
+ },
4096
+ "ip_address": {
4097
+ "name": "ip_address",
4098
+ "type": "text",
4099
+ "primaryKey": false,
4100
+ "notNull": false
4101
+ },
4102
+ "user_agent": {
4103
+ "name": "user_agent",
4104
+ "type": "text",
4105
+ "primaryKey": false,
4106
+ "notNull": false
4107
+ },
4108
+ "created_at": {
4109
+ "name": "created_at",
4110
+ "type": "timestamp with time zone",
4111
+ "primaryKey": false,
4112
+ "notNull": true,
4113
+ "default": "now()"
4114
+ },
4115
+ "updated_at": {
4116
+ "name": "updated_at",
4117
+ "type": "timestamp with time zone",
4118
+ "primaryKey": false,
4119
+ "notNull": true,
4120
+ "default": "now()"
4121
+ }
4122
+ },
4123
+ "indexes": {},
4124
+ "foreignKeys": {
4125
+ "sessions_user_id_users_id_fk": {
4126
+ "name": "sessions_user_id_users_id_fk",
4127
+ "tableFrom": "sessions",
4128
+ "tableTo": "users",
4129
+ "columnsFrom": ["user_id"],
4130
+ "columnsTo": ["id"],
4131
+ "onDelete": "cascade",
4132
+ "onUpdate": "no action"
4133
+ }
4134
+ },
4135
+ "compositePrimaryKeys": {},
4136
+ "uniqueConstraints": {
4137
+ "sessions_token_unique": {
4138
+ "name": "sessions_token_unique",
4139
+ "nullsNotDistinct": false,
4140
+ "columns": ["token"]
4141
+ }
4142
+ },
4143
+ "policies": {},
4144
+ "checkConstraints": {},
4145
+ "isRLSEnabled": false
4146
+ },
4147
+ "public.verifications": {
4148
+ "name": "verifications",
4149
+ "schema": "",
4150
+ "columns": {
4151
+ "id": {
4152
+ "name": "id",
4153
+ "type": "text",
4154
+ "primaryKey": true,
4155
+ "notNull": true
4156
+ },
4157
+ "identifier": {
4158
+ "name": "identifier",
4159
+ "type": "text",
4160
+ "primaryKey": false,
4161
+ "notNull": true
4162
+ },
4163
+ "value": {
4164
+ "name": "value",
4165
+ "type": "text",
4166
+ "primaryKey": false,
4167
+ "notNull": true
4168
+ },
4169
+ "expires_at": {
4170
+ "name": "expires_at",
4171
+ "type": "timestamp with time zone",
4172
+ "primaryKey": false,
4173
+ "notNull": true
4174
+ },
4175
+ "created_at": {
4176
+ "name": "created_at",
4177
+ "type": "timestamp with time zone",
4178
+ "primaryKey": false,
4179
+ "notNull": true,
4180
+ "default": "now()"
4181
+ },
4182
+ "updated_at": {
4183
+ "name": "updated_at",
4184
+ "type": "timestamp with time zone",
4185
+ "primaryKey": false,
4186
+ "notNull": true,
4187
+ "default": "now()"
4188
+ }
4189
+ },
4190
+ "indexes": {},
4191
+ "foreignKeys": {},
4192
+ "compositePrimaryKeys": {},
4193
+ "uniqueConstraints": {},
4194
+ "policies": {},
4195
+ "checkConstraints": {},
4196
+ "isRLSEnabled": false
4197
+ }
4198
+ },
4199
+ "enums": {},
4200
+ "schemas": {},
4201
+ "sequences": {},
4202
+ "roles": {},
4203
+ "policies": {},
4204
+ "views": {},
4205
+ "_meta": {
4206
+ "columns": {},
4207
+ "schemas": {},
4208
+ "tables": {}
4209
+ }
4210
+ }