@crewx/sdk 0.9.0-rc.13 → 0.9.0-rc.130

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 (267) hide show
  1. package/README.md +1 -1
  2. package/dist/account/auth-client.d.ts +61 -0
  3. package/dist/account/auth-json-v2.d.ts +1 -0
  4. package/dist/account/auth-json.d.ts +30 -0
  5. package/dist/account/config.d.ts +37 -0
  6. package/dist/account/env-bootstrap.d.ts +11 -0
  7. package/dist/account/errors.d.ts +24 -0
  8. package/dist/account/index.d.ts +12 -0
  9. package/dist/account/index.js +2 -0
  10. package/dist/account/session-manager.d.ts +47 -0
  11. package/dist/activity-log/builder.d.ts +56 -6
  12. package/dist/agent/agent-list-view.d.ts +19 -0
  13. package/dist/boxing/box.types.d.ts +4 -0
  14. package/dist/config/canonicalize-agent-options.d.ts +18 -0
  15. package/dist/config/default-agent-models.d.ts +11 -0
  16. package/dist/config/global-settings.d.ts +33 -0
  17. package/dist/config/migrate-grok-mode.d.ts +6 -0
  18. package/dist/config/model-compat.d.ts +31 -0
  19. package/dist/config/models.generated.d.ts +37 -0
  20. package/dist/config/models.remote.d.ts +1 -0
  21. package/dist/config/overdrive.d.ts +7 -0
  22. package/dist/config/pricing.d.ts +6 -3
  23. package/dist/config/pricing.generated.d.ts +4 -0
  24. package/dist/config/pricing.types.d.ts +4 -0
  25. package/dist/config/timeout.config.d.ts +4 -0
  26. package/dist/config/wi-boards.d.ts +19 -0
  27. package/dist/context-budget/continuity.d.ts +61 -0
  28. package/dist/context-budget/index.d.ts +141 -0
  29. package/dist/conversation/index.d.ts +1 -1
  30. package/dist/conversation/sqlite-provider.d.ts +6 -2
  31. package/dist/conversation/to-template-messages.d.ts +9 -0
  32. package/dist/conversation/types.d.ts +47 -1
  33. package/dist/desktop/command-runner.d.ts +4 -0
  34. package/dist/desktop/default-adapters.d.ts +4 -0
  35. package/dist/desktop/global-install.d.ts +19 -0
  36. package/dist/desktop/index.d.ts +3 -0
  37. package/dist/desktop/index.js +3 -0
  38. package/dist/desktop/install.d.ts +5 -0
  39. package/dist/desktop/lnk.d.ts +22 -0
  40. package/dist/desktop/manifest.d.ts +21 -0
  41. package/dist/desktop/types.d.ts +67 -0
  42. package/dist/desktop/version.d.ts +1 -0
  43. package/dist/desktop/windows-paths.d.ts +21 -0
  44. package/dist/desktop/wrapper.d.ts +18 -0
  45. package/dist/esm/account/index.js +2 -0
  46. package/dist/esm/desktop/index.js +3 -0
  47. package/dist/esm/index.js +931 -224
  48. package/dist/esm/node/index.js +2 -0
  49. package/dist/esm/plugins/index.js +338 -214
  50. package/dist/esm/process/index.js +1 -0
  51. package/dist/esm/publish/index.js +2 -0
  52. package/dist/esm/repository/index.js +413 -211
  53. package/dist/esm/skills/index.js +2 -0
  54. package/dist/esm/testing/index.js +1 -1
  55. package/dist/events/types.d.ts +9 -0
  56. package/dist/facade/Crewx.d.ts +58 -5
  57. package/dist/facade/task-ticket.d.ts +14 -0
  58. package/dist/highlight/thread-highlight-prompt.d.ts +2 -0
  59. package/dist/highlight/thread-highlighter.d.ts +326 -0
  60. package/dist/index.browser.d.ts +17 -1
  61. package/dist/index.browser.js +6 -2
  62. package/dist/index.d.ts +122 -17
  63. package/dist/index.js +931 -224
  64. package/dist/internal/console-decoder.d.ts +38 -0
  65. package/dist/internal/windows-spawn.d.ts +10 -0
  66. package/dist/layout/types.d.ts +18 -1
  67. package/dist/lifecycle/process-lease.d.ts +80 -0
  68. package/dist/lifecycle/process-owner.d.ts +20 -0
  69. package/dist/lifecycle/task-heartbeat.d.ts +41 -0
  70. package/dist/lifecycle/task-stop.d.ts +82 -0
  71. package/dist/lifecycle/update-admission.d.ts +45 -0
  72. package/dist/local-server/base-url.d.ts +18 -0
  73. package/dist/local-server/index.d.ts +8 -0
  74. package/dist/local-server/opencode.d.ts +8 -0
  75. package/dist/local-server/probe.d.ts +3 -0
  76. package/dist/local-server/runtime.d.ts +26 -0
  77. package/dist/local-server/types.d.ts +43 -0
  78. package/dist/mcp-app/agent-access.d.ts +26 -0
  79. package/dist/mcp-app/apps-context.d.ts +6 -0
  80. package/dist/mcp-app/bundle-provenance.d.ts +3 -0
  81. package/dist/mcp-app/catalog.d.ts +7 -0
  82. package/dist/mcp-app/content-channel.d.ts +89 -0
  83. package/dist/mcp-app/content-declarations.d.ts +29 -0
  84. package/dist/mcp-app/dev-checks.d.ts +28 -0
  85. package/dist/mcp-app/discovery.d.ts +139 -0
  86. package/dist/mcp-app/errors.d.ts +7 -0
  87. package/dist/mcp-app/index.d.ts +33 -0
  88. package/dist/mcp-app/installed-app-ref.d.ts +25 -0
  89. package/dist/mcp-app/model-context.d.ts +26 -0
  90. package/dist/mcp-app/node-app-discovery-fs.d.ts +20 -0
  91. package/dist/mcp-app/product-bundle-assets.d.ts +27 -0
  92. package/dist/mcp-app/product-bundle-loader.d.ts +53 -0
  93. package/dist/mcp-app/projection.d.ts +13 -0
  94. package/dist/mcp-app/registry.d.ts +28 -0
  95. package/dist/mcp-app/skill-backend.d.ts +133 -0
  96. package/dist/mcp-app/state-set.d.ts +9 -0
  97. package/dist/mcp-app/types.d.ts +458 -0
  98. package/dist/mcp-app/workspace-app-assets.d.ts +38 -0
  99. package/dist/mcp-app/workspace-snapshot.d.ts +70 -0
  100. package/dist/migrations/0010_analyze_stats.sql +6 -0
  101. package/dist/migrations/0011_far_black_tarantula.sql +1 -0
  102. package/dist/migrations/0012_blue_turbo.sql +23 -0
  103. package/dist/migrations/0013_hesitant_adam_destine.sql +15 -0
  104. package/dist/migrations/0014_organic_mongu.sql +73 -0
  105. package/dist/migrations/0015_panoramic_gorilla_man.sql +71 -0
  106. package/dist/migrations/0016_fuzzy_hemingway.sql +14 -0
  107. package/dist/migrations/0017_project_stage_sdk_migration.sql +29 -0
  108. package/dist/migrations/0018_bored_jackal.sql +33 -0
  109. package/dist/migrations/0019_backfill_task_thread_ids.sql +74 -0
  110. package/dist/migrations/0020_useful_iron_lad.sql +55 -0
  111. package/dist/migrations/0021_dashing_peter_quill.sql +51 -0
  112. package/dist/migrations/0022_wandering_bucky.sql +1 -0
  113. package/dist/migrations/0023_red_payback.sql +1 -0
  114. package/dist/migrations/0024_storage_metadata.sql +262 -0
  115. package/dist/migrations/0025_task_heartbeat.sql +8 -0
  116. package/dist/migrations/0025_thread_app_instance_ledger.sql +2 -0
  117. package/dist/migrations/0026_mcp_action_source.sql +47 -0
  118. package/dist/migrations/0027_task_stop_scope_cleanup.sql +5 -0
  119. package/dist/migrations/0027_ui_instance_active_unique.sql +2 -0
  120. package/dist/migrations/0029_nice_rhino.sql +1 -0
  121. package/dist/migrations/0031_petite_arclight.sql +6 -0
  122. package/dist/migrations/0032_ui_instance_opened_by.sql +1 -0
  123. package/dist/migrations/0033_thread_creator_boundary_guard.sql +38 -0
  124. package/dist/migrations/0034_keen_fallen_one.sql +36 -0
  125. package/dist/migrations/meta/0010_snapshot.json +1335 -0
  126. package/dist/migrations/meta/0011_snapshot.json +1342 -0
  127. package/dist/migrations/meta/0012_snapshot.json +1494 -0
  128. package/dist/migrations/meta/0013_snapshot.json +1592 -0
  129. package/dist/migrations/meta/0014_snapshot.json +1975 -0
  130. package/dist/migrations/meta/0015_snapshot.json +2315 -0
  131. package/dist/migrations/meta/0016_snapshot.json +2419 -0
  132. package/dist/migrations/meta/0017_snapshot.json +2419 -0
  133. package/dist/migrations/meta/0018_snapshot.json +2570 -0
  134. package/dist/migrations/meta/0020_snapshot.json +2895 -0
  135. package/dist/migrations/meta/0021_snapshot.json +3031 -0
  136. package/dist/migrations/meta/0022_snapshot.json +3039 -0
  137. package/dist/migrations/meta/0023_snapshot.json +3047 -0
  138. package/dist/migrations/meta/0029_snapshot.json +3206 -0
  139. package/dist/migrations/meta/0031_snapshot.json +3251 -0
  140. package/dist/migrations/meta/0034_snapshot.json +3473 -0
  141. package/dist/migrations/meta/_journal.json +175 -0
  142. package/dist/node/index.d.ts +1 -0
  143. package/dist/node/index.js +2 -0
  144. package/dist/paths.d.ts +1 -0
  145. package/dist/plugin/types.d.ts +1 -0
  146. package/dist/plugins/index.d.ts +1 -1
  147. package/dist/plugins/index.js +338 -214
  148. package/dist/plugins/sqlite-tracing.d.ts +46 -0
  149. package/dist/process/index.d.ts +2 -0
  150. package/dist/process/index.js +1 -0
  151. package/dist/process/process-control.d.ts +41 -0
  152. package/dist/prompt/tag-names.d.ts +20 -0
  153. package/dist/provider/acp/connection.d.ts +6 -0
  154. package/dist/provider/acp/meta.d.ts +11 -0
  155. package/dist/provider/bridge.d.ts +7 -1
  156. package/dist/provider/classify-task-error.d.ts +2 -0
  157. package/dist/provider/cli/adapter.types.d.ts +14 -2
  158. package/dist/provider/cli/adapters/agent-call.util.d.ts +1 -1
  159. package/dist/provider/cli/adapters/cli-knob.util.d.ts +7 -0
  160. package/dist/provider/cli/adapters/codex-item.d.ts +1 -0
  161. package/dist/provider/cli/adapters/event-timestamp.util.d.ts +1 -0
  162. package/dist/provider/cli/adapters/grok.d.ts +2 -0
  163. package/dist/provider/cli/adapters/index.d.ts +5 -0
  164. package/dist/provider/cli/index.d.ts +3 -2
  165. package/dist/provider/cli/meta.d.ts +5 -0
  166. package/dist/provider/cli/protocol-envelope.d.ts +3 -0
  167. package/dist/provider/errors.d.ts +5 -1
  168. package/dist/provider/idle-watchdog.d.ts +19 -0
  169. package/dist/provider/models.d.ts +17 -12
  170. package/dist/provider/order.d.ts +1 -1
  171. package/dist/provider/parse-usage.d.ts +6 -0
  172. package/dist/provider/provider-selection.d.ts +8 -0
  173. package/dist/provider/redact-technical-message.d.ts +1 -0
  174. package/dist/provider/task-error.types.d.ts +17 -0
  175. package/dist/publish/constants.d.ts +6 -0
  176. package/dist/publish/errors.d.ts +7 -0
  177. package/dist/publish/index.d.ts +50 -0
  178. package/dist/publish/index.js +2 -0
  179. package/dist/publish/manifest.d.ts +47 -0
  180. package/dist/publish/marketplace-api.constants.d.ts +1 -0
  181. package/dist/publish/pack.d.ts +6 -0
  182. package/dist/publish/scan.d.ts +9 -0
  183. package/dist/publish/secrets.d.ts +6 -0
  184. package/dist/publish/upload.d.ts +19 -0
  185. package/dist/remote/execution-profile.d.ts +9 -0
  186. package/dist/remote/index.d.ts +1 -0
  187. package/dist/remote/types.d.ts +28 -0
  188. package/dist/repository/agent-suggestion.repository.d.ts +34 -0
  189. package/dist/repository/base-sqlite-repository.d.ts +1 -0
  190. package/dist/repository/common-code.repository.d.ts +45 -0
  191. package/dist/repository/db.d.ts +12 -1
  192. package/dist/repository/index.d.ts +37 -5
  193. package/dist/repository/index.js +413 -211
  194. package/dist/repository/notification.repository.d.ts +58 -0
  195. package/dist/repository/project.repository.d.ts +90 -0
  196. package/dist/repository/request-log.repository.d.ts +1 -0
  197. package/dist/repository/storage-metadata.repository.d.ts +64 -0
  198. package/dist/repository/task-log-migration.d.ts +74 -0
  199. package/dist/repository/task-log.repository.d.ts +44 -0
  200. package/dist/repository/task-status.d.ts +14 -0
  201. package/dist/repository/task.repository.d.ts +224 -7
  202. package/dist/repository/thread-history.repository.d.ts +193 -0
  203. package/dist/repository/thread-origin-verdict.d.ts +27 -0
  204. package/dist/repository/thread-title.types.d.ts +29 -0
  205. package/dist/repository/thread.repository.d.ts +72 -6
  206. package/dist/repository/usage-backfill.d.ts +62 -0
  207. package/dist/repository/usage-from-logs.d.ts +21 -0
  208. package/dist/repository/workspace.repository.d.ts +3 -0
  209. package/dist/schema/agent-suggestions.d.ts +199 -0
  210. package/dist/schema/common-codes.d.ts +216 -0
  211. package/dist/schema/index.d.ts +11 -0
  212. package/dist/schema/notifications.d.ts +303 -0
  213. package/dist/schema/projects.d.ts +610 -0
  214. package/dist/schema/storage-metadata.d.ts +181 -0
  215. package/dist/schema/task-log-events.d.ts +119 -0
  216. package/dist/schema/tasks.d.ts +165 -0
  217. package/dist/schema/thread-creator-unverified.d.ts +45 -0
  218. package/dist/schema/thread-history.d.ts +734 -0
  219. package/dist/schema/threads.d.ts +59 -0
  220. package/dist/schema/ui-action-receipts.d.ts +358 -0
  221. package/dist/schema/ui-instance-repins.d.ts +222 -0
  222. package/dist/schema/ui-instances.d.ts +305 -0
  223. package/dist/schema/workspaces.d.ts +17 -0
  224. package/dist/skills/index.d.ts +15 -0
  225. package/dist/skills/index.js +2 -0
  226. package/dist/skills/types.d.ts +18 -0
  227. package/dist/task-log/anchor-child-tasks.d.ts +7 -0
  228. package/dist/task-log/delegation-trailer.d.ts +34 -0
  229. package/dist/template/engine.d.ts +2 -2
  230. package/dist/template/helpers/exec.browser.d.ts +4 -3
  231. package/dist/template/helpers/exec.d.ts +4 -3
  232. package/dist/template/types.d.ts +20 -0
  233. package/dist/testing/index.js +1 -1
  234. package/dist/types/index.d.ts +1572 -3
  235. package/dist/types/task-log.types.d.ts +2 -0
  236. package/dist/ui-card/index.d.ts +2 -0
  237. package/dist/ui-card/legacy-card-parser.d.ts +11 -0
  238. package/dist/ui-instance/definition.d.ts +6 -0
  239. package/dist/ui-instance/errors.d.ts +18 -0
  240. package/dist/ui-instance/index.d.ts +11 -0
  241. package/dist/ui-instance/json.d.ts +19 -0
  242. package/dist/ui-instance/lineage.d.ts +22 -0
  243. package/dist/ui-instance/runtime.d.ts +18 -0
  244. package/dist/ui-instance/store.d.ts +184 -0
  245. package/dist/ui-instance/types.d.ts +308 -0
  246. package/dist/ui-plugin/csp.d.ts +25 -0
  247. package/dist/ui-plugin/index.d.ts +4 -0
  248. package/dist/ui-plugin/limits.d.ts +27 -0
  249. package/dist/ui-plugin/manifest.d.ts +3 -0
  250. package/dist/ui-plugin/types.d.ts +190 -0
  251. package/dist/ui-plugin/validator.d.ts +15 -0
  252. package/dist/utils/crewx-executable.d.ts +76 -0
  253. package/dist/utils/crewx-home.d.ts +1 -0
  254. package/dist/utils/env-defaults.d.ts +2 -0
  255. package/dist/utils/id.d.ts +1 -1
  256. package/dist/utils/local-identity.d.ts +2 -0
  257. package/dist/utils/runner-env.d.ts +3 -0
  258. package/dist/utils/timestamp.d.ts +1 -0
  259. package/dist/utils/workspace.d.ts +1 -0
  260. package/dist/wi/create.d.ts +48 -0
  261. package/dist/wi/select.d.ts +20 -0
  262. package/package.json +49 -2
  263. package/templates/agents/default.yaml +284 -128
  264. package/templates/documents/crewx-manual.md +138 -138
  265. package/templates/documents/crewx-quick-guide.md +8 -7
  266. package/templates/workflows/wi-default-flow.yaml +65 -0
  267. package/templates/workflows/wi-plan-flow.yaml +140 -0
