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,32 @@
import {
adoptLegacyTable,
defineTable,
id,
refHost,
refUser,
text,
timestamp,
} from "@termix/plugin-sdk/db";
/**
* A user's tags on a tmux session, per host. Sessions are shared on the host
* itself, but tags are per user: everyone who monitors the same host can tag
* the same session differently.
*
* Adopted from core's tmux_session_tags, so the column names are the legacy
* ones and the rename carries every existing row across. Core never indexed
* it, so there is no legacy index to keep.
*/
export const sessionTags = adoptLegacyTable(
"tmux_session_tags",
defineTable("session_tags", {
id: id(),
userId: refUser(),
hostId: refHost(),
sessionName: text().notNull(),
tag: text().notNull(),
createdAt: timestamp().notNull().defaultNow(),
}),
);
export const tables = [sessionTags];