@treeport/treeport 0.1.0 → 0.2.2
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/README.md +4 -1
- package/dist/loopback-4XVZbAD1.js +407 -0
- package/dist/node/cli/index.js +616 -105
- package/dist/node/server/index.js +4337 -945
- package/dist/web/assets/index-0q5frbNy.css +2 -0
- package/dist/web/assets/index-CUy0IkGL.js +146 -0
- package/dist/web/favicon.svg +1 -1
- package/dist/web/icon-192.png +0 -0
- package/dist/web/icon-512.png +0 -0
- package/dist/web/index.html +2 -2
- package/drizzle/0001_misty_spectrum.sql +11 -0
- package/drizzle/0002_dazzling_princess_powerful.sql +9 -0
- package/drizzle/0003_yummy_whirlwind.sql +3 -0
- package/drizzle/0004_persistent_worktree_creation.sql +26 -0
- package/drizzle/0005_git_authoritative_worktrees.sql +120 -0
- package/drizzle/0006_web_panel_launch_input.sql +3 -0
- package/drizzle/0007_dashing_pestilence.sql +10 -0
- package/drizzle/meta/0001_snapshot.json +647 -0
- package/drizzle/meta/0002_snapshot.json +701 -0
- package/drizzle/meta/0003_snapshot.json +709 -0
- package/drizzle/meta/0004_snapshot.json +714 -0
- package/drizzle/meta/0005_snapshot.json +696 -0
- package/drizzle/meta/0006_snapshot.json +711 -0
- package/drizzle/meta/0007_snapshot.json +775 -0
- package/drizzle/meta/_journal.json +49 -0
- package/package.json +9 -9
- package/skills/treeport/SKILL.md +3 -2
- package/dist/dist-CUkImh2W.js +0 -254
- package/dist/web/assets/index-C2QPZrxe.js +0 -146
- package/dist/web/assets/index-CC-O69aQ.css +0 -2
package/dist/web/favicon.svg
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" rx="12" fill="#09090b"/><path d="M14
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" rx="12" fill="#09090b"/><path d="M14 17h36v8H36v25h-8V25H14z" fill="#67e8f9"/></svg>
|
package/dist/web/icon-192.png
CHANGED
|
Binary file
|
package/dist/web/icon-512.png
CHANGED
|
Binary file
|
package/dist/web/index.html
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
<link rel="icon" href="/favicon.svg" />
|
|
11
11
|
<link rel="manifest" href="/manifest.webmanifest" />
|
|
12
12
|
<title>Treeport</title>
|
|
13
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
13
|
+
<script type="module" crossorigin src="/assets/index-CUy0IkGL.js"></script>
|
|
14
|
+
<link rel="stylesheet" crossorigin href="/assets/index-0q5frbNy.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
|
17
17
|
<div id="root"></div>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
CREATE TABLE IF NOT EXISTS `web_panels` (
|
|
2
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
3
|
+
`worktree_id` text NOT NULL,
|
|
4
|
+
`definition_id` text NOT NULL,
|
|
5
|
+
`title` text NOT NULL,
|
|
6
|
+
`created_at` text NOT NULL,
|
|
7
|
+
`updated_at` text NOT NULL,
|
|
8
|
+
FOREIGN KEY (`worktree_id`) REFERENCES `worktrees`(`id`) ON UPDATE no action ON DELETE cascade
|
|
9
|
+
);
|
|
10
|
+
--> statement-breakpoint
|
|
11
|
+
CREATE INDEX IF NOT EXISTS `web_panels_worktree_order_idx` ON `web_panels` (`worktree_id`,`created_at`,`id`);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
CREATE TABLE IF NOT EXISTS `web_panel_storage` (
|
|
2
|
+
`panel_id` text NOT NULL,
|
|
3
|
+
`key` text NOT NULL,
|
|
4
|
+
`value_json` text NOT NULL,
|
|
5
|
+
`updated_at` text NOT NULL,
|
|
6
|
+
FOREIGN KEY (`panel_id`) REFERENCES `web_panels`(`id`) ON UPDATE no action ON DELETE cascade
|
|
7
|
+
);
|
|
8
|
+
--> statement-breakpoint
|
|
9
|
+
CREATE UNIQUE INDEX IF NOT EXISTS `web_panel_storage_panel_key_idx` ON `web_panel_storage` (`panel_id`,`key`);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
DROP INDEX `projects_fs_identity_idx`;--> statement-breakpoint
|
|
2
|
+
ALTER TABLE `projects` ADD `repository_identity` text;--> statement-breakpoint
|
|
3
|
+
CREATE UNIQUE INDEX `projects_repository_identity_idx` ON `projects` (`repository_identity`) WHERE "projects"."repository_identity" IS NOT NULL;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
CREATE TABLE `__new_operations` (
|
|
2
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
3
|
+
`kind` text NOT NULL,
|
|
4
|
+
`project_id` text,
|
|
5
|
+
`worktree_id` text,
|
|
6
|
+
`status` text NOT NULL,
|
|
7
|
+
`request_json` text NOT NULL,
|
|
8
|
+
`result_json` text,
|
|
9
|
+
`error` text,
|
|
10
|
+
`created_at` text NOT NULL,
|
|
11
|
+
`updated_at` text NOT NULL,
|
|
12
|
+
FOREIGN KEY (`project_id`) REFERENCES `projects`(`id`) ON UPDATE no action ON DELETE set null,
|
|
13
|
+
FOREIGN KEY (`worktree_id`) REFERENCES `worktrees`(`id`) ON UPDATE no action ON DELETE set null,
|
|
14
|
+
CONSTRAINT "operations_kind_check" CHECK("__new_operations"."kind" IN ('create','finish','discard','project_cleanup','remove','external_remove')),
|
|
15
|
+
CONSTRAINT "operations_status_check" CHECK("__new_operations"."status" IN ('pending','running','completed','failed'))
|
|
16
|
+
);
|
|
17
|
+
--> statement-breakpoint
|
|
18
|
+
INSERT INTO `__new_operations`("id", "kind", "project_id", "worktree_id", "status", "request_json", "result_json", "error", "created_at", "updated_at") SELECT "id", "kind", "project_id", "worktree_id", "status", "request_json", "result_json", "error", "created_at", "updated_at" FROM `operations`;
|
|
19
|
+
--> statement-breakpoint
|
|
20
|
+
DROP TABLE `operations`;
|
|
21
|
+
--> statement-breakpoint
|
|
22
|
+
ALTER TABLE `__new_operations` RENAME TO `operations`;
|
|
23
|
+
--> statement-breakpoint
|
|
24
|
+
CREATE INDEX `operations_worktree_idx` ON `operations` (`worktree_id`);
|
|
25
|
+
--> statement-breakpoint
|
|
26
|
+
CREATE INDEX `operations_project_kind_status_idx` ON `operations` (`project_id`,`kind`,`status`);
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
ALTER TABLE `web_panel_storage` RENAME TO `__old_web_panel_storage`;
|
|
2
|
+
--> statement-breakpoint
|
|
3
|
+
ALTER TABLE `web_panels` RENAME TO `__old_web_panels`;
|
|
4
|
+
--> statement-breakpoint
|
|
5
|
+
ALTER TABLE `operations` RENAME TO `__old_operations`;
|
|
6
|
+
--> statement-breakpoint
|
|
7
|
+
ALTER TABLE `worktrees` RENAME TO `__old_worktrees`;
|
|
8
|
+
--> statement-breakpoint
|
|
9
|
+
CREATE TABLE `worktrees` (
|
|
10
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
11
|
+
`project_id` text NOT NULL,
|
|
12
|
+
`path` text NOT NULL,
|
|
13
|
+
`git_worktree_key` text,
|
|
14
|
+
`head` text DEFAULT '' NOT NULL,
|
|
15
|
+
`branch` text,
|
|
16
|
+
`detached` integer DEFAULT 0 NOT NULL,
|
|
17
|
+
`locked` integer DEFAULT 0 NOT NULL,
|
|
18
|
+
`lock_reason` text,
|
|
19
|
+
`prunable` integer DEFAULT 0 NOT NULL,
|
|
20
|
+
`kind` text NOT NULL,
|
|
21
|
+
`tmux_socket_name` text NOT NULL,
|
|
22
|
+
`managed_wrapper_path` text,
|
|
23
|
+
`pr_state` text DEFAULT 'unknown' NOT NULL,
|
|
24
|
+
`pr_number` integer,
|
|
25
|
+
`pr_url` text,
|
|
26
|
+
`pr_base_branch` text,
|
|
27
|
+
`pr_head_branch` text,
|
|
28
|
+
`pr_merged_at` text,
|
|
29
|
+
`pr_refreshed_at` text,
|
|
30
|
+
`created_at` text NOT NULL,
|
|
31
|
+
`updated_at` text NOT NULL,
|
|
32
|
+
FOREIGN KEY (`project_id`) REFERENCES `projects`(`id`) ON UPDATE no action ON DELETE cascade,
|
|
33
|
+
CONSTRAINT "worktrees_detached_check" CHECK("worktrees"."detached" IN (0,1)),
|
|
34
|
+
CONSTRAINT "worktrees_locked_check" CHECK("worktrees"."locked" IN (0,1)),
|
|
35
|
+
CONSTRAINT "worktrees_prunable_check" CHECK("worktrees"."prunable" IN (0,1)),
|
|
36
|
+
CONSTRAINT "worktrees_kind_check" CHECK("worktrees"."kind" IN ('main','linked'))
|
|
37
|
+
);
|
|
38
|
+
--> statement-breakpoint
|
|
39
|
+
INSERT INTO `worktrees`(
|
|
40
|
+
`id`,`project_id`,`path`,`git_worktree_key`,`head`,`branch`,`detached`,`locked`,
|
|
41
|
+
`lock_reason`,`prunable`,`kind`,`tmux_socket_name`,`managed_wrapper_path`,
|
|
42
|
+
`pr_state`,`pr_number`,`pr_url`,`pr_base_branch`,`pr_head_branch`,`pr_merged_at`,
|
|
43
|
+
`pr_refreshed_at`,`created_at`,`updated_at`
|
|
44
|
+
)
|
|
45
|
+
SELECT
|
|
46
|
+
`id`,`project_id`,`path`,`git_worktree_key`,`head`,`branch`,`detached`,`locked`,
|
|
47
|
+
`lock_reason`,`prunable`,`kind`,`tmux_socket_name`,`managed_wrapper_path`,
|
|
48
|
+
`pr_state`,`pr_number`,`pr_url`,`pr_base_branch`,`pr_head_branch`,`pr_merged_at`,
|
|
49
|
+
`pr_refreshed_at`,`created_at`,`updated_at`
|
|
50
|
+
FROM `__old_worktrees`;
|
|
51
|
+
--> statement-breakpoint
|
|
52
|
+
CREATE TABLE `web_panels` (
|
|
53
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
54
|
+
`worktree_id` text NOT NULL,
|
|
55
|
+
`definition_id` text NOT NULL,
|
|
56
|
+
`title` text NOT NULL,
|
|
57
|
+
`created_at` text NOT NULL,
|
|
58
|
+
`updated_at` text NOT NULL,
|
|
59
|
+
FOREIGN KEY (`worktree_id`) REFERENCES `worktrees`(`id`) ON UPDATE no action ON DELETE cascade
|
|
60
|
+
);
|
|
61
|
+
--> statement-breakpoint
|
|
62
|
+
INSERT INTO `web_panels` SELECT p.* FROM `__old_web_panels` p INNER JOIN `worktrees` w ON w.`id` = p.`worktree_id`;
|
|
63
|
+
--> statement-breakpoint
|
|
64
|
+
CREATE TABLE `web_panel_storage` (
|
|
65
|
+
`panel_id` text NOT NULL,
|
|
66
|
+
`key` text NOT NULL,
|
|
67
|
+
`value_json` text NOT NULL,
|
|
68
|
+
`updated_at` text NOT NULL,
|
|
69
|
+
FOREIGN KEY (`panel_id`) REFERENCES `web_panels`(`id`) ON UPDATE no action ON DELETE cascade
|
|
70
|
+
);
|
|
71
|
+
--> statement-breakpoint
|
|
72
|
+
INSERT INTO `web_panel_storage` SELECT s.* FROM `__old_web_panel_storage` s INNER JOIN `web_panels` p ON p.`id` = s.`panel_id`;
|
|
73
|
+
--> statement-breakpoint
|
|
74
|
+
CREATE TABLE `operations` (
|
|
75
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
76
|
+
`kind` text NOT NULL,
|
|
77
|
+
`project_id` text,
|
|
78
|
+
`worktree_id` text,
|
|
79
|
+
`status` text NOT NULL,
|
|
80
|
+
`request_json` text NOT NULL,
|
|
81
|
+
`result_json` text,
|
|
82
|
+
`error` text,
|
|
83
|
+
`created_at` text NOT NULL,
|
|
84
|
+
`updated_at` text NOT NULL,
|
|
85
|
+
FOREIGN KEY (`project_id`) REFERENCES `projects`(`id`) ON UPDATE no action ON DELETE set null,
|
|
86
|
+
FOREIGN KEY (`worktree_id`) REFERENCES `worktrees`(`id`) ON UPDATE no action ON DELETE set null,
|
|
87
|
+
CONSTRAINT "operations_kind_check" CHECK("operations"."kind" IN ('create','finish','discard','project_cleanup','remove','external_remove')),
|
|
88
|
+
CONSTRAINT "operations_status_check" CHECK("operations"."status" IN ('pending','running','completed','failed'))
|
|
89
|
+
);
|
|
90
|
+
--> statement-breakpoint
|
|
91
|
+
INSERT INTO `operations`(
|
|
92
|
+
`id`,`kind`,`project_id`,`worktree_id`,`status`,`request_json`,`result_json`,`error`,`created_at`,`updated_at`
|
|
93
|
+
)
|
|
94
|
+
SELECT
|
|
95
|
+
o.`id`,o.`kind`,o.`project_id`,w.`id`,o.`status`,o.`request_json`,o.`result_json`,o.`error`,o.`created_at`,o.`updated_at`
|
|
96
|
+
FROM `__old_operations` o LEFT JOIN `worktrees` w ON w.`id` = o.`worktree_id`;
|
|
97
|
+
--> statement-breakpoint
|
|
98
|
+
DROP TABLE `__old_web_panel_storage`;
|
|
99
|
+
--> statement-breakpoint
|
|
100
|
+
DROP TABLE `__old_web_panels`;
|
|
101
|
+
--> statement-breakpoint
|
|
102
|
+
DROP TABLE `__old_operations`;
|
|
103
|
+
--> statement-breakpoint
|
|
104
|
+
DROP TABLE `__old_worktrees`;
|
|
105
|
+
--> statement-breakpoint
|
|
106
|
+
CREATE UNIQUE INDEX `worktrees_path_unique` ON `worktrees` (`path`);
|
|
107
|
+
--> statement-breakpoint
|
|
108
|
+
CREATE UNIQUE INDEX `worktrees_tmux_socket_name_unique` ON `worktrees` (`tmux_socket_name`);
|
|
109
|
+
--> statement-breakpoint
|
|
110
|
+
CREATE INDEX `worktrees_project_idx` ON `worktrees` (`project_id`);
|
|
111
|
+
--> statement-breakpoint
|
|
112
|
+
CREATE UNIQUE INDEX `worktrees_git_key_idx` ON `worktrees` (`project_id`,`git_worktree_key`) WHERE "worktrees"."git_worktree_key" IS NOT NULL;
|
|
113
|
+
--> statement-breakpoint
|
|
114
|
+
CREATE INDEX `web_panels_worktree_order_idx` ON `web_panels` (`worktree_id`,`created_at`,`id`);
|
|
115
|
+
--> statement-breakpoint
|
|
116
|
+
CREATE UNIQUE INDEX `web_panel_storage_panel_key_idx` ON `web_panel_storage` (`panel_id`,`key`);
|
|
117
|
+
--> statement-breakpoint
|
|
118
|
+
CREATE INDEX `operations_worktree_idx` ON `operations` (`worktree_id`);
|
|
119
|
+
--> statement-breakpoint
|
|
120
|
+
CREATE INDEX `operations_project_kind_status_idx` ON `operations` (`project_id`,`kind`,`status`);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
CREATE TABLE `terminal_bell_states` (
|
|
2
|
+
`terminal_id` text PRIMARY KEY NOT NULL,
|
|
3
|
+
`worktree_id` text NOT NULL,
|
|
4
|
+
`sequence` integer NOT NULL,
|
|
5
|
+
`occurred_at` text NOT NULL,
|
|
6
|
+
`unread` integer NOT NULL,
|
|
7
|
+
FOREIGN KEY (`worktree_id`) REFERENCES `worktrees`(`id`) ON UPDATE no action ON DELETE cascade,
|
|
8
|
+
CONSTRAINT "terminal_bell_states_sequence_check" CHECK("terminal_bell_states"."sequence" > 0),
|
|
9
|
+
CONSTRAINT "terminal_bell_states_unread_check" CHECK("terminal_bell_states"."unread" IN (0,1))
|
|
10
|
+
);
|