@@ -0,0 +1,3206 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "f44f4483-1999-4743-b5c4-9332519a408d",
5
+ "prevId": "5d10778d-7f1b-4e62-8de9-f9bfb9929491",
6
+ "tables": {
7
+ "workspaces": {
8
+ "name": "workspaces",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "slug": {
18
+ "name": "slug",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "name": {
25
+ "name": "name",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "workspace_path": {
32
+ "name": "workspace_path",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": false,
36
+ "autoincrement": false
37
+ },
38
+ "description": {
39
+ "name": "description",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": false,
43
+ "autoincrement": false
44
+ },
45
+ "is_active": {
46
+ "name": "is_active",
47
+ "type": "integer",
48
+ "primaryKey": false,
49
+ "notNull": true,
50
+ "autoincrement": false,
51
+ "default": 1
52
+ },
53
+ "created_at": {
54
+ "name": "created_at",
55
+ "type": "text",
56
+ "primaryKey": false,
57
+ "notNull": true,
58
+ "autoincrement": false
59
+ },
60
+ "updated_at": {
61
+ "name": "updated_at",
62
+ "type": "text",
63
+ "primaryKey": false,
64
+ "notNull": true,
65
+ "autoincrement": false
66
+ },
67
+ "starred": {
68
+ "name": "starred",
69
+ "type": "integer",
70
+ "primaryKey": false,
71
+ "notNull": true,
72
+ "autoincrement": false,
73
+ "default": 0
74
+ }
75
+ },
76
+ "indexes": {
77
+ "workspaces_slug_unique": {
78
+ "name": "workspaces_slug_unique",
79
+ "columns": [
80
+ "slug"
81
+ ],
82
+ "isUnique": true
83
+ }
84
+ },
85
+ "foreignKeys": {},
86
+ "compositePrimaryKeys": {},
87
+ "uniqueConstraints": {},
88
+ "checkConstraints": {}
89
+ },
90
+ "tasks": {
91
+ "name": "tasks",
92
+ "columns": {
93
+ "id": {
94
+ "name": "id",
95
+ "type": "text",
96
+ "primaryKey": true,
97
+ "notNull": true,
98
+ "autoincrement": false
99
+ },
100
+ "agent_id": {
101
+ "name": "agent_id",
102
+ "type": "text",
103
+ "primaryKey": false,
104
+ "notNull": true,
105
+ "autoincrement": false
106
+ },
107
+ "user_id": {
108
+ "name": "user_id",
109
+ "type": "text",
110
+ "primaryKey": false,
111
+ "notNull": false,
112
+ "autoincrement": false
113
+ },
114
+ "prompt": {
115
+ "name": "prompt",
116
+ "type": "text",
117
+ "primaryKey": false,
118
+ "notNull": true,
119
+ "autoincrement": false
120
+ },
121
+ "mode": {
122
+ "name": "mode",
123
+ "type": "text",
124
+ "primaryKey": false,
125
+ "notNull": true,
126
+ "autoincrement": false,
127
+ "default": "'execute'"
128
+ },
129
+ "status": {
130
+ "name": "status",
131
+ "type": "text",
132
+ "primaryKey": false,
133
+ "notNull": true,
134
+ "autoincrement": false,
135
+ "default": "'running'"
136
+ },
137
+ "result": {
138
+ "name": "result",
139
+ "type": "text",
140
+ "primaryKey": false,
141
+ "notNull": false,
142
+ "autoincrement": false
143
+ },
144
+ "error": {
145
+ "name": "error",
146
+ "type": "text",
147
+ "primaryKey": false,
148
+ "notNull": false,
149
+ "autoincrement": false
150
+ },
151
+ "started_at": {
152
+ "name": "started_at",
153
+ "type": "text",
154
+ "primaryKey": false,
155
+ "notNull": true,
156
+ "autoincrement": false
157
+ },
158
+ "completed_at": {
159
+ "name": "completed_at",
160
+ "type": "text",
161
+ "primaryKey": false,
162
+ "notNull": false,
163
+ "autoincrement": false
164
+ },
165
+ "duration_ms": {
166
+ "name": "duration_ms",
167
+ "type": "integer",
168
+ "primaryKey": false,
169
+ "notNull": false,
170
+ "autoincrement": false
171
+ },
172
+ "metadata": {
173
+ "name": "metadata",
174
+ "type": "text",
175
+ "primaryKey": false,
176
+ "notNull": false,
177
+ "autoincrement": false
178
+ },
179
+ "workspace_id": {
180
+ "name": "workspace_id",
181
+ "type": "text",
182
+ "primaryKey": false,
183
+ "notNull": false,
184
+ "autoincrement": false
185
+ },
186
+ "trace_id": {
187
+ "name": "trace_id",
188
+ "type": "text",
189
+ "primaryKey": false,
190
+ "notNull": false,
191
+ "autoincrement": false
192
+ },
193
+ "parent_task_id": {
194
+ "name": "parent_task_id",
195
+ "type": "text",
196
+ "primaryKey": false,
197
+ "notNull": false,
198
+ "autoincrement": false
199
+ },
200
+ "caller_agent_id": {
201
+ "name": "caller_agent_id",
202
+ "type": "text",
203
+ "primaryKey": false,
204
+ "notNull": false,
205
+ "autoincrement": false
206
+ },
207
+ "model": {
208
+ "name": "model",
209
+ "type": "text",
210
+ "primaryKey": false,
211
+ "notNull": false,
212
+ "autoincrement": false
213
+ },
214
+ "platform": {
215
+ "name": "platform",
216
+ "type": "text",
217
+ "primaryKey": false,
218
+ "notNull": false,
219
+ "autoincrement": false,
220
+ "default": "'cli'"
221
+ },
222
+ "crewx_version": {
223
+ "name": "crewx_version",
224
+ "type": "text",
225
+ "primaryKey": false,
226
+ "notNull": false,
227
+ "autoincrement": false
228
+ },
229
+ "input_tokens": {
230
+ "name": "input_tokens",
231
+ "type": "integer",
232
+ "primaryKey": false,
233
+ "notNull": false,
234
+ "autoincrement": false,
235
+ "default": 0
236
+ },
237
+ "output_tokens": {
238
+ "name": "output_tokens",
239
+ "type": "integer",
240
+ "primaryKey": false,
241
+ "notNull": false,
242
+ "autoincrement": false,
243
+ "default": 0
244
+ },
245
+ "cost_usd": {
246
+ "name": "cost_usd",
247
+ "type": "real",
248
+ "primaryKey": false,
249
+ "notNull": false,
250
+ "autoincrement": false,
251
+ "default": 0
252
+ },
253
+ "pid": {
254
+ "name": "pid",
255
+ "type": "integer",
256
+ "primaryKey": false,
257
+ "notNull": false,
258
+ "autoincrement": false
259
+ },
260
+ "heartbeat_at": {
261
+ "name": "heartbeat_at",
262
+ "type": "text",
263
+ "primaryKey": false,
264
+ "notNull": false,
265
+ "autoincrement": false
266
+ },
267
+ "stop_requested_at": {
268
+ "name": "stop_requested_at",
269
+ "type": "text",
270
+ "primaryKey": false,
271
+ "notNull": false,
272
+ "autoincrement": false
273
+ },
274
+ "stop_requested_epoch": {
275
+ "name": "stop_requested_epoch",
276
+ "type": "integer",
277
+ "primaryKey": false,
278
+ "notNull": false,
279
+ "autoincrement": false
280
+ },
281
+ "rendered_prompt": {
282
+ "name": "rendered_prompt",
283
+ "type": "text",
284
+ "primaryKey": false,
285
+ "notNull": false,
286
+ "autoincrement": false
287
+ },
288
+ "command": {
289
+ "name": "command",
290
+ "type": "text",
291
+ "primaryKey": false,
292
+ "notNull": false,
293
+ "autoincrement": false
294
+ },
295
+ "coding_agent_command": {
296
+ "name": "coding_agent_command",
297
+ "type": "text",
298
+ "primaryKey": false,
299
+ "notNull": false,
300
+ "autoincrement": false
301
+ },
302
+ "exit_code": {
303
+ "name": "exit_code",
304
+ "type": "integer",
305
+ "primaryKey": false,
306
+ "notNull": false,
307
+ "autoincrement": false
308
+ },
309
+ "logs": {
310
+ "name": "logs",
311
+ "type": "text",
312
+ "primaryKey": false,
313
+ "notNull": false,
314
+ "autoincrement": false
315
+ },
316
+ "log_storage": {
317
+ "name": "log_storage",
318
+ "type": "text",
319
+ "primaryKey": false,
320
+ "notNull": true,
321
+ "autoincrement": false,
322
+ "default": "'blob'"
323
+ },
324
+ "last_log_seq": {
325
+ "name": "last_log_seq",
326
+ "type": "integer",
327
+ "primaryKey": false,
328
+ "notNull": true,
329
+ "autoincrement": false,
330
+ "default": 0
331
+ },
332
+ "log_revision": {
333
+ "name": "log_revision",
334
+ "type": "integer",
335
+ "primaryKey": false,
336
+ "notNull": true,
337
+ "autoincrement": false,
338
+ "default": 0
339
+ },
340
+ "thread_id": {
341
+ "name": "thread_id",
342
+ "type": "text",
343
+ "primaryKey": false,
344
+ "notNull": false,
345
+ "autoincrement": false
346
+ },
347
+ "workspace_ref": {
348
+ "name": "workspace_ref",
349
+ "type": "text",
350
+ "primaryKey": false,
351
+ "notNull": false,
352
+ "autoincrement": false
353
+ },
354
+ "cwd": {
355
+ "name": "cwd",
356
+ "type": "text",
357
+ "primaryKey": false,
358
+ "notNull": false,
359
+ "autoincrement": false
360
+ },
361
+ "project_id": {
362
+ "name": "project_id",
363
+ "type": "text",
364
+ "primaryKey": false,
365
+ "notNull": false,
366
+ "autoincrement": false
367
+ },
368
+ "project_ref": {
369
+ "name": "project_ref",
370
+ "type": "text",
371
+ "primaryKey": false,
372
+ "notNull": false,
373
+ "autoincrement": false
374
+ },
375
+ "cached_input_tokens": {
376
+ "name": "cached_input_tokens",
377
+ "type": "integer",
378
+ "primaryKey": false,
379
+ "notNull": false,
380
+ "autoincrement": false,
381
+ "default": 0
382
+ },
383
+ "run_epoch": {
384
+ "name": "run_epoch",
385
+ "type": "integer",
386
+ "primaryKey": false,
387
+ "notNull": false,
388
+ "autoincrement": false,
389
+ "default": 0
390
+ }
391
+ },
392
+ "indexes": {
393
+ "idx_tasks_agent_id": {
394
+ "name": "idx_tasks_agent_id",
395
+ "columns": [
396
+ "agent_id"
397
+ ],
398
+ "isUnique": false
399
+ },
400
+ "idx_tasks_status": {
401
+ "name": "idx_tasks_status",
402
+ "columns": [
403
+ "status"
404
+ ],
405
+ "isUnique": false
406
+ },
407
+ "idx_tasks_started_at": {
408
+ "name": "idx_tasks_started_at",
409
+ "columns": [
410
+ "started_at"
411
+ ],
412
+ "isUnique": false
413
+ },
414
+ "idx_tasks_trace_id": {
415
+ "name": "idx_tasks_trace_id",
416
+ "columns": [
417
+ "trace_id"
418
+ ],
419
+ "isUnique": false
420
+ },
421
+ "idx_tasks_parent_task_id": {
422
+ "name": "idx_tasks_parent_task_id",
423
+ "columns": [
424
+ "parent_task_id"
425
+ ],
426
+ "isUnique": false
427
+ },
428
+ "idx_tasks_crewx_version": {
429
+ "name": "idx_tasks_crewx_version",
430
+ "columns": [
431
+ "crewx_version"
432
+ ],
433
+ "isUnique": false
434
+ },
435
+ "idx_tasks_pid": {
436
+ "name": "idx_tasks_pid",
437
+ "columns": [
438
+ "pid"
439
+ ],
440
+ "isUnique": false
441
+ },
442
+ "idx_tasks_status_heartbeat": {
443
+ "name": "idx_tasks_status_heartbeat",
444
+ "columns": [
445
+ "status",
446
+ "heartbeat_at"
447
+ ],
448
+ "isUnique": false
449
+ },
450
+ "idx_tasks_thread_id": {
451
+ "name": "idx_tasks_thread_id",
452
+ "columns": [
453
+ "thread_id"
454
+ ],
455
+ "isUnique": false
456
+ },
457
+ "idx_tasks_workspace_id": {
458
+ "name": "idx_tasks_workspace_id",
459
+ "columns": [
460
+ "workspace_id"
461
+ ],
462
+ "isUnique": false
463
+ },
464
+ "idx_tasks_workspace_ref": {
465
+ "name": "idx_tasks_workspace_ref",
466
+ "columns": [
467
+ "workspace_ref"
468
+ ],
469
+ "isUnique": false
470
+ },
471
+ "idx_tasks_project_id": {
472
+ "name": "idx_tasks_project_id",
473
+ "columns": [
474
+ "project_id"
475
+ ],
476
+ "isUnique": false
477
+ },
478
+ "idx_tasks_ws_started": {
479
+ "name": "idx_tasks_ws_started",
480
+ "columns": [
481
+ "workspace_id",
482
+ "started_at"
483
+ ],
484
+ "isUnique": false
485
+ }
486
+ },
487
+ "foreignKeys": {},
488
+ "compositePrimaryKeys": {},
489
+ "uniqueConstraints": {},
490
+ "checkConstraints": {
491
+ "tasks_log_storage_ck": {
492
+ "name": "tasks_log_storage_ck",
493
+ "value": "\"tasks\".\"log_storage\" IN ('blob', 'events')"
494
+ }
495
+ }
496
+ },
497
+ "task_log_events": {
498
+ "name": "task_log_events",
499
+ "columns": {
500
+ "id": {
501
+ "name": "id",
502
+ "type": "integer",
503
+ "primaryKey": true,
504
+ "notNull": true,
505
+ "autoincrement": false
506
+ },
507
+ "task_id": {
508
+ "name": "task_id",
509
+ "type": "text",
510
+ "primaryKey": false,
511
+ "notNull": true,
512
+ "autoincrement": false
513
+ },
514
+ "seq": {
515
+ "name": "seq",
516
+ "type": "integer",
517
+ "primaryKey": false,
518
+ "notNull": true,
519
+ "autoincrement": false
520
+ },
521
+ "timestamp": {
522
+ "name": "timestamp",
523
+ "type": "text",
524
+ "primaryKey": false,
525
+ "notNull": true,
526
+ "autoincrement": false
527
+ },
528
+ "level": {
529
+ "name": "level",
530
+ "type": "text",
531
+ "primaryKey": false,
532
+ "notNull": true,
533
+ "autoincrement": false
534
+ },
535
+ "message": {
536
+ "name": "message",
537
+ "type": "text",
538
+ "primaryKey": false,
539
+ "notNull": true,
540
+ "autoincrement": false
541
+ }
542
+ },
543
+ "indexes": {
544
+ "task_log_events_task_seq_uq": {
545
+ "name": "task_log_events_task_seq_uq",
546
+ "columns": [
547
+ "task_id",
548
+ "seq"
549
+ ],
550
+ "isUnique": true
551
+ },
552
+ "task_log_events_timestamp_id_idx": {
553
+ "name": "task_log_events_timestamp_id_idx",
554
+ "columns": [
555
+ "timestamp",
556
+ "id"
557
+ ],
558
+ "isUnique": false
559
+ }
560
+ },
561
+ "foreignKeys": {
562
+ "task_log_events_task_id_tasks_id_fk": {
563
+ "name": "task_log_events_task_id_tasks_id_fk",
564
+ "tableFrom": "task_log_events",
565
+ "tableTo": "tasks",
566
+ "columnsFrom": [
567
+ "task_id"
568
+ ],
569
+ "columnsTo": [
570
+ "id"
571
+ ],
572
+ "onDelete": "cascade",
573
+ "onUpdate": "no action"
574
+ }
575
+ },
576
+ "compositePrimaryKeys": {},
577
+ "uniqueConstraints": {},
578
+ "checkConstraints": {}
579
+ },
580
+ "threads": {
581
+ "name": "threads",
582
+ "columns": {
583
+ "id": {
584
+ "name": "id",
585
+ "type": "text",
586
+ "primaryKey": true,
587
+ "notNull": true,
588
+ "autoincrement": false
589
+ },
590
+ "workspace_id": {
591
+ "name": "workspace_id",
592
+ "type": "text",
593
+ "primaryKey": false,
594
+ "notNull": false,
595
+ "autoincrement": false
596
+ },
597
+ "platform": {
598
+ "name": "platform",
599
+ "type": "text",
600
+ "primaryKey": false,
601
+ "notNull": true,
602
+ "autoincrement": false,
603
+ "default": "'cli'"
604
+ },
605
+ "title": {
606
+ "name": "title",
607
+ "type": "text",
608
+ "primaryKey": false,
609
+ "notNull": false,
610
+ "autoincrement": false
611
+ },
612
+ "first_message": {
613
+ "name": "first_message",
614
+ "type": "text",
615
+ "primaryKey": false,
616
+ "notNull": false,
617
+ "autoincrement": false
618
+ },
619
+ "last_message": {
620
+ "name": "last_message",
621
+ "type": "text",
622
+ "primaryKey": false,
623
+ "notNull": false,
624
+ "autoincrement": false
625
+ },
626
+ "message_count": {
627
+ "name": "message_count",
628
+ "type": "integer",
629
+ "primaryKey": false,
630
+ "notNull": true,
631
+ "autoincrement": false,
632
+ "default": 0
633
+ },
634
+ "created_at": {
635
+ "name": "created_at",
636
+ "type": "text",
637
+ "primaryKey": false,
638
+ "notNull": true,
639
+ "autoincrement": false
640
+ },
641
+ "updated_at": {
642
+ "name": "updated_at",
643
+ "type": "text",
644
+ "primaryKey": false,
645
+ "notNull": true,
646
+ "autoincrement": false
647
+ },
648
+ "metadata": {
649
+ "name": "metadata",
650
+ "type": "text",
651
+ "primaryKey": false,
652
+ "notNull": false,
653
+ "autoincrement": false
654
+ },
655
+ "title_locked": {
656
+ "name": "title_locked",
657
+ "type": "integer",
658
+ "primaryKey": false,
659
+ "notNull": true,
660
+ "autoincrement": false,
661
+ "default": 0
662
+ },
663
+ "pinned": {
664
+ "name": "pinned",
665
+ "type": "integer",
666
+ "primaryKey": false,
667
+ "notNull": true,
668
+ "autoincrement": false,
669
+ "default": 0
670
+ },
671
+ "starred": {
672
+ "name": "starred",
673
+ "type": "integer",
674
+ "primaryKey": false,
675
+ "notNull": true,
676
+ "autoincrement": false,
677
+ "default": 0
678
+ }
679
+ },
680
+ "indexes": {
681
+ "idx_threads_updated_at": {
682
+ "name": "idx_threads_updated_at",
683
+ "columns": [
684
+ "updated_at"
685
+ ],
686
+ "isUnique": false
687
+ },
688
+ "idx_threads_workspace_id": {
689
+ "name": "idx_threads_workspace_id",
690
+ "columns": [
691
+ "workspace_id"
692
+ ],
693
+ "isUnique": false
694
+ },
695
+ "idx_threads_ws_updated": {
696
+ "name": "idx_threads_ws_updated",
697
+ "columns": [
698
+ "workspace_id",
699
+ "updated_at"
700
+ ],
701
+ "isUnique": false
702
+ },
703
+ "idx_threads_title": {
704
+ "name": "idx_threads_title",
705
+ "columns": [
706
+ "title"
707
+ ],
708
+ "isUnique": false
709
+ },
710
+ "idx_threads_workspace_thread_state": {
711
+ "name": "idx_threads_workspace_thread_state",
712
+ "columns": [
713
+ "workspace_id",
714
+ "json_extract(metadata, '$.threadTitle.state')"
715
+ ],
716
+ "isUnique": false
717
+ },
718
+ "idx_threads_workspace_thread_priority": {
719
+ "name": "idx_threads_workspace_thread_priority",
720
+ "columns": [
721
+ "workspace_id",
722
+ "json_extract(metadata, '$.threadTitle.priority')"
723
+ ],
724
+ "isUnique": false
725
+ }
726
+ },
727
+ "foreignKeys": {
728
+ "threads_workspace_id_workspaces_id_fk": {
729
+ "name": "threads_workspace_id_workspaces_id_fk",
730
+ "tableFrom": "threads",
731
+ "tableTo": "workspaces",
732
+ "columnsFrom": [
733
+ "workspace_id"
734
+ ],
735
+ "columnsTo": [
736
+ "id"
737
+ ],
738
+ "onDelete": "set null",
739
+ "onUpdate": "no action"
740
+ }
741
+ },
742
+ "compositePrimaryKeys": {},
743
+ "uniqueConstraints": {},
744
+ "checkConstraints": {}
745
+ },
746
+ "spans": {
747
+ "name": "spans",
748
+ "columns": {
749
+ "id": {
750
+ "name": "id",
751
+ "type": "text",
752
+ "primaryKey": true,
753
+ "notNull": true,
754
+ "autoincrement": false
755
+ },
756
+ "task_id": {
757
+ "name": "task_id",
758
+ "type": "text",
759
+ "primaryKey": false,
760
+ "notNull": false,
761
+ "autoincrement": false
762
+ },
763
+ "parent_span_id": {
764
+ "name": "parent_span_id",
765
+ "type": "text",
766
+ "primaryKey": false,
767
+ "notNull": false,
768
+ "autoincrement": false
769
+ },
770
+ "name": {
771
+ "name": "name",
772
+ "type": "text",
773
+ "primaryKey": false,
774
+ "notNull": true,
775
+ "autoincrement": false
776
+ },
777
+ "kind": {
778
+ "name": "kind",
779
+ "type": "text",
780
+ "primaryKey": false,
781
+ "notNull": true,
782
+ "autoincrement": false,
783
+ "default": "'internal'"
784
+ },
785
+ "status": {
786
+ "name": "status",
787
+ "type": "text",
788
+ "primaryKey": false,
789
+ "notNull": true,
790
+ "autoincrement": false,
791
+ "default": "'ok'"
792
+ },
793
+ "started_at": {
794
+ "name": "started_at",
795
+ "type": "text",
796
+ "primaryKey": false,
797
+ "notNull": true,
798
+ "autoincrement": false
799
+ },
800
+ "completed_at": {
801
+ "name": "completed_at",
802
+ "type": "text",
803
+ "primaryKey": false,
804
+ "notNull": false,
805
+ "autoincrement": false
806
+ },
807
+ "duration_ms": {
808
+ "name": "duration_ms",
809
+ "type": "integer",
810
+ "primaryKey": false,
811
+ "notNull": false,
812
+ "autoincrement": false
813
+ },
814
+ "input": {
815
+ "name": "input",
816
+ "type": "text",
817
+ "primaryKey": false,
818
+ "notNull": false,
819
+ "autoincrement": false
820
+ },
821
+ "output": {
822
+ "name": "output",
823
+ "type": "text",
824
+ "primaryKey": false,
825
+ "notNull": false,
826
+ "autoincrement": false
827
+ },
828
+ "error": {
829
+ "name": "error",
830
+ "type": "text",
831
+ "primaryKey": false,
832
+ "notNull": false,
833
+ "autoincrement": false
834
+ },
835
+ "attributes": {
836
+ "name": "attributes",
837
+ "type": "text",
838
+ "primaryKey": false,
839
+ "notNull": false,
840
+ "autoincrement": false
841
+ }
842
+ },
843
+ "indexes": {
844
+ "idx_spans_task_id": {
845
+ "name": "idx_spans_task_id",
846
+ "columns": [
847
+ "task_id"
848
+ ],
849
+ "isUnique": false
850
+ },
851
+ "idx_spans_parent_span_id": {
852
+ "name": "idx_spans_parent_span_id",
853
+ "columns": [
854
+ "parent_span_id"
855
+ ],
856
+ "isUnique": false
857
+ }
858
+ },
859
+ "foreignKeys": {
860
+ "spans_task_id_tasks_id_fk": {
861
+ "name": "spans_task_id_tasks_id_fk",
862
+ "tableFrom": "spans",
863
+ "tableTo": "tasks",
864
+ "columnsFrom": [
865
+ "task_id"
866
+ ],
867
+ "columnsTo": [
868
+ "id"
869
+ ],
870
+ "onDelete": "set null",
871
+ "onUpdate": "no action"
872
+ },
873
+ "spans_parent_span_id_spans_id_fk": {
874
+ "name": "spans_parent_span_id_spans_id_fk",
875
+ "tableFrom": "spans",
876
+ "tableTo": "spans",
877
+ "columnsFrom": [
878
+ "parent_span_id"
879
+ ],
880
+ "columnsTo": [
881
+ "id"
882
+ ],
883
+ "onDelete": "set null",
884
+ "onUpdate": "no action"
885
+ }
886
+ },
887
+ "compositePrimaryKeys": {},
888
+ "uniqueConstraints": {},
889
+ "checkConstraints": {}
890
+ },
891
+ "tool_calls": {
892
+ "name": "tool_calls",
893
+ "columns": {
894
+ "id": {
895
+ "name": "id",
896
+ "type": "text",
897
+ "primaryKey": true,
898
+ "notNull": true,
899
+ "autoincrement": false
900
+ },
901
+ "task_id": {
902
+ "name": "task_id",
903
+ "type": "text",
904
+ "primaryKey": false,
905
+ "notNull": false,
906
+ "autoincrement": false
907
+ },
908
+ "session_id": {
909
+ "name": "session_id",
910
+ "type": "text",
911
+ "primaryKey": false,
912
+ "notNull": false,
913
+ "autoincrement": false
914
+ },
915
+ "tool_name": {
916
+ "name": "tool_name",
917
+ "type": "text",
918
+ "primaryKey": false,
919
+ "notNull": true,
920
+ "autoincrement": false
921
+ },
922
+ "files": {
923
+ "name": "files",
924
+ "type": "text",
925
+ "primaryKey": false,
926
+ "notNull": false,
927
+ "autoincrement": false
928
+ },
929
+ "input": {
930
+ "name": "input",
931
+ "type": "text",
932
+ "primaryKey": false,
933
+ "notNull": false,
934
+ "autoincrement": false
935
+ },
936
+ "output": {
937
+ "name": "output",
938
+ "type": "text",
939
+ "primaryKey": false,
940
+ "notNull": false,
941
+ "autoincrement": false
942
+ },
943
+ "duration_ms": {
944
+ "name": "duration_ms",
945
+ "type": "integer",
946
+ "primaryKey": false,
947
+ "notNull": false,
948
+ "autoincrement": false
949
+ },
950
+ "timestamp": {
951
+ "name": "timestamp",
952
+ "type": "text",
953
+ "primaryKey": false,
954
+ "notNull": true,
955
+ "autoincrement": false
956
+ }
957
+ },
958
+ "indexes": {
959
+ "idx_tool_calls_task_id": {
960
+ "name": "idx_tool_calls_task_id",
961
+ "columns": [
962
+ "task_id"
963
+ ],
964
+ "isUnique": false
965
+ },
966
+ "idx_tool_calls_tool_name": {
967
+ "name": "idx_tool_calls_tool_name",
968
+ "columns": [
969
+ "tool_name"
970
+ ],
971
+ "isUnique": false
972
+ },
973
+ "idx_tool_calls_timestamp": {
974
+ "name": "idx_tool_calls_timestamp",
975
+ "columns": [
976
+ "timestamp"
977
+ ],
978
+ "isUnique": false
979
+ }
980
+ },
981
+ "foreignKeys": {
982
+ "tool_calls_task_id_tasks_id_fk": {
983
+ "name": "tool_calls_task_id_tasks_id_fk",
984
+ "tableFrom": "tool_calls",
985
+ "tableTo": "tasks",
986
+ "columnsFrom": [
987
+ "task_id"
988
+ ],
989
+ "columnsTo": [
990
+ "id"
991
+ ],
992
+ "onDelete": "cascade",
993
+ "onUpdate": "no action"
994
+ }
995
+ },
996
+ "compositePrimaryKeys": {},
997
+ "uniqueConstraints": {},
998
+ "checkConstraints": {}
999
+ },
1000
+ "thread_boxes": {
1001
+ "name": "thread_boxes",
1002
+ "columns": {
1003
+ "id": {
1004
+ "name": "id",
1005
+ "type": "text",
1006
+ "primaryKey": true,
1007
+ "notNull": true,
1008
+ "autoincrement": false
1009
+ },
1010
+ "thread_id": {
1011
+ "name": "thread_id",
1012
+ "type": "text",
1013
+ "primaryKey": false,
1014
+ "notNull": true,
1015
+ "autoincrement": false
1016
+ },
1017
+ "seq": {
1018
+ "name": "seq",
1019
+ "type": "integer",
1020
+ "primaryKey": false,
1021
+ "notNull": true,
1022
+ "autoincrement": false
1023
+ },
1024
+ "first_task_id": {
1025
+ "name": "first_task_id",
1026
+ "type": "text",
1027
+ "primaryKey": false,
1028
+ "notNull": true,
1029
+ "autoincrement": false
1030
+ },
1031
+ "mid_task_id": {
1032
+ "name": "mid_task_id",
1033
+ "type": "text",
1034
+ "primaryKey": false,
1035
+ "notNull": true,
1036
+ "autoincrement": false
1037
+ },
1038
+ "last_task_id": {
1039
+ "name": "last_task_id",
1040
+ "type": "text",
1041
+ "primaryKey": false,
1042
+ "notNull": true,
1043
+ "autoincrement": false
1044
+ },
1045
+ "task_count": {
1046
+ "name": "task_count",
1047
+ "type": "integer",
1048
+ "primaryKey": false,
1049
+ "notNull": true,
1050
+ "autoincrement": false
1051
+ },
1052
+ "summary": {
1053
+ "name": "summary",
1054
+ "type": "text",
1055
+ "primaryKey": false,
1056
+ "notNull": false,
1057
+ "autoincrement": false
1058
+ },
1059
+ "source_tokens": {
1060
+ "name": "source_tokens",
1061
+ "type": "integer",
1062
+ "primaryKey": false,
1063
+ "notNull": true,
1064
+ "autoincrement": false
1065
+ },
1066
+ "summary_tokens": {
1067
+ "name": "summary_tokens",
1068
+ "type": "integer",
1069
+ "primaryKey": false,
1070
+ "notNull": false,
1071
+ "autoincrement": false
1072
+ },
1073
+ "created_at": {
1074
+ "name": "created_at",
1075
+ "type": "text",
1076
+ "primaryKey": false,
1077
+ "notNull": true,
1078
+ "autoincrement": false
1079
+ }
1080
+ },
1081
+ "indexes": {
1082
+ "idx_thread_boxes_thread_id": {
1083
+ "name": "idx_thread_boxes_thread_id",
1084
+ "columns": [
1085
+ "thread_id"
1086
+ ],
1087
+ "isUnique": false
1088
+ },
1089
+ "idx_thread_boxes_seq": {
1090
+ "name": "idx_thread_boxes_seq",
1091
+ "columns": [
1092
+ "thread_id",
1093
+ "seq"
1094
+ ],
1095
+ "isUnique": false
1096
+ },
1097
+ "thread_boxes_thread_id_seq_unique": {
1098
+ "name": "thread_boxes_thread_id_seq_unique",
1099
+ "columns": [
1100
+ "thread_id",
1101
+ "seq"
1102
+ ],
1103
+ "isUnique": true
1104
+ }
1105
+ },
1106
+ "foreignKeys": {
1107
+ "thread_boxes_thread_id_threads_id_fk": {
1108
+ "name": "thread_boxes_thread_id_threads_id_fk",
1109
+ "tableFrom": "thread_boxes",
1110
+ "tableTo": "threads",
1111
+ "columnsFrom": [
1112
+ "thread_id"
1113
+ ],
1114
+ "columnsTo": [
1115
+ "id"
1116
+ ],
1117
+ "onDelete": "cascade",
1118
+ "onUpdate": "no action"
1119
+ }
1120
+ },
1121
+ "compositePrimaryKeys": {},
1122
+ "uniqueConstraints": {},
1123
+ "checkConstraints": {}
1124
+ },
1125
+ "request_logs": {
1126
+ "name": "request_logs",
1127
+ "columns": {
1128
+ "id": {
1129
+ "name": "id",
1130
+ "type": "text",
1131
+ "primaryKey": true,
1132
+ "notNull": true,
1133
+ "autoincrement": false
1134
+ },
1135
+ "path": {
1136
+ "name": "path",
1137
+ "type": "text",
1138
+ "primaryKey": false,
1139
+ "notNull": true,
1140
+ "autoincrement": false
1141
+ },
1142
+ "method": {
1143
+ "name": "method",
1144
+ "type": "text",
1145
+ "primaryKey": false,
1146
+ "notNull": true,
1147
+ "autoincrement": false
1148
+ },
1149
+ "status_code": {
1150
+ "name": "status_code",
1151
+ "type": "integer",
1152
+ "primaryKey": false,
1153
+ "notNull": true,
1154
+ "autoincrement": false
1155
+ },
1156
+ "duration_ms": {
1157
+ "name": "duration_ms",
1158
+ "type": "integer",
1159
+ "primaryKey": false,
1160
+ "notNull": true,
1161
+ "autoincrement": false
1162
+ },
1163
+ "ip": {
1164
+ "name": "ip",
1165
+ "type": "text",
1166
+ "primaryKey": false,
1167
+ "notNull": false,
1168
+ "autoincrement": false
1169
+ },
1170
+ "request_headers": {
1171
+ "name": "request_headers",
1172
+ "type": "text",
1173
+ "primaryKey": false,
1174
+ "notNull": false,
1175
+ "autoincrement": false
1176
+ },
1177
+ "response_headers": {
1178
+ "name": "response_headers",
1179
+ "type": "text",
1180
+ "primaryKey": false,
1181
+ "notNull": false,
1182
+ "autoincrement": false
1183
+ },
1184
+ "request_body": {
1185
+ "name": "request_body",
1186
+ "type": "text",
1187
+ "primaryKey": false,
1188
+ "notNull": false,
1189
+ "autoincrement": false
1190
+ },
1191
+ "response_body": {
1192
+ "name": "response_body",
1193
+ "type": "text",
1194
+ "primaryKey": false,
1195
+ "notNull": false,
1196
+ "autoincrement": false
1197
+ },
1198
+ "query": {
1199
+ "name": "query",
1200
+ "type": "text",
1201
+ "primaryKey": false,
1202
+ "notNull": false,
1203
+ "autoincrement": false
1204
+ },
1205
+ "user_id": {
1206
+ "name": "user_id",
1207
+ "type": "text",
1208
+ "primaryKey": false,
1209
+ "notNull": false,
1210
+ "autoincrement": false
1211
+ },
1212
+ "project_id": {
1213
+ "name": "project_id",
1214
+ "type": "text",
1215
+ "primaryKey": false,
1216
+ "notNull": false,
1217
+ "autoincrement": false
1218
+ },
1219
+ "partition_key": {
1220
+ "name": "partition_key",
1221
+ "type": "text",
1222
+ "primaryKey": false,
1223
+ "notNull": true,
1224
+ "autoincrement": false
1225
+ },
1226
+ "timestamp": {
1227
+ "name": "timestamp",
1228
+ "type": "text",
1229
+ "primaryKey": false,
1230
+ "notNull": true,
1231
+ "autoincrement": false,
1232
+ "default": "(datetime('now'))"
1233
+ },
1234
+ "metadata": {
1235
+ "name": "metadata",
1236
+ "type": "text",
1237
+ "primaryKey": false,
1238
+ "notNull": false,
1239
+ "autoincrement": false
1240
+ }
1241
+ },
1242
+ "indexes": {
1243
+ "idx_request_logs_timestamp": {
1244
+ "name": "idx_request_logs_timestamp",
1245
+ "columns": [
1246
+ "timestamp"
1247
+ ],
1248
+ "isUnique": false
1249
+ },
1250
+ "idx_request_logs_path": {
1251
+ "name": "idx_request_logs_path",
1252
+ "columns": [
1253
+ "path"
1254
+ ],
1255
+ "isUnique": false
1256
+ },
1257
+ "idx_request_logs_status_code": {
1258
+ "name": "idx_request_logs_status_code",
1259
+ "columns": [
1260
+ "status_code"
1261
+ ],
1262
+ "isUnique": false
1263
+ },
1264
+ "idx_request_logs_partition_key": {
1265
+ "name": "idx_request_logs_partition_key",
1266
+ "columns": [
1267
+ "partition_key"
1268
+ ],
1269
+ "isUnique": false
1270
+ }
1271
+ },
1272
+ "foreignKeys": {},
1273
+ "compositePrimaryKeys": {},
1274
+ "uniqueConstraints": {},
1275
+ "checkConstraints": {}
1276
+ },
1277
+ "usage_limit_snapshots": {
1278
+ "name": "usage_limit_snapshots",
1279
+ "columns": {
1280
+ "id": {
1281
+ "name": "id",
1282
+ "type": "text",
1283
+ "primaryKey": true,
1284
+ "notNull": true,
1285
+ "autoincrement": false
1286
+ },
1287
+ "provider": {
1288
+ "name": "provider",
1289
+ "type": "text",
1290
+ "primaryKey": false,
1291
+ "notNull": true,
1292
+ "autoincrement": false
1293
+ },
1294
+ "account_ref": {
1295
+ "name": "account_ref",
1296
+ "type": "text",
1297
+ "primaryKey": false,
1298
+ "notNull": true,
1299
+ "autoincrement": false,
1300
+ "default": "'default'"
1301
+ },
1302
+ "limit_window": {
1303
+ "name": "limit_window",
1304
+ "type": "text",
1305
+ "primaryKey": false,
1306
+ "notNull": true,
1307
+ "autoincrement": false
1308
+ },
1309
+ "bucket_start": {
1310
+ "name": "bucket_start",
1311
+ "type": "text",
1312
+ "primaryKey": false,
1313
+ "notNull": true,
1314
+ "autoincrement": false
1315
+ },
1316
+ "captured_at": {
1317
+ "name": "captured_at",
1318
+ "type": "text",
1319
+ "primaryKey": false,
1320
+ "notNull": true,
1321
+ "autoincrement": false
1322
+ },
1323
+ "used_percent": {
1324
+ "name": "used_percent",
1325
+ "type": "integer",
1326
+ "primaryKey": false,
1327
+ "notNull": true,
1328
+ "autoincrement": false
1329
+ },
1330
+ "remaining_percent": {
1331
+ "name": "remaining_percent",
1332
+ "type": "integer",
1333
+ "primaryKey": false,
1334
+ "notNull": true,
1335
+ "autoincrement": false
1336
+ },
1337
+ "resets_at": {
1338
+ "name": "resets_at",
1339
+ "type": "text",
1340
+ "primaryKey": false,
1341
+ "notNull": false,
1342
+ "autoincrement": false
1343
+ },
1344
+ "source": {
1345
+ "name": "source",
1346
+ "type": "text",
1347
+ "primaryKey": false,
1348
+ "notNull": true,
1349
+ "autoincrement": false
1350
+ },
1351
+ "metadata": {
1352
+ "name": "metadata",
1353
+ "type": "text",
1354
+ "primaryKey": false,
1355
+ "notNull": false,
1356
+ "autoincrement": false
1357
+ }
1358
+ },
1359
+ "indexes": {
1360
+ "uniq_usage_limit_snapshots_bucket": {
1361
+ "name": "uniq_usage_limit_snapshots_bucket",
1362
+ "columns": [
1363
+ "provider",
1364
+ "account_ref",
1365
+ "limit_window",
1366
+ "bucket_start"
1367
+ ],
1368
+ "isUnique": true
1369
+ },
1370
+ "idx_usage_limit_snapshots_window_bucket": {
1371
+ "name": "idx_usage_limit_snapshots_window_bucket",
1372
+ "columns": [
1373
+ "limit_window",
1374
+ "bucket_start"
1375
+ ],
1376
+ "isUnique": false
1377
+ },
1378
+ "idx_usage_limit_snapshots_provider_window_bucket": {
1379
+ "name": "idx_usage_limit_snapshots_provider_window_bucket",
1380
+ "columns": [
1381
+ "provider",
1382
+ "limit_window",
1383
+ "bucket_start"
1384
+ ],
1385
+ "isUnique": false
1386
+ }
1387
+ },
1388
+ "foreignKeys": {},
1389
+ "compositePrimaryKeys": {},
1390
+ "uniqueConstraints": {},
1391
+ "checkConstraints": {}
1392
+ },
1393
+ "usage_reports": {
1394
+ "name": "usage_reports",
1395
+ "columns": {
1396
+ "id": {
1397
+ "name": "id",
1398
+ "type": "text",
1399
+ "primaryKey": true,
1400
+ "notNull": true,
1401
+ "autoincrement": false
1402
+ },
1403
+ "workspace_id": {
1404
+ "name": "workspace_id",
1405
+ "type": "text",
1406
+ "primaryKey": false,
1407
+ "notNull": true,
1408
+ "autoincrement": false
1409
+ },
1410
+ "month": {
1411
+ "name": "month",
1412
+ "type": "text",
1413
+ "primaryKey": false,
1414
+ "notNull": true,
1415
+ "autoincrement": false
1416
+ },
1417
+ "generated_at": {
1418
+ "name": "generated_at",
1419
+ "type": "text",
1420
+ "primaryKey": false,
1421
+ "notNull": true,
1422
+ "autoincrement": false
1423
+ },
1424
+ "source_range": {
1425
+ "name": "source_range",
1426
+ "type": "text",
1427
+ "primaryKey": false,
1428
+ "notNull": true,
1429
+ "autoincrement": false
1430
+ },
1431
+ "tier": {
1432
+ "name": "tier",
1433
+ "type": "text",
1434
+ "primaryKey": false,
1435
+ "notNull": true,
1436
+ "autoincrement": false
1437
+ },
1438
+ "total_tokens": {
1439
+ "name": "total_tokens",
1440
+ "type": "integer",
1441
+ "primaryKey": false,
1442
+ "notNull": true,
1443
+ "autoincrement": false
1444
+ },
1445
+ "total_cost_usd": {
1446
+ "name": "total_cost_usd",
1447
+ "type": "real",
1448
+ "primaryKey": false,
1449
+ "notNull": true,
1450
+ "autoincrement": false
1451
+ },
1452
+ "payload": {
1453
+ "name": "payload",
1454
+ "type": "text",
1455
+ "primaryKey": false,
1456
+ "notNull": true,
1457
+ "autoincrement": false
1458
+ },
1459
+ "payload_hash": {
1460
+ "name": "payload_hash",
1461
+ "type": "text",
1462
+ "primaryKey": false,
1463
+ "notNull": false,
1464
+ "autoincrement": false
1465
+ },
1466
+ "signature": {
1467
+ "name": "signature",
1468
+ "type": "text",
1469
+ "primaryKey": false,
1470
+ "notNull": false,
1471
+ "autoincrement": false
1472
+ },
1473
+ "signed_at": {
1474
+ "name": "signed_at",
1475
+ "type": "text",
1476
+ "primaryKey": false,
1477
+ "notNull": false,
1478
+ "autoincrement": false
1479
+ },
1480
+ "issuer": {
1481
+ "name": "issuer",
1482
+ "type": "text",
1483
+ "primaryKey": false,
1484
+ "notNull": false,
1485
+ "autoincrement": false
1486
+ }
1487
+ },
1488
+ "indexes": {
1489
+ "uniq_usage_reports_ws_month": {
1490
+ "name": "uniq_usage_reports_ws_month",
1491
+ "columns": [
1492
+ "workspace_id",
1493
+ "month"
1494
+ ],
1495
+ "isUnique": true
1496
+ }
1497
+ },
1498
+ "foreignKeys": {},
1499
+ "compositePrimaryKeys": {},
1500
+ "uniqueConstraints": {},
1501
+ "checkConstraints": {}
1502
+ },
1503
+ "notification_reads": {
1504
+ "name": "notification_reads",
1505
+ "columns": {
1506
+ "notification_id": {
1507
+ "name": "notification_id",
1508
+ "type": "text",
1509
+ "primaryKey": false,
1510
+ "notNull": true,
1511
+ "autoincrement": false
1512
+ },
1513
+ "user_id": {
1514
+ "name": "user_id",
1515
+ "type": "text",
1516
+ "primaryKey": false,
1517
+ "notNull": true,
1518
+ "autoincrement": false
1519
+ },
1520
+ "read_at": {
1521
+ "name": "read_at",
1522
+ "type": "text",
1523
+ "primaryKey": false,
1524
+ "notNull": true,
1525
+ "autoincrement": false
1526
+ }
1527
+ },
1528
+ "indexes": {},
1529
+ "foreignKeys": {},
1530
+ "compositePrimaryKeys": {
1531
+ "notification_reads_notification_id_user_id_pk": {
1532
+ "columns": [
1533
+ "notification_id",
1534
+ "user_id"
1535
+ ],
1536
+ "name": "notification_reads_notification_id_user_id_pk"
1537
+ }
1538
+ },
1539
+ "uniqueConstraints": {},
1540
+ "checkConstraints": {}
1541
+ },
1542
+ "notifications": {
1543
+ "name": "notifications",
1544
+ "columns": {
1545
+ "id": {
1546
+ "name": "id",
1547
+ "type": "text",
1548
+ "primaryKey": true,
1549
+ "notNull": true,
1550
+ "autoincrement": false
1551
+ },
1552
+ "workspace_id": {
1553
+ "name": "workspace_id",
1554
+ "type": "text",
1555
+ "primaryKey": false,
1556
+ "notNull": true,
1557
+ "autoincrement": false
1558
+ },
1559
+ "agent_id": {
1560
+ "name": "agent_id",
1561
+ "type": "text",
1562
+ "primaryKey": false,
1563
+ "notNull": false,
1564
+ "autoincrement": false
1565
+ },
1566
+ "task_id": {
1567
+ "name": "task_id",
1568
+ "type": "text",
1569
+ "primaryKey": false,
1570
+ "notNull": false,
1571
+ "autoincrement": false
1572
+ },
1573
+ "thread_id": {
1574
+ "name": "thread_id",
1575
+ "type": "text",
1576
+ "primaryKey": false,
1577
+ "notNull": false,
1578
+ "autoincrement": false
1579
+ },
1580
+ "source": {
1581
+ "name": "source",
1582
+ "type": "text",
1583
+ "primaryKey": false,
1584
+ "notNull": true,
1585
+ "autoincrement": false,
1586
+ "default": "'agent'"
1587
+ },
1588
+ "level": {
1589
+ "name": "level",
1590
+ "type": "text",
1591
+ "primaryKey": false,
1592
+ "notNull": true,
1593
+ "autoincrement": false,
1594
+ "default": "'info'"
1595
+ },
1596
+ "title": {
1597
+ "name": "title",
1598
+ "type": "text",
1599
+ "primaryKey": false,
1600
+ "notNull": true,
1601
+ "autoincrement": false
1602
+ },
1603
+ "body": {
1604
+ "name": "body",
1605
+ "type": "text",
1606
+ "primaryKey": false,
1607
+ "notNull": false,
1608
+ "autoincrement": false
1609
+ },
1610
+ "target_user_id": {
1611
+ "name": "target_user_id",
1612
+ "type": "text",
1613
+ "primaryKey": false,
1614
+ "notNull": false,
1615
+ "autoincrement": false
1616
+ },
1617
+ "created_at": {
1618
+ "name": "created_at",
1619
+ "type": "text",
1620
+ "primaryKey": false,
1621
+ "notNull": true,
1622
+ "autoincrement": false
1623
+ },
1624
+ "metadata": {
1625
+ "name": "metadata",
1626
+ "type": "text",
1627
+ "primaryKey": false,
1628
+ "notNull": false,
1629
+ "autoincrement": false
1630
+ }
1631
+ },
1632
+ "indexes": {
1633
+ "idx_notifications_ws_created": {
1634
+ "name": "idx_notifications_ws_created",
1635
+ "columns": [
1636
+ "workspace_id",
1637
+ "\"created_at\" DESC"
1638
+ ],
1639
+ "isUnique": false
1640
+ }
1641
+ },
1642
+ "foreignKeys": {},
1643
+ "compositePrimaryKeys": {},
1644
+ "uniqueConstraints": {},
1645
+ "checkConstraints": {}
1646
+ },
1647
+ "agent_suggestions": {
1648
+ "name": "agent_suggestions",
1649
+ "columns": {
1650
+ "id": {
1651
+ "name": "id",
1652
+ "type": "text",
1653
+ "primaryKey": true,
1654
+ "notNull": true,
1655
+ "autoincrement": false
1656
+ },
1657
+ "workspace_id": {
1658
+ "name": "workspace_id",
1659
+ "type": "text",
1660
+ "primaryKey": false,
1661
+ "notNull": true,
1662
+ "autoincrement": false
1663
+ },
1664
+ "agent_id": {
1665
+ "name": "agent_id",
1666
+ "type": "text",
1667
+ "primaryKey": false,
1668
+ "notNull": true,
1669
+ "autoincrement": false
1670
+ },
1671
+ "task_id": {
1672
+ "name": "task_id",
1673
+ "type": "text",
1674
+ "primaryKey": false,
1675
+ "notNull": false,
1676
+ "autoincrement": false
1677
+ },
1678
+ "type": {
1679
+ "name": "type",
1680
+ "type": "text",
1681
+ "primaryKey": false,
1682
+ "notNull": true,
1683
+ "autoincrement": false
1684
+ },
1685
+ "status": {
1686
+ "name": "status",
1687
+ "type": "text",
1688
+ "primaryKey": false,
1689
+ "notNull": true,
1690
+ "autoincrement": false,
1691
+ "default": "'pending'"
1692
+ },
1693
+ "payload": {
1694
+ "name": "payload",
1695
+ "type": "text",
1696
+ "primaryKey": false,
1697
+ "notNull": true,
1698
+ "autoincrement": false
1699
+ },
1700
+ "applied_commit_sha": {
1701
+ "name": "applied_commit_sha",
1702
+ "type": "text",
1703
+ "primaryKey": false,
1704
+ "notNull": false,
1705
+ "autoincrement": false
1706
+ },
1707
+ "created_at": {
1708
+ "name": "created_at",
1709
+ "type": "text",
1710
+ "primaryKey": false,
1711
+ "notNull": true,
1712
+ "autoincrement": false
1713
+ },
1714
+ "updated_at": {
1715
+ "name": "updated_at",
1716
+ "type": "text",
1717
+ "primaryKey": false,
1718
+ "notNull": true,
1719
+ "autoincrement": false
1720
+ }
1721
+ },
1722
+ "indexes": {
1723
+ "idx_agent_suggestions_ws_agent": {
1724
+ "name": "idx_agent_suggestions_ws_agent",
1725
+ "columns": [
1726
+ "workspace_id",
1727
+ "agent_id"
1728
+ ],
1729
+ "isUnique": false
1730
+ },
1731
+ "idx_agent_suggestions_ws_created": {
1732
+ "name": "idx_agent_suggestions_ws_created",
1733
+ "columns": [
1734
+ "workspace_id",
1735
+ "created_at"
1736
+ ],
1737
+ "isUnique": false
1738
+ }
1739
+ },
1740
+ "foreignKeys": {},
1741
+ "compositePrimaryKeys": {},
1742
+ "uniqueConstraints": {},
1743
+ "checkConstraints": {}
1744
+ },
1745
+ "ui_instances": {
1746
+ "name": "ui_instances",
1747
+ "columns": {
1748
+ "id": {
1749
+ "name": "id",
1750
+ "type": "text",
1751
+ "primaryKey": true,
1752
+ "notNull": true,
1753
+ "autoincrement": false
1754
+ },
1755
+ "definition_id": {
1756
+ "name": "definition_id",
1757
+ "type": "text",
1758
+ "primaryKey": false,
1759
+ "notNull": true,
1760
+ "autoincrement": false
1761
+ },
1762
+ "definition_version": {
1763
+ "name": "definition_version",
1764
+ "type": "integer",
1765
+ "primaryKey": false,
1766
+ "notNull": true,
1767
+ "autoincrement": false
1768
+ },
1769
+ "definition_hash": {
1770
+ "name": "definition_hash",
1771
+ "type": "text",
1772
+ "primaryKey": false,
1773
+ "notNull": true,
1774
+ "autoincrement": false
1775
+ },
1776
+ "workspace_id": {
1777
+ "name": "workspace_id",
1778
+ "type": "text",
1779
+ "primaryKey": false,
1780
+ "notNull": true,
1781
+ "autoincrement": false
1782
+ },
1783
+ "thread_id": {
1784
+ "name": "thread_id",
1785
+ "type": "text",
1786
+ "primaryKey": false,
1787
+ "notNull": true,
1788
+ "autoincrement": false
1789
+ },
1790
+ "app_id": {
1791
+ "name": "app_id",
1792
+ "type": "text",
1793
+ "primaryKey": false,
1794
+ "notNull": false,
1795
+ "autoincrement": false
1796
+ },
1797
+ "anchor_task_id": {
1798
+ "name": "anchor_task_id",
1799
+ "type": "text",
1800
+ "primaryKey": false,
1801
+ "notNull": false,
1802
+ "autoincrement": false
1803
+ },
1804
+ "domain_ref_json": {
1805
+ "name": "domain_ref_json",
1806
+ "type": "text",
1807
+ "primaryKey": false,
1808
+ "notNull": true,
1809
+ "autoincrement": false
1810
+ },
1811
+ "state_json": {
1812
+ "name": "state_json",
1813
+ "type": "text",
1814
+ "primaryKey": false,
1815
+ "notNull": true,
1816
+ "autoincrement": false
1817
+ },
1818
+ "revision": {
1819
+ "name": "revision",
1820
+ "type": "integer",
1821
+ "primaryKey": false,
1822
+ "notNull": true,
1823
+ "autoincrement": false,
1824
+ "default": 0
1825
+ },
1826
+ "status": {
1827
+ "name": "status",
1828
+ "type": "text",
1829
+ "primaryKey": false,
1830
+ "notNull": true,
1831
+ "autoincrement": false,
1832
+ "default": "'active'"
1833
+ },
1834
+ "granted_capabilities_json": {
1835
+ "name": "granted_capabilities_json",
1836
+ "type": "text",
1837
+ "primaryKey": false,
1838
+ "notNull": true,
1839
+ "autoincrement": false,
1840
+ "default": "'[]'"
1841
+ },
1842
+ "created_at": {
1843
+ "name": "created_at",
1844
+ "type": "integer",
1845
+ "primaryKey": false,
1846
+ "notNull": true,
1847
+ "autoincrement": false
1848
+ },
1849
+ "updated_at": {
1850
+ "name": "updated_at",
1851
+ "type": "integer",
1852
+ "primaryKey": false,
1853
+ "notNull": true,
1854
+ "autoincrement": false
1855
+ }
1856
+ },
1857
+ "indexes": {
1858
+ "ui_instances_workspace_thread_idx": {
1859
+ "name": "ui_instances_workspace_thread_idx",
1860
+ "columns": [
1861
+ "workspace_id",
1862
+ "thread_id"
1863
+ ],
1864
+ "isUnique": false
1865
+ },
1866
+ "ui_instances_workspace_thread_app_uq": {
1867
+ "name": "ui_instances_workspace_thread_app_uq",
1868
+ "columns": [
1869
+ "workspace_id",
1870
+ "thread_id",
1871
+ "app_id"
1872
+ ],
1873
+ "isUnique": true
1874
+ }
1875
+ },
1876
+ "foreignKeys": {},
1877
+ "compositePrimaryKeys": {},
1878
+ "uniqueConstraints": {},
1879
+ "checkConstraints": {
1880
+ "ui_instances_id_ck": {
1881
+ "name": "ui_instances_id_ck",
1882
+ "value": "length(\"ui_instances\".\"id\") BETWEEN 5 AND 128 AND \"ui_instances\".\"id\" GLOB 'uic_*'"
1883
+ },
1884
+ "ui_instances_definition_id_ck": {
1885
+ "name": "ui_instances_definition_id_ck",
1886
+ "value": "length(\"ui_instances\".\"definition_id\") BETWEEN 1 AND 128"
1887
+ },
1888
+ "ui_instances_definition_version_ck": {
1889
+ "name": "ui_instances_definition_version_ck",
1890
+ "value": "\"ui_instances\".\"definition_version\" >= 1"
1891
+ },
1892
+ "ui_instances_definition_hash_ck": {
1893
+ "name": "ui_instances_definition_hash_ck",
1894
+ "value": "length(\"ui_instances\".\"definition_hash\") = 64 AND \"ui_instances\".\"definition_hash\" NOT GLOB '*[^0-9a-f]*'"
1895
+ },
1896
+ "ui_instances_workspace_id_ck": {
1897
+ "name": "ui_instances_workspace_id_ck",
1898
+ "value": "length(\"ui_instances\".\"workspace_id\") BETWEEN 1 AND 256"
1899
+ },
1900
+ "ui_instances_thread_id_ck": {
1901
+ "name": "ui_instances_thread_id_ck",
1902
+ "value": "length(\"ui_instances\".\"thread_id\") BETWEEN 1 AND 256"
1903
+ },
1904
+ "ui_instances_app_id_ck": {
1905
+ "name": "ui_instances_app_id_ck",
1906
+ "value": "\"ui_instances\".\"app_id\" IS NULL OR length(\"ui_instances\".\"app_id\") BETWEEN 1 AND 128"
1907
+ },
1908
+ "ui_instances_domain_ref_json_ck": {
1909
+ "name": "ui_instances_domain_ref_json_ck",
1910
+ "value": "json_valid(\"ui_instances\".\"domain_ref_json\") AND json_type(\"ui_instances\".\"domain_ref_json\") = 'object'"
1911
+ },
1912
+ "ui_instances_state_json_ck": {
1913
+ "name": "ui_instances_state_json_ck",
1914
+ "value": "json_valid(\"ui_instances\".\"state_json\") AND json_type(\"ui_instances\".\"state_json\") = 'object'"
1915
+ },
1916
+ "ui_instances_revision_ck": {
1917
+ "name": "ui_instances_revision_ck",
1918
+ "value": "\"ui_instances\".\"revision\" >= 0"
1919
+ },
1920
+ "ui_instances_status_ck": {
1921
+ "name": "ui_instances_status_ck",
1922
+ "value": "\"ui_instances\".\"status\" IN ('active', 'completed', 'expired', 'revoked', 'unsupported')"
1923
+ },
1924
+ "ui_instances_granted_capabilities_json_ck": {
1925
+ "name": "ui_instances_granted_capabilities_json_ck",
1926
+ "value": "json_valid(\"ui_instances\".\"granted_capabilities_json\") AND json_type(\"ui_instances\".\"granted_capabilities_json\") = 'array'"
1927
+ },
1928
+ "ui_instances_created_at_ck": {
1929
+ "name": "ui_instances_created_at_ck",
1930
+ "value": "\"ui_instances\".\"created_at\" >= 0"
1931
+ },
1932
+ "ui_instances_updated_at_ck": {
1933
+ "name": "ui_instances_updated_at_ck",
1934
+ "value": "\"ui_instances\".\"updated_at\" >= \"ui_instances\".\"created_at\""
1935
+ }
1936
+ }
1937
+ },
1938
+ "ui_action_receipts": {
1939
+ "name": "ui_action_receipts",
1940
+ "columns": {
1941
+ "id": {
1942
+ "name": "id",
1943
+ "type": "text",
1944
+ "primaryKey": true,
1945
+ "notNull": true,
1946
+ "autoincrement": false
1947
+ },
1948
+ "instance_id": {
1949
+ "name": "instance_id",
1950
+ "type": "text",
1951
+ "primaryKey": false,
1952
+ "notNull": true,
1953
+ "autoincrement": false
1954
+ },
1955
+ "request_id": {
1956
+ "name": "request_id",
1957
+ "type": "text",
1958
+ "primaryKey": false,
1959
+ "notNull": true,
1960
+ "autoincrement": false
1961
+ },
1962
+ "action_id": {
1963
+ "name": "action_id",
1964
+ "type": "text",
1965
+ "primaryKey": false,
1966
+ "notNull": true,
1967
+ "autoincrement": false
1968
+ },
1969
+ "actor_json": {
1970
+ "name": "actor_json",
1971
+ "type": "text",
1972
+ "primaryKey": false,
1973
+ "notNull": true,
1974
+ "autoincrement": false
1975
+ },
1976
+ "source": {
1977
+ "name": "source",
1978
+ "type": "text",
1979
+ "primaryKey": false,
1980
+ "notNull": true,
1981
+ "autoincrement": false
1982
+ },
1983
+ "expected_revision": {
1984
+ "name": "expected_revision",
1985
+ "type": "integer",
1986
+ "primaryKey": false,
1987
+ "notNull": true,
1988
+ "autoincrement": false
1989
+ },
1990
+ "before_revision": {
1991
+ "name": "before_revision",
1992
+ "type": "integer",
1993
+ "primaryKey": false,
1994
+ "notNull": true,
1995
+ "autoincrement": false
1996
+ },
1997
+ "after_revision": {
1998
+ "name": "after_revision",
1999
+ "type": "integer",
2000
+ "primaryKey": false,
2001
+ "notNull": false,
2002
+ "autoincrement": false
2003
+ },
2004
+ "status": {
2005
+ "name": "status",
2006
+ "type": "text",
2007
+ "primaryKey": false,
2008
+ "notNull": true,
2009
+ "autoincrement": false
2010
+ },
2011
+ "outcome": {
2012
+ "name": "outcome",
2013
+ "type": "text",
2014
+ "primaryKey": false,
2015
+ "notNull": false,
2016
+ "autoincrement": false
2017
+ },
2018
+ "input_json": {
2019
+ "name": "input_json",
2020
+ "type": "text",
2021
+ "primaryKey": false,
2022
+ "notNull": true,
2023
+ "autoincrement": false
2024
+ },
2025
+ "result_json": {
2026
+ "name": "result_json",
2027
+ "type": "text",
2028
+ "primaryKey": false,
2029
+ "notNull": false,
2030
+ "autoincrement": false
2031
+ },
2032
+ "error_code": {
2033
+ "name": "error_code",
2034
+ "type": "text",
2035
+ "primaryKey": false,
2036
+ "notNull": false,
2037
+ "autoincrement": false
2038
+ },
2039
+ "requested_at": {
2040
+ "name": "requested_at",
2041
+ "type": "integer",
2042
+ "primaryKey": false,
2043
+ "notNull": true,
2044
+ "autoincrement": false
2045
+ },
2046
+ "settled_at": {
2047
+ "name": "settled_at",
2048
+ "type": "integer",
2049
+ "primaryKey": false,
2050
+ "notNull": false,
2051
+ "autoincrement": false
2052
+ }
2053
+ },
2054
+ "indexes": {
2055
+ "ui_action_receipts_instance_request_uq": {
2056
+ "name": "ui_action_receipts_instance_request_uq",
2057
+ "columns": [
2058
+ "instance_id",
2059
+ "request_id"
2060
+ ],
2061
+ "isUnique": true
2062
+ },
2063
+ "ui_action_receipts_instance_id_idx": {
2064
+ "name": "ui_action_receipts_instance_id_idx",
2065
+ "columns": [
2066
+ "instance_id"
2067
+ ],
2068
+ "isUnique": false
2069
+ },
2070
+ "ui_action_receipts_requested_at_idx": {
2071
+ "name": "ui_action_receipts_requested_at_idx",
2072
+ "columns": [
2073
+ "requested_at"
2074
+ ],
2075
+ "isUnique": false
2076
+ }
2077
+ },
2078
+ "foreignKeys": {},
2079
+ "compositePrimaryKeys": {},
2080
+ "uniqueConstraints": {},
2081
+ "checkConstraints": {
2082
+ "ui_action_receipts_id_ck": {
2083
+ "name": "ui_action_receipts_id_ck",
2084
+ "value": "length(\"ui_action_receipts\".\"id\") BETWEEN 5 AND 128"
2085
+ },
2086
+ "ui_action_receipts_instance_id_ck": {
2087
+ "name": "ui_action_receipts_instance_id_ck",
2088
+ "value": "length(\"ui_action_receipts\".\"instance_id\") BETWEEN 1 AND 128"
2089
+ },
2090
+ "ui_action_receipts_request_id_ck": {
2091
+ "name": "ui_action_receipts_request_id_ck",
2092
+ "value": "length(\"ui_action_receipts\".\"request_id\") BETWEEN 1 AND 128"
2093
+ },
2094
+ "ui_action_receipts_action_id_ck": {
2095
+ "name": "ui_action_receipts_action_id_ck",
2096
+ "value": "length(\"ui_action_receipts\".\"action_id\") BETWEEN 1 AND 128"
2097
+ },
2098
+ "ui_action_receipts_actor_json_ck": {
2099
+ "name": "ui_action_receipts_actor_json_ck",
2100
+ "value": "json_valid(\"ui_action_receipts\".\"actor_json\") AND json_type(\"ui_action_receipts\".\"actor_json\") = 'object'"
2101
+ },
2102
+ "ui_action_receipts_source_ck": {
2103
+ "name": "ui_action_receipts_source_ck",
2104
+ "value": "\"ui_action_receipts\".\"source\" IN ('ui_host', 'cli', 'system', 'mcp')"
2105
+ },
2106
+ "ui_action_receipts_expected_revision_ck": {
2107
+ "name": "ui_action_receipts_expected_revision_ck",
2108
+ "value": "\"ui_action_receipts\".\"expected_revision\" >= 0"
2109
+ },
2110
+ "ui_action_receipts_before_revision_ck": {
2111
+ "name": "ui_action_receipts_before_revision_ck",
2112
+ "value": "\"ui_action_receipts\".\"before_revision\" >= 0"
2113
+ },
2114
+ "ui_action_receipts_after_revision_ck": {
2115
+ "name": "ui_action_receipts_after_revision_ck",
2116
+ "value": "\"ui_action_receipts\".\"after_revision\" IS NULL OR \"ui_action_receipts\".\"after_revision\" >= 0"
2117
+ },
2118
+ "ui_action_receipts_status_ck": {
2119
+ "name": "ui_action_receipts_status_ck",
2120
+ "value": "\"ui_action_receipts\".\"status\" IN ('requested', 'settled')"
2121
+ },
2122
+ "ui_action_receipts_outcome_ck": {
2123
+ "name": "ui_action_receipts_outcome_ck",
2124
+ "value": "\"ui_action_receipts\".\"outcome\" IS NULL OR \"ui_action_receipts\".\"outcome\" IN ('succeeded', 'rejected', 'failed', 'conflicted', 'expired')"
2125
+ },
2126
+ "ui_action_receipts_input_json_ck": {
2127
+ "name": "ui_action_receipts_input_json_ck",
2128
+ "value": "json_valid(\"ui_action_receipts\".\"input_json\") AND json_type(\"ui_action_receipts\".\"input_json\") = 'object'"
2129
+ },
2130
+ "ui_action_receipts_result_json_ck": {
2131
+ "name": "ui_action_receipts_result_json_ck",
2132
+ "value": "\"ui_action_receipts\".\"result_json\" IS NULL OR (json_valid(\"ui_action_receipts\".\"result_json\") AND json_type(\"ui_action_receipts\".\"result_json\") = 'object')"
2133
+ },
2134
+ "ui_action_receipts_requested_at_ck": {
2135
+ "name": "ui_action_receipts_requested_at_ck",
2136
+ "value": "\"ui_action_receipts\".\"requested_at\" >= 0"
2137
+ },
2138
+ "ui_action_receipts_settled_at_ck": {
2139
+ "name": "ui_action_receipts_settled_at_ck",
2140
+ "value": "\"ui_action_receipts\".\"settled_at\" IS NULL OR \"ui_action_receipts\".\"settled_at\" >= \"ui_action_receipts\".\"requested_at\""
2141
+ },
2142
+ "ui_action_receipts_status_transition_ck": {
2143
+ "name": "ui_action_receipts_status_transition_ck",
2144
+ "value": "(\n (\"ui_action_receipts\".\"status\" = 'requested' AND \"ui_action_receipts\".\"after_revision\" IS NULL AND \"ui_action_receipts\".\"outcome\" IS NULL AND \"ui_action_receipts\".\"settled_at\" IS NULL)\n OR\n (\"ui_action_receipts\".\"status\" = 'settled' AND \"ui_action_receipts\".\"after_revision\" IS NOT NULL AND \"ui_action_receipts\".\"outcome\" IS NOT NULL AND \"ui_action_receipts\".\"settled_at\" IS NOT NULL)\n )"
2145
+ }
2146
+ }
2147
+ },
2148
+ "project_criteria": {
2149
+ "name": "project_criteria",
2150
+ "columns": {
2151
+ "id": {
2152
+ "name": "id",
2153
+ "type": "text",
2154
+ "primaryKey": true,
2155
+ "notNull": true,
2156
+ "autoincrement": false
2157
+ },
2158
+ "project_id": {
2159
+ "name": "project_id",
2160
+ "type": "text",
2161
+ "primaryKey": false,
2162
+ "notNull": true,
2163
+ "autoincrement": false
2164
+ },
2165
+ "position": {
2166
+ "name": "position",
2167
+ "type": "integer",
2168
+ "primaryKey": false,
2169
+ "notNull": true,
2170
+ "autoincrement": false
2171
+ },
2172
+ "statement": {
2173
+ "name": "statement",
2174
+ "type": "text",
2175
+ "primaryKey": false,
2176
+ "notNull": true,
2177
+ "autoincrement": false
2178
+ },
2179
+ "verify_status": {
2180
+ "name": "verify_status",
2181
+ "type": "text",
2182
+ "primaryKey": false,
2183
+ "notNull": true,
2184
+ "autoincrement": false,
2185
+ "default": "'pending'"
2186
+ },
2187
+ "verified_at": {
2188
+ "name": "verified_at",
2189
+ "type": "text",
2190
+ "primaryKey": false,
2191
+ "notNull": false,
2192
+ "autoincrement": false
2193
+ },
2194
+ "evidence_json": {
2195
+ "name": "evidence_json",
2196
+ "type": "text",
2197
+ "primaryKey": false,
2198
+ "notNull": true,
2199
+ "autoincrement": false,
2200
+ "default": "'[]'"
2201
+ },
2202
+ "created_at": {
2203
+ "name": "created_at",
2204
+ "type": "text",
2205
+ "primaryKey": false,
2206
+ "notNull": true,
2207
+ "autoincrement": false
2208
+ },
2209
+ "updated_at": {
2210
+ "name": "updated_at",
2211
+ "type": "text",
2212
+ "primaryKey": false,
2213
+ "notNull": true,
2214
+ "autoincrement": false
2215
+ }
2216
+ },
2217
+ "indexes": {
2218
+ "project_criteria_project_position_uq": {
2219
+ "name": "project_criteria_project_position_uq",
2220
+ "columns": [
2221
+ "project_id",
2222
+ "position"
2223
+ ],
2224
+ "isUnique": true
2225
+ }
2226
+ },
2227
+ "foreignKeys": {
2228
+ "project_criteria_project_id_projects_id_fk": {
2229
+ "name": "project_criteria_project_id_projects_id_fk",
2230
+ "tableFrom": "project_criteria",
2231
+ "tableTo": "projects",
2232
+ "columnsFrom": [
2233
+ "project_id"
2234
+ ],
2235
+ "columnsTo": [
2236
+ "id"
2237
+ ],
2238
+ "onDelete": "cascade",
2239
+ "onUpdate": "no action"
2240
+ }
2241
+ },
2242
+ "compositePrimaryKeys": {},
2243
+ "uniqueConstraints": {},
2244
+ "checkConstraints": {
2245
+ "project_criteria_id_ck": {
2246
+ "name": "project_criteria_id_ck",
2247
+ "value": "\"project_criteria\".\"id\" GLOB 'pjc_*'"
2248
+ },
2249
+ "project_criteria_verify_status_ck": {
2250
+ "name": "project_criteria_verify_status_ck",
2251
+ "value": "\"project_criteria\".\"verify_status\" IN ('pending', 'verifying', 'passed', 'failed')"
2252
+ },
2253
+ "project_criteria_evidence_json_ck": {
2254
+ "name": "project_criteria_evidence_json_ck",
2255
+ "value": "json_valid(\"project_criteria\".\"evidence_json\") AND json_type(\"project_criteria\".\"evidence_json\") = 'array'"
2256
+ }
2257
+ }
2258
+ },
2259
+ "project_events": {
2260
+ "name": "project_events",
2261
+ "columns": {
2262
+ "id": {
2263
+ "name": "id",
2264
+ "type": "text",
2265
+ "primaryKey": true,
2266
+ "notNull": true,
2267
+ "autoincrement": false
2268
+ },
2269
+ "project_id": {
2270
+ "name": "project_id",
2271
+ "type": "text",
2272
+ "primaryKey": false,
2273
+ "notNull": true,
2274
+ "autoincrement": false
2275
+ },
2276
+ "seq": {
2277
+ "name": "seq",
2278
+ "type": "integer",
2279
+ "primaryKey": false,
2280
+ "notNull": true,
2281
+ "autoincrement": false
2282
+ },
2283
+ "actor_type": {
2284
+ "name": "actor_type",
2285
+ "type": "text",
2286
+ "primaryKey": false,
2287
+ "notNull": true,
2288
+ "autoincrement": false
2289
+ },
2290
+ "actor_id": {
2291
+ "name": "actor_id",
2292
+ "type": "text",
2293
+ "primaryKey": false,
2294
+ "notNull": false,
2295
+ "autoincrement": false
2296
+ },
2297
+ "type": {
2298
+ "name": "type",
2299
+ "type": "text",
2300
+ "primaryKey": false,
2301
+ "notNull": true,
2302
+ "autoincrement": false
2303
+ },
2304
+ "title": {
2305
+ "name": "title",
2306
+ "type": "text",
2307
+ "primaryKey": false,
2308
+ "notNull": true,
2309
+ "autoincrement": false
2310
+ },
2311
+ "summary": {
2312
+ "name": "summary",
2313
+ "type": "text",
2314
+ "primaryKey": false,
2315
+ "notNull": false,
2316
+ "autoincrement": false
2317
+ },
2318
+ "payload_json": {
2319
+ "name": "payload_json",
2320
+ "type": "text",
2321
+ "primaryKey": false,
2322
+ "notNull": true,
2323
+ "autoincrement": false,
2324
+ "default": "'{}'"
2325
+ },
2326
+ "created_at": {
2327
+ "name": "created_at",
2328
+ "type": "text",
2329
+ "primaryKey": false,
2330
+ "notNull": true,
2331
+ "autoincrement": false
2332
+ }
2333
+ },
2334
+ "indexes": {
2335
+ "project_events_project_seq_uq": {
2336
+ "name": "project_events_project_seq_uq",
2337
+ "columns": [
2338
+ "project_id",
2339
+ "seq"
2340
+ ],
2341
+ "isUnique": true
2342
+ }
2343
+ },
2344
+ "foreignKeys": {
2345
+ "project_events_project_id_projects_id_fk": {
2346
+ "name": "project_events_project_id_projects_id_fk",
2347
+ "tableFrom": "project_events",
2348
+ "tableTo": "projects",
2349
+ "columnsFrom": [
2350
+ "project_id"
2351
+ ],
2352
+ "columnsTo": [
2353
+ "id"
2354
+ ],
2355
+ "onDelete": "restrict",
2356
+ "onUpdate": "no action"
2357
+ }
2358
+ },
2359
+ "compositePrimaryKeys": {},
2360
+ "uniqueConstraints": {},
2361
+ "checkConstraints": {
2362
+ "project_events_id_ck": {
2363
+ "name": "project_events_id_ck",
2364
+ "value": "\"project_events\".\"id\" GLOB 'pje_*'"
2365
+ },
2366
+ "project_events_actor_type_ck": {
2367
+ "name": "project_events_actor_type_ck",
2368
+ "value": "\"project_events\".\"actor_type\" IN ('user', 'project_manager', 'system')"
2369
+ },
2370
+ "project_events_payload_json_ck": {
2371
+ "name": "project_events_payload_json_ck",
2372
+ "value": "json_valid(\"project_events\".\"payload_json\") AND json_type(\"project_events\".\"payload_json\") = 'object'"
2373
+ }
2374
+ }
2375
+ },
2376
+ "projects": {
2377
+ "name": "projects",
2378
+ "columns": {
2379
+ "id": {
2380
+ "name": "id",
2381
+ "type": "text",
2382
+ "primaryKey": true,
2383
+ "notNull": true,
2384
+ "autoincrement": false
2385
+ },
2386
+ "workspace_id": {
2387
+ "name": "workspace_id",
2388
+ "type": "text",
2389
+ "primaryKey": false,
2390
+ "notNull": true,
2391
+ "autoincrement": false
2392
+ },
2393
+ "name": {
2394
+ "name": "name",
2395
+ "type": "text",
2396
+ "primaryKey": false,
2397
+ "notNull": true,
2398
+ "autoincrement": false
2399
+ },
2400
+ "outcome": {
2401
+ "name": "outcome",
2402
+ "type": "text",
2403
+ "primaryKey": false,
2404
+ "notNull": true,
2405
+ "autoincrement": false
2406
+ },
2407
+ "due_date": {
2408
+ "name": "due_date",
2409
+ "type": "text",
2410
+ "primaryKey": false,
2411
+ "notNull": false,
2412
+ "autoincrement": false
2413
+ },
2414
+ "scene": {
2415
+ "name": "scene",
2416
+ "type": "text",
2417
+ "primaryKey": false,
2418
+ "notNull": true,
2419
+ "autoincrement": false,
2420
+ "default": "'planning'"
2421
+ },
2422
+ "stages_json": {
2423
+ "name": "stages_json",
2424
+ "type": "text",
2425
+ "primaryKey": false,
2426
+ "notNull": true,
2427
+ "autoincrement": false
2428
+ },
2429
+ "stage_index": {
2430
+ "name": "stage_index",
2431
+ "type": "integer",
2432
+ "primaryKey": false,
2433
+ "notNull": true,
2434
+ "autoincrement": false
2435
+ },
2436
+ "created_at": {
2437
+ "name": "created_at",
2438
+ "type": "text",
2439
+ "primaryKey": false,
2440
+ "notNull": true,
2441
+ "autoincrement": false
2442
+ },
2443
+ "updated_at": {
2444
+ "name": "updated_at",
2445
+ "type": "text",
2446
+ "primaryKey": false,
2447
+ "notNull": true,
2448
+ "autoincrement": false
2449
+ },
2450
+ "accepted_at": {
2451
+ "name": "accepted_at",
2452
+ "type": "text",
2453
+ "primaryKey": false,
2454
+ "notNull": false,
2455
+ "autoincrement": false
2456
+ },
2457
+ "archived_at": {
2458
+ "name": "archived_at",
2459
+ "type": "text",
2460
+ "primaryKey": false,
2461
+ "notNull": false,
2462
+ "autoincrement": false
2463
+ }
2464
+ },
2465
+ "indexes": {},
2466
+ "foreignKeys": {},
2467
+ "compositePrimaryKeys": {},
2468
+ "uniqueConstraints": {},
2469
+ "checkConstraints": {
2470
+ "projects_id_ck": {
2471
+ "name": "projects_id_ck",
2472
+ "value": "\"projects\".\"id\" GLOB 'prj_*'"
2473
+ },
2474
+ "projects_scene_ck": {
2475
+ "name": "projects_scene_ck",
2476
+ "value": "\"projects\".\"scene\" IN ('planning', 'plan_review', 'running', 'human_wait', 'limit_wait', 'failed_stop', 'analyzing_feedback', 'replanned', 'awaiting_review', 'accepted')"
2477
+ },
2478
+ "projects_stages_json_ck": {
2479
+ "name": "projects_stages_json_ck",
2480
+ "value": "json_valid(\"projects\".\"stages_json\") AND json_type(\"projects\".\"stages_json\") = 'array'"
2481
+ },
2482
+ "projects_stage_index_ck": {
2483
+ "name": "projects_stage_index_ck",
2484
+ "value": "\"projects\".\"stage_index\" >= 1"
2485
+ }
2486
+ }
2487
+ },
2488
+ "common_codes": {
2489
+ "name": "common_codes",
2490
+ "columns": {
2491
+ "code_group": {
2492
+ "name": "code_group",
2493
+ "type": "text",
2494
+ "primaryKey": false,
2495
+ "notNull": true,
2496
+ "autoincrement": false
2497
+ },
2498
+ "code": {
2499
+ "name": "code",
2500
+ "type": "text",
2501
+ "primaryKey": false,
2502
+ "notNull": true,
2503
+ "autoincrement": false
2504
+ },
2505
+ "code_name": {
2506
+ "name": "code_name",
2507
+ "type": "text",
2508
+ "primaryKey": false,
2509
+ "notNull": false,
2510
+ "autoincrement": false
2511
+ },
2512
+ "color": {
2513
+ "name": "color",
2514
+ "type": "text",
2515
+ "primaryKey": false,
2516
+ "notNull": true,
2517
+ "autoincrement": false,
2518
+ "default": "'gray'"
2519
+ },
2520
+ "sort_order": {
2521
+ "name": "sort_order",
2522
+ "type": "integer",
2523
+ "primaryKey": false,
2524
+ "notNull": true,
2525
+ "autoincrement": false
2526
+ },
2527
+ "workspace_id": {
2528
+ "name": "workspace_id",
2529
+ "type": "text",
2530
+ "primaryKey": false,
2531
+ "notNull": false,
2532
+ "autoincrement": false
2533
+ },
2534
+ "is_builtin": {
2535
+ "name": "is_builtin",
2536
+ "type": "integer",
2537
+ "primaryKey": false,
2538
+ "notNull": true,
2539
+ "autoincrement": false,
2540
+ "default": 0
2541
+ },
2542
+ "is_archived": {
2543
+ "name": "is_archived",
2544
+ "type": "integer",
2545
+ "primaryKey": false,
2546
+ "notNull": true,
2547
+ "autoincrement": false,
2548
+ "default": 0
2549
+ },
2550
+ "metadata": {
2551
+ "name": "metadata",
2552
+ "type": "text",
2553
+ "primaryKey": false,
2554
+ "notNull": false,
2555
+ "autoincrement": false
2556
+ },
2557
+ "created_at": {
2558
+ "name": "created_at",
2559
+ "type": "text",
2560
+ "primaryKey": false,
2561
+ "notNull": true,
2562
+ "autoincrement": false
2563
+ },
2564
+ "updated_at": {
2565
+ "name": "updated_at",
2566
+ "type": "text",
2567
+ "primaryKey": false,
2568
+ "notNull": true,
2569
+ "autoincrement": false
2570
+ }
2571
+ },
2572
+ "indexes": {
2573
+ "idx_common_codes_group_archived_order": {
2574
+ "name": "idx_common_codes_group_archived_order",
2575
+ "columns": [
2576
+ "code_group",
2577
+ "is_archived",
2578
+ "sort_order"
2579
+ ],
2580
+ "isUnique": false
2581
+ }
2582
+ },
2583
+ "foreignKeys": {},
2584
+ "compositePrimaryKeys": {
2585
+ "common_codes_code_group_code_pk": {
2586
+ "columns": [
2587
+ "code_group",
2588
+ "code"
2589
+ ],
2590
+ "name": "common_codes_code_group_code_pk"
2591
+ }
2592
+ },
2593
+ "uniqueConstraints": {},
2594
+ "checkConstraints": {
2595
+ "common_codes_metadata_ck": {
2596
+ "name": "common_codes_metadata_ck",
2597
+ "value": "\"common_codes\".\"metadata\" IS NULL OR (json_valid(\"common_codes\".\"metadata\") AND json_type(\"common_codes\".\"metadata\") = 'object')"
2598
+ },
2599
+ "common_codes_builtin_ck": {
2600
+ "name": "common_codes_builtin_ck",
2601
+ "value": "\"common_codes\".\"is_builtin\" IN (0, 1)"
2602
+ },
2603
+ "common_codes_archived_ck": {
2604
+ "name": "common_codes_archived_ck",
2605
+ "value": "\"common_codes\".\"is_archived\" IN (0, 1)"
2606
+ }
2607
+ }
2608
+ },
2609
+ "thread_events": {
2610
+ "name": "thread_events",
2611
+ "columns": {
2612
+ "id": {
2613
+ "name": "id",
2614
+ "type": "text",
2615
+ "primaryKey": true,
2616
+ "notNull": true,
2617
+ "autoincrement": false
2618
+ },
2619
+ "thread_id": {
2620
+ "name": "thread_id",
2621
+ "type": "text",
2622
+ "primaryKey": false,
2623
+ "notNull": true,
2624
+ "autoincrement": false
2625
+ },
2626
+ "seq": {
2627
+ "name": "seq",
2628
+ "type": "integer",
2629
+ "primaryKey": false,
2630
+ "notNull": true,
2631
+ "autoincrement": false
2632
+ },
2633
+ "type": {
2634
+ "name": "type",
2635
+ "type": "text",
2636
+ "primaryKey": false,
2637
+ "notNull": true,
2638
+ "autoincrement": false
2639
+ },
2640
+ "actor_type": {
2641
+ "name": "actor_type",
2642
+ "type": "text",
2643
+ "primaryKey": false,
2644
+ "notNull": true,
2645
+ "autoincrement": false
2646
+ },
2647
+ "payload_json": {
2648
+ "name": "payload_json",
2649
+ "type": "text",
2650
+ "primaryKey": false,
2651
+ "notNull": true,
2652
+ "autoincrement": false
2653
+ },
2654
+ "created_at": {
2655
+ "name": "created_at",
2656
+ "type": "text",
2657
+ "primaryKey": false,
2658
+ "notNull": true,
2659
+ "autoincrement": false
2660
+ },
2661
+ "actor_id": {
2662
+ "name": "actor_id",
2663
+ "type": "text",
2664
+ "primaryKey": false,
2665
+ "notNull": false,
2666
+ "autoincrement": false
2667
+ },
2668
+ "task_id": {
2669
+ "name": "task_id",
2670
+ "type": "text",
2671
+ "primaryKey": false,
2672
+ "notNull": false,
2673
+ "autoincrement": false
2674
+ },
2675
+ "highlight_id": {
2676
+ "name": "highlight_id",
2677
+ "type": "text",
2678
+ "primaryKey": false,
2679
+ "notNull": false,
2680
+ "autoincrement": false
2681
+ }
2682
+ },
2683
+ "indexes": {
2684
+ "idx_thread_events_thread_seq": {
2685
+ "name": "idx_thread_events_thread_seq",
2686
+ "columns": [
2687
+ "thread_id",
2688
+ "seq"
2689
+ ],
2690
+ "isUnique": false
2691
+ },
2692
+ "idx_thread_events_thread_created": {
2693
+ "name": "idx_thread_events_thread_created",
2694
+ "columns": [
2695
+ "thread_id",
2696
+ "created_at"
2697
+ ],
2698
+ "isUnique": false
2699
+ },
2700
+ "thread_events_thread_seq_uq": {
2701
+ "name": "thread_events_thread_seq_uq",
2702
+ "columns": [
2703
+ "thread_id",
2704
+ "seq"
2705
+ ],
2706
+ "isUnique": true
2707
+ }
2708
+ },
2709
+ "foreignKeys": {
2710
+ "thread_events_thread_id_threads_id_fk": {
2711
+ "name": "thread_events_thread_id_threads_id_fk",
2712
+ "tableFrom": "thread_events",
2713
+ "tableTo": "threads",
2714
+ "columnsFrom": [
2715
+ "thread_id"
2716
+ ],
2717
+ "columnsTo": [
2718
+ "id"
2719
+ ],
2720
+ "onDelete": "cascade",
2721
+ "onUpdate": "no action"
2722
+ }
2723
+ },
2724
+ "compositePrimaryKeys": {},
2725
+ "uniqueConstraints": {},
2726
+ "checkConstraints": {
2727
+ "thread_events_type_ck": {
2728
+ "name": "thread_events_type_ck",
2729
+ "value": "\"thread_events\".\"type\" IN ('thread.snapshot.imported', 'thread.title.changed', 'thread.priority.changed', 'thread.state.changed', 'thread.highlight.created', 'thread.highlight.updated', 'thread.highlight.deleted', 'thread.highlights.regenerated')"
2730
+ },
2731
+ "thread_events_actor_type_ck": {
2732
+ "name": "thread_events_actor_type_ck",
2733
+ "value": "\"thread_events\".\"actor_type\" IN ('user', 'agent', 'system')"
2734
+ },
2735
+ "thread_events_payload_json_ck": {
2736
+ "name": "thread_events_payload_json_ck",
2737
+ "value": "json_valid(\"thread_events\".\"payload_json\") AND json_type(\"thread_events\".\"payload_json\") = 'object'"
2738
+ }
2739
+ }
2740
+ },
2741
+ "thread_highlight_runs": {
2742
+ "name": "thread_highlight_runs",
2743
+ "columns": {
2744
+ "id": {
2745
+ "name": "id",
2746
+ "type": "text",
2747
+ "primaryKey": true,
2748
+ "notNull": true,
2749
+ "autoincrement": false
2750
+ },
2751
+ "thread_id": {
2752
+ "name": "thread_id",
2753
+ "type": "text",
2754
+ "primaryKey": false,
2755
+ "notNull": true,
2756
+ "autoincrement": false
2757
+ },
2758
+ "request_id": {
2759
+ "name": "request_id",
2760
+ "type": "text",
2761
+ "primaryKey": false,
2762
+ "notNull": true,
2763
+ "autoincrement": false
2764
+ },
2765
+ "status": {
2766
+ "name": "status",
2767
+ "type": "text",
2768
+ "primaryKey": false,
2769
+ "notNull": true,
2770
+ "autoincrement": false
2771
+ },
2772
+ "detector_version": {
2773
+ "name": "detector_version",
2774
+ "type": "text",
2775
+ "primaryKey": false,
2776
+ "notNull": true,
2777
+ "autoincrement": false
2778
+ },
2779
+ "requested_at": {
2780
+ "name": "requested_at",
2781
+ "type": "text",
2782
+ "primaryKey": false,
2783
+ "notNull": true,
2784
+ "autoincrement": false
2785
+ },
2786
+ "started_at": {
2787
+ "name": "started_at",
2788
+ "type": "text",
2789
+ "primaryKey": false,
2790
+ "notNull": false,
2791
+ "autoincrement": false
2792
+ },
2793
+ "completed_at": {
2794
+ "name": "completed_at",
2795
+ "type": "text",
2796
+ "primaryKey": false,
2797
+ "notNull": false,
2798
+ "autoincrement": false
2799
+ },
2800
+ "error_code": {
2801
+ "name": "error_code",
2802
+ "type": "text",
2803
+ "primaryKey": false,
2804
+ "notNull": false,
2805
+ "autoincrement": false
2806
+ },
2807
+ "previous_auto_count": {
2808
+ "name": "previous_auto_count",
2809
+ "type": "integer",
2810
+ "primaryKey": false,
2811
+ "notNull": false,
2812
+ "autoincrement": false
2813
+ },
2814
+ "new_auto_count": {
2815
+ "name": "new_auto_count",
2816
+ "type": "integer",
2817
+ "primaryKey": false,
2818
+ "notNull": false,
2819
+ "autoincrement": false
2820
+ }
2821
+ },
2822
+ "indexes": {
2823
+ "thread_highlight_runs_thread_request_uq": {
2824
+ "name": "thread_highlight_runs_thread_request_uq",
2825
+ "columns": [
2826
+ "thread_id",
2827
+ "request_id"
2828
+ ],
2829
+ "isUnique": true
2830
+ },
2831
+ "thread_highlight_runs_in_progress_thread_uq": {
2832
+ "name": "thread_highlight_runs_in_progress_thread_uq",
2833
+ "columns": [
2834
+ "thread_id"
2835
+ ],
2836
+ "isUnique": true,
2837
+ "where": "\"thread_highlight_runs\".\"status\" IN ('queued', 'running')"
2838
+ },
2839
+ "idx_thread_highlight_runs_thread_status_requested": {
2840
+ "name": "idx_thread_highlight_runs_thread_status_requested",
2841
+ "columns": [
2842
+ "thread_id",
2843
+ "status",
2844
+ "requested_at"
2845
+ ],
2846
+ "isUnique": false
2847
+ }
2848
+ },
2849
+ "foreignKeys": {
2850
+ "thread_highlight_runs_thread_id_threads_id_fk": {
2851
+ "name": "thread_highlight_runs_thread_id_threads_id_fk",
2852
+ "tableFrom": "thread_highlight_runs",
2853
+ "tableTo": "threads",
2854
+ "columnsFrom": [
2855
+ "thread_id"
2856
+ ],
2857
+ "columnsTo": [
2858
+ "id"
2859
+ ],
2860
+ "onDelete": "cascade",
2861
+ "onUpdate": "no action"
2862
+ }
2863
+ },
2864
+ "compositePrimaryKeys": {},
2865
+ "uniqueConstraints": {},
2866
+ "checkConstraints": {
2867
+ "thread_highlight_runs_status_ck": {
2868
+ "name": "thread_highlight_runs_status_ck",
2869
+ "value": "\"thread_highlight_runs\".\"status\" IN ('queued', 'running', 'completed', 'failed')"
2870
+ },
2871
+ "thread_highlight_runs_counts_ck": {
2872
+ "name": "thread_highlight_runs_counts_ck",
2873
+ "value": "(\"thread_highlight_runs\".\"previous_auto_count\" IS NULL OR \"thread_highlight_runs\".\"previous_auto_count\" >= 0) AND (\"thread_highlight_runs\".\"new_auto_count\" IS NULL OR \"thread_highlight_runs\".\"new_auto_count\" >= 0)"
2874
+ }
2875
+ }
2876
+ },
2877
+ "thread_highlights": {
2878
+ "name": "thread_highlights",
2879
+ "columns": {
2880
+ "id": {
2881
+ "name": "id",
2882
+ "type": "text",
2883
+ "primaryKey": true,
2884
+ "notNull": true,
2885
+ "autoincrement": false
2886
+ },
2887
+ "thread_id": {
2888
+ "name": "thread_id",
2889
+ "type": "text",
2890
+ "primaryKey": false,
2891
+ "notNull": true,
2892
+ "autoincrement": false
2893
+ },
2894
+ "source": {
2895
+ "name": "source",
2896
+ "type": "text",
2897
+ "primaryKey": false,
2898
+ "notNull": true,
2899
+ "autoincrement": false
2900
+ },
2901
+ "kind": {
2902
+ "name": "kind",
2903
+ "type": "text",
2904
+ "primaryKey": false,
2905
+ "notNull": true,
2906
+ "autoincrement": false
2907
+ },
2908
+ "status": {
2909
+ "name": "status",
2910
+ "type": "text",
2911
+ "primaryKey": false,
2912
+ "notNull": true,
2913
+ "autoincrement": false,
2914
+ "default": "'active'"
2915
+ },
2916
+ "text": {
2917
+ "name": "text",
2918
+ "type": "text",
2919
+ "primaryKey": false,
2920
+ "notNull": false,
2921
+ "autoincrement": false
2922
+ },
2923
+ "covers_from_task_id": {
2924
+ "name": "covers_from_task_id",
2925
+ "type": "text",
2926
+ "primaryKey": false,
2927
+ "notNull": true,
2928
+ "autoincrement": false
2929
+ },
2930
+ "covers_to_task_id": {
2931
+ "name": "covers_to_task_id",
2932
+ "type": "text",
2933
+ "primaryKey": false,
2934
+ "notNull": true,
2935
+ "autoincrement": false
2936
+ },
2937
+ "revision": {
2938
+ "name": "revision",
2939
+ "type": "integer",
2940
+ "primaryKey": false,
2941
+ "notNull": true,
2942
+ "autoincrement": false,
2943
+ "default": 0
2944
+ },
2945
+ "created_at": {
2946
+ "name": "created_at",
2947
+ "type": "text",
2948
+ "primaryKey": false,
2949
+ "notNull": true,
2950
+ "autoincrement": false
2951
+ },
2952
+ "updated_at": {
2953
+ "name": "updated_at",
2954
+ "type": "text",
2955
+ "primaryKey": false,
2956
+ "notNull": true,
2957
+ "autoincrement": false
2958
+ },
2959
+ "agent_id": {
2960
+ "name": "agent_id",
2961
+ "type": "text",
2962
+ "primaryKey": false,
2963
+ "notNull": false,
2964
+ "autoincrement": false
2965
+ },
2966
+ "source_task_id": {
2967
+ "name": "source_task_id",
2968
+ "type": "text",
2969
+ "primaryKey": false,
2970
+ "notNull": false,
2971
+ "autoincrement": false
2972
+ },
2973
+ "detector_version": {
2974
+ "name": "detector_version",
2975
+ "type": "text",
2976
+ "primaryKey": false,
2977
+ "notNull": false,
2978
+ "autoincrement": false
2979
+ },
2980
+ "content_fingerprint": {
2981
+ "name": "content_fingerprint",
2982
+ "type": "text",
2983
+ "primaryKey": false,
2984
+ "notNull": false,
2985
+ "autoincrement": false
2986
+ },
2987
+ "dismissed_at": {
2988
+ "name": "dismissed_at",
2989
+ "type": "text",
2990
+ "primaryKey": false,
2991
+ "notNull": false,
2992
+ "autoincrement": false
2993
+ }
2994
+ },
2995
+ "indexes": {
2996
+ "idx_thread_highlights_thread_status_created": {
2997
+ "name": "idx_thread_highlights_thread_status_created",
2998
+ "columns": [
2999
+ "thread_id",
3000
+ "status",
3001
+ "created_at"
3002
+ ],
3003
+ "isUnique": false
3004
+ },
3005
+ "idx_thread_highlights_thread_covers": {
3006
+ "name": "idx_thread_highlights_thread_covers",
3007
+ "columns": [
3008
+ "thread_id",
3009
+ "covers_from_task_id",
3010
+ "covers_to_task_id"
3011
+ ],
3012
+ "isUnique": false
3013
+ },
3014
+ "thread_highlights_auto_idempotency_uq": {
3015
+ "name": "thread_highlights_auto_idempotency_uq",
3016
+ "columns": [
3017
+ "thread_id",
3018
+ "source_task_id",
3019
+ "detector_version",
3020
+ "content_fingerprint"
3021
+ ],
3022
+ "isUnique": true,
3023
+ "where": "\"thread_highlights\".\"source\" = 'auto'"
3024
+ }
3025
+ },
3026
+ "foreignKeys": {
3027
+ "thread_highlights_thread_id_threads_id_fk": {
3028
+ "name": "thread_highlights_thread_id_threads_id_fk",
3029
+ "tableFrom": "thread_highlights",
3030
+ "tableTo": "threads",
3031
+ "columnsFrom": [
3032
+ "thread_id"
3033
+ ],
3034
+ "columnsTo": [
3035
+ "id"
3036
+ ],
3037
+ "onDelete": "cascade",
3038
+ "onUpdate": "no action"
3039
+ }
3040
+ },
3041
+ "compositePrimaryKeys": {},
3042
+ "uniqueConstraints": {},
3043
+ "checkConstraints": {
3044
+ "thread_highlights_source_ck": {
3045
+ "name": "thread_highlights_source_ck",
3046
+ "value": "\"thread_highlights\".\"source\" IN ('auto', 'manual')"
3047
+ },
3048
+ "thread_highlights_kind_ck": {
3049
+ "name": "thread_highlights_kind_ck",
3050
+ "value": "\"thread_highlights\".\"kind\" IN ('decision', 'judgment', 'issue', 'result', 'pivot')"
3051
+ },
3052
+ "thread_highlights_status_ck": {
3053
+ "name": "thread_highlights_status_ck",
3054
+ "value": "\"thread_highlights\".\"status\" IN ('active', 'dismissed')"
3055
+ },
3056
+ "thread_highlights_active_text_ck": {
3057
+ "name": "thread_highlights_active_text_ck",
3058
+ "value": "\"thread_highlights\".\"status\" = 'dismissed' OR (\"thread_highlights\".\"text\" IS NOT NULL AND length(\"thread_highlights\".\"text\") > 0)"
3059
+ },
3060
+ "thread_highlights_covers_ck": {
3061
+ "name": "thread_highlights_covers_ck",
3062
+ "value": "length(\"thread_highlights\".\"covers_from_task_id\") > 0 AND length(\"thread_highlights\".\"covers_to_task_id\") > 0"
3063
+ },
3064
+ "thread_highlights_auto_key_ck": {
3065
+ "name": "thread_highlights_auto_key_ck",
3066
+ "value": "\"thread_highlights\".\"source\" = 'manual' OR (\"thread_highlights\".\"source\" = 'auto' AND \"thread_highlights\".\"source_task_id\" IS NOT NULL AND \"thread_highlights\".\"detector_version\" IS NOT NULL AND \"thread_highlights\".\"content_fingerprint\" IS NOT NULL AND length(\"thread_highlights\".\"source_task_id\") > 0 AND length(\"thread_highlights\".\"detector_version\") > 0 AND length(\"thread_highlights\".\"content_fingerprint\") > 0)"
3067
+ }
3068
+ }
3069
+ },
3070
+ "storage_metadata": {
3071
+ "name": "storage_metadata",
3072
+ "columns": {
3073
+ "source_kind": {
3074
+ "name": "source_kind",
3075
+ "type": "text",
3076
+ "primaryKey": false,
3077
+ "notNull": true,
3078
+ "autoincrement": false
3079
+ },
3080
+ "source_id": {
3081
+ "name": "source_id",
3082
+ "type": "text",
3083
+ "primaryKey": false,
3084
+ "notNull": true,
3085
+ "autoincrement": false
3086
+ },
3087
+ "utc_ts": {
3088
+ "name": "utc_ts",
3089
+ "type": "text",
3090
+ "primaryKey": false,
3091
+ "notNull": false,
3092
+ "autoincrement": false
3093
+ },
3094
+ "bytes": {
3095
+ "name": "bytes",
3096
+ "type": "integer",
3097
+ "primaryKey": false,
3098
+ "notNull": true,
3099
+ "autoincrement": false
3100
+ }
3101
+ },
3102
+ "indexes": {
3103
+ "idx_storage_metadata_kind_ts_bytes": {
3104
+ "name": "idx_storage_metadata_kind_ts_bytes",
3105
+ "columns": [
3106
+ "source_kind",
3107
+ "utc_ts",
3108
+ "bytes"
3109
+ ],
3110
+ "isUnique": false
3111
+ }
3112
+ },
3113
+ "foreignKeys": {},
3114
+ "compositePrimaryKeys": {
3115
+ "storage_metadata_source_kind_source_id_pk": {
3116
+ "columns": [
3117
+ "source_kind",
3118
+ "source_id"
3119
+ ],
3120
+ "name": "storage_metadata_source_kind_source_id_pk"
3121
+ }
3122
+ },
3123
+ "uniqueConstraints": {},
3124
+ "checkConstraints": {}
3125
+ },
3126
+ "storage_metadata_state": {
3127
+ "name": "storage_metadata_state",
3128
+ "columns": {
3129
+ "unit": {
3130
+ "name": "unit",
3131
+ "type": "text",
3132
+ "primaryKey": true,
3133
+ "notNull": true,
3134
+ "autoincrement": false
3135
+ },
3136
+ "cursor_rowid": {
3137
+ "name": "cursor_rowid",
3138
+ "type": "integer",
3139
+ "primaryKey": false,
3140
+ "notNull": true,
3141
+ "autoincrement": false,
3142
+ "default": 0
3143
+ },
3144
+ "end_rowid": {
3145
+ "name": "end_rowid",
3146
+ "type": "integer",
3147
+ "primaryKey": false,
3148
+ "notNull": false,
3149
+ "autoincrement": false
3150
+ },
3151
+ "complete": {
3152
+ "name": "complete",
3153
+ "type": "integer",
3154
+ "primaryKey": false,
3155
+ "notNull": true,
3156
+ "autoincrement": false,
3157
+ "default": 0
3158
+ },
3159
+ "updated_at": {
3160
+ "name": "updated_at",
3161
+ "type": "text",
3162
+ "primaryKey": false,
3163
+ "notNull": true,
3164
+ "autoincrement": false
3165
+ }
3166
+ },
3167
+ "indexes": {},
3168
+ "foreignKeys": {},
3169
+ "compositePrimaryKeys": {},
3170
+ "uniqueConstraints": {},
3171
+ "checkConstraints": {}
3172
+ }
3173
+ },
3174
+ "views": {},
3175
+ "enums": {},
3176
+ "_meta": {
3177
+ "schemas": {},
3178
+ "tables": {},
3179
+ "columns": {}
3180
+ },
3181
+ "internal": {
3182
+ "indexes": {
3183
+ "idx_threads_workspace_thread_state": {
3184
+ "columns": {
3185
+ "json_extract(metadata, '$.threadTitle.state')": {
3186
+ "isExpression": true
3187
+ }
3188
+ }
3189
+ },
3190
+ "idx_threads_workspace_thread_priority": {
3191
+ "columns": {
3192
+ "json_extract(metadata, '$.threadTitle.priority')": {
3193
+ "isExpression": true
3194
+ }
3195
+ }
3196
+ },
3197
+ "idx_notifications_ws_created": {
3198
+ "columns": {
3199
+ "\"created_at\" DESC": {
3200
+ "isExpression": true
3201
+ }
3202
+ }
3203
+ }
3204
+ }
3205
+ }
3206
+ }