0018_snapshot.json 70 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806
  1. {
  2. "version": "6",
  3. "dialect": "sqlite",
  4. "id": "452d9b92-c60b-4563-a10e-5fc573e69617",
  5. "prevId": "68450877-b219-4d12-bf07-7daa4aae73da",
  6. "tables": {
  7. "admin_sessions": {
  8. "name": "admin_sessions",
  9. "columns": {
  10. "id": {
  11. "name": "id",
  12. "type": "text",
  13. "primaryKey": true,
  14. "notNull": true,
  15. "autoincrement": false
  16. },
  17. "created_at": {
  18. "name": "created_at",
  19. "type": "text",
  20. "primaryKey": false,
  21. "notNull": true,
  22. "autoincrement": false,
  23. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  24. },
  25. "expires_at": {
  26. "name": "expires_at",
  27. "type": "text",
  28. "primaryKey": false,
  29. "notNull": true,
  30. "autoincrement": false
  31. }
  32. },
  33. "indexes": {},
  34. "foreignKeys": {},
  35. "compositePrimaryKeys": {},
  36. "uniqueConstraints": {},
  37. "checkConstraints": {}
  38. },
  39. "api_keys": {
  40. "name": "api_keys",
  41. "columns": {
  42. "id": {
  43. "name": "id",
  44. "type": "text",
  45. "primaryKey": true,
  46. "notNull": true,
  47. "autoincrement": false
  48. },
  49. "name": {
  50. "name": "name",
  51. "type": "text",
  52. "primaryKey": false,
  53. "notNull": true,
  54. "autoincrement": false
  55. },
  56. "key_hash": {
  57. "name": "key_hash",
  58. "type": "text",
  59. "primaryKey": false,
  60. "notNull": true,
  61. "autoincrement": false
  62. },
  63. "key_prefix": {
  64. "name": "key_prefix",
  65. "type": "text",
  66. "primaryKey": false,
  67. "notNull": true,
  68. "autoincrement": false
  69. },
  70. "enabled": {
  71. "name": "enabled",
  72. "type": "integer",
  73. "primaryKey": false,
  74. "notNull": true,
  75. "autoincrement": false,
  76. "default": true
  77. },
  78. "allowed_profile_ids": {
  79. "name": "allowed_profile_ids",
  80. "type": "text",
  81. "primaryKey": false,
  82. "notNull": true,
  83. "autoincrement": false,
  84. "default": "'[]'"
  85. },
  86. "default_profile_id": {
  87. "name": "default_profile_id",
  88. "type": "text",
  89. "primaryKey": false,
  90. "notNull": false,
  91. "autoincrement": false
  92. },
  93. "created_at": {
  94. "name": "created_at",
  95. "type": "text",
  96. "primaryKey": false,
  97. "notNull": true,
  98. "autoincrement": false,
  99. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  100. },
  101. "last_used_at": {
  102. "name": "last_used_at",
  103. "type": "text",
  104. "primaryKey": false,
  105. "notNull": false,
  106. "autoincrement": false
  107. }
  108. },
  109. "indexes": {
  110. "api_keys_key_hash_unique": {
  111. "name": "api_keys_key_hash_unique",
  112. "columns": [
  113. "key_hash"
  114. ],
  115. "isUnique": true
  116. }
  117. },
  118. "foreignKeys": {},
  119. "compositePrimaryKeys": {},
  120. "uniqueConstraints": {},
  121. "checkConstraints": {}
  122. },
  123. "audit_logs": {
  124. "name": "audit_logs",
  125. "columns": {
  126. "id": {
  127. "name": "id",
  128. "type": "integer",
  129. "primaryKey": true,
  130. "notNull": true,
  131. "autoincrement": true
  132. },
  133. "ts": {
  134. "name": "ts",
  135. "type": "text",
  136. "primaryKey": false,
  137. "notNull": true,
  138. "autoincrement": false,
  139. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  140. },
  141. "actor": {
  142. "name": "actor",
  143. "type": "text",
  144. "primaryKey": false,
  145. "notNull": true,
  146. "autoincrement": false
  147. },
  148. "session_id": {
  149. "name": "session_id",
  150. "type": "text",
  151. "primaryKey": false,
  152. "notNull": false,
  153. "autoincrement": false
  154. },
  155. "kind": {
  156. "name": "kind",
  157. "type": "text",
  158. "primaryKey": false,
  159. "notNull": true,
  160. "autoincrement": false
  161. },
  162. "summary": {
  163. "name": "summary",
  164. "type": "text",
  165. "primaryKey": false,
  166. "notNull": true,
  167. "autoincrement": false
  168. },
  169. "detail": {
  170. "name": "detail",
  171. "type": "text",
  172. "primaryKey": false,
  173. "notNull": false,
  174. "autoincrement": false
  175. }
  176. },
  177. "indexes": {
  178. "audit_ts_idx": {
  179. "name": "audit_ts_idx",
  180. "columns": [
  181. "ts"
  182. ],
  183. "isUnique": false
  184. }
  185. },
  186. "foreignKeys": {},
  187. "compositePrimaryKeys": {},
  188. "uniqueConstraints": {},
  189. "checkConstraints": {}
  190. },
  191. "background_calls": {
  192. "name": "background_calls",
  193. "columns": {
  194. "id": {
  195. "name": "id",
  196. "type": "text",
  197. "primaryKey": true,
  198. "notNull": true,
  199. "autoincrement": false
  200. },
  201. "session_id": {
  202. "name": "session_id",
  203. "type": "text",
  204. "primaryKey": false,
  205. "notNull": true,
  206. "autoincrement": false
  207. },
  208. "team_id": {
  209. "name": "team_id",
  210. "type": "text",
  211. "primaryKey": false,
  212. "notNull": false,
  213. "autoincrement": false
  214. },
  215. "bot_id": {
  216. "name": "bot_id",
  217. "type": "text",
  218. "primaryKey": false,
  219. "notNull": false,
  220. "autoincrement": false
  221. },
  222. "task_id": {
  223. "name": "task_id",
  224. "type": "text",
  225. "primaryKey": false,
  226. "notNull": false,
  227. "autoincrement": false
  228. },
  229. "server_id": {
  230. "name": "server_id",
  231. "type": "text",
  232. "primaryKey": false,
  233. "notNull": true,
  234. "autoincrement": false
  235. },
  236. "server_name": {
  237. "name": "server_name",
  238. "type": "text",
  239. "primaryKey": false,
  240. "notNull": true,
  241. "autoincrement": false
  242. },
  243. "server_title": {
  244. "name": "server_title",
  245. "type": "text",
  246. "primaryKey": false,
  247. "notNull": true,
  248. "autoincrement": false
  249. },
  250. "tool": {
  251. "name": "tool",
  252. "type": "text",
  253. "primaryKey": false,
  254. "notNull": true,
  255. "autoincrement": false
  256. },
  257. "args": {
  258. "name": "args",
  259. "type": "text",
  260. "primaryKey": false,
  261. "notNull": true,
  262. "autoincrement": false
  263. },
  264. "status": {
  265. "name": "status",
  266. "type": "text",
  267. "primaryKey": false,
  268. "notNull": true,
  269. "autoincrement": false,
  270. "default": "'running'"
  271. },
  272. "started_at": {
  273. "name": "started_at",
  274. "type": "text",
  275. "primaryKey": false,
  276. "notNull": true,
  277. "autoincrement": false,
  278. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  279. },
  280. "ended_at": {
  281. "name": "ended_at",
  282. "type": "text",
  283. "primaryKey": false,
  284. "notNull": false,
  285. "autoincrement": false
  286. },
  287. "result": {
  288. "name": "result",
  289. "type": "text",
  290. "primaryKey": false,
  291. "notNull": false,
  292. "autoincrement": false
  293. },
  294. "error": {
  295. "name": "error",
  296. "type": "text",
  297. "primaryKey": false,
  298. "notNull": false,
  299. "autoincrement": false
  300. },
  301. "delivered": {
  302. "name": "delivered",
  303. "type": "integer",
  304. "primaryKey": false,
  305. "notNull": true,
  306. "autoincrement": false,
  307. "default": false
  308. },
  309. "mode": {
  310. "name": "mode",
  311. "type": "text",
  312. "primaryKey": false,
  313. "notNull": true,
  314. "autoincrement": false,
  315. "default": "'wait'"
  316. },
  317. "mcp_task_id": {
  318. "name": "mcp_task_id",
  319. "type": "text",
  320. "primaryKey": false,
  321. "notNull": false,
  322. "autoincrement": false
  323. },
  324. "conn_scope": {
  325. "name": "conn_scope",
  326. "type": "text",
  327. "primaryKey": false,
  328. "notNull": false,
  329. "autoincrement": false
  330. },
  331. "poll_after": {
  332. "name": "poll_after",
  333. "type": "text",
  334. "primaryKey": false,
  335. "notNull": false,
  336. "autoincrement": false
  337. },
  338. "poll_error_since": {
  339. "name": "poll_error_since",
  340. "type": "text",
  341. "primaryKey": false,
  342. "notNull": false,
  343. "autoincrement": false
  344. },
  345. "status_message": {
  346. "name": "status_message",
  347. "type": "text",
  348. "primaryKey": false,
  349. "notNull": false,
  350. "autoincrement": false
  351. }
  352. },
  353. "indexes": {
  354. "background_calls_session_idx": {
  355. "name": "background_calls_session_idx",
  356. "columns": [
  357. "session_id"
  358. ],
  359. "isUnique": false
  360. },
  361. "background_calls_team_idx": {
  362. "name": "background_calls_team_idx",
  363. "columns": [
  364. "team_id"
  365. ],
  366. "isUnique": false
  367. },
  368. "background_calls_status_idx": {
  369. "name": "background_calls_status_idx",
  370. "columns": [
  371. "status",
  372. "delivered"
  373. ],
  374. "isUnique": false
  375. }
  376. },
  377. "foreignKeys": {},
  378. "compositePrimaryKeys": {},
  379. "uniqueConstraints": {},
  380. "checkConstraints": {}
  381. },
  382. "bot_api_keys": {
  383. "name": "bot_api_keys",
  384. "columns": {
  385. "id": {
  386. "name": "id",
  387. "type": "text",
  388. "primaryKey": true,
  389. "notNull": true,
  390. "autoincrement": false
  391. },
  392. "name": {
  393. "name": "name",
  394. "type": "text",
  395. "primaryKey": false,
  396. "notNull": true,
  397. "autoincrement": false
  398. },
  399. "key_hash": {
  400. "name": "key_hash",
  401. "type": "text",
  402. "primaryKey": false,
  403. "notNull": true,
  404. "autoincrement": false
  405. },
  406. "key_prefix": {
  407. "name": "key_prefix",
  408. "type": "text",
  409. "primaryKey": false,
  410. "notNull": true,
  411. "autoincrement": false
  412. },
  413. "enabled": {
  414. "name": "enabled",
  415. "type": "integer",
  416. "primaryKey": false,
  417. "notNull": true,
  418. "autoincrement": false,
  419. "default": true
  420. },
  421. "allowed_bot_ids": {
  422. "name": "allowed_bot_ids",
  423. "type": "text",
  424. "primaryKey": false,
  425. "notNull": true,
  426. "autoincrement": false,
  427. "default": "'[]'"
  428. },
  429. "created_at": {
  430. "name": "created_at",
  431. "type": "text",
  432. "primaryKey": false,
  433. "notNull": true,
  434. "autoincrement": false,
  435. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  436. },
  437. "last_used_at": {
  438. "name": "last_used_at",
  439. "type": "text",
  440. "primaryKey": false,
  441. "notNull": false,
  442. "autoincrement": false
  443. }
  444. },
  445. "indexes": {
  446. "bot_api_keys_key_hash_unique": {
  447. "name": "bot_api_keys_key_hash_unique",
  448. "columns": [
  449. "key_hash"
  450. ],
  451. "isUnique": true
  452. }
  453. },
  454. "foreignKeys": {},
  455. "compositePrimaryKeys": {},
  456. "uniqueConstraints": {},
  457. "checkConstraints": {}
  458. },
  459. "bots": {
  460. "name": "bots",
  461. "columns": {
  462. "id": {
  463. "name": "id",
  464. "type": "text",
  465. "primaryKey": true,
  466. "notNull": true,
  467. "autoincrement": false
  468. },
  469. "name": {
  470. "name": "name",
  471. "type": "text",
  472. "primaryKey": false,
  473. "notNull": true,
  474. "autoincrement": false
  475. },
  476. "avatar": {
  477. "name": "avatar",
  478. "type": "text",
  479. "primaryKey": false,
  480. "notNull": true,
  481. "autoincrement": false,
  482. "default": "'🤖'"
  483. },
  484. "kind": {
  485. "name": "kind",
  486. "type": "text",
  487. "primaryKey": false,
  488. "notNull": true,
  489. "autoincrement": false
  490. },
  491. "description": {
  492. "name": "description",
  493. "type": "text",
  494. "primaryKey": false,
  495. "notNull": true,
  496. "autoincrement": false,
  497. "default": "''"
  498. },
  499. "profile_id": {
  500. "name": "profile_id",
  501. "type": "text",
  502. "primaryKey": false,
  503. "notNull": true,
  504. "autoincrement": false
  505. },
  506. "enabled": {
  507. "name": "enabled",
  508. "type": "integer",
  509. "primaryKey": false,
  510. "notNull": true,
  511. "autoincrement": false,
  512. "default": true
  513. },
  514. "created_at": {
  515. "name": "created_at",
  516. "type": "text",
  517. "primaryKey": false,
  518. "notNull": true,
  519. "autoincrement": false,
  520. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  521. },
  522. "updated_at": {
  523. "name": "updated_at",
  524. "type": "text",
  525. "primaryKey": false,
  526. "notNull": true,
  527. "autoincrement": false,
  528. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  529. }
  530. },
  531. "indexes": {
  532. "bots_name_unique": {
  533. "name": "bots_name_unique",
  534. "columns": [
  535. "name"
  536. ],
  537. "isUnique": true
  538. }
  539. },
  540. "foreignKeys": {},
  541. "compositePrimaryKeys": {},
  542. "uniqueConstraints": {},
  543. "checkConstraints": {}
  544. },
  545. "custom_skill_versions": {
  546. "name": "custom_skill_versions",
  547. "columns": {
  548. "skill_id": {
  549. "name": "skill_id",
  550. "type": "text",
  551. "primaryKey": false,
  552. "notNull": true,
  553. "autoincrement": false
  554. },
  555. "version": {
  556. "name": "version",
  557. "type": "integer",
  558. "primaryKey": false,
  559. "notNull": true,
  560. "autoincrement": false
  561. },
  562. "reason": {
  563. "name": "reason",
  564. "type": "text",
  565. "primaryKey": false,
  566. "notNull": true,
  567. "autoincrement": false
  568. },
  569. "files": {
  570. "name": "files",
  571. "type": "text",
  572. "primaryKey": false,
  573. "notNull": true,
  574. "autoincrement": false
  575. },
  576. "changed": {
  577. "name": "changed",
  578. "type": "text",
  579. "primaryKey": false,
  580. "notNull": true,
  581. "autoincrement": false
  582. },
  583. "created_at": {
  584. "name": "created_at",
  585. "type": "text",
  586. "primaryKey": false,
  587. "notNull": true,
  588. "autoincrement": false,
  589. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  590. }
  591. },
  592. "indexes": {},
  593. "foreignKeys": {},
  594. "compositePrimaryKeys": {
  595. "custom_skill_versions_skill_id_version_pk": {
  596. "columns": [
  597. "skill_id",
  598. "version"
  599. ],
  600. "name": "custom_skill_versions_skill_id_version_pk"
  601. }
  602. },
  603. "uniqueConstraints": {},
  604. "checkConstraints": {}
  605. },
  606. "custom_skills": {
  607. "name": "custom_skills",
  608. "columns": {
  609. "id": {
  610. "name": "id",
  611. "type": "text",
  612. "primaryKey": true,
  613. "notNull": true,
  614. "autoincrement": false
  615. },
  616. "name": {
  617. "name": "name",
  618. "type": "text",
  619. "primaryKey": false,
  620. "notNull": true,
  621. "autoincrement": false
  622. },
  623. "description": {
  624. "name": "description",
  625. "type": "text",
  626. "primaryKey": false,
  627. "notNull": true,
  628. "autoincrement": false,
  629. "default": "''"
  630. },
  631. "origin": {
  632. "name": "origin",
  633. "type": "text",
  634. "primaryKey": false,
  635. "notNull": true,
  636. "autoincrement": false
  637. },
  638. "source_id": {
  639. "name": "source_id",
  640. "type": "text",
  641. "primaryKey": false,
  642. "notNull": false,
  643. "autoincrement": false
  644. },
  645. "enabled": {
  646. "name": "enabled",
  647. "type": "integer",
  648. "primaryKey": false,
  649. "notNull": true,
  650. "autoincrement": false,
  651. "default": true
  652. },
  653. "include_in_all": {
  654. "name": "include_in_all",
  655. "type": "integer",
  656. "primaryKey": false,
  657. "notNull": true,
  658. "autoincrement": false,
  659. "default": false
  660. },
  661. "published_version": {
  662. "name": "published_version",
  663. "type": "integer",
  664. "primaryKey": false,
  665. "notNull": false,
  666. "autoincrement": false
  667. },
  668. "latest_version": {
  669. "name": "latest_version",
  670. "type": "integer",
  671. "primaryKey": false,
  672. "notNull": true,
  673. "autoincrement": false,
  674. "default": 0
  675. },
  676. "working_files": {
  677. "name": "working_files",
  678. "type": "text",
  679. "primaryKey": false,
  680. "notNull": true,
  681. "autoincrement": false,
  682. "default": "'{}'"
  683. },
  684. "created_at": {
  685. "name": "created_at",
  686. "type": "text",
  687. "primaryKey": false,
  688. "notNull": true,
  689. "autoincrement": false,
  690. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  691. },
  692. "updated_at": {
  693. "name": "updated_at",
  694. "type": "text",
  695. "primaryKey": false,
  696. "notNull": true,
  697. "autoincrement": false,
  698. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  699. }
  700. },
  701. "indexes": {
  702. "custom_skills_name_unique": {
  703. "name": "custom_skills_name_unique",
  704. "columns": [
  705. "name"
  706. ],
  707. "isUnique": true
  708. }
  709. },
  710. "foreignKeys": {},
  711. "compositePrimaryKeys": {},
  712. "uniqueConstraints": {},
  713. "checkConstraints": {}
  714. },
  715. "events": {
  716. "name": "events",
  717. "columns": {
  718. "session_id": {
  719. "name": "session_id",
  720. "type": "text",
  721. "primaryKey": false,
  722. "notNull": true,
  723. "autoincrement": false
  724. },
  725. "seq": {
  726. "name": "seq",
  727. "type": "integer",
  728. "primaryKey": false,
  729. "notNull": true,
  730. "autoincrement": false
  731. },
  732. "run_id": {
  733. "name": "run_id",
  734. "type": "text",
  735. "primaryKey": false,
  736. "notNull": false,
  737. "autoincrement": false
  738. },
  739. "type": {
  740. "name": "type",
  741. "type": "text",
  742. "primaryKey": false,
  743. "notNull": true,
  744. "autoincrement": false
  745. },
  746. "payload": {
  747. "name": "payload",
  748. "type": "text",
  749. "primaryKey": false,
  750. "notNull": true,
  751. "autoincrement": false
  752. },
  753. "ts": {
  754. "name": "ts",
  755. "type": "text",
  756. "primaryKey": false,
  757. "notNull": true,
  758. "autoincrement": false
  759. }
  760. },
  761. "indexes": {},
  762. "foreignKeys": {},
  763. "compositePrimaryKeys": {
  764. "events_session_id_seq_pk": {
  765. "columns": [
  766. "session_id",
  767. "seq"
  768. ],
  769. "name": "events_session_id_seq_pk"
  770. }
  771. },
  772. "uniqueConstraints": {},
  773. "checkConstraints": {}
  774. },
  775. "files": {
  776. "name": "files",
  777. "columns": {
  778. "id": {
  779. "name": "id",
  780. "type": "text",
  781. "primaryKey": true,
  782. "notNull": true,
  783. "autoincrement": false
  784. },
  785. "session_id": {
  786. "name": "session_id",
  787. "type": "text",
  788. "primaryKey": false,
  789. "notNull": true,
  790. "autoincrement": false
  791. },
  792. "rel_path": {
  793. "name": "rel_path",
  794. "type": "text",
  795. "primaryKey": false,
  796. "notNull": true,
  797. "autoincrement": false
  798. },
  799. "origin": {
  800. "name": "origin",
  801. "type": "text",
  802. "primaryKey": false,
  803. "notNull": true,
  804. "autoincrement": false
  805. },
  806. "mime": {
  807. "name": "mime",
  808. "type": "text",
  809. "primaryKey": false,
  810. "notNull": true,
  811. "autoincrement": false
  812. },
  813. "size": {
  814. "name": "size",
  815. "type": "integer",
  816. "primaryKey": false,
  817. "notNull": true,
  818. "autoincrement": false
  819. },
  820. "mtime_ms": {
  821. "name": "mtime_ms",
  822. "type": "real",
  823. "primaryKey": false,
  824. "notNull": true,
  825. "autoincrement": false
  826. },
  827. "created_at": {
  828. "name": "created_at",
  829. "type": "text",
  830. "primaryKey": false,
  831. "notNull": true,
  832. "autoincrement": false,
  833. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  834. },
  835. "updated_at": {
  836. "name": "updated_at",
  837. "type": "text",
  838. "primaryKey": false,
  839. "notNull": true,
  840. "autoincrement": false,
  841. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  842. }
  843. },
  844. "indexes": {
  845. "files_session_path_idx": {
  846. "name": "files_session_path_idx",
  847. "columns": [
  848. "session_id",
  849. "rel_path"
  850. ],
  851. "isUnique": false
  852. }
  853. },
  854. "foreignKeys": {},
  855. "compositePrimaryKeys": {},
  856. "uniqueConstraints": {},
  857. "checkConstraints": {}
  858. },
  859. "interactions": {
  860. "name": "interactions",
  861. "columns": {
  862. "id": {
  863. "name": "id",
  864. "type": "text",
  865. "primaryKey": true,
  866. "notNull": true,
  867. "autoincrement": false
  868. },
  869. "session_id": {
  870. "name": "session_id",
  871. "type": "text",
  872. "primaryKey": false,
  873. "notNull": true,
  874. "autoincrement": false
  875. },
  876. "run_id": {
  877. "name": "run_id",
  878. "type": "text",
  879. "primaryKey": false,
  880. "notNull": false,
  881. "autoincrement": false
  882. },
  883. "kind": {
  884. "name": "kind",
  885. "type": "text",
  886. "primaryKey": false,
  887. "notNull": true,
  888. "autoincrement": false
  889. },
  890. "request": {
  891. "name": "request",
  892. "type": "text",
  893. "primaryKey": false,
  894. "notNull": true,
  895. "autoincrement": false
  896. },
  897. "response": {
  898. "name": "response",
  899. "type": "text",
  900. "primaryKey": false,
  901. "notNull": false,
  902. "autoincrement": false
  903. },
  904. "status": {
  905. "name": "status",
  906. "type": "text",
  907. "primaryKey": false,
  908. "notNull": true,
  909. "autoincrement": false
  910. },
  911. "created_at": {
  912. "name": "created_at",
  913. "type": "text",
  914. "primaryKey": false,
  915. "notNull": true,
  916. "autoincrement": false,
  917. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  918. },
  919. "resolved_at": {
  920. "name": "resolved_at",
  921. "type": "text",
  922. "primaryKey": false,
  923. "notNull": false,
  924. "autoincrement": false
  925. },
  926. "expires_at": {
  927. "name": "expires_at",
  928. "type": "text",
  929. "primaryKey": false,
  930. "notNull": true,
  931. "autoincrement": false
  932. }
  933. },
  934. "indexes": {
  935. "interactions_session_idx": {
  936. "name": "interactions_session_idx",
  937. "columns": [
  938. "session_id",
  939. "status"
  940. ],
  941. "isUnique": false
  942. }
  943. },
  944. "foreignKeys": {},
  945. "compositePrimaryKeys": {},
  946. "uniqueConstraints": {},
  947. "checkConstraints": {}
  948. },
  949. "jobs": {
  950. "name": "jobs",
  951. "columns": {
  952. "id": {
  953. "name": "id",
  954. "type": "text",
  955. "primaryKey": true,
  956. "notNull": true,
  957. "autoincrement": false
  958. },
  959. "team_id": {
  960. "name": "team_id",
  961. "type": "text",
  962. "primaryKey": false,
  963. "notNull": true,
  964. "autoincrement": false
  965. },
  966. "no": {
  967. "name": "no",
  968. "type": "integer",
  969. "primaryKey": false,
  970. "notNull": true,
  971. "autoincrement": false
  972. },
  973. "title": {
  974. "name": "title",
  975. "type": "text",
  976. "primaryKey": false,
  977. "notNull": true,
  978. "autoincrement": false
  979. },
  980. "plan": {
  981. "name": "plan",
  982. "type": "text",
  983. "primaryKey": false,
  984. "notNull": true,
  985. "autoincrement": false,
  986. "default": "''"
  987. },
  988. "status": {
  989. "name": "status",
  990. "type": "text",
  991. "primaryKey": false,
  992. "notNull": true,
  993. "autoincrement": false,
  994. "default": "'running'"
  995. },
  996. "summary": {
  997. "name": "summary",
  998. "type": "text",
  999. "primaryKey": false,
  1000. "notNull": false,
  1001. "autoincrement": false
  1002. },
  1003. "files": {
  1004. "name": "files",
  1005. "type": "text",
  1006. "primaryKey": false,
  1007. "notNull": true,
  1008. "autoincrement": false,
  1009. "default": "'[]'"
  1010. },
  1011. "blocked_by": {
  1012. "name": "blocked_by",
  1013. "type": "text",
  1014. "primaryKey": false,
  1015. "notNull": false,
  1016. "autoincrement": false
  1017. },
  1018. "limits": {
  1019. "name": "limits",
  1020. "type": "text",
  1021. "primaryKey": false,
  1022. "notNull": true,
  1023. "autoincrement": false
  1024. },
  1025. "lead_runs": {
  1026. "name": "lead_runs",
  1027. "type": "integer",
  1028. "primaryKey": false,
  1029. "notNull": true,
  1030. "autoincrement": false,
  1031. "default": 0
  1032. },
  1033. "run_ids": {
  1034. "name": "run_ids",
  1035. "type": "text",
  1036. "primaryKey": false,
  1037. "notNull": true,
  1038. "autoincrement": false,
  1039. "default": "'[]'"
  1040. },
  1041. "created_at": {
  1042. "name": "created_at",
  1043. "type": "text",
  1044. "primaryKey": false,
  1045. "notNull": true,
  1046. "autoincrement": false,
  1047. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  1048. },
  1049. "ended_at": {
  1050. "name": "ended_at",
  1051. "type": "text",
  1052. "primaryKey": false,
  1053. "notNull": false,
  1054. "autoincrement": false
  1055. }
  1056. },
  1057. "indexes": {
  1058. "jobs_team_idx": {
  1059. "name": "jobs_team_idx",
  1060. "columns": [
  1061. "team_id",
  1062. "no"
  1063. ],
  1064. "isUnique": false
  1065. }
  1066. },
  1067. "foreignKeys": {},
  1068. "compositePrimaryKeys": {},
  1069. "uniqueConstraints": {},
  1070. "checkConstraints": {}
  1071. },
  1072. "knowledge_roots": {
  1073. "name": "knowledge_roots",
  1074. "columns": {
  1075. "id": {
  1076. "name": "id",
  1077. "type": "text",
  1078. "primaryKey": true,
  1079. "notNull": true,
  1080. "autoincrement": false
  1081. },
  1082. "name": {
  1083. "name": "name",
  1084. "type": "text",
  1085. "primaryKey": false,
  1086. "notNull": true,
  1087. "autoincrement": false
  1088. },
  1089. "path": {
  1090. "name": "path",
  1091. "type": "text",
  1092. "primaryKey": false,
  1093. "notNull": true,
  1094. "autoincrement": false
  1095. },
  1096. "description": {
  1097. "name": "description",
  1098. "type": "text",
  1099. "primaryKey": false,
  1100. "notNull": true,
  1101. "autoincrement": false,
  1102. "default": "''"
  1103. },
  1104. "access": {
  1105. "name": "access",
  1106. "type": "text",
  1107. "primaryKey": false,
  1108. "notNull": true,
  1109. "autoincrement": false,
  1110. "default": "'read'"
  1111. },
  1112. "enabled": {
  1113. "name": "enabled",
  1114. "type": "integer",
  1115. "primaryKey": false,
  1116. "notNull": true,
  1117. "autoincrement": false,
  1118. "default": true
  1119. },
  1120. "created_at": {
  1121. "name": "created_at",
  1122. "type": "text",
  1123. "primaryKey": false,
  1124. "notNull": true,
  1125. "autoincrement": false,
  1126. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  1127. },
  1128. "updated_at": {
  1129. "name": "updated_at",
  1130. "type": "text",
  1131. "primaryKey": false,
  1132. "notNull": true,
  1133. "autoincrement": false,
  1134. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  1135. }
  1136. },
  1137. "indexes": {},
  1138. "foreignKeys": {},
  1139. "compositePrimaryKeys": {},
  1140. "uniqueConstraints": {},
  1141. "checkConstraints": {}
  1142. },
  1143. "mcp_servers": {
  1144. "name": "mcp_servers",
  1145. "columns": {
  1146. "id": {
  1147. "name": "id",
  1148. "type": "text",
  1149. "primaryKey": true,
  1150. "notNull": true,
  1151. "autoincrement": false
  1152. },
  1153. "name": {
  1154. "name": "name",
  1155. "type": "text",
  1156. "primaryKey": false,
  1157. "notNull": true,
  1158. "autoincrement": false
  1159. },
  1160. "title": {
  1161. "name": "title",
  1162. "type": "text",
  1163. "primaryKey": false,
  1164. "notNull": true,
  1165. "autoincrement": false
  1166. },
  1167. "description": {
  1168. "name": "description",
  1169. "type": "text",
  1170. "primaryKey": false,
  1171. "notNull": true,
  1172. "autoincrement": false,
  1173. "default": "''"
  1174. },
  1175. "transport": {
  1176. "name": "transport",
  1177. "type": "text",
  1178. "primaryKey": false,
  1179. "notNull": true,
  1180. "autoincrement": false
  1181. },
  1182. "enabled": {
  1183. "name": "enabled",
  1184. "type": "integer",
  1185. "primaryKey": false,
  1186. "notNull": true,
  1187. "autoincrement": false,
  1188. "default": true
  1189. },
  1190. "url": {
  1191. "name": "url",
  1192. "type": "text",
  1193. "primaryKey": false,
  1194. "notNull": true,
  1195. "autoincrement": false,
  1196. "default": "''"
  1197. },
  1198. "headers": {
  1199. "name": "headers",
  1200. "type": "text",
  1201. "primaryKey": false,
  1202. "notNull": true,
  1203. "autoincrement": false,
  1204. "default": "'{}'"
  1205. },
  1206. "command": {
  1207. "name": "command",
  1208. "type": "text",
  1209. "primaryKey": false,
  1210. "notNull": true,
  1211. "autoincrement": false,
  1212. "default": "''"
  1213. },
  1214. "args": {
  1215. "name": "args",
  1216. "type": "text",
  1217. "primaryKey": false,
  1218. "notNull": true,
  1219. "autoincrement": false,
  1220. "default": "'[]'"
  1221. },
  1222. "env": {
  1223. "name": "env",
  1224. "type": "text",
  1225. "primaryKey": false,
  1226. "notNull": true,
  1227. "autoincrement": false,
  1228. "default": "'{}'"
  1229. },
  1230. "allow_network": {
  1231. "name": "allow_network",
  1232. "type": "integer",
  1233. "primaryKey": false,
  1234. "notNull": true,
  1235. "autoincrement": false,
  1236. "default": false
  1237. },
  1238. "read_paths": {
  1239. "name": "read_paths",
  1240. "type": "text",
  1241. "primaryKey": false,
  1242. "notNull": true,
  1243. "autoincrement": false,
  1244. "default": "'[]'"
  1245. },
  1246. "write_paths": {
  1247. "name": "write_paths",
  1248. "type": "text",
  1249. "primaryKey": false,
  1250. "notNull": true,
  1251. "autoincrement": false,
  1252. "default": "'[]'"
  1253. },
  1254. "tool_policies": {
  1255. "name": "tool_policies",
  1256. "type": "text",
  1257. "primaryKey": false,
  1258. "notNull": true,
  1259. "autoincrement": false,
  1260. "default": "'{}'"
  1261. },
  1262. "background_tools": {
  1263. "name": "background_tools",
  1264. "type": "text",
  1265. "primaryKey": false,
  1266. "notNull": true,
  1267. "autoincrement": false,
  1268. "default": "'[]'"
  1269. },
  1270. "tool_hints": {
  1271. "name": "tool_hints",
  1272. "type": "text",
  1273. "primaryKey": false,
  1274. "notNull": true,
  1275. "autoincrement": false,
  1276. "default": "'{}'"
  1277. },
  1278. "oauth": {
  1279. "name": "oauth",
  1280. "type": "text",
  1281. "primaryKey": false,
  1282. "notNull": false,
  1283. "autoincrement": false
  1284. },
  1285. "tools_cache": {
  1286. "name": "tools_cache",
  1287. "type": "text",
  1288. "primaryKey": false,
  1289. "notNull": true,
  1290. "autoincrement": false,
  1291. "default": "'[]'"
  1292. },
  1293. "tools_updated_at": {
  1294. "name": "tools_updated_at",
  1295. "type": "text",
  1296. "primaryKey": false,
  1297. "notNull": false,
  1298. "autoincrement": false
  1299. },
  1300. "features": {
  1301. "name": "features",
  1302. "type": "text",
  1303. "primaryKey": false,
  1304. "notNull": true,
  1305. "autoincrement": false,
  1306. "default": "'{}'"
  1307. },
  1308. "created_at": {
  1309. "name": "created_at",
  1310. "type": "text",
  1311. "primaryKey": false,
  1312. "notNull": true,
  1313. "autoincrement": false,
  1314. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  1315. },
  1316. "updated_at": {
  1317. "name": "updated_at",
  1318. "type": "text",
  1319. "primaryKey": false,
  1320. "notNull": true,
  1321. "autoincrement": false,
  1322. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  1323. }
  1324. },
  1325. "indexes": {
  1326. "mcp_servers_name_unique": {
  1327. "name": "mcp_servers_name_unique",
  1328. "columns": [
  1329. "name"
  1330. ],
  1331. "isUnique": true
  1332. }
  1333. },
  1334. "foreignKeys": {},
  1335. "compositePrimaryKeys": {},
  1336. "uniqueConstraints": {},
  1337. "checkConstraints": {}
  1338. },
  1339. "profile_versions": {
  1340. "name": "profile_versions",
  1341. "columns": {
  1342. "profile_id": {
  1343. "name": "profile_id",
  1344. "type": "text",
  1345. "primaryKey": false,
  1346. "notNull": true,
  1347. "autoincrement": false
  1348. },
  1349. "version": {
  1350. "name": "version",
  1351. "type": "integer",
  1352. "primaryKey": false,
  1353. "notNull": true,
  1354. "autoincrement": false
  1355. },
  1356. "snapshot": {
  1357. "name": "snapshot",
  1358. "type": "text",
  1359. "primaryKey": false,
  1360. "notNull": true,
  1361. "autoincrement": false
  1362. },
  1363. "created_at": {
  1364. "name": "created_at",
  1365. "type": "text",
  1366. "primaryKey": false,
  1367. "notNull": true,
  1368. "autoincrement": false,
  1369. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  1370. }
  1371. },
  1372. "indexes": {},
  1373. "foreignKeys": {},
  1374. "compositePrimaryKeys": {
  1375. "profile_versions_profile_id_version_pk": {
  1376. "columns": [
  1377. "profile_id",
  1378. "version"
  1379. ],
  1380. "name": "profile_versions_profile_id_version_pk"
  1381. }
  1382. },
  1383. "uniqueConstraints": {},
  1384. "checkConstraints": {}
  1385. },
  1386. "profiles": {
  1387. "name": "profiles",
  1388. "columns": {
  1389. "id": {
  1390. "name": "id",
  1391. "type": "text",
  1392. "primaryKey": true,
  1393. "notNull": true,
  1394. "autoincrement": false
  1395. },
  1396. "name": {
  1397. "name": "name",
  1398. "type": "text",
  1399. "primaryKey": false,
  1400. "notNull": true,
  1401. "autoincrement": false
  1402. },
  1403. "description": {
  1404. "name": "description",
  1405. "type": "text",
  1406. "primaryKey": false,
  1407. "notNull": true,
  1408. "autoincrement": false,
  1409. "default": "''"
  1410. },
  1411. "provider": {
  1412. "name": "provider",
  1413. "type": "text",
  1414. "primaryKey": false,
  1415. "notNull": true,
  1416. "autoincrement": false
  1417. },
  1418. "model": {
  1419. "name": "model",
  1420. "type": "text",
  1421. "primaryKey": false,
  1422. "notNull": true,
  1423. "autoincrement": false
  1424. },
  1425. "system_prompt": {
  1426. "name": "system_prompt",
  1427. "type": "text",
  1428. "primaryKey": false,
  1429. "notNull": true,
  1430. "autoincrement": false,
  1431. "default": "''"
  1432. },
  1433. "permission_mode": {
  1434. "name": "permission_mode",
  1435. "type": "text",
  1436. "primaryKey": false,
  1437. "notNull": true,
  1438. "autoincrement": false,
  1439. "default": "'ask'"
  1440. },
  1441. "allowed_tools": {
  1442. "name": "allowed_tools",
  1443. "type": "text",
  1444. "primaryKey": false,
  1445. "notNull": true,
  1446. "autoincrement": false,
  1447. "default": "'[]'"
  1448. },
  1449. "disallowed_tools": {
  1450. "name": "disallowed_tools",
  1451. "type": "text",
  1452. "primaryKey": false,
  1453. "notNull": true,
  1454. "autoincrement": false,
  1455. "default": "'[]'"
  1456. },
  1457. "skills": {
  1458. "name": "skills",
  1459. "type": "text",
  1460. "primaryKey": false,
  1461. "notNull": true,
  1462. "autoincrement": false,
  1463. "default": "'\"all\"'"
  1464. },
  1465. "file_access": {
  1466. "name": "file_access",
  1467. "type": "text",
  1468. "primaryKey": false,
  1469. "notNull": true,
  1470. "autoincrement": false
  1471. },
  1472. "knowledge_root_ids": {
  1473. "name": "knowledge_root_ids",
  1474. "type": "text",
  1475. "primaryKey": false,
  1476. "notNull": true,
  1477. "autoincrement": false,
  1478. "default": "'[]'"
  1479. },
  1480. "mcp_server_ids": {
  1481. "name": "mcp_server_ids",
  1482. "type": "text",
  1483. "primaryKey": false,
  1484. "notNull": true,
  1485. "autoincrement": false,
  1486. "default": "'[]'"
  1487. },
  1488. "codex_plugin_ids": {
  1489. "name": "codex_plugin_ids",
  1490. "type": "text",
  1491. "primaryKey": false,
  1492. "notNull": true,
  1493. "autoincrement": false,
  1494. "default": "'[]'"
  1495. },
  1496. "is_default": {
  1497. "name": "is_default",
  1498. "type": "integer",
  1499. "primaryKey": false,
  1500. "notNull": true,
  1501. "autoincrement": false,
  1502. "default": false
  1503. },
  1504. "builtin": {
  1505. "name": "builtin",
  1506. "type": "integer",
  1507. "primaryKey": false,
  1508. "notNull": true,
  1509. "autoincrement": false,
  1510. "default": false
  1511. },
  1512. "builtin_key": {
  1513. "name": "builtin_key",
  1514. "type": "text",
  1515. "primaryKey": false,
  1516. "notNull": false,
  1517. "autoincrement": false
  1518. },
  1519. "version": {
  1520. "name": "version",
  1521. "type": "integer",
  1522. "primaryKey": false,
  1523. "notNull": true,
  1524. "autoincrement": false,
  1525. "default": 1
  1526. },
  1527. "created_at": {
  1528. "name": "created_at",
  1529. "type": "text",
  1530. "primaryKey": false,
  1531. "notNull": true,
  1532. "autoincrement": false,
  1533. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  1534. },
  1535. "updated_at": {
  1536. "name": "updated_at",
  1537. "type": "text",
  1538. "primaryKey": false,
  1539. "notNull": true,
  1540. "autoincrement": false,
  1541. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  1542. }
  1543. },
  1544. "indexes": {},
  1545. "foreignKeys": {},
  1546. "compositePrimaryKeys": {},
  1547. "uniqueConstraints": {},
  1548. "checkConstraints": {}
  1549. },
  1550. "runs": {
  1551. "name": "runs",
  1552. "columns": {
  1553. "id": {
  1554. "name": "id",
  1555. "type": "text",
  1556. "primaryKey": true,
  1557. "notNull": true,
  1558. "autoincrement": false
  1559. },
  1560. "session_id": {
  1561. "name": "session_id",
  1562. "type": "text",
  1563. "primaryKey": false,
  1564. "notNull": true,
  1565. "autoincrement": false
  1566. },
  1567. "status": {
  1568. "name": "status",
  1569. "type": "text",
  1570. "primaryKey": false,
  1571. "notNull": true,
  1572. "autoincrement": false
  1573. },
  1574. "started_at": {
  1575. "name": "started_at",
  1576. "type": "text",
  1577. "primaryKey": false,
  1578. "notNull": false,
  1579. "autoincrement": false
  1580. },
  1581. "ended_at": {
  1582. "name": "ended_at",
  1583. "type": "text",
  1584. "primaryKey": false,
  1585. "notNull": false,
  1586. "autoincrement": false
  1587. },
  1588. "input_tokens": {
  1589. "name": "input_tokens",
  1590. "type": "integer",
  1591. "primaryKey": false,
  1592. "notNull": false,
  1593. "autoincrement": false
  1594. },
  1595. "output_tokens": {
  1596. "name": "output_tokens",
  1597. "type": "integer",
  1598. "primaryKey": false,
  1599. "notNull": false,
  1600. "autoincrement": false
  1601. },
  1602. "cache_read_tokens": {
  1603. "name": "cache_read_tokens",
  1604. "type": "integer",
  1605. "primaryKey": false,
  1606. "notNull": false,
  1607. "autoincrement": false
  1608. },
  1609. "cache_write_tokens": {
  1610. "name": "cache_write_tokens",
  1611. "type": "integer",
  1612. "primaryKey": false,
  1613. "notNull": false,
  1614. "autoincrement": false
  1615. },
  1616. "cost_usd": {
  1617. "name": "cost_usd",
  1618. "type": "real",
  1619. "primaryKey": false,
  1620. "notNull": false,
  1621. "autoincrement": false
  1622. },
  1623. "context_tokens": {
  1624. "name": "context_tokens",
  1625. "type": "integer",
  1626. "primaryKey": false,
  1627. "notNull": false,
  1628. "autoincrement": false
  1629. },
  1630. "error": {
  1631. "name": "error",
  1632. "type": "text",
  1633. "primaryKey": false,
  1634. "notNull": false,
  1635. "autoincrement": false
  1636. },
  1637. "created_at": {
  1638. "name": "created_at",
  1639. "type": "text",
  1640. "primaryKey": false,
  1641. "notNull": true,
  1642. "autoincrement": false,
  1643. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  1644. }
  1645. },
  1646. "indexes": {
  1647. "runs_session_idx": {
  1648. "name": "runs_session_idx",
  1649. "columns": [
  1650. "session_id"
  1651. ],
  1652. "isUnique": false
  1653. }
  1654. },
  1655. "foreignKeys": {},
  1656. "compositePrimaryKeys": {},
  1657. "uniqueConstraints": {},
  1658. "checkConstraints": {}
  1659. },
  1660. "schedule_runs": {
  1661. "name": "schedule_runs",
  1662. "columns": {
  1663. "id": {
  1664. "name": "id",
  1665. "type": "integer",
  1666. "primaryKey": true,
  1667. "notNull": true,
  1668. "autoincrement": true
  1669. },
  1670. "schedule_id": {
  1671. "name": "schedule_id",
  1672. "type": "text",
  1673. "primaryKey": false,
  1674. "notNull": true,
  1675. "autoincrement": false
  1676. },
  1677. "ts": {
  1678. "name": "ts",
  1679. "type": "text",
  1680. "primaryKey": false,
  1681. "notNull": true,
  1682. "autoincrement": false,
  1683. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  1684. },
  1685. "outcome": {
  1686. "name": "outcome",
  1687. "type": "text",
  1688. "primaryKey": false,
  1689. "notNull": true,
  1690. "autoincrement": false
  1691. },
  1692. "run_id": {
  1693. "name": "run_id",
  1694. "type": "text",
  1695. "primaryKey": false,
  1696. "notNull": false,
  1697. "autoincrement": false
  1698. },
  1699. "cost_usd": {
  1700. "name": "cost_usd",
  1701. "type": "real",
  1702. "primaryKey": false,
  1703. "notNull": false,
  1704. "autoincrement": false
  1705. },
  1706. "note": {
  1707. "name": "note",
  1708. "type": "text",
  1709. "primaryKey": false,
  1710. "notNull": false,
  1711. "autoincrement": false
  1712. }
  1713. },
  1714. "indexes": {
  1715. "schedule_runs_idx": {
  1716. "name": "schedule_runs_idx",
  1717. "columns": [
  1718. "schedule_id",
  1719. "id"
  1720. ],
  1721. "isUnique": false
  1722. }
  1723. },
  1724. "foreignKeys": {},
  1725. "compositePrimaryKeys": {},
  1726. "uniqueConstraints": {},
  1727. "checkConstraints": {}
  1728. },
  1729. "schedules": {
  1730. "name": "schedules",
  1731. "columns": {
  1732. "id": {
  1733. "name": "id",
  1734. "type": "text",
  1735. "primaryKey": true,
  1736. "notNull": true,
  1737. "autoincrement": false
  1738. },
  1739. "session_id": {
  1740. "name": "session_id",
  1741. "type": "text",
  1742. "primaryKey": false,
  1743. "notNull": false,
  1744. "autoincrement": false
  1745. },
  1746. "team_id": {
  1747. "name": "team_id",
  1748. "type": "text",
  1749. "primaryKey": false,
  1750. "notNull": false,
  1751. "autoincrement": false
  1752. },
  1753. "created_by_bot_id": {
  1754. "name": "created_by_bot_id",
  1755. "type": "text",
  1756. "primaryKey": false,
  1757. "notNull": false,
  1758. "autoincrement": false
  1759. },
  1760. "title": {
  1761. "name": "title",
  1762. "type": "text",
  1763. "primaryKey": false,
  1764. "notNull": true,
  1765. "autoincrement": false
  1766. },
  1767. "prompt": {
  1768. "name": "prompt",
  1769. "type": "text",
  1770. "primaryKey": false,
  1771. "notNull": true,
  1772. "autoincrement": false
  1773. },
  1774. "spec": {
  1775. "name": "spec",
  1776. "type": "text",
  1777. "primaryKey": false,
  1778. "notNull": true,
  1779. "autoincrement": false
  1780. },
  1781. "timezone": {
  1782. "name": "timezone",
  1783. "type": "text",
  1784. "primaryKey": false,
  1785. "notNull": true,
  1786. "autoincrement": false
  1787. },
  1788. "status": {
  1789. "name": "status",
  1790. "type": "text",
  1791. "primaryKey": false,
  1792. "notNull": true,
  1793. "autoincrement": false,
  1794. "default": "'active'"
  1795. },
  1796. "status_note": {
  1797. "name": "status_note",
  1798. "type": "text",
  1799. "primaryKey": false,
  1800. "notNull": false,
  1801. "autoincrement": false
  1802. },
  1803. "next_run_at": {
  1804. "name": "next_run_at",
  1805. "type": "text",
  1806. "primaryKey": false,
  1807. "notNull": false,
  1808. "autoincrement": false
  1809. },
  1810. "last_run_at": {
  1811. "name": "last_run_at",
  1812. "type": "text",
  1813. "primaryKey": false,
  1814. "notNull": false,
  1815. "autoincrement": false
  1816. },
  1817. "last_outcome": {
  1818. "name": "last_outcome",
  1819. "type": "text",
  1820. "primaryKey": false,
  1821. "notNull": false,
  1822. "autoincrement": false
  1823. },
  1824. "run_count": {
  1825. "name": "run_count",
  1826. "type": "integer",
  1827. "primaryKey": false,
  1828. "notNull": true,
  1829. "autoincrement": false,
  1830. "default": 0
  1831. },
  1832. "created_at": {
  1833. "name": "created_at",
  1834. "type": "text",
  1835. "primaryKey": false,
  1836. "notNull": true,
  1837. "autoincrement": false,
  1838. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  1839. },
  1840. "updated_at": {
  1841. "name": "updated_at",
  1842. "type": "text",
  1843. "primaryKey": false,
  1844. "notNull": true,
  1845. "autoincrement": false,
  1846. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  1847. }
  1848. },
  1849. "indexes": {
  1850. "schedules_due_idx": {
  1851. "name": "schedules_due_idx",
  1852. "columns": [
  1853. "status",
  1854. "next_run_at"
  1855. ],
  1856. "isUnique": false
  1857. },
  1858. "schedules_session_idx": {
  1859. "name": "schedules_session_idx",
  1860. "columns": [
  1861. "session_id"
  1862. ],
  1863. "isUnique": false
  1864. },
  1865. "schedules_team_idx": {
  1866. "name": "schedules_team_idx",
  1867. "columns": [
  1868. "team_id"
  1869. ],
  1870. "isUnique": false
  1871. }
  1872. },
  1873. "foreignKeys": {},
  1874. "compositePrimaryKeys": {},
  1875. "uniqueConstraints": {},
  1876. "checkConstraints": {}
  1877. },
  1878. "sessions": {
  1879. "name": "sessions",
  1880. "columns": {
  1881. "id": {
  1882. "name": "id",
  1883. "type": "text",
  1884. "primaryKey": true,
  1885. "notNull": true,
  1886. "autoincrement": false
  1887. },
  1888. "source": {
  1889. "name": "source",
  1890. "type": "text",
  1891. "primaryKey": false,
  1892. "notNull": true,
  1893. "autoincrement": false
  1894. },
  1895. "profile_id": {
  1896. "name": "profile_id",
  1897. "type": "text",
  1898. "primaryKey": false,
  1899. "notNull": false,
  1900. "autoincrement": false
  1901. },
  1902. "provider": {
  1903. "name": "provider",
  1904. "type": "text",
  1905. "primaryKey": false,
  1906. "notNull": true,
  1907. "autoincrement": false
  1908. },
  1909. "model": {
  1910. "name": "model",
  1911. "type": "text",
  1912. "primaryKey": false,
  1913. "notNull": true,
  1914. "autoincrement": false
  1915. },
  1916. "permission_mode": {
  1917. "name": "permission_mode",
  1918. "type": "text",
  1919. "primaryKey": false,
  1920. "notNull": false,
  1921. "autoincrement": false
  1922. },
  1923. "system_prompt_append": {
  1924. "name": "system_prompt_append",
  1925. "type": "text",
  1926. "primaryKey": false,
  1927. "notNull": true,
  1928. "autoincrement": false,
  1929. "default": "''"
  1930. },
  1931. "provider_session_id": {
  1932. "name": "provider_session_id",
  1933. "type": "text",
  1934. "primaryKey": false,
  1935. "notNull": false,
  1936. "autoincrement": false
  1937. },
  1938. "workspace_dir": {
  1939. "name": "workspace_dir",
  1940. "type": "text",
  1941. "primaryKey": false,
  1942. "notNull": true,
  1943. "autoincrement": false
  1944. },
  1945. "title": {
  1946. "name": "title",
  1947. "type": "text",
  1948. "primaryKey": false,
  1949. "notNull": true,
  1950. "autoincrement": false,
  1951. "default": "''"
  1952. },
  1953. "last_seq": {
  1954. "name": "last_seq",
  1955. "type": "integer",
  1956. "primaryKey": false,
  1957. "notNull": true,
  1958. "autoincrement": false,
  1959. "default": 0
  1960. },
  1961. "archived": {
  1962. "name": "archived",
  1963. "type": "integer",
  1964. "primaryKey": false,
  1965. "notNull": true,
  1966. "autoincrement": false,
  1967. "default": false
  1968. },
  1969. "created_at": {
  1970. "name": "created_at",
  1971. "type": "text",
  1972. "primaryKey": false,
  1973. "notNull": true,
  1974. "autoincrement": false,
  1975. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  1976. },
  1977. "updated_at": {
  1978. "name": "updated_at",
  1979. "type": "text",
  1980. "primaryKey": false,
  1981. "notNull": true,
  1982. "autoincrement": false,
  1983. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  1984. }
  1985. },
  1986. "indexes": {
  1987. "sessions_source_idx": {
  1988. "name": "sessions_source_idx",
  1989. "columns": [
  1990. "source",
  1991. "updated_at"
  1992. ],
  1993. "isUnique": false
  1994. }
  1995. },
  1996. "foreignKeys": {},
  1997. "compositePrimaryKeys": {},
  1998. "uniqueConstraints": {},
  1999. "checkConstraints": {}
  2000. },
  2001. "settings": {
  2002. "name": "settings",
  2003. "columns": {
  2004. "key": {
  2005. "name": "key",
  2006. "type": "text",
  2007. "primaryKey": true,
  2008. "notNull": true,
  2009. "autoincrement": false
  2010. },
  2011. "value": {
  2012. "name": "value",
  2013. "type": "text",
  2014. "primaryKey": false,
  2015. "notNull": true,
  2016. "autoincrement": false
  2017. },
  2018. "updated_at": {
  2019. "name": "updated_at",
  2020. "type": "text",
  2021. "primaryKey": false,
  2022. "notNull": true,
  2023. "autoincrement": false,
  2024. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  2025. }
  2026. },
  2027. "indexes": {},
  2028. "foreignKeys": {},
  2029. "compositePrimaryKeys": {},
  2030. "uniqueConstraints": {},
  2031. "checkConstraints": {}
  2032. },
  2033. "skill_sources": {
  2034. "name": "skill_sources",
  2035. "columns": {
  2036. "id": {
  2037. "name": "id",
  2038. "type": "text",
  2039. "primaryKey": true,
  2040. "notNull": true,
  2041. "autoincrement": false
  2042. },
  2043. "name": {
  2044. "name": "name",
  2045. "type": "text",
  2046. "primaryKey": false,
  2047. "notNull": true,
  2048. "autoincrement": false
  2049. },
  2050. "description": {
  2051. "name": "description",
  2052. "type": "text",
  2053. "primaryKey": false,
  2054. "notNull": true,
  2055. "autoincrement": false,
  2056. "default": "''"
  2057. },
  2058. "kind": {
  2059. "name": "kind",
  2060. "type": "text",
  2061. "primaryKey": false,
  2062. "notNull": true,
  2063. "autoincrement": false
  2064. },
  2065. "path": {
  2066. "name": "path",
  2067. "type": "text",
  2068. "primaryKey": false,
  2069. "notNull": true,
  2070. "autoincrement": false
  2071. },
  2072. "sync_mode": {
  2073. "name": "sync_mode",
  2074. "type": "text",
  2075. "primaryKey": false,
  2076. "notNull": true,
  2077. "autoincrement": false,
  2078. "default": "'manual'"
  2079. },
  2080. "interval_min": {
  2081. "name": "interval_min",
  2082. "type": "integer",
  2083. "primaryKey": false,
  2084. "notNull": true,
  2085. "autoincrement": false,
  2086. "default": 10
  2087. },
  2088. "last_sync_at": {
  2089. "name": "last_sync_at",
  2090. "type": "text",
  2091. "primaryKey": false,
  2092. "notNull": false,
  2093. "autoincrement": false
  2094. },
  2095. "last_sync_digest": {
  2096. "name": "last_sync_digest",
  2097. "type": "text",
  2098. "primaryKey": false,
  2099. "notNull": false,
  2100. "autoincrement": false
  2101. },
  2102. "status": {
  2103. "name": "status",
  2104. "type": "text",
  2105. "primaryKey": false,
  2106. "notNull": true,
  2107. "autoincrement": false,
  2108. "default": "'never'"
  2109. },
  2110. "last_error": {
  2111. "name": "last_error",
  2112. "type": "text",
  2113. "primaryKey": false,
  2114. "notNull": false,
  2115. "autoincrement": false
  2116. },
  2117. "created_at": {
  2118. "name": "created_at",
  2119. "type": "text",
  2120. "primaryKey": false,
  2121. "notNull": true,
  2122. "autoincrement": false,
  2123. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  2124. },
  2125. "updated_at": {
  2126. "name": "updated_at",
  2127. "type": "text",
  2128. "primaryKey": false,
  2129. "notNull": true,
  2130. "autoincrement": false,
  2131. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  2132. }
  2133. },
  2134. "indexes": {},
  2135. "foreignKeys": {},
  2136. "compositePrimaryKeys": {},
  2137. "uniqueConstraints": {},
  2138. "checkConstraints": {}
  2139. },
  2140. "tasks": {
  2141. "name": "tasks",
  2142. "columns": {
  2143. "id": {
  2144. "name": "id",
  2145. "type": "text",
  2146. "primaryKey": true,
  2147. "notNull": true,
  2148. "autoincrement": false
  2149. },
  2150. "job_id": {
  2151. "name": "job_id",
  2152. "type": "text",
  2153. "primaryKey": false,
  2154. "notNull": true,
  2155. "autoincrement": false
  2156. },
  2157. "team_id": {
  2158. "name": "team_id",
  2159. "type": "text",
  2160. "primaryKey": false,
  2161. "notNull": true,
  2162. "autoincrement": false
  2163. },
  2164. "no": {
  2165. "name": "no",
  2166. "type": "integer",
  2167. "primaryKey": false,
  2168. "notNull": true,
  2169. "autoincrement": false
  2170. },
  2171. "bot_id": {
  2172. "name": "bot_id",
  2173. "type": "text",
  2174. "primaryKey": false,
  2175. "notNull": true,
  2176. "autoincrement": false
  2177. },
  2178. "title": {
  2179. "name": "title",
  2180. "type": "text",
  2181. "primaryKey": false,
  2182. "notNull": true,
  2183. "autoincrement": false
  2184. },
  2185. "instructions": {
  2186. "name": "instructions",
  2187. "type": "text",
  2188. "primaryKey": false,
  2189. "notNull": true,
  2190. "autoincrement": false
  2191. },
  2192. "depends_on": {
  2193. "name": "depends_on",
  2194. "type": "text",
  2195. "primaryKey": false,
  2196. "notNull": true,
  2197. "autoincrement": false,
  2198. "default": "'[]'"
  2199. },
  2200. "status": {
  2201. "name": "status",
  2202. "type": "text",
  2203. "primaryKey": false,
  2204. "notNull": true,
  2205. "autoincrement": false
  2206. },
  2207. "follow_up": {
  2208. "name": "follow_up",
  2209. "type": "text",
  2210. "primaryKey": false,
  2211. "notNull": false,
  2212. "autoincrement": false
  2213. },
  2214. "result": {
  2215. "name": "result",
  2216. "type": "text",
  2217. "primaryKey": false,
  2218. "notNull": false,
  2219. "autoincrement": false
  2220. },
  2221. "files": {
  2222. "name": "files",
  2223. "type": "text",
  2224. "primaryKey": false,
  2225. "notNull": true,
  2226. "autoincrement": false,
  2227. "default": "'[]'"
  2228. },
  2229. "run_id": {
  2230. "name": "run_id",
  2231. "type": "text",
  2232. "primaryKey": false,
  2233. "notNull": false,
  2234. "autoincrement": false
  2235. },
  2236. "session_id": {
  2237. "name": "session_id",
  2238. "type": "text",
  2239. "primaryKey": false,
  2240. "notNull": false,
  2241. "autoincrement": false
  2242. },
  2243. "created_at": {
  2244. "name": "created_at",
  2245. "type": "text",
  2246. "primaryKey": false,
  2247. "notNull": true,
  2248. "autoincrement": false,
  2249. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  2250. },
  2251. "started_at": {
  2252. "name": "started_at",
  2253. "type": "text",
  2254. "primaryKey": false,
  2255. "notNull": false,
  2256. "autoincrement": false
  2257. },
  2258. "ended_at": {
  2259. "name": "ended_at",
  2260. "type": "text",
  2261. "primaryKey": false,
  2262. "notNull": false,
  2263. "autoincrement": false
  2264. }
  2265. },
  2266. "indexes": {
  2267. "tasks_team_idx": {
  2268. "name": "tasks_team_idx",
  2269. "columns": [
  2270. "team_id",
  2271. "no"
  2272. ],
  2273. "isUnique": false
  2274. },
  2275. "tasks_job_idx": {
  2276. "name": "tasks_job_idx",
  2277. "columns": [
  2278. "job_id"
  2279. ],
  2280. "isUnique": false
  2281. }
  2282. },
  2283. "foreignKeys": {},
  2284. "compositePrimaryKeys": {},
  2285. "uniqueConstraints": {},
  2286. "checkConstraints": {}
  2287. },
  2288. "team_bot_sessions": {
  2289. "name": "team_bot_sessions",
  2290. "columns": {
  2291. "team_id": {
  2292. "name": "team_id",
  2293. "type": "text",
  2294. "primaryKey": false,
  2295. "notNull": true,
  2296. "autoincrement": false
  2297. },
  2298. "bot_id": {
  2299. "name": "bot_id",
  2300. "type": "text",
  2301. "primaryKey": false,
  2302. "notNull": true,
  2303. "autoincrement": false
  2304. },
  2305. "session_id": {
  2306. "name": "session_id",
  2307. "type": "text",
  2308. "primaryKey": false,
  2309. "notNull": true,
  2310. "autoincrement": false
  2311. },
  2312. "last_read_seq": {
  2313. "name": "last_read_seq",
  2314. "type": "integer",
  2315. "primaryKey": false,
  2316. "notNull": true,
  2317. "autoincrement": false,
  2318. "default": 0
  2319. },
  2320. "reset_requested": {
  2321. "name": "reset_requested",
  2322. "type": "integer",
  2323. "primaryKey": false,
  2324. "notNull": true,
  2325. "autoincrement": false,
  2326. "default": false
  2327. }
  2328. },
  2329. "indexes": {
  2330. "team_bot_sessions_session_id_unique": {
  2331. "name": "team_bot_sessions_session_id_unique",
  2332. "columns": [
  2333. "session_id"
  2334. ],
  2335. "isUnique": true
  2336. }
  2337. },
  2338. "foreignKeys": {},
  2339. "compositePrimaryKeys": {
  2340. "team_bot_sessions_team_id_bot_id_pk": {
  2341. "columns": [
  2342. "team_id",
  2343. "bot_id"
  2344. ],
  2345. "name": "team_bot_sessions_team_id_bot_id_pk"
  2346. }
  2347. },
  2348. "uniqueConstraints": {},
  2349. "checkConstraints": {}
  2350. },
  2351. "team_bots": {
  2352. "name": "team_bots",
  2353. "columns": {
  2354. "team_id": {
  2355. "name": "team_id",
  2356. "type": "text",
  2357. "primaryKey": false,
  2358. "notNull": true,
  2359. "autoincrement": false
  2360. },
  2361. "bot_id": {
  2362. "name": "bot_id",
  2363. "type": "text",
  2364. "primaryKey": false,
  2365. "notNull": true,
  2366. "autoincrement": false
  2367. },
  2368. "role": {
  2369. "name": "role",
  2370. "type": "text",
  2371. "primaryKey": false,
  2372. "notNull": true,
  2373. "autoincrement": false
  2374. },
  2375. "joined_at": {
  2376. "name": "joined_at",
  2377. "type": "text",
  2378. "primaryKey": false,
  2379. "notNull": true,
  2380. "autoincrement": false,
  2381. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  2382. }
  2383. },
  2384. "indexes": {
  2385. "team_bots_bot_idx": {
  2386. "name": "team_bots_bot_idx",
  2387. "columns": [
  2388. "bot_id"
  2389. ],
  2390. "isUnique": false
  2391. }
  2392. },
  2393. "foreignKeys": {},
  2394. "compositePrimaryKeys": {
  2395. "team_bots_team_id_bot_id_pk": {
  2396. "columns": [
  2397. "team_id",
  2398. "bot_id"
  2399. ],
  2400. "name": "team_bots_team_id_bot_id_pk"
  2401. }
  2402. },
  2403. "uniqueConstraints": {},
  2404. "checkConstraints": {}
  2405. },
  2406. "team_cases": {
  2407. "name": "team_cases",
  2408. "columns": {
  2409. "id": {
  2410. "name": "id",
  2411. "type": "text",
  2412. "primaryKey": true,
  2413. "notNull": true,
  2414. "autoincrement": false
  2415. },
  2416. "name": {
  2417. "name": "name",
  2418. "type": "text",
  2419. "primaryKey": false,
  2420. "notNull": true,
  2421. "autoincrement": false
  2422. },
  2423. "lead_bot_id": {
  2424. "name": "lead_bot_id",
  2425. "type": "text",
  2426. "primaryKey": false,
  2427. "notNull": false,
  2428. "autoincrement": false
  2429. },
  2430. "worker_bot_ids": {
  2431. "name": "worker_bot_ids",
  2432. "type": "text",
  2433. "primaryKey": false,
  2434. "notNull": true,
  2435. "autoincrement": false,
  2436. "default": "'[]'"
  2437. },
  2438. "stub_bot_ids": {
  2439. "name": "stub_bot_ids",
  2440. "type": "text",
  2441. "primaryKey": false,
  2442. "notNull": true,
  2443. "autoincrement": false,
  2444. "default": "'[]'"
  2445. },
  2446. "limits": {
  2447. "name": "limits",
  2448. "type": "text",
  2449. "primaryKey": false,
  2450. "notNull": false,
  2451. "autoincrement": false
  2452. },
  2453. "human_name": {
  2454. "name": "human_name",
  2455. "type": "text",
  2456. "primaryKey": false,
  2457. "notNull": true,
  2458. "autoincrement": false
  2459. },
  2460. "text": {
  2461. "name": "text",
  2462. "type": "text",
  2463. "primaryKey": false,
  2464. "notNull": true,
  2465. "autoincrement": false
  2466. },
  2467. "mentions": {
  2468. "name": "mentions",
  2469. "type": "text",
  2470. "primaryKey": false,
  2471. "notNull": true,
  2472. "autoincrement": false,
  2473. "default": "'[]'"
  2474. },
  2475. "files": {
  2476. "name": "files",
  2477. "type": "text",
  2478. "primaryKey": false,
  2479. "notNull": true,
  2480. "autoincrement": false,
  2481. "default": "'[]'"
  2482. },
  2483. "created_at": {
  2484. "name": "created_at",
  2485. "type": "text",
  2486. "primaryKey": false,
  2487. "notNull": true,
  2488. "autoincrement": false,
  2489. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  2490. },
  2491. "updated_at": {
  2492. "name": "updated_at",
  2493. "type": "text",
  2494. "primaryKey": false,
  2495. "notNull": true,
  2496. "autoincrement": false,
  2497. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  2498. }
  2499. },
  2500. "indexes": {},
  2501. "foreignKeys": {},
  2502. "compositePrimaryKeys": {},
  2503. "uniqueConstraints": {},
  2504. "checkConstraints": {}
  2505. },
  2506. "team_events": {
  2507. "name": "team_events",
  2508. "columns": {
  2509. "team_id": {
  2510. "name": "team_id",
  2511. "type": "text",
  2512. "primaryKey": false,
  2513. "notNull": true,
  2514. "autoincrement": false
  2515. },
  2516. "seq": {
  2517. "name": "seq",
  2518. "type": "integer",
  2519. "primaryKey": false,
  2520. "notNull": true,
  2521. "autoincrement": false
  2522. },
  2523. "type": {
  2524. "name": "type",
  2525. "type": "text",
  2526. "primaryKey": false,
  2527. "notNull": true,
  2528. "autoincrement": false
  2529. },
  2530. "payload": {
  2531. "name": "payload",
  2532. "type": "text",
  2533. "primaryKey": false,
  2534. "notNull": true,
  2535. "autoincrement": false
  2536. },
  2537. "ts": {
  2538. "name": "ts",
  2539. "type": "text",
  2540. "primaryKey": false,
  2541. "notNull": true,
  2542. "autoincrement": false
  2543. }
  2544. },
  2545. "indexes": {},
  2546. "foreignKeys": {},
  2547. "compositePrimaryKeys": {
  2548. "team_events_team_id_seq_pk": {
  2549. "columns": [
  2550. "team_id",
  2551. "seq"
  2552. ],
  2553. "name": "team_events_team_id_seq_pk"
  2554. }
  2555. },
  2556. "uniqueConstraints": {},
  2557. "checkConstraints": {}
  2558. },
  2559. "teams": {
  2560. "name": "teams",
  2561. "columns": {
  2562. "id": {
  2563. "name": "id",
  2564. "type": "text",
  2565. "primaryKey": true,
  2566. "notNull": true,
  2567. "autoincrement": false
  2568. },
  2569. "source": {
  2570. "name": "source",
  2571. "type": "text",
  2572. "primaryKey": false,
  2573. "notNull": true,
  2574. "autoincrement": false
  2575. },
  2576. "title": {
  2577. "name": "title",
  2578. "type": "text",
  2579. "primaryKey": false,
  2580. "notNull": true,
  2581. "autoincrement": false,
  2582. "default": "''"
  2583. },
  2584. "human": {
  2585. "name": "human",
  2586. "type": "text",
  2587. "primaryKey": false,
  2588. "notNull": true,
  2589. "autoincrement": false
  2590. },
  2591. "status": {
  2592. "name": "status",
  2593. "type": "text",
  2594. "primaryKey": false,
  2595. "notNull": true,
  2596. "autoincrement": false,
  2597. "default": "'active'"
  2598. },
  2599. "workspace_dir": {
  2600. "name": "workspace_dir",
  2601. "type": "text",
  2602. "primaryKey": false,
  2603. "notNull": true,
  2604. "autoincrement": false
  2605. },
  2606. "limits": {
  2607. "name": "limits",
  2608. "type": "text",
  2609. "primaryKey": false,
  2610. "notNull": false,
  2611. "autoincrement": false
  2612. },
  2613. "debug": {
  2614. "name": "debug",
  2615. "type": "text",
  2616. "primaryKey": false,
  2617. "notNull": true,
  2618. "autoincrement": false,
  2619. "default": "'{\"stepMode\":false,\"stubBotIds\":[]}'"
  2620. },
  2621. "last_seq": {
  2622. "name": "last_seq",
  2623. "type": "integer",
  2624. "primaryKey": false,
  2625. "notNull": true,
  2626. "autoincrement": false,
  2627. "default": 0
  2628. },
  2629. "case_id": {
  2630. "name": "case_id",
  2631. "type": "text",
  2632. "primaryKey": false,
  2633. "notNull": false,
  2634. "autoincrement": false
  2635. },
  2636. "created_at": {
  2637. "name": "created_at",
  2638. "type": "text",
  2639. "primaryKey": false,
  2640. "notNull": true,
  2641. "autoincrement": false,
  2642. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  2643. },
  2644. "updated_at": {
  2645. "name": "updated_at",
  2646. "type": "text",
  2647. "primaryKey": false,
  2648. "notNull": true,
  2649. "autoincrement": false,
  2650. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  2651. }
  2652. },
  2653. "indexes": {
  2654. "teams_source_idx": {
  2655. "name": "teams_source_idx",
  2656. "columns": [
  2657. "source",
  2658. "updated_at"
  2659. ],
  2660. "isUnique": false
  2661. },
  2662. "teams_case_idx": {
  2663. "name": "teams_case_idx",
  2664. "columns": [
  2665. "case_id"
  2666. ],
  2667. "isUnique": false
  2668. }
  2669. },
  2670. "foreignKeys": {},
  2671. "compositePrimaryKeys": {},
  2672. "uniqueConstraints": {},
  2673. "checkConstraints": {}
  2674. },
  2675. "usage_daily": {
  2676. "name": "usage_daily",
  2677. "columns": {
  2678. "date": {
  2679. "name": "date",
  2680. "type": "text",
  2681. "primaryKey": false,
  2682. "notNull": true,
  2683. "autoincrement": false
  2684. },
  2685. "source": {
  2686. "name": "source",
  2687. "type": "text",
  2688. "primaryKey": false,
  2689. "notNull": true,
  2690. "autoincrement": false
  2691. },
  2692. "provider": {
  2693. "name": "provider",
  2694. "type": "text",
  2695. "primaryKey": false,
  2696. "notNull": true,
  2697. "autoincrement": false
  2698. },
  2699. "model": {
  2700. "name": "model",
  2701. "type": "text",
  2702. "primaryKey": false,
  2703. "notNull": true,
  2704. "autoincrement": false
  2705. },
  2706. "runs": {
  2707. "name": "runs",
  2708. "type": "integer",
  2709. "primaryKey": false,
  2710. "notNull": true,
  2711. "autoincrement": false,
  2712. "default": 0
  2713. },
  2714. "failed": {
  2715. "name": "failed",
  2716. "type": "integer",
  2717. "primaryKey": false,
  2718. "notNull": true,
  2719. "autoincrement": false,
  2720. "default": 0
  2721. },
  2722. "interrupted": {
  2723. "name": "interrupted",
  2724. "type": "integer",
  2725. "primaryKey": false,
  2726. "notNull": true,
  2727. "autoincrement": false,
  2728. "default": 0
  2729. },
  2730. "input_tokens": {
  2731. "name": "input_tokens",
  2732. "type": "integer",
  2733. "primaryKey": false,
  2734. "notNull": true,
  2735. "autoincrement": false,
  2736. "default": 0
  2737. },
  2738. "output_tokens": {
  2739. "name": "output_tokens",
  2740. "type": "integer",
  2741. "primaryKey": false,
  2742. "notNull": true,
  2743. "autoincrement": false,
  2744. "default": 0
  2745. },
  2746. "cache_read_tokens": {
  2747. "name": "cache_read_tokens",
  2748. "type": "integer",
  2749. "primaryKey": false,
  2750. "notNull": true,
  2751. "autoincrement": false,
  2752. "default": 0
  2753. },
  2754. "cache_write_tokens": {
  2755. "name": "cache_write_tokens",
  2756. "type": "integer",
  2757. "primaryKey": false,
  2758. "notNull": true,
  2759. "autoincrement": false,
  2760. "default": 0
  2761. },
  2762. "cost_usd": {
  2763. "name": "cost_usd",
  2764. "type": "real",
  2765. "primaryKey": false,
  2766. "notNull": true,
  2767. "autoincrement": false,
  2768. "default": 0
  2769. },
  2770. "duration_ms": {
  2771. "name": "duration_ms",
  2772. "type": "integer",
  2773. "primaryKey": false,
  2774. "notNull": true,
  2775. "autoincrement": false,
  2776. "default": 0
  2777. }
  2778. },
  2779. "indexes": {},
  2780. "foreignKeys": {},
  2781. "compositePrimaryKeys": {
  2782. "usage_daily_date_source_provider_model_pk": {
  2783. "columns": [
  2784. "date",
  2785. "source",
  2786. "provider",
  2787. "model"
  2788. ],
  2789. "name": "usage_daily_date_source_provider_model_pk"
  2790. }
  2791. },
  2792. "uniqueConstraints": {},
  2793. "checkConstraints": {}
  2794. }
  2795. },
  2796. "views": {},
  2797. "enums": {},
  2798. "_meta": {
  2799. "schemas": {},
  2800. "tables": {},
  2801. "columns": {}
  2802. },
  2803. "internal": {
  2804. "indexes": {}
  2805. }
  2806. }