@catalyst-cloud/schema 0.1.38 → 0.1.40
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.
- package/package.json +1 -1
- package/src/migrations.generated.ts +9 -0
- package/src/mirror.ts +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@catalyst-cloud/schema",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.40",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Typed Drizzle schema = single source of truth for the per-tenant Mirror DO SQLite store (CTC-13 / ADR-0002). Shared by the mirror Worker, the host-sync replica, and the browser OPFS replica.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -256,6 +256,13 @@ export const MIRROR_MIGRATIONS = {
|
|
|
256
256
|
tag: "0034_special_onslaught",
|
|
257
257
|
breakpoints: true,
|
|
258
258
|
},
|
|
259
|
+
{
|
|
260
|
+
idx: 35,
|
|
261
|
+
version: "6",
|
|
262
|
+
when: 1788324536096,
|
|
263
|
+
tag: "0035_tricky_swarm",
|
|
264
|
+
breakpoints: true,
|
|
265
|
+
},
|
|
259
266
|
],
|
|
260
267
|
},
|
|
261
268
|
migrations: {
|
|
@@ -326,5 +333,7 @@ export const MIRROR_MIGRATIONS = {
|
|
|
326
333
|
"ALTER TABLE `labels` ADD `team_id` text;--> statement-breakpoint\nCREATE INDEX `idx_labels_team` ON `labels` (`team_id`);",
|
|
327
334
|
"0034_special_onslaught":
|
|
328
335
|
"CREATE INDEX `idx_processed_events_source_received` ON `processed_events` (`source`,`received_at`);",
|
|
336
|
+
"0035_tricky_swarm":
|
|
337
|
+
"ALTER TABLE `agent_activities` ADD `action` text;--> statement-breakpoint\nALTER TABLE `agent_activities` ADD `parameter` text;--> statement-breakpoint\nALTER TABLE `agent_activities` ADD `result` text;--> statement-breakpoint\nUPDATE agent_activities\n SET action = json_extract(raw, '$.content.action'),\n parameter = json_extract(raw, '$.content.parameter'),\n result = json_extract(raw, '$.content.result')\n WHERE raw IS NOT NULL\n AND json_valid(raw)\n AND json_extract(raw, '$.content.type') = 'action';\n",
|
|
329
338
|
},
|
|
330
339
|
} as const;
|
package/src/mirror.ts
CHANGED
|
@@ -295,6 +295,14 @@ export const agent_activities = sqliteTable(
|
|
|
295
295
|
signal: text("signal"),
|
|
296
296
|
created_at: integer("created_at"),
|
|
297
297
|
updated_at: integer("updated_at"),
|
|
298
|
+
/** CTC-1089 — Linear's ActionContent fields, promoted out of `raw`. An action activity carries
|
|
299
|
+
* NO `body` (write-proxy/agent-activity.ts's AgentActivityContent), so before these columns the
|
|
300
|
+
* relay's phase-start / gate / artifact / pr-opened narration reached the client as the bare word
|
|
301
|
+
* "action" with nothing after it. Same call CTC-529 made for archived_at/dismissed_at: a render
|
|
302
|
+
* that branches on a field must not json_extract it out of an opaque blob. */
|
|
303
|
+
action: text("action"),
|
|
304
|
+
parameter: text("parameter"),
|
|
305
|
+
result: text("result"),
|
|
298
306
|
raw: text("raw"),
|
|
299
307
|
},
|
|
300
308
|
(t) => [index("idx_agent_activities_session_created").on(t.session_id, t.created_at)],
|