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,4330 @@
1
+ {
2
+ "id": "b400065d-8c11-4cf1-ba7c-f0d26a999e74",
3
+ "prevId": "45abdcf8-d716-4dc5-890b-85131924532a",
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.credentials": {
1460
+ "name": "credentials",
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
+ "owner_user_id": {
1471
+ "name": "owner_user_id",
1472
+ "type": "uuid",
1473
+ "primaryKey": false,
1474
+ "notNull": true
1475
+ },
1476
+ "name": {
1477
+ "name": "name",
1478
+ "type": "text",
1479
+ "primaryKey": false,
1480
+ "notNull": true
1481
+ },
1482
+ "type": {
1483
+ "name": "type",
1484
+ "type": "text",
1485
+ "primaryKey": false,
1486
+ "notNull": true
1487
+ },
1488
+ "payload": {
1489
+ "name": "payload",
1490
+ "type": "text",
1491
+ "primaryKey": false,
1492
+ "notNull": true
1493
+ },
1494
+ "created_at": {
1495
+ "name": "created_at",
1496
+ "type": "timestamp with time zone",
1497
+ "primaryKey": false,
1498
+ "notNull": false,
1499
+ "default": "now()"
1500
+ },
1501
+ "updated_at": {
1502
+ "name": "updated_at",
1503
+ "type": "timestamp with time zone",
1504
+ "primaryKey": false,
1505
+ "notNull": false,
1506
+ "default": "now()"
1507
+ }
1508
+ },
1509
+ "indexes": {
1510
+ "idx_credentials_owner": {
1511
+ "name": "idx_credentials_owner",
1512
+ "columns": [
1513
+ {
1514
+ "expression": "owner_user_id",
1515
+ "isExpression": false,
1516
+ "asc": true,
1517
+ "nulls": "last"
1518
+ }
1519
+ ],
1520
+ "isUnique": false,
1521
+ "concurrently": false,
1522
+ "method": "btree",
1523
+ "with": {}
1524
+ },
1525
+ "idx_credentials_type": {
1526
+ "name": "idx_credentials_type",
1527
+ "columns": [
1528
+ {
1529
+ "expression": "type",
1530
+ "isExpression": false,
1531
+ "asc": true,
1532
+ "nulls": "last"
1533
+ }
1534
+ ],
1535
+ "isUnique": false,
1536
+ "concurrently": false,
1537
+ "method": "btree",
1538
+ "with": {}
1539
+ }
1540
+ },
1541
+ "foreignKeys": {
1542
+ "credentials_owner_user_id_users_id_fk": {
1543
+ "name": "credentials_owner_user_id_users_id_fk",
1544
+ "tableFrom": "credentials",
1545
+ "tableTo": "users",
1546
+ "columnsFrom": ["owner_user_id"],
1547
+ "columnsTo": ["id"],
1548
+ "onDelete": "cascade",
1549
+ "onUpdate": "no action"
1550
+ }
1551
+ },
1552
+ "compositePrimaryKeys": {},
1553
+ "uniqueConstraints": {},
1554
+ "policies": {},
1555
+ "checkConstraints": {
1556
+ "credentials_type_check": {
1557
+ "name": "credentials_type_check",
1558
+ "value": "\"credentials\".\"type\" IN ('google-oauth','notion-oauth','airtable-oauth')"
1559
+ }
1560
+ },
1561
+ "isRLSEnabled": false
1562
+ },
1563
+ "public.connectors": {
1564
+ "name": "connectors",
1565
+ "schema": "",
1566
+ "columns": {
1567
+ "id": {
1568
+ "name": "id",
1569
+ "type": "uuid",
1570
+ "primaryKey": true,
1571
+ "notNull": true,
1572
+ "default": "gen_random_uuid()"
1573
+ },
1574
+ "entity_id": {
1575
+ "name": "entity_id",
1576
+ "type": "uuid",
1577
+ "primaryKey": false,
1578
+ "notNull": false
1579
+ },
1580
+ "name": {
1581
+ "name": "name",
1582
+ "type": "text",
1583
+ "primaryKey": false,
1584
+ "notNull": true
1585
+ },
1586
+ "slug": {
1587
+ "name": "slug",
1588
+ "type": "text",
1589
+ "primaryKey": false,
1590
+ "notNull": true
1591
+ },
1592
+ "base_url": {
1593
+ "name": "base_url",
1594
+ "type": "text",
1595
+ "primaryKey": false,
1596
+ "notNull": false
1597
+ },
1598
+ "api_key": {
1599
+ "name": "api_key",
1600
+ "type": "text",
1601
+ "primaryKey": false,
1602
+ "notNull": false
1603
+ },
1604
+ "active": {
1605
+ "name": "active",
1606
+ "type": "boolean",
1607
+ "primaryKey": false,
1608
+ "notNull": false,
1609
+ "default": true
1610
+ },
1611
+ "auth_type": {
1612
+ "name": "auth_type",
1613
+ "type": "text",
1614
+ "primaryKey": false,
1615
+ "notNull": true,
1616
+ "default": "'api_key'"
1617
+ },
1618
+ "credential_id": {
1619
+ "name": "credential_id",
1620
+ "type": "uuid",
1621
+ "primaryKey": false,
1622
+ "notNull": false
1623
+ },
1624
+ "created_at": {
1625
+ "name": "created_at",
1626
+ "type": "timestamp with time zone",
1627
+ "primaryKey": false,
1628
+ "notNull": false,
1629
+ "default": "now()"
1630
+ },
1631
+ "updated_at": {
1632
+ "name": "updated_at",
1633
+ "type": "timestamp with time zone",
1634
+ "primaryKey": false,
1635
+ "notNull": false,
1636
+ "default": "now()"
1637
+ }
1638
+ },
1639
+ "indexes": {
1640
+ "idx_connectors_entity_id": {
1641
+ "name": "idx_connectors_entity_id",
1642
+ "columns": [
1643
+ {
1644
+ "expression": "entity_id",
1645
+ "isExpression": false,
1646
+ "asc": true,
1647
+ "nulls": "last"
1648
+ }
1649
+ ],
1650
+ "isUnique": false,
1651
+ "concurrently": false,
1652
+ "method": "btree",
1653
+ "with": {}
1654
+ },
1655
+ "idx_connectors_credential_id": {
1656
+ "name": "idx_connectors_credential_id",
1657
+ "columns": [
1658
+ {
1659
+ "expression": "credential_id",
1660
+ "isExpression": false,
1661
+ "asc": true,
1662
+ "nulls": "last"
1663
+ }
1664
+ ],
1665
+ "isUnique": false,
1666
+ "concurrently": false,
1667
+ "method": "btree",
1668
+ "with": {}
1669
+ }
1670
+ },
1671
+ "foreignKeys": {
1672
+ "connectors_entity_id_entities_id_fk": {
1673
+ "name": "connectors_entity_id_entities_id_fk",
1674
+ "tableFrom": "connectors",
1675
+ "tableTo": "entities",
1676
+ "columnsFrom": ["entity_id"],
1677
+ "columnsTo": ["id"],
1678
+ "onDelete": "cascade",
1679
+ "onUpdate": "no action"
1680
+ },
1681
+ "connectors_credential_id_credentials_id_fk": {
1682
+ "name": "connectors_credential_id_credentials_id_fk",
1683
+ "tableFrom": "connectors",
1684
+ "tableTo": "credentials",
1685
+ "columnsFrom": ["credential_id"],
1686
+ "columnsTo": ["id"],
1687
+ "onDelete": "set null",
1688
+ "onUpdate": "no action"
1689
+ }
1690
+ },
1691
+ "compositePrimaryKeys": {},
1692
+ "uniqueConstraints": {
1693
+ "connectors_entity_slug_unique": {
1694
+ "name": "connectors_entity_slug_unique",
1695
+ "nullsNotDistinct": false,
1696
+ "columns": ["entity_id", "slug"]
1697
+ }
1698
+ },
1699
+ "policies": {},
1700
+ "checkConstraints": {
1701
+ "connectors_auth_type_check": {
1702
+ "name": "connectors_auth_type_check",
1703
+ "value": "\"connectors\".\"auth_type\" IN ('api_key','oauth2','bearer','basic','none')"
1704
+ }
1705
+ },
1706
+ "isRLSEnabled": false
1707
+ },
1708
+ "public.tool_calls": {
1709
+ "name": "tool_calls",
1710
+ "schema": "",
1711
+ "columns": {
1712
+ "id": {
1713
+ "name": "id",
1714
+ "type": "uuid",
1715
+ "primaryKey": true,
1716
+ "notNull": true,
1717
+ "default": "gen_random_uuid()"
1718
+ },
1719
+ "entity_id": {
1720
+ "name": "entity_id",
1721
+ "type": "uuid",
1722
+ "primaryKey": false,
1723
+ "notNull": false
1724
+ },
1725
+ "job_id": {
1726
+ "name": "job_id",
1727
+ "type": "uuid",
1728
+ "primaryKey": false,
1729
+ "notNull": false
1730
+ },
1731
+ "tool_name": {
1732
+ "name": "tool_name",
1733
+ "type": "text",
1734
+ "primaryKey": false,
1735
+ "notNull": true
1736
+ },
1737
+ "tool_input": {
1738
+ "name": "tool_input",
1739
+ "type": "jsonb",
1740
+ "primaryKey": false,
1741
+ "notNull": false
1742
+ },
1743
+ "tool_output": {
1744
+ "name": "tool_output",
1745
+ "type": "text",
1746
+ "primaryKey": false,
1747
+ "notNull": false
1748
+ },
1749
+ "duration_ms": {
1750
+ "name": "duration_ms",
1751
+ "type": "integer",
1752
+ "primaryKey": false,
1753
+ "notNull": false
1754
+ },
1755
+ "turn": {
1756
+ "name": "turn",
1757
+ "type": "integer",
1758
+ "primaryKey": false,
1759
+ "notNull": false
1760
+ },
1761
+ "created_at": {
1762
+ "name": "created_at",
1763
+ "type": "timestamp with time zone",
1764
+ "primaryKey": false,
1765
+ "notNull": false,
1766
+ "default": "now()"
1767
+ }
1768
+ },
1769
+ "indexes": {
1770
+ "idx_tool_calls_entity_id": {
1771
+ "name": "idx_tool_calls_entity_id",
1772
+ "columns": [
1773
+ {
1774
+ "expression": "entity_id",
1775
+ "isExpression": false,
1776
+ "asc": true,
1777
+ "nulls": "last"
1778
+ }
1779
+ ],
1780
+ "isUnique": false,
1781
+ "concurrently": false,
1782
+ "method": "btree",
1783
+ "with": {}
1784
+ },
1785
+ "idx_tool_calls_job": {
1786
+ "name": "idx_tool_calls_job",
1787
+ "columns": [
1788
+ {
1789
+ "expression": "job_id",
1790
+ "isExpression": false,
1791
+ "asc": true,
1792
+ "nulls": "last"
1793
+ }
1794
+ ],
1795
+ "isUnique": false,
1796
+ "concurrently": false,
1797
+ "method": "btree",
1798
+ "with": {}
1799
+ },
1800
+ "idx_tool_calls_job_created": {
1801
+ "name": "idx_tool_calls_job_created",
1802
+ "columns": [
1803
+ {
1804
+ "expression": "job_id",
1805
+ "isExpression": false,
1806
+ "asc": true,
1807
+ "nulls": "last"
1808
+ },
1809
+ {
1810
+ "expression": "\"created_at\" DESC",
1811
+ "asc": true,
1812
+ "isExpression": true,
1813
+ "nulls": "last"
1814
+ }
1815
+ ],
1816
+ "isUnique": false,
1817
+ "concurrently": false,
1818
+ "method": "btree",
1819
+ "with": {}
1820
+ },
1821
+ "idx_tool_calls_recent": {
1822
+ "name": "idx_tool_calls_recent",
1823
+ "columns": [
1824
+ {
1825
+ "expression": "\"created_at\" DESC",
1826
+ "asc": true,
1827
+ "isExpression": true,
1828
+ "nulls": "last"
1829
+ }
1830
+ ],
1831
+ "isUnique": false,
1832
+ "concurrently": false,
1833
+ "method": "btree",
1834
+ "with": {}
1835
+ }
1836
+ },
1837
+ "foreignKeys": {
1838
+ "tool_calls_entity_id_entities_id_fk": {
1839
+ "name": "tool_calls_entity_id_entities_id_fk",
1840
+ "tableFrom": "tool_calls",
1841
+ "tableTo": "entities",
1842
+ "columnsFrom": ["entity_id"],
1843
+ "columnsTo": ["id"],
1844
+ "onDelete": "cascade",
1845
+ "onUpdate": "no action"
1846
+ },
1847
+ "tool_calls_job_id_agent_jobs_id_fk": {
1848
+ "name": "tool_calls_job_id_agent_jobs_id_fk",
1849
+ "tableFrom": "tool_calls",
1850
+ "tableTo": "agent_jobs",
1851
+ "columnsFrom": ["job_id"],
1852
+ "columnsTo": ["id"],
1853
+ "onDelete": "cascade",
1854
+ "onUpdate": "no action"
1855
+ }
1856
+ },
1857
+ "compositePrimaryKeys": {},
1858
+ "uniqueConstraints": {},
1859
+ "policies": {},
1860
+ "checkConstraints": {},
1861
+ "isRLSEnabled": false
1862
+ },
1863
+ "public.approval_requests": {
1864
+ "name": "approval_requests",
1865
+ "schema": "",
1866
+ "columns": {
1867
+ "id": {
1868
+ "name": "id",
1869
+ "type": "uuid",
1870
+ "primaryKey": true,
1871
+ "notNull": true,
1872
+ "default": "gen_random_uuid()"
1873
+ },
1874
+ "entity_id": {
1875
+ "name": "entity_id",
1876
+ "type": "uuid",
1877
+ "primaryKey": false,
1878
+ "notNull": false
1879
+ },
1880
+ "job_id": {
1881
+ "name": "job_id",
1882
+ "type": "uuid",
1883
+ "primaryKey": false,
1884
+ "notNull": true
1885
+ },
1886
+ "agent_id": {
1887
+ "name": "agent_id",
1888
+ "type": "uuid",
1889
+ "primaryKey": false,
1890
+ "notNull": false
1891
+ },
1892
+ "tool_name": {
1893
+ "name": "tool_name",
1894
+ "type": "text",
1895
+ "primaryKey": false,
1896
+ "notNull": true
1897
+ },
1898
+ "tool_input": {
1899
+ "name": "tool_input",
1900
+ "type": "jsonb",
1901
+ "primaryKey": false,
1902
+ "notNull": true
1903
+ },
1904
+ "status": {
1905
+ "name": "status",
1906
+ "type": "text",
1907
+ "primaryKey": false,
1908
+ "notNull": false,
1909
+ "default": "'pending'"
1910
+ },
1911
+ "requested_at": {
1912
+ "name": "requested_at",
1913
+ "type": "timestamp with time zone",
1914
+ "primaryKey": false,
1915
+ "notNull": false,
1916
+ "default": "now()"
1917
+ },
1918
+ "resolved_at": {
1919
+ "name": "resolved_at",
1920
+ "type": "timestamp with time zone",
1921
+ "primaryKey": false,
1922
+ "notNull": false
1923
+ },
1924
+ "resolved_by": {
1925
+ "name": "resolved_by",
1926
+ "type": "text",
1927
+ "primaryKey": false,
1928
+ "notNull": false
1929
+ },
1930
+ "expires_at": {
1931
+ "name": "expires_at",
1932
+ "type": "timestamp with time zone",
1933
+ "primaryKey": false,
1934
+ "notNull": false,
1935
+ "default": "now() + interval '1 hour'"
1936
+ },
1937
+ "notes": {
1938
+ "name": "notes",
1939
+ "type": "text",
1940
+ "primaryKey": false,
1941
+ "notNull": false
1942
+ }
1943
+ },
1944
+ "indexes": {
1945
+ "idx_approval_requests_entity_id": {
1946
+ "name": "idx_approval_requests_entity_id",
1947
+ "columns": [
1948
+ {
1949
+ "expression": "entity_id",
1950
+ "isExpression": false,
1951
+ "asc": true,
1952
+ "nulls": "last"
1953
+ }
1954
+ ],
1955
+ "isUnique": false,
1956
+ "concurrently": false,
1957
+ "method": "btree",
1958
+ "with": {}
1959
+ },
1960
+ "idx_approval_status": {
1961
+ "name": "idx_approval_status",
1962
+ "columns": [
1963
+ {
1964
+ "expression": "status",
1965
+ "isExpression": false,
1966
+ "asc": true,
1967
+ "nulls": "last"
1968
+ },
1969
+ {
1970
+ "expression": "requested_at",
1971
+ "isExpression": false,
1972
+ "asc": true,
1973
+ "nulls": "last"
1974
+ }
1975
+ ],
1976
+ "isUnique": false,
1977
+ "concurrently": false,
1978
+ "method": "btree",
1979
+ "with": {}
1980
+ },
1981
+ "idx_approval_requests_agent_id": {
1982
+ "name": "idx_approval_requests_agent_id",
1983
+ "columns": [
1984
+ {
1985
+ "expression": "agent_id",
1986
+ "isExpression": false,
1987
+ "asc": true,
1988
+ "nulls": "last"
1989
+ }
1990
+ ],
1991
+ "isUnique": false,
1992
+ "concurrently": false,
1993
+ "method": "btree",
1994
+ "with": {}
1995
+ },
1996
+ "idx_approval_requests_job_id": {
1997
+ "name": "idx_approval_requests_job_id",
1998
+ "columns": [
1999
+ {
2000
+ "expression": "job_id",
2001
+ "isExpression": false,
2002
+ "asc": true,
2003
+ "nulls": "last"
2004
+ }
2005
+ ],
2006
+ "isUnique": false,
2007
+ "concurrently": false,
2008
+ "method": "btree",
2009
+ "with": {}
2010
+ }
2011
+ },
2012
+ "foreignKeys": {
2013
+ "approval_requests_entity_id_entities_id_fk": {
2014
+ "name": "approval_requests_entity_id_entities_id_fk",
2015
+ "tableFrom": "approval_requests",
2016
+ "tableTo": "entities",
2017
+ "columnsFrom": ["entity_id"],
2018
+ "columnsTo": ["id"],
2019
+ "onDelete": "cascade",
2020
+ "onUpdate": "no action"
2021
+ },
2022
+ "approval_requests_job_id_agent_jobs_id_fk": {
2023
+ "name": "approval_requests_job_id_agent_jobs_id_fk",
2024
+ "tableFrom": "approval_requests",
2025
+ "tableTo": "agent_jobs",
2026
+ "columnsFrom": ["job_id"],
2027
+ "columnsTo": ["id"],
2028
+ "onDelete": "cascade",
2029
+ "onUpdate": "no action"
2030
+ },
2031
+ "approval_requests_agent_id_agents_id_fk": {
2032
+ "name": "approval_requests_agent_id_agents_id_fk",
2033
+ "tableFrom": "approval_requests",
2034
+ "tableTo": "agents",
2035
+ "columnsFrom": ["agent_id"],
2036
+ "columnsTo": ["id"],
2037
+ "onDelete": "no action",
2038
+ "onUpdate": "no action"
2039
+ }
2040
+ },
2041
+ "compositePrimaryKeys": {},
2042
+ "uniqueConstraints": {},
2043
+ "policies": {},
2044
+ "checkConstraints": {
2045
+ "approval_requests_status_check": {
2046
+ "name": "approval_requests_status_check",
2047
+ "value": "\"approval_requests\".\"status\" IN ('pending','approved','rejected','expired')"
2048
+ }
2049
+ },
2050
+ "isRLSEnabled": false
2051
+ },
2052
+ "public.approval_rules": {
2053
+ "name": "approval_rules",
2054
+ "schema": "",
2055
+ "columns": {
2056
+ "id": {
2057
+ "name": "id",
2058
+ "type": "uuid",
2059
+ "primaryKey": true,
2060
+ "notNull": true,
2061
+ "default": "gen_random_uuid()"
2062
+ },
2063
+ "entity_id": {
2064
+ "name": "entity_id",
2065
+ "type": "uuid",
2066
+ "primaryKey": false,
2067
+ "notNull": false
2068
+ },
2069
+ "agent_id": {
2070
+ "name": "agent_id",
2071
+ "type": "uuid",
2072
+ "primaryKey": false,
2073
+ "notNull": false
2074
+ },
2075
+ "tool_name": {
2076
+ "name": "tool_name",
2077
+ "type": "text",
2078
+ "primaryKey": false,
2079
+ "notNull": true
2080
+ },
2081
+ "action": {
2082
+ "name": "action",
2083
+ "type": "text",
2084
+ "primaryKey": false,
2085
+ "notNull": true
2086
+ },
2087
+ "condition_json": {
2088
+ "name": "condition_json",
2089
+ "type": "jsonb",
2090
+ "primaryKey": false,
2091
+ "notNull": false,
2092
+ "default": "'{}'::jsonb"
2093
+ },
2094
+ "created_at": {
2095
+ "name": "created_at",
2096
+ "type": "timestamp with time zone",
2097
+ "primaryKey": false,
2098
+ "notNull": false,
2099
+ "default": "now()"
2100
+ },
2101
+ "updated_at": {
2102
+ "name": "updated_at",
2103
+ "type": "timestamp with time zone",
2104
+ "primaryKey": false,
2105
+ "notNull": false,
2106
+ "default": "now()"
2107
+ }
2108
+ },
2109
+ "indexes": {
2110
+ "idx_approval_rules_entity_id": {
2111
+ "name": "idx_approval_rules_entity_id",
2112
+ "columns": [
2113
+ {
2114
+ "expression": "entity_id",
2115
+ "isExpression": false,
2116
+ "asc": true,
2117
+ "nulls": "last"
2118
+ }
2119
+ ],
2120
+ "isUnique": false,
2121
+ "concurrently": false,
2122
+ "method": "btree",
2123
+ "with": {}
2124
+ }
2125
+ },
2126
+ "foreignKeys": {
2127
+ "approval_rules_entity_id_entities_id_fk": {
2128
+ "name": "approval_rules_entity_id_entities_id_fk",
2129
+ "tableFrom": "approval_rules",
2130
+ "tableTo": "entities",
2131
+ "columnsFrom": ["entity_id"],
2132
+ "columnsTo": ["id"],
2133
+ "onDelete": "cascade",
2134
+ "onUpdate": "no action"
2135
+ },
2136
+ "approval_rules_agent_id_agents_id_fk": {
2137
+ "name": "approval_rules_agent_id_agents_id_fk",
2138
+ "tableFrom": "approval_rules",
2139
+ "tableTo": "agents",
2140
+ "columnsFrom": ["agent_id"],
2141
+ "columnsTo": ["id"],
2142
+ "onDelete": "cascade",
2143
+ "onUpdate": "no action"
2144
+ }
2145
+ },
2146
+ "compositePrimaryKeys": {},
2147
+ "uniqueConstraints": {},
2148
+ "policies": {},
2149
+ "checkConstraints": {
2150
+ "approval_rules_action_check": {
2151
+ "name": "approval_rules_action_check",
2152
+ "value": "\"approval_rules\".\"action\" IN ('auto_approve','require_approval','block')"
2153
+ }
2154
+ },
2155
+ "isRLSEnabled": false
2156
+ },
2157
+ "public.agent_memory": {
2158
+ "name": "agent_memory",
2159
+ "schema": "",
2160
+ "columns": {
2161
+ "id": {
2162
+ "name": "id",
2163
+ "type": "uuid",
2164
+ "primaryKey": true,
2165
+ "notNull": true,
2166
+ "default": "gen_random_uuid()"
2167
+ },
2168
+ "entity_id": {
2169
+ "name": "entity_id",
2170
+ "type": "uuid",
2171
+ "primaryKey": false,
2172
+ "notNull": false
2173
+ },
2174
+ "agent_id": {
2175
+ "name": "agent_id",
2176
+ "type": "uuid",
2177
+ "primaryKey": false,
2178
+ "notNull": false
2179
+ },
2180
+ "fact": {
2181
+ "name": "fact",
2182
+ "type": "text",
2183
+ "primaryKey": false,
2184
+ "notNull": true
2185
+ },
2186
+ "category": {
2187
+ "name": "category",
2188
+ "type": "text",
2189
+ "primaryKey": false,
2190
+ "notNull": false,
2191
+ "default": "'context'"
2192
+ },
2193
+ "importance": {
2194
+ "name": "importance",
2195
+ "type": "integer",
2196
+ "primaryKey": false,
2197
+ "notNull": false,
2198
+ "default": 3
2199
+ },
2200
+ "source": {
2201
+ "name": "source",
2202
+ "type": "text",
2203
+ "primaryKey": false,
2204
+ "notNull": false,
2205
+ "default": "'agent'"
2206
+ },
2207
+ "skill_tags": {
2208
+ "name": "skill_tags",
2209
+ "type": "text[]",
2210
+ "primaryKey": false,
2211
+ "notNull": false,
2212
+ "default": "'{}'::text[]"
2213
+ },
2214
+ "memory_layer": {
2215
+ "name": "memory_layer",
2216
+ "type": "text",
2217
+ "primaryKey": false,
2218
+ "notNull": false
2219
+ },
2220
+ "embedding": {
2221
+ "name": "embedding",
2222
+ "type": "vector(1536)",
2223
+ "primaryKey": false,
2224
+ "notNull": false
2225
+ },
2226
+ "valid_from": {
2227
+ "name": "valid_from",
2228
+ "type": "timestamp with time zone",
2229
+ "primaryKey": false,
2230
+ "notNull": false,
2231
+ "default": "now()"
2232
+ },
2233
+ "valid_to": {
2234
+ "name": "valid_to",
2235
+ "type": "timestamp with time zone",
2236
+ "primaryKey": false,
2237
+ "notNull": false
2238
+ },
2239
+ "fact_hash": {
2240
+ "name": "fact_hash",
2241
+ "type": "text",
2242
+ "primaryKey": false,
2243
+ "notNull": false
2244
+ },
2245
+ "archived": {
2246
+ "name": "archived",
2247
+ "type": "boolean",
2248
+ "primaryKey": false,
2249
+ "notNull": false,
2250
+ "default": false
2251
+ },
2252
+ "last_accessed_at": {
2253
+ "name": "last_accessed_at",
2254
+ "type": "timestamp with time zone",
2255
+ "primaryKey": false,
2256
+ "notNull": false,
2257
+ "default": "now()"
2258
+ },
2259
+ "access_count": {
2260
+ "name": "access_count",
2261
+ "type": "integer",
2262
+ "primaryKey": false,
2263
+ "notNull": false,
2264
+ "default": 0
2265
+ },
2266
+ "created_at": {
2267
+ "name": "created_at",
2268
+ "type": "timestamp with time zone",
2269
+ "primaryKey": false,
2270
+ "notNull": false,
2271
+ "default": "now()"
2272
+ },
2273
+ "updated_at": {
2274
+ "name": "updated_at",
2275
+ "type": "timestamp with time zone",
2276
+ "primaryKey": false,
2277
+ "notNull": false,
2278
+ "default": "now()"
2279
+ }
2280
+ },
2281
+ "indexes": {
2282
+ "idx_agent_memory_entity_id": {
2283
+ "name": "idx_agent_memory_entity_id",
2284
+ "columns": [
2285
+ {
2286
+ "expression": "entity_id",
2287
+ "isExpression": false,
2288
+ "asc": true,
2289
+ "nulls": "last"
2290
+ }
2291
+ ],
2292
+ "isUnique": false,
2293
+ "concurrently": false,
2294
+ "method": "btree",
2295
+ "with": {}
2296
+ },
2297
+ "idx_agent_memory_entity_active": {
2298
+ "name": "idx_agent_memory_entity_active",
2299
+ "columns": [
2300
+ {
2301
+ "expression": "entity_id",
2302
+ "isExpression": false,
2303
+ "asc": true,
2304
+ "nulls": "last"
2305
+ },
2306
+ {
2307
+ "expression": "archived",
2308
+ "isExpression": false,
2309
+ "asc": true,
2310
+ "nulls": "last"
2311
+ },
2312
+ {
2313
+ "expression": "valid_to",
2314
+ "isExpression": false,
2315
+ "asc": true,
2316
+ "nulls": "last"
2317
+ }
2318
+ ],
2319
+ "isUnique": false,
2320
+ "concurrently": false,
2321
+ "method": "btree",
2322
+ "with": {}
2323
+ },
2324
+ "idx_agent_memory_archived": {
2325
+ "name": "idx_agent_memory_archived",
2326
+ "columns": [
2327
+ {
2328
+ "expression": "archived",
2329
+ "isExpression": false,
2330
+ "asc": true,
2331
+ "nulls": "last"
2332
+ }
2333
+ ],
2334
+ "isUnique": false,
2335
+ "concurrently": false,
2336
+ "method": "btree",
2337
+ "with": {}
2338
+ },
2339
+ "idx_agent_memory_last_accessed": {
2340
+ "name": "idx_agent_memory_last_accessed",
2341
+ "columns": [
2342
+ {
2343
+ "expression": "last_accessed_at",
2344
+ "isExpression": false,
2345
+ "asc": true,
2346
+ "nulls": "last"
2347
+ }
2348
+ ],
2349
+ "isUnique": false,
2350
+ "concurrently": false,
2351
+ "method": "btree",
2352
+ "with": {}
2353
+ },
2354
+ "idx_agent_memory_layer": {
2355
+ "name": "idx_agent_memory_layer",
2356
+ "columns": [
2357
+ {
2358
+ "expression": "memory_layer",
2359
+ "isExpression": false,
2360
+ "asc": true,
2361
+ "nulls": "last"
2362
+ }
2363
+ ],
2364
+ "isUnique": false,
2365
+ "concurrently": false,
2366
+ "method": "btree",
2367
+ "with": {}
2368
+ },
2369
+ "idx_agent_memory_fact_hash": {
2370
+ "name": "idx_agent_memory_fact_hash",
2371
+ "columns": [
2372
+ {
2373
+ "expression": "fact_hash",
2374
+ "isExpression": false,
2375
+ "asc": true,
2376
+ "nulls": "last"
2377
+ }
2378
+ ],
2379
+ "isUnique": false,
2380
+ "concurrently": false,
2381
+ "method": "btree",
2382
+ "with": {}
2383
+ },
2384
+ "idx_memory_category": {
2385
+ "name": "idx_memory_category",
2386
+ "columns": [
2387
+ {
2388
+ "expression": "category",
2389
+ "isExpression": false,
2390
+ "asc": true,
2391
+ "nulls": "last"
2392
+ },
2393
+ {
2394
+ "expression": "\"importance\" DESC",
2395
+ "asc": true,
2396
+ "isExpression": true,
2397
+ "nulls": "last"
2398
+ }
2399
+ ],
2400
+ "isUnique": false,
2401
+ "concurrently": false,
2402
+ "method": "btree",
2403
+ "with": {}
2404
+ }
2405
+ },
2406
+ "foreignKeys": {
2407
+ "agent_memory_entity_id_entities_id_fk": {
2408
+ "name": "agent_memory_entity_id_entities_id_fk",
2409
+ "tableFrom": "agent_memory",
2410
+ "tableTo": "entities",
2411
+ "columnsFrom": ["entity_id"],
2412
+ "columnsTo": ["id"],
2413
+ "onDelete": "cascade",
2414
+ "onUpdate": "no action"
2415
+ },
2416
+ "agent_memory_agent_id_agents_id_fk": {
2417
+ "name": "agent_memory_agent_id_agents_id_fk",
2418
+ "tableFrom": "agent_memory",
2419
+ "tableTo": "agents",
2420
+ "columnsFrom": ["agent_id"],
2421
+ "columnsTo": ["id"],
2422
+ "onDelete": "no action",
2423
+ "onUpdate": "no action"
2424
+ }
2425
+ },
2426
+ "compositePrimaryKeys": {},
2427
+ "uniqueConstraints": {},
2428
+ "policies": {},
2429
+ "checkConstraints": {
2430
+ "agent_memory_category_check": {
2431
+ "name": "agent_memory_category_check",
2432
+ "value": "\"agent_memory\".\"category\" IN ('preference','context','outcome','learned_rule')"
2433
+ },
2434
+ "agent_memory_importance_check": {
2435
+ "name": "agent_memory_importance_check",
2436
+ "value": "\"agent_memory\".\"importance\" >= 1 AND \"agent_memory\".\"importance\" <= 5"
2437
+ },
2438
+ "agent_memory_source_check": {
2439
+ "name": "agent_memory_source_check",
2440
+ "value": "\"agent_memory\".\"source\" IN ('agent','reflection','manual')"
2441
+ }
2442
+ },
2443
+ "isRLSEnabled": false
2444
+ },
2445
+ "public.webhook_triggers": {
2446
+ "name": "webhook_triggers",
2447
+ "schema": "",
2448
+ "columns": {
2449
+ "id": {
2450
+ "name": "id",
2451
+ "type": "uuid",
2452
+ "primaryKey": true,
2453
+ "notNull": true,
2454
+ "default": "gen_random_uuid()"
2455
+ },
2456
+ "entity_id": {
2457
+ "name": "entity_id",
2458
+ "type": "uuid",
2459
+ "primaryKey": false,
2460
+ "notNull": false
2461
+ },
2462
+ "agent_id": {
2463
+ "name": "agent_id",
2464
+ "type": "uuid",
2465
+ "primaryKey": false,
2466
+ "notNull": false
2467
+ },
2468
+ "name": {
2469
+ "name": "name",
2470
+ "type": "text",
2471
+ "primaryKey": false,
2472
+ "notNull": true
2473
+ },
2474
+ "slug": {
2475
+ "name": "slug",
2476
+ "type": "text",
2477
+ "primaryKey": false,
2478
+ "notNull": true
2479
+ },
2480
+ "task_template": {
2481
+ "name": "task_template",
2482
+ "type": "text",
2483
+ "primaryKey": false,
2484
+ "notNull": true
2485
+ },
2486
+ "active": {
2487
+ "name": "active",
2488
+ "type": "boolean",
2489
+ "primaryKey": false,
2490
+ "notNull": false,
2491
+ "default": true
2492
+ },
2493
+ "secret": {
2494
+ "name": "secret",
2495
+ "type": "text",
2496
+ "primaryKey": false,
2497
+ "notNull": false
2498
+ },
2499
+ "last_triggered_at": {
2500
+ "name": "last_triggered_at",
2501
+ "type": "timestamp with time zone",
2502
+ "primaryKey": false,
2503
+ "notNull": false
2504
+ },
2505
+ "trigger_count": {
2506
+ "name": "trigger_count",
2507
+ "type": "integer",
2508
+ "primaryKey": false,
2509
+ "notNull": false,
2510
+ "default": 0
2511
+ },
2512
+ "created_at": {
2513
+ "name": "created_at",
2514
+ "type": "timestamp with time zone",
2515
+ "primaryKey": false,
2516
+ "notNull": false,
2517
+ "default": "now()"
2518
+ },
2519
+ "updated_at": {
2520
+ "name": "updated_at",
2521
+ "type": "timestamp with time zone",
2522
+ "primaryKey": false,
2523
+ "notNull": false,
2524
+ "default": "now()"
2525
+ }
2526
+ },
2527
+ "indexes": {
2528
+ "idx_webhook_triggers_entity_id": {
2529
+ "name": "idx_webhook_triggers_entity_id",
2530
+ "columns": [
2531
+ {
2532
+ "expression": "entity_id",
2533
+ "isExpression": false,
2534
+ "asc": true,
2535
+ "nulls": "last"
2536
+ }
2537
+ ],
2538
+ "isUnique": false,
2539
+ "concurrently": false,
2540
+ "method": "btree",
2541
+ "with": {}
2542
+ }
2543
+ },
2544
+ "foreignKeys": {
2545
+ "webhook_triggers_entity_id_entities_id_fk": {
2546
+ "name": "webhook_triggers_entity_id_entities_id_fk",
2547
+ "tableFrom": "webhook_triggers",
2548
+ "tableTo": "entities",
2549
+ "columnsFrom": ["entity_id"],
2550
+ "columnsTo": ["id"],
2551
+ "onDelete": "cascade",
2552
+ "onUpdate": "no action"
2553
+ },
2554
+ "webhook_triggers_agent_id_agents_id_fk": {
2555
+ "name": "webhook_triggers_agent_id_agents_id_fk",
2556
+ "tableFrom": "webhook_triggers",
2557
+ "tableTo": "agents",
2558
+ "columnsFrom": ["agent_id"],
2559
+ "columnsTo": ["id"],
2560
+ "onDelete": "cascade",
2561
+ "onUpdate": "no action"
2562
+ }
2563
+ },
2564
+ "compositePrimaryKeys": {},
2565
+ "uniqueConstraints": {
2566
+ "webhook_triggers_slug_unique": {
2567
+ "name": "webhook_triggers_slug_unique",
2568
+ "nullsNotDistinct": false,
2569
+ "columns": ["slug"]
2570
+ }
2571
+ },
2572
+ "policies": {},
2573
+ "checkConstraints": {},
2574
+ "isRLSEnabled": false
2575
+ },
2576
+ "public.agent_skill_assignments": {
2577
+ "name": "agent_skill_assignments",
2578
+ "schema": "",
2579
+ "columns": {
2580
+ "id": {
2581
+ "name": "id",
2582
+ "type": "uuid",
2583
+ "primaryKey": true,
2584
+ "notNull": true,
2585
+ "default": "gen_random_uuid()"
2586
+ },
2587
+ "entity_id": {
2588
+ "name": "entity_id",
2589
+ "type": "uuid",
2590
+ "primaryKey": false,
2591
+ "notNull": true
2592
+ },
2593
+ "agent_id": {
2594
+ "name": "agent_id",
2595
+ "type": "uuid",
2596
+ "primaryKey": false,
2597
+ "notNull": true
2598
+ },
2599
+ "skill_id": {
2600
+ "name": "skill_id",
2601
+ "type": "uuid",
2602
+ "primaryKey": false,
2603
+ "notNull": true
2604
+ },
2605
+ "approval_overrides": {
2606
+ "name": "approval_overrides",
2607
+ "type": "jsonb",
2608
+ "primaryKey": false,
2609
+ "notNull": false,
2610
+ "default": "'{}'::jsonb"
2611
+ },
2612
+ "use_custom_instructions": {
2613
+ "name": "use_custom_instructions",
2614
+ "type": "boolean",
2615
+ "primaryKey": false,
2616
+ "notNull": true,
2617
+ "default": false
2618
+ },
2619
+ "enabled_operations": {
2620
+ "name": "enabled_operations",
2621
+ "type": "text[]",
2622
+ "primaryKey": false,
2623
+ "notNull": false
2624
+ },
2625
+ "created_at": {
2626
+ "name": "created_at",
2627
+ "type": "timestamp with time zone",
2628
+ "primaryKey": false,
2629
+ "notNull": true,
2630
+ "default": "now()"
2631
+ }
2632
+ },
2633
+ "indexes": {},
2634
+ "foreignKeys": {
2635
+ "agent_skill_assignments_entity_id_entities_id_fk": {
2636
+ "name": "agent_skill_assignments_entity_id_entities_id_fk",
2637
+ "tableFrom": "agent_skill_assignments",
2638
+ "tableTo": "entities",
2639
+ "columnsFrom": ["entity_id"],
2640
+ "columnsTo": ["id"],
2641
+ "onDelete": "cascade",
2642
+ "onUpdate": "no action"
2643
+ },
2644
+ "agent_skill_assignments_agent_id_agents_id_fk": {
2645
+ "name": "agent_skill_assignments_agent_id_agents_id_fk",
2646
+ "tableFrom": "agent_skill_assignments",
2647
+ "tableTo": "agents",
2648
+ "columnsFrom": ["agent_id"],
2649
+ "columnsTo": ["id"],
2650
+ "onDelete": "cascade",
2651
+ "onUpdate": "no action"
2652
+ },
2653
+ "agent_skill_assignments_skill_id_agent_skills_id_fk": {
2654
+ "name": "agent_skill_assignments_skill_id_agent_skills_id_fk",
2655
+ "tableFrom": "agent_skill_assignments",
2656
+ "tableTo": "agent_skills",
2657
+ "columnsFrom": ["skill_id"],
2658
+ "columnsTo": ["id"],
2659
+ "onDelete": "cascade",
2660
+ "onUpdate": "no action"
2661
+ }
2662
+ },
2663
+ "compositePrimaryKeys": {},
2664
+ "uniqueConstraints": {},
2665
+ "policies": {},
2666
+ "checkConstraints": {},
2667
+ "isRLSEnabled": false
2668
+ },
2669
+ "public.agent_skills": {
2670
+ "name": "agent_skills",
2671
+ "schema": "",
2672
+ "columns": {
2673
+ "id": {
2674
+ "name": "id",
2675
+ "type": "uuid",
2676
+ "primaryKey": true,
2677
+ "notNull": true,
2678
+ "default": "gen_random_uuid()"
2679
+ },
2680
+ "entity_id": {
2681
+ "name": "entity_id",
2682
+ "type": "uuid",
2683
+ "primaryKey": false,
2684
+ "notNull": false
2685
+ },
2686
+ "name": {
2687
+ "name": "name",
2688
+ "type": "text",
2689
+ "primaryKey": false,
2690
+ "notNull": true
2691
+ },
2692
+ "slug": {
2693
+ "name": "slug",
2694
+ "type": "text",
2695
+ "primaryKey": false,
2696
+ "notNull": true
2697
+ },
2698
+ "content": {
2699
+ "name": "content",
2700
+ "type": "text",
2701
+ "primaryKey": false,
2702
+ "notNull": true
2703
+ },
2704
+ "active": {
2705
+ "name": "active",
2706
+ "type": "boolean",
2707
+ "primaryKey": false,
2708
+ "notNull": false,
2709
+ "default": true
2710
+ },
2711
+ "description": {
2712
+ "name": "description",
2713
+ "type": "text",
2714
+ "primaryKey": false,
2715
+ "notNull": false
2716
+ },
2717
+ "default_content": {
2718
+ "name": "default_content",
2719
+ "type": "text",
2720
+ "primaryKey": false,
2721
+ "notNull": false
2722
+ },
2723
+ "content_overridden": {
2724
+ "name": "content_overridden",
2725
+ "type": "boolean",
2726
+ "primaryKey": false,
2727
+ "notNull": false,
2728
+ "default": false
2729
+ },
2730
+ "required_config": {
2731
+ "name": "required_config",
2732
+ "type": "jsonb",
2733
+ "primaryKey": false,
2734
+ "notNull": false,
2735
+ "default": "'[]'::jsonb"
2736
+ },
2737
+ "operations": {
2738
+ "name": "operations",
2739
+ "type": "jsonb",
2740
+ "primaryKey": false,
2741
+ "notNull": false,
2742
+ "default": "'[]'::jsonb"
2743
+ },
2744
+ "required_builtins": {
2745
+ "name": "required_builtins",
2746
+ "type": "text[]",
2747
+ "primaryKey": false,
2748
+ "notNull": true,
2749
+ "default": "'{}'::text[]"
2750
+ },
2751
+ "created_at": {
2752
+ "name": "created_at",
2753
+ "type": "timestamp with time zone",
2754
+ "primaryKey": false,
2755
+ "notNull": false,
2756
+ "default": "now()"
2757
+ },
2758
+ "updated_at": {
2759
+ "name": "updated_at",
2760
+ "type": "timestamp with time zone",
2761
+ "primaryKey": false,
2762
+ "notNull": false,
2763
+ "default": "now()"
2764
+ }
2765
+ },
2766
+ "indexes": {
2767
+ "idx_agent_skills_entity_id": {
2768
+ "name": "idx_agent_skills_entity_id",
2769
+ "columns": [
2770
+ {
2771
+ "expression": "entity_id",
2772
+ "isExpression": false,
2773
+ "asc": true,
2774
+ "nulls": "last"
2775
+ }
2776
+ ],
2777
+ "isUnique": false,
2778
+ "concurrently": false,
2779
+ "method": "btree",
2780
+ "with": {}
2781
+ },
2782
+ "idx_skills_active": {
2783
+ "name": "idx_skills_active",
2784
+ "columns": [
2785
+ {
2786
+ "expression": "active",
2787
+ "isExpression": false,
2788
+ "asc": true,
2789
+ "nulls": "last"
2790
+ },
2791
+ {
2792
+ "expression": "slug",
2793
+ "isExpression": false,
2794
+ "asc": true,
2795
+ "nulls": "last"
2796
+ }
2797
+ ],
2798
+ "isUnique": false,
2799
+ "concurrently": false,
2800
+ "method": "btree",
2801
+ "with": {}
2802
+ }
2803
+ },
2804
+ "foreignKeys": {
2805
+ "agent_skills_entity_id_entities_id_fk": {
2806
+ "name": "agent_skills_entity_id_entities_id_fk",
2807
+ "tableFrom": "agent_skills",
2808
+ "tableTo": "entities",
2809
+ "columnsFrom": ["entity_id"],
2810
+ "columnsTo": ["id"],
2811
+ "onDelete": "cascade",
2812
+ "onUpdate": "no action"
2813
+ }
2814
+ },
2815
+ "compositePrimaryKeys": {},
2816
+ "uniqueConstraints": {
2817
+ "agent_skills_name_unique": {
2818
+ "name": "agent_skills_name_unique",
2819
+ "nullsNotDistinct": false,
2820
+ "columns": ["name"]
2821
+ },
2822
+ "agent_skills_slug_unique": {
2823
+ "name": "agent_skills_slug_unique",
2824
+ "nullsNotDistinct": false,
2825
+ "columns": ["slug"]
2826
+ }
2827
+ },
2828
+ "policies": {},
2829
+ "checkConstraints": {},
2830
+ "isRLSEnabled": false
2831
+ },
2832
+ "public.skill_connectors": {
2833
+ "name": "skill_connectors",
2834
+ "schema": "",
2835
+ "columns": {
2836
+ "skill_id": {
2837
+ "name": "skill_id",
2838
+ "type": "uuid",
2839
+ "primaryKey": false,
2840
+ "notNull": true
2841
+ },
2842
+ "connector_id": {
2843
+ "name": "connector_id",
2844
+ "type": "uuid",
2845
+ "primaryKey": false,
2846
+ "notNull": true
2847
+ },
2848
+ "entity_id": {
2849
+ "name": "entity_id",
2850
+ "type": "uuid",
2851
+ "primaryKey": false,
2852
+ "notNull": false
2853
+ }
2854
+ },
2855
+ "indexes": {
2856
+ "idx_skill_connectors_entity_id": {
2857
+ "name": "idx_skill_connectors_entity_id",
2858
+ "columns": [
2859
+ {
2860
+ "expression": "entity_id",
2861
+ "isExpression": false,
2862
+ "asc": true,
2863
+ "nulls": "last"
2864
+ }
2865
+ ],
2866
+ "isUnique": false,
2867
+ "concurrently": false,
2868
+ "method": "btree",
2869
+ "with": {}
2870
+ },
2871
+ "idx_skill_connectors_skill_id": {
2872
+ "name": "idx_skill_connectors_skill_id",
2873
+ "columns": [
2874
+ {
2875
+ "expression": "skill_id",
2876
+ "isExpression": false,
2877
+ "asc": true,
2878
+ "nulls": "last"
2879
+ }
2880
+ ],
2881
+ "isUnique": false,
2882
+ "concurrently": false,
2883
+ "method": "btree",
2884
+ "with": {}
2885
+ }
2886
+ },
2887
+ "foreignKeys": {
2888
+ "skill_connectors_skill_id_agent_skills_id_fk": {
2889
+ "name": "skill_connectors_skill_id_agent_skills_id_fk",
2890
+ "tableFrom": "skill_connectors",
2891
+ "tableTo": "agent_skills",
2892
+ "columnsFrom": ["skill_id"],
2893
+ "columnsTo": ["id"],
2894
+ "onDelete": "cascade",
2895
+ "onUpdate": "no action"
2896
+ },
2897
+ "skill_connectors_connector_id_connectors_id_fk": {
2898
+ "name": "skill_connectors_connector_id_connectors_id_fk",
2899
+ "tableFrom": "skill_connectors",
2900
+ "tableTo": "connectors",
2901
+ "columnsFrom": ["connector_id"],
2902
+ "columnsTo": ["id"],
2903
+ "onDelete": "cascade",
2904
+ "onUpdate": "no action"
2905
+ },
2906
+ "skill_connectors_entity_id_entities_id_fk": {
2907
+ "name": "skill_connectors_entity_id_entities_id_fk",
2908
+ "tableFrom": "skill_connectors",
2909
+ "tableTo": "entities",
2910
+ "columnsFrom": ["entity_id"],
2911
+ "columnsTo": ["id"],
2912
+ "onDelete": "cascade",
2913
+ "onUpdate": "no action"
2914
+ }
2915
+ },
2916
+ "compositePrimaryKeys": {},
2917
+ "uniqueConstraints": {},
2918
+ "policies": {},
2919
+ "checkConstraints": {},
2920
+ "isRLSEnabled": false
2921
+ },
2922
+ "public.skill_versions": {
2923
+ "name": "skill_versions",
2924
+ "schema": "",
2925
+ "columns": {
2926
+ "id": {
2927
+ "name": "id",
2928
+ "type": "uuid",
2929
+ "primaryKey": true,
2930
+ "notNull": true,
2931
+ "default": "gen_random_uuid()"
2932
+ },
2933
+ "entity_id": {
2934
+ "name": "entity_id",
2935
+ "type": "uuid",
2936
+ "primaryKey": false,
2937
+ "notNull": false
2938
+ },
2939
+ "skill_id": {
2940
+ "name": "skill_id",
2941
+ "type": "uuid",
2942
+ "primaryKey": false,
2943
+ "notNull": false
2944
+ },
2945
+ "version": {
2946
+ "name": "version",
2947
+ "type": "integer",
2948
+ "primaryKey": false,
2949
+ "notNull": true
2950
+ },
2951
+ "content": {
2952
+ "name": "content",
2953
+ "type": "text",
2954
+ "primaryKey": false,
2955
+ "notNull": true
2956
+ },
2957
+ "name": {
2958
+ "name": "name",
2959
+ "type": "text",
2960
+ "primaryKey": false,
2961
+ "notNull": true
2962
+ },
2963
+ "created_at": {
2964
+ "name": "created_at",
2965
+ "type": "timestamp with time zone",
2966
+ "primaryKey": false,
2967
+ "notNull": false,
2968
+ "default": "now()"
2969
+ }
2970
+ },
2971
+ "indexes": {
2972
+ "idx_skill_versions_entity_id": {
2973
+ "name": "idx_skill_versions_entity_id",
2974
+ "columns": [
2975
+ {
2976
+ "expression": "entity_id",
2977
+ "isExpression": false,
2978
+ "asc": true,
2979
+ "nulls": "last"
2980
+ }
2981
+ ],
2982
+ "isUnique": false,
2983
+ "concurrently": false,
2984
+ "method": "btree",
2985
+ "with": {}
2986
+ },
2987
+ "idx_skill_versions_skill_id": {
2988
+ "name": "idx_skill_versions_skill_id",
2989
+ "columns": [
2990
+ {
2991
+ "expression": "skill_id",
2992
+ "isExpression": false,
2993
+ "asc": true,
2994
+ "nulls": "last"
2995
+ },
2996
+ {
2997
+ "expression": "\"version\" DESC",
2998
+ "asc": true,
2999
+ "isExpression": true,
3000
+ "nulls": "last"
3001
+ }
3002
+ ],
3003
+ "isUnique": false,
3004
+ "concurrently": false,
3005
+ "method": "btree",
3006
+ "with": {}
3007
+ }
3008
+ },
3009
+ "foreignKeys": {
3010
+ "skill_versions_entity_id_entities_id_fk": {
3011
+ "name": "skill_versions_entity_id_entities_id_fk",
3012
+ "tableFrom": "skill_versions",
3013
+ "tableTo": "entities",
3014
+ "columnsFrom": ["entity_id"],
3015
+ "columnsTo": ["id"],
3016
+ "onDelete": "cascade",
3017
+ "onUpdate": "no action"
3018
+ },
3019
+ "skill_versions_skill_id_agent_skills_id_fk": {
3020
+ "name": "skill_versions_skill_id_agent_skills_id_fk",
3021
+ "tableFrom": "skill_versions",
3022
+ "tableTo": "agent_skills",
3023
+ "columnsFrom": ["skill_id"],
3024
+ "columnsTo": ["id"],
3025
+ "onDelete": "cascade",
3026
+ "onUpdate": "no action"
3027
+ }
3028
+ },
3029
+ "compositePrimaryKeys": {},
3030
+ "uniqueConstraints": {},
3031
+ "policies": {},
3032
+ "checkConstraints": {},
3033
+ "isRLSEnabled": false
3034
+ },
3035
+ "public.agent_schedules": {
3036
+ "name": "agent_schedules",
3037
+ "schema": "",
3038
+ "columns": {
3039
+ "id": {
3040
+ "name": "id",
3041
+ "type": "uuid",
3042
+ "primaryKey": true,
3043
+ "notNull": true,
3044
+ "default": "gen_random_uuid()"
3045
+ },
3046
+ "entity_id": {
3047
+ "name": "entity_id",
3048
+ "type": "uuid",
3049
+ "primaryKey": false,
3050
+ "notNull": false
3051
+ },
3052
+ "agent_id": {
3053
+ "name": "agent_id",
3054
+ "type": "uuid",
3055
+ "primaryKey": false,
3056
+ "notNull": true
3057
+ },
3058
+ "type": {
3059
+ "name": "type",
3060
+ "type": "text",
3061
+ "primaryKey": false,
3062
+ "notNull": true,
3063
+ "default": "'cron'"
3064
+ },
3065
+ "name": {
3066
+ "name": "name",
3067
+ "type": "text",
3068
+ "primaryKey": false,
3069
+ "notNull": true
3070
+ },
3071
+ "cron_expr": {
3072
+ "name": "cron_expr",
3073
+ "type": "text",
3074
+ "primaryKey": false,
3075
+ "notNull": true
3076
+ },
3077
+ "task": {
3078
+ "name": "task",
3079
+ "type": "text",
3080
+ "primaryKey": false,
3081
+ "notNull": false
3082
+ },
3083
+ "objectives": {
3084
+ "name": "objectives",
3085
+ "type": "text",
3086
+ "primaryKey": false,
3087
+ "notNull": false
3088
+ },
3089
+ "active": {
3090
+ "name": "active",
3091
+ "type": "boolean",
3092
+ "primaryKey": false,
3093
+ "notNull": false,
3094
+ "default": true
3095
+ },
3096
+ "last_run": {
3097
+ "name": "last_run",
3098
+ "type": "timestamp with time zone",
3099
+ "primaryKey": false,
3100
+ "notNull": false
3101
+ },
3102
+ "next_run": {
3103
+ "name": "next_run",
3104
+ "type": "timestamp with time zone",
3105
+ "primaryKey": false,
3106
+ "notNull": false
3107
+ },
3108
+ "last_status": {
3109
+ "name": "last_status",
3110
+ "type": "text",
3111
+ "primaryKey": false,
3112
+ "notNull": false
3113
+ },
3114
+ "chat_id": {
3115
+ "name": "chat_id",
3116
+ "type": "text",
3117
+ "primaryKey": false,
3118
+ "notNull": false
3119
+ },
3120
+ "created_at": {
3121
+ "name": "created_at",
3122
+ "type": "timestamp with time zone",
3123
+ "primaryKey": false,
3124
+ "notNull": false,
3125
+ "default": "now()"
3126
+ },
3127
+ "updated_at": {
3128
+ "name": "updated_at",
3129
+ "type": "timestamp with time zone",
3130
+ "primaryKey": false,
3131
+ "notNull": false,
3132
+ "default": "now()"
3133
+ }
3134
+ },
3135
+ "indexes": {
3136
+ "idx_agent_schedules_entity_id": {
3137
+ "name": "idx_agent_schedules_entity_id",
3138
+ "columns": [
3139
+ {
3140
+ "expression": "entity_id",
3141
+ "isExpression": false,
3142
+ "asc": true,
3143
+ "nulls": "last"
3144
+ }
3145
+ ],
3146
+ "isUnique": false,
3147
+ "concurrently": false,
3148
+ "method": "btree",
3149
+ "with": {}
3150
+ },
3151
+ "idx_schedules_active": {
3152
+ "name": "idx_schedules_active",
3153
+ "columns": [
3154
+ {
3155
+ "expression": "active",
3156
+ "isExpression": false,
3157
+ "asc": true,
3158
+ "nulls": "last"
3159
+ },
3160
+ {
3161
+ "expression": "next_run",
3162
+ "isExpression": false,
3163
+ "asc": true,
3164
+ "nulls": "last"
3165
+ }
3166
+ ],
3167
+ "isUnique": false,
3168
+ "concurrently": false,
3169
+ "method": "btree",
3170
+ "with": {}
3171
+ }
3172
+ },
3173
+ "foreignKeys": {
3174
+ "agent_schedules_entity_id_entities_id_fk": {
3175
+ "name": "agent_schedules_entity_id_entities_id_fk",
3176
+ "tableFrom": "agent_schedules",
3177
+ "tableTo": "entities",
3178
+ "columnsFrom": ["entity_id"],
3179
+ "columnsTo": ["id"],
3180
+ "onDelete": "cascade",
3181
+ "onUpdate": "no action"
3182
+ },
3183
+ "agent_schedules_agent_id_agents_id_fk": {
3184
+ "name": "agent_schedules_agent_id_agents_id_fk",
3185
+ "tableFrom": "agent_schedules",
3186
+ "tableTo": "agents",
3187
+ "columnsFrom": ["agent_id"],
3188
+ "columnsTo": ["id"],
3189
+ "onDelete": "cascade",
3190
+ "onUpdate": "no action"
3191
+ }
3192
+ },
3193
+ "compositePrimaryKeys": {},
3194
+ "uniqueConstraints": {},
3195
+ "policies": {},
3196
+ "checkConstraints": {
3197
+ "agent_schedules_type_check": {
3198
+ "name": "agent_schedules_type_check",
3199
+ "value": "\"agent_schedules\".\"type\" IN ('cron','heartbeat')"
3200
+ },
3201
+ "agent_schedules_last_status_check": {
3202
+ "name": "agent_schedules_last_status_check",
3203
+ "value": "\"agent_schedules\".\"last_status\" IN ('success','failed','no_action') OR \"agent_schedules\".\"last_status\" IS NULL"
3204
+ }
3205
+ },
3206
+ "isRLSEnabled": false
3207
+ },
3208
+ "public.entity_llm_keys": {
3209
+ "name": "entity_llm_keys",
3210
+ "schema": "",
3211
+ "columns": {
3212
+ "id": {
3213
+ "name": "id",
3214
+ "type": "uuid",
3215
+ "primaryKey": true,
3216
+ "notNull": true,
3217
+ "default": "gen_random_uuid()"
3218
+ },
3219
+ "entity_id": {
3220
+ "name": "entity_id",
3221
+ "type": "uuid",
3222
+ "primaryKey": false,
3223
+ "notNull": true
3224
+ },
3225
+ "provider": {
3226
+ "name": "provider",
3227
+ "type": "text",
3228
+ "primaryKey": false,
3229
+ "notNull": true
3230
+ },
3231
+ "api_key": {
3232
+ "name": "api_key",
3233
+ "type": "text",
3234
+ "primaryKey": false,
3235
+ "notNull": true,
3236
+ "default": "''"
3237
+ },
3238
+ "api_key_last4": {
3239
+ "name": "api_key_last4",
3240
+ "type": "text",
3241
+ "primaryKey": false,
3242
+ "notNull": true,
3243
+ "default": "''"
3244
+ },
3245
+ "base_url": {
3246
+ "name": "base_url",
3247
+ "type": "text",
3248
+ "primaryKey": false,
3249
+ "notNull": false
3250
+ },
3251
+ "nickname": {
3252
+ "name": "nickname",
3253
+ "type": "text",
3254
+ "primaryKey": false,
3255
+ "notNull": false
3256
+ },
3257
+ "default_model": {
3258
+ "name": "default_model",
3259
+ "type": "text",
3260
+ "primaryKey": false,
3261
+ "notNull": false
3262
+ },
3263
+ "is_active": {
3264
+ "name": "is_active",
3265
+ "type": "boolean",
3266
+ "primaryKey": false,
3267
+ "notNull": true,
3268
+ "default": true
3269
+ },
3270
+ "created_at": {
3271
+ "name": "created_at",
3272
+ "type": "timestamp with time zone",
3273
+ "primaryKey": false,
3274
+ "notNull": true,
3275
+ "default": "now()"
3276
+ },
3277
+ "updated_at": {
3278
+ "name": "updated_at",
3279
+ "type": "timestamp with time zone",
3280
+ "primaryKey": false,
3281
+ "notNull": true,
3282
+ "default": "now()"
3283
+ }
3284
+ },
3285
+ "indexes": {
3286
+ "idx_entity_llm_keys_entity_id": {
3287
+ "name": "idx_entity_llm_keys_entity_id",
3288
+ "columns": [
3289
+ {
3290
+ "expression": "entity_id",
3291
+ "isExpression": false,
3292
+ "asc": true,
3293
+ "nulls": "last"
3294
+ }
3295
+ ],
3296
+ "isUnique": false,
3297
+ "concurrently": false,
3298
+ "method": "btree",
3299
+ "with": {}
3300
+ }
3301
+ },
3302
+ "foreignKeys": {
3303
+ "entity_llm_keys_entity_id_entities_id_fk": {
3304
+ "name": "entity_llm_keys_entity_id_entities_id_fk",
3305
+ "tableFrom": "entity_llm_keys",
3306
+ "tableTo": "entities",
3307
+ "columnsFrom": ["entity_id"],
3308
+ "columnsTo": ["id"],
3309
+ "onDelete": "cascade",
3310
+ "onUpdate": "no action"
3311
+ }
3312
+ },
3313
+ "compositePrimaryKeys": {},
3314
+ "uniqueConstraints": {},
3315
+ "policies": {},
3316
+ "checkConstraints": {},
3317
+ "isRLSEnabled": false
3318
+ },
3319
+ "public.agent_runs": {
3320
+ "name": "agent_runs",
3321
+ "schema": "",
3322
+ "columns": {
3323
+ "id": {
3324
+ "name": "id",
3325
+ "type": "uuid",
3326
+ "primaryKey": true,
3327
+ "notNull": true,
3328
+ "default": "gen_random_uuid()"
3329
+ },
3330
+ "entity_id": {
3331
+ "name": "entity_id",
3332
+ "type": "uuid",
3333
+ "primaryKey": false,
3334
+ "notNull": false
3335
+ },
3336
+ "agent_id": {
3337
+ "name": "agent_id",
3338
+ "type": "uuid",
3339
+ "primaryKey": false,
3340
+ "notNull": false
3341
+ },
3342
+ "task": {
3343
+ "name": "task",
3344
+ "type": "text",
3345
+ "primaryKey": false,
3346
+ "notNull": true
3347
+ },
3348
+ "result": {
3349
+ "name": "result",
3350
+ "type": "text",
3351
+ "primaryKey": false,
3352
+ "notNull": false
3353
+ },
3354
+ "success": {
3355
+ "name": "success",
3356
+ "type": "boolean",
3357
+ "primaryKey": false,
3358
+ "notNull": false,
3359
+ "default": true
3360
+ },
3361
+ "tools_used": {
3362
+ "name": "tools_used",
3363
+ "type": "text[]",
3364
+ "primaryKey": false,
3365
+ "notNull": false,
3366
+ "default": "'{}'::text[]"
3367
+ },
3368
+ "tokens_used": {
3369
+ "name": "tokens_used",
3370
+ "type": "integer",
3371
+ "primaryKey": false,
3372
+ "notNull": false
3373
+ },
3374
+ "input_tokens": {
3375
+ "name": "input_tokens",
3376
+ "type": "integer",
3377
+ "primaryKey": false,
3378
+ "notNull": false
3379
+ },
3380
+ "output_tokens": {
3381
+ "name": "output_tokens",
3382
+ "type": "integer",
3383
+ "primaryKey": false,
3384
+ "notNull": false
3385
+ },
3386
+ "duration_ms": {
3387
+ "name": "duration_ms",
3388
+ "type": "integer",
3389
+ "primaryKey": false,
3390
+ "notNull": false
3391
+ },
3392
+ "key_source": {
3393
+ "name": "key_source",
3394
+ "type": "text",
3395
+ "primaryKey": false,
3396
+ "notNull": false
3397
+ },
3398
+ "created_at": {
3399
+ "name": "created_at",
3400
+ "type": "timestamp with time zone",
3401
+ "primaryKey": false,
3402
+ "notNull": false,
3403
+ "default": "now()"
3404
+ }
3405
+ },
3406
+ "indexes": {
3407
+ "idx_agent_runs_entity_id": {
3408
+ "name": "idx_agent_runs_entity_id",
3409
+ "columns": [
3410
+ {
3411
+ "expression": "entity_id",
3412
+ "isExpression": false,
3413
+ "asc": true,
3414
+ "nulls": "last"
3415
+ }
3416
+ ],
3417
+ "isUnique": false,
3418
+ "concurrently": false,
3419
+ "method": "btree",
3420
+ "with": {}
3421
+ },
3422
+ "idx_agent_runs_agent_created": {
3423
+ "name": "idx_agent_runs_agent_created",
3424
+ "columns": [
3425
+ {
3426
+ "expression": "agent_id",
3427
+ "isExpression": false,
3428
+ "asc": true,
3429
+ "nulls": "last"
3430
+ },
3431
+ {
3432
+ "expression": "\"created_at\" DESC",
3433
+ "asc": true,
3434
+ "isExpression": true,
3435
+ "nulls": "last"
3436
+ }
3437
+ ],
3438
+ "isUnique": false,
3439
+ "concurrently": false,
3440
+ "method": "btree",
3441
+ "with": {}
3442
+ },
3443
+ "idx_runs_agent": {
3444
+ "name": "idx_runs_agent",
3445
+ "columns": [
3446
+ {
3447
+ "expression": "agent_id",
3448
+ "isExpression": false,
3449
+ "asc": true,
3450
+ "nulls": "last"
3451
+ },
3452
+ {
3453
+ "expression": "\"created_at\" DESC",
3454
+ "asc": true,
3455
+ "isExpression": true,
3456
+ "nulls": "last"
3457
+ }
3458
+ ],
3459
+ "isUnique": false,
3460
+ "concurrently": false,
3461
+ "method": "btree",
3462
+ "with": {}
3463
+ },
3464
+ "idx_runs_recent": {
3465
+ "name": "idx_runs_recent",
3466
+ "columns": [
3467
+ {
3468
+ "expression": "\"created_at\" DESC",
3469
+ "asc": true,
3470
+ "isExpression": true,
3471
+ "nulls": "last"
3472
+ }
3473
+ ],
3474
+ "isUnique": false,
3475
+ "concurrently": false,
3476
+ "method": "btree",
3477
+ "with": {}
3478
+ }
3479
+ },
3480
+ "foreignKeys": {
3481
+ "agent_runs_entity_id_entities_id_fk": {
3482
+ "name": "agent_runs_entity_id_entities_id_fk",
3483
+ "tableFrom": "agent_runs",
3484
+ "tableTo": "entities",
3485
+ "columnsFrom": ["entity_id"],
3486
+ "columnsTo": ["id"],
3487
+ "onDelete": "cascade",
3488
+ "onUpdate": "no action"
3489
+ },
3490
+ "agent_runs_agent_id_agents_id_fk": {
3491
+ "name": "agent_runs_agent_id_agents_id_fk",
3492
+ "tableFrom": "agent_runs",
3493
+ "tableTo": "agents",
3494
+ "columnsFrom": ["agent_id"],
3495
+ "columnsTo": ["id"],
3496
+ "onDelete": "no action",
3497
+ "onUpdate": "no action"
3498
+ }
3499
+ },
3500
+ "compositePrimaryKeys": {},
3501
+ "uniqueConstraints": {},
3502
+ "policies": {},
3503
+ "checkConstraints": {
3504
+ "agent_runs_key_source_check": {
3505
+ "name": "agent_runs_key_source_check",
3506
+ "value": "\"agent_runs\".\"key_source\" IN ('entity','operator') OR \"agent_runs\".\"key_source\" IS NULL"
3507
+ }
3508
+ },
3509
+ "isRLSEnabled": false
3510
+ },
3511
+ "public.agent_mcp_servers": {
3512
+ "name": "agent_mcp_servers",
3513
+ "schema": "",
3514
+ "columns": {
3515
+ "id": {
3516
+ "name": "id",
3517
+ "type": "uuid",
3518
+ "primaryKey": true,
3519
+ "notNull": true,
3520
+ "default": "gen_random_uuid()"
3521
+ },
3522
+ "entity_id": {
3523
+ "name": "entity_id",
3524
+ "type": "uuid",
3525
+ "primaryKey": false,
3526
+ "notNull": true
3527
+ },
3528
+ "agent_id": {
3529
+ "name": "agent_id",
3530
+ "type": "uuid",
3531
+ "primaryKey": false,
3532
+ "notNull": true
3533
+ },
3534
+ "mcp_server_id": {
3535
+ "name": "mcp_server_id",
3536
+ "type": "uuid",
3537
+ "primaryKey": false,
3538
+ "notNull": true
3539
+ },
3540
+ "enabled_tools": {
3541
+ "name": "enabled_tools",
3542
+ "type": "jsonb",
3543
+ "primaryKey": false,
3544
+ "notNull": false
3545
+ },
3546
+ "created_at": {
3547
+ "name": "created_at",
3548
+ "type": "timestamp with time zone",
3549
+ "primaryKey": false,
3550
+ "notNull": true,
3551
+ "default": "now()"
3552
+ },
3553
+ "updated_at": {
3554
+ "name": "updated_at",
3555
+ "type": "timestamp with time zone",
3556
+ "primaryKey": false,
3557
+ "notNull": true,
3558
+ "default": "now()"
3559
+ }
3560
+ },
3561
+ "indexes": {
3562
+ "idx_agent_mcp_servers_agent": {
3563
+ "name": "idx_agent_mcp_servers_agent",
3564
+ "columns": [
3565
+ {
3566
+ "expression": "agent_id",
3567
+ "isExpression": false,
3568
+ "asc": true,
3569
+ "nulls": "last"
3570
+ }
3571
+ ],
3572
+ "isUnique": false,
3573
+ "concurrently": false,
3574
+ "method": "btree",
3575
+ "with": {}
3576
+ },
3577
+ "idx_agent_mcp_servers_entity": {
3578
+ "name": "idx_agent_mcp_servers_entity",
3579
+ "columns": [
3580
+ {
3581
+ "expression": "entity_id",
3582
+ "isExpression": false,
3583
+ "asc": true,
3584
+ "nulls": "last"
3585
+ }
3586
+ ],
3587
+ "isUnique": false,
3588
+ "concurrently": false,
3589
+ "method": "btree",
3590
+ "with": {}
3591
+ }
3592
+ },
3593
+ "foreignKeys": {
3594
+ "agent_mcp_servers_entity_id_entities_id_fk": {
3595
+ "name": "agent_mcp_servers_entity_id_entities_id_fk",
3596
+ "tableFrom": "agent_mcp_servers",
3597
+ "tableTo": "entities",
3598
+ "columnsFrom": ["entity_id"],
3599
+ "columnsTo": ["id"],
3600
+ "onDelete": "cascade",
3601
+ "onUpdate": "no action"
3602
+ },
3603
+ "agent_mcp_servers_agent_id_agents_id_fk": {
3604
+ "name": "agent_mcp_servers_agent_id_agents_id_fk",
3605
+ "tableFrom": "agent_mcp_servers",
3606
+ "tableTo": "agents",
3607
+ "columnsFrom": ["agent_id"],
3608
+ "columnsTo": ["id"],
3609
+ "onDelete": "cascade",
3610
+ "onUpdate": "no action"
3611
+ },
3612
+ "agent_mcp_servers_mcp_server_id_mcp_servers_id_fk": {
3613
+ "name": "agent_mcp_servers_mcp_server_id_mcp_servers_id_fk",
3614
+ "tableFrom": "agent_mcp_servers",
3615
+ "tableTo": "mcp_servers",
3616
+ "columnsFrom": ["mcp_server_id"],
3617
+ "columnsTo": ["id"],
3618
+ "onDelete": "cascade",
3619
+ "onUpdate": "no action"
3620
+ }
3621
+ },
3622
+ "compositePrimaryKeys": {},
3623
+ "uniqueConstraints": {},
3624
+ "policies": {},
3625
+ "checkConstraints": {},
3626
+ "isRLSEnabled": false
3627
+ },
3628
+ "public.mcp_connections": {
3629
+ "name": "mcp_connections",
3630
+ "schema": "",
3631
+ "columns": {
3632
+ "id": {
3633
+ "name": "id",
3634
+ "type": "uuid",
3635
+ "primaryKey": true,
3636
+ "notNull": true,
3637
+ "default": "gen_random_uuid()"
3638
+ },
3639
+ "entity_id": {
3640
+ "name": "entity_id",
3641
+ "type": "uuid",
3642
+ "primaryKey": false,
3643
+ "notNull": true
3644
+ },
3645
+ "slug": {
3646
+ "name": "slug",
3647
+ "type": "text",
3648
+ "primaryKey": false,
3649
+ "notNull": true
3650
+ },
3651
+ "active": {
3652
+ "name": "active",
3653
+ "type": "boolean",
3654
+ "primaryKey": false,
3655
+ "notNull": true,
3656
+ "default": true
3657
+ },
3658
+ "tool_config": {
3659
+ "name": "tool_config",
3660
+ "type": "jsonb",
3661
+ "primaryKey": false,
3662
+ "notNull": true,
3663
+ "default": "'{}'::jsonb"
3664
+ },
3665
+ "created_at": {
3666
+ "name": "created_at",
3667
+ "type": "timestamp with time zone",
3668
+ "primaryKey": false,
3669
+ "notNull": true,
3670
+ "default": "now()"
3671
+ },
3672
+ "updated_at": {
3673
+ "name": "updated_at",
3674
+ "type": "timestamp with time zone",
3675
+ "primaryKey": false,
3676
+ "notNull": true,
3677
+ "default": "now()"
3678
+ }
3679
+ },
3680
+ "indexes": {
3681
+ "idx_mcp_connections_entity": {
3682
+ "name": "idx_mcp_connections_entity",
3683
+ "columns": [
3684
+ {
3685
+ "expression": "entity_id",
3686
+ "isExpression": false,
3687
+ "asc": true,
3688
+ "nulls": "last"
3689
+ }
3690
+ ],
3691
+ "isUnique": false,
3692
+ "concurrently": false,
3693
+ "method": "btree",
3694
+ "with": {}
3695
+ }
3696
+ },
3697
+ "foreignKeys": {
3698
+ "mcp_connections_entity_id_entities_id_fk": {
3699
+ "name": "mcp_connections_entity_id_entities_id_fk",
3700
+ "tableFrom": "mcp_connections",
3701
+ "tableTo": "entities",
3702
+ "columnsFrom": ["entity_id"],
3703
+ "columnsTo": ["id"],
3704
+ "onDelete": "cascade",
3705
+ "onUpdate": "no action"
3706
+ }
3707
+ },
3708
+ "compositePrimaryKeys": {},
3709
+ "uniqueConstraints": {},
3710
+ "policies": {},
3711
+ "checkConstraints": {},
3712
+ "isRLSEnabled": false
3713
+ },
3714
+ "public.mcp_servers": {
3715
+ "name": "mcp_servers",
3716
+ "schema": "",
3717
+ "columns": {
3718
+ "id": {
3719
+ "name": "id",
3720
+ "type": "uuid",
3721
+ "primaryKey": true,
3722
+ "notNull": true,
3723
+ "default": "gen_random_uuid()"
3724
+ },
3725
+ "entity_id": {
3726
+ "name": "entity_id",
3727
+ "type": "uuid",
3728
+ "primaryKey": false,
3729
+ "notNull": false
3730
+ },
3731
+ "name": {
3732
+ "name": "name",
3733
+ "type": "text",
3734
+ "primaryKey": false,
3735
+ "notNull": true
3736
+ },
3737
+ "slug": {
3738
+ "name": "slug",
3739
+ "type": "text",
3740
+ "primaryKey": false,
3741
+ "notNull": true
3742
+ },
3743
+ "transport": {
3744
+ "name": "transport",
3745
+ "type": "text",
3746
+ "primaryKey": false,
3747
+ "notNull": true
3748
+ },
3749
+ "url": {
3750
+ "name": "url",
3751
+ "type": "text",
3752
+ "primaryKey": false,
3753
+ "notNull": false
3754
+ },
3755
+ "command": {
3756
+ "name": "command",
3757
+ "type": "text",
3758
+ "primaryKey": false,
3759
+ "notNull": false
3760
+ },
3761
+ "args": {
3762
+ "name": "args",
3763
+ "type": "text[]",
3764
+ "primaryKey": false,
3765
+ "notNull": false,
3766
+ "default": "'{}'::text[]"
3767
+ },
3768
+ "env_vars": {
3769
+ "name": "env_vars",
3770
+ "type": "jsonb",
3771
+ "primaryKey": false,
3772
+ "notNull": false,
3773
+ "default": "'{}'::jsonb"
3774
+ },
3775
+ "active": {
3776
+ "name": "active",
3777
+ "type": "boolean",
3778
+ "primaryKey": false,
3779
+ "notNull": false,
3780
+ "default": true
3781
+ },
3782
+ "available_tools": {
3783
+ "name": "available_tools",
3784
+ "type": "jsonb",
3785
+ "primaryKey": false,
3786
+ "notNull": false
3787
+ },
3788
+ "created_at": {
3789
+ "name": "created_at",
3790
+ "type": "timestamp with time zone",
3791
+ "primaryKey": false,
3792
+ "notNull": false,
3793
+ "default": "now()"
3794
+ },
3795
+ "updated_at": {
3796
+ "name": "updated_at",
3797
+ "type": "timestamp with time zone",
3798
+ "primaryKey": false,
3799
+ "notNull": false,
3800
+ "default": "now()"
3801
+ }
3802
+ },
3803
+ "indexes": {},
3804
+ "foreignKeys": {
3805
+ "mcp_servers_entity_id_entities_id_fk": {
3806
+ "name": "mcp_servers_entity_id_entities_id_fk",
3807
+ "tableFrom": "mcp_servers",
3808
+ "tableTo": "entities",
3809
+ "columnsFrom": ["entity_id"],
3810
+ "columnsTo": ["id"],
3811
+ "onDelete": "cascade",
3812
+ "onUpdate": "no action"
3813
+ }
3814
+ },
3815
+ "compositePrimaryKeys": {},
3816
+ "uniqueConstraints": {},
3817
+ "policies": {},
3818
+ "checkConstraints": {
3819
+ "mcp_servers_transport_check": {
3820
+ "name": "mcp_servers_transport_check",
3821
+ "value": "\"mcp_servers\".\"transport\" IN ('http','stdio')"
3822
+ }
3823
+ },
3824
+ "isRLSEnabled": false
3825
+ },
3826
+ "public.agent_plugins": {
3827
+ "name": "agent_plugins",
3828
+ "schema": "",
3829
+ "columns": {
3830
+ "id": {
3831
+ "name": "id",
3832
+ "type": "uuid",
3833
+ "primaryKey": true,
3834
+ "notNull": true,
3835
+ "default": "gen_random_uuid()"
3836
+ },
3837
+ "entity_id": {
3838
+ "name": "entity_id",
3839
+ "type": "uuid",
3840
+ "primaryKey": false,
3841
+ "notNull": false
3842
+ },
3843
+ "name": {
3844
+ "name": "name",
3845
+ "type": "text",
3846
+ "primaryKey": false,
3847
+ "notNull": true
3848
+ },
3849
+ "slug": {
3850
+ "name": "slug",
3851
+ "type": "text",
3852
+ "primaryKey": false,
3853
+ "notNull": true
3854
+ },
3855
+ "description": {
3856
+ "name": "description",
3857
+ "type": "text",
3858
+ "primaryKey": false,
3859
+ "notNull": false
3860
+ },
3861
+ "plugin_type": {
3862
+ "name": "plugin_type",
3863
+ "type": "text",
3864
+ "primaryKey": false,
3865
+ "notNull": true
3866
+ },
3867
+ "config": {
3868
+ "name": "config",
3869
+ "type": "jsonb",
3870
+ "primaryKey": false,
3871
+ "notNull": false,
3872
+ "default": "'{}'::jsonb"
3873
+ },
3874
+ "active": {
3875
+ "name": "active",
3876
+ "type": "boolean",
3877
+ "primaryKey": false,
3878
+ "notNull": false,
3879
+ "default": true
3880
+ },
3881
+ "hook": {
3882
+ "name": "hook",
3883
+ "type": "text",
3884
+ "primaryKey": false,
3885
+ "notNull": true
3886
+ },
3887
+ "webhook_url": {
3888
+ "name": "webhook_url",
3889
+ "type": "text",
3890
+ "primaryKey": false,
3891
+ "notNull": false
3892
+ },
3893
+ "created_at": {
3894
+ "name": "created_at",
3895
+ "type": "timestamp with time zone",
3896
+ "primaryKey": false,
3897
+ "notNull": false,
3898
+ "default": "now()"
3899
+ },
3900
+ "updated_at": {
3901
+ "name": "updated_at",
3902
+ "type": "timestamp with time zone",
3903
+ "primaryKey": false,
3904
+ "notNull": false,
3905
+ "default": "now()"
3906
+ }
3907
+ },
3908
+ "indexes": {},
3909
+ "foreignKeys": {
3910
+ "agent_plugins_entity_id_entities_id_fk": {
3911
+ "name": "agent_plugins_entity_id_entities_id_fk",
3912
+ "tableFrom": "agent_plugins",
3913
+ "tableTo": "entities",
3914
+ "columnsFrom": ["entity_id"],
3915
+ "columnsTo": ["id"],
3916
+ "onDelete": "cascade",
3917
+ "onUpdate": "no action"
3918
+ }
3919
+ },
3920
+ "compositePrimaryKeys": {},
3921
+ "uniqueConstraints": {},
3922
+ "policies": {},
3923
+ "checkConstraints": {
3924
+ "agent_plugins_plugin_type_check": {
3925
+ "name": "agent_plugins_plugin_type_check",
3926
+ "value": "\"agent_plugins\".\"plugin_type\" IN ('webhook','transform','schedule')"
3927
+ },
3928
+ "agent_plugins_hook_check": {
3929
+ "name": "agent_plugins_hook_check",
3930
+ "value": "\"agent_plugins\".\"hook\" IN ('pre_task','post_task','pre_tool','post_tool','on_memory_save')"
3931
+ }
3932
+ },
3933
+ "isRLSEnabled": false
3934
+ },
3935
+ "public.configurator_sessions": {
3936
+ "name": "configurator_sessions",
3937
+ "schema": "",
3938
+ "columns": {
3939
+ "id": {
3940
+ "name": "id",
3941
+ "type": "uuid",
3942
+ "primaryKey": true,
3943
+ "notNull": true,
3944
+ "default": "gen_random_uuid()"
3945
+ },
3946
+ "entity_id": {
3947
+ "name": "entity_id",
3948
+ "type": "uuid",
3949
+ "primaryKey": false,
3950
+ "notNull": true
3951
+ },
3952
+ "agent_id": {
3953
+ "name": "agent_id",
3954
+ "type": "uuid",
3955
+ "primaryKey": false,
3956
+ "notNull": false
3957
+ },
3958
+ "messages": {
3959
+ "name": "messages",
3960
+ "type": "jsonb",
3961
+ "primaryKey": false,
3962
+ "notNull": true,
3963
+ "default": "'[]'::jsonb"
3964
+ },
3965
+ "status": {
3966
+ "name": "status",
3967
+ "type": "text",
3968
+ "primaryKey": false,
3969
+ "notNull": true,
3970
+ "default": "'active'"
3971
+ },
3972
+ "turn_count": {
3973
+ "name": "turn_count",
3974
+ "type": "integer",
3975
+ "primaryKey": false,
3976
+ "notNull": true,
3977
+ "default": 0
3978
+ },
3979
+ "created_at": {
3980
+ "name": "created_at",
3981
+ "type": "timestamp with time zone",
3982
+ "primaryKey": false,
3983
+ "notNull": true,
3984
+ "default": "now()"
3985
+ },
3986
+ "updated_at": {
3987
+ "name": "updated_at",
3988
+ "type": "timestamp with time zone",
3989
+ "primaryKey": false,
3990
+ "notNull": true,
3991
+ "default": "now()"
3992
+ }
3993
+ },
3994
+ "indexes": {
3995
+ "idx_configurator_sessions_entity": {
3996
+ "name": "idx_configurator_sessions_entity",
3997
+ "columns": [
3998
+ {
3999
+ "expression": "entity_id",
4000
+ "isExpression": false,
4001
+ "asc": true,
4002
+ "nulls": "last"
4003
+ }
4004
+ ],
4005
+ "isUnique": false,
4006
+ "concurrently": false,
4007
+ "method": "btree",
4008
+ "with": {}
4009
+ },
4010
+ "idx_configurator_sessions_agent": {
4011
+ "name": "idx_configurator_sessions_agent",
4012
+ "columns": [
4013
+ {
4014
+ "expression": "agent_id",
4015
+ "isExpression": false,
4016
+ "asc": true,
4017
+ "nulls": "last"
4018
+ }
4019
+ ],
4020
+ "isUnique": false,
4021
+ "concurrently": false,
4022
+ "method": "btree",
4023
+ "with": {}
4024
+ }
4025
+ },
4026
+ "foreignKeys": {
4027
+ "configurator_sessions_entity_id_entities_id_fk": {
4028
+ "name": "configurator_sessions_entity_id_entities_id_fk",
4029
+ "tableFrom": "configurator_sessions",
4030
+ "tableTo": "entities",
4031
+ "columnsFrom": ["entity_id"],
4032
+ "columnsTo": ["id"],
4033
+ "onDelete": "cascade",
4034
+ "onUpdate": "no action"
4035
+ },
4036
+ "configurator_sessions_agent_id_agents_id_fk": {
4037
+ "name": "configurator_sessions_agent_id_agents_id_fk",
4038
+ "tableFrom": "configurator_sessions",
4039
+ "tableTo": "agents",
4040
+ "columnsFrom": ["agent_id"],
4041
+ "columnsTo": ["id"],
4042
+ "onDelete": "cascade",
4043
+ "onUpdate": "no action"
4044
+ }
4045
+ },
4046
+ "compositePrimaryKeys": {},
4047
+ "uniqueConstraints": {},
4048
+ "policies": {},
4049
+ "checkConstraints": {},
4050
+ "isRLSEnabled": false
4051
+ },
4052
+ "public.rate_limits": {
4053
+ "name": "rate_limits",
4054
+ "schema": "",
4055
+ "columns": {
4056
+ "key": {
4057
+ "name": "key",
4058
+ "type": "text",
4059
+ "primaryKey": true,
4060
+ "notNull": true
4061
+ },
4062
+ "count": {
4063
+ "name": "count",
4064
+ "type": "integer",
4065
+ "primaryKey": false,
4066
+ "notNull": false,
4067
+ "default": 1
4068
+ },
4069
+ "window_start": {
4070
+ "name": "window_start",
4071
+ "type": "timestamp with time zone",
4072
+ "primaryKey": false,
4073
+ "notNull": false,
4074
+ "default": "now()"
4075
+ }
4076
+ },
4077
+ "indexes": {},
4078
+ "foreignKeys": {},
4079
+ "compositePrimaryKeys": {},
4080
+ "uniqueConstraints": {},
4081
+ "policies": {},
4082
+ "checkConstraints": {},
4083
+ "isRLSEnabled": false
4084
+ },
4085
+ "public.accounts": {
4086
+ "name": "accounts",
4087
+ "schema": "",
4088
+ "columns": {
4089
+ "id": {
4090
+ "name": "id",
4091
+ "type": "text",
4092
+ "primaryKey": true,
4093
+ "notNull": true
4094
+ },
4095
+ "user_id": {
4096
+ "name": "user_id",
4097
+ "type": "uuid",
4098
+ "primaryKey": false,
4099
+ "notNull": true
4100
+ },
4101
+ "provider_id": {
4102
+ "name": "provider_id",
4103
+ "type": "text",
4104
+ "primaryKey": false,
4105
+ "notNull": true
4106
+ },
4107
+ "account_id": {
4108
+ "name": "account_id",
4109
+ "type": "text",
4110
+ "primaryKey": false,
4111
+ "notNull": true
4112
+ },
4113
+ "access_token": {
4114
+ "name": "access_token",
4115
+ "type": "text",
4116
+ "primaryKey": false,
4117
+ "notNull": false
4118
+ },
4119
+ "refresh_token": {
4120
+ "name": "refresh_token",
4121
+ "type": "text",
4122
+ "primaryKey": false,
4123
+ "notNull": false
4124
+ },
4125
+ "id_token": {
4126
+ "name": "id_token",
4127
+ "type": "text",
4128
+ "primaryKey": false,
4129
+ "notNull": false
4130
+ },
4131
+ "access_token_expires_at": {
4132
+ "name": "access_token_expires_at",
4133
+ "type": "timestamp with time zone",
4134
+ "primaryKey": false,
4135
+ "notNull": false
4136
+ },
4137
+ "refresh_token_expires_at": {
4138
+ "name": "refresh_token_expires_at",
4139
+ "type": "timestamp with time zone",
4140
+ "primaryKey": false,
4141
+ "notNull": false
4142
+ },
4143
+ "scope": {
4144
+ "name": "scope",
4145
+ "type": "text",
4146
+ "primaryKey": false,
4147
+ "notNull": false
4148
+ },
4149
+ "password": {
4150
+ "name": "password",
4151
+ "type": "text",
4152
+ "primaryKey": false,
4153
+ "notNull": false
4154
+ },
4155
+ "created_at": {
4156
+ "name": "created_at",
4157
+ "type": "timestamp with time zone",
4158
+ "primaryKey": false,
4159
+ "notNull": true,
4160
+ "default": "now()"
4161
+ },
4162
+ "updated_at": {
4163
+ "name": "updated_at",
4164
+ "type": "timestamp with time zone",
4165
+ "primaryKey": false,
4166
+ "notNull": true,
4167
+ "default": "now()"
4168
+ }
4169
+ },
4170
+ "indexes": {},
4171
+ "foreignKeys": {
4172
+ "accounts_user_id_users_id_fk": {
4173
+ "name": "accounts_user_id_users_id_fk",
4174
+ "tableFrom": "accounts",
4175
+ "tableTo": "users",
4176
+ "columnsFrom": ["user_id"],
4177
+ "columnsTo": ["id"],
4178
+ "onDelete": "cascade",
4179
+ "onUpdate": "no action"
4180
+ }
4181
+ },
4182
+ "compositePrimaryKeys": {},
4183
+ "uniqueConstraints": {},
4184
+ "policies": {},
4185
+ "checkConstraints": {},
4186
+ "isRLSEnabled": false
4187
+ },
4188
+ "public.sessions": {
4189
+ "name": "sessions",
4190
+ "schema": "",
4191
+ "columns": {
4192
+ "id": {
4193
+ "name": "id",
4194
+ "type": "text",
4195
+ "primaryKey": true,
4196
+ "notNull": true
4197
+ },
4198
+ "user_id": {
4199
+ "name": "user_id",
4200
+ "type": "uuid",
4201
+ "primaryKey": false,
4202
+ "notNull": true
4203
+ },
4204
+ "expires_at": {
4205
+ "name": "expires_at",
4206
+ "type": "timestamp with time zone",
4207
+ "primaryKey": false,
4208
+ "notNull": true
4209
+ },
4210
+ "token": {
4211
+ "name": "token",
4212
+ "type": "text",
4213
+ "primaryKey": false,
4214
+ "notNull": true
4215
+ },
4216
+ "ip_address": {
4217
+ "name": "ip_address",
4218
+ "type": "text",
4219
+ "primaryKey": false,
4220
+ "notNull": false
4221
+ },
4222
+ "user_agent": {
4223
+ "name": "user_agent",
4224
+ "type": "text",
4225
+ "primaryKey": false,
4226
+ "notNull": false
4227
+ },
4228
+ "created_at": {
4229
+ "name": "created_at",
4230
+ "type": "timestamp with time zone",
4231
+ "primaryKey": false,
4232
+ "notNull": true,
4233
+ "default": "now()"
4234
+ },
4235
+ "updated_at": {
4236
+ "name": "updated_at",
4237
+ "type": "timestamp with time zone",
4238
+ "primaryKey": false,
4239
+ "notNull": true,
4240
+ "default": "now()"
4241
+ }
4242
+ },
4243
+ "indexes": {},
4244
+ "foreignKeys": {
4245
+ "sessions_user_id_users_id_fk": {
4246
+ "name": "sessions_user_id_users_id_fk",
4247
+ "tableFrom": "sessions",
4248
+ "tableTo": "users",
4249
+ "columnsFrom": ["user_id"],
4250
+ "columnsTo": ["id"],
4251
+ "onDelete": "cascade",
4252
+ "onUpdate": "no action"
4253
+ }
4254
+ },
4255
+ "compositePrimaryKeys": {},
4256
+ "uniqueConstraints": {
4257
+ "sessions_token_unique": {
4258
+ "name": "sessions_token_unique",
4259
+ "nullsNotDistinct": false,
4260
+ "columns": ["token"]
4261
+ }
4262
+ },
4263
+ "policies": {},
4264
+ "checkConstraints": {},
4265
+ "isRLSEnabled": false
4266
+ },
4267
+ "public.verifications": {
4268
+ "name": "verifications",
4269
+ "schema": "",
4270
+ "columns": {
4271
+ "id": {
4272
+ "name": "id",
4273
+ "type": "text",
4274
+ "primaryKey": true,
4275
+ "notNull": true
4276
+ },
4277
+ "identifier": {
4278
+ "name": "identifier",
4279
+ "type": "text",
4280
+ "primaryKey": false,
4281
+ "notNull": true
4282
+ },
4283
+ "value": {
4284
+ "name": "value",
4285
+ "type": "text",
4286
+ "primaryKey": false,
4287
+ "notNull": true
4288
+ },
4289
+ "expires_at": {
4290
+ "name": "expires_at",
4291
+ "type": "timestamp with time zone",
4292
+ "primaryKey": false,
4293
+ "notNull": true
4294
+ },
4295
+ "created_at": {
4296
+ "name": "created_at",
4297
+ "type": "timestamp with time zone",
4298
+ "primaryKey": false,
4299
+ "notNull": true,
4300
+ "default": "now()"
4301
+ },
4302
+ "updated_at": {
4303
+ "name": "updated_at",
4304
+ "type": "timestamp with time zone",
4305
+ "primaryKey": false,
4306
+ "notNull": true,
4307
+ "default": "now()"
4308
+ }
4309
+ },
4310
+ "indexes": {},
4311
+ "foreignKeys": {},
4312
+ "compositePrimaryKeys": {},
4313
+ "uniqueConstraints": {},
4314
+ "policies": {},
4315
+ "checkConstraints": {},
4316
+ "isRLSEnabled": false
4317
+ }
4318
+ },
4319
+ "enums": {},
4320
+ "schemas": {},
4321
+ "sequences": {},
4322
+ "roles": {},
4323
+ "policies": {},
4324
+ "views": {},
4325
+ "_meta": {
4326
+ "columns": {},
4327
+ "schemas": {},
4328
+ "tables": {}
4329
+ }
4330
+ }