larness 0.3.1 → 0.4.1
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/apps/server/dist/{address-Dh8XUuOk.js → address-BDs0FfMq.js} +1 -1
- package/apps/server/dist/{client-D64wZ3lt.js → client-D88ULjn9.js} +1 -1
- package/apps/server/dist/{doctor-rEr7DMMb.js → doctor-dwTQiTef.js} +1 -1
- package/apps/server/dist/doctor.js +1 -1
- package/apps/server/dist/index.js +11987 -5714
- package/apps/server/dist/{managed-nCF4mKiY.js → managed-Br7VqQiP.js} +70 -6
- package/apps/server/dist/{paths-Dds-A0kx.js → paths-DUfwiH2X.js} +641 -19
- package/apps/server/dist/{status-toJt8Dby.js → status-D2oSIMoj.js} +1 -1
- package/apps/server/dist/status.js +3 -3
- package/apps/server/dist/tui.js +4 -4
- package/apps/server/drizzle/0001_auth.sql +109 -109
- package/apps/server/drizzle/0002_projects.sql +12 -12
- package/apps/server/drizzle/0003_workspace.sql +80 -80
- package/apps/server/drizzle/0004_models.sql +30 -30
- package/apps/server/drizzle/0005_resources.sql +54 -54
- package/apps/server/drizzle/0006_commands.sql +23 -23
- package/apps/server/drizzle/0007_terminals.sql +41 -41
- package/apps/server/drizzle/0008_resource_actions.sql +23 -23
- package/apps/server/drizzle/0010_services.sql +31 -31
- package/apps/server/drizzle/0032_agent_profile.sql +1 -0
- package/apps/server/drizzle/0033_agent_profile_service_ops.sql +1 -0
- package/apps/server/drizzle/0034_agent_profile_coding_plan.sql +1 -0
- package/apps/server/drizzle/0035_session_title_source.sql +1 -0
- package/apps/server/drizzle/0036_project_memory.sql +62 -0
- package/apps/server/drizzle/0037_web_search.sql +14 -0
- package/apps/server/drizzle/0038_document_attachments.sql +16 -0
- package/apps/server/drizzle/meta/0032_snapshot.json +5169 -0
- package/apps/server/drizzle/meta/0035_snapshot.json +5177 -0
- package/apps/server/drizzle/meta/0036_snapshot.json +5576 -0
- package/apps/server/drizzle/meta/0037_snapshot.json +5667 -0
- package/apps/server/drizzle/meta/0038_snapshot.json +5776 -0
- package/apps/server/drizzle/meta/_journal.json +49 -0
- package/apps/server/package.json +10 -0
- package/apps/web/dist/assets/{FileEditor-Qgvegzha.js → FileEditor-CxzD-z_w.js} +1 -1
- package/apps/web/dist/assets/{FileViewer-DOkamgXq.js → FileViewer-4LwgwN4s.js} +1 -1
- package/apps/web/dist/assets/{cssMode-CNLukUsc.js → cssMode-BfW9rKao.js} +1 -1
- package/apps/web/dist/assets/{editor.api-BGAC2PgT.js → editor.api-D0PbFQmb.js} +1 -1
- package/apps/web/dist/assets/{freemarker2-DmzUAvZs.js → freemarker2-CUmmnP_9.js} +1 -1
- package/apps/web/dist/assets/{handlebars-CMacXF3P.js → handlebars-CV0ntFU6.js} +1 -1
- package/apps/web/dist/assets/{html-BufzDub2.js → html-lbv15ZCZ.js} +1 -1
- package/apps/web/dist/assets/{htmlMode-vSvsTicL.js → htmlMode-2S1Ml4u-.js} +1 -1
- package/apps/web/dist/assets/{index-Pz8dIHnt.js → index-Bu4wSG15.js} +2 -2
- package/apps/web/dist/assets/{javascript-CWkrvOWF.js → javascript-s1wW-h_2.js} +1 -1
- package/apps/web/dist/assets/{jsonMode-D6vtcW2h.js → jsonMode-Di8Ytqtu.js} +1 -1
- package/apps/web/dist/assets/{liquid-D5KkJyqT.js → liquid-CR28rx5y.js} +1 -1
- package/apps/web/dist/assets/{lspLanguageFeatures-DI8_dTOp.js → lspLanguageFeatures-uPJRSuKu.js} +1 -1
- package/apps/web/dist/assets/main-KzEpvsAJ.js +157 -0
- package/apps/web/dist/assets/main-ptChOROf.css +1 -0
- package/apps/web/dist/assets/{mdx-BdPaDdpH.js → mdx-B_RQg_ko.js} +1 -1
- package/apps/web/dist/assets/{monaco-EglqICVw.js → monaco-BHRE2AKp.js} +3 -3
- package/apps/web/dist/assets/{python-BrXsyyj_.js → python-DxrD-zEd.js} +1 -1
- package/apps/web/dist/assets/{razor-xmumdcGT.js → razor-BGSx-heg.js} +1 -1
- package/apps/web/dist/assets/{tsMode-CkDNjbjK.js → tsMode-CkPGnA4g.js} +1 -1
- package/apps/web/dist/assets/{typescript-BYDg93Ut.js → typescript-oJa8RtP0.js} +1 -1
- package/apps/web/dist/assets/{workers-CMKTm3o5.js → workers-BmwP04Ml.js} +1 -1
- package/apps/web/dist/assets/{xml-DLqAxpyK.js → xml-NoacuPD-.js} +1 -1
- package/apps/web/dist/assets/{yaml-Y5128Ncw.js → yaml-PU4CKcMI.js} +1 -1
- package/apps/web/dist/favicon.svg +4 -4
- package/apps/web/dist/index.html +1 -1
- package/docs/README.md +1 -0
- package/docs/guides/install.md +3 -3
- package/package.json +9 -1
- package/apps/web/dist/assets/main-D1Y-WDQ4.css +0 -1
- package/apps/web/dist/assets/main-LsqGdepC.js +0 -158
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
CREATE TABLE `terminal_leases` (
|
|
2
|
-
`terminal_id` text PRIMARY KEY NOT NULL,
|
|
3
|
-
`generation` integer DEFAULT 0 NOT NULL,
|
|
4
|
-
`owner_type` text,
|
|
5
|
-
`owner_client_session_id` text,
|
|
6
|
-
`owner_connection_id` text,
|
|
7
|
-
`owner_session_id` text,
|
|
8
|
-
`owner_turn_id` text,
|
|
9
|
-
`owner_execution_id` text,
|
|
10
|
-
`expires_at` integer DEFAULT 0 NOT NULL,
|
|
11
|
-
`heartbeat_at` integer DEFAULT 0 NOT NULL,
|
|
12
|
-
`input_sequence` integer DEFAULT 0 NOT NULL,
|
|
13
|
-
FOREIGN KEY (`terminal_id`) REFERENCES `terminals`(`id`) ON UPDATE no action ON DELETE no action
|
|
14
|
-
);
|
|
15
|
-
--> statement-breakpoint
|
|
16
|
-
CREATE TABLE `terminals` (
|
|
17
|
-
`id` text PRIMARY KEY NOT NULL,
|
|
18
|
-
`operation_id` text NOT NULL,
|
|
19
|
-
`project_id` text,
|
|
20
|
-
`workspace_session_id` text,
|
|
21
|
-
`source_session_id` text,
|
|
22
|
-
`cwd` text NOT NULL,
|
|
23
|
-
`shell` text NOT NULL,
|
|
24
|
-
`mode` text NOT NULL,
|
|
25
|
-
`role` text,
|
|
26
|
-
`launch_params_json` text,
|
|
27
|
-
`launch_params_hash` text,
|
|
28
|
-
`created_by_turn_id` text,
|
|
29
|
-
`status` text NOT NULL,
|
|
30
|
-
`process_identity_json` text,
|
|
31
|
-
`reason_code` text,
|
|
32
|
-
`output_cursor` integer DEFAULT 0 NOT NULL,
|
|
33
|
-
`created_at` integer NOT NULL,
|
|
34
|
-
`started_at` integer,
|
|
35
|
-
`ended_at` integer,
|
|
36
|
-
`exit_code` integer,
|
|
37
|
-
FOREIGN KEY (`operation_id`) REFERENCES `resource_operations`(`id`) ON UPDATE no action ON DELETE no action
|
|
38
|
-
);
|
|
39
|
-
--> statement-breakpoint
|
|
40
|
-
CREATE UNIQUE INDEX `terminals_operation` ON `terminals` (`operation_id`);--> statement-breakpoint
|
|
41
|
-
CREATE INDEX `terminals_status` ON `terminals` (`status`);--> statement-breakpoint
|
|
1
|
+
CREATE TABLE `terminal_leases` (
|
|
2
|
+
`terminal_id` text PRIMARY KEY NOT NULL,
|
|
3
|
+
`generation` integer DEFAULT 0 NOT NULL,
|
|
4
|
+
`owner_type` text,
|
|
5
|
+
`owner_client_session_id` text,
|
|
6
|
+
`owner_connection_id` text,
|
|
7
|
+
`owner_session_id` text,
|
|
8
|
+
`owner_turn_id` text,
|
|
9
|
+
`owner_execution_id` text,
|
|
10
|
+
`expires_at` integer DEFAULT 0 NOT NULL,
|
|
11
|
+
`heartbeat_at` integer DEFAULT 0 NOT NULL,
|
|
12
|
+
`input_sequence` integer DEFAULT 0 NOT NULL,
|
|
13
|
+
FOREIGN KEY (`terminal_id`) REFERENCES `terminals`(`id`) ON UPDATE no action ON DELETE no action
|
|
14
|
+
);
|
|
15
|
+
--> statement-breakpoint
|
|
16
|
+
CREATE TABLE `terminals` (
|
|
17
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
18
|
+
`operation_id` text NOT NULL,
|
|
19
|
+
`project_id` text,
|
|
20
|
+
`workspace_session_id` text,
|
|
21
|
+
`source_session_id` text,
|
|
22
|
+
`cwd` text NOT NULL,
|
|
23
|
+
`shell` text NOT NULL,
|
|
24
|
+
`mode` text NOT NULL,
|
|
25
|
+
`role` text,
|
|
26
|
+
`launch_params_json` text,
|
|
27
|
+
`launch_params_hash` text,
|
|
28
|
+
`created_by_turn_id` text,
|
|
29
|
+
`status` text NOT NULL,
|
|
30
|
+
`process_identity_json` text,
|
|
31
|
+
`reason_code` text,
|
|
32
|
+
`output_cursor` integer DEFAULT 0 NOT NULL,
|
|
33
|
+
`created_at` integer NOT NULL,
|
|
34
|
+
`started_at` integer,
|
|
35
|
+
`ended_at` integer,
|
|
36
|
+
`exit_code` integer,
|
|
37
|
+
FOREIGN KEY (`operation_id`) REFERENCES `resource_operations`(`id`) ON UPDATE no action ON DELETE no action
|
|
38
|
+
);
|
|
39
|
+
--> statement-breakpoint
|
|
40
|
+
CREATE UNIQUE INDEX `terminals_operation` ON `terminals` (`operation_id`);--> statement-breakpoint
|
|
41
|
+
CREATE INDEX `terminals_status` ON `terminals` (`status`);--> statement-breakpoint
|
|
42
42
|
CREATE UNIQUE INDEX `terminals_active_role` ON `terminals` (`project_id`,`role`) WHERE "terminals"."mode" = 'dev' AND "terminals"."status" IN ('CREATED', 'RUNNING', 'STOPPING');
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
CREATE TABLE `resource_actions` (
|
|
2
|
-
`id` text PRIMARY KEY NOT NULL,
|
|
3
|
-
`operation_id` text NOT NULL,
|
|
4
|
-
`project_id` text NOT NULL,
|
|
5
|
-
`kind` text NOT NULL,
|
|
6
|
-
`risk` text NOT NULL,
|
|
7
|
-
`status` text NOT NULL,
|
|
8
|
-
`params_json` text NOT NULL,
|
|
9
|
-
`params_hash` text NOT NULL,
|
|
10
|
-
`snapshot_hash` text NOT NULL,
|
|
11
|
-
`requested_by` text NOT NULL,
|
|
12
|
-
`decided_by` text,
|
|
13
|
-
`expires_at` integer NOT NULL,
|
|
14
|
-
`decided_at` integer,
|
|
15
|
-
`started_at` integer,
|
|
16
|
-
`ended_at` integer,
|
|
17
|
-
`result_json` text,
|
|
18
|
-
`created_at` integer NOT NULL,
|
|
19
|
-
FOREIGN KEY (`operation_id`) REFERENCES `resource_operations`(`id`) ON UPDATE no action ON DELETE no action,
|
|
20
|
-
FOREIGN KEY (`project_id`) REFERENCES `projects`(`id`) ON UPDATE no action ON DELETE no action
|
|
21
|
-
);
|
|
22
|
-
--> statement-breakpoint
|
|
23
|
-
CREATE UNIQUE INDEX `resource_actions_operation` ON `resource_actions` (`operation_id`);--> statement-breakpoint
|
|
1
|
+
CREATE TABLE `resource_actions` (
|
|
2
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
3
|
+
`operation_id` text NOT NULL,
|
|
4
|
+
`project_id` text NOT NULL,
|
|
5
|
+
`kind` text NOT NULL,
|
|
6
|
+
`risk` text NOT NULL,
|
|
7
|
+
`status` text NOT NULL,
|
|
8
|
+
`params_json` text NOT NULL,
|
|
9
|
+
`params_hash` text NOT NULL,
|
|
10
|
+
`snapshot_hash` text NOT NULL,
|
|
11
|
+
`requested_by` text NOT NULL,
|
|
12
|
+
`decided_by` text,
|
|
13
|
+
`expires_at` integer NOT NULL,
|
|
14
|
+
`decided_at` integer,
|
|
15
|
+
`started_at` integer,
|
|
16
|
+
`ended_at` integer,
|
|
17
|
+
`result_json` text,
|
|
18
|
+
`created_at` integer NOT NULL,
|
|
19
|
+
FOREIGN KEY (`operation_id`) REFERENCES `resource_operations`(`id`) ON UPDATE no action ON DELETE no action,
|
|
20
|
+
FOREIGN KEY (`project_id`) REFERENCES `projects`(`id`) ON UPDATE no action ON DELETE no action
|
|
21
|
+
);
|
|
22
|
+
--> statement-breakpoint
|
|
23
|
+
CREATE UNIQUE INDEX `resource_actions_operation` ON `resource_actions` (`operation_id`);--> statement-breakpoint
|
|
24
24
|
CREATE INDEX `resource_actions_project_status` ON `resource_actions` (`project_id`,`status`);
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
CREATE TABLE `services` (
|
|
2
|
-
`id` text PRIMARY KEY NOT NULL,
|
|
3
|
-
`operation_id` text NOT NULL,
|
|
4
|
-
`project_id` text NOT NULL,
|
|
5
|
-
`source_session_id` text,
|
|
6
|
-
`terminal_id` text NOT NULL,
|
|
7
|
-
`name` text NOT NULL,
|
|
8
|
-
`kind` text NOT NULL,
|
|
9
|
-
`status` text NOT NULL,
|
|
10
|
-
`terminal_execution_id` text NOT NULL,
|
|
11
|
-
`endpoint_generation` integer NOT NULL,
|
|
12
|
-
`endpoint_host` text NOT NULL,
|
|
13
|
-
`endpoint_port` integer NOT NULL,
|
|
14
|
-
`endpoint_protocol` text NOT NULL,
|
|
15
|
-
`identity_json` text NOT NULL,
|
|
16
|
-
`reason_code` text,
|
|
17
|
-
`created_at` integer NOT NULL,
|
|
18
|
-
`updated_at` integer NOT NULL,
|
|
19
|
-
`ended_at` integer,
|
|
20
|
-
FOREIGN KEY (`operation_id`) REFERENCES `resource_operations`(`id`) ON UPDATE no action ON DELETE no action,
|
|
21
|
-
FOREIGN KEY (`project_id`) REFERENCES `projects`(`id`) ON UPDATE no action ON DELETE no action,
|
|
22
|
-
FOREIGN KEY (`terminal_id`) REFERENCES `terminals`(`id`) ON UPDATE no action ON DELETE no action,
|
|
23
|
-
CONSTRAINT "services_status" CHECK("services"."status" IN ('REGISTERING', 'STARTING', 'RUNNING', 'UNKNOWN', 'UNREGISTERED')),
|
|
24
|
-
CONSTRAINT "services_host" CHECK("services"."endpoint_host" IN ('127.0.0.1', '::1')),
|
|
25
|
-
CONSTRAINT "services_port" CHECK("services"."endpoint_port" BETWEEN 1 AND 65535),
|
|
26
|
-
CONSTRAINT "services_protocol" CHECK("services"."endpoint_protocol" = 'http')
|
|
27
|
-
);
|
|
28
|
-
--> statement-breakpoint
|
|
29
|
-
CREATE UNIQUE INDEX `services_operation` ON `services` (`operation_id`);--> statement-breakpoint
|
|
30
|
-
CREATE INDEX `services_project_status` ON `services` (`project_id`,`status`);--> statement-breakpoint
|
|
31
|
-
CREATE INDEX `services_terminal` ON `services` (`terminal_id`);--> statement-breakpoint
|
|
1
|
+
CREATE TABLE `services` (
|
|
2
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
3
|
+
`operation_id` text NOT NULL,
|
|
4
|
+
`project_id` text NOT NULL,
|
|
5
|
+
`source_session_id` text,
|
|
6
|
+
`terminal_id` text NOT NULL,
|
|
7
|
+
`name` text NOT NULL,
|
|
8
|
+
`kind` text NOT NULL,
|
|
9
|
+
`status` text NOT NULL,
|
|
10
|
+
`terminal_execution_id` text NOT NULL,
|
|
11
|
+
`endpoint_generation` integer NOT NULL,
|
|
12
|
+
`endpoint_host` text NOT NULL,
|
|
13
|
+
`endpoint_port` integer NOT NULL,
|
|
14
|
+
`endpoint_protocol` text NOT NULL,
|
|
15
|
+
`identity_json` text NOT NULL,
|
|
16
|
+
`reason_code` text,
|
|
17
|
+
`created_at` integer NOT NULL,
|
|
18
|
+
`updated_at` integer NOT NULL,
|
|
19
|
+
`ended_at` integer,
|
|
20
|
+
FOREIGN KEY (`operation_id`) REFERENCES `resource_operations`(`id`) ON UPDATE no action ON DELETE no action,
|
|
21
|
+
FOREIGN KEY (`project_id`) REFERENCES `projects`(`id`) ON UPDATE no action ON DELETE no action,
|
|
22
|
+
FOREIGN KEY (`terminal_id`) REFERENCES `terminals`(`id`) ON UPDATE no action ON DELETE no action,
|
|
23
|
+
CONSTRAINT "services_status" CHECK("services"."status" IN ('REGISTERING', 'STARTING', 'RUNNING', 'UNKNOWN', 'UNREGISTERED')),
|
|
24
|
+
CONSTRAINT "services_host" CHECK("services"."endpoint_host" IN ('127.0.0.1', '::1')),
|
|
25
|
+
CONSTRAINT "services_port" CHECK("services"."endpoint_port" BETWEEN 1 AND 65535),
|
|
26
|
+
CONSTRAINT "services_protocol" CHECK("services"."endpoint_protocol" = 'http')
|
|
27
|
+
);
|
|
28
|
+
--> statement-breakpoint
|
|
29
|
+
CREATE UNIQUE INDEX `services_operation` ON `services` (`operation_id`);--> statement-breakpoint
|
|
30
|
+
CREATE INDEX `services_project_status` ON `services` (`project_id`,`status`);--> statement-breakpoint
|
|
31
|
+
CREATE INDEX `services_terminal` ON `services` (`terminal_id`);--> statement-breakpoint
|
|
32
32
|
CREATE UNIQUE INDEX `services_active_endpoint` ON `services` (`terminal_id`,`endpoint_host`,`endpoint_port`) WHERE "services"."status" IN ('REGISTERING', 'STARTING', 'RUNNING');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ALTER TABLE `sessions` ADD `agent_profile` text DEFAULT 'coding' NOT NULL;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
UPDATE `sessions` SET `agent_profile` = 'service-ops' WHERE `agent_profile` = 'workspace';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
UPDATE `sessions` SET `agent_profile` = 'coding' WHERE `agent_profile` = 'service-ops';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ALTER TABLE `sessions` ADD `title_source` text DEFAULT 'user' NOT NULL;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
CREATE TABLE `memories` (
|
|
2
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
3
|
+
`scope` text NOT NULL,
|
|
4
|
+
`project_id` text,
|
|
5
|
+
`project_key` text NOT NULL,
|
|
6
|
+
`kind` text NOT NULL,
|
|
7
|
+
`key` text NOT NULL,
|
|
8
|
+
`title` text NOT NULL,
|
|
9
|
+
`body` text NOT NULL,
|
|
10
|
+
`status` text NOT NULL,
|
|
11
|
+
`confidence` real NOT NULL,
|
|
12
|
+
`evidence_kind` text NOT NULL,
|
|
13
|
+
`source_turn_id` text,
|
|
14
|
+
`source_event_seq` integer,
|
|
15
|
+
`created_by` text NOT NULL,
|
|
16
|
+
`use_count` integer DEFAULT 0 NOT NULL,
|
|
17
|
+
`last_used_at` integer,
|
|
18
|
+
`last_confirmed_at` integer,
|
|
19
|
+
`correction_count` integer DEFAULT 0 NOT NULL,
|
|
20
|
+
`pinned` integer DEFAULT false NOT NULL,
|
|
21
|
+
`bytes` integer NOT NULL,
|
|
22
|
+
`verified_at` integer,
|
|
23
|
+
`expires_at` integer,
|
|
24
|
+
`created_at` integer NOT NULL,
|
|
25
|
+
`updated_at` integer NOT NULL,
|
|
26
|
+
FOREIGN KEY (`project_id`) REFERENCES `projects`(`id`) ON UPDATE no action ON DELETE cascade,
|
|
27
|
+
CONSTRAINT "memories_scope_check" CHECK(("memories"."scope" = 'global' AND "memories"."project_id" IS NULL AND "memories"."kind" = 'preference') OR ("memories"."scope" = 'project' AND "memories"."project_id" IS NOT NULL))
|
|
28
|
+
);
|
|
29
|
+
--> statement-breakpoint
|
|
30
|
+
CREATE UNIQUE INDEX `memories_active_key_unique` ON `memories` (`scope`,`project_key`,`key`) WHERE "memories"."status" = 'active';--> statement-breakpoint
|
|
31
|
+
CREATE INDEX `idx_memories_scope_project_status` ON `memories` (`scope`,`project_id`,`status`);--> statement-breakpoint
|
|
32
|
+
CREATE INDEX `idx_memories_expires` ON `memories` (`expires_at`);--> statement-breakpoint
|
|
33
|
+
CREATE TABLE `memory_revisions` (
|
|
34
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
35
|
+
`memory_id` text NOT NULL,
|
|
36
|
+
`revision` integer NOT NULL,
|
|
37
|
+
`title` text NOT NULL,
|
|
38
|
+
`body` text NOT NULL,
|
|
39
|
+
`status` text NOT NULL,
|
|
40
|
+
`changed_by` text NOT NULL,
|
|
41
|
+
`changed_at` integer NOT NULL,
|
|
42
|
+
`reason` text,
|
|
43
|
+
FOREIGN KEY (`memory_id`) REFERENCES `memories`(`id`) ON UPDATE no action ON DELETE cascade
|
|
44
|
+
);
|
|
45
|
+
--> statement-breakpoint
|
|
46
|
+
CREATE UNIQUE INDEX `memory_revisions_unique` ON `memory_revisions` (`memory_id`,`revision`);--> statement-breakpoint
|
|
47
|
+
CREATE INDEX `idx_memory_revisions_memory` ON `memory_revisions` (`memory_id`,`changed_at`);--> statement-breakpoint
|
|
48
|
+
CREATE TABLE `memory_suppressions` (
|
|
49
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
50
|
+
`scope` text NOT NULL,
|
|
51
|
+
`project_id` text,
|
|
52
|
+
`project_key` text NOT NULL,
|
|
53
|
+
`key` text NOT NULL,
|
|
54
|
+
`body_hash` text NOT NULL,
|
|
55
|
+
`created_at` integer NOT NULL,
|
|
56
|
+
`expires_at` integer NOT NULL,
|
|
57
|
+
FOREIGN KEY (`project_id`) REFERENCES `projects`(`id`) ON UPDATE no action ON DELETE cascade,
|
|
58
|
+
CONSTRAINT "memory_suppressions_scope_check" CHECK(("memory_suppressions"."scope" = 'global' AND "memory_suppressions"."project_id" IS NULL) OR ("memory_suppressions"."scope" = 'project' AND "memory_suppressions"."project_id" IS NOT NULL))
|
|
59
|
+
);
|
|
60
|
+
--> statement-breakpoint
|
|
61
|
+
CREATE UNIQUE INDEX `memory_suppressions_key_unique` ON `memory_suppressions` (`scope`,`project_key`,`key`);--> statement-breakpoint
|
|
62
|
+
CREATE INDEX `idx_memory_suppressions_expiry` ON `memory_suppressions` (`expires_at`);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
CREATE TABLE `web_search_connections` (
|
|
2
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
3
|
+
`provider` text NOT NULL,
|
|
4
|
+
`label` text NOT NULL,
|
|
5
|
+
`region` text,
|
|
6
|
+
`endpoint` text NOT NULL,
|
|
7
|
+
`secret_ref` text NOT NULL,
|
|
8
|
+
`created_at` integer NOT NULL,
|
|
9
|
+
FOREIGN KEY (`secret_ref`) REFERENCES `secrets`(`id`) ON UPDATE no action ON DELETE cascade
|
|
10
|
+
);
|
|
11
|
+
--> statement-breakpoint
|
|
12
|
+
CREATE INDEX `idx_web_search_connections_provider` ON `web_search_connections` (`provider`);--> statement-breakpoint
|
|
13
|
+
ALTER TABLE `sessions` ADD `web_search_enabled` integer DEFAULT false NOT NULL;--> statement-breakpoint
|
|
14
|
+
ALTER TABLE `turns` ADD `web_search_enabled` integer DEFAULT false NOT NULL;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
ALTER TABLE `session_attachments` ADD `filename` text DEFAULT 'screenshot' NOT NULL;--> statement-breakpoint
|
|
2
|
+
ALTER TABLE `session_attachments` ADD `kind` text DEFAULT 'image' NOT NULL;--> statement-breakpoint
|
|
3
|
+
ALTER TABLE `session_attachments` ADD `size_bytes` integer DEFAULT 0 NOT NULL;--> statement-breakpoint
|
|
4
|
+
ALTER TABLE `session_attachments` ADD `storage_path` text;--> statement-breakpoint
|
|
5
|
+
ALTER TABLE `session_attachments` ADD `status` text DEFAULT 'ready' NOT NULL;--> statement-breakpoint
|
|
6
|
+
ALTER TABLE `session_attachments` ADD `method` text DEFAULT 'none' NOT NULL;--> statement-breakpoint
|
|
7
|
+
ALTER TABLE `session_attachments` ADD `page_count` integer;--> statement-breakpoint
|
|
8
|
+
ALTER TABLE `session_attachments` ADD `token_count` integer DEFAULT 0 NOT NULL;--> statement-breakpoint
|
|
9
|
+
ALTER TABLE `session_attachments` ADD `sections_json` text;--> statement-breakpoint
|
|
10
|
+
ALTER TABLE `session_attachments` ADD `warnings_json` text;--> statement-breakpoint
|
|
11
|
+
ALTER TABLE `session_attachments` ADD `extractor_id` text;--> statement-breakpoint
|
|
12
|
+
ALTER TABLE `session_attachments` ADD `extractor_version` text;--> statement-breakpoint
|
|
13
|
+
ALTER TABLE `session_attachments` ADD `extracted_at` integer;--> statement-breakpoint
|
|
14
|
+
ALTER TABLE `session_attachments` ADD `error_code` text;--> statement-breakpoint
|
|
15
|
+
UPDATE `session_attachments` SET `size_bytes` = length(`bytes`) WHERE `size_bytes` = 0;--> statement-breakpoint
|
|
16
|
+
CREATE INDEX `idx_session_attachments_session_created` ON `session_attachments` (`session_id`,`created_at`);
|