feat: convert tmux monitoring into a plugin (B10)

This commit is contained in:
LukeGus committed 2026-09-23 22:42:56 -05:00
1 parent 79d77678c9
commit 708eedb861
145 files changed
+30308 -4458

No files matched your search

@@ -0,0 +1,14 @@
-- tmux-monitor 0001: adopt_tmux_session_tags
-- Generated by termix-plugin migrations. Review before committing.
CREATE TABLE IF NOT EXISTS `tmux_session_tags` (
`id` int AUTO_INCREMENT PRIMARY KEY,
`user_id` varchar(255) NOT NULL,
`host_id` int NOT NULL,
`session_name` text NOT NULL,
`tag` text NOT NULL,
`created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
FOREIGN KEY (`host_id`) REFERENCES `ssh_data` (`id`) ON DELETE CASCADE
);
RENAME TABLE `tmux_session_tags` TO `p_tmux_monitor_session_tags`;
@@ -0,0 +1,14 @@
-- tmux-monitor 0001: adopt_tmux_session_tags
-- Generated by termix-plugin migrations. Review before committing.
CREATE TABLE IF NOT EXISTS "tmux_session_tags" (
"id" serial PRIMARY KEY,
"user_id" varchar(255) NOT NULL,
"host_id" integer NOT NULL,
"session_name" text NOT NULL,
"tag" text NOT NULL,
"created_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE CASCADE,
FOREIGN KEY ("host_id") REFERENCES "ssh_data" ("id") ON DELETE CASCADE
);
ALTER TABLE "tmux_session_tags" RENAME TO "p_tmux_monitor_session_tags";
@@ -0,0 +1,38 @@
{
"version": 1,
"tables": {
"session_tags": {
"columns": {
"id": {
"type": "id",
"primaryKey": true,
"notNull": true
},
"userId": {
"type": "refUser",
"length": 255,
"notNull": true
},
"hostId": {
"type": "refHost",
"notNull": true
},
"sessionName": {
"type": "text",
"notNull": true
},
"tag": {
"type": "text",
"notNull": true
},
"createdAt": {
"type": "timestamp",
"notNull": true,
"defaultNow": true
}
},
"indexes": [],
"adopts": "tmux_session_tags"
}
}
}
@@ -0,0 +1,14 @@
-- tmux-monitor 0001: adopt_tmux_session_tags
-- Generated by termix-plugin migrations. Review before committing.
CREATE TABLE IF NOT EXISTS "tmux_session_tags" (
"id" integer PRIMARY KEY AUTOINCREMENT,
"user_id" text NOT NULL,
"host_id" integer NOT NULL,
"session_name" text NOT NULL,
"tag" text NOT NULL,
"created_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE CASCADE,
FOREIGN KEY ("host_id") REFERENCES "ssh_data" ("id") ON DELETE CASCADE
);
ALTER TABLE "tmux_session_tags" RENAME TO "p_tmux_monitor_session_tags";