@covro/covro 0.13.1-dev.1 → 0.13.1-dev.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/README.md +6 -4
  2. package/README.zh-CN.md +6 -4
  3. package/dist/cli/daemon.js +6 -3
  4. package/dist/cli/daemon.js.map +2 -2
  5. package/dist/codex/adapter.js +126 -41
  6. package/dist/codex/adapter.js.map +2 -2
  7. package/dist/codex/history-cursor.js +9 -0
  8. package/dist/codex/history-cursor.js.map +7 -0
  9. package/dist/codex/mapping.js +2 -0
  10. package/dist/codex/mapping.js.map +2 -2
  11. package/dist/drizzle/0012_turn_completion_reads.sql +5 -0
  12. package/dist/drizzle/0013_adaptive_session_loops.sql +29 -0
  13. package/dist/drizzle/meta/0012_snapshot.json +935 -0
  14. package/dist/drizzle/meta/0013_snapshot.json +957 -0
  15. package/dist/drizzle/meta/_journal.json +14 -0
  16. package/dist/server/adaptive-loop.js +65 -0
  17. package/dist/server/adaptive-loop.js.map +7 -0
  18. package/dist/server/db/schema.js +14 -2
  19. package/dist/server/db/schema.js.map +2 -2
  20. package/dist/server/db/session-loops.js +39 -4
  21. package/dist/server/db/session-loops.js.map +3 -3
  22. package/dist/server/db/turn-completion-reads.js +20 -0
  23. package/dist/server/db/turn-completion-reads.js.map +7 -0
  24. package/dist/server/events.js +2 -1
  25. package/dist/server/events.js.map +2 -2
  26. package/dist/server/http.js +40 -0
  27. package/dist/server/http.js.map +2 -2
  28. package/dist/server/pending-questions.js +112 -0
  29. package/dist/server/pending-questions.js.map +7 -0
  30. package/dist/server/projection.js +27 -0
  31. package/dist/server/projection.js.map +2 -2
  32. package/dist/server/service.js +492 -68
  33. package/dist/server/service.js.map +3 -3
  34. package/dist/shared/pending-questions.js +23 -0
  35. package/dist/shared/pending-questions.js.map +7 -0
  36. package/dist/shared/session-loop.js +17 -2
  37. package/dist/shared/session-loop.js.map +2 -2
  38. package/dist/shared/thread-summary.js +6 -3
  39. package/dist/shared/thread-summary.js.map +2 -2
  40. package/dist/shared/updates.js +5 -1
  41. package/dist/shared/updates.js.map +2 -2
  42. package/dist/shared/validation.js +11 -2
  43. package/dist/shared/validation.js.map +2 -2
  44. package/dist/updates/manager.js +96 -56
  45. package/dist/updates/manager.js.map +3 -3
  46. package/dist/web/assets/{abnfDiagram-WEYOIA3C-YbRP_P6X.js → abnfDiagram-WEYOIA3C-Cm3_7441.js} +1 -1
  47. package/dist/web/assets/{arc-Bu_TnvX1.js → arc-ClH0TpME.js} +1 -1
  48. package/dist/web/assets/{architecture-WOLXFQ4H-B5QcWPNh.js → architecture-WOLXFQ4H-B3NyA-jK.js} +1 -1
  49. package/dist/web/assets/{architectureDiagram-ZHVYKT53-DlEiMnDk.js → architectureDiagram-ZHVYKT53-BWIPL818.js} +1 -1
  50. package/dist/web/assets/{blockDiagram-RJAE7QA3-BaTXvDwo.js → blockDiagram-RJAE7QA3-sqqkoRzX.js} +1 -1
  51. package/dist/web/assets/{c4Diagram-XDPPPE54-CepOIeg3.js → c4Diagram-XDPPPE54-Dc6kjjZZ.js} +1 -1
  52. package/dist/web/assets/channel-0Xi8DOc2.js +1 -0
  53. package/dist/web/assets/{chunk-2E7WHVMD-MBCK-6QH.js → chunk-2E7WHVMD-DuLhaggn.js} +1 -1
  54. package/dist/web/assets/{chunk-4EMNKR2T-Bzhd6O0D.js → chunk-4EMNKR2T-D67vr6sg.js} +1 -1
  55. package/dist/web/assets/{chunk-55XCU76K-zk-NTr-Q.js → chunk-55XCU76K-I3QGXiTl.js} +1 -1
  56. package/dist/web/assets/{chunk-7S6XSTFO-D97Zn3VI.js → chunk-7S6XSTFO-B_upSo8l.js} +1 -1
  57. package/dist/web/assets/{chunk-AQDTSKZB-DQew0wpu.js → chunk-AQDTSKZB-DIWtJsbi.js} +1 -1
  58. package/dist/web/assets/{chunk-DSNLSHJZ-BerE9brS.js → chunk-DSNLSHJZ-B_vpHJc8.js} +1 -1
  59. package/dist/web/assets/{chunk-HAGFOTED-BrKzyaKz.js → chunk-HAGFOTED-lIjPIRtr.js} +1 -1
  60. package/dist/web/assets/{chunk-HNE4Q36P-EzqXAxSN.js → chunk-HNE4Q36P-BpTeyf_J.js} +1 -1
  61. package/dist/web/assets/{chunk-NQOKRVIF-naYBKXhx.js → chunk-NQOKRVIF-DYJ8kaAg.js} +1 -1
  62. package/dist/web/assets/{chunk-UHW7PFBP-C8SwfPmB.js → chunk-UHW7PFBP-BfY_irnY.js} +1 -1
  63. package/dist/web/assets/{chunk-VQ5W62QI-Dk8GB8kO.js → chunk-VQ5W62QI-BkNzvuI8.js} +1 -1
  64. package/dist/web/assets/{chunk-WQQL4CDK-DtLKUwlv.js → chunk-WQQL4CDK-BtqJXmOo.js} +1 -1
  65. package/dist/web/assets/{chunk-XXDRQBXY-CdoZcH03.js → chunk-XXDRQBXY-BY-O69Bi.js} +1 -1
  66. package/dist/web/assets/{chunk-YZO67HFG-CotRRiG-.js → chunk-YZO67HFG-D1I_j7tC.js} +1 -1
  67. package/dist/web/assets/{chunk-ZAUX2LTX-vAw5fLpg.js → chunk-ZAUX2LTX-DL2b4R2Y.js} +1 -1
  68. package/dist/web/assets/{chunk-ZCHMQSOR-Dw57DalW.js → chunk-ZCHMQSOR-CDzn6CVC.js} +1 -1
  69. package/dist/web/assets/{classDiagram-v2-4MYWR3UA-COROoHI2.js → classDiagram-v2-4MYWR3UA-4VUeEzXQ.js} +1 -1
  70. package/dist/web/assets/{cose-bilkent-JH36ORCC-Caa9HNwa.js → cose-bilkent-JH36ORCC-6lfGbuuy.js} +1 -1
  71. package/dist/web/assets/{cynefin-EF2NZ3EQ-DwYv7yvY.js → cynefin-EF2NZ3EQ-Cn9qeoAw.js} +1 -1
  72. package/dist/web/assets/{cynefinDiagram-WF24UDRP-DosX9Lx0.js → cynefinDiagram-WF24UDRP-DXyQPYol.js} +1 -1
  73. package/dist/web/assets/{dagre-NK4GIZVX-CL6X0gMM.js → dagre-NK4GIZVX-BTSudZOE.js} +1 -1
  74. package/dist/web/assets/{diagram-CBK3MWTC-BaabgAfv.js → diagram-CBK3MWTC-C8H8WQh_.js} +1 -1
  75. package/dist/web/assets/{diagram-I5XIIV2D-D2MvXxl-.js → diagram-I5XIIV2D-BPl_blTl.js} +1 -1
  76. package/dist/web/assets/{diagram-ODIL2UCW-CbRBexbT.js → diagram-ODIL2UCW-DJ2SEsae.js} +1 -1
  77. package/dist/web/assets/{diagram-PFBEJUXE-BSIba12r.js → diagram-PFBEJUXE-B4u0U2GK.js} +1 -1
  78. package/dist/web/assets/{diagram-RJA3I4VV-DnWBuBja.js → diagram-RJA3I4VV-BhKwCfAs.js} +1 -1
  79. package/dist/web/assets/{diagram-TYUNFSNR-1BPksd6B.js → diagram-TYUNFSNR-CgrHoyrh.js} +1 -1
  80. package/dist/web/assets/{dist-Dy9RL-sq.js → dist-CjpsoZ40.js} +1 -1
  81. package/dist/web/assets/{ebnfDiagram-V4P3TTPT-CubMSBoK.js → ebnfDiagram-V4P3TTPT-CB4zWk85.js} +1 -1
  82. package/dist/web/assets/{elk-QONTBCTQ-CHep-cFs.js → elk-QONTBCTQ-L5PHm2DH.js} +1 -1
  83. package/dist/web/assets/{erDiagram-KYQIGQAA-DjI6FD10.js → erDiagram-KYQIGQAA-CEwIhbVE.js} +1 -1
  84. package/dist/web/assets/{eventmodeling-K75KTNOO-CRO-i8KP.js → eventmodeling-K75KTNOO-Bjzmrres.js} +1 -1
  85. package/dist/web/assets/flowDiagram-IUGLLWBU-CXaSnnrc.js +1 -0
  86. package/dist/web/assets/{ganttDiagram-R7GPNTJY-BAga12Hu.js → ganttDiagram-R7GPNTJY-ChPbWI-3.js} +1 -1
  87. package/dist/web/assets/{gitGraph-VSP46ZUC-C1qVLDKw.js → gitGraph-VSP46ZUC-DW2xQaiJ.js} +1 -1
  88. package/dist/web/assets/{gitGraphDiagram-PDYL7XHY-CTW0lgs5.js → gitGraphDiagram-PDYL7XHY-DSo2eCKp.js} +1 -1
  89. package/dist/web/assets/index-B_Yx9O_i.css +1 -0
  90. package/dist/web/assets/index-DXnAm2xU.js +167 -0
  91. package/dist/web/assets/{info-OHQRW6UA-COurwpim.js → info-OHQRW6UA-Ck0yjuqE.js} +1 -1
  92. package/dist/web/assets/{infoDiagram-MVDRKAX5-CvHni8IO.js → infoDiagram-MVDRKAX5-DY6BUG6l.js} +1 -1
  93. package/dist/web/assets/{ishikawaDiagram-HPEHV2GE-Dmed93t1.js → ishikawaDiagram-HPEHV2GE-DVcE7lYM.js} +1 -1
  94. package/dist/web/assets/{journeyDiagram-BOSHW7O7-C12zGbfa.js → journeyDiagram-BOSHW7O7-JZST9Ufa.js} +1 -1
  95. package/dist/web/assets/{kanban-definition-FNSA4HC5-D9VScv-E.js → kanban-definition-FNSA4HC5-Ds_oLHX2.js} +1 -1
  96. package/dist/web/assets/{line-BZQ7WzsH.js → line-5Gfv73DZ.js} +1 -1
  97. package/dist/web/assets/{linear-DKoR6jdr.js → linear-DZfck41d.js} +1 -1
  98. package/dist/web/assets/{mermaid-parser.core-DPUDnYsm.js → mermaid-parser.core-CAD9eh4N.js} +3 -3
  99. package/dist/web/assets/{mermaid.core-BT5MJ4aB.js → mermaid.core-DgWrXR5j.js} +4 -4
  100. package/dist/web/assets/{mindmap-definition-6OY57UG3-CYTBc0ha.js → mindmap-definition-6OY57UG3-GgW3Dtk6.js} +1 -1
  101. package/dist/web/assets/{packet-JDAUHWVQ-D9zctSES.js → packet-JDAUHWVQ-Ipb7W_lT.js} +1 -1
  102. package/dist/web/assets/{pegDiagram-ECIUJNBX-WA4MsFVp.js → pegDiagram-ECIUJNBX-CX7GYhJm.js} +1 -1
  103. package/dist/web/assets/{pie-XZMESJXO-B0IqJmMC.js → pie-XZMESJXO-Ci-6RhBA.js} +1 -1
  104. package/dist/web/assets/{pieDiagram-GNMPY74T-XC73X9Qu.js → pieDiagram-GNMPY74T-m57FY_bP.js} +1 -1
  105. package/dist/web/assets/{quadrantDiagram-D57K4MC3-X51JeKah.js → quadrantDiagram-D57K4MC3-C2ZQck1p.js} +1 -1
  106. package/dist/web/assets/{radar-ABXABTNO-DfPmLJjD.js → radar-ABXABTNO-C4l84uE8.js} +1 -1
  107. package/dist/web/assets/{railroad-I3PHUGI6-CEGQ2XNy.js → railroad-I3PHUGI6-Ckwfx4cX.js} +1 -1
  108. package/dist/web/assets/{railroad-abnf-LNEFI6M7-BxiHTczQ.js → railroad-abnf-LNEFI6M7-D_DNx5kS.js} +1 -1
  109. package/dist/web/assets/{railroad-ebnf-DWYD2UWJ-Dj7X5UAi.js → railroad-ebnf-DWYD2UWJ-B1ORNy6J.js} +1 -1
  110. package/dist/web/assets/{railroad-peg-JR7BVNR7-CHuDm4LG.js → railroad-peg-JR7BVNR7-DGOhMJJh.js} +1 -1
  111. package/dist/web/assets/{railroadDiagram-Y72NRBL7-BWVk20jh.js → railroadDiagram-Y72NRBL7-L4M8uZpo.js} +1 -1
  112. package/dist/web/assets/{requirementDiagram-EQYSW5RA-AQmFFlr4.js → requirementDiagram-EQYSW5RA-8F80H05x.js} +1 -1
  113. package/dist/web/assets/{sankeyDiagram-SY24JHO5-PYzMOXlm.js → sankeyDiagram-SY24JHO5-Dpa_pRZ5.js} +1 -1
  114. package/dist/web/assets/{sequenceDiagram-BLEHNHQU-CcADT5Sq.js → sequenceDiagram-BLEHNHQU-DbVDK7kH.js} +1 -1
  115. package/dist/web/assets/{src-DLG4hAZs.js → src-BlRy1tgJ.js} +1 -1
  116. package/dist/web/assets/{stateDiagram-v2-A6IESKWZ-B9_3w0Uv.js → stateDiagram-v2-A6IESKWZ-B7a0NTBq.js} +1 -1
  117. package/dist/web/assets/{swimlanes-B3ENRKFQ-DI2a1SsD.js → swimlanes-B3ENRKFQ-DJ5Sqgur.js} +1 -1
  118. package/dist/web/assets/swimlanesDiagram-AYQRV4AK-DXfJkwXT.js +8 -0
  119. package/dist/web/assets/{timeline-definition-JXYKGLGB-CvOwLjkl.js → timeline-definition-JXYKGLGB-BArwn9JD.js} +1 -1
  120. package/dist/web/assets/{treeView-D4JQ5SDB-CL3KpHPd.js → treeView-D4JQ5SDB-Ch-gELLa.js} +1 -1
  121. package/dist/web/assets/{treemap-SAJKECNS-Bd1Bg6B4.js → treemap-SAJKECNS-LdgX1gF7.js} +1 -1
  122. package/dist/web/assets/{usecaseDiagram-WPOLBNNX-a_y59pdQ.js → usecaseDiagram-WPOLBNNX-p-ifo0Fs.js} +1 -1
  123. package/dist/web/assets/{vennDiagram-Q3Y3IDCW-CqhNRSnR.js → vennDiagram-Q3Y3IDCW-8n2LdHdC.js} +1 -1
  124. package/dist/web/assets/{wardley-7MLQ67FV-B21UbXfY.js → wardley-7MLQ67FV-CUzBp3AH.js} +1 -1
  125. package/dist/web/assets/{wardleyDiagram-IVAIDKWA-BHLCG4J2.js → wardleyDiagram-IVAIDKWA-BRGuWBAn.js} +1 -1
  126. package/dist/web/assets/{xychartDiagram-4URNHDU4-CT6o_Lw5.js → xychartDiagram-4URNHDU4-CeINTq-L.js} +1 -1
  127. package/dist/web/index.html +2 -2
  128. package/package.json +4 -4
  129. package/dist/web/assets/channel-DZM3KEg4.js +0 -1
  130. package/dist/web/assets/flowDiagram-IUGLLWBU-C9ssIbIh.js +0 -1
  131. package/dist/web/assets/index-D4z03hlo.css +0 -1
  132. package/dist/web/assets/index-DMTboMSf.js +0 -166
  133. package/dist/web/assets/swimlanesDiagram-AYQRV4AK-D-7cnri3.js +0 -8
