0016_snapshot.json 70 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791
  1. {
  2. "version": "6",
  3. "dialect": "sqlite",
  4. "id": "eee08c04-6bd9-42a5-bd69-a6bfaf5dece3",
  5. "prevId": "25757f9e-0267-45e8-bc47-9a12c0ff1d85",
  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. "tools_cache": {
  1279. "name": "tools_cache",
  1280. "type": "text",
  1281. "primaryKey": false,
  1282. "notNull": true,
  1283. "autoincrement": false,
  1284. "default": "'[]'"
  1285. },
  1286. "tools_updated_at": {
  1287. "name": "tools_updated_at",
  1288. "type": "text",
  1289. "primaryKey": false,
  1290. "notNull": false,
  1291. "autoincrement": false
  1292. },
  1293. "created_at": {
  1294. "name": "created_at",
  1295. "type": "text",
  1296. "primaryKey": false,
  1297. "notNull": true,
  1298. "autoincrement": false,
  1299. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  1300. },
  1301. "updated_at": {
  1302. "name": "updated_at",
  1303. "type": "text",
  1304. "primaryKey": false,
  1305. "notNull": true,
  1306. "autoincrement": false,
  1307. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  1308. }
  1309. },
  1310. "indexes": {
  1311. "mcp_servers_name_unique": {
  1312. "name": "mcp_servers_name_unique",
  1313. "columns": [
  1314. "name"
  1315. ],
  1316. "isUnique": true
  1317. }
  1318. },
  1319. "foreignKeys": {},
  1320. "compositePrimaryKeys": {},
  1321. "uniqueConstraints": {},
  1322. "checkConstraints": {}
  1323. },
  1324. "profile_versions": {
  1325. "name": "profile_versions",
  1326. "columns": {
  1327. "profile_id": {
  1328. "name": "profile_id",
  1329. "type": "text",
  1330. "primaryKey": false,
  1331. "notNull": true,
  1332. "autoincrement": false
  1333. },
  1334. "version": {
  1335. "name": "version",
  1336. "type": "integer",
  1337. "primaryKey": false,
  1338. "notNull": true,
  1339. "autoincrement": false
  1340. },
  1341. "snapshot": {
  1342. "name": "snapshot",
  1343. "type": "text",
  1344. "primaryKey": false,
  1345. "notNull": true,
  1346. "autoincrement": false
  1347. },
  1348. "created_at": {
  1349. "name": "created_at",
  1350. "type": "text",
  1351. "primaryKey": false,
  1352. "notNull": true,
  1353. "autoincrement": false,
  1354. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  1355. }
  1356. },
  1357. "indexes": {},
  1358. "foreignKeys": {},
  1359. "compositePrimaryKeys": {
  1360. "profile_versions_profile_id_version_pk": {
  1361. "columns": [
  1362. "profile_id",
  1363. "version"
  1364. ],
  1365. "name": "profile_versions_profile_id_version_pk"
  1366. }
  1367. },
  1368. "uniqueConstraints": {},
  1369. "checkConstraints": {}
  1370. },
  1371. "profiles": {
  1372. "name": "profiles",
  1373. "columns": {
  1374. "id": {
  1375. "name": "id",
  1376. "type": "text",
  1377. "primaryKey": true,
  1378. "notNull": true,
  1379. "autoincrement": false
  1380. },
  1381. "name": {
  1382. "name": "name",
  1383. "type": "text",
  1384. "primaryKey": false,
  1385. "notNull": true,
  1386. "autoincrement": false
  1387. },
  1388. "description": {
  1389. "name": "description",
  1390. "type": "text",
  1391. "primaryKey": false,
  1392. "notNull": true,
  1393. "autoincrement": false,
  1394. "default": "''"
  1395. },
  1396. "provider": {
  1397. "name": "provider",
  1398. "type": "text",
  1399. "primaryKey": false,
  1400. "notNull": true,
  1401. "autoincrement": false
  1402. },
  1403. "model": {
  1404. "name": "model",
  1405. "type": "text",
  1406. "primaryKey": false,
  1407. "notNull": true,
  1408. "autoincrement": false
  1409. },
  1410. "system_prompt": {
  1411. "name": "system_prompt",
  1412. "type": "text",
  1413. "primaryKey": false,
  1414. "notNull": true,
  1415. "autoincrement": false,
  1416. "default": "''"
  1417. },
  1418. "permission_mode": {
  1419. "name": "permission_mode",
  1420. "type": "text",
  1421. "primaryKey": false,
  1422. "notNull": true,
  1423. "autoincrement": false,
  1424. "default": "'ask'"
  1425. },
  1426. "allowed_tools": {
  1427. "name": "allowed_tools",
  1428. "type": "text",
  1429. "primaryKey": false,
  1430. "notNull": true,
  1431. "autoincrement": false,
  1432. "default": "'[]'"
  1433. },
  1434. "disallowed_tools": {
  1435. "name": "disallowed_tools",
  1436. "type": "text",
  1437. "primaryKey": false,
  1438. "notNull": true,
  1439. "autoincrement": false,
  1440. "default": "'[]'"
  1441. },
  1442. "skills": {
  1443. "name": "skills",
  1444. "type": "text",
  1445. "primaryKey": false,
  1446. "notNull": true,
  1447. "autoincrement": false,
  1448. "default": "'\"all\"'"
  1449. },
  1450. "file_access": {
  1451. "name": "file_access",
  1452. "type": "text",
  1453. "primaryKey": false,
  1454. "notNull": true,
  1455. "autoincrement": false
  1456. },
  1457. "knowledge_root_ids": {
  1458. "name": "knowledge_root_ids",
  1459. "type": "text",
  1460. "primaryKey": false,
  1461. "notNull": true,
  1462. "autoincrement": false,
  1463. "default": "'[]'"
  1464. },
  1465. "mcp_server_ids": {
  1466. "name": "mcp_server_ids",
  1467. "type": "text",
  1468. "primaryKey": false,
  1469. "notNull": true,
  1470. "autoincrement": false,
  1471. "default": "'[]'"
  1472. },
  1473. "codex_plugin_ids": {
  1474. "name": "codex_plugin_ids",
  1475. "type": "text",
  1476. "primaryKey": false,
  1477. "notNull": true,
  1478. "autoincrement": false,
  1479. "default": "'[]'"
  1480. },
  1481. "is_default": {
  1482. "name": "is_default",
  1483. "type": "integer",
  1484. "primaryKey": false,
  1485. "notNull": true,
  1486. "autoincrement": false,
  1487. "default": false
  1488. },
  1489. "builtin": {
  1490. "name": "builtin",
  1491. "type": "integer",
  1492. "primaryKey": false,
  1493. "notNull": true,
  1494. "autoincrement": false,
  1495. "default": false
  1496. },
  1497. "builtin_key": {
  1498. "name": "builtin_key",
  1499. "type": "text",
  1500. "primaryKey": false,
  1501. "notNull": false,
  1502. "autoincrement": false
  1503. },
  1504. "version": {
  1505. "name": "version",
  1506. "type": "integer",
  1507. "primaryKey": false,
  1508. "notNull": true,
  1509. "autoincrement": false,
  1510. "default": 1
  1511. },
  1512. "created_at": {
  1513. "name": "created_at",
  1514. "type": "text",
  1515. "primaryKey": false,
  1516. "notNull": true,
  1517. "autoincrement": false,
  1518. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  1519. },
  1520. "updated_at": {
  1521. "name": "updated_at",
  1522. "type": "text",
  1523. "primaryKey": false,
  1524. "notNull": true,
  1525. "autoincrement": false,
  1526. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  1527. }
  1528. },
  1529. "indexes": {},
  1530. "foreignKeys": {},
  1531. "compositePrimaryKeys": {},
  1532. "uniqueConstraints": {},
  1533. "checkConstraints": {}
  1534. },
  1535. "runs": {
  1536. "name": "runs",
  1537. "columns": {
  1538. "id": {
  1539. "name": "id",
  1540. "type": "text",
  1541. "primaryKey": true,
  1542. "notNull": true,
  1543. "autoincrement": false
  1544. },
  1545. "session_id": {
  1546. "name": "session_id",
  1547. "type": "text",
  1548. "primaryKey": false,
  1549. "notNull": true,
  1550. "autoincrement": false
  1551. },
  1552. "status": {
  1553. "name": "status",
  1554. "type": "text",
  1555. "primaryKey": false,
  1556. "notNull": true,
  1557. "autoincrement": false
  1558. },
  1559. "started_at": {
  1560. "name": "started_at",
  1561. "type": "text",
  1562. "primaryKey": false,
  1563. "notNull": false,
  1564. "autoincrement": false
  1565. },
  1566. "ended_at": {
  1567. "name": "ended_at",
  1568. "type": "text",
  1569. "primaryKey": false,
  1570. "notNull": false,
  1571. "autoincrement": false
  1572. },
  1573. "input_tokens": {
  1574. "name": "input_tokens",
  1575. "type": "integer",
  1576. "primaryKey": false,
  1577. "notNull": false,
  1578. "autoincrement": false
  1579. },
  1580. "output_tokens": {
  1581. "name": "output_tokens",
  1582. "type": "integer",
  1583. "primaryKey": false,
  1584. "notNull": false,
  1585. "autoincrement": false
  1586. },
  1587. "cache_read_tokens": {
  1588. "name": "cache_read_tokens",
  1589. "type": "integer",
  1590. "primaryKey": false,
  1591. "notNull": false,
  1592. "autoincrement": false
  1593. },
  1594. "cache_write_tokens": {
  1595. "name": "cache_write_tokens",
  1596. "type": "integer",
  1597. "primaryKey": false,
  1598. "notNull": false,
  1599. "autoincrement": false
  1600. },
  1601. "cost_usd": {
  1602. "name": "cost_usd",
  1603. "type": "real",
  1604. "primaryKey": false,
  1605. "notNull": false,
  1606. "autoincrement": false
  1607. },
  1608. "context_tokens": {
  1609. "name": "context_tokens",
  1610. "type": "integer",
  1611. "primaryKey": false,
  1612. "notNull": false,
  1613. "autoincrement": false
  1614. },
  1615. "error": {
  1616. "name": "error",
  1617. "type": "text",
  1618. "primaryKey": false,
  1619. "notNull": false,
  1620. "autoincrement": false
  1621. },
  1622. "created_at": {
  1623. "name": "created_at",
  1624. "type": "text",
  1625. "primaryKey": false,
  1626. "notNull": true,
  1627. "autoincrement": false,
  1628. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  1629. }
  1630. },
  1631. "indexes": {
  1632. "runs_session_idx": {
  1633. "name": "runs_session_idx",
  1634. "columns": [
  1635. "session_id"
  1636. ],
  1637. "isUnique": false
  1638. }
  1639. },
  1640. "foreignKeys": {},
  1641. "compositePrimaryKeys": {},
  1642. "uniqueConstraints": {},
  1643. "checkConstraints": {}
  1644. },
  1645. "schedule_runs": {
  1646. "name": "schedule_runs",
  1647. "columns": {
  1648. "id": {
  1649. "name": "id",
  1650. "type": "integer",
  1651. "primaryKey": true,
  1652. "notNull": true,
  1653. "autoincrement": true
  1654. },
  1655. "schedule_id": {
  1656. "name": "schedule_id",
  1657. "type": "text",
  1658. "primaryKey": false,
  1659. "notNull": true,
  1660. "autoincrement": false
  1661. },
  1662. "ts": {
  1663. "name": "ts",
  1664. "type": "text",
  1665. "primaryKey": false,
  1666. "notNull": true,
  1667. "autoincrement": false,
  1668. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  1669. },
  1670. "outcome": {
  1671. "name": "outcome",
  1672. "type": "text",
  1673. "primaryKey": false,
  1674. "notNull": true,
  1675. "autoincrement": false
  1676. },
  1677. "run_id": {
  1678. "name": "run_id",
  1679. "type": "text",
  1680. "primaryKey": false,
  1681. "notNull": false,
  1682. "autoincrement": false
  1683. },
  1684. "cost_usd": {
  1685. "name": "cost_usd",
  1686. "type": "real",
  1687. "primaryKey": false,
  1688. "notNull": false,
  1689. "autoincrement": false
  1690. },
  1691. "note": {
  1692. "name": "note",
  1693. "type": "text",
  1694. "primaryKey": false,
  1695. "notNull": false,
  1696. "autoincrement": false
  1697. }
  1698. },
  1699. "indexes": {
  1700. "schedule_runs_idx": {
  1701. "name": "schedule_runs_idx",
  1702. "columns": [
  1703. "schedule_id",
  1704. "id"
  1705. ],
  1706. "isUnique": false
  1707. }
  1708. },
  1709. "foreignKeys": {},
  1710. "compositePrimaryKeys": {},
  1711. "uniqueConstraints": {},
  1712. "checkConstraints": {}
  1713. },
  1714. "schedules": {
  1715. "name": "schedules",
  1716. "columns": {
  1717. "id": {
  1718. "name": "id",
  1719. "type": "text",
  1720. "primaryKey": true,
  1721. "notNull": true,
  1722. "autoincrement": false
  1723. },
  1724. "session_id": {
  1725. "name": "session_id",
  1726. "type": "text",
  1727. "primaryKey": false,
  1728. "notNull": false,
  1729. "autoincrement": false
  1730. },
  1731. "team_id": {
  1732. "name": "team_id",
  1733. "type": "text",
  1734. "primaryKey": false,
  1735. "notNull": false,
  1736. "autoincrement": false
  1737. },
  1738. "created_by_bot_id": {
  1739. "name": "created_by_bot_id",
  1740. "type": "text",
  1741. "primaryKey": false,
  1742. "notNull": false,
  1743. "autoincrement": false
  1744. },
  1745. "title": {
  1746. "name": "title",
  1747. "type": "text",
  1748. "primaryKey": false,
  1749. "notNull": true,
  1750. "autoincrement": false
  1751. },
  1752. "prompt": {
  1753. "name": "prompt",
  1754. "type": "text",
  1755. "primaryKey": false,
  1756. "notNull": true,
  1757. "autoincrement": false
  1758. },
  1759. "spec": {
  1760. "name": "spec",
  1761. "type": "text",
  1762. "primaryKey": false,
  1763. "notNull": true,
  1764. "autoincrement": false
  1765. },
  1766. "timezone": {
  1767. "name": "timezone",
  1768. "type": "text",
  1769. "primaryKey": false,
  1770. "notNull": true,
  1771. "autoincrement": false
  1772. },
  1773. "status": {
  1774. "name": "status",
  1775. "type": "text",
  1776. "primaryKey": false,
  1777. "notNull": true,
  1778. "autoincrement": false,
  1779. "default": "'active'"
  1780. },
  1781. "status_note": {
  1782. "name": "status_note",
  1783. "type": "text",
  1784. "primaryKey": false,
  1785. "notNull": false,
  1786. "autoincrement": false
  1787. },
  1788. "next_run_at": {
  1789. "name": "next_run_at",
  1790. "type": "text",
  1791. "primaryKey": false,
  1792. "notNull": false,
  1793. "autoincrement": false
  1794. },
  1795. "last_run_at": {
  1796. "name": "last_run_at",
  1797. "type": "text",
  1798. "primaryKey": false,
  1799. "notNull": false,
  1800. "autoincrement": false
  1801. },
  1802. "last_outcome": {
  1803. "name": "last_outcome",
  1804. "type": "text",
  1805. "primaryKey": false,
  1806. "notNull": false,
  1807. "autoincrement": false
  1808. },
  1809. "run_count": {
  1810. "name": "run_count",
  1811. "type": "integer",
  1812. "primaryKey": false,
  1813. "notNull": true,
  1814. "autoincrement": false,
  1815. "default": 0
  1816. },
  1817. "created_at": {
  1818. "name": "created_at",
  1819. "type": "text",
  1820. "primaryKey": false,
  1821. "notNull": true,
  1822. "autoincrement": false,
  1823. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  1824. },
  1825. "updated_at": {
  1826. "name": "updated_at",
  1827. "type": "text",
  1828. "primaryKey": false,
  1829. "notNull": true,
  1830. "autoincrement": false,
  1831. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  1832. }
  1833. },
  1834. "indexes": {
  1835. "schedules_due_idx": {
  1836. "name": "schedules_due_idx",
  1837. "columns": [
  1838. "status",
  1839. "next_run_at"
  1840. ],
  1841. "isUnique": false
  1842. },
  1843. "schedules_session_idx": {
  1844. "name": "schedules_session_idx",
  1845. "columns": [
  1846. "session_id"
  1847. ],
  1848. "isUnique": false
  1849. },
  1850. "schedules_team_idx": {
  1851. "name": "schedules_team_idx",
  1852. "columns": [
  1853. "team_id"
  1854. ],
  1855. "isUnique": false
  1856. }
  1857. },
  1858. "foreignKeys": {},
  1859. "compositePrimaryKeys": {},
  1860. "uniqueConstraints": {},
  1861. "checkConstraints": {}
  1862. },
  1863. "sessions": {
  1864. "name": "sessions",
  1865. "columns": {
  1866. "id": {
  1867. "name": "id",
  1868. "type": "text",
  1869. "primaryKey": true,
  1870. "notNull": true,
  1871. "autoincrement": false
  1872. },
  1873. "source": {
  1874. "name": "source",
  1875. "type": "text",
  1876. "primaryKey": false,
  1877. "notNull": true,
  1878. "autoincrement": false
  1879. },
  1880. "profile_id": {
  1881. "name": "profile_id",
  1882. "type": "text",
  1883. "primaryKey": false,
  1884. "notNull": false,
  1885. "autoincrement": false
  1886. },
  1887. "provider": {
  1888. "name": "provider",
  1889. "type": "text",
  1890. "primaryKey": false,
  1891. "notNull": true,
  1892. "autoincrement": false
  1893. },
  1894. "model": {
  1895. "name": "model",
  1896. "type": "text",
  1897. "primaryKey": false,
  1898. "notNull": true,
  1899. "autoincrement": false
  1900. },
  1901. "permission_mode": {
  1902. "name": "permission_mode",
  1903. "type": "text",
  1904. "primaryKey": false,
  1905. "notNull": false,
  1906. "autoincrement": false
  1907. },
  1908. "system_prompt_append": {
  1909. "name": "system_prompt_append",
  1910. "type": "text",
  1911. "primaryKey": false,
  1912. "notNull": true,
  1913. "autoincrement": false,
  1914. "default": "''"
  1915. },
  1916. "provider_session_id": {
  1917. "name": "provider_session_id",
  1918. "type": "text",
  1919. "primaryKey": false,
  1920. "notNull": false,
  1921. "autoincrement": false
  1922. },
  1923. "workspace_dir": {
  1924. "name": "workspace_dir",
  1925. "type": "text",
  1926. "primaryKey": false,
  1927. "notNull": true,
  1928. "autoincrement": false
  1929. },
  1930. "title": {
  1931. "name": "title",
  1932. "type": "text",
  1933. "primaryKey": false,
  1934. "notNull": true,
  1935. "autoincrement": false,
  1936. "default": "''"
  1937. },
  1938. "last_seq": {
  1939. "name": "last_seq",
  1940. "type": "integer",
  1941. "primaryKey": false,
  1942. "notNull": true,
  1943. "autoincrement": false,
  1944. "default": 0
  1945. },
  1946. "archived": {
  1947. "name": "archived",
  1948. "type": "integer",
  1949. "primaryKey": false,
  1950. "notNull": true,
  1951. "autoincrement": false,
  1952. "default": false
  1953. },
  1954. "created_at": {
  1955. "name": "created_at",
  1956. "type": "text",
  1957. "primaryKey": false,
  1958. "notNull": true,
  1959. "autoincrement": false,
  1960. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  1961. },
  1962. "updated_at": {
  1963. "name": "updated_at",
  1964. "type": "text",
  1965. "primaryKey": false,
  1966. "notNull": true,
  1967. "autoincrement": false,
  1968. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  1969. }
  1970. },
  1971. "indexes": {
  1972. "sessions_source_idx": {
  1973. "name": "sessions_source_idx",
  1974. "columns": [
  1975. "source",
  1976. "updated_at"
  1977. ],
  1978. "isUnique": false
  1979. }
  1980. },
  1981. "foreignKeys": {},
  1982. "compositePrimaryKeys": {},
  1983. "uniqueConstraints": {},
  1984. "checkConstraints": {}
  1985. },
  1986. "settings": {
  1987. "name": "settings",
  1988. "columns": {
  1989. "key": {
  1990. "name": "key",
  1991. "type": "text",
  1992. "primaryKey": true,
  1993. "notNull": true,
  1994. "autoincrement": false
  1995. },
  1996. "value": {
  1997. "name": "value",
  1998. "type": "text",
  1999. "primaryKey": false,
  2000. "notNull": true,
  2001. "autoincrement": false
  2002. },
  2003. "updated_at": {
  2004. "name": "updated_at",
  2005. "type": "text",
  2006. "primaryKey": false,
  2007. "notNull": true,
  2008. "autoincrement": false,
  2009. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  2010. }
  2011. },
  2012. "indexes": {},
  2013. "foreignKeys": {},
  2014. "compositePrimaryKeys": {},
  2015. "uniqueConstraints": {},
  2016. "checkConstraints": {}
  2017. },
  2018. "skill_sources": {
  2019. "name": "skill_sources",
  2020. "columns": {
  2021. "id": {
  2022. "name": "id",
  2023. "type": "text",
  2024. "primaryKey": true,
  2025. "notNull": true,
  2026. "autoincrement": false
  2027. },
  2028. "name": {
  2029. "name": "name",
  2030. "type": "text",
  2031. "primaryKey": false,
  2032. "notNull": true,
  2033. "autoincrement": false
  2034. },
  2035. "description": {
  2036. "name": "description",
  2037. "type": "text",
  2038. "primaryKey": false,
  2039. "notNull": true,
  2040. "autoincrement": false,
  2041. "default": "''"
  2042. },
  2043. "kind": {
  2044. "name": "kind",
  2045. "type": "text",
  2046. "primaryKey": false,
  2047. "notNull": true,
  2048. "autoincrement": false
  2049. },
  2050. "path": {
  2051. "name": "path",
  2052. "type": "text",
  2053. "primaryKey": false,
  2054. "notNull": true,
  2055. "autoincrement": false
  2056. },
  2057. "sync_mode": {
  2058. "name": "sync_mode",
  2059. "type": "text",
  2060. "primaryKey": false,
  2061. "notNull": true,
  2062. "autoincrement": false,
  2063. "default": "'manual'"
  2064. },
  2065. "interval_min": {
  2066. "name": "interval_min",
  2067. "type": "integer",
  2068. "primaryKey": false,
  2069. "notNull": true,
  2070. "autoincrement": false,
  2071. "default": 10
  2072. },
  2073. "last_sync_at": {
  2074. "name": "last_sync_at",
  2075. "type": "text",
  2076. "primaryKey": false,
  2077. "notNull": false,
  2078. "autoincrement": false
  2079. },
  2080. "last_sync_digest": {
  2081. "name": "last_sync_digest",
  2082. "type": "text",
  2083. "primaryKey": false,
  2084. "notNull": false,
  2085. "autoincrement": false
  2086. },
  2087. "status": {
  2088. "name": "status",
  2089. "type": "text",
  2090. "primaryKey": false,
  2091. "notNull": true,
  2092. "autoincrement": false,
  2093. "default": "'never'"
  2094. },
  2095. "last_error": {
  2096. "name": "last_error",
  2097. "type": "text",
  2098. "primaryKey": false,
  2099. "notNull": false,
  2100. "autoincrement": false
  2101. },
  2102. "created_at": {
  2103. "name": "created_at",
  2104. "type": "text",
  2105. "primaryKey": false,
  2106. "notNull": true,
  2107. "autoincrement": false,
  2108. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  2109. },
  2110. "updated_at": {
  2111. "name": "updated_at",
  2112. "type": "text",
  2113. "primaryKey": false,
  2114. "notNull": true,
  2115. "autoincrement": false,
  2116. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  2117. }
  2118. },
  2119. "indexes": {},
  2120. "foreignKeys": {},
  2121. "compositePrimaryKeys": {},
  2122. "uniqueConstraints": {},
  2123. "checkConstraints": {}
  2124. },
  2125. "tasks": {
  2126. "name": "tasks",
  2127. "columns": {
  2128. "id": {
  2129. "name": "id",
  2130. "type": "text",
  2131. "primaryKey": true,
  2132. "notNull": true,
  2133. "autoincrement": false
  2134. },
  2135. "job_id": {
  2136. "name": "job_id",
  2137. "type": "text",
  2138. "primaryKey": false,
  2139. "notNull": true,
  2140. "autoincrement": false
  2141. },
  2142. "team_id": {
  2143. "name": "team_id",
  2144. "type": "text",
  2145. "primaryKey": false,
  2146. "notNull": true,
  2147. "autoincrement": false
  2148. },
  2149. "no": {
  2150. "name": "no",
  2151. "type": "integer",
  2152. "primaryKey": false,
  2153. "notNull": true,
  2154. "autoincrement": false
  2155. },
  2156. "bot_id": {
  2157. "name": "bot_id",
  2158. "type": "text",
  2159. "primaryKey": false,
  2160. "notNull": true,
  2161. "autoincrement": false
  2162. },
  2163. "title": {
  2164. "name": "title",
  2165. "type": "text",
  2166. "primaryKey": false,
  2167. "notNull": true,
  2168. "autoincrement": false
  2169. },
  2170. "instructions": {
  2171. "name": "instructions",
  2172. "type": "text",
  2173. "primaryKey": false,
  2174. "notNull": true,
  2175. "autoincrement": false
  2176. },
  2177. "depends_on": {
  2178. "name": "depends_on",
  2179. "type": "text",
  2180. "primaryKey": false,
  2181. "notNull": true,
  2182. "autoincrement": false,
  2183. "default": "'[]'"
  2184. },
  2185. "status": {
  2186. "name": "status",
  2187. "type": "text",
  2188. "primaryKey": false,
  2189. "notNull": true,
  2190. "autoincrement": false
  2191. },
  2192. "follow_up": {
  2193. "name": "follow_up",
  2194. "type": "text",
  2195. "primaryKey": false,
  2196. "notNull": false,
  2197. "autoincrement": false
  2198. },
  2199. "result": {
  2200. "name": "result",
  2201. "type": "text",
  2202. "primaryKey": false,
  2203. "notNull": false,
  2204. "autoincrement": false
  2205. },
  2206. "files": {
  2207. "name": "files",
  2208. "type": "text",
  2209. "primaryKey": false,
  2210. "notNull": true,
  2211. "autoincrement": false,
  2212. "default": "'[]'"
  2213. },
  2214. "run_id": {
  2215. "name": "run_id",
  2216. "type": "text",
  2217. "primaryKey": false,
  2218. "notNull": false,
  2219. "autoincrement": false
  2220. },
  2221. "session_id": {
  2222. "name": "session_id",
  2223. "type": "text",
  2224. "primaryKey": false,
  2225. "notNull": false,
  2226. "autoincrement": false
  2227. },
  2228. "created_at": {
  2229. "name": "created_at",
  2230. "type": "text",
  2231. "primaryKey": false,
  2232. "notNull": true,
  2233. "autoincrement": false,
  2234. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  2235. },
  2236. "started_at": {
  2237. "name": "started_at",
  2238. "type": "text",
  2239. "primaryKey": false,
  2240. "notNull": false,
  2241. "autoincrement": false
  2242. },
  2243. "ended_at": {
  2244. "name": "ended_at",
  2245. "type": "text",
  2246. "primaryKey": false,
  2247. "notNull": false,
  2248. "autoincrement": false
  2249. }
  2250. },
  2251. "indexes": {
  2252. "tasks_team_idx": {
  2253. "name": "tasks_team_idx",
  2254. "columns": [
  2255. "team_id",
  2256. "no"
  2257. ],
  2258. "isUnique": false
  2259. },
  2260. "tasks_job_idx": {
  2261. "name": "tasks_job_idx",
  2262. "columns": [
  2263. "job_id"
  2264. ],
  2265. "isUnique": false
  2266. }
  2267. },
  2268. "foreignKeys": {},
  2269. "compositePrimaryKeys": {},
  2270. "uniqueConstraints": {},
  2271. "checkConstraints": {}
  2272. },
  2273. "team_bot_sessions": {
  2274. "name": "team_bot_sessions",
  2275. "columns": {
  2276. "team_id": {
  2277. "name": "team_id",
  2278. "type": "text",
  2279. "primaryKey": false,
  2280. "notNull": true,
  2281. "autoincrement": false
  2282. },
  2283. "bot_id": {
  2284. "name": "bot_id",
  2285. "type": "text",
  2286. "primaryKey": false,
  2287. "notNull": true,
  2288. "autoincrement": false
  2289. },
  2290. "session_id": {
  2291. "name": "session_id",
  2292. "type": "text",
  2293. "primaryKey": false,
  2294. "notNull": true,
  2295. "autoincrement": false
  2296. },
  2297. "last_read_seq": {
  2298. "name": "last_read_seq",
  2299. "type": "integer",
  2300. "primaryKey": false,
  2301. "notNull": true,
  2302. "autoincrement": false,
  2303. "default": 0
  2304. },
  2305. "reset_requested": {
  2306. "name": "reset_requested",
  2307. "type": "integer",
  2308. "primaryKey": false,
  2309. "notNull": true,
  2310. "autoincrement": false,
  2311. "default": false
  2312. }
  2313. },
  2314. "indexes": {
  2315. "team_bot_sessions_session_id_unique": {
  2316. "name": "team_bot_sessions_session_id_unique",
  2317. "columns": [
  2318. "session_id"
  2319. ],
  2320. "isUnique": true
  2321. }
  2322. },
  2323. "foreignKeys": {},
  2324. "compositePrimaryKeys": {
  2325. "team_bot_sessions_team_id_bot_id_pk": {
  2326. "columns": [
  2327. "team_id",
  2328. "bot_id"
  2329. ],
  2330. "name": "team_bot_sessions_team_id_bot_id_pk"
  2331. }
  2332. },
  2333. "uniqueConstraints": {},
  2334. "checkConstraints": {}
  2335. },
  2336. "team_bots": {
  2337. "name": "team_bots",
  2338. "columns": {
  2339. "team_id": {
  2340. "name": "team_id",
  2341. "type": "text",
  2342. "primaryKey": false,
  2343. "notNull": true,
  2344. "autoincrement": false
  2345. },
  2346. "bot_id": {
  2347. "name": "bot_id",
  2348. "type": "text",
  2349. "primaryKey": false,
  2350. "notNull": true,
  2351. "autoincrement": false
  2352. },
  2353. "role": {
  2354. "name": "role",
  2355. "type": "text",
  2356. "primaryKey": false,
  2357. "notNull": true,
  2358. "autoincrement": false
  2359. },
  2360. "joined_at": {
  2361. "name": "joined_at",
  2362. "type": "text",
  2363. "primaryKey": false,
  2364. "notNull": true,
  2365. "autoincrement": false,
  2366. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  2367. }
  2368. },
  2369. "indexes": {
  2370. "team_bots_bot_idx": {
  2371. "name": "team_bots_bot_idx",
  2372. "columns": [
  2373. "bot_id"
  2374. ],
  2375. "isUnique": false
  2376. }
  2377. },
  2378. "foreignKeys": {},
  2379. "compositePrimaryKeys": {
  2380. "team_bots_team_id_bot_id_pk": {
  2381. "columns": [
  2382. "team_id",
  2383. "bot_id"
  2384. ],
  2385. "name": "team_bots_team_id_bot_id_pk"
  2386. }
  2387. },
  2388. "uniqueConstraints": {},
  2389. "checkConstraints": {}
  2390. },
  2391. "team_cases": {
  2392. "name": "team_cases",
  2393. "columns": {
  2394. "id": {
  2395. "name": "id",
  2396. "type": "text",
  2397. "primaryKey": true,
  2398. "notNull": true,
  2399. "autoincrement": false
  2400. },
  2401. "name": {
  2402. "name": "name",
  2403. "type": "text",
  2404. "primaryKey": false,
  2405. "notNull": true,
  2406. "autoincrement": false
  2407. },
  2408. "lead_bot_id": {
  2409. "name": "lead_bot_id",
  2410. "type": "text",
  2411. "primaryKey": false,
  2412. "notNull": false,
  2413. "autoincrement": false
  2414. },
  2415. "worker_bot_ids": {
  2416. "name": "worker_bot_ids",
  2417. "type": "text",
  2418. "primaryKey": false,
  2419. "notNull": true,
  2420. "autoincrement": false,
  2421. "default": "'[]'"
  2422. },
  2423. "stub_bot_ids": {
  2424. "name": "stub_bot_ids",
  2425. "type": "text",
  2426. "primaryKey": false,
  2427. "notNull": true,
  2428. "autoincrement": false,
  2429. "default": "'[]'"
  2430. },
  2431. "limits": {
  2432. "name": "limits",
  2433. "type": "text",
  2434. "primaryKey": false,
  2435. "notNull": false,
  2436. "autoincrement": false
  2437. },
  2438. "human_name": {
  2439. "name": "human_name",
  2440. "type": "text",
  2441. "primaryKey": false,
  2442. "notNull": true,
  2443. "autoincrement": false
  2444. },
  2445. "text": {
  2446. "name": "text",
  2447. "type": "text",
  2448. "primaryKey": false,
  2449. "notNull": true,
  2450. "autoincrement": false
  2451. },
  2452. "mentions": {
  2453. "name": "mentions",
  2454. "type": "text",
  2455. "primaryKey": false,
  2456. "notNull": true,
  2457. "autoincrement": false,
  2458. "default": "'[]'"
  2459. },
  2460. "files": {
  2461. "name": "files",
  2462. "type": "text",
  2463. "primaryKey": false,
  2464. "notNull": true,
  2465. "autoincrement": false,
  2466. "default": "'[]'"
  2467. },
  2468. "created_at": {
  2469. "name": "created_at",
  2470. "type": "text",
  2471. "primaryKey": false,
  2472. "notNull": true,
  2473. "autoincrement": false,
  2474. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  2475. },
  2476. "updated_at": {
  2477. "name": "updated_at",
  2478. "type": "text",
  2479. "primaryKey": false,
  2480. "notNull": true,
  2481. "autoincrement": false,
  2482. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  2483. }
  2484. },
  2485. "indexes": {},
  2486. "foreignKeys": {},
  2487. "compositePrimaryKeys": {},
  2488. "uniqueConstraints": {},
  2489. "checkConstraints": {}
  2490. },
  2491. "team_events": {
  2492. "name": "team_events",
  2493. "columns": {
  2494. "team_id": {
  2495. "name": "team_id",
  2496. "type": "text",
  2497. "primaryKey": false,
  2498. "notNull": true,
  2499. "autoincrement": false
  2500. },
  2501. "seq": {
  2502. "name": "seq",
  2503. "type": "integer",
  2504. "primaryKey": false,
  2505. "notNull": true,
  2506. "autoincrement": false
  2507. },
  2508. "type": {
  2509. "name": "type",
  2510. "type": "text",
  2511. "primaryKey": false,
  2512. "notNull": true,
  2513. "autoincrement": false
  2514. },
  2515. "payload": {
  2516. "name": "payload",
  2517. "type": "text",
  2518. "primaryKey": false,
  2519. "notNull": true,
  2520. "autoincrement": false
  2521. },
  2522. "ts": {
  2523. "name": "ts",
  2524. "type": "text",
  2525. "primaryKey": false,
  2526. "notNull": true,
  2527. "autoincrement": false
  2528. }
  2529. },
  2530. "indexes": {},
  2531. "foreignKeys": {},
  2532. "compositePrimaryKeys": {
  2533. "team_events_team_id_seq_pk": {
  2534. "columns": [
  2535. "team_id",
  2536. "seq"
  2537. ],
  2538. "name": "team_events_team_id_seq_pk"
  2539. }
  2540. },
  2541. "uniqueConstraints": {},
  2542. "checkConstraints": {}
  2543. },
  2544. "teams": {
  2545. "name": "teams",
  2546. "columns": {
  2547. "id": {
  2548. "name": "id",
  2549. "type": "text",
  2550. "primaryKey": true,
  2551. "notNull": true,
  2552. "autoincrement": false
  2553. },
  2554. "source": {
  2555. "name": "source",
  2556. "type": "text",
  2557. "primaryKey": false,
  2558. "notNull": true,
  2559. "autoincrement": false
  2560. },
  2561. "title": {
  2562. "name": "title",
  2563. "type": "text",
  2564. "primaryKey": false,
  2565. "notNull": true,
  2566. "autoincrement": false,
  2567. "default": "''"
  2568. },
  2569. "human": {
  2570. "name": "human",
  2571. "type": "text",
  2572. "primaryKey": false,
  2573. "notNull": true,
  2574. "autoincrement": false
  2575. },
  2576. "status": {
  2577. "name": "status",
  2578. "type": "text",
  2579. "primaryKey": false,
  2580. "notNull": true,
  2581. "autoincrement": false,
  2582. "default": "'active'"
  2583. },
  2584. "workspace_dir": {
  2585. "name": "workspace_dir",
  2586. "type": "text",
  2587. "primaryKey": false,
  2588. "notNull": true,
  2589. "autoincrement": false
  2590. },
  2591. "limits": {
  2592. "name": "limits",
  2593. "type": "text",
  2594. "primaryKey": false,
  2595. "notNull": false,
  2596. "autoincrement": false
  2597. },
  2598. "debug": {
  2599. "name": "debug",
  2600. "type": "text",
  2601. "primaryKey": false,
  2602. "notNull": true,
  2603. "autoincrement": false,
  2604. "default": "'{\"stepMode\":false,\"stubBotIds\":[]}'"
  2605. },
  2606. "last_seq": {
  2607. "name": "last_seq",
  2608. "type": "integer",
  2609. "primaryKey": false,
  2610. "notNull": true,
  2611. "autoincrement": false,
  2612. "default": 0
  2613. },
  2614. "case_id": {
  2615. "name": "case_id",
  2616. "type": "text",
  2617. "primaryKey": false,
  2618. "notNull": false,
  2619. "autoincrement": false
  2620. },
  2621. "created_at": {
  2622. "name": "created_at",
  2623. "type": "text",
  2624. "primaryKey": false,
  2625. "notNull": true,
  2626. "autoincrement": false,
  2627. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  2628. },
  2629. "updated_at": {
  2630. "name": "updated_at",
  2631. "type": "text",
  2632. "primaryKey": false,
  2633. "notNull": true,
  2634. "autoincrement": false,
  2635. "default": "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
  2636. }
  2637. },
  2638. "indexes": {
  2639. "teams_source_idx": {
  2640. "name": "teams_source_idx",
  2641. "columns": [
  2642. "source",
  2643. "updated_at"
  2644. ],
  2645. "isUnique": false
  2646. },
  2647. "teams_case_idx": {
  2648. "name": "teams_case_idx",
  2649. "columns": [
  2650. "case_id"
  2651. ],
  2652. "isUnique": false
  2653. }
  2654. },
  2655. "foreignKeys": {},
  2656. "compositePrimaryKeys": {},
  2657. "uniqueConstraints": {},
  2658. "checkConstraints": {}
  2659. },
  2660. "usage_daily": {
  2661. "name": "usage_daily",
  2662. "columns": {
  2663. "date": {
  2664. "name": "date",
  2665. "type": "text",
  2666. "primaryKey": false,
  2667. "notNull": true,
  2668. "autoincrement": false
  2669. },
  2670. "source": {
  2671. "name": "source",
  2672. "type": "text",
  2673. "primaryKey": false,
  2674. "notNull": true,
  2675. "autoincrement": false
  2676. },
  2677. "provider": {
  2678. "name": "provider",
  2679. "type": "text",
  2680. "primaryKey": false,
  2681. "notNull": true,
  2682. "autoincrement": false
  2683. },
  2684. "model": {
  2685. "name": "model",
  2686. "type": "text",
  2687. "primaryKey": false,
  2688. "notNull": true,
  2689. "autoincrement": false
  2690. },
  2691. "runs": {
  2692. "name": "runs",
  2693. "type": "integer",
  2694. "primaryKey": false,
  2695. "notNull": true,
  2696. "autoincrement": false,
  2697. "default": 0
  2698. },
  2699. "failed": {
  2700. "name": "failed",
  2701. "type": "integer",
  2702. "primaryKey": false,
  2703. "notNull": true,
  2704. "autoincrement": false,
  2705. "default": 0
  2706. },
  2707. "interrupted": {
  2708. "name": "interrupted",
  2709. "type": "integer",
  2710. "primaryKey": false,
  2711. "notNull": true,
  2712. "autoincrement": false,
  2713. "default": 0
  2714. },
  2715. "input_tokens": {
  2716. "name": "input_tokens",
  2717. "type": "integer",
  2718. "primaryKey": false,
  2719. "notNull": true,
  2720. "autoincrement": false,
  2721. "default": 0
  2722. },
  2723. "output_tokens": {
  2724. "name": "output_tokens",
  2725. "type": "integer",
  2726. "primaryKey": false,
  2727. "notNull": true,
  2728. "autoincrement": false,
  2729. "default": 0
  2730. },
  2731. "cache_read_tokens": {
  2732. "name": "cache_read_tokens",
  2733. "type": "integer",
  2734. "primaryKey": false,
  2735. "notNull": true,
  2736. "autoincrement": false,
  2737. "default": 0
  2738. },
  2739. "cache_write_tokens": {
  2740. "name": "cache_write_tokens",
  2741. "type": "integer",
  2742. "primaryKey": false,
  2743. "notNull": true,
  2744. "autoincrement": false,
  2745. "default": 0
  2746. },
  2747. "cost_usd": {
  2748. "name": "cost_usd",
  2749. "type": "real",
  2750. "primaryKey": false,
  2751. "notNull": true,
  2752. "autoincrement": false,
  2753. "default": 0
  2754. },
  2755. "duration_ms": {
  2756. "name": "duration_ms",
  2757. "type": "integer",
  2758. "primaryKey": false,
  2759. "notNull": true,
  2760. "autoincrement": false,
  2761. "default": 0
  2762. }
  2763. },
  2764. "indexes": {},
  2765. "foreignKeys": {},
  2766. "compositePrimaryKeys": {
  2767. "usage_daily_date_source_provider_model_pk": {
  2768. "columns": [
  2769. "date",
  2770. "source",
  2771. "provider",
  2772. "model"
  2773. ],
  2774. "name": "usage_daily_date_source_provider_model_pk"
  2775. }
  2776. },
  2777. "uniqueConstraints": {},
  2778. "checkConstraints": {}
  2779. }
  2780. },
  2781. "views": {},
  2782. "enums": {},
  2783. "_meta": {
  2784. "schemas": {},
  2785. "tables": {},
  2786. "columns": {}
  2787. },
  2788. "internal": {
  2789. "indexes": {}
  2790. }
  2791. }