nodal-agents 0.1.5 → 0.2.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 (350) hide show
  1. package/README.md +188 -50
  2. package/cli.js +12 -5
  3. package/migrations/0018_mcp_servers_bearer_auth.sql +12 -0
  4. package/migrations/0019_agents_position.sql +16 -0
  5. package/migrations/meta/0009_snapshot.json +4454 -4712
  6. package/migrations/meta/0010_snapshot.json +4460 -4718
  7. package/migrations/meta/_journal.json +146 -132
  8. package/package.json +1 -1
  9. package/runner.js +1026 -88
  10. package/web/.next/BUILD_ID +1 -1
  11. package/web/.next/app-path-routes-manifest.json +10 -9
  12. package/web/.next/build-manifest.json +6 -6
  13. package/web/.next/prerender-manifest.json +3 -27
  14. package/web/.next/react-loadable-manifest.json +4 -4
  15. package/web/.next/routes-manifest.json +9 -3
  16. package/web/.next/server/app/(dashboard)/agents/[id]/edit/page.js +2 -2
  17. package/web/.next/server/app/(dashboard)/agents/[id]/edit/page.js.nft.json +1 -1
  18. package/web/.next/server/app/(dashboard)/agents/[id]/edit/page_client-reference-manifest.js +1 -1
  19. package/web/.next/server/app/(dashboard)/agents/[id]/telegram/page.js +2 -2
  20. package/web/.next/server/app/(dashboard)/agents/[id]/telegram/page.js.nft.json +1 -1
  21. package/web/.next/server/app/(dashboard)/agents/[id]/telegram/page_client-reference-manifest.js +1 -1
  22. package/web/.next/server/app/(dashboard)/agents/page.js +2 -2
  23. package/web/.next/server/app/(dashboard)/agents/page.js.nft.json +1 -1
  24. package/web/.next/server/app/(dashboard)/agents/page_client-reference-manifest.js +1 -1
  25. package/web/.next/server/app/(dashboard)/approvals/page.js +2 -2
  26. package/web/.next/server/app/(dashboard)/approvals/page.js.nft.json +1 -1
  27. package/web/.next/server/app/(dashboard)/approvals/page_client-reference-manifest.js +1 -1
  28. package/web/.next/server/app/(dashboard)/automations/page.js +2 -2
  29. package/web/.next/server/app/(dashboard)/automations/page.js.nft.json +1 -1
  30. package/web/.next/server/app/(dashboard)/automations/page_client-reference-manifest.js +1 -1
  31. package/web/.next/server/app/(dashboard)/billing/page.js +2 -2
  32. package/web/.next/server/app/(dashboard)/billing/page.js.nft.json +1 -1
  33. package/web/.next/server/app/(dashboard)/billing/page_client-reference-manifest.js +1 -1
  34. package/web/.next/server/app/(dashboard)/connectors/page.js +2 -2
  35. package/web/.next/server/app/(dashboard)/connectors/page.js.nft.json +1 -1
  36. package/web/.next/server/app/(dashboard)/connectors/page_client-reference-manifest.js +1 -1
  37. package/web/.next/server/app/(dashboard)/credentials/page.js +2 -2
  38. package/web/.next/server/app/(dashboard)/credentials/page.js.nft.json +1 -1
  39. package/web/.next/server/app/(dashboard)/credentials/page_client-reference-manifest.js +1 -1
  40. package/web/.next/server/app/(dashboard)/jobs/[id]/page.js +2 -2
  41. package/web/.next/server/app/(dashboard)/jobs/[id]/page.js.nft.json +1 -1
  42. package/web/.next/server/app/(dashboard)/jobs/[id]/page_client-reference-manifest.js +1 -1
  43. package/web/.next/server/app/(dashboard)/jobs/page.js +2 -2
  44. package/web/.next/server/app/(dashboard)/jobs/page.js.nft.json +1 -1
  45. package/web/.next/server/app/(dashboard)/jobs/page_client-reference-manifest.js +1 -1
  46. package/web/.next/server/app/(dashboard)/llm-providers/page.js +2 -0
  47. package/web/.next/server/app/(dashboard)/{stats → llm-providers}/page.js.nft.json +1 -1
  48. package/web/.next/server/app/(dashboard)/llm-providers/page_client-reference-manifest.js +1 -0
  49. package/web/.next/server/app/(dashboard)/logs/page.js +2 -2
  50. package/web/.next/server/app/(dashboard)/logs/page.js.nft.json +1 -1
  51. package/web/.next/server/app/(dashboard)/logs/page_client-reference-manifest.js +1 -1
  52. package/web/.next/server/app/(dashboard)/mcp/page.js +2 -2
  53. package/web/.next/server/app/(dashboard)/mcp/page.js.nft.json +1 -1
  54. package/web/.next/server/app/(dashboard)/mcp/page_client-reference-manifest.js +1 -1
  55. package/web/.next/server/app/(dashboard)/memories/page.js +2 -2
  56. package/web/.next/server/app/(dashboard)/memories/page.js.nft.json +1 -1
  57. package/web/.next/server/app/(dashboard)/memories/page_client-reference-manifest.js +1 -1
  58. package/web/.next/server/app/(dashboard)/page.js +4 -0
  59. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -0
  60. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -0
  61. package/web/.next/server/app/(dashboard)/settings/page.js +2 -2
  62. package/web/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -1
  63. package/web/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
  64. package/web/.next/server/app/(dashboard)/skills/[id]/edit/page.js +2 -2
  65. package/web/.next/server/app/(dashboard)/skills/[id]/edit/page.js.nft.json +1 -1
  66. package/web/.next/server/app/(dashboard)/skills/[id]/edit/page_client-reference-manifest.js +1 -1
  67. package/web/.next/server/app/(dashboard)/skills/new/page.js +547 -0
  68. package/web/.next/server/app/(dashboard)/skills/new/page.js.nft.json +1 -0
  69. package/web/.next/server/app/(dashboard)/skills/new/page_client-reference-manifest.js +1 -0
  70. package/web/.next/server/app/(dashboard)/skills/page.js +2 -2
  71. package/web/.next/server/app/(dashboard)/skills/page.js.nft.json +1 -1
  72. package/web/.next/server/app/(dashboard)/skills/page_client-reference-manifest.js +1 -1
  73. package/web/.next/server/app/_global-error/page.js +3 -3
  74. package/web/.next/server/app/_global-error/page.js.nft.json +1 -1
  75. package/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  76. package/web/.next/server/app/_global-error.html +1 -1
  77. package/web/.next/server/app/_global-error.rsc +9 -9
  78. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +9 -9
  79. package/web/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +2 -2
  80. package/web/.next/server/app/_global-error.segments/_global-error.segment.rsc +3 -3
  81. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
  82. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +5 -5
  83. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  84. package/web/.next/server/app/_not-found/page.js +2 -2
  85. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  86. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  87. package/web/.next/server/app/_not-found.html +1 -1
  88. package/web/.next/server/app/_not-found.rsc +10 -10
  89. package/web/.next/server/app/_not-found.segments/_full.segment.rsc +10 -10
  90. package/web/.next/server/app/_not-found.segments/_head.segment.rsc +3 -3
  91. package/web/.next/server/app/_not-found.segments/_index.segment.rsc +6 -6
  92. package/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +3 -3
  93. package/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  94. package/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  95. package/web/.next/server/app/api/auth/[...all]/route.js +1 -1
  96. package/web/.next/server/app/api/auth/[...all]/route.js.nft.json +1 -1
  97. package/web/.next/server/app/api/health/route.js +1 -1
  98. package/web/.next/server/app/api/health/route.js.nft.json +1 -1
  99. package/web/.next/server/app/api/oauth/[provider]/callback/route.js +1 -1
  100. package/web/.next/server/app/api/oauth/[provider]/callback/route.js.nft.json +1 -1
  101. package/web/.next/server/app/api/oauth/[provider]/start/route.js +1 -1
  102. package/web/.next/server/app/api/oauth/[provider]/start/route.js.nft.json +1 -1
  103. package/web/.next/server/app/auth/callback/route.js +1 -1
  104. package/web/.next/server/app/auth/callback/route.js.nft.json +1 -1
  105. package/web/.next/server/app/login/page.js +2 -2
  106. package/web/.next/server/app/login/page.js.nft.json +1 -1
  107. package/web/.next/server/app/login/page_client-reference-manifest.js +1 -1
  108. package/web/.next/server/app/onboarding/page.js +2 -2
  109. package/web/.next/server/app/onboarding/page.js.nft.json +1 -1
  110. package/web/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  111. package/web/.next/server/app/onboarding.html +1 -1
  112. package/web/.next/server/app/onboarding.rsc +10 -10
  113. package/web/.next/server/app/onboarding.segments/_full.segment.rsc +10 -10
  114. package/web/.next/server/app/onboarding.segments/_head.segment.rsc +3 -3
  115. package/web/.next/server/app/onboarding.segments/_index.segment.rsc +6 -6
  116. package/web/.next/server/app/onboarding.segments/_tree.segment.rsc +2 -2
  117. package/web/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +2 -2
  118. package/web/.next/server/app/onboarding.segments/onboarding.segment.rsc +3 -3
  119. package/web/.next/server/app-paths-manifest.json +10 -9
  120. package/web/.next/server/chunks/1006.js +1 -0
  121. package/web/.next/server/chunks/1985.js +1 -0
  122. package/web/.next/server/chunks/234.js +1 -0
  123. package/web/.next/server/chunks/2385.js +1 -0
  124. package/web/.next/server/chunks/2422.js +1 -0
  125. package/web/.next/server/chunks/2734.js +1 -0
  126. package/web/.next/server/chunks/{159.js → 3159.js} +1 -1
  127. package/web/.next/server/chunks/3455.js +1 -0
  128. package/web/.next/server/chunks/3771.js +1 -0
  129. package/web/.next/server/chunks/3938.js +1 -0
  130. package/web/.next/server/chunks/414.js +16 -0
  131. package/web/.next/server/chunks/4242.js +3 -0
  132. package/web/.next/server/chunks/4574.js +1 -0
  133. package/web/.next/server/chunks/{674.js → 4674.js} +1 -1
  134. package/web/.next/server/chunks/5449.js +1 -0
  135. package/web/.next/server/chunks/5616.js +25 -0
  136. package/web/.next/server/chunks/6128.js +1 -0
  137. package/web/.next/server/chunks/6402.js +1 -0
  138. package/web/.next/server/chunks/6595.js +1 -0
  139. package/web/.next/server/chunks/6697.js +1 -0
  140. package/web/.next/server/chunks/6764.js +1 -0
  141. package/web/.next/server/chunks/7741.js +1 -0
  142. package/web/.next/server/chunks/{826.js → 7826.js} +3 -3
  143. package/web/.next/server/chunks/{437.js → 8437.js} +1 -1
  144. package/web/.next/server/chunks/8464.js +2 -0
  145. package/web/.next/server/chunks/9323.js +1 -0
  146. package/web/.next/server/chunks/9327.js +1 -0
  147. package/web/.next/server/chunks/9427.js +1 -0
  148. package/web/.next/server/middleware-build-manifest.js +1 -1
  149. package/web/.next/server/middleware-react-loadable-manifest.js +1 -1
  150. package/web/.next/server/middleware.js +1 -1
  151. package/web/.next/server/pages/404.html +1 -1
  152. package/web/.next/server/pages/500.html +1 -1
  153. package/web/.next/server/server-reference-manifest.js +1 -1
  154. package/web/.next/server/server-reference-manifest.json +1 -1
  155. package/web/.next/server/webpack-runtime.js +1 -1
  156. package/web/.next/static/be4PVOMd_EIWn1rY3m-Q2/_buildManifest.js +1 -0
  157. package/web/.next/static/chunks/1165-ec573be2aa63710b.js +1 -0
  158. package/web/.next/static/chunks/269-dc034ed29e6c72ee.js +1 -0
  159. package/web/.next/static/chunks/3363-1c6e608bcc76c1b2.js +1 -0
  160. package/web/.next/static/chunks/3422-9078c04bb8df8ce5.js +1 -0
  161. package/web/.next/static/chunks/5365-f17cb5257d2e5cd5.js +1 -0
  162. package/web/.next/static/chunks/6118-c6a8b66d0a3e446c.js +1 -0
  163. package/web/.next/static/chunks/6522-3f865de55adb618d.js +1 -0
  164. package/web/.next/static/chunks/6679-7c76034b83edeb06.js +1 -0
  165. package/web/.next/static/chunks/7203.ac8819bafd435ace.js +1 -0
  166. package/web/.next/static/chunks/8724-fb5a98d16bfbb929.js +32 -0
  167. package/web/.next/static/chunks/9060-df7c0c4c6fa27737.js +3 -0
  168. package/web/.next/static/chunks/9167-12a4a42d1a7d7db5.js +1 -0
  169. package/web/.next/static/chunks/9174.9c4f1a29aafd1fa5.js +1 -0
  170. package/web/.next/static/chunks/921-f437093debcddbb3.js +1 -0
  171. package/web/.next/static/chunks/9457-a94614afa0c2954c.js +1 -0
  172. package/web/.next/static/chunks/9504-1585634fb05dc985.js +1 -0
  173. package/web/.next/static/chunks/a7a8b010-58892db2f7d6ed53.js +1 -0
  174. package/web/.next/static/chunks/app/(dashboard)/agents/[id]/edit/page-faaf5d7084db1fbc.js +1 -0
  175. package/web/.next/static/chunks/app/(dashboard)/agents/[id]/telegram/page-8f2ca5f7fb70eab4.js +1 -0
  176. package/web/.next/static/chunks/app/(dashboard)/agents/page-9f2c2130d2f4de95.js +1 -0
  177. package/web/.next/static/chunks/app/(dashboard)/approvals/page-78f89fc75e0098e3.js +1 -0
  178. package/web/.next/static/chunks/app/(dashboard)/automations/page-7f71b6201decf4e5.js +1 -0
  179. package/web/.next/static/chunks/app/(dashboard)/billing/page-76a720d27d6fdb88.js +1 -0
  180. package/web/.next/static/chunks/app/(dashboard)/connectors/page-cd7ee7dd1458ae47.js +1 -0
  181. package/web/.next/static/chunks/app/(dashboard)/credentials/page-73d252ca88f194f1.js +1 -0
  182. package/web/.next/static/chunks/app/(dashboard)/jobs/[id]/page-1740cbacc93cb4ac.js +1 -0
  183. package/web/.next/static/chunks/app/(dashboard)/jobs/page-d340869dc040dc5d.js +1 -0
  184. package/web/.next/static/chunks/app/(dashboard)/layout-c63442ae0b085dcc.js +1 -0
  185. package/web/.next/static/chunks/app/(dashboard)/llm-providers/page-2f472dc5ade5697f.js +1 -0
  186. package/web/.next/static/chunks/app/(dashboard)/logs/page-34e669d9863bdd6e.js +1 -0
  187. package/web/.next/static/chunks/app/(dashboard)/mcp/page-1b2bf2315b3b213e.js +1 -0
  188. package/web/.next/static/chunks/app/(dashboard)/memories/page-1e537215e80cb0c3.js +1 -0
  189. package/web/.next/static/chunks/app/(dashboard)/page-fe750fe3304e8025.js +1 -0
  190. package/web/.next/static/chunks/app/(dashboard)/settings/page-499e32816fa8881b.js +1 -0
  191. package/web/.next/static/chunks/app/(dashboard)/skills/[id]/edit/page-6a4102dd95d3a6e1.js +1 -0
  192. package/web/.next/static/chunks/app/(dashboard)/skills/new/page-ca70dd7b9f24b76b.js +1 -0
  193. package/web/.next/static/chunks/app/(dashboard)/skills/page-a6736503d29a2f1c.js +1 -0
  194. package/web/.next/static/chunks/app/_global-error/page-b16f4d41d1aefd57.js +1 -0
  195. package/web/.next/static/chunks/app/_not-found/page-b16f4d41d1aefd57.js +1 -0
  196. package/web/.next/static/chunks/app/api/auth/[...all]/route-b16f4d41d1aefd57.js +1 -0
  197. package/web/.next/static/chunks/app/api/health/route-b16f4d41d1aefd57.js +1 -0
  198. package/web/.next/static/chunks/app/api/oauth/[provider]/callback/route-b16f4d41d1aefd57.js +1 -0
  199. package/web/.next/static/chunks/app/api/oauth/[provider]/start/route-b16f4d41d1aefd57.js +1 -0
  200. package/web/.next/static/chunks/app/auth/callback/route-b16f4d41d1aefd57.js +1 -0
  201. package/web/.next/static/chunks/app/error-61e58aa304e1b34e.js +1 -0
  202. package/web/.next/static/chunks/app/layout-34fff1f3e126d020.js +1 -0
  203. package/web/.next/static/chunks/app/login/page-a6993d175f94d322.js +1 -0
  204. package/web/.next/static/chunks/app/not-found-76a720d27d6fdb88.js +1 -0
  205. package/web/.next/static/chunks/app/onboarding/page-b16f4d41d1aefd57.js +1 -0
  206. package/web/.next/static/chunks/framework-bd27525cfbef7e2f.js +1 -0
  207. package/web/.next/static/chunks/main-app-7c3f773b984d0067.js +1 -0
  208. package/web/.next/static/chunks/main-c2542346b2c9d502.js +5 -0
  209. package/web/.next/static/chunks/next/dist/client/components/builtin/app-error-b16f4d41d1aefd57.js +1 -0
  210. package/web/.next/static/chunks/next/dist/client/components/builtin/forbidden-b16f4d41d1aefd57.js +1 -0
  211. package/web/.next/static/chunks/next/dist/client/components/builtin/global-error-af395c2c47310b14.js +1 -0
  212. package/web/.next/static/chunks/next/dist/client/components/builtin/unauthorized-b16f4d41d1aefd57.js +1 -0
  213. package/web/.next/static/chunks/{webpack-821bd0359b891822.js → webpack-3741bf0a7636d65e.js} +1 -1
  214. package/web/.next/static/css/a161c147ca3606b3.css +3 -0
  215. package/web/.next/static/media/19cfc7226ec3afaa-s.woff2 +0 -0
  216. package/web/.next/static/media/21350d82a1f187e9-s.woff2 +0 -0
  217. package/web/.next/static/media/558ca1a6aa3cb55e-s.p.woff2 +0 -0
  218. package/web/.next/static/media/64d784ea54a4acde-s.woff2 +0 -0
  219. package/web/.next/static/media/6d831b18ae5b01dc-s.woff2 +0 -0
  220. package/web/.next/static/media/8e9860b6e62d6359-s.woff2 +0 -0
  221. package/web/.next/static/media/ac0e76ddaeeb7981-s.woff2 +0 -0
  222. package/web/.next/static/media/ba9851c3c22cd980-s.woff2 +0 -0
  223. package/web/.next/static/media/c5fe6dc8356a8c31-s.woff2 +0 -0
  224. package/web/.next/static/media/df0a9ae256c0569c-s.woff2 +0 -0
  225. package/web/.next/static/media/e4af272ccee01ff0-s.p.woff2 +0 -0
  226. package/web/.next/static/media/edc640959b0c7826-s.woff2 +0 -0
  227. package/web/.next/static/media/ff71da380fbe67dd-s.woff2 +0 -0
  228. package/web/public/avatars/avatar-01.png +0 -0
  229. package/web/public/avatars/avatar-02.png +0 -0
  230. package/web/public/avatars/avatar-03.png +0 -0
  231. package/web/public/avatars/avatar-04.png +0 -0
  232. package/web/public/avatars/avatar-05.png +0 -0
  233. package/web/public/avatars/avatar-06.png +0 -0
  234. package/web/public/avatars/avatar-07.png +0 -0
  235. package/web/public/avatars/avatar-08.png +0 -0
  236. package/web/public/avatars/avatar-09.png +0 -0
  237. package/web/public/avatars/avatar-10.png +0 -0
  238. package/web/public/avatars/avatar-11.png +0 -0
  239. package/web/public/avatars/avatar-12.png +0 -0
  240. package/web/public/avatars/avatar-13.png +0 -0
  241. package/web/public/avatars/avatar-14.png +0 -0
  242. package/web/public/avatars/avatar-15.png +0 -0
  243. package/web/public/avatars/avatar-16.png +0 -0
  244. package/web/public/avatars/avatar-17.png +0 -0
  245. package/web/public/avatars/avatar-18.png +0 -0
  246. package/web/public/avatars/avatar-19.png +0 -0
  247. package/web/public/avatars/avatar-20.png +0 -0
  248. package/web/public/avatars/avatar-21.png +0 -0
  249. package/web/public/avatars/avatar-22.png +0 -0
  250. package/web/public/avatars/avatar-23.png +0 -0
  251. package/web/public/avatars/avatar-24.png +0 -0
  252. package/web/public/avatars/avatar-25.png +0 -0
  253. package/web/public/avatars/avatar-26.png +0 -0
  254. package/web/public/avatars/avatar-27.png +0 -0
  255. package/web/public/avatars/avatar-28.png +0 -0
  256. package/web/public/avatars/avatar-29.png +0 -0
  257. package/web/public/avatars/avatar-30.png +0 -0
  258. package/web/public/avatars/avatar-31.png +0 -0
  259. package/web/public/avatars/avatar-32.png +0 -0
  260. package/web/public/avatars/avatar-33.png +0 -0
  261. package/web/public/avatars/avatar-34.png +0 -0
  262. package/web/public/avatars/avatar-35.png +0 -0
  263. package/web/public/avatars/avatar-36.png +0 -0
  264. package/web/public/avatars/avatar-37.png +0 -0
  265. package/web/public/avatars/avatar-38.png +0 -0
  266. package/web/public/avatars/avatar-39.png +0 -0
  267. package/web/public/avatars/avatar-40.png +0 -0
  268. package/web/public/avatars/avatar-41.png +0 -0
  269. package/web/public/avatars/avatar-42.png +0 -0
  270. package/web/.next/server/app/(dashboard)/stats/page.js +0 -2
  271. package/web/.next/server/app/(dashboard)/stats/page_client-reference-manifest.js +0 -1
  272. package/web/.next/server/app/index.html +0 -1
  273. package/web/.next/server/app/index.meta +0 -16
  274. package/web/.next/server/app/index.rsc +0 -16
  275. package/web/.next/server/app/index.segments/__PAGE__.segment.rsc +0 -6
  276. package/web/.next/server/app/index.segments/_full.segment.rsc +0 -16
  277. package/web/.next/server/app/index.segments/_head.segment.rsc +0 -5
  278. package/web/.next/server/app/index.segments/_index.segment.rsc +0 -7
  279. package/web/.next/server/app/index.segments/_tree.segment.rsc +0 -2
  280. package/web/.next/server/app/page.js +0 -2
  281. package/web/.next/server/app/page.js.nft.json +0 -1
  282. package/web/.next/server/app/page_client-reference-manifest.js +0 -1
  283. package/web/.next/server/chunks/128.js +0 -1
  284. package/web/.next/server/chunks/134.js +0 -1
  285. package/web/.next/server/chunks/145.js +0 -1
  286. package/web/.next/server/chunks/184.js +0 -2
  287. package/web/.next/server/chunks/352.js +0 -16
  288. package/web/.next/server/chunks/402.js +0 -1
  289. package/web/.next/server/chunks/422.js +0 -1
  290. package/web/.next/server/chunks/449.js +0 -1
  291. package/web/.next/server/chunks/464.js +0 -2
  292. package/web/.next/server/chunks/574.js +0 -1
  293. package/web/.next/server/chunks/6.js +0 -1
  294. package/web/.next/server/chunks/631.js +0 -12
  295. package/web/.next/server/chunks/676.js +0 -1
  296. package/web/.next/server/chunks/697.js +0 -1
  297. package/web/.next/server/chunks/764.js +0 -1
  298. package/web/.next/server/chunks/807.js +0 -1
  299. package/web/.next/server/chunks/938.js +0 -1
  300. package/web/.next/static/GnQaz2FhfFL1-PYQfExPD/_buildManifest.js +0 -1
  301. package/web/.next/static/chunks/1045-82c87c31d5a8f54b.js +0 -1
  302. package/web/.next/static/chunks/2186-88c3d89f10bc57c3.js +0 -1
  303. package/web/.next/static/chunks/3363-613d9ccc7fe8a233.js +0 -1
  304. package/web/.next/static/chunks/3426-ddba5bb6b1e3f0ee.js +0 -1
  305. package/web/.next/static/chunks/4678-5cbc08f56a4fb74d.js +0 -1
  306. package/web/.next/static/chunks/7203.f516c74ab9532e2b.js +0 -1
  307. package/web/.next/static/chunks/8724-68ad0e948ea9a1cd.js +0 -32
  308. package/web/.next/static/chunks/9174.9225c199db752381.js +0 -1
  309. package/web/.next/static/chunks/9504-9ba984747b116953.js +0 -1
  310. package/web/.next/static/chunks/a7a8b010-8a97df7bbea35b50.js +0 -1
  311. package/web/.next/static/chunks/app/(dashboard)/agents/[id]/edit/page-2c38c08bef6182ce.js +0 -1
  312. package/web/.next/static/chunks/app/(dashboard)/agents/[id]/telegram/page-9ddc8c77a1ec33df.js +0 -1
  313. package/web/.next/static/chunks/app/(dashboard)/agents/page-567400cb256c565d.js +0 -1
  314. package/web/.next/static/chunks/app/(dashboard)/approvals/page-38f4fe347d505bff.js +0 -1
  315. package/web/.next/static/chunks/app/(dashboard)/automations/page-d8c09fb42eeeca4d.js +0 -1
  316. package/web/.next/static/chunks/app/(dashboard)/billing/page-736acdd0781484e6.js +0 -1
  317. package/web/.next/static/chunks/app/(dashboard)/connectors/page-63889db4bf76fe10.js +0 -1
  318. package/web/.next/static/chunks/app/(dashboard)/credentials/page-4867266b3111cdf6.js +0 -1
  319. package/web/.next/static/chunks/app/(dashboard)/jobs/[id]/page-285ef9a609cc1190.js +0 -1
  320. package/web/.next/static/chunks/app/(dashboard)/jobs/page-8b0b38b7651507ba.js +0 -1
  321. package/web/.next/static/chunks/app/(dashboard)/layout-5bf62b7b4daa56d5.js +0 -2
  322. package/web/.next/static/chunks/app/(dashboard)/logs/page-8e809e843e8a6f76.js +0 -1
  323. package/web/.next/static/chunks/app/(dashboard)/mcp/page-77dd7810003d6437.js +0 -1
  324. package/web/.next/static/chunks/app/(dashboard)/memories/page-f4541a2f37851596.js +0 -1
  325. package/web/.next/static/chunks/app/(dashboard)/settings/page-95e9ff0349e579ef.js +0 -1
  326. package/web/.next/static/chunks/app/(dashboard)/skills/[id]/edit/page-a1a65f3cc8a9df31.js +0 -1
  327. package/web/.next/static/chunks/app/(dashboard)/skills/page-747e409f9f34cc3c.js +0 -1
  328. package/web/.next/static/chunks/app/(dashboard)/stats/page-9162acbb9015dd27.js +0 -1
  329. package/web/.next/static/chunks/app/_global-error/page-9162acbb9015dd27.js +0 -1
  330. package/web/.next/static/chunks/app/_not-found/page-9162acbb9015dd27.js +0 -1
  331. package/web/.next/static/chunks/app/api/auth/[...all]/route-9162acbb9015dd27.js +0 -1
  332. package/web/.next/static/chunks/app/api/health/route-9162acbb9015dd27.js +0 -1
  333. package/web/.next/static/chunks/app/api/oauth/[provider]/callback/route-9162acbb9015dd27.js +0 -1
  334. package/web/.next/static/chunks/app/api/oauth/[provider]/start/route-9162acbb9015dd27.js +0 -1
  335. package/web/.next/static/chunks/app/auth/callback/route-9162acbb9015dd27.js +0 -1
  336. package/web/.next/static/chunks/app/error-055d3c6a12b2b05a.js +0 -1
  337. package/web/.next/static/chunks/app/layout-c01e1c13a9f4e701.js +0 -1
  338. package/web/.next/static/chunks/app/login/page-a47d35197589a25b.js +0 -1
  339. package/web/.next/static/chunks/app/not-found-736acdd0781484e6.js +0 -1
  340. package/web/.next/static/chunks/app/onboarding/page-9162acbb9015dd27.js +0 -1
  341. package/web/.next/static/chunks/app/page-9162acbb9015dd27.js +0 -1
  342. package/web/.next/static/chunks/framework-dfbc3562811a52e8.js +0 -1
  343. package/web/.next/static/chunks/main-200183420347a1ea.js +0 -5
  344. package/web/.next/static/chunks/main-app-d81ba9a45427346e.js +0 -1
  345. package/web/.next/static/chunks/next/dist/client/components/builtin/app-error-9162acbb9015dd27.js +0 -1
  346. package/web/.next/static/chunks/next/dist/client/components/builtin/forbidden-9162acbb9015dd27.js +0 -1
  347. package/web/.next/static/chunks/next/dist/client/components/builtin/global-error-146c676c80b91e46.js +0 -1
  348. package/web/.next/static/chunks/next/dist/client/components/builtin/unauthorized-9162acbb9015dd27.js +0 -1
  349. package/web/.next/static/css/221ca0dcaf2fa31f.css +0 -1
  350. /package/web/.next/static/{GnQaz2FhfFL1-PYQfExPD → be4PVOMd_EIWn1rY3m-Q2}/_ssgManifest.js +0 -0