@@ -0,0 +1,957 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "19dec4d8-6420-48e1-bcdc-cb1db9d32bd6",
5
+ "prevId": "f14d9f21-6790-4327-b6a6-4bde2a0fbf41",
6
+ "tables": {
7
+ "background_tasks": {
8
+ "name": "background_tasks",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "kind": {
18
+ "name": "kind",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "fingerprint": {
25
+ "name": "fingerprint",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "snapshot": {
32
+ "name": "snapshot",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": false,
36
+ "autoincrement": false
37
+ }
38
+ },
39
+ "indexes": {},
40
+ "foreignKeys": {},
41
+ "compositePrimaryKeys": {},
42
+ "uniqueConstraints": {},
43
+ "checkConstraints": {}
44
+ },
45
+ "execution_markers": {
46
+ "name": "execution_markers",
47
+ "columns": {
48
+ "operation_id": {
49
+ "name": "operation_id",
50
+ "type": "text",
51
+ "primaryKey": true,
52
+ "notNull": true,
53
+ "autoincrement": false
54
+ },
55
+ "thread_id": {
56
+ "name": "thread_id",
57
+ "type": "text",
58
+ "primaryKey": false,
59
+ "notNull": true,
60
+ "autoincrement": false
61
+ },
62
+ "turn_id": {
63
+ "name": "turn_id",
64
+ "type": "text",
65
+ "primaryKey": false,
66
+ "notNull": false,
67
+ "autoincrement": false
68
+ },
69
+ "workspace_key": {
70
+ "name": "workspace_key",
71
+ "type": "text",
72
+ "primaryKey": false,
73
+ "notNull": true,
74
+ "autoincrement": false
75
+ },
76
+ "codex_epoch": {
77
+ "name": "codex_epoch",
78
+ "type": "text",
79
+ "primaryKey": false,
80
+ "notNull": true,
81
+ "autoincrement": false
82
+ },
83
+ "state": {
84
+ "name": "state",
85
+ "type": "text",
86
+ "primaryKey": false,
87
+ "notNull": true,
88
+ "autoincrement": false
89
+ },
90
+ "created_at": {
91
+ "name": "created_at",
92
+ "type": "integer",
93
+ "primaryKey": false,
94
+ "notNull": true,
95
+ "autoincrement": false
96
+ },
97
+ "ended_at": {
98
+ "name": "ended_at",
99
+ "type": "integer",
100
+ "primaryKey": false,
101
+ "notNull": false,
102
+ "autoincrement": false
103
+ },
104
+ "reconciled_at": {
105
+ "name": "reconciled_at",
106
+ "type": "integer",
107
+ "primaryKey": false,
108
+ "notNull": false,
109
+ "autoincrement": false
110
+ },
111
+ "reconciliation_operation_id": {
112
+ "name": "reconciliation_operation_id",
113
+ "type": "text",
114
+ "primaryKey": false,
115
+ "notNull": false,
116
+ "autoincrement": false
117
+ }
118
+ },
119
+ "indexes": {
120
+ "execution_markers_active_thread": {
121
+ "name": "execution_markers_active_thread",
122
+ "columns": [
123
+ "thread_id"
124
+ ],
125
+ "isUnique": true,
126
+ "where": "\"execution_markers\".\"ended_at\" is null"
127
+ }
128
+ },
129
+ "foreignKeys": {
130
+ "execution_markers_operation_id_operations_client_operation_id_fk": {
131
+ "name": "execution_markers_operation_id_operations_client_operation_id_fk",
132
+ "tableFrom": "execution_markers",
133
+ "tableTo": "operations",
134
+ "columnsFrom": [
135
+ "operation_id"
136
+ ],
137
+ "columnsTo": [
138
+ "client_operation_id"
139
+ ],
140
+ "onDelete": "no action",
141
+ "onUpdate": "no action"
142
+ },
143
+ "execution_markers_reconciliation_operation_id_operations_client_operation_id_fk": {
144
+ "name": "execution_markers_reconciliation_operation_id_operations_client_operation_id_fk",
145
+ "tableFrom": "execution_markers",
146
+ "tableTo": "operations",
147
+ "columnsFrom": [
148
+ "reconciliation_operation_id"
149
+ ],
150
+ "columnsTo": [
151
+ "client_operation_id"
152
+ ],
153
+ "onDelete": "no action",
154
+ "onUpdate": "no action"
155
+ }
156
+ },
157
+ "compositePrimaryKeys": {},
158
+ "uniqueConstraints": {},
159
+ "checkConstraints": {
160
+ "execution_markers_state_check": {
161
+ "name": "execution_markers_state_check",
162
+ "value": "\"execution_markers\".\"state\" in ('active', 'unknown', 'terminal', 'reconciled')"
163
+ }
164
+ }
165
+ },
166
+ "operations": {
167
+ "name": "operations",
168
+ "columns": {
169
+ "client_operation_id": {
170
+ "name": "client_operation_id",
171
+ "type": "text",
172
+ "primaryKey": true,
173
+ "notNull": true,
174
+ "autoincrement": false
175
+ },
176
+ "kind": {
177
+ "name": "kind",
178
+ "type": "text",
179
+ "primaryKey": false,
180
+ "notNull": true,
181
+ "autoincrement": false
182
+ },
183
+ "target": {
184
+ "name": "target",
185
+ "type": "text",
186
+ "primaryKey": false,
187
+ "notNull": true,
188
+ "autoincrement": false
189
+ },
190
+ "project_id": {
191
+ "name": "project_id",
192
+ "type": "text",
193
+ "primaryKey": false,
194
+ "notNull": false,
195
+ "autoincrement": false
196
+ },
197
+ "request_digest": {
198
+ "name": "request_digest",
199
+ "type": "text",
200
+ "primaryKey": false,
201
+ "notNull": true,
202
+ "autoincrement": false
203
+ },
204
+ "state": {
205
+ "name": "state",
206
+ "type": "text",
207
+ "primaryKey": false,
208
+ "notNull": true,
209
+ "autoincrement": false
210
+ },
211
+ "result": {
212
+ "name": "result",
213
+ "type": "text",
214
+ "primaryKey": false,
215
+ "notNull": false,
216
+ "autoincrement": false
217
+ },
218
+ "error": {
219
+ "name": "error",
220
+ "type": "text",
221
+ "primaryKey": false,
222
+ "notNull": false,
223
+ "autoincrement": false
224
+ },
225
+ "created_at": {
226
+ "name": "created_at",
227
+ "type": "integer",
228
+ "primaryKey": false,
229
+ "notNull": true,
230
+ "autoincrement": false
231
+ },
232
+ "updated_at": {
233
+ "name": "updated_at",
234
+ "type": "integer",
235
+ "primaryKey": false,
236
+ "notNull": true,
237
+ "autoincrement": false
238
+ },
239
+ "reconciled_at": {
240
+ "name": "reconciled_at",
241
+ "type": "integer",
242
+ "primaryKey": false,
243
+ "notNull": false,
244
+ "autoincrement": false
245
+ },
246
+ "reconciliation_decision": {
247
+ "name": "reconciliation_decision",
248
+ "type": "text",
249
+ "primaryKey": false,
250
+ "notNull": false,
251
+ "autoincrement": false
252
+ }
253
+ },
254
+ "indexes": {
255
+ "operations_state_idx": {
256
+ "name": "operations_state_idx",
257
+ "columns": [
258
+ "state"
259
+ ],
260
+ "isUnique": false
261
+ }
262
+ },
263
+ "foreignKeys": {},
264
+ "compositePrimaryKeys": {},
265
+ "uniqueConstraints": {},
266
+ "checkConstraints": {
267
+ "operations_state_check": {
268
+ "name": "operations_state_check",
269
+ "value": "\"operations\".\"state\" in ('accepted', 'dispatching', 'acknowledged', 'failed', 'unknown')"
270
+ }
271
+ }
272
+ },
273
+ "pending_user_messages": {
274
+ "name": "pending_user_messages",
275
+ "columns": {
276
+ "id": {
277
+ "name": "id",
278
+ "type": "text",
279
+ "primaryKey": true,
280
+ "notNull": true,
281
+ "autoincrement": false
282
+ },
283
+ "thread_id": {
284
+ "name": "thread_id",
285
+ "type": "text",
286
+ "primaryKey": false,
287
+ "notNull": true,
288
+ "autoincrement": false
289
+ },
290
+ "turn_id": {
291
+ "name": "turn_id",
292
+ "type": "text",
293
+ "primaryKey": false,
294
+ "notNull": false,
295
+ "autoincrement": false
296
+ },
297
+ "item": {
298
+ "name": "item",
299
+ "type": "text",
300
+ "primaryKey": false,
301
+ "notNull": true,
302
+ "autoincrement": false
303
+ },
304
+ "status": {
305
+ "name": "status",
306
+ "type": "text",
307
+ "primaryKey": false,
308
+ "notNull": true,
309
+ "autoincrement": false
310
+ },
311
+ "created_at": {
312
+ "name": "created_at",
313
+ "type": "integer",
314
+ "primaryKey": false,
315
+ "notNull": true,
316
+ "autoincrement": false
317
+ }
318
+ },
319
+ "indexes": {
320
+ "pending_user_messages_thread_idx": {
321
+ "name": "pending_user_messages_thread_idx",
322
+ "columns": [
323
+ "thread_id"
324
+ ],
325
+ "isUnique": false
326
+ }
327
+ },
328
+ "foreignKeys": {
329
+ "pending_user_messages_id_operations_client_operation_id_fk": {
330
+ "name": "pending_user_messages_id_operations_client_operation_id_fk",
331
+ "tableFrom": "pending_user_messages",
332
+ "tableTo": "operations",
333
+ "columnsFrom": [
334
+ "id"
335
+ ],
336
+ "columnsTo": [
337
+ "client_operation_id"
338
+ ],
339
+ "onDelete": "no action",
340
+ "onUpdate": "no action"
341
+ }
342
+ },
343
+ "compositePrimaryKeys": {},
344
+ "uniqueConstraints": {},
345
+ "checkConstraints": {
346
+ "pending_user_messages_status_check": {
347
+ "name": "pending_user_messages_status_check",
348
+ "value": "\"pending_user_messages\".\"status\" in ('submitting', 'submitted', 'unknown', 'failed')"
349
+ }
350
+ }
351
+ },
352
+ "preferences": {
353
+ "name": "preferences",
354
+ "columns": {
355
+ "key": {
356
+ "name": "key",
357
+ "type": "text",
358
+ "primaryKey": true,
359
+ "notNull": true,
360
+ "autoincrement": false
361
+ },
362
+ "value": {
363
+ "name": "value",
364
+ "type": "text",
365
+ "primaryKey": false,
366
+ "notNull": true,
367
+ "autoincrement": false
368
+ }
369
+ },
370
+ "indexes": {},
371
+ "foreignKeys": {},
372
+ "compositePrimaryKeys": {},
373
+ "uniqueConstraints": {},
374
+ "checkConstraints": {}
375
+ },
376
+ "project_registrations": {
377
+ "name": "project_registrations",
378
+ "columns": {
379
+ "id": {
380
+ "name": "id",
381
+ "type": "text",
382
+ "primaryKey": true,
383
+ "notNull": true,
384
+ "autoincrement": false
385
+ },
386
+ "name": {
387
+ "name": "name",
388
+ "type": "text",
389
+ "primaryKey": false,
390
+ "notNull": true,
391
+ "autoincrement": false
392
+ },
393
+ "path": {
394
+ "name": "path",
395
+ "type": "text",
396
+ "primaryKey": false,
397
+ "notNull": true,
398
+ "autoincrement": false
399
+ },
400
+ "canonical_root": {
401
+ "name": "canonical_root",
402
+ "type": "text",
403
+ "primaryKey": false,
404
+ "notNull": false,
405
+ "autoincrement": false
406
+ },
407
+ "removed_at": {
408
+ "name": "removed_at",
409
+ "type": "integer",
410
+ "primaryKey": false,
411
+ "notNull": false,
412
+ "autoincrement": false
413
+ },
414
+ "sort_order": {
415
+ "name": "sort_order",
416
+ "type": "integer",
417
+ "primaryKey": false,
418
+ "notNull": true,
419
+ "autoincrement": false,
420
+ "default": 0
421
+ },
422
+ "created_at": {
423
+ "name": "created_at",
424
+ "type": "integer",
425
+ "primaryKey": false,
426
+ "notNull": true,
427
+ "autoincrement": false
428
+ },
429
+ "updated_at": {
430
+ "name": "updated_at",
431
+ "type": "integer",
432
+ "primaryKey": false,
433
+ "notNull": true,
434
+ "autoincrement": false
435
+ }
436
+ },
437
+ "indexes": {},
438
+ "foreignKeys": {},
439
+ "compositePrimaryKeys": {},
440
+ "uniqueConstraints": {},
441
+ "checkConstraints": {}
442
+ },
443
+ "question_action_history": {
444
+ "name": "question_action_history",
445
+ "columns": {
446
+ "action_id": {
447
+ "name": "action_id",
448
+ "type": "text",
449
+ "primaryKey": true,
450
+ "notNull": true,
451
+ "autoincrement": false
452
+ },
453
+ "thread_id": {
454
+ "name": "thread_id",
455
+ "type": "text",
456
+ "primaryKey": false,
457
+ "notNull": true,
458
+ "autoincrement": false
459
+ },
460
+ "action": {
461
+ "name": "action",
462
+ "type": "text",
463
+ "primaryKey": false,
464
+ "notNull": true,
465
+ "autoincrement": false
466
+ }
467
+ },
468
+ "indexes": {
469
+ "question_action_history_thread": {
470
+ "name": "question_action_history_thread",
471
+ "columns": [
472
+ "thread_id"
473
+ ],
474
+ "isUnique": false
475
+ }
476
+ },
477
+ "foreignKeys": {},
478
+ "compositePrimaryKeys": {},
479
+ "uniqueConstraints": {},
480
+ "checkConstraints": {}
481
+ },
482
+ "question_tracking": {
483
+ "name": "question_tracking",
484
+ "columns": {
485
+ "thread_id": {
486
+ "name": "thread_id",
487
+ "type": "text",
488
+ "primaryKey": false,
489
+ "notNull": true,
490
+ "autoincrement": false
491
+ },
492
+ "question_id": {
493
+ "name": "question_id",
494
+ "type": "text",
495
+ "primaryKey": false,
496
+ "notNull": true,
497
+ "autoincrement": false
498
+ },
499
+ "state": {
500
+ "name": "state",
501
+ "type": "text",
502
+ "primaryKey": false,
503
+ "notNull": true,
504
+ "autoincrement": false
505
+ },
506
+ "operation_id": {
507
+ "name": "operation_id",
508
+ "type": "text",
509
+ "primaryKey": false,
510
+ "notNull": true,
511
+ "autoincrement": false
512
+ },
513
+ "updated_at": {
514
+ "name": "updated_at",
515
+ "type": "integer",
516
+ "primaryKey": false,
517
+ "notNull": true,
518
+ "autoincrement": false
519
+ }
520
+ },
521
+ "indexes": {},
522
+ "foreignKeys": {},
523
+ "compositePrimaryKeys": {
524
+ "question_tracking_thread_id_question_id_pk": {
525
+ "columns": [
526
+ "thread_id",
527
+ "question_id"
528
+ ],
529
+ "name": "question_tracking_thread_id_question_id_pk"
530
+ }
531
+ },
532
+ "uniqueConstraints": {},
533
+ "checkConstraints": {}
534
+ },
535
+ "session_loops": {
536
+ "name": "session_loops",
537
+ "columns": {
538
+ "id": {
539
+ "name": "id",
540
+ "type": "text",
541
+ "primaryKey": true,
542
+ "notNull": true,
543
+ "autoincrement": false
544
+ },
545
+ "thread_id": {
546
+ "name": "thread_id",
547
+ "type": "text",
548
+ "primaryKey": false,
549
+ "notNull": true,
550
+ "autoincrement": false
551
+ },
552
+ "workspace_key": {
553
+ "name": "workspace_key",
554
+ "type": "text",
555
+ "primaryKey": false,
556
+ "notNull": true,
557
+ "autoincrement": false
558
+ },
559
+ "settings": {
560
+ "name": "settings",
561
+ "type": "text",
562
+ "primaryKey": false,
563
+ "notNull": true,
564
+ "autoincrement": false
565
+ },
566
+ "prompt": {
567
+ "name": "prompt",
568
+ "type": "text",
569
+ "primaryKey": false,
570
+ "notNull": true,
571
+ "autoincrement": false
572
+ },
573
+ "mode": {
574
+ "name": "mode",
575
+ "type": "text",
576
+ "primaryKey": false,
577
+ "notNull": true,
578
+ "autoincrement": false,
579
+ "default": "'fixed'"
580
+ },
581
+ "interval_ms": {
582
+ "name": "interval_ms",
583
+ "type": "integer",
584
+ "primaryKey": false,
585
+ "notNull": false,
586
+ "autoincrement": false
587
+ },
588
+ "status": {
589
+ "name": "status",
590
+ "type": "text",
591
+ "primaryKey": false,
592
+ "notNull": true,
593
+ "autoincrement": false
594
+ },
595
+ "reason": {
596
+ "name": "reason",
597
+ "type": "text",
598
+ "primaryKey": false,
599
+ "notNull": false,
600
+ "autoincrement": false
601
+ },
602
+ "version": {
603
+ "name": "version",
604
+ "type": "integer",
605
+ "primaryKey": false,
606
+ "notNull": true,
607
+ "autoincrement": false,
608
+ "default": 0
609
+ },
610
+ "runs": {
611
+ "name": "runs",
612
+ "type": "integer",
613
+ "primaryKey": false,
614
+ "notNull": true,
615
+ "autoincrement": false,
616
+ "default": 0
617
+ },
618
+ "next_run_at": {
619
+ "name": "next_run_at",
620
+ "type": "integer",
621
+ "primaryKey": false,
622
+ "notNull": false,
623
+ "autoincrement": false
624
+ },
625
+ "run_version": {
626
+ "name": "run_version",
627
+ "type": "integer",
628
+ "primaryKey": false,
629
+ "notNull": false,
630
+ "autoincrement": false
631
+ },
632
+ "last_decision": {
633
+ "name": "last_decision",
634
+ "type": "text",
635
+ "primaryKey": false,
636
+ "notNull": false,
637
+ "autoincrement": false
638
+ },
639
+ "last_started_at": {
640
+ "name": "last_started_at",
641
+ "type": "integer",
642
+ "primaryKey": false,
643
+ "notNull": false,
644
+ "autoincrement": false
645
+ },
646
+ "last_result": {
647
+ "name": "last_result",
648
+ "type": "text",
649
+ "primaryKey": false,
650
+ "notNull": false,
651
+ "autoincrement": false
652
+ },
653
+ "last_turn_id": {
654
+ "name": "last_turn_id",
655
+ "type": "text",
656
+ "primaryKey": false,
657
+ "notNull": false,
658
+ "autoincrement": false
659
+ },
660
+ "last_operation_id": {
661
+ "name": "last_operation_id",
662
+ "type": "text",
663
+ "primaryKey": false,
664
+ "notNull": false,
665
+ "autoincrement": false
666
+ }
667
+ },
668
+ "indexes": {
669
+ "session_loops_thread_idx": {
670
+ "name": "session_loops_thread_idx",
671
+ "columns": [
672
+ "thread_id"
673
+ ],
674
+ "isUnique": false
675
+ },
676
+ "session_loops_run_idx": {
677
+ "name": "session_loops_run_idx",
678
+ "columns": [
679
+ "last_operation_id"
680
+ ],
681
+ "isUnique": true
682
+ },
683
+ "session_loops_due_idx": {
684
+ "name": "session_loops_due_idx",
685
+ "columns": [
686
+ "status",
687
+ "next_run_at"
688
+ ],
689
+ "isUnique": false
690
+ }
691
+ },
692
+ "foreignKeys": {
693
+ "session_loops_id_operations_client_operation_id_fk": {
694
+ "name": "session_loops_id_operations_client_operation_id_fk",
695
+ "tableFrom": "session_loops",
696
+ "tableTo": "operations",
697
+ "columnsFrom": [
698
+ "id"
699
+ ],
700
+ "columnsTo": [
701
+ "client_operation_id"
702
+ ],
703
+ "onDelete": "no action",
704
+ "onUpdate": "no action"
705
+ },
706
+ "session_loops_last_operation_id_operations_client_operation_id_fk": {
707
+ "name": "session_loops_last_operation_id_operations_client_operation_id_fk",
708
+ "tableFrom": "session_loops",
709
+ "tableTo": "operations",
710
+ "columnsFrom": [
711
+ "last_operation_id"
712
+ ],
713
+ "columnsTo": [
714
+ "client_operation_id"
715
+ ],
716
+ "onDelete": "no action",
717
+ "onUpdate": "no action"
718
+ }
719
+ },
720
+ "compositePrimaryKeys": {},
721
+ "uniqueConstraints": {},
722
+ "checkConstraints": {}
723
+ },
724
+ "session_workspaces": {
725
+ "name": "session_workspaces",
726
+ "columns": {
727
+ "operation_id": {
728
+ "name": "operation_id",
729
+ "type": "text",
730
+ "primaryKey": true,
731
+ "notNull": true,
732
+ "autoincrement": false
733
+ },
734
+ "thread_id": {
735
+ "name": "thread_id",
736
+ "type": "text",
737
+ "primaryKey": false,
738
+ "notNull": false,
739
+ "autoincrement": false
740
+ },
741
+ "root_path": {
742
+ "name": "root_path",
743
+ "type": "text",
744
+ "primaryKey": false,
745
+ "notNull": true,
746
+ "autoincrement": false
747
+ },
748
+ "canonical_root": {
749
+ "name": "canonical_root",
750
+ "type": "text",
751
+ "primaryKey": false,
752
+ "notNull": true,
753
+ "autoincrement": false
754
+ },
755
+ "created_at": {
756
+ "name": "created_at",
757
+ "type": "integer",
758
+ "primaryKey": false,
759
+ "notNull": true,
760
+ "autoincrement": false
761
+ }
762
+ },
763
+ "indexes": {
764
+ "session_workspaces_thread_id_unique": {
765
+ "name": "session_workspaces_thread_id_unique",
766
+ "columns": [
767
+ "thread_id"
768
+ ],
769
+ "isUnique": true
770
+ },
771
+ "session_workspaces_canonical_root_unique": {
772
+ "name": "session_workspaces_canonical_root_unique",
773
+ "columns": [
774
+ "canonical_root"
775
+ ],
776
+ "isUnique": true
777
+ }
778
+ },
779
+ "foreignKeys": {},
780
+ "compositePrimaryKeys": {},
781
+ "uniqueConstraints": {},
782
+ "checkConstraints": {}
783
+ },
784
+ "thread_links": {
785
+ "name": "thread_links",
786
+ "columns": {
787
+ "thread_id": {
788
+ "name": "thread_id",
789
+ "type": "text",
790
+ "primaryKey": true,
791
+ "notNull": true,
792
+ "autoincrement": false
793
+ },
794
+ "project_id": {
795
+ "name": "project_id",
796
+ "type": "text",
797
+ "primaryKey": false,
798
+ "notNull": false,
799
+ "autoincrement": false
800
+ },
801
+ "cwd": {
802
+ "name": "cwd",
803
+ "type": "text",
804
+ "primaryKey": false,
805
+ "notNull": true,
806
+ "autoincrement": false
807
+ },
808
+ "source": {
809
+ "name": "source",
810
+ "type": "text",
811
+ "primaryKey": false,
812
+ "notNull": true,
813
+ "autoincrement": false
814
+ },
815
+ "managed_epoch": {
816
+ "name": "managed_epoch",
817
+ "type": "text",
818
+ "primaryKey": false,
819
+ "notNull": false,
820
+ "autoincrement": false
821
+ },
822
+ "updated_at": {
823
+ "name": "updated_at",
824
+ "type": "integer",
825
+ "primaryKey": false,
826
+ "notNull": true,
827
+ "autoincrement": false
828
+ }
829
+ },
830
+ "indexes": {},
831
+ "foreignKeys": {},
832
+ "compositePrimaryKeys": {},
833
+ "uniqueConstraints": {},
834
+ "checkConstraints": {}
835
+ },
836
+ "turn_completion_reads": {
837
+ "name": "turn_completion_reads",
838
+ "columns": {
839
+ "thread_id": {
840
+ "name": "thread_id",
841
+ "type": "text",
842
+ "primaryKey": false,
843
+ "notNull": true,
844
+ "autoincrement": false
845
+ },
846
+ "turn_id": {
847
+ "name": "turn_id",
848
+ "type": "text",
849
+ "primaryKey": false,
850
+ "notNull": true,
851
+ "autoincrement": false
852
+ }
853
+ },
854
+ "indexes": {},
855
+ "foreignKeys": {},
856
+ "compositePrimaryKeys": {
857
+ "turn_completion_reads_thread_id_turn_id_pk": {
858
+ "columns": [
859
+ "thread_id",
860
+ "turn_id"
861
+ ],
862
+ "name": "turn_completion_reads_thread_id_turn_id_pk"
863
+ }
864
+ },
865
+ "uniqueConstraints": {},
866
+ "checkConstraints": {}
867
+ },
868
+ "turn_token_totals": {
869
+ "name": "turn_token_totals",
870
+ "columns": {
871
+ "thread_id": {
872
+ "name": "thread_id",
873
+ "type": "text",
874
+ "primaryKey": false,
875
+ "notNull": true,
876
+ "autoincrement": false
877
+ },
878
+ "turn_id": {
879
+ "name": "turn_id",
880
+ "type": "text",
881
+ "primaryKey": false,
882
+ "notNull": true,
883
+ "autoincrement": false
884
+ },
885
+ "total_tokens": {
886
+ "name": "total_tokens",
887
+ "type": "integer",
888
+ "primaryKey": false,
889
+ "notNull": true,
890
+ "autoincrement": false
891
+ }
892
+ },
893
+ "indexes": {},
894
+ "foreignKeys": {},
895
+ "compositePrimaryKeys": {
896
+ "turn_token_totals_thread_id_turn_id_pk": {
897
+ "columns": [
898
+ "thread_id",
899
+ "turn_id"
900
+ ],
901
+ "name": "turn_token_totals_thread_id_turn_id_pk"
902
+ }
903
+ },
904
+ "uniqueConstraints": {},
905
+ "checkConstraints": {}
906
+ },
907
+ "turn_usage": {
908
+ "name": "turn_usage",
909
+ "columns": {
910
+ "thread_id": {
911
+ "name": "thread_id",
912
+ "type": "text",
913
+ "primaryKey": false,
914
+ "notNull": true,
915
+ "autoincrement": false
916
+ },
917
+ "turn_id": {
918
+ "name": "turn_id",
919
+ "type": "text",
920
+ "primaryKey": false,
921
+ "notNull": true,
922
+ "autoincrement": false
923
+ },
924
+ "output_tokens": {
925
+ "name": "output_tokens",
926
+ "type": "integer",
927
+ "primaryKey": false,
928
+ "notNull": true,
929
+ "autoincrement": false
930
+ }
931
+ },
932
+ "indexes": {},
933
+ "foreignKeys": {},
934
+ "compositePrimaryKeys": {
935
+ "turn_usage_thread_id_turn_id_pk": {
936
+ "columns": [
937
+ "thread_id",
938
+ "turn_id"
939
+ ],
940
+ "name": "turn_usage_thread_id_turn_id_pk"
941
+ }
942
+ },
943
+ "uniqueConstraints": {},
944
+ "checkConstraints": {}
945
+ }
946
+ },
947
+ "views": {},
948
+ "enums": {},
949
+ "_meta": {
950
+ "schemas": {},
951
+ "tables": {},
952
+ "columns": {}
953
+ },
954
+ "internal": {
955
+ "indexes": {}
956
+ }
957
+ }