mtmsdk 0.0.42 → 0.0.43

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 (480) hide show
  1. package/dist/cloud-account/platform-configs.d.ts +64 -0
  2. package/dist/cloud-account/platform-configs.d.ts.map +1 -0
  3. package/dist/cloud-account/platform-configs.js +44 -0
  4. package/dist/cloud-account/platform-configs.js.map +1 -0
  5. package/dist/{gomtmapi_v2 → gomtmapi}/@tanstack/react-query.gen.d.ts +202 -8
  6. package/dist/gomtmapi/@tanstack/react-query.gen.d.ts.map +1 -0
  7. package/dist/{gomtmapi_v2 → gomtmapi}/@tanstack/react-query.gen.js +300 -10
  8. package/dist/gomtmapi/@tanstack/react-query.gen.js.map +1 -0
  9. package/dist/{opencode → gomtmapi}/client/client.gen.d.ts.map +1 -1
  10. package/dist/{opencode → gomtmapi}/client/client.gen.js.map +1 -1
  11. package/dist/{opencode → gomtmapi}/client/index.d.ts.map +1 -1
  12. package/dist/{opencode → gomtmapi}/client/index.js.map +1 -1
  13. package/dist/{opencode → gomtmapi}/client/types.gen.d.ts.map +1 -1
  14. package/dist/gomtmapi/client/types.gen.js.map +1 -0
  15. package/dist/{opencode → gomtmapi}/client/utils.gen.d.ts.map +1 -1
  16. package/dist/{opencode → gomtmapi}/client/utils.gen.js.map +1 -1
  17. package/dist/{opencode → gomtmapi}/client.gen.d.ts.map +1 -1
  18. package/dist/{opencode → gomtmapi}/client.gen.js.map +1 -1
  19. package/dist/{opencode → gomtmapi}/core/auth.gen.d.ts.map +1 -1
  20. package/dist/{opencode → gomtmapi}/core/auth.gen.js.map +1 -1
  21. package/dist/{opencode → gomtmapi}/core/bodySerializer.gen.d.ts.map +1 -1
  22. package/dist/{opencode → gomtmapi}/core/bodySerializer.gen.js.map +1 -1
  23. package/dist/{opencode → gomtmapi}/core/params.gen.d.ts.map +1 -1
  24. package/dist/{opencode → gomtmapi}/core/params.gen.js.map +1 -1
  25. package/dist/{opencode → gomtmapi}/core/pathSerializer.gen.d.ts.map +1 -1
  26. package/dist/{opencode → gomtmapi}/core/pathSerializer.gen.js.map +1 -1
  27. package/dist/{opencode → gomtmapi}/core/queryKeySerializer.gen.d.ts.map +1 -1
  28. package/dist/{opencode → gomtmapi}/core/queryKeySerializer.gen.js.map +1 -1
  29. package/dist/{opencode → gomtmapi}/core/serverSentEvents.gen.d.ts.map +1 -1
  30. package/dist/{opencode → gomtmapi}/core/serverSentEvents.gen.js.map +1 -1
  31. package/dist/{opencode → gomtmapi}/core/types.gen.d.ts.map +1 -1
  32. package/dist/gomtmapi/core/types.gen.js.map +1 -0
  33. package/dist/{opencode → gomtmapi}/core/utils.gen.d.ts.map +1 -1
  34. package/dist/{opencode → gomtmapi}/core/utils.gen.js.map +1 -1
  35. package/dist/gomtmapi/index.d.ts +3 -0
  36. package/dist/gomtmapi/index.d.ts.map +1 -0
  37. package/dist/gomtmapi/index.js +3 -0
  38. package/dist/gomtmapi/index.js.map +1 -0
  39. package/dist/{gomtmapi_v2 → gomtmapi}/schemas.gen.d.ts +337 -50
  40. package/dist/gomtmapi/schemas.gen.d.ts.map +1 -0
  41. package/dist/{gomtmapi_v2 → gomtmapi}/schemas.gen.js +355 -50
  42. package/dist/gomtmapi/schemas.gen.js.map +1 -0
  43. package/dist/gomtmapi/sdk.gen.d.ts +378 -0
  44. package/dist/gomtmapi/sdk.gen.d.ts.map +1 -0
  45. package/dist/{gomtmapi_v2 → gomtmapi}/sdk.gen.js +234 -15
  46. package/dist/gomtmapi/sdk.gen.js.map +1 -0
  47. package/dist/{gomtmapi_v2 → gomtmapi}/types.gen.d.ts +494 -50
  48. package/dist/gomtmapi/types.gen.d.ts.map +1 -0
  49. package/dist/gomtmapi/types.gen.js.map +1 -0
  50. package/dist/{gomtmapi_v2 → gomtmapi}/zod.gen.d.ts +391 -45
  51. package/dist/gomtmapi/zod.gen.d.ts.map +1 -0
  52. package/dist/{gomtmapi_v2 → gomtmapi}/zod.gen.js +270 -31
  53. package/dist/gomtmapi/zod.gen.js.map +1 -0
  54. package/dist/lib/logger/index.d.ts +3 -0
  55. package/dist/lib/logger/index.d.ts.map +1 -1
  56. package/dist/lib/schema.d.ts +14 -2
  57. package/dist/lib/schema.d.ts.map +1 -1
  58. package/dist/lib/schema.js +1 -1
  59. package/dist/lib/schema.js.map +1 -1
  60. package/dist/mtgate_api/@tanstack/react-query.gen.d.ts +29 -1
  61. package/dist/mtgate_api/@tanstack/react-query.gen.d.ts.map +1 -1
  62. package/dist/mtgate_api/@tanstack/react-query.gen.js +17 -1
  63. package/dist/mtgate_api/@tanstack/react-query.gen.js.map +1 -1
  64. package/dist/mtgate_api/index.d.ts +2 -2
  65. package/dist/mtgate_api/index.d.ts.map +1 -1
  66. package/dist/mtgate_api/index.js +1 -1
  67. package/dist/mtgate_api/index.js.map +1 -1
  68. package/dist/mtgate_api/schemas.gen.d.ts +1 -0
  69. package/dist/mtgate_api/schemas.gen.d.ts.map +1 -1
  70. package/dist/mtgate_api/schemas.gen.js +8 -1
  71. package/dist/mtgate_api/schemas.gen.js.map +1 -1
  72. package/dist/mtgate_api/sdk.gen.d.ts +5 -1
  73. package/dist/mtgate_api/sdk.gen.d.ts.map +1 -1
  74. package/dist/mtgate_api/sdk.gen.js +4 -0
  75. package/dist/mtgate_api/sdk.gen.js.map +1 -1
  76. package/dist/mtgate_api/types.gen.d.ts +7 -1
  77. package/dist/mtgate_api/types.gen.d.ts.map +1 -1
  78. package/dist/mtgate_api/zod.gen.d.ts +26 -3
  79. package/dist/mtgate_api/zod.gen.d.ts.map +1 -1
  80. package/dist/mtgate_api/zod.gen.js +12 -1
  81. package/dist/mtgate_api/zod.gen.js.map +1 -1
  82. package/dist/openclaw/client-info.d.ts +56 -0
  83. package/dist/openclaw/client-info.d.ts.map +1 -0
  84. package/dist/openclaw/client-info.js +44 -0
  85. package/dist/openclaw/client-info.js.map +1 -0
  86. package/dist/openclaw/device-auth-utils.d.ts +13 -0
  87. package/dist/openclaw/device-auth-utils.d.ts.map +1 -0
  88. package/dist/openclaw/device-auth-utils.js +20 -0
  89. package/dist/openclaw/device-auth-utils.js.map +1 -0
  90. package/dist/openclaw/device-auth.d.ts +21 -0
  91. package/dist/openclaw/device-auth.d.ts.map +1 -0
  92. package/dist/openclaw/device-auth.js +84 -0
  93. package/dist/openclaw/device-auth.js.map +1 -0
  94. package/dist/openclaw/device-identity.d.ts +8 -0
  95. package/dist/openclaw/device-identity.d.ts.map +1 -0
  96. package/dist/openclaw/device-identity.js +87 -0
  97. package/dist/openclaw/device-identity.js.map +1 -0
  98. package/dist/openclaw/gateway.d.ts +86 -0
  99. package/dist/openclaw/gateway.d.ts.map +1 -0
  100. package/dist/openclaw/gateway.js +268 -0
  101. package/dist/openclaw/gateway.js.map +1 -0
  102. package/dist/openclaw/types.d.ts +473 -0
  103. package/dist/openclaw/types.d.ts.map +1 -0
  104. package/dist/openclaw/types.js +2 -0
  105. package/dist/openclaw/types.js.map +1 -0
  106. package/dist/openclaw/uuid.d.ts +6 -0
  107. package/dist/openclaw/uuid.d.ts.map +1 -0
  108. package/dist/openclaw/uuid.js +39 -0
  109. package/dist/openclaw/uuid.js.map +1 -0
  110. package/dist/sbapi/@tanstack/react-query.gen.d.ts +3251 -6
  111. package/dist/sbapi/@tanstack/react-query.gen.d.ts.map +1 -1
  112. package/dist/sbapi/@tanstack/react-query.gen.js +6050 -6
  113. package/dist/sbapi/@tanstack/react-query.gen.js.map +1 -1
  114. package/dist/sbapi/client.gen.d.ts.map +1 -1
  115. package/dist/sbapi/client.gen.js +1 -1
  116. package/dist/sbapi/client.gen.js.map +1 -1
  117. package/dist/sbapi/index.d.ts +2 -2
  118. package/dist/sbapi/index.d.ts.map +1 -1
  119. package/dist/sbapi/index.js +1 -1
  120. package/dist/sbapi/index.js.map +1 -1
  121. package/dist/sbapi/schemas.gen.d.ts +2320 -36
  122. package/dist/sbapi/schemas.gen.d.ts.map +1 -1
  123. package/dist/sbapi/schemas.gen.js +2593 -45
  124. package/dist/sbapi/schemas.gen.js.map +1 -1
  125. package/dist/sbapi/sdk.gen.d.ts +819 -2
  126. package/dist/sbapi/sdk.gen.d.ts.map +1 -1
  127. package/dist/sbapi/sdk.gen.js +2463 -1
  128. package/dist/sbapi/sdk.gen.js.map +1 -1
  129. package/dist/sbapi/types.gen.d.ts +11701 -29
  130. package/dist/sbapi/types.gen.d.ts.map +1 -1
  131. package/dist/sbapi/zod.gen.d.ts +8134 -26
  132. package/dist/sbapi/zod.gen.d.ts.map +1 -1
  133. package/dist/sbapi/zod.gen.js +6572 -18
  134. package/dist/sbapi/zod.gen.js.map +1 -1
  135. package/dist/sbmng/@tanstack/react-query.gen.d.ts +253 -157
  136. package/dist/sbmng/@tanstack/react-query.gen.d.ts.map +1 -1
  137. package/dist/sbmng/@tanstack/react-query.gen.js +241 -145
  138. package/dist/sbmng/@tanstack/react-query.gen.js.map +1 -1
  139. package/dist/sbmng/index.d.ts +2 -2
  140. package/dist/sbmng/index.d.ts.map +1 -1
  141. package/dist/sbmng/index.js +1 -1
  142. package/dist/sbmng/index.js.map +1 -1
  143. package/dist/sbmng/schemas.gen.d.ts +1035 -917
  144. package/dist/sbmng/schemas.gen.d.ts.map +1 -1
  145. package/dist/sbmng/schemas.gen.js +1219 -1067
  146. package/dist/sbmng/schemas.gen.js.map +1 -1
  147. package/dist/sbmng/sdk.gen.d.ts +62 -38
  148. package/dist/sbmng/sdk.gen.d.ts.map +1 -1
  149. package/dist/sbmng/sdk.gen.js +140 -84
  150. package/dist/sbmng/sdk.gen.js.map +1 -1
  151. package/dist/sbmng/types.gen.d.ts +1214 -991
  152. package/dist/sbmng/types.gen.d.ts.map +1 -1
  153. package/dist/supabase/auth-provider.d.ts +4 -0
  154. package/dist/supabase/auth-provider.d.ts.map +1 -0
  155. package/dist/supabase/auth-provider.js +45 -0
  156. package/dist/supabase/auth-provider.js.map +1 -0
  157. package/dist/supabase/cursor-pagination.d.ts +92 -0
  158. package/dist/supabase/cursor-pagination.d.ts.map +1 -0
  159. package/dist/supabase/cursor-pagination.js +116 -0
  160. package/dist/supabase/cursor-pagination.js.map +1 -0
  161. package/dist/supabase/schema/browser.d.ts.map +1 -0
  162. package/dist/supabase/schema/browser.js.map +1 -0
  163. package/dist/supabase/schema/index.d.ts +29 -0
  164. package/dist/supabase/schema/index.d.ts.map +1 -0
  165. package/dist/supabase/schema/index.js +38 -0
  166. package/dist/supabase/schema/index.js.map +1 -0
  167. package/dist/supabase/supabase-client.d.ts +1912 -1128
  168. package/dist/supabase/supabase-client.d.ts.map +1 -1
  169. package/dist/supabase/supabase.d.ts +4466 -2898
  170. package/dist/supabase/supabase.d.ts.map +1 -1
  171. package/dist/supabase/supabase.js +7 -4
  172. package/dist/supabase/supabase.js.map +1 -1
  173. package/dist/supabase/use-sb-query/use-query.d.ts +1 -1
  174. package/dist/supabase/use-sb-query/use-query.d.ts.map +1 -1
  175. package/dist/supabase/use-sb-query/use-query.js +2 -6
  176. package/dist/supabase/use-sb-query/use-query.js.map +1 -1
  177. package/dist/supabase/use-sb-query/use-rpc-mutation.d.ts +61 -0
  178. package/dist/supabase/use-sb-query/use-rpc-mutation.d.ts.map +1 -0
  179. package/dist/supabase/use-sb-query/use-rpc-mutation.js +63 -0
  180. package/dist/supabase/use-sb-query/use-rpc-mutation.js.map +1 -0
  181. package/dist/supabase/use-sb-query/use-rpc-query.d.ts +124 -0
  182. package/dist/supabase/use-sb-query/use-rpc-query.d.ts.map +1 -0
  183. package/dist/supabase/use-sb-query/use-rpc-query.js +91 -0
  184. package/dist/supabase/use-sb-query/use-rpc-query.js.map +1 -0
  185. package/dist/supabase/utils.d.ts +1 -1
  186. package/dist/supabase/utils.d.ts.map +1 -1
  187. package/dist/types/database.schemas.d.ts +3911 -0
  188. package/dist/types/database.schemas.d.ts.map +1 -0
  189. package/dist/types/database.schemas.js +3180 -0
  190. package/dist/types/database.schemas.js.map +1 -0
  191. package/dist/types/database.types.d.ts +1923 -1134
  192. package/dist/types/database.types.d.ts.map +1 -1
  193. package/dist/types/database.types.js +24 -0
  194. package/dist/types/database.types.js.map +1 -1
  195. package/dist/types/index.d.ts +47 -6
  196. package/dist/types/index.d.ts.map +1 -1
  197. package/dist/types/index.js +27 -1
  198. package/dist/types/index.js.map +1 -1
  199. package/dist/types/rpc.schemas.d.ts +64 -0
  200. package/dist/types/rpc.schemas.d.ts.map +1 -0
  201. package/dist/types/rpc.schemas.js +122 -0
  202. package/dist/types/rpc.schemas.js.map +1 -0
  203. package/package.json +48 -39
  204. package/src/adk/api/client.ts +46 -0
  205. package/src/adk/core/constants/tool-icons.ts +51 -0
  206. package/src/adk/core/models/AgentBuilder.ts +80 -0
  207. package/src/adk/core/models/AgentRunRequest.ts +33 -0
  208. package/src/adk/core/models/Eval.ts +70 -0
  209. package/src/adk/core/models/LiveRequest.ts +23 -0
  210. package/src/adk/core/models/RuntimeConfig.ts +33 -0
  211. package/src/adk/core/models/Session.ts +52 -0
  212. package/src/adk/core/models/Trace.ts +42 -0
  213. package/src/adk/core/models/types.ts +255 -0
  214. package/src/api_hatchet/@tanstack/react-query.gen.ts +3025 -0
  215. package/src/api_hatchet/client/client.gen.ts +311 -0
  216. package/src/api_hatchet/client/index.ts +25 -0
  217. package/src/api_hatchet/client/types.gen.ts +241 -0
  218. package/src/api_hatchet/client/utils.gen.ts +332 -0
  219. package/{dist/opencode/client.gen.d.ts → src/api_hatchet/client.gen.ts} +6 -3
  220. package/src/api_hatchet/core/auth.gen.ts +42 -0
  221. package/src/api_hatchet/core/bodySerializer.gen.ts +100 -0
  222. package/src/api_hatchet/core/params.gen.ts +176 -0
  223. package/src/api_hatchet/core/pathSerializer.gen.ts +181 -0
  224. package/src/api_hatchet/core/queryKeySerializer.gen.ts +136 -0
  225. package/src/api_hatchet/core/serverSentEvents.gen.ts +266 -0
  226. package/src/api_hatchet/core/types.gen.ts +118 -0
  227. package/src/api_hatchet/core/utils.gen.ts +143 -0
  228. package/src/api_hatchet/index.ts +4 -0
  229. package/src/api_hatchet/schemas.gen.ts +4961 -0
  230. package/src/api_hatchet/sdk.gen.ts +1994 -0
  231. package/src/api_hatchet/types.gen.ts +7688 -0
  232. package/src/api_hatchet/zod.gen.ts +3230 -0
  233. package/src/cloud-account/platform-configs.ts +73 -0
  234. package/src/gomtmapi/@tanstack/react-query.gen.ts +757 -0
  235. package/src/gomtmapi/client/client.gen.ts +311 -0
  236. package/src/gomtmapi/client/index.ts +25 -0
  237. package/src/gomtmapi/client/types.gen.ts +241 -0
  238. package/src/gomtmapi/client/utils.gen.ts +332 -0
  239. package/src/gomtmapi/client.gen.ts +16 -0
  240. package/src/gomtmapi/core/auth.gen.ts +42 -0
  241. package/src/gomtmapi/core/bodySerializer.gen.ts +100 -0
  242. package/src/gomtmapi/core/params.gen.ts +176 -0
  243. package/src/gomtmapi/core/pathSerializer.gen.ts +181 -0
  244. package/src/gomtmapi/core/queryKeySerializer.gen.ts +136 -0
  245. package/src/gomtmapi/core/serverSentEvents.gen.ts +266 -0
  246. package/src/gomtmapi/core/types.gen.ts +118 -0
  247. package/src/gomtmapi/core/utils.gen.ts +143 -0
  248. package/src/gomtmapi/index.ts +4 -0
  249. package/src/gomtmapi/schemas.gen.ts +904 -0
  250. package/src/gomtmapi/sdk.gen.ts +541 -0
  251. package/src/gomtmapi/types.gen.ts +1456 -0
  252. package/src/gomtmapi/zod.gen.ts +758 -0
  253. package/src/index.ts +5 -0
  254. package/src/lib/aisdk/types.ts +8 -0
  255. package/src/lib/logger/index.ts +8 -0
  256. package/src/lib/schema.ts +50 -0
  257. package/src/lib/utils.ts +54 -0
  258. package/src/mtgate_api/@tanstack/react-query.gen.ts +175 -0
  259. package/src/mtgate_api/client/client.gen.ts +311 -0
  260. package/src/mtgate_api/client/index.ts +25 -0
  261. package/src/mtgate_api/client/types.gen.ts +241 -0
  262. package/src/mtgate_api/client/utils.gen.ts +332 -0
  263. package/src/mtgate_api/client.gen.ts +16 -0
  264. package/src/mtgate_api/core/auth.gen.ts +42 -0
  265. package/src/mtgate_api/core/bodySerializer.gen.ts +100 -0
  266. package/src/mtgate_api/core/params.gen.ts +176 -0
  267. package/src/mtgate_api/core/pathSerializer.gen.ts +181 -0
  268. package/src/mtgate_api/core/queryKeySerializer.gen.ts +136 -0
  269. package/src/mtgate_api/core/serverSentEvents.gen.ts +266 -0
  270. package/src/mtgate_api/core/types.gen.ts +118 -0
  271. package/src/mtgate_api/core/utils.gen.ts +143 -0
  272. package/src/mtgate_api/index.ts +4 -0
  273. package/src/mtgate_api/schemas.gen.ts +337 -0
  274. package/src/mtgate_api/sdk.gen.ts +61 -0
  275. package/src/mtgate_api/types.gen.ts +324 -0
  276. package/src/mtgate_api/zod.gen.ts +234 -0
  277. package/src/mtmai_api/@tanstack/react-query.gen.ts +1010 -0
  278. package/src/mtmai_api/client/client.gen.ts +311 -0
  279. package/src/mtmai_api/client/index.ts +25 -0
  280. package/src/mtmai_api/client/types.gen.ts +241 -0
  281. package/src/mtmai_api/client/utils.gen.ts +332 -0
  282. package/src/mtmai_api/client.gen.ts +16 -0
  283. package/src/mtmai_api/core/auth.gen.ts +42 -0
  284. package/src/mtmai_api/core/bodySerializer.gen.ts +100 -0
  285. package/src/mtmai_api/core/params.gen.ts +176 -0
  286. package/src/mtmai_api/core/pathSerializer.gen.ts +181 -0
  287. package/src/mtmai_api/core/queryKeySerializer.gen.ts +136 -0
  288. package/src/mtmai_api/core/serverSentEvents.gen.ts +266 -0
  289. package/src/mtmai_api/core/types.gen.ts +118 -0
  290. package/src/mtmai_api/core/utils.gen.ts +143 -0
  291. package/src/mtmai_api/index.ts +4 -0
  292. package/src/mtmai_api/schemas.gen.ts +9980 -0
  293. package/src/mtmai_api/sdk.gen.ts +471 -0
  294. package/src/mtmai_api/types.gen.ts +7609 -0
  295. package/src/mtmai_api/zod.gen.ts +5101 -0
  296. package/src/openclaw/client-info.ts +63 -0
  297. package/src/openclaw/device-auth-utils.ts +31 -0
  298. package/src/openclaw/device-auth.ts +96 -0
  299. package/src/openclaw/device-identity.ts +108 -0
  300. package/src/openclaw/gateway.ts +351 -0
  301. package/src/openclaw/types.ts +518 -0
  302. package/src/openclaw/uuid.ts +48 -0
  303. package/src/sbapi/@tanstack/react-query.gen.ts +6591 -0
  304. package/src/sbapi/client/client.gen.ts +311 -0
  305. package/src/sbapi/client/index.ts +25 -0
  306. package/src/sbapi/client/types.gen.ts +241 -0
  307. package/src/sbapi/client/utils.gen.ts +332 -0
  308. package/src/sbapi/client.gen.ts +16 -0
  309. package/src/sbapi/core/auth.gen.ts +42 -0
  310. package/src/sbapi/core/bodySerializer.gen.ts +100 -0
  311. package/src/sbapi/core/params.gen.ts +176 -0
  312. package/src/sbapi/core/pathSerializer.gen.ts +181 -0
  313. package/src/sbapi/core/queryKeySerializer.gen.ts +136 -0
  314. package/src/sbapi/core/serverSentEvents.gen.ts +266 -0
  315. package/src/sbapi/core/types.gen.ts +118 -0
  316. package/src/sbapi/core/utils.gen.ts +143 -0
  317. package/src/sbapi/index.ts +4 -0
  318. package/src/sbapi/schemas.gen.ts +2643 -0
  319. package/src/sbapi/sdk.gen.ts +2822 -0
  320. package/src/sbapi/types.gen.ts +12503 -0
  321. package/src/sbapi/zod.gen.ts +7021 -0
  322. package/src/sbmng/@tanstack/react-query.gen.ts +2999 -0
  323. package/src/sbmng/client/client.gen.ts +311 -0
  324. package/src/sbmng/client/index.ts +25 -0
  325. package/src/sbmng/client/types.gen.ts +241 -0
  326. package/src/sbmng/client/utils.gen.ts +332 -0
  327. package/src/sbmng/client.gen.ts +16 -0
  328. package/src/sbmng/core/auth.gen.ts +42 -0
  329. package/src/sbmng/core/bodySerializer.gen.ts +100 -0
  330. package/src/sbmng/core/params.gen.ts +176 -0
  331. package/src/sbmng/core/pathSerializer.gen.ts +181 -0
  332. package/src/sbmng/core/queryKeySerializer.gen.ts +136 -0
  333. package/src/sbmng/core/serverSentEvents.gen.ts +266 -0
  334. package/src/sbmng/core/types.gen.ts +118 -0
  335. package/src/sbmng/core/utils.gen.ts +143 -0
  336. package/src/sbmng/index.ts +4 -0
  337. package/src/sbmng/schemas.gen.ts +9680 -0
  338. package/src/sbmng/sdk.gen.ts +1771 -0
  339. package/src/sbmng/types.gen.ts +7956 -0
  340. package/src/supabase/auth-provider.tsx +67 -0
  341. package/src/supabase/context.tsx +51 -0
  342. package/src/supabase/cursor-pagination.ts +155 -0
  343. package/src/supabase/schema/browser.ts +45 -0
  344. package/src/supabase/schema/index.ts +50 -0
  345. package/src/supabase/supabase-client.ts +30 -0
  346. package/src/supabase/supabase.ts +65 -0
  347. package/src/supabase/use-sb-query/build-query-opts.ts +56 -0
  348. package/src/supabase/use-sb-query/key.ts +57 -0
  349. package/src/supabase/use-sb-query/prefetch.ts +59 -0
  350. package/src/supabase/use-sb-query/use-query.ts +340 -0
  351. package/src/supabase/use-sb-query/use-rpc-mutation.ts +83 -0
  352. package/src/supabase/use-sb-query/use-rpc-query.ts +230 -0
  353. package/src/supabase/utils.ts +75 -0
  354. package/src/types/database.schemas.ts +3804 -0
  355. package/src/types/database.types.ts +3828 -0
  356. package/src/types/index.ts +119 -0
  357. package/src/types/rpc.schemas.ts +157 -0
  358. package/dist/gomtmapi_v2/@tanstack/react-query.gen.d.ts.map +0 -1
  359. package/dist/gomtmapi_v2/@tanstack/react-query.gen.js.map +0 -1
  360. package/dist/gomtmapi_v2/client/client.gen.d.ts.map +0 -1
  361. package/dist/gomtmapi_v2/client/client.gen.js.map +0 -1
  362. package/dist/gomtmapi_v2/client/index.d.ts.map +0 -1
  363. package/dist/gomtmapi_v2/client/index.js.map +0 -1
  364. package/dist/gomtmapi_v2/client/types.gen.d.ts.map +0 -1
  365. package/dist/gomtmapi_v2/client/types.gen.js.map +0 -1
  366. package/dist/gomtmapi_v2/client/utils.gen.d.ts.map +0 -1
  367. package/dist/gomtmapi_v2/client/utils.gen.js.map +0 -1
  368. package/dist/gomtmapi_v2/client.gen.d.ts.map +0 -1
  369. package/dist/gomtmapi_v2/client.gen.js.map +0 -1
  370. package/dist/gomtmapi_v2/core/auth.gen.d.ts.map +0 -1
  371. package/dist/gomtmapi_v2/core/auth.gen.js.map +0 -1
  372. package/dist/gomtmapi_v2/core/bodySerializer.gen.d.ts.map +0 -1
  373. package/dist/gomtmapi_v2/core/bodySerializer.gen.js.map +0 -1
  374. package/dist/gomtmapi_v2/core/params.gen.d.ts.map +0 -1
  375. package/dist/gomtmapi_v2/core/params.gen.js.map +0 -1
  376. package/dist/gomtmapi_v2/core/pathSerializer.gen.d.ts.map +0 -1
  377. package/dist/gomtmapi_v2/core/pathSerializer.gen.js.map +0 -1
  378. package/dist/gomtmapi_v2/core/queryKeySerializer.gen.d.ts.map +0 -1
  379. package/dist/gomtmapi_v2/core/queryKeySerializer.gen.js.map +0 -1
  380. package/dist/gomtmapi_v2/core/serverSentEvents.gen.d.ts.map +0 -1
  381. package/dist/gomtmapi_v2/core/serverSentEvents.gen.js.map +0 -1
  382. package/dist/gomtmapi_v2/core/types.gen.d.ts.map +0 -1
  383. package/dist/gomtmapi_v2/core/types.gen.js.map +0 -1
  384. package/dist/gomtmapi_v2/core/utils.gen.d.ts.map +0 -1
  385. package/dist/gomtmapi_v2/core/utils.gen.js.map +0 -1
  386. package/dist/gomtmapi_v2/index.d.ts +0 -3
  387. package/dist/gomtmapi_v2/index.d.ts.map +0 -1
  388. package/dist/gomtmapi_v2/index.js +0 -3
  389. package/dist/gomtmapi_v2/index.js.map +0 -1
  390. package/dist/gomtmapi_v2/schemas.gen.d.ts.map +0 -1
  391. package/dist/gomtmapi_v2/schemas.gen.js.map +0 -1
  392. package/dist/gomtmapi_v2/sdk.gen.d.ts +0 -208
  393. package/dist/gomtmapi_v2/sdk.gen.d.ts.map +0 -1
  394. package/dist/gomtmapi_v2/sdk.gen.js.map +0 -1
  395. package/dist/gomtmapi_v2/types.gen.d.ts.map +0 -1
  396. package/dist/gomtmapi_v2/types.gen.js.map +0 -1
  397. package/dist/gomtmapi_v2/zod.gen.d.ts.map +0 -1
  398. package/dist/gomtmapi_v2/zod.gen.js.map +0 -1
  399. package/dist/opencode/@tanstack/react-query.gen.d.ts +0 -1903
  400. package/dist/opencode/@tanstack/react-query.gen.d.ts.map +0 -1
  401. package/dist/opencode/@tanstack/react-query.gen.js +0 -1696
  402. package/dist/opencode/@tanstack/react-query.gen.js.map +0 -1
  403. package/dist/opencode/client/client.gen.d.ts +0 -3
  404. package/dist/opencode/client/client.gen.js +0 -236
  405. package/dist/opencode/client/index.d.ts +0 -9
  406. package/dist/opencode/client/index.js +0 -7
  407. package/dist/opencode/client/types.gen.d.ts +0 -118
  408. package/dist/opencode/client/types.gen.js +0 -3
  409. package/dist/opencode/client/types.gen.js.map +0 -1
  410. package/dist/opencode/client/utils.gen.d.ts +0 -34
  411. package/dist/opencode/client/utils.gen.js +0 -232
  412. package/dist/opencode/client.gen.js +0 -4
  413. package/dist/opencode/core/auth.gen.d.ts +0 -19
  414. package/dist/opencode/core/auth.gen.js +0 -15
  415. package/dist/opencode/core/bodySerializer.gen.d.ts +0 -26
  416. package/dist/opencode/core/bodySerializer.gen.js +0 -58
  417. package/dist/opencode/core/params.gen.d.ts +0 -44
  418. package/dist/opencode/core/params.gen.js +0 -101
  419. package/dist/opencode/core/pathSerializer.gen.d.ts +0 -34
  420. package/dist/opencode/core/pathSerializer.gen.js +0 -115
  421. package/dist/opencode/core/queryKeySerializer.gen.d.ts +0 -19
  422. package/dist/opencode/core/queryKeySerializer.gen.js +0 -100
  423. package/dist/opencode/core/serverSentEvents.gen.d.ts +0 -72
  424. package/dist/opencode/core/serverSentEvents.gen.js +0 -138
  425. package/dist/opencode/core/types.gen.d.ts +0 -79
  426. package/dist/opencode/core/types.gen.js +0 -3
  427. package/dist/opencode/core/types.gen.js.map +0 -1
  428. package/dist/opencode/core/utils.gen.d.ts +0 -20
  429. package/dist/opencode/core/utils.gen.js +0 -88
  430. package/dist/opencode/index.d.ts +0 -3
  431. package/dist/opencode/index.d.ts.map +0 -1
  432. package/dist/opencode/index.js +0 -4
  433. package/dist/opencode/index.js.map +0 -1
  434. package/dist/opencode/schemas.gen.d.ts +0 -4823
  435. package/dist/opencode/schemas.gen.d.ts.map +0 -1
  436. package/dist/opencode/schemas.gen.js +0 -5816
  437. package/dist/opencode/schemas.gen.js.map +0 -1
  438. package/dist/opencode/sdk.gen.d.ts +0 -562
  439. package/dist/opencode/sdk.gen.d.ts.map +0 -1
  440. package/dist/opencode/sdk.gen.js +0 -766
  441. package/dist/opencode/sdk.gen.js.map +0 -1
  442. package/dist/opencode/types.gen.d.ts +0 -4213
  443. package/dist/opencode/types.gen.d.ts.map +0 -1
  444. package/dist/opencode/types.gen.js +0 -25
  445. package/dist/opencode/types.gen.js.map +0 -1
  446. package/dist/opencode/zod.gen.d.ts +0 -17243
  447. package/dist/opencode/zod.gen.d.ts.map +0 -1
  448. package/dist/opencode/zod.gen.js +0 -2876
  449. package/dist/opencode/zod.gen.js.map +0 -1
  450. package/dist/schema/browser.d.ts.map +0 -1
  451. package/dist/schema/browser.js.map +0 -1
  452. /package/dist/{gomtmapi_v2 → gomtmapi}/client/client.gen.d.ts +0 -0
  453. /package/dist/{gomtmapi_v2 → gomtmapi}/client/client.gen.js +0 -0
  454. /package/dist/{gomtmapi_v2 → gomtmapi}/client/index.d.ts +0 -0
  455. /package/dist/{gomtmapi_v2 → gomtmapi}/client/index.js +0 -0
  456. /package/dist/{gomtmapi_v2 → gomtmapi}/client/types.gen.d.ts +0 -0
  457. /package/dist/{gomtmapi_v2 → gomtmapi}/client/types.gen.js +0 -0
  458. /package/dist/{gomtmapi_v2 → gomtmapi}/client/utils.gen.d.ts +0 -0
  459. /package/dist/{gomtmapi_v2 → gomtmapi}/client/utils.gen.js +0 -0
  460. /package/dist/{gomtmapi_v2 → gomtmapi}/client.gen.d.ts +0 -0
  461. /package/dist/{gomtmapi_v2 → gomtmapi}/client.gen.js +0 -0
  462. /package/dist/{gomtmapi_v2 → gomtmapi}/core/auth.gen.d.ts +0 -0
  463. /package/dist/{gomtmapi_v2 → gomtmapi}/core/auth.gen.js +0 -0
  464. /package/dist/{gomtmapi_v2 → gomtmapi}/core/bodySerializer.gen.d.ts +0 -0
  465. /package/dist/{gomtmapi_v2 → gomtmapi}/core/bodySerializer.gen.js +0 -0
  466. /package/dist/{gomtmapi_v2 → gomtmapi}/core/params.gen.d.ts +0 -0
  467. /package/dist/{gomtmapi_v2 → gomtmapi}/core/params.gen.js +0 -0
  468. /package/dist/{gomtmapi_v2 → gomtmapi}/core/pathSerializer.gen.d.ts +0 -0
  469. /package/dist/{gomtmapi_v2 → gomtmapi}/core/pathSerializer.gen.js +0 -0
  470. /package/dist/{gomtmapi_v2 → gomtmapi}/core/queryKeySerializer.gen.d.ts +0 -0
  471. /package/dist/{gomtmapi_v2 → gomtmapi}/core/queryKeySerializer.gen.js +0 -0
  472. /package/dist/{gomtmapi_v2 → gomtmapi}/core/serverSentEvents.gen.d.ts +0 -0
  473. /package/dist/{gomtmapi_v2 → gomtmapi}/core/serverSentEvents.gen.js +0 -0
  474. /package/dist/{gomtmapi_v2 → gomtmapi}/core/types.gen.d.ts +0 -0
  475. /package/dist/{gomtmapi_v2 → gomtmapi}/core/types.gen.js +0 -0
  476. /package/dist/{gomtmapi_v2 → gomtmapi}/core/utils.gen.d.ts +0 -0
  477. /package/dist/{gomtmapi_v2 → gomtmapi}/core/utils.gen.js +0 -0
  478. /package/dist/{gomtmapi_v2 → gomtmapi}/types.gen.js +0 -0
  479. /package/dist/{schema → supabase/schema}/browser.d.ts +0 -0
  480. /package/dist/{schema → supabase/schema}/browser.js +0 -0