package/README.md CHANGED
@@ -1,80 +1,218 @@
1
1
  # Nodal-Agents
2
2
 
3
- Local-first AI agent platform. Self-host on Mac, PC, Linux, VPS, or NAS in 3 commands.
3
+ > **Your AI agents. Your data. Your machine.**
4
+ > Self-hosted, local-first AI agent platform — install in two commands.
4
5
 
5
- ## Install in 30 seconds (Docker)
6
+ [![npm](https://img.shields.io/npm/v/nodal-agents?color=cb3837&label=npm&logo=npm)](https://www.npmjs.com/package/nodal-agents)
7
+ [![Node](https://img.shields.io/badge/node-22%2B-339933?logo=node.js&logoColor=white)](https://nodejs.org)
8
+ [![TypeScript](https://img.shields.io/badge/typescript-strict-3178c6?logo=typescript&logoColor=white)](https://www.typescriptlang.org)
6
9
 
7
- Works on any host with Docker Mac, PC, Linux, VPS, Synology / Unraid / TrueNAS NAS, Raspberry Pi.
10
+ Build and orchestrate AI agents on your own hardware. Multi-LLM,
11
+ multi-channel, multi-connector — **no SaaS lock-in, no per-token markup,
12
+ no cloud roundtrip.** Runs on any machine with Node 22+ — Mac, PC, Linux.
13
+
14
+ ---
15
+
16
+ ## Why Nodal-Agents
17
+
18
+ | | |
19
+ | --- | --- |
20
+ | 🏠  **Local-first** | Single binary, embedded Postgres, zero cloud dependency. Your conversations, memory, and credentials stay on your machine. |
21
+ | 🔌  **LLM-agnostic** | Anthropic, OpenAI, Google, Groq, Mistral, OpenRouter, or any OpenAI-compatible local model (LM Studio, Ollama). Per-agent key, swap providers without code changes. |
22
+ | 🧠  **Memory that compounds** | Persistent facts (entity-scoped, auto-injected into every job) and chat-thread continuity (your agent remembers what it said 30 seconds ago — and what it said yesterday). |
23
+ | 🤝  **Orchestrators that finish** | Router and planner orchestrators delegate to specialist sub-agents. Hard guards against runaway loops — turn caps, chain caps, per-slug delegation budgets, smart retry on side-effect-free failures. |
24
+ | 🔧  **Multi-instance connectors** | Gmail perso *and* Gmail boulot on the same install. OAuth *and* API-key supported. Active list + Marketplace UI in the dashboard. |
25
+ | 📡  **MCP support** | Connect Streamable HTTP MCP servers — per-job tool discovery, tool whitelisting, multi-instance. |
26
+ | 💬 &nbsp;**Telegram out of the box** | Long-polling, multi-agent routing (`/ask <slug>`), group-chat filters, conversation continuity, delegation gracefulness on Telegram. |
27
+ | ⚙️ &nbsp;**Real engineering** | TypeScript strict, dependency-cruiser-enforced architecture, full unit + integration suite, Playwright e2e, idempotent migrations, encryption at rest for keys. |
28
+
29
+ ---
30
+
31
+ ## Screenshots
32
+
33
+ | Home dashboard — light theme | Agent detail — dark theme |
34
+ | :---: | :---: |
35
+ | ![Home dashboard, light theme](docs/screenshots/home_lightheme.png) | ![Agent detail page, dark theme](docs/screenshots/agent_darktheme.png) |
36
+
37
+ ---
38
+
39
+ ## Install
8
40
 
9
41
  ```bash
10
- curl -O https://raw.githubusercontent.com/Kwintspiracy/nodal-agents/main/docker-compose.yml
11
- docker compose up -d
42
+ npm install -g nodal-agents
43
+ nodal-agents up
12
44
  ```
13
45
 
14
- Open <http://localhost:3000> Nodal-Agents is running. Configure your LLM provider from **Settings → LLM keys** in the dashboard.
46
+ Open <http://localhost:3000>. The CLI spawns an embedded Postgres on a
47
+ free port, applies migrations, seeds the system skills, and starts the
48
+ runner (`:3001`) and dashboard (`:3000`). Configure your LLM provider
49
+ from **Settings → LLM Keys** in the dashboard.
15
50
 
16
- Data (config, postgres, logs) lives in the `nodal-data` Docker volume. To wipe everything: `docker compose down -v`.
51
+ > Requires Node 22+. No external Postgres, no Redis, no cloud config.
52
+ > Data lives at `~/.nodalai/` — wipe with `rm -rf ~/.nodalai`.
17
53
 
18
- The image is published to `ghcr.io/kwintspiracy/nodal-agents:latest` (multi-arch: amd64 + arm64). To pin a version, replace `latest` with a release tag (e.g. `v0.1.0`).
54
+ To stop the stack: `nodal-agents down`.
19
55
 
20
- ### Build the image locally
21
-
22
- If you'd rather build from source instead of pulling the published image:
56
+ ### Build from source
23
57
 
24
58
  ```bash
25
59
  git clone https://github.com/Kwintspiracy/nodal-agents.git
26
60
  cd nodal-agents
27
- docker compose build
28
- docker compose up -d
61
+ pnpm install
62
+ pnpm --filter nodal-agents exec tsx src/index.ts --dev
29
63
  ```
30
64
 
31
- (Comment the `image:` line and uncomment `build: .` in `docker-compose.yml`.)
65
+ Dev mode runs `next dev` so the dashboard hot-reloads on file changes.
32
66
 
33
- ## Developer setup (monorepo)
67
+ ---
34
68
 
35
- ```bash
36
- pnpm install
37
- pnpm typecheck
38
- pnpm lint
39
- pnpm test
40
- pnpm --filter nodal-agents dev # CLI in tsx watch mode
69
+ ## How it works
70
+
71
+ ```
72
+ ┌─────────────┐ Telegram / ┌────────────────────────────────┐
73
+ │ Channel │ Dashboard ───▶ │ Runner (Hono) │
74
+ │ (telegram, │ POST /api ◀── │ • Job queue + executor │
75
+ │ web …) │ │ • Anti-runaway guards │
76
+ └─────────────┘ │ • Per-agent tool whitelist │
77
+ │ • Memory auto-injection │
78
+ │ • Session-thread continuity │
79
+ └─────────┬──────────┬────────────┘
80
+ │ │
81
+ ┌───────▼───┐ ┌───▼─────────────┐
82
+ │ LLM │ │ Connectors / │
83
+ │ client │ │ MCP servers │
84
+ │ (multi- │ │ (Gmail, Drive, │
85
+ │ provider) │ │ Notion, Cogni │
86
+ └───────────┘ │ Cortex …) │
87
+ └─────────────────┘
41
88
  ```
42
89
 
43
- ## Monorepo structure
44
-
45
- - `apps/web` Next.js dashboard (UI)
46
- - `apps/runner` — Agent runtime (HTTP API, job execution, cron ticker)
47
- - `apps/cli` — `nodal-agents` install + ops command
48
- - `packages/db` — Drizzle schema + migrations + client (only place that imports postgres)
49
- - `packages/shared` — Zod types and constants shared across web + runner
50
- - `packages/llm` — Vercel AI SDK wrapper, multi-provider abstraction
51
- - `packages/tools` — Tool registration + execution + approval gates
52
- - `packages/memory` — Agent memory CRUD + embeddings
53
- - `packages/orchestration` — Router + Planner patterns (delegation, task board)
54
- - `packages/runner-adapters` — Connectors: notion, drive, gmail, sheets, etc.
55
- - `packages/delivery` — Telegram, email, future Slack/Discord
56
- - `packages/auth` — Pluggable auth provider (local-trust default, better-auth opt-in, bearer-token for LAN)
90
+ Every agent is a row in Postgres — personality, skills, connectors,
91
+ memory budget, team assignments live in the database. The runtime is
92
+ generic: **zero hardcoded agent metadata.** Adding capabilities means
93
+ inserting rows, not editing code.
57
94
 
58
- ## Architecture rules (enforced by `dependency-cruiser`)
95
+ A user message via Telegram becomes an `agent_jobs` row. The runner
96
+ loads the agent's prior chat-thread history, injects relevant
97
+ persistent memories, dispatches to the LLM, executes any tool calls
98
+ emitted, and finalizes via `telegram_send_message` + `return_result`.
99
+ Delegations create child jobs that resume the parent on completion.
59
100
 
60
- - `apps/*` may import `packages/*`, never the reverse
61
- - `apps/web` and `apps/runner` cannot import each other (DB or HTTP only)
62
- - Only `packages/db` may import postgres clients (`pg`, `postgres`, `drizzle-orm`)
63
- - `packages/runner-adapters/*` may only import from `packages/tools` and `packages/shared`
64
- - No circular dependencies
101
+ ---
65
102
 
66
- Run `pnpm deps:check` locally before pushing.
103
+ ## Dashboard
104
+
105
+ | Route | Purpose |
106
+ | --- | --- |
107
+ | `/agents` | Create, edit, assign skills + connectors + MCP servers to agents. |
108
+ | `/jobs` | Live job stream — task, agent, status, full transcript, tool I/O. |
109
+ | `/connectors` | Active connector instances + Marketplace (multi-instance, OAuth or API-key). |
110
+ | `/mcp` | Active MCP servers + Marketplace (HTTP transport). |
111
+ | `/memories` | Persistent facts per entity — search, edit, archive. |
112
+ | `/skills` | Procedural memory blocks — shipped with the product, user-overridable. |
113
+ | `/logs` | Tool-call audit — input/output JSON per call, filterable by tool name. |
114
+ | `/approvals` | Human-in-the-loop gates for risky tools. |
115
+ | `/automations` | Cron-scheduled agent triggers. |
116
+ | `/settings` | LLM keys, auth mode, network (loopback / LAN), bot tokens. |
117
+
118
+ ---
67
119
 
68
120
  ## Stack
69
121
 
70
- - **Runtime:** Node 22+, TypeScript strict
71
- - **Monorepo:** pnpm workspaces + Turborepo
72
- - **DB:** embedded-postgres (local + Docker), Drizzle ORM, pgvector
73
- - **Validation:** Zod
74
- - **HTTP server:** Hono (runner)
75
- - **LLM:** Vercel AI SDK
76
- - **Auth:** local-trust (single-user loopback) / local-auth (better-auth, multi-user LAN) / bearer-token
77
- - **Tests:** Vitest (unit), Playwright (e2e), dependency-cruiser (architecture)
122
+ | Layer | Tech |
123
+ | --- | --- |
124
+ | Runtime | Node 22+, TypeScript strict (no `any`, no `@ts-ignore` without comment) |
125
+ | Monorepo | pnpm workspaces + Turborepo |
126
+ | Database | embedded-postgres (Win / Mac / Linux), Drizzle ORM, idempotent migrations |
127
+ | Validation | Zod everywhere |
128
+ | HTTP server | Hono (runner), Next.js 16 (dashboard) |
129
+ | LLM | Vercel AI SDK — multi-provider with retry + timeout + tolerant parsing |
130
+ | Auth | local-trust (single-user loopback) / better-auth (multi-user LAN) / bearer-token |
131
+ | Encryption | AES-256-GCM at rest for API keys, master key in `~/.nodalai/secrets.key` |
132
+ | Tests | Vitest (unit + integration), Playwright (e2e), dependency-cruiser (architecture) |
133
+
134
+ ---
135
+
136
+ ## Monorepo
137
+
138
+ ```
139
+ apps/
140
+ ├── cli nodal-agents CLI: install, up, down, ops
141
+ ├── runner Hono server: job execution, cron, channel pollers
142
+ └── web Next.js dashboard
143
+
144
+ packages/
145
+ ├── db Drizzle schema + migrations + client (only postgres importer)
146
+ ├── shared Zod types + constants shared across web + runner
147
+ ├── llm Vercel AI SDK wrapper, retry, timeout, native tool-call parsers
148
+ ├── tools Tool registration + execution + approval gates
149
+ ├── memory Persistent memory CRUD + sanitation + dedup + auto-injection
150
+ ├── orchestration Router / Planner patterns, delegation, chain counters
151
+ ├── adapters Connector packages (gmail, drive, sheets, docs, notion,
152
+ │ airtable, apify, firecrawl, tavily, MCP)
153
+ ├── runner-adapters Adapter registry, agent ↔ tool wiring
154
+ ├── delivery Telegram, email
155
+ ├── auth Pluggable auth provider
156
+ ├── catalog Shipped system skills (telegram-responder, obsidian,
157
+ │ research-scope-discipline, claude-html-design)
158
+ └── secrets AES-256-GCM key vault
159
+ ```
160
+
161
+ ---
162
+
163
+ ## Architecture rules (enforced by `dependency-cruiser`)
164
+
165
+ - `apps/*` may import `packages/*` — never the reverse.
166
+ - `apps/web` and `apps/runner` cannot import each other (DB or HTTP only).
167
+ - Only `packages/db` may import `postgres` / `drizzle-orm` / `pg`.
168
+ - `packages/runner-adapters/*` may only import from `packages/tools` and
169
+ `packages/shared`.
170
+ - No circular dependencies.
171
+
172
+ ```bash
173
+ pnpm deps:check # runs locally and in CI before every release
174
+ ```
175
+
176
+ ---
177
+
178
+ ## Status
179
+
180
+ **Current release:** `0.1.5` on npm `latest`. Used daily by the
181
+ maintainer, stable enough for personal production. Pre-1.0 — breaking
182
+ changes are still possible between minors.
183
+
184
+ ### Shipped and working
185
+
186
+ - Multi-LLM provider routing with per-agent keys
187
+ - Persistent memory (sanitation, dedup, importance ranking, auto-injection,
188
+ feedback loop)
189
+ - Session-thread continuity on chat channels (Telegram today)
190
+ - Orchestrator (router + planner) with delegation chains and anti-runaway
191
+ caps
192
+ - Multi-instance connectors with OAuth (Gmail, Drive, Sheets, Docs, Notion,
193
+ Airtable) and API-key (Notion, Airtable, Apify, Firecrawl, Tavily)
194
+ - MCP Streamable HTTP catalog with API-key auth
195
+ - Telegram delivery (long-poll, group filters, multi-agent routing,
196
+ delegation gracefulness)
197
+ - Approval gates for risky tools
198
+ - Cron scheduling
199
+ - Encryption at rest for LLM keys + MCP keys
200
+ - Embedded Postgres distribution via npm (no external DB to install)
201
+
202
+ ### On the roadmap (genuine, not vaporware)
203
+
204
+ - **MCP OAuth flow** → unlocks Linear, Notion remote, GitHub remote,
205
+ Atlassian, Sentry, and the rest of the SaaS-as-MCP ecosystem.
206
+ - **MCP stdio transport** → unlocks the Anthropic reference servers
207
+ (filesystem, sqlite, brave-search, GitHub stdio…) and the community
208
+ catalog.
209
+ - **pgvector binaries bundled in the npm pack** → semantic memory search
210
+ active out-of-the-box. Today, installs without pgvector fall back to
211
+ keyword search (which works, just less smart for cross-vocabulary
212
+ recall).
213
+ - Data migration tools from the legacy Python stack.
214
+
215
+ ---
78
216
 
79
217
  ## License
80
218
 
package/cli.js CHANGED
@@ -12333,11 +12333,17 @@ var init_agents = __esm({
12333
12333
  // vault, another on a code repo). Resolution at tool-call time runs
12334
12334
  // through realpath + boundary check (see file-ops/workspace.ts).
12335
12335
  workspaceRootPath: text("workspace_root_path"),
12336
+ // User-controlled order on the /agents page (Brique A, migration 0019).
12337
+ // Default 0 — ties are broken by `name ASC` in the list query. Newly
12338
+ // created agents land at the front of their group by default; the user
12339
+ // can adjust via the ↑/↓ buttons in the UI.
12340
+ position: integer("position").default(0).notNull(),
12336
12341
  createdAt: timestamp("created_at", { withTimezone: true }).defaultNow(),
12337
12342
  updatedAt: timestamp("updated_at", { withTimezone: true }).defaultNow()
12338
12343
  },
12339
12344
  (table) => [
12340
12345
  index("idx_agents_entity_id").on(table.entityId),
12346
+ index("idx_agents_position").on(table.position),
12341
12347
  check("agents_role_check", sql`${table.role} IN ('agent', 'orchestrator', 'system')`),
12342
12348
  check(
12343
12349
  "agents_orchestrator_mode_check",
@@ -12990,7 +12996,7 @@ var init_mcp = __esm({
12990
12996
  check("mcp_servers_transport_check", sql`${table.transport} IN ('http','stdio')`),
12991
12997
  check(
12992
12998
  "mcp_servers_auth_scheme_check",
12993
- sql`${table.authScheme} IN ('header','query') OR ${table.authScheme} IS NULL`
12999
+ sql`${table.authScheme} IN ('header','query','bearer') OR ${table.authScheme} IS NULL`
12994
13000
  )
12995
13001
  // Multi-instance brique (migration 0017): the (entity_id, slug) UNIQUE
12996
13002
  // index was dropped to allow multiple instances of the same MCP server
@@ -13464,10 +13470,11 @@ function buildEnvForWeb(config, databaseUrl) {
13464
13470
  // readConfig() guarantees this is set (auto-mints on first read).
13465
13471
  NEXT_SERVER_ACTIONS_ENCRYPTION_KEY: config.serverActionsKey ?? "",
13466
13472
  // The Next.js standalone server reads HOSTNAME for its listener bind
13467
- // (defaults to '0.0.0.0' when unset). Docker sets HOSTNAME to the
13468
- // container ID, which Next interprets as the hostname to bind on —
13469
- // resolving via /etc/hosts to 127.0.0.1 only, breaking port forwarding
13470
- // and the `localhost:3000` healthcheck. Pin to the loopback/lan choice.
13473
+ // (defaults to '0.0.0.0' when unset). Some host environments set
13474
+ // HOSTNAME to an arbitrary identifier (e.g. a runner ID), which Next
13475
+ // would interpret as the hostname to bind on usually resolving via
13476
+ // /etc/hosts to 127.0.0.1 only, breaking port forwarding and the
13477
+ // `localhost:3000` healthcheck. Pin to the loopback/lan choice.
13471
13478
  HOSTNAME: bind
13472
13479
  };
13473
13480
  if (config.llm) {
@@ -0,0 +1,12 @@
1
+ -- Migration 0018 — relax mcp_servers.auth_scheme to allow 'bearer'.
2
+ --
3
+ -- Brique A v3 (MCP catalog enrichment): adds the 'bearer' auth scheme so
4
+ -- catalog entries for servers expecting `Authorization: Bearer <token>`
5
+ -- (Stripe, OpenAI, etc.) can be represented and connected without a
6
+ -- bespoke per-server hack. The adapter injects the literal "Bearer "
7
+ -- prefix when this scheme is selected; authParamName is ignored.
8
+
9
+ ALTER TABLE "mcp_servers" DROP CONSTRAINT IF EXISTS "mcp_servers_auth_scheme_check";
10
+ --> statement-breakpoint
11
+ ALTER TABLE "mcp_servers" ADD CONSTRAINT "mcp_servers_auth_scheme_check"
12
+ CHECK ("auth_scheme" IN ('header','query','bearer') OR "auth_scheme" IS NULL);
@@ -0,0 +1,16 @@
1
+ -- 0019_agents_position.sql
2
+ -- Brique A (UX polish sprint, 2026-05-26): manual reorder of agents on the
3
+ -- /agents page. The list was sorted by `created_at DESC` in code; this
4
+ -- column lets the user override that ordering with the ↑/↓ buttons in the
5
+ -- UI without touching the underlying agents.created_at.
6
+ --
7
+ -- Idempotent: `IF NOT EXISTS` so a runner that re-applies migrations at
8
+ -- boot doesn't trip when the column is already there.
9
+
10
+ ALTER TABLE agents
11
+ ADD COLUMN IF NOT EXISTS position INTEGER NOT NULL DEFAULT 0;
12
+
13
+ -- Cheap covering index for the ORDER BY in listAgentsAction. Optional but
14
+ -- keeps the new sort path off seqscans once an entity has more than a few
15
+ -- dozen agents. Same idempotency guard as the column add.
16
+ CREATE INDEX IF NOT EXISTS idx_agents_position ON agents (position);