0014_snapshot.json 69 KB

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