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