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