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