0020_snapshot.json 74 KB

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