vibora 2.12.3 → 2.13.0

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/index.html CHANGED
@@ -5,7 +5,7 @@
5
5
  <link rel="icon" type="image/jpeg" href="/logo-dark.jpg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>Vibora</title>
8
- <script type="module" crossorigin src="/assets/index-Dj8l7E-q.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-DMxoDyAi.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-BAuZPd2w.css">
10
10
  </head>
11
11
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibora",
3
- "version": "2.12.3",
3
+ "version": "2.13.0",
4
4
  "description": "The Vibe Engineer's Cockpit",
5
5
  "license": "PolyForm-Shield-1.0.0",
6
6
  "repository": {
package/server/index.js CHANGED
@@ -15040,12 +15040,32 @@ var systemMetrics = sqliteTable("system_metrics", {
15040
15040
  });
15041
15041
 
15042
15042
  // server/db/index.ts
15043
- initializeViboraDirectories();
15044
- var dbPath = getDatabasePath();
15045
- var sqlite = new Database2(dbPath);
15046
- sqlite.exec("PRAGMA journal_mode = WAL");
15047
- var db = drizzle(sqlite, { schema: exports_schema });
15048
- if (process.env.VIBORA_PACKAGE_ROOT) {
15043
+ var _db = null;
15044
+ var _sqlite = null;
15045
+ function initializeDatabase() {
15046
+ if (_db)
15047
+ return _db;
15048
+ initializeViboraDirectories();
15049
+ const dbPath = getDatabasePath();
15050
+ _sqlite = new Database2(dbPath);
15051
+ _sqlite.exec("PRAGMA journal_mode = WAL");
15052
+ _db = drizzle(_sqlite, { schema: exports_schema });
15053
+ runBundledMigrations(_sqlite, _db);
15054
+ return _db;
15055
+ }
15056
+ var db = new Proxy({}, {
15057
+ get(_, prop) {
15058
+ const instance = initializeDatabase();
15059
+ const value = instance[prop];
15060
+ if (typeof value === "function") {
15061
+ return value.bind(instance);
15062
+ }
15063
+ return value;
15064
+ }
15065
+ });
15066
+ function runBundledMigrations(sqlite, drizzleDb) {
15067
+ if (!process.env.VIBORA_PACKAGE_ROOT)
15068
+ return;
15049
15069
  const migrationsPath = join3(process.env.VIBORA_PACKAGE_ROOT, "drizzle");
15050
15070
  const hasTasksTable = sqlite.query("SELECT name FROM sqlite_master WHERE type='table' AND name='tasks'").get();
15051
15071
  if (hasTasksTable) {
@@ -15065,7 +15085,7 @@ if (process.env.VIBORA_PACKAGE_ROOT) {
15065
15085
  }
15066
15086
  }
15067
15087
  }
15068
- migrate(db, { migrationsFolder: migrationsPath });
15088
+ migrate(drizzleDb, { migrationsFolder: migrationsPath });
15069
15089
  }
15070
15090
 
15071
15091
  // server/routes/tasks.ts
@@ -21763,6 +21783,25 @@ var terminalWebSocketHandlers = {
21763
21783
  });
21764
21784
  break;
21765
21785
  }
21786
+ const worktreeBasePath = getWorktreeBasePath();
21787
+ const isTaskTerminal = !terminalInfo?.tabId && terminalInfo?.cwd?.startsWith(worktreeBasePath);
21788
+ if (isTaskTerminal && !force) {
21789
+ log2.ws.warn("terminal:destroy BLOCKED - task terminal requires force flag", {
21790
+ terminalId,
21791
+ cwd: terminalInfo?.cwd,
21792
+ name: terminalInfo?.name,
21793
+ clientId: clientData.id,
21794
+ reason
21795
+ });
21796
+ sendTo(ws, {
21797
+ type: "terminal:error",
21798
+ payload: {
21799
+ terminalId,
21800
+ error: "Task terminals require explicit force flag to destroy"
21801
+ }
21802
+ });
21803
+ break;
21804
+ }
21766
21805
  log2.ws.info("terminal:destroy EXECUTING", {
21767
21806
  terminalId,
21768
21807
  name: terminalInfo?.name,
@@ -147303,7 +147342,7 @@ app8.patch("/", async (c) => {
147303
147342
  const existing = db.select().from(terminalViewState).where(eq(terminalViewState.id, SINGLETON_ID)).get();
147304
147343
  const updates = { updatedAt: now };
147305
147344
  if (body.activeTabId !== undefined) {
147306
- if (body.activeTabId !== null) {
147345
+ if (body.activeTabId !== null && body.activeTabId !== "all-tasks") {
147307
147346
  const tab = db.select().from(terminalTabs).where(eq(terminalTabs.id, body.activeTabId)).get();
147308
147347
  if (!tab) {
147309
147348
  return c.json({ error: "Tab not found" }, 404);