0013_snapshot.json 69 KB

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