vibora 9.0.0 → 9.0.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.
@@ -169,6 +169,13 @@
169
169
  "when": 1767682302178,
170
170
  "tag": "0023_flowery_lily_hollister",
171
171
  "breakpoints": true
172
+ },
173
+ {
174
+ "idx": 24,
175
+ "version": "6",
176
+ "when": 1767698032542,
177
+ "tag": "0024_milky_magik",
178
+ "breakpoints": true
172
179
  }
173
180
  ]
174
181
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibora",
3
- "version": "9.0.0",
3
+ "version": "9.0.2",
4
4
  "description": "Harness Attention. Orchestrate Agents. Ship.",
5
5
  "license": "PolyForm-Shield-1.0.0",
6
6
  "repository": {
package/server/index.js CHANGED
@@ -4381,6 +4381,7 @@ var init_schema = __esm(() => {
4381
4381
  id: text("id").primaryKey().default("singleton"),
4382
4382
  activeTabId: text("active_tab_id"),
4383
4383
  focusedTerminals: text("focused_terminals"),
4384
+ selectedProjectIds: text("selected_project_ids"),
4384
4385
  currentView: text("current_view"),
4385
4386
  currentTaskId: text("current_task_id"),
4386
4387
  isTabVisible: integer("is_tab_visible", { mode: "boolean" }),
@@ -5283,6 +5284,7 @@ function runMigrations(sqlite, drizzleDb) {
5283
5284
  const journal = JSON.parse(readFileSync2(journalPath, "utf-8"));
5284
5285
  const existingMigrations = sqlite.query("SELECT hash, created_at FROM __drizzle_migrations").all();
5285
5286
  const existingHashes = new Set(existingMigrations.map((m) => m.hash));
5287
+ const hasSystemPromptAddition = sqlite.query("SELECT name FROM pragma_table_info('tasks') WHERE name='system_prompt_addition'").get();
5286
5288
  const hasClaudeOptions = sqlite.query("SELECT name FROM pragma_table_info('tasks') WHERE name='claude_options'").get();
5287
5289
  const hasAppsTable = sqlite.query("SELECT name FROM sqlite_master WHERE type='table' AND name='apps'").get();
5288
5290
  const hasEnvironmentVariables = sqlite.query("SELECT name FROM pragma_table_info('apps') WHERE name='environment_variables'").get();
@@ -5294,15 +5296,18 @@ function runMigrations(sqlite, drizzleDb) {
5294
5296
  const hasPinnedColumn = sqlite.query("SELECT name FROM pragma_table_info('tasks') WHERE name='pinned'").get();
5295
5297
  const hasProjectsTable = sqlite.query("SELECT name FROM sqlite_master WHERE type='table' AND name='projects'").get();
5296
5298
  const hasAutoPortAllocationColumn = sqlite.query("SELECT name FROM pragma_table_info('apps') WHERE name='auto_port_allocation'").get();
5299
+ const hasSelectedProjectIdsColumn = sqlite.query("SELECT name FROM pragma_table_info('terminal_view_state') WHERE name='selected_project_ids'").get();
5297
5300
  const migrationsToMark = [];
5298
5301
  for (const entry of journal.entries) {
5299
5302
  if (existingHashes.has(entry.tag))
5300
5303
  continue;
5301
5304
  let shouldMark = false;
5302
- if (entry.tag < "0013_replace_system_prompt_with_claude_options") {
5303
- shouldMark = true;
5304
- } else if (entry.tag.startsWith("0013") && hasClaudeOptions) {
5305
+ if (entry.tag < "0012_previous_norrin_radd") {
5305
5306
  shouldMark = true;
5307
+ } else if (entry.tag.startsWith("0012")) {
5308
+ shouldMark = hasSystemPromptAddition || hasClaudeOptions || !hasSystemPromptAddition && !hasClaudeOptions;
5309
+ } else if (entry.tag.startsWith("0013")) {
5310
+ shouldMark = hasClaudeOptions || !hasSystemPromptAddition && !hasClaudeOptions;
5306
5311
  } else if (entry.tag.startsWith("0014") && hasAppsTable) {
5307
5312
  shouldMark = true;
5308
5313
  } else if (entry.tag.startsWith("0015") && hasEnvironmentVariables) {
@@ -5323,6 +5328,8 @@ function runMigrations(sqlite, drizzleDb) {
5323
5328
  shouldMark = true;
5324
5329
  } else if (entry.tag.startsWith("0023") && hasAutoPortAllocationColumn) {
5325
5330
  shouldMark = true;
5331
+ } else if (entry.tag.startsWith("0024") && hasSelectedProjectIdsColumn) {
5332
+ shouldMark = true;
5326
5333
  }
5327
5334
  if (shouldMark) {
5328
5335
  migrationsToMark.push(entry);
@@ -5337,6 +5344,18 @@ function runMigrations(sqlite, drizzleDb) {
5337
5344
  migrations: migrationsToMark.map((m) => m.tag)
5338
5345
  });
5339
5346
  }
5347
+ if (!hasSystemPromptAddition && !hasClaudeOptions) {
5348
+ const repoHasClaudeOptions = sqlite.query("SELECT name FROM pragma_table_info('repositories') WHERE name='claude_options'").get();
5349
+ if (!repoHasClaudeOptions) {
5350
+ log2.db.info("Adding claude_options column to repositories for fresh database");
5351
+ sqlite.exec("ALTER TABLE `repositories` ADD `claude_options` text");
5352
+ }
5353
+ const tasksHasAgentOptions = sqlite.query("SELECT name FROM pragma_table_info('tasks') WHERE name='agent_options'").get();
5354
+ if (!tasksHasAgentOptions) {
5355
+ log2.db.info("Adding claude_options column to tasks for fresh database");
5356
+ sqlite.exec("ALTER TABLE `tasks` ADD `claude_options` text");
5357
+ }
5358
+ }
5340
5359
  }
5341
5360
  }
5342
5361
  migrate(drizzleDb, { migrationsFolder: migrationsPath });
@@ -5360,15 +5379,10 @@ function migrateRepositoriesToProjects(sqlite) {
5360
5379
  const { nanoid } = require_nanoid();
5361
5380
  for (const repo of orphanedRepos) {
5362
5381
  const linkedApp = sqlite.query("SELECT id FROM apps WHERE repository_id = ?").get(repo.id);
5363
- const tabId = nanoid();
5364
- sqlite.exec(`
5365
- INSERT INTO terminal_tabs (id, name, position, directory, created_at, updated_at)
5366
- VALUES ('${tabId}', '${repo.display_name.replace(/'/g, "''")}', 0, '${repo.path.replace(/'/g, "''")}', '${now}', '${now}')
5367
- `);
5368
5382
  const projectId = nanoid();
5369
5383
  sqlite.exec(`
5370
5384
  INSERT INTO projects (id, name, repository_id, app_id, terminal_tab_id, status, last_accessed_at, created_at, updated_at)
5371
- VALUES ('${projectId}', '${repo.display_name.replace(/'/g, "''")}', '${repo.id}', ${linkedApp ? `'${linkedApp.id}'` : "NULL"}, '${tabId}', 'active', ${repo.last_used_at ? `'${repo.last_used_at}'` : "NULL"}, '${now}', '${now}')
5385
+ VALUES ('${projectId}', '${repo.display_name.replace(/'/g, "''")}', '${repo.id}', ${linkedApp ? `'${linkedApp.id}'` : "NULL"}, NULL, 'active', ${repo.last_used_at ? `'${repo.last_used_at}'` : "NULL"}, '${now}', '${now}')
5372
5386
  `);
5373
5387
  }
5374
5388
  log2.db.info("Migrated repositories to projects successfully", { count: orphanedRepos.length });
@@ -174707,6 +174721,7 @@ function parseViewState(row) {
174707
174721
  return {
174708
174722
  activeTabId: null,
174709
174723
  focusedTerminals: {},
174724
+ selectedProjectIds: [],
174710
174725
  currentView: null,
174711
174726
  currentTaskId: null,
174712
174727
  isTabVisible: null,
@@ -174716,6 +174731,7 @@ function parseViewState(row) {
174716
174731
  return {
174717
174732
  activeTabId: row.activeTabId,
174718
174733
  focusedTerminals: row.focusedTerminals ? JSON.parse(row.focusedTerminals) : {},
174734
+ selectedProjectIds: row.selectedProjectIds ? JSON.parse(row.selectedProjectIds) : [],
174719
174735
  currentView: row.currentView,
174720
174736
  currentTaskId: row.currentTaskId,
174721
174737
  isTabVisible: row.isTabVisible,
@@ -174754,6 +174770,9 @@ app8.patch("/", async (c) => {
174754
174770
  }
174755
174771
  updates.focusedTerminals = JSON.stringify(merged);
174756
174772
  }
174773
+ if (body.selectedProjectIds !== undefined) {
174774
+ updates.selectedProjectIds = JSON.stringify(body.selectedProjectIds);
174775
+ }
174757
174776
  if (body.currentView !== undefined) {
174758
174777
  updates.currentView = body.currentView;
174759
174778
  }
@@ -174773,6 +174792,7 @@ app8.patch("/", async (c) => {
174773
174792
  id: SINGLETON_ID,
174774
174793
  activeTabId: updates.activeTabId,
174775
174794
  focusedTerminals: updates.focusedTerminals,
174795
+ selectedProjectIds: updates.selectedProjectIds,
174776
174796
  currentView: updates.currentView,
174777
174797
  currentTaskId: updates.currentTaskId,
174778
174798
  isTabVisible: updates.isTabVisible,
@@ -175128,15 +175148,6 @@ app10.post("/create", async (c) => {
175128
175148
  updatedAt: now
175129
175149
  }).run();
175130
175150
  const linkedApp = db2.select().from(apps).where(eq(apps.repositoryId, newRepoId)).get();
175131
- const tabId = nanoid();
175132
- db2.insert(terminalTabs).values({
175133
- id: tabId,
175134
- name: projectName,
175135
- position: 0,
175136
- directory: fullOutputPath,
175137
- createdAt: now,
175138
- updatedAt: now
175139
- }).run();
175140
175151
  const projectId = nanoid();
175141
175152
  db2.insert(projects).values({
175142
175153
  id: projectId,
@@ -175144,7 +175155,7 @@ app10.post("/create", async (c) => {
175144
175155
  description: null,
175145
175156
  repositoryId: newRepoId,
175146
175157
  appId: linkedApp?.id ?? null,
175147
- terminalTabId: tabId,
175158
+ terminalTabId: null,
175148
175159
  status: "active",
175149
175160
  lastAccessedAt: now,
175150
175161
  createdAt: now,