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,4447 @@
1
+ {
2
+ "id": "32edb79e-04c0-4278-abe6-3c3c476a2db4",
3
+ "prevId": "b400065d-8c11-4cf1-ba7c-f0d26a999e74",
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
+ "created_at": {
747
+ "name": "created_at",
748
+ "type": "timestamp with time zone",
749
+ "primaryKey": false,
750
+ "notNull": false,
751
+ "default": "now()"
752
+ },
753
+ "updated_at": {
754
+ "name": "updated_at",
755
+ "type": "timestamp with time zone",
756
+ "primaryKey": false,
757
+ "notNull": false,
758
+ "default": "now()"
759
+ }
760
+ },
761
+ "indexes": {
762
+ "idx_agents_entity_id": {
763
+ "name": "idx_agents_entity_id",
764
+ "columns": [
765
+ {
766
+ "expression": "entity_id",
767
+ "isExpression": false,
768
+ "asc": true,
769
+ "nulls": "last"
770
+ }
771
+ ],
772
+ "isUnique": false,
773
+ "concurrently": false,
774
+ "method": "btree",
775
+ "with": {}
776
+ }
777
+ },
778
+ "foreignKeys": {
779
+ "agents_entity_id_entities_id_fk": {
780
+ "name": "agents_entity_id_entities_id_fk",
781
+ "tableFrom": "agents",
782
+ "tableTo": "entities",
783
+ "columnsFrom": ["entity_id"],
784
+ "columnsTo": ["id"],
785
+ "onDelete": "cascade",
786
+ "onUpdate": "no action"
787
+ },
788
+ "agents_llm_key_id_entity_llm_keys_id_fk": {
789
+ "name": "agents_llm_key_id_entity_llm_keys_id_fk",
790
+ "tableFrom": "agents",
791
+ "tableTo": "entity_llm_keys",
792
+ "columnsFrom": ["llm_key_id"],
793
+ "columnsTo": ["id"],
794
+ "onDelete": "set null",
795
+ "onUpdate": "no action"
796
+ }
797
+ },
798
+ "compositePrimaryKeys": {},
799
+ "uniqueConstraints": {
800
+ "agents_slug_unique": {
801
+ "name": "agents_slug_unique",
802
+ "nullsNotDistinct": false,
803
+ "columns": ["slug"]
804
+ }
805
+ },
806
+ "policies": {},
807
+ "checkConstraints": {
808
+ "agents_role_check": {
809
+ "name": "agents_role_check",
810
+ "value": "\"agents\".\"role\" IN ('agent', 'orchestrator', 'system')"
811
+ },
812
+ "agents_orchestrator_mode_check": {
813
+ "name": "agents_orchestrator_mode_check",
814
+ "value": "\"agents\".\"orchestrator_mode\" IN ('router', 'planner') OR \"agents\".\"orchestrator_mode\" IS NULL"
815
+ },
816
+ "agents_max_tokens_per_job_check": {
817
+ "name": "agents_max_tokens_per_job_check",
818
+ "value": "\"agents\".\"max_tokens_per_job\" >= 0"
819
+ }
820
+ },
821
+ "isRLSEnabled": false
822
+ },
823
+ "public.agent_jobs": {
824
+ "name": "agent_jobs",
825
+ "schema": "",
826
+ "columns": {
827
+ "id": {
828
+ "name": "id",
829
+ "type": "uuid",
830
+ "primaryKey": true,
831
+ "notNull": true,
832
+ "default": "gen_random_uuid()"
833
+ },
834
+ "entity_id": {
835
+ "name": "entity_id",
836
+ "type": "uuid",
837
+ "primaryKey": false,
838
+ "notNull": false
839
+ },
840
+ "agent_id": {
841
+ "name": "agent_id",
842
+ "type": "uuid",
843
+ "primaryKey": false,
844
+ "notNull": false
845
+ },
846
+ "status": {
847
+ "name": "status",
848
+ "type": "text",
849
+ "primaryKey": false,
850
+ "notNull": false,
851
+ "default": "'pending'"
852
+ },
853
+ "channel": {
854
+ "name": "channel",
855
+ "type": "text",
856
+ "primaryKey": false,
857
+ "notNull": true
858
+ },
859
+ "task": {
860
+ "name": "task",
861
+ "type": "text",
862
+ "primaryKey": false,
863
+ "notNull": true
864
+ },
865
+ "original_task": {
866
+ "name": "original_task",
867
+ "type": "text",
868
+ "primaryKey": false,
869
+ "notNull": false
870
+ },
871
+ "chat_id": {
872
+ "name": "chat_id",
873
+ "type": "text",
874
+ "primaryKey": false,
875
+ "notNull": false
876
+ },
877
+ "system_prompt": {
878
+ "name": "system_prompt",
879
+ "type": "text",
880
+ "primaryKey": false,
881
+ "notNull": false
882
+ },
883
+ "messages": {
884
+ "name": "messages",
885
+ "type": "jsonb",
886
+ "primaryKey": false,
887
+ "notNull": false,
888
+ "default": "'[]'::jsonb"
889
+ },
890
+ "tools_used": {
891
+ "name": "tools_used",
892
+ "type": "text[]",
893
+ "primaryKey": false,
894
+ "notNull": false,
895
+ "default": "'{}'::text[]"
896
+ },
897
+ "turn": {
898
+ "name": "turn",
899
+ "type": "integer",
900
+ "primaryKey": false,
901
+ "notNull": false,
902
+ "default": 0
903
+ },
904
+ "result": {
905
+ "name": "result",
906
+ "type": "text",
907
+ "primaryKey": false,
908
+ "notNull": false
909
+ },
910
+ "error": {
911
+ "name": "error",
912
+ "type": "text",
913
+ "primaryKey": false,
914
+ "notNull": false
915
+ },
916
+ "chain_count": {
917
+ "name": "chain_count",
918
+ "type": "integer",
919
+ "primaryKey": false,
920
+ "notNull": false,
921
+ "default": 0
922
+ },
923
+ "request_id": {
924
+ "name": "request_id",
925
+ "type": "text",
926
+ "primaryKey": false,
927
+ "notNull": false
928
+ },
929
+ "parent_job_id": {
930
+ "name": "parent_job_id",
931
+ "type": "uuid",
932
+ "primaryKey": false,
933
+ "notNull": false
934
+ },
935
+ "parent_request_id": {
936
+ "name": "parent_request_id",
937
+ "type": "text",
938
+ "primaryKey": false,
939
+ "notNull": false
940
+ },
941
+ "total_duration_ms": {
942
+ "name": "total_duration_ms",
943
+ "type": "integer",
944
+ "primaryKey": false,
945
+ "notNull": false,
946
+ "default": 0
947
+ },
948
+ "input_tokens": {
949
+ "name": "input_tokens",
950
+ "type": "integer",
951
+ "primaryKey": false,
952
+ "notNull": false,
953
+ "default": 0
954
+ },
955
+ "output_tokens": {
956
+ "name": "output_tokens",
957
+ "type": "integer",
958
+ "primaryKey": false,
959
+ "notNull": false,
960
+ "default": 0
961
+ },
962
+ "delegation_depth": {
963
+ "name": "delegation_depth",
964
+ "type": "integer",
965
+ "primaryKey": false,
966
+ "notNull": false,
967
+ "default": 0
968
+ },
969
+ "pending_delegation": {
970
+ "name": "pending_delegation",
971
+ "type": "jsonb",
972
+ "primaryKey": false,
973
+ "notNull": false
974
+ },
975
+ "completed_at": {
976
+ "name": "completed_at",
977
+ "type": "timestamp with time zone",
978
+ "primaryKey": false,
979
+ "notNull": false
980
+ },
981
+ "created_at": {
982
+ "name": "created_at",
983
+ "type": "timestamp with time zone",
984
+ "primaryKey": false,
985
+ "notNull": false,
986
+ "default": "now()"
987
+ },
988
+ "updated_at": {
989
+ "name": "updated_at",
990
+ "type": "timestamp with time zone",
991
+ "primaryKey": false,
992
+ "notNull": false,
993
+ "default": "now()"
994
+ }
995
+ },
996
+ "indexes": {
997
+ "idx_agent_jobs_entity_id": {
998
+ "name": "idx_agent_jobs_entity_id",
999
+ "columns": [
1000
+ {
1001
+ "expression": "entity_id",
1002
+ "isExpression": false,
1003
+ "asc": true,
1004
+ "nulls": "last"
1005
+ }
1006
+ ],
1007
+ "isUnique": false,
1008
+ "concurrently": false,
1009
+ "method": "btree",
1010
+ "with": {}
1011
+ },
1012
+ "idx_agent_jobs_entity_created": {
1013
+ "name": "idx_agent_jobs_entity_created",
1014
+ "columns": [
1015
+ {
1016
+ "expression": "entity_id",
1017
+ "isExpression": false,
1018
+ "asc": true,
1019
+ "nulls": "last"
1020
+ },
1021
+ {
1022
+ "expression": "\"created_at\" DESC",
1023
+ "asc": true,
1024
+ "isExpression": true,
1025
+ "nulls": "last"
1026
+ }
1027
+ ],
1028
+ "isUnique": false,
1029
+ "concurrently": false,
1030
+ "method": "btree",
1031
+ "with": {}
1032
+ },
1033
+ "idx_agent_jobs_entity_status_created": {
1034
+ "name": "idx_agent_jobs_entity_status_created",
1035
+ "columns": [
1036
+ {
1037
+ "expression": "entity_id",
1038
+ "isExpression": false,
1039
+ "asc": true,
1040
+ "nulls": "last"
1041
+ },
1042
+ {
1043
+ "expression": "status",
1044
+ "isExpression": false,
1045
+ "asc": true,
1046
+ "nulls": "last"
1047
+ },
1048
+ {
1049
+ "expression": "\"created_at\" DESC",
1050
+ "asc": true,
1051
+ "isExpression": true,
1052
+ "nulls": "last"
1053
+ }
1054
+ ],
1055
+ "isUnique": false,
1056
+ "concurrently": false,
1057
+ "method": "btree",
1058
+ "with": {}
1059
+ },
1060
+ "idx_agent_jobs_parent_job_id": {
1061
+ "name": "idx_agent_jobs_parent_job_id",
1062
+ "columns": [
1063
+ {
1064
+ "expression": "parent_job_id",
1065
+ "isExpression": false,
1066
+ "asc": true,
1067
+ "nulls": "last"
1068
+ }
1069
+ ],
1070
+ "isUnique": false,
1071
+ "concurrently": false,
1072
+ "method": "btree",
1073
+ "with": {}
1074
+ },
1075
+ "idx_jobs_parent": {
1076
+ "name": "idx_jobs_parent",
1077
+ "columns": [
1078
+ {
1079
+ "expression": "parent_job_id",
1080
+ "isExpression": false,
1081
+ "asc": true,
1082
+ "nulls": "last"
1083
+ }
1084
+ ],
1085
+ "isUnique": false,
1086
+ "concurrently": false,
1087
+ "method": "btree",
1088
+ "with": {}
1089
+ },
1090
+ "idx_jobs_status": {
1091
+ "name": "idx_jobs_status",
1092
+ "columns": [
1093
+ {
1094
+ "expression": "status",
1095
+ "isExpression": false,
1096
+ "asc": true,
1097
+ "nulls": "last"
1098
+ },
1099
+ {
1100
+ "expression": "created_at",
1101
+ "isExpression": false,
1102
+ "asc": true,
1103
+ "nulls": "last"
1104
+ }
1105
+ ],
1106
+ "isUnique": false,
1107
+ "concurrently": false,
1108
+ "method": "btree",
1109
+ "with": {}
1110
+ }
1111
+ },
1112
+ "foreignKeys": {
1113
+ "agent_jobs_entity_id_entities_id_fk": {
1114
+ "name": "agent_jobs_entity_id_entities_id_fk",
1115
+ "tableFrom": "agent_jobs",
1116
+ "tableTo": "entities",
1117
+ "columnsFrom": ["entity_id"],
1118
+ "columnsTo": ["id"],
1119
+ "onDelete": "cascade",
1120
+ "onUpdate": "no action"
1121
+ },
1122
+ "agent_jobs_agent_id_agents_id_fk": {
1123
+ "name": "agent_jobs_agent_id_agents_id_fk",
1124
+ "tableFrom": "agent_jobs",
1125
+ "tableTo": "agents",
1126
+ "columnsFrom": ["agent_id"],
1127
+ "columnsTo": ["id"],
1128
+ "onDelete": "no action",
1129
+ "onUpdate": "no action"
1130
+ }
1131
+ },
1132
+ "compositePrimaryKeys": {},
1133
+ "uniqueConstraints": {},
1134
+ "policies": {},
1135
+ "checkConstraints": {
1136
+ "agent_jobs_status_check": {
1137
+ "name": "agent_jobs_status_check",
1138
+ "value": "\"agent_jobs\".\"status\" IN ('pending','processing','completed','failed','awaiting_approval','awaiting_delegation','cancelled')"
1139
+ },
1140
+ "agent_jobs_channel_check": {
1141
+ "name": "agent_jobs_channel_check",
1142
+ "value": "\"agent_jobs\".\"channel\" IN ('telegram','api','whatsapp','internal','cron','task-board','slack','discord')"
1143
+ }
1144
+ },
1145
+ "isRLSEnabled": false
1146
+ },
1147
+ "public.agent_tasks": {
1148
+ "name": "agent_tasks",
1149
+ "schema": "",
1150
+ "columns": {
1151
+ "id": {
1152
+ "name": "id",
1153
+ "type": "uuid",
1154
+ "primaryKey": true,
1155
+ "notNull": true,
1156
+ "default": "gen_random_uuid()"
1157
+ },
1158
+ "entity_id": {
1159
+ "name": "entity_id",
1160
+ "type": "uuid",
1161
+ "primaryKey": false,
1162
+ "notNull": true
1163
+ },
1164
+ "orchestrator_id": {
1165
+ "name": "orchestrator_id",
1166
+ "type": "uuid",
1167
+ "primaryKey": false,
1168
+ "notNull": true
1169
+ },
1170
+ "title": {
1171
+ "name": "title",
1172
+ "type": "text",
1173
+ "primaryKey": false,
1174
+ "notNull": true
1175
+ },
1176
+ "description": {
1177
+ "name": "description",
1178
+ "type": "text",
1179
+ "primaryKey": false,
1180
+ "notNull": false
1181
+ },
1182
+ "status": {
1183
+ "name": "status",
1184
+ "type": "text",
1185
+ "primaryKey": false,
1186
+ "notNull": true,
1187
+ "default": "'todo'"
1188
+ },
1189
+ "priority": {
1190
+ "name": "priority",
1191
+ "type": "text",
1192
+ "primaryKey": false,
1193
+ "notNull": true,
1194
+ "default": "'medium'"
1195
+ },
1196
+ "job_id": {
1197
+ "name": "job_id",
1198
+ "type": "uuid",
1199
+ "primaryKey": false,
1200
+ "notNull": false
1201
+ },
1202
+ "result": {
1203
+ "name": "result",
1204
+ "type": "text",
1205
+ "primaryKey": false,
1206
+ "notNull": false
1207
+ },
1208
+ "created_by_agent_id": {
1209
+ "name": "created_by_agent_id",
1210
+ "type": "uuid",
1211
+ "primaryKey": false,
1212
+ "notNull": false
1213
+ },
1214
+ "assigned_agent_id": {
1215
+ "name": "assigned_agent_id",
1216
+ "type": "uuid",
1217
+ "primaryKey": false,
1218
+ "notNull": false
1219
+ },
1220
+ "input_tokens": {
1221
+ "name": "input_tokens",
1222
+ "type": "integer",
1223
+ "primaryKey": false,
1224
+ "notNull": false,
1225
+ "default": 0
1226
+ },
1227
+ "output_tokens": {
1228
+ "name": "output_tokens",
1229
+ "type": "integer",
1230
+ "primaryKey": false,
1231
+ "notNull": false,
1232
+ "default": 0
1233
+ },
1234
+ "cost_usd": {
1235
+ "name": "cost_usd",
1236
+ "type": "numeric(10, 6)",
1237
+ "primaryKey": false,
1238
+ "notNull": false,
1239
+ "default": "'0'"
1240
+ },
1241
+ "depends_on": {
1242
+ "name": "depends_on",
1243
+ "type": "uuid[]",
1244
+ "primaryKey": false,
1245
+ "notNull": false,
1246
+ "default": "'{}'::uuid[]"
1247
+ },
1248
+ "context": {
1249
+ "name": "context",
1250
+ "type": "jsonb",
1251
+ "primaryKey": false,
1252
+ "notNull": false,
1253
+ "default": "'{}'::jsonb"
1254
+ },
1255
+ "root_job_id": {
1256
+ "name": "root_job_id",
1257
+ "type": "uuid",
1258
+ "primaryKey": false,
1259
+ "notNull": false
1260
+ },
1261
+ "locked_at": {
1262
+ "name": "locked_at",
1263
+ "type": "timestamp with time zone",
1264
+ "primaryKey": false,
1265
+ "notNull": false
1266
+ },
1267
+ "locked_by": {
1268
+ "name": "locked_by",
1269
+ "type": "text",
1270
+ "primaryKey": false,
1271
+ "notNull": false
1272
+ },
1273
+ "created_at": {
1274
+ "name": "created_at",
1275
+ "type": "timestamp with time zone",
1276
+ "primaryKey": false,
1277
+ "notNull": true,
1278
+ "default": "now()"
1279
+ },
1280
+ "updated_at": {
1281
+ "name": "updated_at",
1282
+ "type": "timestamp with time zone",
1283
+ "primaryKey": false,
1284
+ "notNull": true,
1285
+ "default": "now()"
1286
+ }
1287
+ },
1288
+ "indexes": {
1289
+ "idx_agent_tasks_entity": {
1290
+ "name": "idx_agent_tasks_entity",
1291
+ "columns": [
1292
+ {
1293
+ "expression": "entity_id",
1294
+ "isExpression": false,
1295
+ "asc": true,
1296
+ "nulls": "last"
1297
+ }
1298
+ ],
1299
+ "isUnique": false,
1300
+ "concurrently": false,
1301
+ "method": "btree",
1302
+ "with": {}
1303
+ },
1304
+ "idx_agent_tasks_entity_status_created": {
1305
+ "name": "idx_agent_tasks_entity_status_created",
1306
+ "columns": [
1307
+ {
1308
+ "expression": "entity_id",
1309
+ "isExpression": false,
1310
+ "asc": true,
1311
+ "nulls": "last"
1312
+ },
1313
+ {
1314
+ "expression": "status",
1315
+ "isExpression": false,
1316
+ "asc": true,
1317
+ "nulls": "last"
1318
+ },
1319
+ {
1320
+ "expression": "\"created_at\" DESC",
1321
+ "asc": true,
1322
+ "isExpression": true,
1323
+ "nulls": "last"
1324
+ }
1325
+ ],
1326
+ "isUnique": false,
1327
+ "concurrently": false,
1328
+ "method": "btree",
1329
+ "with": {}
1330
+ },
1331
+ "idx_agent_tasks_orchestrator_status": {
1332
+ "name": "idx_agent_tasks_orchestrator_status",
1333
+ "columns": [
1334
+ {
1335
+ "expression": "orchestrator_id",
1336
+ "isExpression": false,
1337
+ "asc": true,
1338
+ "nulls": "last"
1339
+ },
1340
+ {
1341
+ "expression": "status",
1342
+ "isExpression": false,
1343
+ "asc": true,
1344
+ "nulls": "last"
1345
+ }
1346
+ ],
1347
+ "isUnique": false,
1348
+ "concurrently": false,
1349
+ "method": "btree",
1350
+ "with": {}
1351
+ },
1352
+ "idx_agent_tasks_status": {
1353
+ "name": "idx_agent_tasks_status",
1354
+ "columns": [
1355
+ {
1356
+ "expression": "status",
1357
+ "isExpression": false,
1358
+ "asc": true,
1359
+ "nulls": "last"
1360
+ }
1361
+ ],
1362
+ "isUnique": false,
1363
+ "concurrently": false,
1364
+ "method": "btree",
1365
+ "with": {}
1366
+ },
1367
+ "idx_agent_tasks_assigned": {
1368
+ "name": "idx_agent_tasks_assigned",
1369
+ "columns": [
1370
+ {
1371
+ "expression": "assigned_agent_id",
1372
+ "isExpression": false,
1373
+ "asc": true,
1374
+ "nulls": "last"
1375
+ }
1376
+ ],
1377
+ "isUnique": false,
1378
+ "concurrently": false,
1379
+ "method": "btree",
1380
+ "with": {}
1381
+ }
1382
+ },
1383
+ "foreignKeys": {
1384
+ "agent_tasks_entity_id_entities_id_fk": {
1385
+ "name": "agent_tasks_entity_id_entities_id_fk",
1386
+ "tableFrom": "agent_tasks",
1387
+ "tableTo": "entities",
1388
+ "columnsFrom": ["entity_id"],
1389
+ "columnsTo": ["id"],
1390
+ "onDelete": "cascade",
1391
+ "onUpdate": "no action"
1392
+ },
1393
+ "agent_tasks_orchestrator_id_agents_id_fk": {
1394
+ "name": "agent_tasks_orchestrator_id_agents_id_fk",
1395
+ "tableFrom": "agent_tasks",
1396
+ "tableTo": "agents",
1397
+ "columnsFrom": ["orchestrator_id"],
1398
+ "columnsTo": ["id"],
1399
+ "onDelete": "cascade",
1400
+ "onUpdate": "no action"
1401
+ },
1402
+ "agent_tasks_job_id_agent_jobs_id_fk": {
1403
+ "name": "agent_tasks_job_id_agent_jobs_id_fk",
1404
+ "tableFrom": "agent_tasks",
1405
+ "tableTo": "agent_jobs",
1406
+ "columnsFrom": ["job_id"],
1407
+ "columnsTo": ["id"],
1408
+ "onDelete": "set null",
1409
+ "onUpdate": "no action"
1410
+ },
1411
+ "agent_tasks_created_by_agent_id_agents_id_fk": {
1412
+ "name": "agent_tasks_created_by_agent_id_agents_id_fk",
1413
+ "tableFrom": "agent_tasks",
1414
+ "tableTo": "agents",
1415
+ "columnsFrom": ["created_by_agent_id"],
1416
+ "columnsTo": ["id"],
1417
+ "onDelete": "no action",
1418
+ "onUpdate": "no action"
1419
+ },
1420
+ "agent_tasks_assigned_agent_id_agents_id_fk": {
1421
+ "name": "agent_tasks_assigned_agent_id_agents_id_fk",
1422
+ "tableFrom": "agent_tasks",
1423
+ "tableTo": "agents",
1424
+ "columnsFrom": ["assigned_agent_id"],
1425
+ "columnsTo": ["id"],
1426
+ "onDelete": "no action",
1427
+ "onUpdate": "no action"
1428
+ }
1429
+ },
1430
+ "compositePrimaryKeys": {},
1431
+ "uniqueConstraints": {},
1432
+ "policies": {},
1433
+ "checkConstraints": {
1434
+ "agent_tasks_status_check": {
1435
+ "name": "agent_tasks_status_check",
1436
+ "value": "\"agent_tasks\".\"status\" IN ('todo','in_progress','done','cancelled','blocked')"
1437
+ },
1438
+ "agent_tasks_priority_check": {
1439
+ "name": "agent_tasks_priority_check",
1440
+ "value": "\"agent_tasks\".\"priority\" IN ('low','medium','high')"
1441
+ },
1442
+ "agent_tasks_title_check": {
1443
+ "name": "agent_tasks_title_check",
1444
+ "value": "char_length(\"agent_tasks\".\"title\") <= 200"
1445
+ },
1446
+ "agent_tasks_description_check": {
1447
+ "name": "agent_tasks_description_check",
1448
+ "value": "\"agent_tasks\".\"description\" IS NULL OR char_length(\"agent_tasks\".\"description\") <= 2000"
1449
+ }
1450
+ },
1451
+ "isRLSEnabled": false
1452
+ },
1453
+ "public.credentials": {
1454
+ "name": "credentials",
1455
+ "schema": "",
1456
+ "columns": {
1457
+ "id": {
1458
+ "name": "id",
1459
+ "type": "uuid",
1460
+ "primaryKey": true,
1461
+ "notNull": true,
1462
+ "default": "gen_random_uuid()"
1463
+ },
1464
+ "owner_user_id": {
1465
+ "name": "owner_user_id",
1466
+ "type": "uuid",
1467
+ "primaryKey": false,
1468
+ "notNull": true
1469
+ },
1470
+ "name": {
1471
+ "name": "name",
1472
+ "type": "text",
1473
+ "primaryKey": false,
1474
+ "notNull": true
1475
+ },
1476
+ "type": {
1477
+ "name": "type",
1478
+ "type": "text",
1479
+ "primaryKey": false,
1480
+ "notNull": true
1481
+ },
1482
+ "payload": {
1483
+ "name": "payload",
1484
+ "type": "text",
1485
+ "primaryKey": false,
1486
+ "notNull": true
1487
+ },
1488
+ "created_at": {
1489
+ "name": "created_at",
1490
+ "type": "timestamp with time zone",
1491
+ "primaryKey": false,
1492
+ "notNull": false,
1493
+ "default": "now()"
1494
+ },
1495
+ "updated_at": {
1496
+ "name": "updated_at",
1497
+ "type": "timestamp with time zone",
1498
+ "primaryKey": false,
1499
+ "notNull": false,
1500
+ "default": "now()"
1501
+ }
1502
+ },
1503
+ "indexes": {
1504
+ "idx_credentials_owner": {
1505
+ "name": "idx_credentials_owner",
1506
+ "columns": [
1507
+ {
1508
+ "expression": "owner_user_id",
1509
+ "isExpression": false,
1510
+ "asc": true,
1511
+ "nulls": "last"
1512
+ }
1513
+ ],
1514
+ "isUnique": false,
1515
+ "concurrently": false,
1516
+ "method": "btree",
1517
+ "with": {}
1518
+ },
1519
+ "idx_credentials_type": {
1520
+ "name": "idx_credentials_type",
1521
+ "columns": [
1522
+ {
1523
+ "expression": "type",
1524
+ "isExpression": false,
1525
+ "asc": true,
1526
+ "nulls": "last"
1527
+ }
1528
+ ],
1529
+ "isUnique": false,
1530
+ "concurrently": false,
1531
+ "method": "btree",
1532
+ "with": {}
1533
+ }
1534
+ },
1535
+ "foreignKeys": {
1536
+ "credentials_owner_user_id_users_id_fk": {
1537
+ "name": "credentials_owner_user_id_users_id_fk",
1538
+ "tableFrom": "credentials",
1539
+ "tableTo": "users",
1540
+ "columnsFrom": ["owner_user_id"],
1541
+ "columnsTo": ["id"],
1542
+ "onDelete": "cascade",
1543
+ "onUpdate": "no action"
1544
+ }
1545
+ },
1546
+ "compositePrimaryKeys": {},
1547
+ "uniqueConstraints": {},
1548
+ "policies": {},
1549
+ "checkConstraints": {
1550
+ "credentials_type_check": {
1551
+ "name": "credentials_type_check",
1552
+ "value": "\"credentials\".\"type\" IN ('google-oauth','notion-oauth','airtable-oauth')"
1553
+ }
1554
+ },
1555
+ "isRLSEnabled": false
1556
+ },
1557
+ "public.connectors": {
1558
+ "name": "connectors",
1559
+ "schema": "",
1560
+ "columns": {
1561
+ "id": {
1562
+ "name": "id",
1563
+ "type": "uuid",
1564
+ "primaryKey": true,
1565
+ "notNull": true,
1566
+ "default": "gen_random_uuid()"
1567
+ },
1568
+ "entity_id": {
1569
+ "name": "entity_id",
1570
+ "type": "uuid",
1571
+ "primaryKey": false,
1572
+ "notNull": false
1573
+ },
1574
+ "name": {
1575
+ "name": "name",
1576
+ "type": "text",
1577
+ "primaryKey": false,
1578
+ "notNull": true
1579
+ },
1580
+ "slug": {
1581
+ "name": "slug",
1582
+ "type": "text",
1583
+ "primaryKey": false,
1584
+ "notNull": true
1585
+ },
1586
+ "base_url": {
1587
+ "name": "base_url",
1588
+ "type": "text",
1589
+ "primaryKey": false,
1590
+ "notNull": false
1591
+ },
1592
+ "api_key": {
1593
+ "name": "api_key",
1594
+ "type": "text",
1595
+ "primaryKey": false,
1596
+ "notNull": false
1597
+ },
1598
+ "active": {
1599
+ "name": "active",
1600
+ "type": "boolean",
1601
+ "primaryKey": false,
1602
+ "notNull": false,
1603
+ "default": true
1604
+ },
1605
+ "auth_type": {
1606
+ "name": "auth_type",
1607
+ "type": "text",
1608
+ "primaryKey": false,
1609
+ "notNull": true,
1610
+ "default": "'api_key'"
1611
+ },
1612
+ "credential_id": {
1613
+ "name": "credential_id",
1614
+ "type": "uuid",
1615
+ "primaryKey": false,
1616
+ "notNull": false
1617
+ },
1618
+ "created_at": {
1619
+ "name": "created_at",
1620
+ "type": "timestamp with time zone",
1621
+ "primaryKey": false,
1622
+ "notNull": false,
1623
+ "default": "now()"
1624
+ },
1625
+ "updated_at": {
1626
+ "name": "updated_at",
1627
+ "type": "timestamp with time zone",
1628
+ "primaryKey": false,
1629
+ "notNull": false,
1630
+ "default": "now()"
1631
+ }
1632
+ },
1633
+ "indexes": {
1634
+ "idx_connectors_entity_id": {
1635
+ "name": "idx_connectors_entity_id",
1636
+ "columns": [
1637
+ {
1638
+ "expression": "entity_id",
1639
+ "isExpression": false,
1640
+ "asc": true,
1641
+ "nulls": "last"
1642
+ }
1643
+ ],
1644
+ "isUnique": false,
1645
+ "concurrently": false,
1646
+ "method": "btree",
1647
+ "with": {}
1648
+ },
1649
+ "idx_connectors_credential_id": {
1650
+ "name": "idx_connectors_credential_id",
1651
+ "columns": [
1652
+ {
1653
+ "expression": "credential_id",
1654
+ "isExpression": false,
1655
+ "asc": true,
1656
+ "nulls": "last"
1657
+ }
1658
+ ],
1659
+ "isUnique": false,
1660
+ "concurrently": false,
1661
+ "method": "btree",
1662
+ "with": {}
1663
+ }
1664
+ },
1665
+ "foreignKeys": {
1666
+ "connectors_entity_id_entities_id_fk": {
1667
+ "name": "connectors_entity_id_entities_id_fk",
1668
+ "tableFrom": "connectors",
1669
+ "tableTo": "entities",
1670
+ "columnsFrom": ["entity_id"],
1671
+ "columnsTo": ["id"],
1672
+ "onDelete": "cascade",
1673
+ "onUpdate": "no action"
1674
+ },
1675
+ "connectors_credential_id_credentials_id_fk": {
1676
+ "name": "connectors_credential_id_credentials_id_fk",
1677
+ "tableFrom": "connectors",
1678
+ "tableTo": "credentials",
1679
+ "columnsFrom": ["credential_id"],
1680
+ "columnsTo": ["id"],
1681
+ "onDelete": "set null",
1682
+ "onUpdate": "no action"
1683
+ }
1684
+ },
1685
+ "compositePrimaryKeys": {},
1686
+ "uniqueConstraints": {
1687
+ "connectors_entity_slug_unique": {
1688
+ "name": "connectors_entity_slug_unique",
1689
+ "nullsNotDistinct": false,
1690
+ "columns": ["entity_id", "slug"]
1691
+ }
1692
+ },
1693
+ "policies": {},
1694
+ "checkConstraints": {
1695
+ "connectors_auth_type_check": {
1696
+ "name": "connectors_auth_type_check",
1697
+ "value": "\"connectors\".\"auth_type\" IN ('api_key','oauth2','bearer','basic','none')"
1698
+ }
1699
+ },
1700
+ "isRLSEnabled": false
1701
+ },
1702
+ "public.tool_calls": {
1703
+ "name": "tool_calls",
1704
+ "schema": "",
1705
+ "columns": {
1706
+ "id": {
1707
+ "name": "id",
1708
+ "type": "uuid",
1709
+ "primaryKey": true,
1710
+ "notNull": true,
1711
+ "default": "gen_random_uuid()"
1712
+ },
1713
+ "entity_id": {
1714
+ "name": "entity_id",
1715
+ "type": "uuid",
1716
+ "primaryKey": false,
1717
+ "notNull": false
1718
+ },
1719
+ "job_id": {
1720
+ "name": "job_id",
1721
+ "type": "uuid",
1722
+ "primaryKey": false,
1723
+ "notNull": false
1724
+ },
1725
+ "tool_name": {
1726
+ "name": "tool_name",
1727
+ "type": "text",
1728
+ "primaryKey": false,
1729
+ "notNull": true
1730
+ },
1731
+ "tool_input": {
1732
+ "name": "tool_input",
1733
+ "type": "jsonb",
1734
+ "primaryKey": false,
1735
+ "notNull": false
1736
+ },
1737
+ "tool_output": {
1738
+ "name": "tool_output",
1739
+ "type": "text",
1740
+ "primaryKey": false,
1741
+ "notNull": false
1742
+ },
1743
+ "duration_ms": {
1744
+ "name": "duration_ms",
1745
+ "type": "integer",
1746
+ "primaryKey": false,
1747
+ "notNull": false
1748
+ },
1749
+ "turn": {
1750
+ "name": "turn",
1751
+ "type": "integer",
1752
+ "primaryKey": false,
1753
+ "notNull": false
1754
+ },
1755
+ "created_at": {
1756
+ "name": "created_at",
1757
+ "type": "timestamp with time zone",
1758
+ "primaryKey": false,
1759
+ "notNull": false,
1760
+ "default": "now()"
1761
+ }
1762
+ },
1763
+ "indexes": {
1764
+ "idx_tool_calls_entity_id": {
1765
+ "name": "idx_tool_calls_entity_id",
1766
+ "columns": [
1767
+ {
1768
+ "expression": "entity_id",
1769
+ "isExpression": false,
1770
+ "asc": true,
1771
+ "nulls": "last"
1772
+ }
1773
+ ],
1774
+ "isUnique": false,
1775
+ "concurrently": false,
1776
+ "method": "btree",
1777
+ "with": {}
1778
+ },
1779
+ "idx_tool_calls_job": {
1780
+ "name": "idx_tool_calls_job",
1781
+ "columns": [
1782
+ {
1783
+ "expression": "job_id",
1784
+ "isExpression": false,
1785
+ "asc": true,
1786
+ "nulls": "last"
1787
+ }
1788
+ ],
1789
+ "isUnique": false,
1790
+ "concurrently": false,
1791
+ "method": "btree",
1792
+ "with": {}
1793
+ },
1794
+ "idx_tool_calls_job_created": {
1795
+ "name": "idx_tool_calls_job_created",
1796
+ "columns": [
1797
+ {
1798
+ "expression": "job_id",
1799
+ "isExpression": false,
1800
+ "asc": true,
1801
+ "nulls": "last"
1802
+ },
1803
+ {
1804
+ "expression": "\"created_at\" DESC",
1805
+ "asc": true,
1806
+ "isExpression": true,
1807
+ "nulls": "last"
1808
+ }
1809
+ ],
1810
+ "isUnique": false,
1811
+ "concurrently": false,
1812
+ "method": "btree",
1813
+ "with": {}
1814
+ },
1815
+ "idx_tool_calls_recent": {
1816
+ "name": "idx_tool_calls_recent",
1817
+ "columns": [
1818
+ {
1819
+ "expression": "\"created_at\" DESC",
1820
+ "asc": true,
1821
+ "isExpression": true,
1822
+ "nulls": "last"
1823
+ }
1824
+ ],
1825
+ "isUnique": false,
1826
+ "concurrently": false,
1827
+ "method": "btree",
1828
+ "with": {}
1829
+ }
1830
+ },
1831
+ "foreignKeys": {
1832
+ "tool_calls_entity_id_entities_id_fk": {
1833
+ "name": "tool_calls_entity_id_entities_id_fk",
1834
+ "tableFrom": "tool_calls",
1835
+ "tableTo": "entities",
1836
+ "columnsFrom": ["entity_id"],
1837
+ "columnsTo": ["id"],
1838
+ "onDelete": "cascade",
1839
+ "onUpdate": "no action"
1840
+ },
1841
+ "tool_calls_job_id_agent_jobs_id_fk": {
1842
+ "name": "tool_calls_job_id_agent_jobs_id_fk",
1843
+ "tableFrom": "tool_calls",
1844
+ "tableTo": "agent_jobs",
1845
+ "columnsFrom": ["job_id"],
1846
+ "columnsTo": ["id"],
1847
+ "onDelete": "cascade",
1848
+ "onUpdate": "no action"
1849
+ }
1850
+ },
1851
+ "compositePrimaryKeys": {},
1852
+ "uniqueConstraints": {},
1853
+ "policies": {},
1854
+ "checkConstraints": {},
1855
+ "isRLSEnabled": false
1856
+ },
1857
+ "public.approval_requests": {
1858
+ "name": "approval_requests",
1859
+ "schema": "",
1860
+ "columns": {
1861
+ "id": {
1862
+ "name": "id",
1863
+ "type": "uuid",
1864
+ "primaryKey": true,
1865
+ "notNull": true,
1866
+ "default": "gen_random_uuid()"
1867
+ },
1868
+ "entity_id": {
1869
+ "name": "entity_id",
1870
+ "type": "uuid",
1871
+ "primaryKey": false,
1872
+ "notNull": false
1873
+ },
1874
+ "job_id": {
1875
+ "name": "job_id",
1876
+ "type": "uuid",
1877
+ "primaryKey": false,
1878
+ "notNull": true
1879
+ },
1880
+ "agent_id": {
1881
+ "name": "agent_id",
1882
+ "type": "uuid",
1883
+ "primaryKey": false,
1884
+ "notNull": false
1885
+ },
1886
+ "tool_name": {
1887
+ "name": "tool_name",
1888
+ "type": "text",
1889
+ "primaryKey": false,
1890
+ "notNull": true
1891
+ },
1892
+ "tool_input": {
1893
+ "name": "tool_input",
1894
+ "type": "jsonb",
1895
+ "primaryKey": false,
1896
+ "notNull": true
1897
+ },
1898
+ "status": {
1899
+ "name": "status",
1900
+ "type": "text",
1901
+ "primaryKey": false,
1902
+ "notNull": false,
1903
+ "default": "'pending'"
1904
+ },
1905
+ "requested_at": {
1906
+ "name": "requested_at",
1907
+ "type": "timestamp with time zone",
1908
+ "primaryKey": false,
1909
+ "notNull": false,
1910
+ "default": "now()"
1911
+ },
1912
+ "resolved_at": {
1913
+ "name": "resolved_at",
1914
+ "type": "timestamp with time zone",
1915
+ "primaryKey": false,
1916
+ "notNull": false
1917
+ },
1918
+ "resolved_by": {
1919
+ "name": "resolved_by",
1920
+ "type": "text",
1921
+ "primaryKey": false,
1922
+ "notNull": false
1923
+ },
1924
+ "expires_at": {
1925
+ "name": "expires_at",
1926
+ "type": "timestamp with time zone",
1927
+ "primaryKey": false,
1928
+ "notNull": false,
1929
+ "default": "now() + interval '1 hour'"
1930
+ },
1931
+ "notes": {
1932
+ "name": "notes",
1933
+ "type": "text",
1934
+ "primaryKey": false,
1935
+ "notNull": false
1936
+ }
1937
+ },
1938
+ "indexes": {
1939
+ "idx_approval_requests_entity_id": {
1940
+ "name": "idx_approval_requests_entity_id",
1941
+ "columns": [
1942
+ {
1943
+ "expression": "entity_id",
1944
+ "isExpression": false,
1945
+ "asc": true,
1946
+ "nulls": "last"
1947
+ }
1948
+ ],
1949
+ "isUnique": false,
1950
+ "concurrently": false,
1951
+ "method": "btree",
1952
+ "with": {}
1953
+ },
1954
+ "idx_approval_status": {
1955
+ "name": "idx_approval_status",
1956
+ "columns": [
1957
+ {
1958
+ "expression": "status",
1959
+ "isExpression": false,
1960
+ "asc": true,
1961
+ "nulls": "last"
1962
+ },
1963
+ {
1964
+ "expression": "requested_at",
1965
+ "isExpression": false,
1966
+ "asc": true,
1967
+ "nulls": "last"
1968
+ }
1969
+ ],
1970
+ "isUnique": false,
1971
+ "concurrently": false,
1972
+ "method": "btree",
1973
+ "with": {}
1974
+ },
1975
+ "idx_approval_requests_agent_id": {
1976
+ "name": "idx_approval_requests_agent_id",
1977
+ "columns": [
1978
+ {
1979
+ "expression": "agent_id",
1980
+ "isExpression": false,
1981
+ "asc": true,
1982
+ "nulls": "last"
1983
+ }
1984
+ ],
1985
+ "isUnique": false,
1986
+ "concurrently": false,
1987
+ "method": "btree",
1988
+ "with": {}
1989
+ },
1990
+ "idx_approval_requests_job_id": {
1991
+ "name": "idx_approval_requests_job_id",
1992
+ "columns": [
1993
+ {
1994
+ "expression": "job_id",
1995
+ "isExpression": false,
1996
+ "asc": true,
1997
+ "nulls": "last"
1998
+ }
1999
+ ],
2000
+ "isUnique": false,
2001
+ "concurrently": false,
2002
+ "method": "btree",
2003
+ "with": {}
2004
+ }
2005
+ },
2006
+ "foreignKeys": {
2007
+ "approval_requests_entity_id_entities_id_fk": {
2008
+ "name": "approval_requests_entity_id_entities_id_fk",
2009
+ "tableFrom": "approval_requests",
2010
+ "tableTo": "entities",
2011
+ "columnsFrom": ["entity_id"],
2012
+ "columnsTo": ["id"],
2013
+ "onDelete": "cascade",
2014
+ "onUpdate": "no action"
2015
+ },
2016
+ "approval_requests_job_id_agent_jobs_id_fk": {
2017
+ "name": "approval_requests_job_id_agent_jobs_id_fk",
2018
+ "tableFrom": "approval_requests",
2019
+ "tableTo": "agent_jobs",
2020
+ "columnsFrom": ["job_id"],
2021
+ "columnsTo": ["id"],
2022
+ "onDelete": "cascade",
2023
+ "onUpdate": "no action"
2024
+ },
2025
+ "approval_requests_agent_id_agents_id_fk": {
2026
+ "name": "approval_requests_agent_id_agents_id_fk",
2027
+ "tableFrom": "approval_requests",
2028
+ "tableTo": "agents",
2029
+ "columnsFrom": ["agent_id"],
2030
+ "columnsTo": ["id"],
2031
+ "onDelete": "no action",
2032
+ "onUpdate": "no action"
2033
+ }
2034
+ },
2035
+ "compositePrimaryKeys": {},
2036
+ "uniqueConstraints": {},
2037
+ "policies": {},
2038
+ "checkConstraints": {
2039
+ "approval_requests_status_check": {
2040
+ "name": "approval_requests_status_check",
2041
+ "value": "\"approval_requests\".\"status\" IN ('pending','approved','rejected','expired')"
2042
+ }
2043
+ },
2044
+ "isRLSEnabled": false
2045
+ },
2046
+ "public.approval_rules": {
2047
+ "name": "approval_rules",
2048
+ "schema": "",
2049
+ "columns": {
2050
+ "id": {
2051
+ "name": "id",
2052
+ "type": "uuid",
2053
+ "primaryKey": true,
2054
+ "notNull": true,
2055
+ "default": "gen_random_uuid()"
2056
+ },
2057
+ "entity_id": {
2058
+ "name": "entity_id",
2059
+ "type": "uuid",
2060
+ "primaryKey": false,
2061
+ "notNull": false
2062
+ },
2063
+ "agent_id": {
2064
+ "name": "agent_id",
2065
+ "type": "uuid",
2066
+ "primaryKey": false,
2067
+ "notNull": false
2068
+ },
2069
+ "tool_name": {
2070
+ "name": "tool_name",
2071
+ "type": "text",
2072
+ "primaryKey": false,
2073
+ "notNull": true
2074
+ },
2075
+ "action": {
2076
+ "name": "action",
2077
+ "type": "text",
2078
+ "primaryKey": false,
2079
+ "notNull": true
2080
+ },
2081
+ "condition_json": {
2082
+ "name": "condition_json",
2083
+ "type": "jsonb",
2084
+ "primaryKey": false,
2085
+ "notNull": false,
2086
+ "default": "'{}'::jsonb"
2087
+ },
2088
+ "created_at": {
2089
+ "name": "created_at",
2090
+ "type": "timestamp with time zone",
2091
+ "primaryKey": false,
2092
+ "notNull": false,
2093
+ "default": "now()"
2094
+ },
2095
+ "updated_at": {
2096
+ "name": "updated_at",
2097
+ "type": "timestamp with time zone",
2098
+ "primaryKey": false,
2099
+ "notNull": false,
2100
+ "default": "now()"
2101
+ }
2102
+ },
2103
+ "indexes": {
2104
+ "idx_approval_rules_entity_id": {
2105
+ "name": "idx_approval_rules_entity_id",
2106
+ "columns": [
2107
+ {
2108
+ "expression": "entity_id",
2109
+ "isExpression": false,
2110
+ "asc": true,
2111
+ "nulls": "last"
2112
+ }
2113
+ ],
2114
+ "isUnique": false,
2115
+ "concurrently": false,
2116
+ "method": "btree",
2117
+ "with": {}
2118
+ }
2119
+ },
2120
+ "foreignKeys": {
2121
+ "approval_rules_entity_id_entities_id_fk": {
2122
+ "name": "approval_rules_entity_id_entities_id_fk",
2123
+ "tableFrom": "approval_rules",
2124
+ "tableTo": "entities",
2125
+ "columnsFrom": ["entity_id"],
2126
+ "columnsTo": ["id"],
2127
+ "onDelete": "cascade",
2128
+ "onUpdate": "no action"
2129
+ },
2130
+ "approval_rules_agent_id_agents_id_fk": {
2131
+ "name": "approval_rules_agent_id_agents_id_fk",
2132
+ "tableFrom": "approval_rules",
2133
+ "tableTo": "agents",
2134
+ "columnsFrom": ["agent_id"],
2135
+ "columnsTo": ["id"],
2136
+ "onDelete": "cascade",
2137
+ "onUpdate": "no action"
2138
+ }
2139
+ },
2140
+ "compositePrimaryKeys": {},
2141
+ "uniqueConstraints": {},
2142
+ "policies": {},
2143
+ "checkConstraints": {
2144
+ "approval_rules_action_check": {
2145
+ "name": "approval_rules_action_check",
2146
+ "value": "\"approval_rules\".\"action\" IN ('auto_approve','require_approval','block')"
2147
+ }
2148
+ },
2149
+ "isRLSEnabled": false
2150
+ },
2151
+ "public.agent_memory": {
2152
+ "name": "agent_memory",
2153
+ "schema": "",
2154
+ "columns": {
2155
+ "id": {
2156
+ "name": "id",
2157
+ "type": "uuid",
2158
+ "primaryKey": true,
2159
+ "notNull": true,
2160
+ "default": "gen_random_uuid()"
2161
+ },
2162
+ "entity_id": {
2163
+ "name": "entity_id",
2164
+ "type": "uuid",
2165
+ "primaryKey": false,
2166
+ "notNull": false
2167
+ },
2168
+ "agent_id": {
2169
+ "name": "agent_id",
2170
+ "type": "uuid",
2171
+ "primaryKey": false,
2172
+ "notNull": false
2173
+ },
2174
+ "fact": {
2175
+ "name": "fact",
2176
+ "type": "text",
2177
+ "primaryKey": false,
2178
+ "notNull": true
2179
+ },
2180
+ "category": {
2181
+ "name": "category",
2182
+ "type": "text",
2183
+ "primaryKey": false,
2184
+ "notNull": false,
2185
+ "default": "'context'"
2186
+ },
2187
+ "importance": {
2188
+ "name": "importance",
2189
+ "type": "integer",
2190
+ "primaryKey": false,
2191
+ "notNull": false,
2192
+ "default": 3
2193
+ },
2194
+ "source": {
2195
+ "name": "source",
2196
+ "type": "text",
2197
+ "primaryKey": false,
2198
+ "notNull": false,
2199
+ "default": "'agent'"
2200
+ },
2201
+ "skill_tags": {
2202
+ "name": "skill_tags",
2203
+ "type": "text[]",
2204
+ "primaryKey": false,
2205
+ "notNull": false,
2206
+ "default": "'{}'::text[]"
2207
+ },
2208
+ "memory_layer": {
2209
+ "name": "memory_layer",
2210
+ "type": "text",
2211
+ "primaryKey": false,
2212
+ "notNull": false
2213
+ },
2214
+ "embedding": {
2215
+ "name": "embedding",
2216
+ "type": "vector(1536)",
2217
+ "primaryKey": false,
2218
+ "notNull": false
2219
+ },
2220
+ "valid_from": {
2221
+ "name": "valid_from",
2222
+ "type": "timestamp with time zone",
2223
+ "primaryKey": false,
2224
+ "notNull": false,
2225
+ "default": "now()"
2226
+ },
2227
+ "valid_to": {
2228
+ "name": "valid_to",
2229
+ "type": "timestamp with time zone",
2230
+ "primaryKey": false,
2231
+ "notNull": false
2232
+ },
2233
+ "fact_hash": {
2234
+ "name": "fact_hash",
2235
+ "type": "text",
2236
+ "primaryKey": false,
2237
+ "notNull": false
2238
+ },
2239
+ "archived": {
2240
+ "name": "archived",
2241
+ "type": "boolean",
2242
+ "primaryKey": false,
2243
+ "notNull": false,
2244
+ "default": false
2245
+ },
2246
+ "last_accessed_at": {
2247
+ "name": "last_accessed_at",
2248
+ "type": "timestamp with time zone",
2249
+ "primaryKey": false,
2250
+ "notNull": false,
2251
+ "default": "now()"
2252
+ },
2253
+ "access_count": {
2254
+ "name": "access_count",
2255
+ "type": "integer",
2256
+ "primaryKey": false,
2257
+ "notNull": false,
2258
+ "default": 0
2259
+ },
2260
+ "created_at": {
2261
+ "name": "created_at",
2262
+ "type": "timestamp with time zone",
2263
+ "primaryKey": false,
2264
+ "notNull": false,
2265
+ "default": "now()"
2266
+ },
2267
+ "updated_at": {
2268
+ "name": "updated_at",
2269
+ "type": "timestamp with time zone",
2270
+ "primaryKey": false,
2271
+ "notNull": false,
2272
+ "default": "now()"
2273
+ }
2274
+ },
2275
+ "indexes": {
2276
+ "idx_agent_memory_entity_id": {
2277
+ "name": "idx_agent_memory_entity_id",
2278
+ "columns": [
2279
+ {
2280
+ "expression": "entity_id",
2281
+ "isExpression": false,
2282
+ "asc": true,
2283
+ "nulls": "last"
2284
+ }
2285
+ ],
2286
+ "isUnique": false,
2287
+ "concurrently": false,
2288
+ "method": "btree",
2289
+ "with": {}
2290
+ },
2291
+ "idx_agent_memory_entity_active": {
2292
+ "name": "idx_agent_memory_entity_active",
2293
+ "columns": [
2294
+ {
2295
+ "expression": "entity_id",
2296
+ "isExpression": false,
2297
+ "asc": true,
2298
+ "nulls": "last"
2299
+ },
2300
+ {
2301
+ "expression": "archived",
2302
+ "isExpression": false,
2303
+ "asc": true,
2304
+ "nulls": "last"
2305
+ },
2306
+ {
2307
+ "expression": "valid_to",
2308
+ "isExpression": false,
2309
+ "asc": true,
2310
+ "nulls": "last"
2311
+ }
2312
+ ],
2313
+ "isUnique": false,
2314
+ "concurrently": false,
2315
+ "method": "btree",
2316
+ "with": {}
2317
+ },
2318
+ "idx_agent_memory_archived": {
2319
+ "name": "idx_agent_memory_archived",
2320
+ "columns": [
2321
+ {
2322
+ "expression": "archived",
2323
+ "isExpression": false,
2324
+ "asc": true,
2325
+ "nulls": "last"
2326
+ }
2327
+ ],
2328
+ "isUnique": false,
2329
+ "concurrently": false,
2330
+ "method": "btree",
2331
+ "with": {}
2332
+ },
2333
+ "idx_agent_memory_last_accessed": {
2334
+ "name": "idx_agent_memory_last_accessed",
2335
+ "columns": [
2336
+ {
2337
+ "expression": "last_accessed_at",
2338
+ "isExpression": false,
2339
+ "asc": true,
2340
+ "nulls": "last"
2341
+ }
2342
+ ],
2343
+ "isUnique": false,
2344
+ "concurrently": false,
2345
+ "method": "btree",
2346
+ "with": {}
2347
+ },
2348
+ "idx_agent_memory_layer": {
2349
+ "name": "idx_agent_memory_layer",
2350
+ "columns": [
2351
+ {
2352
+ "expression": "memory_layer",
2353
+ "isExpression": false,
2354
+ "asc": true,
2355
+ "nulls": "last"
2356
+ }
2357
+ ],
2358
+ "isUnique": false,
2359
+ "concurrently": false,
2360
+ "method": "btree",
2361
+ "with": {}
2362
+ },
2363
+ "idx_agent_memory_fact_hash": {
2364
+ "name": "idx_agent_memory_fact_hash",
2365
+ "columns": [
2366
+ {
2367
+ "expression": "fact_hash",
2368
+ "isExpression": false,
2369
+ "asc": true,
2370
+ "nulls": "last"
2371
+ }
2372
+ ],
2373
+ "isUnique": false,
2374
+ "concurrently": false,
2375
+ "method": "btree",
2376
+ "with": {}
2377
+ },
2378
+ "idx_memory_category": {
2379
+ "name": "idx_memory_category",
2380
+ "columns": [
2381
+ {
2382
+ "expression": "category",
2383
+ "isExpression": false,
2384
+ "asc": true,
2385
+ "nulls": "last"
2386
+ },
2387
+ {
2388
+ "expression": "\"importance\" DESC",
2389
+ "asc": true,
2390
+ "isExpression": true,
2391
+ "nulls": "last"
2392
+ }
2393
+ ],
2394
+ "isUnique": false,
2395
+ "concurrently": false,
2396
+ "method": "btree",
2397
+ "with": {}
2398
+ }
2399
+ },
2400
+ "foreignKeys": {
2401
+ "agent_memory_entity_id_entities_id_fk": {
2402
+ "name": "agent_memory_entity_id_entities_id_fk",
2403
+ "tableFrom": "agent_memory",
2404
+ "tableTo": "entities",
2405
+ "columnsFrom": ["entity_id"],
2406
+ "columnsTo": ["id"],
2407
+ "onDelete": "cascade",
2408
+ "onUpdate": "no action"
2409
+ },
2410
+ "agent_memory_agent_id_agents_id_fk": {
2411
+ "name": "agent_memory_agent_id_agents_id_fk",
2412
+ "tableFrom": "agent_memory",
2413
+ "tableTo": "agents",
2414
+ "columnsFrom": ["agent_id"],
2415
+ "columnsTo": ["id"],
2416
+ "onDelete": "no action",
2417
+ "onUpdate": "no action"
2418
+ }
2419
+ },
2420
+ "compositePrimaryKeys": {},
2421
+ "uniqueConstraints": {},
2422
+ "policies": {},
2423
+ "checkConstraints": {
2424
+ "agent_memory_category_check": {
2425
+ "name": "agent_memory_category_check",
2426
+ "value": "\"agent_memory\".\"category\" IN ('preference','context','outcome','learned_rule')"
2427
+ },
2428
+ "agent_memory_importance_check": {
2429
+ "name": "agent_memory_importance_check",
2430
+ "value": "\"agent_memory\".\"importance\" >= 1 AND \"agent_memory\".\"importance\" <= 5"
2431
+ },
2432
+ "agent_memory_source_check": {
2433
+ "name": "agent_memory_source_check",
2434
+ "value": "\"agent_memory\".\"source\" IN ('agent','reflection','manual')"
2435
+ }
2436
+ },
2437
+ "isRLSEnabled": false
2438
+ },
2439
+ "public.webhook_triggers": {
2440
+ "name": "webhook_triggers",
2441
+ "schema": "",
2442
+ "columns": {
2443
+ "id": {
2444
+ "name": "id",
2445
+ "type": "uuid",
2446
+ "primaryKey": true,
2447
+ "notNull": true,
2448
+ "default": "gen_random_uuid()"
2449
+ },
2450
+ "entity_id": {
2451
+ "name": "entity_id",
2452
+ "type": "uuid",
2453
+ "primaryKey": false,
2454
+ "notNull": false
2455
+ },
2456
+ "agent_id": {
2457
+ "name": "agent_id",
2458
+ "type": "uuid",
2459
+ "primaryKey": false,
2460
+ "notNull": false
2461
+ },
2462
+ "name": {
2463
+ "name": "name",
2464
+ "type": "text",
2465
+ "primaryKey": false,
2466
+ "notNull": true
2467
+ },
2468
+ "slug": {
2469
+ "name": "slug",
2470
+ "type": "text",
2471
+ "primaryKey": false,
2472
+ "notNull": true
2473
+ },
2474
+ "task_template": {
2475
+ "name": "task_template",
2476
+ "type": "text",
2477
+ "primaryKey": false,
2478
+ "notNull": true
2479
+ },
2480
+ "active": {
2481
+ "name": "active",
2482
+ "type": "boolean",
2483
+ "primaryKey": false,
2484
+ "notNull": false,
2485
+ "default": true
2486
+ },
2487
+ "secret": {
2488
+ "name": "secret",
2489
+ "type": "text",
2490
+ "primaryKey": false,
2491
+ "notNull": false
2492
+ },
2493
+ "last_triggered_at": {
2494
+ "name": "last_triggered_at",
2495
+ "type": "timestamp with time zone",
2496
+ "primaryKey": false,
2497
+ "notNull": false
2498
+ },
2499
+ "trigger_count": {
2500
+ "name": "trigger_count",
2501
+ "type": "integer",
2502
+ "primaryKey": false,
2503
+ "notNull": false,
2504
+ "default": 0
2505
+ },
2506
+ "created_at": {
2507
+ "name": "created_at",
2508
+ "type": "timestamp with time zone",
2509
+ "primaryKey": false,
2510
+ "notNull": false,
2511
+ "default": "now()"
2512
+ },
2513
+ "updated_at": {
2514
+ "name": "updated_at",
2515
+ "type": "timestamp with time zone",
2516
+ "primaryKey": false,
2517
+ "notNull": false,
2518
+ "default": "now()"
2519
+ }
2520
+ },
2521
+ "indexes": {
2522
+ "idx_webhook_triggers_entity_id": {
2523
+ "name": "idx_webhook_triggers_entity_id",
2524
+ "columns": [
2525
+ {
2526
+ "expression": "entity_id",
2527
+ "isExpression": false,
2528
+ "asc": true,
2529
+ "nulls": "last"
2530
+ }
2531
+ ],
2532
+ "isUnique": false,
2533
+ "concurrently": false,
2534
+ "method": "btree",
2535
+ "with": {}
2536
+ }
2537
+ },
2538
+ "foreignKeys": {
2539
+ "webhook_triggers_entity_id_entities_id_fk": {
2540
+ "name": "webhook_triggers_entity_id_entities_id_fk",
2541
+ "tableFrom": "webhook_triggers",
2542
+ "tableTo": "entities",
2543
+ "columnsFrom": ["entity_id"],
2544
+ "columnsTo": ["id"],
2545
+ "onDelete": "cascade",
2546
+ "onUpdate": "no action"
2547
+ },
2548
+ "webhook_triggers_agent_id_agents_id_fk": {
2549
+ "name": "webhook_triggers_agent_id_agents_id_fk",
2550
+ "tableFrom": "webhook_triggers",
2551
+ "tableTo": "agents",
2552
+ "columnsFrom": ["agent_id"],
2553
+ "columnsTo": ["id"],
2554
+ "onDelete": "cascade",
2555
+ "onUpdate": "no action"
2556
+ }
2557
+ },
2558
+ "compositePrimaryKeys": {},
2559
+ "uniqueConstraints": {
2560
+ "webhook_triggers_slug_unique": {
2561
+ "name": "webhook_triggers_slug_unique",
2562
+ "nullsNotDistinct": false,
2563
+ "columns": ["slug"]
2564
+ }
2565
+ },
2566
+ "policies": {},
2567
+ "checkConstraints": {},
2568
+ "isRLSEnabled": false
2569
+ },
2570
+ "public.agent_skill_assignments": {
2571
+ "name": "agent_skill_assignments",
2572
+ "schema": "",
2573
+ "columns": {
2574
+ "id": {
2575
+ "name": "id",
2576
+ "type": "uuid",
2577
+ "primaryKey": true,
2578
+ "notNull": true,
2579
+ "default": "gen_random_uuid()"
2580
+ },
2581
+ "entity_id": {
2582
+ "name": "entity_id",
2583
+ "type": "uuid",
2584
+ "primaryKey": false,
2585
+ "notNull": true
2586
+ },
2587
+ "agent_id": {
2588
+ "name": "agent_id",
2589
+ "type": "uuid",
2590
+ "primaryKey": false,
2591
+ "notNull": true
2592
+ },
2593
+ "skill_id": {
2594
+ "name": "skill_id",
2595
+ "type": "uuid",
2596
+ "primaryKey": false,
2597
+ "notNull": true
2598
+ },
2599
+ "approval_overrides": {
2600
+ "name": "approval_overrides",
2601
+ "type": "jsonb",
2602
+ "primaryKey": false,
2603
+ "notNull": false,
2604
+ "default": "'{}'::jsonb"
2605
+ },
2606
+ "use_custom_instructions": {
2607
+ "name": "use_custom_instructions",
2608
+ "type": "boolean",
2609
+ "primaryKey": false,
2610
+ "notNull": true,
2611
+ "default": false
2612
+ },
2613
+ "enabled_operations": {
2614
+ "name": "enabled_operations",
2615
+ "type": "text[]",
2616
+ "primaryKey": false,
2617
+ "notNull": false
2618
+ },
2619
+ "created_at": {
2620
+ "name": "created_at",
2621
+ "type": "timestamp with time zone",
2622
+ "primaryKey": false,
2623
+ "notNull": true,
2624
+ "default": "now()"
2625
+ }
2626
+ },
2627
+ "indexes": {},
2628
+ "foreignKeys": {
2629
+ "agent_skill_assignments_entity_id_entities_id_fk": {
2630
+ "name": "agent_skill_assignments_entity_id_entities_id_fk",
2631
+ "tableFrom": "agent_skill_assignments",
2632
+ "tableTo": "entities",
2633
+ "columnsFrom": ["entity_id"],
2634
+ "columnsTo": ["id"],
2635
+ "onDelete": "cascade",
2636
+ "onUpdate": "no action"
2637
+ },
2638
+ "agent_skill_assignments_agent_id_agents_id_fk": {
2639
+ "name": "agent_skill_assignments_agent_id_agents_id_fk",
2640
+ "tableFrom": "agent_skill_assignments",
2641
+ "tableTo": "agents",
2642
+ "columnsFrom": ["agent_id"],
2643
+ "columnsTo": ["id"],
2644
+ "onDelete": "cascade",
2645
+ "onUpdate": "no action"
2646
+ },
2647
+ "agent_skill_assignments_skill_id_agent_skills_id_fk": {
2648
+ "name": "agent_skill_assignments_skill_id_agent_skills_id_fk",
2649
+ "tableFrom": "agent_skill_assignments",
2650
+ "tableTo": "agent_skills",
2651
+ "columnsFrom": ["skill_id"],
2652
+ "columnsTo": ["id"],
2653
+ "onDelete": "cascade",
2654
+ "onUpdate": "no action"
2655
+ }
2656
+ },
2657
+ "compositePrimaryKeys": {},
2658
+ "uniqueConstraints": {},
2659
+ "policies": {},
2660
+ "checkConstraints": {},
2661
+ "isRLSEnabled": false
2662
+ },
2663
+ "public.agent_skills": {
2664
+ "name": "agent_skills",
2665
+ "schema": "",
2666
+ "columns": {
2667
+ "id": {
2668
+ "name": "id",
2669
+ "type": "uuid",
2670
+ "primaryKey": true,
2671
+ "notNull": true,
2672
+ "default": "gen_random_uuid()"
2673
+ },
2674
+ "entity_id": {
2675
+ "name": "entity_id",
2676
+ "type": "uuid",
2677
+ "primaryKey": false,
2678
+ "notNull": false
2679
+ },
2680
+ "name": {
2681
+ "name": "name",
2682
+ "type": "text",
2683
+ "primaryKey": false,
2684
+ "notNull": true
2685
+ },
2686
+ "slug": {
2687
+ "name": "slug",
2688
+ "type": "text",
2689
+ "primaryKey": false,
2690
+ "notNull": true
2691
+ },
2692
+ "content": {
2693
+ "name": "content",
2694
+ "type": "text",
2695
+ "primaryKey": false,
2696
+ "notNull": true
2697
+ },
2698
+ "active": {
2699
+ "name": "active",
2700
+ "type": "boolean",
2701
+ "primaryKey": false,
2702
+ "notNull": false,
2703
+ "default": true
2704
+ },
2705
+ "description": {
2706
+ "name": "description",
2707
+ "type": "text",
2708
+ "primaryKey": false,
2709
+ "notNull": false
2710
+ },
2711
+ "default_content": {
2712
+ "name": "default_content",
2713
+ "type": "text",
2714
+ "primaryKey": false,
2715
+ "notNull": false
2716
+ },
2717
+ "content_overridden": {
2718
+ "name": "content_overridden",
2719
+ "type": "boolean",
2720
+ "primaryKey": false,
2721
+ "notNull": false,
2722
+ "default": false
2723
+ },
2724
+ "required_config": {
2725
+ "name": "required_config",
2726
+ "type": "jsonb",
2727
+ "primaryKey": false,
2728
+ "notNull": false,
2729
+ "default": "'[]'::jsonb"
2730
+ },
2731
+ "operations": {
2732
+ "name": "operations",
2733
+ "type": "jsonb",
2734
+ "primaryKey": false,
2735
+ "notNull": false,
2736
+ "default": "'[]'::jsonb"
2737
+ },
2738
+ "required_builtins": {
2739
+ "name": "required_builtins",
2740
+ "type": "text[]",
2741
+ "primaryKey": false,
2742
+ "notNull": true,
2743
+ "default": "'{}'::text[]"
2744
+ },
2745
+ "created_at": {
2746
+ "name": "created_at",
2747
+ "type": "timestamp with time zone",
2748
+ "primaryKey": false,
2749
+ "notNull": false,
2750
+ "default": "now()"
2751
+ },
2752
+ "updated_at": {
2753
+ "name": "updated_at",
2754
+ "type": "timestamp with time zone",
2755
+ "primaryKey": false,
2756
+ "notNull": false,
2757
+ "default": "now()"
2758
+ }
2759
+ },
2760
+ "indexes": {
2761
+ "idx_agent_skills_entity_id": {
2762
+ "name": "idx_agent_skills_entity_id",
2763
+ "columns": [
2764
+ {
2765
+ "expression": "entity_id",
2766
+ "isExpression": false,
2767
+ "asc": true,
2768
+ "nulls": "last"
2769
+ }
2770
+ ],
2771
+ "isUnique": false,
2772
+ "concurrently": false,
2773
+ "method": "btree",
2774
+ "with": {}
2775
+ },
2776
+ "idx_skills_active": {
2777
+ "name": "idx_skills_active",
2778
+ "columns": [
2779
+ {
2780
+ "expression": "active",
2781
+ "isExpression": false,
2782
+ "asc": true,
2783
+ "nulls": "last"
2784
+ },
2785
+ {
2786
+ "expression": "slug",
2787
+ "isExpression": false,
2788
+ "asc": true,
2789
+ "nulls": "last"
2790
+ }
2791
+ ],
2792
+ "isUnique": false,
2793
+ "concurrently": false,
2794
+ "method": "btree",
2795
+ "with": {}
2796
+ }
2797
+ },
2798
+ "foreignKeys": {
2799
+ "agent_skills_entity_id_entities_id_fk": {
2800
+ "name": "agent_skills_entity_id_entities_id_fk",
2801
+ "tableFrom": "agent_skills",
2802
+ "tableTo": "entities",
2803
+ "columnsFrom": ["entity_id"],
2804
+ "columnsTo": ["id"],
2805
+ "onDelete": "cascade",
2806
+ "onUpdate": "no action"
2807
+ }
2808
+ },
2809
+ "compositePrimaryKeys": {},
2810
+ "uniqueConstraints": {
2811
+ "agent_skills_name_unique": {
2812
+ "name": "agent_skills_name_unique",
2813
+ "nullsNotDistinct": false,
2814
+ "columns": ["name"]
2815
+ },
2816
+ "agent_skills_slug_unique": {
2817
+ "name": "agent_skills_slug_unique",
2818
+ "nullsNotDistinct": false,
2819
+ "columns": ["slug"]
2820
+ }
2821
+ },
2822
+ "policies": {},
2823
+ "checkConstraints": {},
2824
+ "isRLSEnabled": false
2825
+ },
2826
+ "public.skill_connectors": {
2827
+ "name": "skill_connectors",
2828
+ "schema": "",
2829
+ "columns": {
2830
+ "skill_id": {
2831
+ "name": "skill_id",
2832
+ "type": "uuid",
2833
+ "primaryKey": false,
2834
+ "notNull": true
2835
+ },
2836
+ "connector_id": {
2837
+ "name": "connector_id",
2838
+ "type": "uuid",
2839
+ "primaryKey": false,
2840
+ "notNull": true
2841
+ },
2842
+ "entity_id": {
2843
+ "name": "entity_id",
2844
+ "type": "uuid",
2845
+ "primaryKey": false,
2846
+ "notNull": false
2847
+ }
2848
+ },
2849
+ "indexes": {
2850
+ "idx_skill_connectors_entity_id": {
2851
+ "name": "idx_skill_connectors_entity_id",
2852
+ "columns": [
2853
+ {
2854
+ "expression": "entity_id",
2855
+ "isExpression": false,
2856
+ "asc": true,
2857
+ "nulls": "last"
2858
+ }
2859
+ ],
2860
+ "isUnique": false,
2861
+ "concurrently": false,
2862
+ "method": "btree",
2863
+ "with": {}
2864
+ },
2865
+ "idx_skill_connectors_skill_id": {
2866
+ "name": "idx_skill_connectors_skill_id",
2867
+ "columns": [
2868
+ {
2869
+ "expression": "skill_id",
2870
+ "isExpression": false,
2871
+ "asc": true,
2872
+ "nulls": "last"
2873
+ }
2874
+ ],
2875
+ "isUnique": false,
2876
+ "concurrently": false,
2877
+ "method": "btree",
2878
+ "with": {}
2879
+ }
2880
+ },
2881
+ "foreignKeys": {
2882
+ "skill_connectors_skill_id_agent_skills_id_fk": {
2883
+ "name": "skill_connectors_skill_id_agent_skills_id_fk",
2884
+ "tableFrom": "skill_connectors",
2885
+ "tableTo": "agent_skills",
2886
+ "columnsFrom": ["skill_id"],
2887
+ "columnsTo": ["id"],
2888
+ "onDelete": "cascade",
2889
+ "onUpdate": "no action"
2890
+ },
2891
+ "skill_connectors_connector_id_connectors_id_fk": {
2892
+ "name": "skill_connectors_connector_id_connectors_id_fk",
2893
+ "tableFrom": "skill_connectors",
2894
+ "tableTo": "connectors",
2895
+ "columnsFrom": ["connector_id"],
2896
+ "columnsTo": ["id"],
2897
+ "onDelete": "cascade",
2898
+ "onUpdate": "no action"
2899
+ },
2900
+ "skill_connectors_entity_id_entities_id_fk": {
2901
+ "name": "skill_connectors_entity_id_entities_id_fk",
2902
+ "tableFrom": "skill_connectors",
2903
+ "tableTo": "entities",
2904
+ "columnsFrom": ["entity_id"],
2905
+ "columnsTo": ["id"],
2906
+ "onDelete": "cascade",
2907
+ "onUpdate": "no action"
2908
+ }
2909
+ },
2910
+ "compositePrimaryKeys": {},
2911
+ "uniqueConstraints": {},
2912
+ "policies": {},
2913
+ "checkConstraints": {},
2914
+ "isRLSEnabled": false
2915
+ },
2916
+ "public.skill_versions": {
2917
+ "name": "skill_versions",
2918
+ "schema": "",
2919
+ "columns": {
2920
+ "id": {
2921
+ "name": "id",
2922
+ "type": "uuid",
2923
+ "primaryKey": true,
2924
+ "notNull": true,
2925
+ "default": "gen_random_uuid()"
2926
+ },
2927
+ "entity_id": {
2928
+ "name": "entity_id",
2929
+ "type": "uuid",
2930
+ "primaryKey": false,
2931
+ "notNull": false
2932
+ },
2933
+ "skill_id": {
2934
+ "name": "skill_id",
2935
+ "type": "uuid",
2936
+ "primaryKey": false,
2937
+ "notNull": false
2938
+ },
2939
+ "version": {
2940
+ "name": "version",
2941
+ "type": "integer",
2942
+ "primaryKey": false,
2943
+ "notNull": true
2944
+ },
2945
+ "content": {
2946
+ "name": "content",
2947
+ "type": "text",
2948
+ "primaryKey": false,
2949
+ "notNull": true
2950
+ },
2951
+ "name": {
2952
+ "name": "name",
2953
+ "type": "text",
2954
+ "primaryKey": false,
2955
+ "notNull": true
2956
+ },
2957
+ "created_at": {
2958
+ "name": "created_at",
2959
+ "type": "timestamp with time zone",
2960
+ "primaryKey": false,
2961
+ "notNull": false,
2962
+ "default": "now()"
2963
+ }
2964
+ },
2965
+ "indexes": {
2966
+ "idx_skill_versions_entity_id": {
2967
+ "name": "idx_skill_versions_entity_id",
2968
+ "columns": [
2969
+ {
2970
+ "expression": "entity_id",
2971
+ "isExpression": false,
2972
+ "asc": true,
2973
+ "nulls": "last"
2974
+ }
2975
+ ],
2976
+ "isUnique": false,
2977
+ "concurrently": false,
2978
+ "method": "btree",
2979
+ "with": {}
2980
+ },
2981
+ "idx_skill_versions_skill_id": {
2982
+ "name": "idx_skill_versions_skill_id",
2983
+ "columns": [
2984
+ {
2985
+ "expression": "skill_id",
2986
+ "isExpression": false,
2987
+ "asc": true,
2988
+ "nulls": "last"
2989
+ },
2990
+ {
2991
+ "expression": "\"version\" DESC",
2992
+ "asc": true,
2993
+ "isExpression": true,
2994
+ "nulls": "last"
2995
+ }
2996
+ ],
2997
+ "isUnique": false,
2998
+ "concurrently": false,
2999
+ "method": "btree",
3000
+ "with": {}
3001
+ }
3002
+ },
3003
+ "foreignKeys": {
3004
+ "skill_versions_entity_id_entities_id_fk": {
3005
+ "name": "skill_versions_entity_id_entities_id_fk",
3006
+ "tableFrom": "skill_versions",
3007
+ "tableTo": "entities",
3008
+ "columnsFrom": ["entity_id"],
3009
+ "columnsTo": ["id"],
3010
+ "onDelete": "cascade",
3011
+ "onUpdate": "no action"
3012
+ },
3013
+ "skill_versions_skill_id_agent_skills_id_fk": {
3014
+ "name": "skill_versions_skill_id_agent_skills_id_fk",
3015
+ "tableFrom": "skill_versions",
3016
+ "tableTo": "agent_skills",
3017
+ "columnsFrom": ["skill_id"],
3018
+ "columnsTo": ["id"],
3019
+ "onDelete": "cascade",
3020
+ "onUpdate": "no action"
3021
+ }
3022
+ },
3023
+ "compositePrimaryKeys": {},
3024
+ "uniqueConstraints": {},
3025
+ "policies": {},
3026
+ "checkConstraints": {},
3027
+ "isRLSEnabled": false
3028
+ },
3029
+ "public.agent_schedules": {
3030
+ "name": "agent_schedules",
3031
+ "schema": "",
3032
+ "columns": {
3033
+ "id": {
3034
+ "name": "id",
3035
+ "type": "uuid",
3036
+ "primaryKey": true,
3037
+ "notNull": true,
3038
+ "default": "gen_random_uuid()"
3039
+ },
3040
+ "entity_id": {
3041
+ "name": "entity_id",
3042
+ "type": "uuid",
3043
+ "primaryKey": false,
3044
+ "notNull": false
3045
+ },
3046
+ "agent_id": {
3047
+ "name": "agent_id",
3048
+ "type": "uuid",
3049
+ "primaryKey": false,
3050
+ "notNull": true
3051
+ },
3052
+ "type": {
3053
+ "name": "type",
3054
+ "type": "text",
3055
+ "primaryKey": false,
3056
+ "notNull": true,
3057
+ "default": "'cron'"
3058
+ },
3059
+ "name": {
3060
+ "name": "name",
3061
+ "type": "text",
3062
+ "primaryKey": false,
3063
+ "notNull": true
3064
+ },
3065
+ "cron_expr": {
3066
+ "name": "cron_expr",
3067
+ "type": "text",
3068
+ "primaryKey": false,
3069
+ "notNull": true
3070
+ },
3071
+ "task": {
3072
+ "name": "task",
3073
+ "type": "text",
3074
+ "primaryKey": false,
3075
+ "notNull": false
3076
+ },
3077
+ "objectives": {
3078
+ "name": "objectives",
3079
+ "type": "text",
3080
+ "primaryKey": false,
3081
+ "notNull": false
3082
+ },
3083
+ "active": {
3084
+ "name": "active",
3085
+ "type": "boolean",
3086
+ "primaryKey": false,
3087
+ "notNull": false,
3088
+ "default": true
3089
+ },
3090
+ "last_run": {
3091
+ "name": "last_run",
3092
+ "type": "timestamp with time zone",
3093
+ "primaryKey": false,
3094
+ "notNull": false
3095
+ },
3096
+ "next_run": {
3097
+ "name": "next_run",
3098
+ "type": "timestamp with time zone",
3099
+ "primaryKey": false,
3100
+ "notNull": false
3101
+ },
3102
+ "last_status": {
3103
+ "name": "last_status",
3104
+ "type": "text",
3105
+ "primaryKey": false,
3106
+ "notNull": false
3107
+ },
3108
+ "chat_id": {
3109
+ "name": "chat_id",
3110
+ "type": "text",
3111
+ "primaryKey": false,
3112
+ "notNull": false
3113
+ },
3114
+ "created_at": {
3115
+ "name": "created_at",
3116
+ "type": "timestamp with time zone",
3117
+ "primaryKey": false,
3118
+ "notNull": false,
3119
+ "default": "now()"
3120
+ },
3121
+ "updated_at": {
3122
+ "name": "updated_at",
3123
+ "type": "timestamp with time zone",
3124
+ "primaryKey": false,
3125
+ "notNull": false,
3126
+ "default": "now()"
3127
+ }
3128
+ },
3129
+ "indexes": {
3130
+ "idx_agent_schedules_entity_id": {
3131
+ "name": "idx_agent_schedules_entity_id",
3132
+ "columns": [
3133
+ {
3134
+ "expression": "entity_id",
3135
+ "isExpression": false,
3136
+ "asc": true,
3137
+ "nulls": "last"
3138
+ }
3139
+ ],
3140
+ "isUnique": false,
3141
+ "concurrently": false,
3142
+ "method": "btree",
3143
+ "with": {}
3144
+ },
3145
+ "idx_schedules_active": {
3146
+ "name": "idx_schedules_active",
3147
+ "columns": [
3148
+ {
3149
+ "expression": "active",
3150
+ "isExpression": false,
3151
+ "asc": true,
3152
+ "nulls": "last"
3153
+ },
3154
+ {
3155
+ "expression": "next_run",
3156
+ "isExpression": false,
3157
+ "asc": true,
3158
+ "nulls": "last"
3159
+ }
3160
+ ],
3161
+ "isUnique": false,
3162
+ "concurrently": false,
3163
+ "method": "btree",
3164
+ "with": {}
3165
+ }
3166
+ },
3167
+ "foreignKeys": {
3168
+ "agent_schedules_entity_id_entities_id_fk": {
3169
+ "name": "agent_schedules_entity_id_entities_id_fk",
3170
+ "tableFrom": "agent_schedules",
3171
+ "tableTo": "entities",
3172
+ "columnsFrom": ["entity_id"],
3173
+ "columnsTo": ["id"],
3174
+ "onDelete": "cascade",
3175
+ "onUpdate": "no action"
3176
+ },
3177
+ "agent_schedules_agent_id_agents_id_fk": {
3178
+ "name": "agent_schedules_agent_id_agents_id_fk",
3179
+ "tableFrom": "agent_schedules",
3180
+ "tableTo": "agents",
3181
+ "columnsFrom": ["agent_id"],
3182
+ "columnsTo": ["id"],
3183
+ "onDelete": "cascade",
3184
+ "onUpdate": "no action"
3185
+ }
3186
+ },
3187
+ "compositePrimaryKeys": {},
3188
+ "uniqueConstraints": {},
3189
+ "policies": {},
3190
+ "checkConstraints": {
3191
+ "agent_schedules_type_check": {
3192
+ "name": "agent_schedules_type_check",
3193
+ "value": "\"agent_schedules\".\"type\" IN ('cron','heartbeat')"
3194
+ },
3195
+ "agent_schedules_last_status_check": {
3196
+ "name": "agent_schedules_last_status_check",
3197
+ "value": "\"agent_schedules\".\"last_status\" IN ('success','failed','no_action') OR \"agent_schedules\".\"last_status\" IS NULL"
3198
+ }
3199
+ },
3200
+ "isRLSEnabled": false
3201
+ },
3202
+ "public.entity_llm_keys": {
3203
+ "name": "entity_llm_keys",
3204
+ "schema": "",
3205
+ "columns": {
3206
+ "id": {
3207
+ "name": "id",
3208
+ "type": "uuid",
3209
+ "primaryKey": true,
3210
+ "notNull": true,
3211
+ "default": "gen_random_uuid()"
3212
+ },
3213
+ "entity_id": {
3214
+ "name": "entity_id",
3215
+ "type": "uuid",
3216
+ "primaryKey": false,
3217
+ "notNull": true
3218
+ },
3219
+ "provider": {
3220
+ "name": "provider",
3221
+ "type": "text",
3222
+ "primaryKey": false,
3223
+ "notNull": true
3224
+ },
3225
+ "api_key": {
3226
+ "name": "api_key",
3227
+ "type": "text",
3228
+ "primaryKey": false,
3229
+ "notNull": true,
3230
+ "default": "''"
3231
+ },
3232
+ "api_key_last4": {
3233
+ "name": "api_key_last4",
3234
+ "type": "text",
3235
+ "primaryKey": false,
3236
+ "notNull": true,
3237
+ "default": "''"
3238
+ },
3239
+ "base_url": {
3240
+ "name": "base_url",
3241
+ "type": "text",
3242
+ "primaryKey": false,
3243
+ "notNull": false
3244
+ },
3245
+ "nickname": {
3246
+ "name": "nickname",
3247
+ "type": "text",
3248
+ "primaryKey": false,
3249
+ "notNull": false
3250
+ },
3251
+ "default_model": {
3252
+ "name": "default_model",
3253
+ "type": "text",
3254
+ "primaryKey": false,
3255
+ "notNull": false
3256
+ },
3257
+ "is_active": {
3258
+ "name": "is_active",
3259
+ "type": "boolean",
3260
+ "primaryKey": false,
3261
+ "notNull": true,
3262
+ "default": true
3263
+ },
3264
+ "created_at": {
3265
+ "name": "created_at",
3266
+ "type": "timestamp with time zone",
3267
+ "primaryKey": false,
3268
+ "notNull": true,
3269
+ "default": "now()"
3270
+ },
3271
+ "updated_at": {
3272
+ "name": "updated_at",
3273
+ "type": "timestamp with time zone",
3274
+ "primaryKey": false,
3275
+ "notNull": true,
3276
+ "default": "now()"
3277
+ }
3278
+ },
3279
+ "indexes": {
3280
+ "idx_entity_llm_keys_entity_id": {
3281
+ "name": "idx_entity_llm_keys_entity_id",
3282
+ "columns": [
3283
+ {
3284
+ "expression": "entity_id",
3285
+ "isExpression": false,
3286
+ "asc": true,
3287
+ "nulls": "last"
3288
+ }
3289
+ ],
3290
+ "isUnique": false,
3291
+ "concurrently": false,
3292
+ "method": "btree",
3293
+ "with": {}
3294
+ }
3295
+ },
3296
+ "foreignKeys": {
3297
+ "entity_llm_keys_entity_id_entities_id_fk": {
3298
+ "name": "entity_llm_keys_entity_id_entities_id_fk",
3299
+ "tableFrom": "entity_llm_keys",
3300
+ "tableTo": "entities",
3301
+ "columnsFrom": ["entity_id"],
3302
+ "columnsTo": ["id"],
3303
+ "onDelete": "cascade",
3304
+ "onUpdate": "no action"
3305
+ }
3306
+ },
3307
+ "compositePrimaryKeys": {},
3308
+ "uniqueConstraints": {},
3309
+ "policies": {},
3310
+ "checkConstraints": {},
3311
+ "isRLSEnabled": false
3312
+ },
3313
+ "public.agent_runs": {
3314
+ "name": "agent_runs",
3315
+ "schema": "",
3316
+ "columns": {
3317
+ "id": {
3318
+ "name": "id",
3319
+ "type": "uuid",
3320
+ "primaryKey": true,
3321
+ "notNull": true,
3322
+ "default": "gen_random_uuid()"
3323
+ },
3324
+ "entity_id": {
3325
+ "name": "entity_id",
3326
+ "type": "uuid",
3327
+ "primaryKey": false,
3328
+ "notNull": false
3329
+ },
3330
+ "agent_id": {
3331
+ "name": "agent_id",
3332
+ "type": "uuid",
3333
+ "primaryKey": false,
3334
+ "notNull": false
3335
+ },
3336
+ "task": {
3337
+ "name": "task",
3338
+ "type": "text",
3339
+ "primaryKey": false,
3340
+ "notNull": true
3341
+ },
3342
+ "result": {
3343
+ "name": "result",
3344
+ "type": "text",
3345
+ "primaryKey": false,
3346
+ "notNull": false
3347
+ },
3348
+ "success": {
3349
+ "name": "success",
3350
+ "type": "boolean",
3351
+ "primaryKey": false,
3352
+ "notNull": false,
3353
+ "default": true
3354
+ },
3355
+ "tools_used": {
3356
+ "name": "tools_used",
3357
+ "type": "text[]",
3358
+ "primaryKey": false,
3359
+ "notNull": false,
3360
+ "default": "'{}'::text[]"
3361
+ },
3362
+ "tokens_used": {
3363
+ "name": "tokens_used",
3364
+ "type": "integer",
3365
+ "primaryKey": false,
3366
+ "notNull": false
3367
+ },
3368
+ "input_tokens": {
3369
+ "name": "input_tokens",
3370
+ "type": "integer",
3371
+ "primaryKey": false,
3372
+ "notNull": false
3373
+ },
3374
+ "output_tokens": {
3375
+ "name": "output_tokens",
3376
+ "type": "integer",
3377
+ "primaryKey": false,
3378
+ "notNull": false
3379
+ },
3380
+ "duration_ms": {
3381
+ "name": "duration_ms",
3382
+ "type": "integer",
3383
+ "primaryKey": false,
3384
+ "notNull": false
3385
+ },
3386
+ "key_source": {
3387
+ "name": "key_source",
3388
+ "type": "text",
3389
+ "primaryKey": false,
3390
+ "notNull": false
3391
+ },
3392
+ "created_at": {
3393
+ "name": "created_at",
3394
+ "type": "timestamp with time zone",
3395
+ "primaryKey": false,
3396
+ "notNull": false,
3397
+ "default": "now()"
3398
+ }
3399
+ },
3400
+ "indexes": {
3401
+ "idx_agent_runs_entity_id": {
3402
+ "name": "idx_agent_runs_entity_id",
3403
+ "columns": [
3404
+ {
3405
+ "expression": "entity_id",
3406
+ "isExpression": false,
3407
+ "asc": true,
3408
+ "nulls": "last"
3409
+ }
3410
+ ],
3411
+ "isUnique": false,
3412
+ "concurrently": false,
3413
+ "method": "btree",
3414
+ "with": {}
3415
+ },
3416
+ "idx_agent_runs_agent_created": {
3417
+ "name": "idx_agent_runs_agent_created",
3418
+ "columns": [
3419
+ {
3420
+ "expression": "agent_id",
3421
+ "isExpression": false,
3422
+ "asc": true,
3423
+ "nulls": "last"
3424
+ },
3425
+ {
3426
+ "expression": "\"created_at\" DESC",
3427
+ "asc": true,
3428
+ "isExpression": true,
3429
+ "nulls": "last"
3430
+ }
3431
+ ],
3432
+ "isUnique": false,
3433
+ "concurrently": false,
3434
+ "method": "btree",
3435
+ "with": {}
3436
+ },
3437
+ "idx_runs_agent": {
3438
+ "name": "idx_runs_agent",
3439
+ "columns": [
3440
+ {
3441
+ "expression": "agent_id",
3442
+ "isExpression": false,
3443
+ "asc": true,
3444
+ "nulls": "last"
3445
+ },
3446
+ {
3447
+ "expression": "\"created_at\" DESC",
3448
+ "asc": true,
3449
+ "isExpression": true,
3450
+ "nulls": "last"
3451
+ }
3452
+ ],
3453
+ "isUnique": false,
3454
+ "concurrently": false,
3455
+ "method": "btree",
3456
+ "with": {}
3457
+ },
3458
+ "idx_runs_recent": {
3459
+ "name": "idx_runs_recent",
3460
+ "columns": [
3461
+ {
3462
+ "expression": "\"created_at\" DESC",
3463
+ "asc": true,
3464
+ "isExpression": true,
3465
+ "nulls": "last"
3466
+ }
3467
+ ],
3468
+ "isUnique": false,
3469
+ "concurrently": false,
3470
+ "method": "btree",
3471
+ "with": {}
3472
+ }
3473
+ },
3474
+ "foreignKeys": {
3475
+ "agent_runs_entity_id_entities_id_fk": {
3476
+ "name": "agent_runs_entity_id_entities_id_fk",
3477
+ "tableFrom": "agent_runs",
3478
+ "tableTo": "entities",
3479
+ "columnsFrom": ["entity_id"],
3480
+ "columnsTo": ["id"],
3481
+ "onDelete": "cascade",
3482
+ "onUpdate": "no action"
3483
+ },
3484
+ "agent_runs_agent_id_agents_id_fk": {
3485
+ "name": "agent_runs_agent_id_agents_id_fk",
3486
+ "tableFrom": "agent_runs",
3487
+ "tableTo": "agents",
3488
+ "columnsFrom": ["agent_id"],
3489
+ "columnsTo": ["id"],
3490
+ "onDelete": "no action",
3491
+ "onUpdate": "no action"
3492
+ }
3493
+ },
3494
+ "compositePrimaryKeys": {},
3495
+ "uniqueConstraints": {},
3496
+ "policies": {},
3497
+ "checkConstraints": {
3498
+ "agent_runs_key_source_check": {
3499
+ "name": "agent_runs_key_source_check",
3500
+ "value": "\"agent_runs\".\"key_source\" IN ('entity','operator') OR \"agent_runs\".\"key_source\" IS NULL"
3501
+ }
3502
+ },
3503
+ "isRLSEnabled": false
3504
+ },
3505
+ "public.agent_mcp_servers": {
3506
+ "name": "agent_mcp_servers",
3507
+ "schema": "",
3508
+ "columns": {
3509
+ "id": {
3510
+ "name": "id",
3511
+ "type": "uuid",
3512
+ "primaryKey": true,
3513
+ "notNull": true,
3514
+ "default": "gen_random_uuid()"
3515
+ },
3516
+ "entity_id": {
3517
+ "name": "entity_id",
3518
+ "type": "uuid",
3519
+ "primaryKey": false,
3520
+ "notNull": true
3521
+ },
3522
+ "agent_id": {
3523
+ "name": "agent_id",
3524
+ "type": "uuid",
3525
+ "primaryKey": false,
3526
+ "notNull": true
3527
+ },
3528
+ "mcp_server_id": {
3529
+ "name": "mcp_server_id",
3530
+ "type": "uuid",
3531
+ "primaryKey": false,
3532
+ "notNull": true
3533
+ },
3534
+ "enabled_tools": {
3535
+ "name": "enabled_tools",
3536
+ "type": "jsonb",
3537
+ "primaryKey": false,
3538
+ "notNull": false
3539
+ },
3540
+ "created_at": {
3541
+ "name": "created_at",
3542
+ "type": "timestamp with time zone",
3543
+ "primaryKey": false,
3544
+ "notNull": true,
3545
+ "default": "now()"
3546
+ },
3547
+ "updated_at": {
3548
+ "name": "updated_at",
3549
+ "type": "timestamp with time zone",
3550
+ "primaryKey": false,
3551
+ "notNull": true,
3552
+ "default": "now()"
3553
+ }
3554
+ },
3555
+ "indexes": {
3556
+ "idx_agent_mcp_servers_agent": {
3557
+ "name": "idx_agent_mcp_servers_agent",
3558
+ "columns": [
3559
+ {
3560
+ "expression": "agent_id",
3561
+ "isExpression": false,
3562
+ "asc": true,
3563
+ "nulls": "last"
3564
+ }
3565
+ ],
3566
+ "isUnique": false,
3567
+ "concurrently": false,
3568
+ "method": "btree",
3569
+ "with": {}
3570
+ },
3571
+ "idx_agent_mcp_servers_entity": {
3572
+ "name": "idx_agent_mcp_servers_entity",
3573
+ "columns": [
3574
+ {
3575
+ "expression": "entity_id",
3576
+ "isExpression": false,
3577
+ "asc": true,
3578
+ "nulls": "last"
3579
+ }
3580
+ ],
3581
+ "isUnique": false,
3582
+ "concurrently": false,
3583
+ "method": "btree",
3584
+ "with": {}
3585
+ }
3586
+ },
3587
+ "foreignKeys": {
3588
+ "agent_mcp_servers_entity_id_entities_id_fk": {
3589
+ "name": "agent_mcp_servers_entity_id_entities_id_fk",
3590
+ "tableFrom": "agent_mcp_servers",
3591
+ "tableTo": "entities",
3592
+ "columnsFrom": ["entity_id"],
3593
+ "columnsTo": ["id"],
3594
+ "onDelete": "cascade",
3595
+ "onUpdate": "no action"
3596
+ },
3597
+ "agent_mcp_servers_agent_id_agents_id_fk": {
3598
+ "name": "agent_mcp_servers_agent_id_agents_id_fk",
3599
+ "tableFrom": "agent_mcp_servers",
3600
+ "tableTo": "agents",
3601
+ "columnsFrom": ["agent_id"],
3602
+ "columnsTo": ["id"],
3603
+ "onDelete": "cascade",
3604
+ "onUpdate": "no action"
3605
+ },
3606
+ "agent_mcp_servers_mcp_server_id_mcp_servers_id_fk": {
3607
+ "name": "agent_mcp_servers_mcp_server_id_mcp_servers_id_fk",
3608
+ "tableFrom": "agent_mcp_servers",
3609
+ "tableTo": "mcp_servers",
3610
+ "columnsFrom": ["mcp_server_id"],
3611
+ "columnsTo": ["id"],
3612
+ "onDelete": "cascade",
3613
+ "onUpdate": "no action"
3614
+ }
3615
+ },
3616
+ "compositePrimaryKeys": {},
3617
+ "uniqueConstraints": {},
3618
+ "policies": {},
3619
+ "checkConstraints": {},
3620
+ "isRLSEnabled": false
3621
+ },
3622
+ "public.mcp_connections": {
3623
+ "name": "mcp_connections",
3624
+ "schema": "",
3625
+ "columns": {
3626
+ "id": {
3627
+ "name": "id",
3628
+ "type": "uuid",
3629
+ "primaryKey": true,
3630
+ "notNull": true,
3631
+ "default": "gen_random_uuid()"
3632
+ },
3633
+ "entity_id": {
3634
+ "name": "entity_id",
3635
+ "type": "uuid",
3636
+ "primaryKey": false,
3637
+ "notNull": true
3638
+ },
3639
+ "slug": {
3640
+ "name": "slug",
3641
+ "type": "text",
3642
+ "primaryKey": false,
3643
+ "notNull": true
3644
+ },
3645
+ "active": {
3646
+ "name": "active",
3647
+ "type": "boolean",
3648
+ "primaryKey": false,
3649
+ "notNull": true,
3650
+ "default": true
3651
+ },
3652
+ "tool_config": {
3653
+ "name": "tool_config",
3654
+ "type": "jsonb",
3655
+ "primaryKey": false,
3656
+ "notNull": true,
3657
+ "default": "'{}'::jsonb"
3658
+ },
3659
+ "created_at": {
3660
+ "name": "created_at",
3661
+ "type": "timestamp with time zone",
3662
+ "primaryKey": false,
3663
+ "notNull": true,
3664
+ "default": "now()"
3665
+ },
3666
+ "updated_at": {
3667
+ "name": "updated_at",
3668
+ "type": "timestamp with time zone",
3669
+ "primaryKey": false,
3670
+ "notNull": true,
3671
+ "default": "now()"
3672
+ }
3673
+ },
3674
+ "indexes": {
3675
+ "idx_mcp_connections_entity": {
3676
+ "name": "idx_mcp_connections_entity",
3677
+ "columns": [
3678
+ {
3679
+ "expression": "entity_id",
3680
+ "isExpression": false,
3681
+ "asc": true,
3682
+ "nulls": "last"
3683
+ }
3684
+ ],
3685
+ "isUnique": false,
3686
+ "concurrently": false,
3687
+ "method": "btree",
3688
+ "with": {}
3689
+ }
3690
+ },
3691
+ "foreignKeys": {
3692
+ "mcp_connections_entity_id_entities_id_fk": {
3693
+ "name": "mcp_connections_entity_id_entities_id_fk",
3694
+ "tableFrom": "mcp_connections",
3695
+ "tableTo": "entities",
3696
+ "columnsFrom": ["entity_id"],
3697
+ "columnsTo": ["id"],
3698
+ "onDelete": "cascade",
3699
+ "onUpdate": "no action"
3700
+ }
3701
+ },
3702
+ "compositePrimaryKeys": {},
3703
+ "uniqueConstraints": {},
3704
+ "policies": {},
3705
+ "checkConstraints": {},
3706
+ "isRLSEnabled": false
3707
+ },
3708
+ "public.mcp_servers": {
3709
+ "name": "mcp_servers",
3710
+ "schema": "",
3711
+ "columns": {
3712
+ "id": {
3713
+ "name": "id",
3714
+ "type": "uuid",
3715
+ "primaryKey": true,
3716
+ "notNull": true,
3717
+ "default": "gen_random_uuid()"
3718
+ },
3719
+ "entity_id": {
3720
+ "name": "entity_id",
3721
+ "type": "uuid",
3722
+ "primaryKey": false,
3723
+ "notNull": false
3724
+ },
3725
+ "name": {
3726
+ "name": "name",
3727
+ "type": "text",
3728
+ "primaryKey": false,
3729
+ "notNull": true
3730
+ },
3731
+ "slug": {
3732
+ "name": "slug",
3733
+ "type": "text",
3734
+ "primaryKey": false,
3735
+ "notNull": true
3736
+ },
3737
+ "transport": {
3738
+ "name": "transport",
3739
+ "type": "text",
3740
+ "primaryKey": false,
3741
+ "notNull": true
3742
+ },
3743
+ "url": {
3744
+ "name": "url",
3745
+ "type": "text",
3746
+ "primaryKey": false,
3747
+ "notNull": false
3748
+ },
3749
+ "command": {
3750
+ "name": "command",
3751
+ "type": "text",
3752
+ "primaryKey": false,
3753
+ "notNull": false
3754
+ },
3755
+ "args": {
3756
+ "name": "args",
3757
+ "type": "text[]",
3758
+ "primaryKey": false,
3759
+ "notNull": false,
3760
+ "default": "'{}'::text[]"
3761
+ },
3762
+ "env_vars": {
3763
+ "name": "env_vars",
3764
+ "type": "jsonb",
3765
+ "primaryKey": false,
3766
+ "notNull": false,
3767
+ "default": "'{}'::jsonb"
3768
+ },
3769
+ "active": {
3770
+ "name": "active",
3771
+ "type": "boolean",
3772
+ "primaryKey": false,
3773
+ "notNull": false,
3774
+ "default": true
3775
+ },
3776
+ "available_tools": {
3777
+ "name": "available_tools",
3778
+ "type": "jsonb",
3779
+ "primaryKey": false,
3780
+ "notNull": false
3781
+ },
3782
+ "created_at": {
3783
+ "name": "created_at",
3784
+ "type": "timestamp with time zone",
3785
+ "primaryKey": false,
3786
+ "notNull": false,
3787
+ "default": "now()"
3788
+ },
3789
+ "updated_at": {
3790
+ "name": "updated_at",
3791
+ "type": "timestamp with time zone",
3792
+ "primaryKey": false,
3793
+ "notNull": false,
3794
+ "default": "now()"
3795
+ }
3796
+ },
3797
+ "indexes": {},
3798
+ "foreignKeys": {
3799
+ "mcp_servers_entity_id_entities_id_fk": {
3800
+ "name": "mcp_servers_entity_id_entities_id_fk",
3801
+ "tableFrom": "mcp_servers",
3802
+ "tableTo": "entities",
3803
+ "columnsFrom": ["entity_id"],
3804
+ "columnsTo": ["id"],
3805
+ "onDelete": "cascade",
3806
+ "onUpdate": "no action"
3807
+ }
3808
+ },
3809
+ "compositePrimaryKeys": {},
3810
+ "uniqueConstraints": {},
3811
+ "policies": {},
3812
+ "checkConstraints": {
3813
+ "mcp_servers_transport_check": {
3814
+ "name": "mcp_servers_transport_check",
3815
+ "value": "\"mcp_servers\".\"transport\" IN ('http','stdio')"
3816
+ }
3817
+ },
3818
+ "isRLSEnabled": false
3819
+ },
3820
+ "public.agent_plugins": {
3821
+ "name": "agent_plugins",
3822
+ "schema": "",
3823
+ "columns": {
3824
+ "id": {
3825
+ "name": "id",
3826
+ "type": "uuid",
3827
+ "primaryKey": true,
3828
+ "notNull": true,
3829
+ "default": "gen_random_uuid()"
3830
+ },
3831
+ "entity_id": {
3832
+ "name": "entity_id",
3833
+ "type": "uuid",
3834
+ "primaryKey": false,
3835
+ "notNull": false
3836
+ },
3837
+ "name": {
3838
+ "name": "name",
3839
+ "type": "text",
3840
+ "primaryKey": false,
3841
+ "notNull": true
3842
+ },
3843
+ "slug": {
3844
+ "name": "slug",
3845
+ "type": "text",
3846
+ "primaryKey": false,
3847
+ "notNull": true
3848
+ },
3849
+ "description": {
3850
+ "name": "description",
3851
+ "type": "text",
3852
+ "primaryKey": false,
3853
+ "notNull": false
3854
+ },
3855
+ "plugin_type": {
3856
+ "name": "plugin_type",
3857
+ "type": "text",
3858
+ "primaryKey": false,
3859
+ "notNull": true
3860
+ },
3861
+ "config": {
3862
+ "name": "config",
3863
+ "type": "jsonb",
3864
+ "primaryKey": false,
3865
+ "notNull": false,
3866
+ "default": "'{}'::jsonb"
3867
+ },
3868
+ "active": {
3869
+ "name": "active",
3870
+ "type": "boolean",
3871
+ "primaryKey": false,
3872
+ "notNull": false,
3873
+ "default": true
3874
+ },
3875
+ "hook": {
3876
+ "name": "hook",
3877
+ "type": "text",
3878
+ "primaryKey": false,
3879
+ "notNull": true
3880
+ },
3881
+ "webhook_url": {
3882
+ "name": "webhook_url",
3883
+ "type": "text",
3884
+ "primaryKey": false,
3885
+ "notNull": false
3886
+ },
3887
+ "created_at": {
3888
+ "name": "created_at",
3889
+ "type": "timestamp with time zone",
3890
+ "primaryKey": false,
3891
+ "notNull": false,
3892
+ "default": "now()"
3893
+ },
3894
+ "updated_at": {
3895
+ "name": "updated_at",
3896
+ "type": "timestamp with time zone",
3897
+ "primaryKey": false,
3898
+ "notNull": false,
3899
+ "default": "now()"
3900
+ }
3901
+ },
3902
+ "indexes": {},
3903
+ "foreignKeys": {
3904
+ "agent_plugins_entity_id_entities_id_fk": {
3905
+ "name": "agent_plugins_entity_id_entities_id_fk",
3906
+ "tableFrom": "agent_plugins",
3907
+ "tableTo": "entities",
3908
+ "columnsFrom": ["entity_id"],
3909
+ "columnsTo": ["id"],
3910
+ "onDelete": "cascade",
3911
+ "onUpdate": "no action"
3912
+ }
3913
+ },
3914
+ "compositePrimaryKeys": {},
3915
+ "uniqueConstraints": {},
3916
+ "policies": {},
3917
+ "checkConstraints": {
3918
+ "agent_plugins_plugin_type_check": {
3919
+ "name": "agent_plugins_plugin_type_check",
3920
+ "value": "\"agent_plugins\".\"plugin_type\" IN ('webhook','transform','schedule')"
3921
+ },
3922
+ "agent_plugins_hook_check": {
3923
+ "name": "agent_plugins_hook_check",
3924
+ "value": "\"agent_plugins\".\"hook\" IN ('pre_task','post_task','pre_tool','post_tool','on_memory_save')"
3925
+ }
3926
+ },
3927
+ "isRLSEnabled": false
3928
+ },
3929
+ "public.configurator_sessions": {
3930
+ "name": "configurator_sessions",
3931
+ "schema": "",
3932
+ "columns": {
3933
+ "id": {
3934
+ "name": "id",
3935
+ "type": "uuid",
3936
+ "primaryKey": true,
3937
+ "notNull": true,
3938
+ "default": "gen_random_uuid()"
3939
+ },
3940
+ "entity_id": {
3941
+ "name": "entity_id",
3942
+ "type": "uuid",
3943
+ "primaryKey": false,
3944
+ "notNull": true
3945
+ },
3946
+ "agent_id": {
3947
+ "name": "agent_id",
3948
+ "type": "uuid",
3949
+ "primaryKey": false,
3950
+ "notNull": false
3951
+ },
3952
+ "messages": {
3953
+ "name": "messages",
3954
+ "type": "jsonb",
3955
+ "primaryKey": false,
3956
+ "notNull": true,
3957
+ "default": "'[]'::jsonb"
3958
+ },
3959
+ "status": {
3960
+ "name": "status",
3961
+ "type": "text",
3962
+ "primaryKey": false,
3963
+ "notNull": true,
3964
+ "default": "'active'"
3965
+ },
3966
+ "turn_count": {
3967
+ "name": "turn_count",
3968
+ "type": "integer",
3969
+ "primaryKey": false,
3970
+ "notNull": true,
3971
+ "default": 0
3972
+ },
3973
+ "created_at": {
3974
+ "name": "created_at",
3975
+ "type": "timestamp with time zone",
3976
+ "primaryKey": false,
3977
+ "notNull": true,
3978
+ "default": "now()"
3979
+ },
3980
+ "updated_at": {
3981
+ "name": "updated_at",
3982
+ "type": "timestamp with time zone",
3983
+ "primaryKey": false,
3984
+ "notNull": true,
3985
+ "default": "now()"
3986
+ }
3987
+ },
3988
+ "indexes": {
3989
+ "idx_configurator_sessions_entity": {
3990
+ "name": "idx_configurator_sessions_entity",
3991
+ "columns": [
3992
+ {
3993
+ "expression": "entity_id",
3994
+ "isExpression": false,
3995
+ "asc": true,
3996
+ "nulls": "last"
3997
+ }
3998
+ ],
3999
+ "isUnique": false,
4000
+ "concurrently": false,
4001
+ "method": "btree",
4002
+ "with": {}
4003
+ },
4004
+ "idx_configurator_sessions_agent": {
4005
+ "name": "idx_configurator_sessions_agent",
4006
+ "columns": [
4007
+ {
4008
+ "expression": "agent_id",
4009
+ "isExpression": false,
4010
+ "asc": true,
4011
+ "nulls": "last"
4012
+ }
4013
+ ],
4014
+ "isUnique": false,
4015
+ "concurrently": false,
4016
+ "method": "btree",
4017
+ "with": {}
4018
+ }
4019
+ },
4020
+ "foreignKeys": {
4021
+ "configurator_sessions_entity_id_entities_id_fk": {
4022
+ "name": "configurator_sessions_entity_id_entities_id_fk",
4023
+ "tableFrom": "configurator_sessions",
4024
+ "tableTo": "entities",
4025
+ "columnsFrom": ["entity_id"],
4026
+ "columnsTo": ["id"],
4027
+ "onDelete": "cascade",
4028
+ "onUpdate": "no action"
4029
+ },
4030
+ "configurator_sessions_agent_id_agents_id_fk": {
4031
+ "name": "configurator_sessions_agent_id_agents_id_fk",
4032
+ "tableFrom": "configurator_sessions",
4033
+ "tableTo": "agents",
4034
+ "columnsFrom": ["agent_id"],
4035
+ "columnsTo": ["id"],
4036
+ "onDelete": "cascade",
4037
+ "onUpdate": "no action"
4038
+ }
4039
+ },
4040
+ "compositePrimaryKeys": {},
4041
+ "uniqueConstraints": {},
4042
+ "policies": {},
4043
+ "checkConstraints": {},
4044
+ "isRLSEnabled": false
4045
+ },
4046
+ "public.rate_limits": {
4047
+ "name": "rate_limits",
4048
+ "schema": "",
4049
+ "columns": {
4050
+ "key": {
4051
+ "name": "key",
4052
+ "type": "text",
4053
+ "primaryKey": true,
4054
+ "notNull": true
4055
+ },
4056
+ "count": {
4057
+ "name": "count",
4058
+ "type": "integer",
4059
+ "primaryKey": false,
4060
+ "notNull": false,
4061
+ "default": 1
4062
+ },
4063
+ "window_start": {
4064
+ "name": "window_start",
4065
+ "type": "timestamp with time zone",
4066
+ "primaryKey": false,
4067
+ "notNull": false,
4068
+ "default": "now()"
4069
+ }
4070
+ },
4071
+ "indexes": {},
4072
+ "foreignKeys": {},
4073
+ "compositePrimaryKeys": {},
4074
+ "uniqueConstraints": {},
4075
+ "policies": {},
4076
+ "checkConstraints": {},
4077
+ "isRLSEnabled": false
4078
+ },
4079
+ "public.accounts": {
4080
+ "name": "accounts",
4081
+ "schema": "",
4082
+ "columns": {
4083
+ "id": {
4084
+ "name": "id",
4085
+ "type": "text",
4086
+ "primaryKey": true,
4087
+ "notNull": true
4088
+ },
4089
+ "user_id": {
4090
+ "name": "user_id",
4091
+ "type": "uuid",
4092
+ "primaryKey": false,
4093
+ "notNull": true
4094
+ },
4095
+ "provider_id": {
4096
+ "name": "provider_id",
4097
+ "type": "text",
4098
+ "primaryKey": false,
4099
+ "notNull": true
4100
+ },
4101
+ "account_id": {
4102
+ "name": "account_id",
4103
+ "type": "text",
4104
+ "primaryKey": false,
4105
+ "notNull": true
4106
+ },
4107
+ "access_token": {
4108
+ "name": "access_token",
4109
+ "type": "text",
4110
+ "primaryKey": false,
4111
+ "notNull": false
4112
+ },
4113
+ "refresh_token": {
4114
+ "name": "refresh_token",
4115
+ "type": "text",
4116
+ "primaryKey": false,
4117
+ "notNull": false
4118
+ },
4119
+ "id_token": {
4120
+ "name": "id_token",
4121
+ "type": "text",
4122
+ "primaryKey": false,
4123
+ "notNull": false
4124
+ },
4125
+ "access_token_expires_at": {
4126
+ "name": "access_token_expires_at",
4127
+ "type": "timestamp with time zone",
4128
+ "primaryKey": false,
4129
+ "notNull": false
4130
+ },
4131
+ "refresh_token_expires_at": {
4132
+ "name": "refresh_token_expires_at",
4133
+ "type": "timestamp with time zone",
4134
+ "primaryKey": false,
4135
+ "notNull": false
4136
+ },
4137
+ "scope": {
4138
+ "name": "scope",
4139
+ "type": "text",
4140
+ "primaryKey": false,
4141
+ "notNull": false
4142
+ },
4143
+ "password": {
4144
+ "name": "password",
4145
+ "type": "text",
4146
+ "primaryKey": false,
4147
+ "notNull": false
4148
+ },
4149
+ "created_at": {
4150
+ "name": "created_at",
4151
+ "type": "timestamp with time zone",
4152
+ "primaryKey": false,
4153
+ "notNull": true,
4154
+ "default": "now()"
4155
+ },
4156
+ "updated_at": {
4157
+ "name": "updated_at",
4158
+ "type": "timestamp with time zone",
4159
+ "primaryKey": false,
4160
+ "notNull": true,
4161
+ "default": "now()"
4162
+ }
4163
+ },
4164
+ "indexes": {},
4165
+ "foreignKeys": {
4166
+ "accounts_user_id_users_id_fk": {
4167
+ "name": "accounts_user_id_users_id_fk",
4168
+ "tableFrom": "accounts",
4169
+ "tableTo": "users",
4170
+ "columnsFrom": ["user_id"],
4171
+ "columnsTo": ["id"],
4172
+ "onDelete": "cascade",
4173
+ "onUpdate": "no action"
4174
+ }
4175
+ },
4176
+ "compositePrimaryKeys": {},
4177
+ "uniqueConstraints": {},
4178
+ "policies": {},
4179
+ "checkConstraints": {},
4180
+ "isRLSEnabled": false
4181
+ },
4182
+ "public.sessions": {
4183
+ "name": "sessions",
4184
+ "schema": "",
4185
+ "columns": {
4186
+ "id": {
4187
+ "name": "id",
4188
+ "type": "text",
4189
+ "primaryKey": true,
4190
+ "notNull": true
4191
+ },
4192
+ "user_id": {
4193
+ "name": "user_id",
4194
+ "type": "uuid",
4195
+ "primaryKey": false,
4196
+ "notNull": true
4197
+ },
4198
+ "expires_at": {
4199
+ "name": "expires_at",
4200
+ "type": "timestamp with time zone",
4201
+ "primaryKey": false,
4202
+ "notNull": true
4203
+ },
4204
+ "token": {
4205
+ "name": "token",
4206
+ "type": "text",
4207
+ "primaryKey": false,
4208
+ "notNull": true
4209
+ },
4210
+ "ip_address": {
4211
+ "name": "ip_address",
4212
+ "type": "text",
4213
+ "primaryKey": false,
4214
+ "notNull": false
4215
+ },
4216
+ "user_agent": {
4217
+ "name": "user_agent",
4218
+ "type": "text",
4219
+ "primaryKey": false,
4220
+ "notNull": false
4221
+ },
4222
+ "created_at": {
4223
+ "name": "created_at",
4224
+ "type": "timestamp with time zone",
4225
+ "primaryKey": false,
4226
+ "notNull": true,
4227
+ "default": "now()"
4228
+ },
4229
+ "updated_at": {
4230
+ "name": "updated_at",
4231
+ "type": "timestamp with time zone",
4232
+ "primaryKey": false,
4233
+ "notNull": true,
4234
+ "default": "now()"
4235
+ }
4236
+ },
4237
+ "indexes": {},
4238
+ "foreignKeys": {
4239
+ "sessions_user_id_users_id_fk": {
4240
+ "name": "sessions_user_id_users_id_fk",
4241
+ "tableFrom": "sessions",
4242
+ "tableTo": "users",
4243
+ "columnsFrom": ["user_id"],
4244
+ "columnsTo": ["id"],
4245
+ "onDelete": "cascade",
4246
+ "onUpdate": "no action"
4247
+ }
4248
+ },
4249
+ "compositePrimaryKeys": {},
4250
+ "uniqueConstraints": {
4251
+ "sessions_token_unique": {
4252
+ "name": "sessions_token_unique",
4253
+ "nullsNotDistinct": false,
4254
+ "columns": ["token"]
4255
+ }
4256
+ },
4257
+ "policies": {},
4258
+ "checkConstraints": {},
4259
+ "isRLSEnabled": false
4260
+ },
4261
+ "public.verifications": {
4262
+ "name": "verifications",
4263
+ "schema": "",
4264
+ "columns": {
4265
+ "id": {
4266
+ "name": "id",
4267
+ "type": "text",
4268
+ "primaryKey": true,
4269
+ "notNull": true
4270
+ },
4271
+ "identifier": {
4272
+ "name": "identifier",
4273
+ "type": "text",
4274
+ "primaryKey": false,
4275
+ "notNull": true
4276
+ },
4277
+ "value": {
4278
+ "name": "value",
4279
+ "type": "text",
4280
+ "primaryKey": false,
4281
+ "notNull": true
4282
+ },
4283
+ "expires_at": {
4284
+ "name": "expires_at",
4285
+ "type": "timestamp with time zone",
4286
+ "primaryKey": false,
4287
+ "notNull": true
4288
+ },
4289
+ "created_at": {
4290
+ "name": "created_at",
4291
+ "type": "timestamp with time zone",
4292
+ "primaryKey": false,
4293
+ "notNull": true,
4294
+ "default": "now()"
4295
+ },
4296
+ "updated_at": {
4297
+ "name": "updated_at",
4298
+ "type": "timestamp with time zone",
4299
+ "primaryKey": false,
4300
+ "notNull": true,
4301
+ "default": "now()"
4302
+ }
4303
+ },
4304
+ "indexes": {},
4305
+ "foreignKeys": {},
4306
+ "compositePrimaryKeys": {},
4307
+ "uniqueConstraints": {},
4308
+ "policies": {},
4309
+ "checkConstraints": {},
4310
+ "isRLSEnabled": false
4311
+ },
4312
+ "public.agent_connector_assignments": {
4313
+ "name": "agent_connector_assignments",
4314
+ "schema": "",
4315
+ "columns": {
4316
+ "id": {
4317
+ "name": "id",
4318
+ "type": "uuid",
4319
+ "primaryKey": true,
4320
+ "notNull": true,
4321
+ "default": "gen_random_uuid()"
4322
+ },
4323
+ "agent_id": {
4324
+ "name": "agent_id",
4325
+ "type": "uuid",
4326
+ "primaryKey": false,
4327
+ "notNull": true
4328
+ },
4329
+ "connector_id": {
4330
+ "name": "connector_id",
4331
+ "type": "uuid",
4332
+ "primaryKey": false,
4333
+ "notNull": true
4334
+ },
4335
+ "entity_id": {
4336
+ "name": "entity_id",
4337
+ "type": "uuid",
4338
+ "primaryKey": false,
4339
+ "notNull": true
4340
+ },
4341
+ "enabled_operations": {
4342
+ "name": "enabled_operations",
4343
+ "type": "text[]",
4344
+ "primaryKey": false,
4345
+ "notNull": false
4346
+ },
4347
+ "created_at": {
4348
+ "name": "created_at",
4349
+ "type": "timestamp with time zone",
4350
+ "primaryKey": false,
4351
+ "notNull": false,
4352
+ "default": "now()"
4353
+ },
4354
+ "updated_at": {
4355
+ "name": "updated_at",
4356
+ "type": "timestamp with time zone",
4357
+ "primaryKey": false,
4358
+ "notNull": false,
4359
+ "default": "now()"
4360
+ }
4361
+ },
4362
+ "indexes": {
4363
+ "idx_agent_connector_assignments_agent_id": {
4364
+ "name": "idx_agent_connector_assignments_agent_id",
4365
+ "columns": [
4366
+ {
4367
+ "expression": "agent_id",
4368
+ "isExpression": false,
4369
+ "asc": true,
4370
+ "nulls": "last"
4371
+ }
4372
+ ],
4373
+ "isUnique": false,
4374
+ "concurrently": false,
4375
+ "method": "btree",
4376
+ "with": {}
4377
+ },
4378
+ "idx_agent_connector_assignments_connector_id": {
4379
+ "name": "idx_agent_connector_assignments_connector_id",
4380
+ "columns": [
4381
+ {
4382
+ "expression": "connector_id",
4383
+ "isExpression": false,
4384
+ "asc": true,
4385
+ "nulls": "last"
4386
+ }
4387
+ ],
4388
+ "isUnique": false,
4389
+ "concurrently": false,
4390
+ "method": "btree",
4391
+ "with": {}
4392
+ }
4393
+ },
4394
+ "foreignKeys": {
4395
+ "agent_connector_assignments_agent_id_agents_id_fk": {
4396
+ "name": "agent_connector_assignments_agent_id_agents_id_fk",
4397
+ "tableFrom": "agent_connector_assignments",
4398
+ "tableTo": "agents",
4399
+ "columnsFrom": ["agent_id"],
4400
+ "columnsTo": ["id"],
4401
+ "onDelete": "cascade",
4402
+ "onUpdate": "no action"
4403
+ },
4404
+ "agent_connector_assignments_connector_id_connectors_id_fk": {
4405
+ "name": "agent_connector_assignments_connector_id_connectors_id_fk",
4406
+ "tableFrom": "agent_connector_assignments",
4407
+ "tableTo": "connectors",
4408
+ "columnsFrom": ["connector_id"],
4409
+ "columnsTo": ["id"],
4410
+ "onDelete": "cascade",
4411
+ "onUpdate": "no action"
4412
+ },
4413
+ "agent_connector_assignments_entity_id_entities_id_fk": {
4414
+ "name": "agent_connector_assignments_entity_id_entities_id_fk",
4415
+ "tableFrom": "agent_connector_assignments",
4416
+ "tableTo": "entities",
4417
+ "columnsFrom": ["entity_id"],
4418
+ "columnsTo": ["id"],
4419
+ "onDelete": "cascade",
4420
+ "onUpdate": "no action"
4421
+ }
4422
+ },
4423
+ "compositePrimaryKeys": {},
4424
+ "uniqueConstraints": {
4425
+ "agent_connector_unique": {
4426
+ "name": "agent_connector_unique",
4427
+ "nullsNotDistinct": false,
4428
+ "columns": ["agent_id", "connector_id"]
4429
+ }
4430
+ },
4431
+ "policies": {},
4432
+ "checkConstraints": {},
4433
+ "isRLSEnabled": false
4434
+ }
4435
+ },
4436
+ "enums": {},
4437
+ "schemas": {},
4438
+ "sequences": {},
4439
+ "roles": {},
4440
+ "policies": {},
4441
+ "views": {},
4442
+ "_meta": {
4443
+ "columns": {},
4444
+ "schemas": {},
4445
+ "tables": {}
4446
+ }
4447
+ }