@cleocode/cleo 2026.4.67 → 2026.4.69
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/dist/cli/index.js +641 -220
- package/dist/cli/index.js.map +4 -4
- package/migrations/drizzle-brain/20260321000001_t033-brain-indexes/migration.sql +12 -0
- package/migrations/drizzle-brain/20260321000001_t033-brain-indexes/snapshot.json +1232 -0
- package/migrations/drizzle-brain/20260408000001_t417-agent-field/migration.sql +13 -0
- package/migrations/drizzle-brain/20260408000001_t417-agent-field/snapshot.json +28 -0
- package/migrations/drizzle-brain/20260411000001_t528-graph-schema-expansion/migration.sql +47 -0
- package/migrations/drizzle-brain/20260412000001_t531-quality-score-typed-tables/migration.sql +23 -0
- package/migrations/drizzle-brain/20260413000001_t549-tiered-typed-memory/migration.sql +195 -0
- package/migrations/drizzle-brain/20260415000001_t626-normalize-co-retrieved-edge-type/migration.sql +14 -0
- package/migrations/drizzle-brain/20260416000001_t673-retrieval-log-plasticity-columns/migration.sql +57 -0
- package/migrations/drizzle-brain/20260416000002_t673-plasticity-events-expand/migration.sql +44 -0
- package/migrations/drizzle-brain/20260416000003_t673-page-edges-plasticity-columns/migration.sql +44 -0
- package/migrations/drizzle-brain/20260416000004_t673-new-plasticity-tables/migration.sql +73 -0
- package/migrations/drizzle-brain/20260416000005_t726-dedup-tier-columns/migration.sql +77 -0
- package/migrations/drizzle-nexus/20260412000001_t529-nexus-graph-tables/migration.sql +49 -0
- package/migrations/drizzle-nexus/20260415000001_t622-project-registry-paths/migration.sql +12 -0
- package/migrations/drizzle-tasks/20260320013731_wave0-schema-hardening/migration.sql +84 -0
- package/migrations/drizzle-tasks/20260320013731_wave0-schema-hardening/snapshot.json +4060 -0
- package/migrations/drizzle-tasks/20260320020000_agent-dimension/migration.sql +35 -0
- package/migrations/drizzle-tasks/20260320020000_agent-dimension/snapshot.json +4312 -0
- package/migrations/drizzle-tasks/20260321000000_t033-connection-health/migration.sql +518 -0
- package/migrations/drizzle-tasks/20260321000000_t033-connection-health/snapshot.json +4312 -0
- package/migrations/drizzle-tasks/20260321000002_t060-pipeline-stage-binding/migration.sql +82 -0
- package/migrations/drizzle-tasks/20260321000002_t060-pipeline-stage-binding/snapshot.json +9 -0
- package/migrations/drizzle-tasks/20260324000000_assignee-column/migration.sql +6 -0
- package/migrations/drizzle-tasks/20260324000000_assignee-column/snapshot.json +9 -0
- package/migrations/drizzle-tasks/20260327000000_agent-credentials/migration.sql +23 -0
- package/package.json +8 -8
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
CREATE TABLE IF NOT EXISTS `nexus_nodes` (
|
|
2
|
+
`id` text PRIMARY KEY,
|
|
3
|
+
`project_id` text NOT NULL,
|
|
4
|
+
`kind` text NOT NULL,
|
|
5
|
+
`label` text NOT NULL,
|
|
6
|
+
`name` text,
|
|
7
|
+
`file_path` text,
|
|
8
|
+
`start_line` integer,
|
|
9
|
+
`end_line` integer,
|
|
10
|
+
`language` text,
|
|
11
|
+
`is_exported` integer DEFAULT false NOT NULL,
|
|
12
|
+
`parent_id` text,
|
|
13
|
+
`parameters_json` text,
|
|
14
|
+
`return_type` text,
|
|
15
|
+
`doc_summary` text,
|
|
16
|
+
`community_id` text,
|
|
17
|
+
`meta_json` text,
|
|
18
|
+
`indexed_at` text DEFAULT (datetime('now')) NOT NULL
|
|
19
|
+
);
|
|
20
|
+
--> statement-breakpoint
|
|
21
|
+
CREATE TABLE IF NOT EXISTS `nexus_relations` (
|
|
22
|
+
`id` text PRIMARY KEY,
|
|
23
|
+
`project_id` text NOT NULL,
|
|
24
|
+
`source_id` text NOT NULL,
|
|
25
|
+
`target_id` text NOT NULL,
|
|
26
|
+
`type` text NOT NULL,
|
|
27
|
+
`confidence` real NOT NULL,
|
|
28
|
+
`reason` text,
|
|
29
|
+
`step` integer,
|
|
30
|
+
`indexed_at` text DEFAULT (datetime('now')) NOT NULL
|
|
31
|
+
);
|
|
32
|
+
--> statement-breakpoint
|
|
33
|
+
CREATE INDEX IF NOT EXISTS `idx_nexus_nodes_project` ON `nexus_nodes` (`project_id`);--> statement-breakpoint
|
|
34
|
+
CREATE INDEX IF NOT EXISTS `idx_nexus_nodes_kind` ON `nexus_nodes` (`kind`);--> statement-breakpoint
|
|
35
|
+
CREATE INDEX IF NOT EXISTS `idx_nexus_nodes_file` ON `nexus_nodes` (`file_path`);--> statement-breakpoint
|
|
36
|
+
CREATE INDEX IF NOT EXISTS `idx_nexus_nodes_name` ON `nexus_nodes` (`name`);--> statement-breakpoint
|
|
37
|
+
CREATE INDEX IF NOT EXISTS `idx_nexus_nodes_project_kind` ON `nexus_nodes` (`project_id`,`kind`);--> statement-breakpoint
|
|
38
|
+
CREATE INDEX IF NOT EXISTS `idx_nexus_nodes_project_file` ON `nexus_nodes` (`project_id`,`file_path`);--> statement-breakpoint
|
|
39
|
+
CREATE INDEX IF NOT EXISTS `idx_nexus_nodes_community` ON `nexus_nodes` (`community_id`);--> statement-breakpoint
|
|
40
|
+
CREATE INDEX IF NOT EXISTS `idx_nexus_nodes_parent` ON `nexus_nodes` (`parent_id`);--> statement-breakpoint
|
|
41
|
+
CREATE INDEX IF NOT EXISTS `idx_nexus_nodes_exported` ON `nexus_nodes` (`is_exported`);--> statement-breakpoint
|
|
42
|
+
CREATE INDEX IF NOT EXISTS `idx_nexus_relations_project` ON `nexus_relations` (`project_id`);--> statement-breakpoint
|
|
43
|
+
CREATE INDEX IF NOT EXISTS `idx_nexus_relations_source` ON `nexus_relations` (`source_id`);--> statement-breakpoint
|
|
44
|
+
CREATE INDEX IF NOT EXISTS `idx_nexus_relations_target` ON `nexus_relations` (`target_id`);--> statement-breakpoint
|
|
45
|
+
CREATE INDEX IF NOT EXISTS `idx_nexus_relations_type` ON `nexus_relations` (`type`);--> statement-breakpoint
|
|
46
|
+
CREATE INDEX IF NOT EXISTS `idx_nexus_relations_project_type` ON `nexus_relations` (`project_id`,`type`);--> statement-breakpoint
|
|
47
|
+
CREATE INDEX IF NOT EXISTS `idx_nexus_relations_source_type` ON `nexus_relations` (`source_id`,`type`);--> statement-breakpoint
|
|
48
|
+
CREATE INDEX IF NOT EXISTS `idx_nexus_relations_target_type` ON `nexus_relations` (`target_id`,`type`);--> statement-breakpoint
|
|
49
|
+
CREATE INDEX IF NOT EXISTS `idx_nexus_relations_confidence` ON `nexus_relations` (`confidence`);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
-- T622: Multi-Project Registry — add brain_db_path, tasks_db_path, last_indexed, stats_json
|
|
2
|
+
-- to project_registry so Studio can switch between project contexts and display per-project stats.
|
|
3
|
+
|
|
4
|
+
ALTER TABLE `project_registry` ADD COLUMN `brain_db_path` text;
|
|
5
|
+
--> statement-breakpoint
|
|
6
|
+
ALTER TABLE `project_registry` ADD COLUMN `tasks_db_path` text;
|
|
7
|
+
--> statement-breakpoint
|
|
8
|
+
ALTER TABLE `project_registry` ADD COLUMN `last_indexed` text;
|
|
9
|
+
--> statement-breakpoint
|
|
10
|
+
ALTER TABLE `project_registry` ADD COLUMN `stats_json` text DEFAULT '{}' NOT NULL;
|
|
11
|
+
--> statement-breakpoint
|
|
12
|
+
CREATE INDEX IF NOT EXISTS `idx_project_registry_last_indexed` ON `project_registry` (`last_indexed`);
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
CREATE TABLE IF NOT EXISTS `external_task_links` (
|
|
2
|
+
`id` text PRIMARY KEY,
|
|
3
|
+
`task_id` text NOT NULL,
|
|
4
|
+
`provider_id` text NOT NULL,
|
|
5
|
+
`external_id` text NOT NULL,
|
|
6
|
+
`external_url` text,
|
|
7
|
+
`external_title` text,
|
|
8
|
+
`link_type` text NOT NULL,
|
|
9
|
+
`sync_direction` text DEFAULT 'inbound' NOT NULL,
|
|
10
|
+
`metadata_json` text DEFAULT '{}',
|
|
11
|
+
`linked_at` text DEFAULT (datetime('now')) NOT NULL,
|
|
12
|
+
`last_sync_at` text,
|
|
13
|
+
CONSTRAINT `fk_external_task_links_task_id_tasks_id_fk` FOREIGN KEY (`task_id`) REFERENCES `tasks`(`id`) ON DELETE CASCADE,
|
|
14
|
+
CONSTRAINT `uq_ext_links_task_provider_external` UNIQUE(`task_id`,`provider_id`,`external_id`)
|
|
15
|
+
);
|
|
16
|
+
--> statement-breakpoint
|
|
17
|
+
PRAGMA foreign_keys=OFF;--> statement-breakpoint
|
|
18
|
+
CREATE TABLE `__new_sessions` (
|
|
19
|
+
`id` text PRIMARY KEY,
|
|
20
|
+
`name` text NOT NULL,
|
|
21
|
+
`status` text DEFAULT 'active' NOT NULL,
|
|
22
|
+
`scope_json` text DEFAULT '{}' NOT NULL,
|
|
23
|
+
`current_task` text,
|
|
24
|
+
`task_started_at` text,
|
|
25
|
+
`agent` text,
|
|
26
|
+
`notes_json` text DEFAULT '[]',
|
|
27
|
+
`tasks_completed_json` text DEFAULT '[]',
|
|
28
|
+
`tasks_created_json` text DEFAULT '[]',
|
|
29
|
+
`handoff_json` text,
|
|
30
|
+
`started_at` text DEFAULT (datetime('now')) NOT NULL,
|
|
31
|
+
`ended_at` text,
|
|
32
|
+
`previous_session_id` text,
|
|
33
|
+
`next_session_id` text,
|
|
34
|
+
`agent_identifier` text,
|
|
35
|
+
`handoff_consumed_at` text,
|
|
36
|
+
`handoff_consumed_by` text,
|
|
37
|
+
`debrief_json` text,
|
|
38
|
+
`provider_id` text,
|
|
39
|
+
`stats_json` text,
|
|
40
|
+
`resume_count` integer,
|
|
41
|
+
`grade_mode` integer,
|
|
42
|
+
CONSTRAINT `fk_sessions_previous_session_id_sessions_id_fk` FOREIGN KEY (`previous_session_id`) REFERENCES `sessions`(`id`) ON DELETE SET NULL,
|
|
43
|
+
CONSTRAINT `fk_sessions_next_session_id_sessions_id_fk` FOREIGN KEY (`next_session_id`) REFERENCES `sessions`(`id`) ON DELETE SET NULL
|
|
44
|
+
);
|
|
45
|
+
--> statement-breakpoint
|
|
46
|
+
INSERT INTO `__new_sessions`(`id`, `name`, `status`, `scope_json`, `current_task`, `task_started_at`, `agent`, `notes_json`, `tasks_completed_json`, `tasks_created_json`, `handoff_json`, `started_at`, `ended_at`, `previous_session_id`, `next_session_id`, `agent_identifier`, `handoff_consumed_at`, `handoff_consumed_by`, `debrief_json`, `provider_id`, `stats_json`, `resume_count`, `grade_mode`) SELECT `id`, `name`, `status`, `scope_json`, `current_task`, `task_started_at`, `agent`, `notes_json`, `tasks_completed_json`, `tasks_created_json`, `handoff_json`, `started_at`, `ended_at`, `previous_session_id`, `next_session_id`, `agent_identifier`, `handoff_consumed_at`, `handoff_consumed_by`, `debrief_json`, `provider_id`, `stats_json`, `resume_count`, `grade_mode` FROM `sessions`;--> statement-breakpoint
|
|
47
|
+
DROP TABLE `sessions`;--> statement-breakpoint
|
|
48
|
+
ALTER TABLE `__new_sessions` RENAME TO `sessions`;--> statement-breakpoint
|
|
49
|
+
PRAGMA foreign_keys=ON;--> statement-breakpoint
|
|
50
|
+
PRAGMA foreign_keys=OFF;--> statement-breakpoint
|
|
51
|
+
CREATE TABLE `__new_warp_chain_instances` (
|
|
52
|
+
`id` text PRIMARY KEY,
|
|
53
|
+
`chain_id` text NOT NULL,
|
|
54
|
+
`epic_id` text NOT NULL,
|
|
55
|
+
`variables` text,
|
|
56
|
+
`stage_to_task` text,
|
|
57
|
+
`status` text DEFAULT 'pending' NOT NULL,
|
|
58
|
+
`current_stage` text,
|
|
59
|
+
`gate_results` text,
|
|
60
|
+
`created_at` text DEFAULT (datetime('now')),
|
|
61
|
+
`updated_at` text DEFAULT (datetime('now')),
|
|
62
|
+
CONSTRAINT `fk_warp_chain_instances_chain_id_warp_chains_id_fk` FOREIGN KEY (`chain_id`) REFERENCES `warp_chains`(`id`) ON DELETE CASCADE
|
|
63
|
+
);
|
|
64
|
+
--> statement-breakpoint
|
|
65
|
+
INSERT INTO `__new_warp_chain_instances`(`id`, `chain_id`, `epic_id`, `variables`, `stage_to_task`, `status`, `current_stage`, `gate_results`, `created_at`, `updated_at`) SELECT `id`, `chain_id`, `epic_id`, `variables`, `stage_to_task`, `status`, `current_stage`, `gate_results`, `created_at`, `updated_at` FROM `warp_chain_instances`;--> statement-breakpoint
|
|
66
|
+
DROP TABLE `warp_chain_instances`;--> statement-breakpoint
|
|
67
|
+
ALTER TABLE `__new_warp_chain_instances` RENAME TO `warp_chain_instances`;--> statement-breakpoint
|
|
68
|
+
PRAGMA foreign_keys=ON;--> statement-breakpoint
|
|
69
|
+
CREATE INDEX IF NOT EXISTS `idx_sessions_status` ON `sessions` (`status`);--> statement-breakpoint
|
|
70
|
+
CREATE INDEX IF NOT EXISTS `idx_sessions_previous` ON `sessions` (`previous_session_id`);--> statement-breakpoint
|
|
71
|
+
CREATE INDEX IF NOT EXISTS `idx_sessions_agent_identifier` ON `sessions` (`agent_identifier`);--> statement-breakpoint
|
|
72
|
+
CREATE INDEX IF NOT EXISTS `idx_sessions_started_at` ON `sessions` (`started_at`);--> statement-breakpoint
|
|
73
|
+
CREATE INDEX IF NOT EXISTS `idx_warp_instances_chain` ON `warp_chain_instances` (`chain_id`);--> statement-breakpoint
|
|
74
|
+
CREATE INDEX IF NOT EXISTS `idx_warp_instances_epic` ON `warp_chain_instances` (`epic_id`);--> statement-breakpoint
|
|
75
|
+
CREATE INDEX IF NOT EXISTS `idx_warp_instances_status` ON `warp_chain_instances` (`status`);--> statement-breakpoint
|
|
76
|
+
CREATE INDEX IF NOT EXISTS `idx_arch_decisions_amends_id` ON `architecture_decisions` (`amends_id`);--> statement-breakpoint
|
|
77
|
+
CREATE INDEX IF NOT EXISTS `idx_audit_log_actor` ON `audit_log` (`actor`);--> statement-breakpoint
|
|
78
|
+
CREATE INDEX IF NOT EXISTS `idx_ext_links_task_id` ON `external_task_links` (`task_id`);--> statement-breakpoint
|
|
79
|
+
CREATE INDEX IF NOT EXISTS `idx_ext_links_provider_external` ON `external_task_links` (`provider_id`,`external_id`);--> statement-breakpoint
|
|
80
|
+
CREATE INDEX IF NOT EXISTS `idx_ext_links_provider_id` ON `external_task_links` (`provider_id`);--> statement-breakpoint
|
|
81
|
+
CREATE INDEX IF NOT EXISTS `idx_lifecycle_stages_validated_by` ON `lifecycle_stages` (`validated_by`);--> statement-breakpoint
|
|
82
|
+
CREATE INDEX IF NOT EXISTS `idx_task_relations_related_to` ON `task_relations` (`related_to`);--> statement-breakpoint
|
|
83
|
+
CREATE INDEX IF NOT EXISTS `idx_tasks_session_id` ON `tasks` (`session_id`);--> statement-breakpoint
|
|
84
|
+
CREATE INDEX IF NOT EXISTS `idx_token_usage_gateway` ON `token_usage` (`gateway`);
|