0010_snapshot.json 59 KB

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