0017_snapshot.json 70 KB

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