@@ -0,0 +1,2643 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ export const worker_tasksSchema = {
4
+ required: [
5
+ 'id',
6
+ 'created_at',
7
+ 'updated_at',
8
+ 'type',
9
+ 'payload'
10
+ ],
11
+ properties: {
12
+ id: {
13
+ default: 'gen_random_uuid()',
14
+ description: 'Note:\nThis is a Primary Key.<pk/>',
15
+ format: 'uuid',
16
+ type: 'string'
17
+ },
18
+ created_at: {
19
+ default: 'now()',
20
+ format: 'timestamp with time zone',
21
+ type: 'string'
22
+ },
23
+ updated_at: {
24
+ default: 'now()',
25
+ format: 'timestamp with time zone',
26
+ type: 'string'
27
+ },
28
+ worker_id: {
29
+ description: '定点投递:指定执行该任务的 Worker ID',
30
+ format: 'text',
31
+ type: 'string'
32
+ },
33
+ type: {
34
+ format: 'text',
35
+ type: 'string'
36
+ },
37
+ status: {
38
+ default: 'pending',
39
+ format: 'text',
40
+ type: 'string'
41
+ },
42
+ payload: {
43
+ format: 'jsonb'
44
+ },
45
+ result: {
46
+ format: 'jsonb'
47
+ },
48
+ error: {
49
+ format: 'text',
50
+ type: 'string'
51
+ },
52
+ session_id: {
53
+ description: '关联的会话ID,用于任务完成后的回调通知',
54
+ format: 'text',
55
+ type: 'string'
56
+ },
57
+ user_id: {
58
+ format: 'uuid',
59
+ type: 'string'
60
+ }
61
+ },
62
+ type: 'object'
63
+ } as const;
64
+
65
+ export const linked_accountsSchema = {
66
+ required: [
67
+ 'id',
68
+ 'created_at',
69
+ 'user_id'
70
+ ],
71
+ properties: {
72
+ id: {
73
+ default: 'gen_random_uuid()',
74
+ description: 'Note:\nThis is a Primary Key.<pk/>',
75
+ format: 'uuid',
76
+ type: 'string'
77
+ },
78
+ created_at: {
79
+ default: 'now()',
80
+ format: 'timestamp with time zone',
81
+ type: 'string'
82
+ },
83
+ updated_at: {
84
+ default: 'now()',
85
+ format: 'timestamp with time zone',
86
+ type: 'string'
87
+ },
88
+ user_id: {
89
+ format: 'uuid',
90
+ type: 'string'
91
+ },
92
+ platform_id: {
93
+ description: 'Note:\nThis is a Foreign Key to `platforms.id`.<fk table=\'platforms\' column=\'id\'/>',
94
+ format: 'uuid',
95
+ type: 'string'
96
+ },
97
+ name: {
98
+ format: 'text',
99
+ type: 'string'
100
+ },
101
+ credentials: {
102
+ format: 'jsonb'
103
+ },
104
+ session_data: {
105
+ format: 'jsonb'
106
+ },
107
+ status: {
108
+ default: 'active',
109
+ format: 'text',
110
+ type: 'string'
111
+ },
112
+ last_used_at: {
113
+ format: 'timestamp with time zone',
114
+ type: 'string'
115
+ }
116
+ },
117
+ type: 'object'
118
+ } as const;
119
+
120
+ export const audit_assetsSchema = {
121
+ required: [
122
+ 'id',
123
+ 'created_at',
124
+ 'updated_at',
125
+ 'project_id',
126
+ 'type',
127
+ 'content'
128
+ ],
129
+ properties: {
130
+ id: {
131
+ default: 'extensions.uuid_generate_v4()',
132
+ description: 'Note:\nThis is a Primary Key.<pk/>',
133
+ format: 'uuid',
134
+ type: 'string'
135
+ },
136
+ created_at: {
137
+ default: 'now()',
138
+ format: 'timestamp with time zone',
139
+ type: 'string'
140
+ },
141
+ updated_at: {
142
+ default: 'now()',
143
+ format: 'timestamp with time zone',
144
+ type: 'string'
145
+ },
146
+ project_id: {
147
+ description: 'Note:\nThis is a Foreign Key to `audit_projects.id`.<fk table=\'audit_projects\' column=\'id\'/>',
148
+ format: 'uuid',
149
+ type: 'string'
150
+ },
151
+ type: {
152
+ format: 'text',
153
+ type: 'string'
154
+ },
155
+ content: {
156
+ format: 'text',
157
+ type: 'string'
158
+ },
159
+ metadata: {
160
+ format: 'jsonb'
161
+ },
162
+ status: {
163
+ default: 'discovered',
164
+ format: 'text',
165
+ type: 'string'
166
+ }
167
+ },
168
+ type: 'object'
169
+ } as const;
170
+
171
+ export const gomtm_modelsSchema = {
172
+ description: 'AI 模型配置表,支持直接 API Key 配置或通过 linked_accounts 关联 OAuth 凭据',
173
+ required: [
174
+ 'id',
175
+ 'created_at',
176
+ 'updated_at',
177
+ 'user_id',
178
+ 'name',
179
+ 'provider',
180
+ 'model',
181
+ 'is_active'
182
+ ],
183
+ properties: {
184
+ id: {
185
+ default: 'gen_random_uuid()',
186
+ description: '主键ID\n\nNote:\nThis is a Primary Key.<pk/>',
187
+ format: 'uuid',
188
+ type: 'string'
189
+ },
190
+ created_at: {
191
+ default: 'now()',
192
+ description: '创建时间',
193
+ format: 'timestamp with time zone',
194
+ type: 'string'
195
+ },
196
+ updated_at: {
197
+ default: 'now()',
198
+ description: '更新时间',
199
+ format: 'timestamp with time zone',
200
+ type: 'string'
201
+ },
202
+ user_id: {
203
+ description: '用户ID',
204
+ format: 'uuid',
205
+ type: 'string'
206
+ },
207
+ name: {
208
+ description: '模型显示名称',
209
+ format: 'character varying',
210
+ maxLength: 100,
211
+ type: 'string'
212
+ },
213
+ provider: {
214
+ description: '提供商(如 openai, qwen, anthropic)',
215
+ format: 'character varying',
216
+ maxLength: 50,
217
+ type: 'string'
218
+ },
219
+ model: {
220
+ description: '模型名称(如 gpt-4o, qwen-plus)',
221
+ format: 'character varying',
222
+ maxLength: 100,
223
+ type: 'string'
224
+ },
225
+ api_base: {
226
+ description: 'API 基础 URL',
227
+ format: 'character varying',
228
+ maxLength: 500,
229
+ type: 'string'
230
+ },
231
+ api_key: {
232
+ description: 'API 密钥(直接认证时使用)',
233
+ format: 'character varying',
234
+ maxLength: 500,
235
+ type: 'string'
236
+ },
237
+ linked_account_id: {
238
+ description: '关联的 OAuth 账号 ID(OAuth 认证时使用)\n\nNote:\nThis is a Foreign Key to `linked_accounts.id`.<fk table=\'linked_accounts\' column=\'id\'/>',
239
+ format: 'uuid',
240
+ type: 'string'
241
+ },
242
+ is_active: {
243
+ default: true,
244
+ description: '是否启用',
245
+ format: 'boolean',
246
+ type: 'boolean'
247
+ },
248
+ config: {
249
+ description: '其他配置信息(JSON 格式)',
250
+ format: 'jsonb'
251
+ }
252
+ },
253
+ type: 'object'
254
+ } as const;
255
+
256
+ export const workflow_instancesSchema = {
257
+ required: [
258
+ 'id',
259
+ 'user_id'
260
+ ],
261
+ properties: {
262
+ id: {
263
+ default: 'gen_random_uuid()',
264
+ description: 'Note:\nThis is a Primary Key.<pk/>',
265
+ format: 'uuid',
266
+ type: 'string'
267
+ },
268
+ user_id: {
269
+ format: 'uuid',
270
+ type: 'string'
271
+ },
272
+ title: {
273
+ format: 'text',
274
+ type: 'string'
275
+ },
276
+ description: {
277
+ format: 'text',
278
+ type: 'string'
279
+ },
280
+ code_content: {
281
+ format: 'text',
282
+ type: 'string'
283
+ },
284
+ status: {
285
+ default: 'pending',
286
+ format: 'text',
287
+ type: 'string'
288
+ },
289
+ result: {
290
+ format: 'jsonb'
291
+ },
292
+ error_message: {
293
+ format: 'text',
294
+ type: 'string'
295
+ },
296
+ created_at: {
297
+ default: 'now()',
298
+ format: 'timestamp with time zone',
299
+ type: 'string'
300
+ },
301
+ updated_at: {
302
+ default: 'now()',
303
+ format: 'timestamp with time zone',
304
+ type: 'string'
305
+ },
306
+ notebook_json: {
307
+ format: 'jsonb'
308
+ }
309
+ },
310
+ type: 'object'
311
+ } as const;
312
+
313
+ export const serversSchema = {
314
+ description: '以http api提供的服务',
315
+ required: [
316
+ 'id',
317
+ 'created_at',
318
+ 'updated_at',
319
+ 'service_type',
320
+ 'is_health'
321
+ ],
322
+ properties: {
323
+ id: {
324
+ default: 'gen_random_uuid()',
325
+ description: 'Note:\nThis is a Primary Key.<pk/>',
326
+ format: 'uuid',
327
+ type: 'string'
328
+ },
329
+ created_at: {
330
+ default: 'now()',
331
+ format: 'timestamp with time zone',
332
+ type: 'string'
333
+ },
334
+ updated_at: {
335
+ default: 'now()',
336
+ format: 'timestamp with time zone',
337
+ type: 'string'
338
+ },
339
+ service_type: {
340
+ format: 'text',
341
+ type: 'string'
342
+ },
343
+ local_url: {
344
+ format: 'text',
345
+ type: 'string'
346
+ },
347
+ public_url: {
348
+ format: 'text',
349
+ type: 'string'
350
+ },
351
+ worker_id: {
352
+ format: 'uuid',
353
+ type: 'string'
354
+ },
355
+ user_id: {
356
+ format: 'uuid',
357
+ type: 'string'
358
+ },
359
+ is_health: {
360
+ default: false,
361
+ format: 'boolean',
362
+ type: 'boolean'
363
+ }
364
+ },
365
+ type: 'object'
366
+ } as const;
367
+
368
+ export const proxiesSchema = {
369
+ description: '网络代理配置',
370
+ required: [
371
+ 'id',
372
+ 'created_at',
373
+ 'url',
374
+ 'enabled'
375
+ ],
376
+ properties: {
377
+ id: {
378
+ default: 'gen_random_uuid()',
379
+ description: 'Note:\nThis is a Primary Key.<pk/>',
380
+ format: 'uuid',
381
+ type: 'string'
382
+ },
383
+ created_at: {
384
+ default: 'now()',
385
+ format: 'timestamp with time zone',
386
+ type: 'string'
387
+ },
388
+ updated_at: {
389
+ default: 'now()',
390
+ format: 'timestamp with time zone',
391
+ type: 'string'
392
+ },
393
+ name: {
394
+ description: '显示名称',
395
+ format: 'text',
396
+ type: 'string'
397
+ },
398
+ description: {
399
+ description: '描述',
400
+ format: 'text',
401
+ type: 'string'
402
+ },
403
+ url: {
404
+ description: '完整代理URL',
405
+ format: 'text',
406
+ type: 'string'
407
+ },
408
+ type: {
409
+ description: '代理协议(类型)',
410
+ format: 'text',
411
+ type: 'string'
412
+ },
413
+ enabled: {
414
+ default: true,
415
+ description: '是否启用',
416
+ format: 'boolean',
417
+ type: 'boolean'
418
+ },
419
+ user_id: {
420
+ format: 'uuid',
421
+ type: 'string'
422
+ }
423
+ },
424
+ type: 'object'
425
+ } as const;
426
+
427
+ export const dash_navitemsSchema = {
428
+ description: '用户后台侧边栏导航菜单',
429
+ required: [
430
+ 'id',
431
+ 'created_at',
432
+ 'label'
433
+ ],
434
+ properties: {
435
+ id: {
436
+ default: 'gen_random_uuid()',
437
+ description: 'Note:\nThis is a Primary Key.<pk/>',
438
+ format: 'uuid',
439
+ type: 'string'
440
+ },
441
+ created_at: {
442
+ default: 'now()',
443
+ format: 'timestamp with time zone',
444
+ type: 'string'
445
+ },
446
+ label: {
447
+ format: 'text',
448
+ type: 'string'
449
+ },
450
+ icon: {
451
+ format: 'text',
452
+ type: 'string'
453
+ },
454
+ url: {
455
+ format: 'text',
456
+ type: 'string'
457
+ },
458
+ ord: {
459
+ default: 100,
460
+ format: 'integer',
461
+ type: 'integer'
462
+ },
463
+ tooltip: {
464
+ format: 'text',
465
+ type: 'string'
466
+ },
467
+ badge: {
468
+ format: 'text',
469
+ type: 'string'
470
+ },
471
+ enabled: {
472
+ default: true,
473
+ format: 'boolean',
474
+ type: 'boolean'
475
+ },
476
+ required_role: {
477
+ enum: [
478
+ 'admin',
479
+ 'moderator',
480
+ 'member'
481
+ ],
482
+ format: 'public.app_role',
483
+ type: 'string'
484
+ },
485
+ parent_id: {
486
+ description: 'Note:\nThis is a Foreign Key to `dash_navitems.id`.<fk table=\'dash_navitems\' column=\'id\'/>',
487
+ format: 'uuid',
488
+ type: 'string'
489
+ },
490
+ location: {
491
+ default: 'sidebar_main',
492
+ format: 'text',
493
+ type: 'string'
494
+ }
495
+ },
496
+ type: 'object'
497
+ } as const;
498
+
499
+ export const chat_messagesSchema = {
500
+ description: '聊天消息',
501
+ required: [
502
+ 'id',
503
+ 'created_at',
504
+ 'updated_at',
505
+ 'chat_id',
506
+ 'role',
507
+ 'parts'
508
+ ],
509
+ properties: {
510
+ id: {
511
+ default: 'gen_random_uuid()',
512
+ description: 'Note:\nThis is a Primary Key.<pk/>',
513
+ format: 'uuid',
514
+ type: 'string'
515
+ },
516
+ created_at: {
517
+ default: 'now()',
518
+ format: 'timestamp with time zone',
519
+ type: 'string'
520
+ },
521
+ updated_at: {
522
+ default: 'now()',
523
+ format: 'timestamp with time zone',
524
+ type: 'string'
525
+ },
526
+ chat_id: {
527
+ description: 'Note:\nThis is a Foreign Key to `chats.id`.<fk table=\'chats\' column=\'id\'/>',
528
+ format: 'uuid',
529
+ type: 'string'
530
+ },
531
+ role: {
532
+ default: 'user',
533
+ enum: [
534
+ 'system',
535
+ 'user',
536
+ 'assistant',
537
+ 'model',
538
+ 'error',
539
+ 'tool'
540
+ ],
541
+ format: 'public.chat_role',
542
+ type: 'string'
543
+ },
544
+ parts: {
545
+ format: 'jsonb'
546
+ },
547
+ attachments: {
548
+ format: 'jsonb'
549
+ },
550
+ user_id: {
551
+ format: 'uuid',
552
+ type: 'string'
553
+ },
554
+ grounding_metadata: {
555
+ description: 'Google Search Grounding 元数据',
556
+ format: 'jsonb'
557
+ }
558
+ },
559
+ type: 'object'
560
+ } as const;
561
+
562
+ export const chatsSchema = {
563
+ description: '聊天主表',
564
+ required: [
565
+ 'id',
566
+ 'created_at',
567
+ 'title',
568
+ 'visibility',
569
+ 'agent_id',
570
+ 'type'
571
+ ],
572
+ properties: {
573
+ id: {
574
+ default: 'gen_random_uuid()',
575
+ description: 'Note:\nThis is a Primary Key.<pk/>',
576
+ format: 'uuid',
577
+ type: 'string'
578
+ },
579
+ created_at: {
580
+ default: 'now()',
581
+ format: 'timestamp with time zone',
582
+ type: 'string'
583
+ },
584
+ updated_at: {
585
+ format: 'timestamp with time zone',
586
+ type: 'string'
587
+ },
588
+ title: {
589
+ format: 'text',
590
+ type: 'string'
591
+ },
592
+ user_id: {
593
+ format: 'uuid',
594
+ type: 'string'
595
+ },
596
+ visibility: {
597
+ default: 'private',
598
+ description: 'Chat visibility: private or public',
599
+ enum: [
600
+ 'private',
601
+ 'public'
602
+ ],
603
+ format: 'public.chat_visibility',
604
+ type: 'string'
605
+ },
606
+ lastContext: {
607
+ description: 'type: AppUsage',
608
+ format: 'jsonb'
609
+ },
610
+ agent_id: {
611
+ format: 'text',
612
+ type: 'string'
613
+ },
614
+ state: {
615
+ format: 'jsonb'
616
+ },
617
+ type: {
618
+ default: 'standard',
619
+ description: '对话类型: standard (普通对话), inbox (用户系统收件箱/主会话)',
620
+ format: 'text',
621
+ type: 'string'
622
+ }
623
+ },
624
+ type: 'object'
625
+ } as const;
626
+
627
+ export const services_lajiSchema = {
628
+ description: '以http api提供的服务',
629
+ required: [
630
+ 'id',
631
+ 'created_at',
632
+ 'updated_at',
633
+ 'service_type',
634
+ 'is_health'
635
+ ],
636
+ properties: {
637
+ id: {
638
+ default: 'gen_random_uuid()',
639
+ description: 'Note:\nThis is a Primary Key.<pk/>',
640
+ format: 'uuid',
641
+ type: 'string'
642
+ },
643
+ created_at: {
644
+ default: 'now()',
645
+ format: 'timestamp with time zone',
646
+ type: 'string'
647
+ },
648
+ updated_at: {
649
+ default: 'now()',
650
+ format: 'timestamp with time zone',
651
+ type: 'string'
652
+ },
653
+ service_type: {
654
+ format: 'text',
655
+ type: 'string'
656
+ },
657
+ local_url: {
658
+ format: 'text',
659
+ type: 'string'
660
+ },
661
+ public_url: {
662
+ format: 'text',
663
+ type: 'string'
664
+ },
665
+ worker_id: {
666
+ format: 'text',
667
+ type: 'string'
668
+ },
669
+ user_id: {
670
+ default: 'gen_random_uuid()',
671
+ format: 'uuid',
672
+ type: 'string'
673
+ },
674
+ is_health: {
675
+ default: false,
676
+ format: 'boolean',
677
+ type: 'boolean'
678
+ }
679
+ },
680
+ type: 'object'
681
+ } as const;
682
+
683
+ export const user_logsSchema = {
684
+ required: [
685
+ 'id',
686
+ 'user_id',
687
+ 'event_type',
688
+ 'level'
689
+ ],
690
+ properties: {
691
+ id: {
692
+ default: 'gen_random_uuid()',
693
+ description: 'Note:\nThis is a Primary Key.<pk/>',
694
+ format: 'uuid',
695
+ type: 'string'
696
+ },
697
+ user_id: {
698
+ default: 'auth.uid()',
699
+ format: 'uuid',
700
+ type: 'string'
701
+ },
702
+ event_type: {
703
+ format: 'text',
704
+ type: 'string'
705
+ },
706
+ level: {
707
+ format: 'text',
708
+ type: 'string'
709
+ },
710
+ content: {
711
+ format: 'text',
712
+ type: 'string'
713
+ },
714
+ meta: {
715
+ format: 'jsonb'
716
+ },
717
+ resource_type: {
718
+ format: 'text',
719
+ type: 'string'
720
+ },
721
+ resource_id: {
722
+ format: 'uuid',
723
+ type: 'string'
724
+ },
725
+ created_at: {
726
+ default: 'now()',
727
+ format: 'timestamp with time zone',
728
+ type: 'string'
729
+ }
730
+ },
731
+ type: 'object'
732
+ } as const;
733
+
734
+ export const browsersSchema = {
735
+ description: '浏览器',
736
+ required: [
737
+ 'id',
738
+ 'created_at'
739
+ ],
740
+ properties: {
741
+ id: {
742
+ default: 'gen_random_uuid()',
743
+ description: 'Note:\nThis is a Primary Key.<pk/>',
744
+ format: 'uuid',
745
+ type: 'string'
746
+ },
747
+ created_at: {
748
+ default: 'now()',
749
+ format: 'timestamp with time zone',
750
+ type: 'string'
751
+ },
752
+ updated_at: {
753
+ default: 'now()',
754
+ format: 'timestamp with time zone',
755
+ type: 'string'
756
+ },
757
+ sandbox_id: {
758
+ description: '运行的sandbox实例ID',
759
+ format: 'text',
760
+ type: 'string'
761
+ },
762
+ title: {
763
+ description: '标题',
764
+ format: 'text',
765
+ type: 'string'
766
+ },
767
+ description: {
768
+ description: '描述',
769
+ format: 'text',
770
+ type: 'string'
771
+ },
772
+ cdpUrl: {
773
+ description: 'cdp 端点',
774
+ format: 'text',
775
+ type: 'string'
776
+ },
777
+ user_id: {
778
+ format: 'uuid',
779
+ type: 'string'
780
+ },
781
+ profile_id: {
782
+ description: 'profile_id',
783
+ format: 'text',
784
+ type: 'string'
785
+ },
786
+ provider: {
787
+ format: 'text',
788
+ type: 'string'
789
+ },
790
+ provider_config: {
791
+ format: 'jsonb'
792
+ },
793
+ config: {
794
+ description: '存储浏览器配置及持久化状态(如Cookies)',
795
+ format: 'jsonb'
796
+ }
797
+ },
798
+ type: 'object'
799
+ } as const;
800
+
801
+ export const request_trackerSchema = {
802
+ properties: {
803
+ method: {
804
+ format: 'text',
805
+ type: 'string'
806
+ },
807
+ url: {
808
+ format: 'text',
809
+ type: 'string'
810
+ },
811
+ params: {
812
+ format: 'jsonb'
813
+ },
814
+ body: {
815
+ format: 'jsonb'
816
+ },
817
+ headers: {
818
+ format: 'jsonb'
819
+ },
820
+ request_id: {
821
+ format: 'bigint',
822
+ type: 'integer'
823
+ },
824
+ type: {
825
+ description: '服务类型',
826
+ format: 'text',
827
+ type: 'string'
828
+ }
829
+ },
830
+ type: 'object'
831
+ } as const;
832
+
833
+ export const workersSchema = {
834
+ description: 'Cleanup: Removed legacy on_worker_ready trigger that relied on deprecated config->publicUrl.',
835
+ required: [
836
+ 'id',
837
+ 'created_at',
838
+ 'updated_at',
839
+ 'host_id'
840
+ ],
841
+ properties: {
842
+ id: {
843
+ description: 'Note:\nThis is a Primary Key.<pk/>',
844
+ format: 'text',
845
+ type: 'string'
846
+ },
847
+ created_at: {
848
+ default: 'now()',
849
+ format: 'timestamp with time zone',
850
+ type: 'string'
851
+ },
852
+ updated_at: {
853
+ default: 'now()',
854
+ format: 'timestamp with time zone',
855
+ type: 'string'
856
+ },
857
+ name: {
858
+ format: 'text',
859
+ type: 'string'
860
+ },
861
+ user_id: {
862
+ default: 'auth.uid()',
863
+ format: 'uuid',
864
+ type: 'string'
865
+ },
866
+ state: {
867
+ format: 'jsonb'
868
+ },
869
+ latest_pull_at: {
870
+ format: 'timestamp with time zone',
871
+ type: 'string'
872
+ },
873
+ config: {
874
+ description: 'worker config (配置信息)',
875
+ format: 'jsonb'
876
+ },
877
+ host_id: {
878
+ description: '所属计算节点ID, 不能为空\n\nNote:\nThis is a Foreign Key to `compute_nodes.id`.<fk table=\'compute_nodes\' column=\'id\'/>',
879
+ format: 'uuid',
880
+ type: 'string'
881
+ },
882
+ container_id: {
883
+ format: 'text',
884
+ type: 'string'
885
+ },
886
+ status: {
887
+ default: 'offline',
888
+ description: 'created, pending, starting, running, offlining, offline, error',
889
+ enum: [
890
+ 'starting',
891
+ 'running',
892
+ 'stopping',
893
+ 'stopped',
894
+ 'offline'
895
+ ],
896
+ format: 'public.worker_status',
897
+ type: 'string'
898
+ },
899
+ is_managed: {
900
+ default: false,
901
+ description: 'Whether the worker is managed by the system (e.g. Docker container)',
902
+ format: 'boolean',
903
+ type: 'boolean'
904
+ },
905
+ public_domain: {
906
+ description: 'Worker 节点的公网访问域名',
907
+ format: 'text',
908
+ type: 'string'
909
+ }
910
+ },
911
+ type: 'object'
912
+ } as const;
913
+
914
+ export const resourcesSchema = {
915
+ description: '通用列表视图',
916
+ required: [
917
+ 'id',
918
+ 'created_at'
919
+ ],
920
+ properties: {
921
+ id: {
922
+ default: 'gen_random_uuid()',
923
+ description: 'Note:\nThis is a Primary Key.<pk/>',
924
+ format: 'uuid',
925
+ type: 'string'
926
+ },
927
+ created_at: {
928
+ default: 'now()',
929
+ format: 'timestamp with time zone',
930
+ type: 'string'
931
+ },
932
+ updated_at: {
933
+ default: 'now()',
934
+ format: 'timestamp with time zone',
935
+ type: 'string'
936
+ },
937
+ user_id: {
938
+ default: 'gen_random_uuid()',
939
+ format: 'uuid',
940
+ type: 'string'
941
+ },
942
+ title: {
943
+ format: 'text',
944
+ type: 'string'
945
+ },
946
+ description: {
947
+ format: 'text',
948
+ type: 'string'
949
+ },
950
+ icon: {
951
+ format: 'text',
952
+ type: 'string'
953
+ },
954
+ is_public: {
955
+ default: false,
956
+ format: 'boolean',
957
+ type: 'boolean'
958
+ },
959
+ target_id: {
960
+ format: 'uuid',
961
+ type: 'string'
962
+ },
963
+ type: {
964
+ format: 'text',
965
+ type: 'string'
966
+ },
967
+ data: {
968
+ format: 'jsonb'
969
+ },
970
+ meta: {
971
+ format: 'jsonb'
972
+ },
973
+ hash1: {
974
+ description: '基于hash的唯一识别码',
975
+ format: 'text',
976
+ type: 'string'
977
+ }
978
+ },
979
+ type: 'object'
980
+ } as const;
981
+
982
+ export const profilesSchema = {
983
+ description: '用户详细资料',
984
+ required: [
985
+ 'id'
986
+ ],
987
+ properties: {
988
+ id: {
989
+ description: 'Note:\nThis is a Primary Key.<pk/>',
990
+ format: 'uuid',
991
+ type: 'string'
992
+ },
993
+ updated_at: {
994
+ format: 'timestamp with time zone',
995
+ type: 'string'
996
+ },
997
+ username: {
998
+ format: 'text',
999
+ type: 'string'
1000
+ },
1001
+ full_name: {
1002
+ format: 'text',
1003
+ type: 'string'
1004
+ },
1005
+ avatar_url: {
1006
+ format: 'text',
1007
+ type: 'string'
1008
+ },
1009
+ website: {
1010
+ format: 'text',
1011
+ type: 'string'
1012
+ }
1013
+ },
1014
+ type: 'object'
1015
+ } as const;
1016
+
1017
+ export const adk_quick_startsSchema = {
1018
+ description: 'Agent 快捷启动指令模板',
1019
+ required: [
1020
+ 'id',
1021
+ 'title',
1022
+ 'prompt',
1023
+ 'agent_name'
1024
+ ],
1025
+ properties: {
1026
+ id: {
1027
+ default: 'gen_random_uuid()',
1028
+ description: 'Note:\nThis is a Primary Key.<pk/>',
1029
+ format: 'uuid',
1030
+ type: 'string'
1031
+ },
1032
+ title: {
1033
+ format: 'text',
1034
+ type: 'string'
1035
+ },
1036
+ description: {
1037
+ format: 'text',
1038
+ type: 'string'
1039
+ },
1040
+ prompt: {
1041
+ format: 'text',
1042
+ type: 'string'
1043
+ },
1044
+ agent_name: {
1045
+ default: 'simple_chat',
1046
+ format: 'text',
1047
+ type: 'string'
1048
+ },
1049
+ is_active: {
1050
+ default: true,
1051
+ format: 'boolean',
1052
+ type: 'boolean'
1053
+ },
1054
+ ord: {
1055
+ default: 0,
1056
+ format: 'integer',
1057
+ type: 'integer'
1058
+ },
1059
+ created_at: {
1060
+ default: 'now()',
1061
+ format: 'timestamp with time zone',
1062
+ type: 'string'
1063
+ },
1064
+ updated_at: {
1065
+ default: 'now()',
1066
+ format: 'timestamp with time zone',
1067
+ type: 'string'
1068
+ }
1069
+ },
1070
+ type: 'object'
1071
+ } as const;
1072
+
1073
+ export const voltagent_memory_workflow_statesSchema = {
1074
+ required: [
1075
+ 'id',
1076
+ 'workflow_id',
1077
+ 'workflow_name',
1078
+ 'status',
1079
+ 'created_at',
1080
+ 'updated_at'
1081
+ ],
1082
+ properties: {
1083
+ id: {
1084
+ description: 'Note:\nThis is a Primary Key.<pk/>',
1085
+ format: 'text',
1086
+ type: 'string'
1087
+ },
1088
+ workflow_id: {
1089
+ format: 'text',
1090
+ type: 'string'
1091
+ },
1092
+ workflow_name: {
1093
+ format: 'text',
1094
+ type: 'string'
1095
+ },
1096
+ status: {
1097
+ format: 'text',
1098
+ type: 'string'
1099
+ },
1100
+ suspension: {
1101
+ format: 'jsonb'
1102
+ },
1103
+ events: {
1104
+ format: 'jsonb'
1105
+ },
1106
+ output: {
1107
+ format: 'jsonb'
1108
+ },
1109
+ cancellation: {
1110
+ format: 'jsonb'
1111
+ },
1112
+ user_id: {
1113
+ format: 'text',
1114
+ type: 'string'
1115
+ },
1116
+ conversation_id: {
1117
+ format: 'text',
1118
+ type: 'string'
1119
+ },
1120
+ metadata: {
1121
+ format: 'jsonb'
1122
+ },
1123
+ created_at: {
1124
+ format: 'timestamp with time zone',
1125
+ type: 'string'
1126
+ },
1127
+ updated_at: {
1128
+ format: 'timestamp with time zone',
1129
+ type: 'string'
1130
+ }
1131
+ },
1132
+ type: 'object'
1133
+ } as const;
1134
+
1135
+ export const user_api_keysSchema = {
1136
+ description: '用户 API Key 管理表,存储 token 元数据',
1137
+ required: [
1138
+ 'id',
1139
+ 'user_id',
1140
+ 'name',
1141
+ 'prefix',
1142
+ 'jti',
1143
+ 'created_at'
1144
+ ],
1145
+ properties: {
1146
+ id: {
1147
+ default: 'gen_random_uuid()',
1148
+ description: 'Note:\nThis is a Primary Key.<pk/>',
1149
+ format: 'uuid',
1150
+ type: 'string'
1151
+ },
1152
+ user_id: {
1153
+ format: 'uuid',
1154
+ type: 'string'
1155
+ },
1156
+ name: {
1157
+ format: 'text',
1158
+ type: 'string'
1159
+ },
1160
+ prefix: {
1161
+ description: 'Token 前 8 字符,用于 UI 显示和识别',
1162
+ format: 'text',
1163
+ type: 'string'
1164
+ },
1165
+ jti: {
1166
+ description: 'JWT ID,用于验证和撤销 token',
1167
+ format: 'uuid',
1168
+ type: 'string'
1169
+ },
1170
+ expires_at: {
1171
+ description: 'Token 过期时间,null 表示永不过期',
1172
+ format: 'timestamp with time zone',
1173
+ type: 'string'
1174
+ },
1175
+ created_at: {
1176
+ default: 'now()',
1177
+ format: 'timestamp with time zone',
1178
+ type: 'string'
1179
+ },
1180
+ last_used_at: {
1181
+ format: 'timestamp with time zone',
1182
+ type: 'string'
1183
+ }
1184
+ },
1185
+ type: 'object'
1186
+ } as const;
1187
+
1188
+ export const system_config_publicSchema = {
1189
+ description: '系统公开配置表,存储可公开访问的配置项(如主域名规则)',
1190
+ required: [
1191
+ 'key',
1192
+ 'value'
1193
+ ],
1194
+ properties: {
1195
+ key: {
1196
+ description: '配置项唯一键名\n\nNote:\nThis is a Primary Key.<pk/>',
1197
+ format: 'text',
1198
+ type: 'string'
1199
+ },
1200
+ value: {
1201
+ description: '配置项的 JSONB 值',
1202
+ format: 'jsonb'
1203
+ },
1204
+ description: {
1205
+ description: '配置项描述',
1206
+ format: 'text',
1207
+ type: 'string'
1208
+ },
1209
+ created_at: {
1210
+ default: 'now()',
1211
+ format: 'timestamp with time zone',
1212
+ type: 'string'
1213
+ },
1214
+ updated_at: {
1215
+ default: 'now()',
1216
+ format: 'timestamp with time zone',
1217
+ type: 'string'
1218
+ }
1219
+ },
1220
+ type: 'object'
1221
+ } as const;
1222
+
1223
+ export const mitm_rulesSchema = {
1224
+ required: [
1225
+ 'id'
1226
+ ],
1227
+ properties: {
1228
+ id: {
1229
+ default: 'gen_random_uuid()',
1230
+ description: 'Note:\nThis is a Primary Key.<pk/>',
1231
+ format: 'uuid',
1232
+ type: 'string'
1233
+ },
1234
+ user_id: {
1235
+ format: 'uuid',
1236
+ type: 'string'
1237
+ },
1238
+ resource_id: {
1239
+ description: 'Note:\nThis is a Foreign Key to `resources.id`.<fk table=\'resources\' column=\'id\'/>',
1240
+ format: 'uuid',
1241
+ type: 'string'
1242
+ },
1243
+ name: {
1244
+ format: 'text',
1245
+ type: 'string'
1246
+ },
1247
+ match_pattern: {
1248
+ format: 'text',
1249
+ type: 'string'
1250
+ },
1251
+ action_type: {
1252
+ format: 'text',
1253
+ type: 'string'
1254
+ },
1255
+ action_config: {
1256
+ format: 'jsonb'
1257
+ },
1258
+ is_active: {
1259
+ default: true,
1260
+ format: 'boolean',
1261
+ type: 'boolean'
1262
+ },
1263
+ created_at: {
1264
+ default: 'now()',
1265
+ format: 'timestamp with time zone',
1266
+ type: 'string'
1267
+ }
1268
+ },
1269
+ type: 'object'
1270
+ } as const;
1271
+
1272
+ export const audit_skillsSchema = {
1273
+ required: [
1274
+ 'id',
1275
+ 'created_at',
1276
+ 'updated_at',
1277
+ 'project_id',
1278
+ 'name'
1279
+ ],
1280
+ properties: {
1281
+ id: {
1282
+ default: 'extensions.uuid_generate_v4()',
1283
+ description: 'Note:\nThis is a Primary Key.<pk/>',
1284
+ format: 'uuid',
1285
+ type: 'string'
1286
+ },
1287
+ created_at: {
1288
+ default: 'now()',
1289
+ format: 'timestamp with time zone',
1290
+ type: 'string'
1291
+ },
1292
+ updated_at: {
1293
+ default: 'now()',
1294
+ format: 'timestamp with time zone',
1295
+ type: 'string'
1296
+ },
1297
+ project_id: {
1298
+ description: 'Note:\nThis is a Foreign Key to `audit_projects.id`.<fk table=\'audit_projects\' column=\'id\'/>',
1299
+ format: 'uuid',
1300
+ type: 'string'
1301
+ },
1302
+ name: {
1303
+ format: 'text',
1304
+ type: 'string'
1305
+ },
1306
+ description: {
1307
+ format: 'text',
1308
+ type: 'string'
1309
+ },
1310
+ source_path: {
1311
+ format: 'text',
1312
+ type: 'string'
1313
+ },
1314
+ params_schema: {
1315
+ format: 'jsonb'
1316
+ },
1317
+ dependencies: {
1318
+ format: 'jsonb'
1319
+ },
1320
+ version: {
1321
+ format: 'text',
1322
+ type: 'string'
1323
+ }
1324
+ },
1325
+ type: 'object'
1326
+ } as const;
1327
+
1328
+ export const audit_tasksSchema = {
1329
+ required: [
1330
+ 'id',
1331
+ 'created_at',
1332
+ 'updated_at',
1333
+ 'project_id'
1334
+ ],
1335
+ properties: {
1336
+ id: {
1337
+ default: 'extensions.uuid_generate_v4()',
1338
+ description: 'Note:\nThis is a Primary Key.<pk/>',
1339
+ format: 'uuid',
1340
+ type: 'string'
1341
+ },
1342
+ created_at: {
1343
+ default: 'now()',
1344
+ format: 'timestamp with time zone',
1345
+ type: 'string'
1346
+ },
1347
+ updated_at: {
1348
+ default: 'now()',
1349
+ format: 'timestamp with time zone',
1350
+ type: 'string'
1351
+ },
1352
+ project_id: {
1353
+ description: 'Note:\nThis is a Foreign Key to `audit_projects.id`.<fk table=\'audit_projects\' column=\'id\'/>',
1354
+ format: 'uuid',
1355
+ type: 'string'
1356
+ },
1357
+ user_id: {
1358
+ format: 'uuid',
1359
+ type: 'string'
1360
+ },
1361
+ instructions: {
1362
+ format: 'text',
1363
+ type: 'string'
1364
+ },
1365
+ skill_id: {
1366
+ description: 'Note:\nThis is a Foreign Key to `audit_skills.id`.<fk table=\'audit_skills\' column=\'id\'/>',
1367
+ format: 'uuid',
1368
+ type: 'string'
1369
+ },
1370
+ sandbox_id: {
1371
+ description: 'Note:\nThis is a Foreign Key to `resources.id`.<fk table=\'resources\' column=\'id\'/>',
1372
+ format: 'uuid',
1373
+ type: 'string'
1374
+ },
1375
+ status: {
1376
+ default: 'pending',
1377
+ format: 'text',
1378
+ type: 'string'
1379
+ },
1380
+ result_summary: {
1381
+ format: 'text',
1382
+ type: 'string'
1383
+ },
1384
+ logs_url: {
1385
+ format: 'text',
1386
+ type: 'string'
1387
+ }
1388
+ },
1389
+ type: 'object'
1390
+ } as const;
1391
+
1392
+ export const audit_pocsSchema = {
1393
+ required: [
1394
+ 'id',
1395
+ 'created_at',
1396
+ 'updated_at',
1397
+ 'project_id',
1398
+ 'name'
1399
+ ],
1400
+ properties: {
1401
+ id: {
1402
+ default: 'extensions.uuid_generate_v4()',
1403
+ description: 'Note:\nThis is a Primary Key.<pk/>',
1404
+ format: 'uuid',
1405
+ type: 'string'
1406
+ },
1407
+ created_at: {
1408
+ default: 'now()',
1409
+ format: 'timestamp with time zone',
1410
+ type: 'string'
1411
+ },
1412
+ updated_at: {
1413
+ default: 'now()',
1414
+ format: 'timestamp with time zone',
1415
+ type: 'string'
1416
+ },
1417
+ project_id: {
1418
+ description: 'Note:\nThis is a Foreign Key to `audit_projects.id`.<fk table=\'audit_projects\' column=\'id\'/>',
1419
+ format: 'uuid',
1420
+ type: 'string'
1421
+ },
1422
+ name: {
1423
+ format: 'text',
1424
+ type: 'string'
1425
+ },
1426
+ cve_id: {
1427
+ format: 'text',
1428
+ type: 'string'
1429
+ },
1430
+ severity: {
1431
+ format: 'text',
1432
+ type: 'string'
1433
+ },
1434
+ path: {
1435
+ format: 'text',
1436
+ type: 'string'
1437
+ },
1438
+ status: {
1439
+ default: 'draft',
1440
+ format: 'text',
1441
+ type: 'string'
1442
+ }
1443
+ },
1444
+ type: 'object'
1445
+ } as const;
1446
+
1447
+ export const voltagent_memory_stepsSchema = {
1448
+ required: [
1449
+ 'id',
1450
+ 'conversation_id',
1451
+ 'user_id',
1452
+ 'agent_id',
1453
+ 'step_index',
1454
+ 'type',
1455
+ 'role',
1456
+ 'created_at'
1457
+ ],
1458
+ properties: {
1459
+ id: {
1460
+ description: 'Note:\nThis is a Primary Key.<pk/>',
1461
+ format: 'text',
1462
+ type: 'string'
1463
+ },
1464
+ conversation_id: {
1465
+ description: 'Note:\nThis is a Foreign Key to `voltagent_memory_conversations.id`.<fk table=\'voltagent_memory_conversations\' column=\'id\'/>',
1466
+ format: 'text',
1467
+ type: 'string'
1468
+ },
1469
+ user_id: {
1470
+ format: 'text',
1471
+ type: 'string'
1472
+ },
1473
+ agent_id: {
1474
+ format: 'text',
1475
+ type: 'string'
1476
+ },
1477
+ agent_name: {
1478
+ format: 'text',
1479
+ type: 'string'
1480
+ },
1481
+ operation_id: {
1482
+ format: 'text',
1483
+ type: 'string'
1484
+ },
1485
+ step_index: {
1486
+ format: 'integer',
1487
+ type: 'integer'
1488
+ },
1489
+ type: {
1490
+ format: 'text',
1491
+ type: 'string'
1492
+ },
1493
+ role: {
1494
+ format: 'text',
1495
+ type: 'string'
1496
+ },
1497
+ content: {
1498
+ format: 'text',
1499
+ type: 'string'
1500
+ },
1501
+ arguments: {
1502
+ format: 'jsonb'
1503
+ },
1504
+ result: {
1505
+ format: 'jsonb'
1506
+ },
1507
+ usage: {
1508
+ format: 'jsonb'
1509
+ },
1510
+ sub_agent_id: {
1511
+ format: 'text',
1512
+ type: 'string'
1513
+ },
1514
+ sub_agent_name: {
1515
+ format: 'text',
1516
+ type: 'string'
1517
+ },
1518
+ created_at: {
1519
+ default: 'timezone(\'utc\'::text, now())',
1520
+ format: 'timestamp with time zone',
1521
+ type: 'string'
1522
+ }
1523
+ },
1524
+ type: 'object'
1525
+ } as const;
1526
+
1527
+ export const audit_findingsSchema = {
1528
+ required: [
1529
+ 'id',
1530
+ 'created_at',
1531
+ 'updated_at',
1532
+ 'project_id',
1533
+ 'title'
1534
+ ],
1535
+ properties: {
1536
+ id: {
1537
+ default: 'extensions.uuid_generate_v4()',
1538
+ description: 'Note:\nThis is a Primary Key.<pk/>',
1539
+ format: 'uuid',
1540
+ type: 'string'
1541
+ },
1542
+ created_at: {
1543
+ default: 'now()',
1544
+ format: 'timestamp with time zone',
1545
+ type: 'string'
1546
+ },
1547
+ updated_at: {
1548
+ default: 'now()',
1549
+ format: 'timestamp with time zone',
1550
+ type: 'string'
1551
+ },
1552
+ project_id: {
1553
+ description: 'Note:\nThis is a Foreign Key to `audit_projects.id`.<fk table=\'audit_projects\' column=\'id\'/>',
1554
+ format: 'uuid',
1555
+ type: 'string'
1556
+ },
1557
+ task_id: {
1558
+ description: 'Note:\nThis is a Foreign Key to `audit_tasks.id`.<fk table=\'audit_tasks\' column=\'id\'/>',
1559
+ format: 'uuid',
1560
+ type: 'string'
1561
+ },
1562
+ severity: {
1563
+ description: 'Finding severity level: critical, high, medium, low, info',
1564
+ enum: [
1565
+ 'critical',
1566
+ 'high',
1567
+ 'medium',
1568
+ 'low',
1569
+ 'info'
1570
+ ],
1571
+ format: 'public.audit_finding_severity',
1572
+ type: 'string'
1573
+ },
1574
+ title: {
1575
+ format: 'text',
1576
+ type: 'string'
1577
+ },
1578
+ description: {
1579
+ format: 'text',
1580
+ type: 'string'
1581
+ },
1582
+ remediation: {
1583
+ format: 'text',
1584
+ type: 'string'
1585
+ },
1586
+ proof_poc: {
1587
+ format: 'text',
1588
+ type: 'string'
1589
+ },
1590
+ ai_analysis: {
1591
+ format: 'text',
1592
+ type: 'string'
1593
+ },
1594
+ status: {
1595
+ default: 'open',
1596
+ format: 'text',
1597
+ type: 'string'
1598
+ }
1599
+ },
1600
+ type: 'object'
1601
+ } as const;
1602
+
1603
+ export const worker_summarySchema = {
1604
+ properties: {
1605
+ id: {
1606
+ description: 'Note:\nThis is a Primary Key.<pk/>',
1607
+ format: 'text',
1608
+ type: 'string'
1609
+ },
1610
+ name: {
1611
+ format: 'text',
1612
+ type: 'string'
1613
+ },
1614
+ status: {
1615
+ enum: [
1616
+ 'starting',
1617
+ 'running',
1618
+ 'stopping',
1619
+ 'stopped',
1620
+ 'offline'
1621
+ ],
1622
+ format: 'public.worker_status',
1623
+ type: 'string'
1624
+ },
1625
+ host_id: {
1626
+ description: 'Note:\nThis is a Foreign Key to `compute_nodes.id`.<fk table=\'compute_nodes\' column=\'id\'/>',
1627
+ format: 'uuid',
1628
+ type: 'string'
1629
+ },
1630
+ user_id: {
1631
+ format: 'uuid',
1632
+ type: 'string'
1633
+ },
1634
+ public_url: {
1635
+ format: 'text',
1636
+ type: 'string'
1637
+ },
1638
+ latest_pull_at: {
1639
+ format: 'timestamp with time zone',
1640
+ type: 'string'
1641
+ },
1642
+ created_at: {
1643
+ format: 'timestamp with time zone',
1644
+ type: 'string'
1645
+ },
1646
+ is_online: {
1647
+ format: 'boolean',
1648
+ type: 'boolean'
1649
+ },
1650
+ latest_task: {
1651
+ format: 'jsonb'
1652
+ }
1653
+ },
1654
+ type: 'object'
1655
+ } as const;
1656
+
1657
+ export const event_streamsSchema = {
1658
+ required: [
1659
+ 'id',
1660
+ 'session_id',
1661
+ 'user_id',
1662
+ 'event',
1663
+ 'data'
1664
+ ],
1665
+ properties: {
1666
+ id: {
1667
+ description: 'Note:\nThis is a Primary Key.<pk/>',
1668
+ format: 'text',
1669
+ type: 'string'
1670
+ },
1671
+ session_id: {
1672
+ format: 'text',
1673
+ type: 'string'
1674
+ },
1675
+ user_id: {
1676
+ default: 'auth.uid()',
1677
+ format: 'uuid',
1678
+ type: 'string'
1679
+ },
1680
+ event: {
1681
+ default: 'adk_event',
1682
+ format: 'text',
1683
+ type: 'string'
1684
+ },
1685
+ data: {
1686
+ format: 'jsonb'
1687
+ },
1688
+ created_at: {
1689
+ default: 'now()',
1690
+ format: 'timestamp with time zone',
1691
+ type: 'string'
1692
+ },
1693
+ updated_at: {
1694
+ default: 'now()',
1695
+ format: 'timestamp with time zone',
1696
+ type: 'string'
1697
+ }
1698
+ },
1699
+ type: 'object'
1700
+ } as const;
1701
+
1702
+ export const endpointsSchema = {
1703
+ description: '服务端点信息',
1704
+ required: [
1705
+ 'id',
1706
+ 'created_at'
1707
+ ],
1708
+ properties: {
1709
+ id: {
1710
+ default: 'gen_random_uuid()',
1711
+ description: 'Note:\nThis is a Primary Key.<pk/>',
1712
+ format: 'uuid',
1713
+ type: 'string'
1714
+ },
1715
+ created_at: {
1716
+ default: 'now()',
1717
+ format: 'timestamp with time zone',
1718
+ type: 'string'
1719
+ },
1720
+ updated_at: {
1721
+ format: 'timestamp with time zone',
1722
+ type: 'string'
1723
+ },
1724
+ type: {
1725
+ format: 'text',
1726
+ type: 'string'
1727
+ },
1728
+ host_id: {
1729
+ format: 'uuid',
1730
+ type: 'string'
1731
+ },
1732
+ is_heal: {
1733
+ default: true,
1734
+ format: 'boolean',
1735
+ type: 'boolean'
1736
+ },
1737
+ state: {
1738
+ format: 'jsonb'
1739
+ },
1740
+ hostname: {
1741
+ format: 'text',
1742
+ type: 'string'
1743
+ },
1744
+ url: {
1745
+ format: 'text',
1746
+ type: 'string'
1747
+ },
1748
+ user_id: {
1749
+ format: 'uuid',
1750
+ type: 'string'
1751
+ }
1752
+ },
1753
+ type: 'object'
1754
+ } as const;
1755
+
1756
+ export const compute_nodesSchema = {
1757
+ description: '计算资源节点 (VPS, HuggingFace Spaces, Local Docker, etc.)',
1758
+ required: [
1759
+ 'id',
1760
+ 'created_at',
1761
+ 'updated_at',
1762
+ 'name',
1763
+ 'host',
1764
+ 'port',
1765
+ 'provider',
1766
+ 'user_id'
1767
+ ],
1768
+ properties: {
1769
+ id: {
1770
+ default: 'gen_random_uuid()',
1771
+ description: 'Note:\nThis is a Primary Key.<pk/>',
1772
+ format: 'uuid',
1773
+ type: 'string'
1774
+ },
1775
+ created_at: {
1776
+ default: 'now()',
1777
+ format: 'timestamp with time zone',
1778
+ type: 'string'
1779
+ },
1780
+ updated_at: {
1781
+ default: 'now()',
1782
+ format: 'timestamp with time zone',
1783
+ type: 'string'
1784
+ },
1785
+ name: {
1786
+ format: 'text',
1787
+ type: 'string'
1788
+ },
1789
+ host: {
1790
+ description: 'Host domain or IP address',
1791
+ format: 'text',
1792
+ type: 'string'
1793
+ },
1794
+ port: {
1795
+ default: 22,
1796
+ format: 'integer',
1797
+ type: 'integer'
1798
+ },
1799
+ username: {
1800
+ default: 'root',
1801
+ format: 'text',
1802
+ type: 'string'
1803
+ },
1804
+ auth_secret: {
1805
+ description: 'SSH 私钥 或 API Token',
1806
+ format: 'text',
1807
+ type: 'string'
1808
+ },
1809
+ status: {
1810
+ default: 'offline',
1811
+ description: 'Status of the compute node',
1812
+ enum: [
1813
+ 'online',
1814
+ 'offline'
1815
+ ],
1816
+ format: 'public.compute_node_status',
1817
+ type: 'string'
1818
+ },
1819
+ provider: {
1820
+ default: 'ssh',
1821
+ description: '资源提供方类型: ssh (VPS), huggingface, local',
1822
+ format: 'text',
1823
+ type: 'string'
1824
+ },
1825
+ user_id: {
1826
+ default: 'auth.uid()',
1827
+ format: 'uuid',
1828
+ type: 'string'
1829
+ },
1830
+ is_public: {
1831
+ default: false,
1832
+ description: 'Whether this node is shared public access',
1833
+ format: 'boolean',
1834
+ type: 'boolean'
1835
+ }
1836
+ },
1837
+ type: 'object'
1838
+ } as const;
1839
+
1840
+ export const sys_configSchema = {
1841
+ description: 'System-level configurations, e.g., GitHub App secrets',
1842
+ required: [
1843
+ 'key',
1844
+ 'value'
1845
+ ],
1846
+ properties: {
1847
+ key: {
1848
+ description: 'Note:\nThis is a Primary Key.<pk/>',
1849
+ format: 'text',
1850
+ type: 'string'
1851
+ },
1852
+ value: {
1853
+ format: 'jsonb'
1854
+ },
1855
+ description: {
1856
+ format: 'text',
1857
+ type: 'string'
1858
+ },
1859
+ created_at: {
1860
+ default: 'now()',
1861
+ format: 'timestamp with time zone',
1862
+ type: 'string'
1863
+ },
1864
+ updated_at: {
1865
+ default: 'now()',
1866
+ format: 'timestamp with time zone',
1867
+ type: 'string'
1868
+ }
1869
+ },
1870
+ type: 'object'
1871
+ } as const;
1872
+
1873
+ export const worker_api_keysSchema = {
1874
+ required: [
1875
+ 'id',
1876
+ 'worker_id',
1877
+ 'key_value'
1878
+ ],
1879
+ properties: {
1880
+ id: {
1881
+ default: 'gen_random_uuid()',
1882
+ description: 'Note:\nThis is a Primary Key.<pk/>',
1883
+ format: 'uuid',
1884
+ type: 'string'
1885
+ },
1886
+ worker_id: {
1887
+ description: 'Note:\nThis is a Foreign Key to `workers.id`.<fk table=\'workers\' column=\'id\'/>',
1888
+ format: 'text',
1889
+ type: 'string'
1890
+ },
1891
+ key_value: {
1892
+ format: 'text',
1893
+ type: 'string'
1894
+ },
1895
+ created_at: {
1896
+ default: 'now()',
1897
+ format: 'timestamp with time zone',
1898
+ type: 'string'
1899
+ },
1900
+ last_used_at: {
1901
+ format: 'timestamp with time zone',
1902
+ type: 'string'
1903
+ },
1904
+ revoked: {
1905
+ default: false,
1906
+ format: 'boolean',
1907
+ type: 'boolean'
1908
+ },
1909
+ name: {
1910
+ format: 'text',
1911
+ type: 'string'
1912
+ }
1913
+ },
1914
+ type: 'object'
1915
+ } as const;
1916
+
1917
+ export const platformsSchema = {
1918
+ required: [
1919
+ 'id',
1920
+ 'created_at',
1921
+ 'name',
1922
+ 'type',
1923
+ 'is_active'
1924
+ ],
1925
+ properties: {
1926
+ id: {
1927
+ default: 'gen_random_uuid()',
1928
+ description: 'Note:\nThis is a Primary Key.<pk/>',
1929
+ format: 'uuid',
1930
+ type: 'string'
1931
+ },
1932
+ created_at: {
1933
+ default: 'now()',
1934
+ format: 'timestamp with time zone',
1935
+ type: 'string'
1936
+ },
1937
+ updated_at: {
1938
+ default: 'now()',
1939
+ format: 'timestamp with time zone',
1940
+ type: 'string'
1941
+ },
1942
+ name: {
1943
+ format: 'text',
1944
+ type: 'string'
1945
+ },
1946
+ display_name: {
1947
+ format: 'text',
1948
+ type: 'string'
1949
+ },
1950
+ type: {
1951
+ default: 'web',
1952
+ description: '平台类型 (例如: api, app, web, 或其他自定义类型)',
1953
+ format: 'text',
1954
+ type: 'string'
1955
+ },
1956
+ base_url: {
1957
+ format: 'text',
1958
+ type: 'string'
1959
+ },
1960
+ auth_config: {
1961
+ format: 'jsonb'
1962
+ },
1963
+ is_active: {
1964
+ default: true,
1965
+ format: 'boolean',
1966
+ type: 'boolean'
1967
+ }
1968
+ },
1969
+ type: 'object'
1970
+ } as const;
1971
+
1972
+ export const voltagent_memory_usersSchema = {
1973
+ required: [
1974
+ 'id',
1975
+ 'created_at',
1976
+ 'updated_at'
1977
+ ],
1978
+ properties: {
1979
+ id: {
1980
+ description: 'Note:\nThis is a Primary Key.<pk/>',
1981
+ format: 'text',
1982
+ type: 'string'
1983
+ },
1984
+ metadata: {
1985
+ format: 'jsonb'
1986
+ },
1987
+ created_at: {
1988
+ default: 'timezone(\'utc\'::text, now())',
1989
+ format: 'timestamp with time zone',
1990
+ type: 'string'
1991
+ },
1992
+ updated_at: {
1993
+ default: 'timezone(\'utc\'::text, now())',
1994
+ format: 'timestamp with time zone',
1995
+ type: 'string'
1996
+ }
1997
+ },
1998
+ type: 'object'
1999
+ } as const;
2000
+
2001
+ export const user_rolesSchema = {
2002
+ description: 'User-Role mapping table',
2003
+ required: [
2004
+ 'id',
2005
+ 'user_id',
2006
+ 'role'
2007
+ ],
2008
+ properties: {
2009
+ id: {
2010
+ description: 'Note:\nThis is a Primary Key.<pk/>',
2011
+ format: 'bigint',
2012
+ type: 'integer'
2013
+ },
2014
+ user_id: {
2015
+ format: 'uuid',
2016
+ type: 'string'
2017
+ },
2018
+ role: {
2019
+ enum: [
2020
+ 'admin',
2021
+ 'moderator',
2022
+ 'member'
2023
+ ],
2024
+ format: 'public.app_role',
2025
+ type: 'string'
2026
+ },
2027
+ created_at: {
2028
+ default: 'now()',
2029
+ format: 'timestamp with time zone',
2030
+ type: 'string'
2031
+ }
2032
+ },
2033
+ type: 'object'
2034
+ } as const;
2035
+
2036
+ export const service_tunnels_lajiSchema = {
2037
+ description: 'services 的隧道配置',
2038
+ required: [
2039
+ 'id',
2040
+ 'created_at',
2041
+ 'updated_at',
2042
+ 'service_id'
2043
+ ],
2044
+ properties: {
2045
+ id: {
2046
+ default: 'gen_random_uuid()',
2047
+ description: 'Note:\nThis is a Primary Key.<pk/>',
2048
+ format: 'uuid',
2049
+ type: 'string'
2050
+ },
2051
+ created_at: {
2052
+ default: 'now()',
2053
+ format: 'timestamp with time zone',
2054
+ type: 'string'
2055
+ },
2056
+ updated_at: {
2057
+ default: 'now()',
2058
+ format: 'timestamp with time zone',
2059
+ type: 'string'
2060
+ },
2061
+ service_id: {
2062
+ format: 'uuid',
2063
+ type: 'string'
2064
+ },
2065
+ cfd_token: {
2066
+ format: 'text',
2067
+ type: 'string'
2068
+ },
2069
+ user_id: {
2070
+ format: 'uuid',
2071
+ type: 'string'
2072
+ }
2073
+ },
2074
+ type: 'object'
2075
+ } as const;
2076
+
2077
+ export const adk_eventsSchema = {
2078
+ description: 'adk_events',
2079
+ required: [
2080
+ 'id',
2081
+ 'created_at',
2082
+ 'updated_at'
2083
+ ],
2084
+ properties: {
2085
+ id: {
2086
+ description: 'Note:\nThis is a Primary Key.<pk/>',
2087
+ format: 'text',
2088
+ type: 'string'
2089
+ },
2090
+ created_at: {
2091
+ default: 'now()',
2092
+ format: 'timestamp with time zone',
2093
+ type: 'string'
2094
+ },
2095
+ updated_at: {
2096
+ default: 'now()',
2097
+ format: 'timestamp with time zone',
2098
+ type: 'string'
2099
+ },
2100
+ app_name: {
2101
+ default: 'text',
2102
+ format: 'text',
2103
+ type: 'string'
2104
+ },
2105
+ user_id: {
2106
+ format: 'uuid',
2107
+ type: 'string'
2108
+ },
2109
+ session_id: {
2110
+ format: 'text',
2111
+ type: 'string'
2112
+ },
2113
+ invocation_id: {
2114
+ format: 'text',
2115
+ type: 'string'
2116
+ },
2117
+ author: {
2118
+ format: 'text',
2119
+ type: 'string'
2120
+ },
2121
+ actions: {
2122
+ format: 'jsonb'
2123
+ },
2124
+ long_running_tool_ids_json: {
2125
+ format: 'jsonb'
2126
+ },
2127
+ branch: {
2128
+ format: 'text',
2129
+ type: 'string'
2130
+ },
2131
+ timestamp: {
2132
+ format: 'timestamp with time zone',
2133
+ type: 'string'
2134
+ },
2135
+ content: {
2136
+ format: 'jsonb'
2137
+ },
2138
+ grounding_metadata: {
2139
+ format: 'jsonb'
2140
+ },
2141
+ custom_metadata: {
2142
+ format: 'jsonb'
2143
+ },
2144
+ usage_metadata: {
2145
+ format: 'jsonb'
2146
+ },
2147
+ citation_metadata: {
2148
+ format: 'jsonb'
2149
+ },
2150
+ partial: {
2151
+ format: 'boolean',
2152
+ type: 'boolean'
2153
+ },
2154
+ turn_complete: {
2155
+ format: 'boolean',
2156
+ type: 'boolean'
2157
+ },
2158
+ error_code: {
2159
+ format: 'text',
2160
+ type: 'string'
2161
+ },
2162
+ error_message: {
2163
+ format: 'text',
2164
+ type: 'string'
2165
+ },
2166
+ interrupted: {
2167
+ format: 'boolean',
2168
+ type: 'boolean'
2169
+ },
2170
+ input_transcription: {
2171
+ format: 'jsonb'
2172
+ },
2173
+ output_transcription: {
2174
+ format: 'jsonb'
2175
+ }
2176
+ },
2177
+ type: 'object'
2178
+ } as const;
2179
+
2180
+ export const audit_projectsSchema = {
2181
+ required: [
2182
+ 'id',
2183
+ 'created_at',
2184
+ 'updated_at',
2185
+ 'user_id',
2186
+ 'name'
2187
+ ],
2188
+ properties: {
2189
+ id: {
2190
+ default: 'extensions.uuid_generate_v4()',
2191
+ description: 'Note:\nThis is a Primary Key.<pk/>',
2192
+ format: 'uuid',
2193
+ type: 'string'
2194
+ },
2195
+ created_at: {
2196
+ default: 'now()',
2197
+ format: 'timestamp with time zone',
2198
+ type: 'string'
2199
+ },
2200
+ updated_at: {
2201
+ default: 'now()',
2202
+ format: 'timestamp with time zone',
2203
+ type: 'string'
2204
+ },
2205
+ user_id: {
2206
+ description: '项目所有者用户ID, 必填',
2207
+ format: 'uuid',
2208
+ type: 'string'
2209
+ },
2210
+ name: {
2211
+ format: 'text',
2212
+ type: 'string'
2213
+ },
2214
+ target: {
2215
+ format: 'text',
2216
+ type: 'string'
2217
+ },
2218
+ repo_url: {
2219
+ format: 'text',
2220
+ type: 'string'
2221
+ },
2222
+ repo_branch: {
2223
+ format: 'text',
2224
+ type: 'string'
2225
+ },
2226
+ config: {
2227
+ description: '项目配置 (JSON), 包含 GitHub 集成等扩展配置',
2228
+ format: 'jsonb'
2229
+ },
2230
+ worker_id: {
2231
+ description: '关联的 Worker 实例 ID\n\nNote:\nThis is a Foreign Key to `workers.id`.<fk table=\'workers\' column=\'id\'/>',
2232
+ format: 'text',
2233
+ type: 'string'
2234
+ }
2235
+ },
2236
+ type: 'object'
2237
+ } as const;
2238
+
2239
+ export const agentsSchema = {
2240
+ description: 'ai agents',
2241
+ required: [
2242
+ 'id',
2243
+ 'created_at',
2244
+ 'updated_at'
2245
+ ],
2246
+ properties: {
2247
+ id: {
2248
+ description: 'agent 唯一名称, 同时也是agent 名称,通常表示agent 的类型\n\nNote:\nThis is a Primary Key.<pk/>',
2249
+ format: 'text',
2250
+ type: 'string'
2251
+ },
2252
+ created_at: {
2253
+ default: 'now()',
2254
+ format: 'timestamp with time zone',
2255
+ type: 'string'
2256
+ },
2257
+ updated_at: {
2258
+ default: 'now()',
2259
+ format: 'timestamp with time zone',
2260
+ type: 'string'
2261
+ },
2262
+ description: {
2263
+ description: 'agent 友好描述,一般用于展示,不影响agent运行',
2264
+ format: 'text',
2265
+ type: 'string'
2266
+ },
2267
+ instruction: {
2268
+ description: 'agent 指令,通常对应 system prompt',
2269
+ format: 'text',
2270
+ type: 'string'
2271
+ },
2272
+ max_step: {
2273
+ description: '总步骤数限制',
2274
+ format: 'integer',
2275
+ type: 'integer'
2276
+ },
2277
+ runtime: {
2278
+ description: '运行时, 例如: python-adk, aisdk-agent-v5,aiadk',
2279
+ format: 'text',
2280
+ type: 'string'
2281
+ },
2282
+ tools: {
2283
+ description: '以逗号风格的多个工具名称,例如"web_search,rag1,bash,ssh"',
2284
+ format: 'text',
2285
+ type: 'string'
2286
+ },
2287
+ config: {
2288
+ description: '额外配置信息, 对应特定agent附加的额外配置信息',
2289
+ format: 'jsonb'
2290
+ }
2291
+ },
2292
+ type: 'object'
2293
+ } as const;
2294
+
2295
+ export const voltagent_memory_conversationsSchema = {
2296
+ required: [
2297
+ 'id',
2298
+ 'resource_id',
2299
+ 'user_id',
2300
+ 'title',
2301
+ 'metadata',
2302
+ 'created_at',
2303
+ 'updated_at'
2304
+ ],
2305
+ properties: {
2306
+ id: {
2307
+ description: 'Note:\nThis is a Primary Key.<pk/>',
2308
+ format: 'text',
2309
+ type: 'string'
2310
+ },
2311
+ resource_id: {
2312
+ format: 'text',
2313
+ type: 'string'
2314
+ },
2315
+ user_id: {
2316
+ format: 'text',
2317
+ type: 'string'
2318
+ },
2319
+ title: {
2320
+ format: 'text',
2321
+ type: 'string'
2322
+ },
2323
+ metadata: {
2324
+ format: 'jsonb'
2325
+ },
2326
+ created_at: {
2327
+ default: 'timezone(\'utc\'::text, now())',
2328
+ format: 'timestamp with time zone',
2329
+ type: 'string'
2330
+ },
2331
+ updated_at: {
2332
+ default: 'timezone(\'utc\'::text, now())',
2333
+ format: 'timestamp with time zone',
2334
+ type: 'string'
2335
+ }
2336
+ },
2337
+ type: 'object'
2338
+ } as const;
2339
+
2340
+ export const adk_agentsSchema = {
2341
+ description: 'ADK Agent 应用列表',
2342
+ required: [
2343
+ 'name'
2344
+ ],
2345
+ properties: {
2346
+ name: {
2347
+ description: 'Note:\nThis is a Primary Key.<pk/>',
2348
+ format: 'text',
2349
+ type: 'string'
2350
+ },
2351
+ description: {
2352
+ format: 'text',
2353
+ type: 'string'
2354
+ },
2355
+ avatar_url: {
2356
+ format: 'text',
2357
+ type: 'string'
2358
+ },
2359
+ created_at: {
2360
+ default: 'now()',
2361
+ format: 'timestamp with time zone',
2362
+ type: 'string'
2363
+ },
2364
+ updated_at: {
2365
+ default: 'now()',
2366
+ format: 'timestamp with time zone',
2367
+ type: 'string'
2368
+ }
2369
+ },
2370
+ type: 'object'
2371
+ } as const;
2372
+
2373
+ export const workflow_stepsSchema = {
2374
+ required: [
2375
+ 'id',
2376
+ 'title'
2377
+ ],
2378
+ properties: {
2379
+ id: {
2380
+ default: 'gen_random_uuid()',
2381
+ description: 'Note:\nThis is a Primary Key.<pk/>',
2382
+ format: 'uuid',
2383
+ type: 'string'
2384
+ },
2385
+ workflow_id: {
2386
+ description: 'Note:\nThis is a Foreign Key to `workflow_instances.id`.<fk table=\'workflow_instances\' column=\'id\'/>',
2387
+ format: 'uuid',
2388
+ type: 'string'
2389
+ },
2390
+ step_index: {
2391
+ format: 'integer',
2392
+ type: 'integer'
2393
+ },
2394
+ title: {
2395
+ format: 'text',
2396
+ type: 'string'
2397
+ },
2398
+ status: {
2399
+ default: 'running',
2400
+ format: 'text',
2401
+ type: 'string'
2402
+ },
2403
+ logs: {
2404
+ format: 'text',
2405
+ type: 'string'
2406
+ },
2407
+ output_data: {
2408
+ format: 'jsonb'
2409
+ },
2410
+ started_at: {
2411
+ default: 'now()',
2412
+ format: 'timestamp with time zone',
2413
+ type: 'string'
2414
+ },
2415
+ completed_at: {
2416
+ format: 'timestamp with time zone',
2417
+ type: 'string'
2418
+ },
2419
+ cell_output: {
2420
+ format: 'jsonb'
2421
+ },
2422
+ cell_source: {
2423
+ format: 'text',
2424
+ type: 'string'
2425
+ }
2426
+ },
2427
+ type: 'object'
2428
+ } as const;
2429
+
2430
+ export const adk_artifactsSchema = {
2431
+ required: [
2432
+ 'id',
2433
+ 'app_name',
2434
+ 'user_id',
2435
+ 'filename',
2436
+ 'version'
2437
+ ],
2438
+ properties: {
2439
+ id: {
2440
+ default: 'gen_random_uuid()',
2441
+ description: 'Note:\nThis is a Primary Key.<pk/>',
2442
+ format: 'uuid',
2443
+ type: 'string'
2444
+ },
2445
+ app_name: {
2446
+ format: 'text',
2447
+ type: 'string'
2448
+ },
2449
+ user_id: {
2450
+ format: 'uuid',
2451
+ type: 'string'
2452
+ },
2453
+ session_id: {
2454
+ format: 'text',
2455
+ type: 'string'
2456
+ },
2457
+ filename: {
2458
+ format: 'text',
2459
+ type: 'string'
2460
+ },
2461
+ version: {
2462
+ format: 'integer',
2463
+ type: 'integer'
2464
+ },
2465
+ mime_type: {
2466
+ format: 'text',
2467
+ type: 'string'
2468
+ },
2469
+ data: {
2470
+ format: 'jsonb'
2471
+ },
2472
+ canonical_uri: {
2473
+ format: 'text',
2474
+ type: 'string'
2475
+ },
2476
+ custom_metadata: {
2477
+ format: 'jsonb'
2478
+ },
2479
+ created_at: {
2480
+ default: 'now()',
2481
+ format: 'timestamp with time zone',
2482
+ type: 'string'
2483
+ }
2484
+ },
2485
+ type: 'object'
2486
+ } as const;
2487
+
2488
+ export const eventsSchema = {
2489
+ description: '传入事件',
2490
+ required: [
2491
+ 'id',
2492
+ 'created_at',
2493
+ 'type'
2494
+ ],
2495
+ properties: {
2496
+ id: {
2497
+ default: 'gen_random_uuid()',
2498
+ description: 'Note:\nThis is a Primary Key.<pk/>',
2499
+ format: 'uuid',
2500
+ type: 'string'
2501
+ },
2502
+ created_at: {
2503
+ default: 'now()',
2504
+ format: 'timestamp with time zone',
2505
+ type: 'string'
2506
+ },
2507
+ type: {
2508
+ format: 'text',
2509
+ type: 'string'
2510
+ },
2511
+ data: {
2512
+ format: 'jsonb'
2513
+ },
2514
+ user_id: {
2515
+ format: 'uuid',
2516
+ type: 'string'
2517
+ }
2518
+ },
2519
+ type: 'object'
2520
+ } as const;
2521
+
2522
+ export const voltagent_memory_messagesSchema = {
2523
+ required: [
2524
+ 'conversation_id',
2525
+ 'message_id',
2526
+ 'user_id',
2527
+ 'role',
2528
+ 'created_at'
2529
+ ],
2530
+ properties: {
2531
+ conversation_id: {
2532
+ description: 'Note:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `voltagent_memory_conversations.id`.<fk table=\'voltagent_memory_conversations\' column=\'id\'/>',
2533
+ format: 'text',
2534
+ type: 'string'
2535
+ },
2536
+ message_id: {
2537
+ description: 'Note:\nThis is a Primary Key.<pk/>',
2538
+ format: 'text',
2539
+ type: 'string'
2540
+ },
2541
+ user_id: {
2542
+ format: 'text',
2543
+ type: 'string'
2544
+ },
2545
+ role: {
2546
+ format: 'text',
2547
+ type: 'string'
2548
+ },
2549
+ parts: {
2550
+ format: 'jsonb'
2551
+ },
2552
+ metadata: {
2553
+ format: 'jsonb'
2554
+ },
2555
+ format_version: {
2556
+ default: 2,
2557
+ format: 'integer',
2558
+ type: 'integer'
2559
+ },
2560
+ created_at: {
2561
+ default: 'timezone(\'utc\'::text, now())',
2562
+ format: 'timestamp with time zone',
2563
+ type: 'string'
2564
+ }
2565
+ },
2566
+ type: 'object'
2567
+ } as const;
2568
+
2569
+ export const adk_sessionsSchema = {
2570
+ description: 'adk_sessions',
2571
+ required: [
2572
+ 'id',
2573
+ 'created_at',
2574
+ 'user_id',
2575
+ 'app_name',
2576
+ 'state'
2577
+ ],
2578
+ properties: {
2579
+ id: {
2580
+ description: 'Note:\nThis is a Primary Key.<pk/>',
2581
+ format: 'text',
2582
+ type: 'string'
2583
+ },
2584
+ created_at: {
2585
+ format: 'timestamp with time zone',
2586
+ type: 'string'
2587
+ },
2588
+ updated_at: {
2589
+ format: 'timestamp with time zone',
2590
+ type: 'string'
2591
+ },
2592
+ user_id: {
2593
+ format: 'uuid',
2594
+ type: 'string'
2595
+ },
2596
+ app_name: {
2597
+ format: 'text',
2598
+ type: 'string'
2599
+ },
2600
+ state: {
2601
+ format: 'jsonb'
2602
+ }
2603
+ },
2604
+ type: 'object'
2605
+ } as const;
2606
+
2607
+ export const sys_logsSchema = {
2608
+ description: '系统日志',
2609
+ required: [
2610
+ 'id',
2611
+ 'created_at'
2612
+ ],
2613
+ properties: {
2614
+ id: {
2615
+ description: 'Note:\nThis is a Primary Key.<pk/>',
2616
+ format: 'bigint',
2617
+ type: 'integer'
2618
+ },
2619
+ created_at: {
2620
+ default: 'now()',
2621
+ format: 'timestamp with time zone',
2622
+ type: 'string'
2623
+ },
2624
+ text: {
2625
+ format: 'text',
2626
+ type: 'string'
2627
+ },
2628
+ level: {
2629
+ format: 'smallint',
2630
+ type: 'integer'
2631
+ },
2632
+ module: {
2633
+ default: 'sys',
2634
+ format: 'text',
2635
+ type: 'string'
2636
+ },
2637
+ user_id: {
2638
+ format: 'uuid',
2639
+ type: 'string'
2640
+ }
2641
+ },
2642
+ type: 'object'
2643
+ } as const;