@vibegrid/mcp 0.2.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.
Files changed (2) hide show
  1. package/dist/index.js +58 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -180,10 +180,23 @@ function createSchema() {
180
180
  hostname TEXT NOT NULL,
181
181
  user TEXT NOT NULL,
182
182
  port INTEGER NOT NULL DEFAULT 22,
183
+ auth_method TEXT DEFAULT 'agent',
183
184
  ssh_key_path TEXT,
185
+ credential_id TEXT,
186
+ encrypted_password TEXT,
184
187
  ssh_options TEXT
185
188
  );
186
189
 
190
+ CREATE TABLE IF NOT EXISTS ssh_keys (
191
+ id TEXT PRIMARY KEY,
192
+ label TEXT NOT NULL,
193
+ encrypted_private_key TEXT NOT NULL,
194
+ public_key TEXT,
195
+ certificate TEXT,
196
+ key_type TEXT,
197
+ created_at TEXT NOT NULL
198
+ );
199
+
187
200
  CREATE TABLE IF NOT EXISTS tasks (
188
201
  id TEXT PRIMARY KEY,
189
202
  project_name TEXT NOT NULL,
@@ -311,6 +324,34 @@ function migrateSchema(d) {
311
324
  })();
312
325
  logger_default.info("[database] migrated schema to version 1 (workspaces)");
313
326
  }
327
+ if (version < 2) {
328
+ d.transaction(() => {
329
+ const hostCols = d.prepare("PRAGMA table_info(remote_hosts)").all();
330
+ if (!hostCols.some((c) => c.name === "auth_method")) {
331
+ d.exec("ALTER TABLE remote_hosts ADD COLUMN auth_method TEXT");
332
+ d.exec("ALTER TABLE remote_hosts ADD COLUMN credential_id TEXT");
333
+ d.exec("ALTER TABLE remote_hosts ADD COLUMN encrypted_password TEXT");
334
+ d.exec(
335
+ "UPDATE remote_hosts SET auth_method = CASE WHEN ssh_key_path IS NOT NULL AND ssh_key_path != '' THEN 'key-file' ELSE 'agent' END"
336
+ );
337
+ }
338
+ d.exec(`
339
+ CREATE TABLE IF NOT EXISTS ssh_keys (
340
+ id TEXT PRIMARY KEY,
341
+ label TEXT NOT NULL,
342
+ encrypted_private_key TEXT NOT NULL,
343
+ public_key TEXT,
344
+ certificate TEXT,
345
+ key_type TEXT,
346
+ created_at TEXT NOT NULL
347
+ )
348
+ `);
349
+ d.prepare(
350
+ "INSERT OR REPLACE INTO schema_meta (key, value) VALUES ('schema_version', '2')"
351
+ ).run();
352
+ })();
353
+ logger_default.info("[database] migrated schema to version 2 (ssh credential vault)");
354
+ }
314
355
  }
315
356
  function loadConfig() {
316
357
  const d = getDb();
@@ -357,6 +398,15 @@ function loadDefaults(d) {
357
398
  },
358
399
  ...map.activeWorkspace !== void 0 && {
359
400
  activeWorkspace: map.activeWorkspace
401
+ },
402
+ ...map.mainViewMode !== void 0 && {
403
+ mainViewMode: map.mainViewMode
404
+ },
405
+ ...map.layoutMode !== void 0 && {
406
+ layoutMode: map.layoutMode
407
+ },
408
+ ...map.updateChannel !== void 0 && {
409
+ updateChannel: map.updateChannel
360
410
  }
361
411
  };
362
412
  }
@@ -389,7 +439,10 @@ function loadRemoteHosts(d) {
389
439
  hostname: r.hostname,
390
440
  user: r.user,
391
441
  port: r.port,
442
+ ...r.auth_method != null && { authMethod: r.auth_method },
392
443
  ...r.ssh_key_path != null && { sshKeyPath: r.ssh_key_path },
444
+ ...r.credential_id != null && { credentialId: r.credential_id },
445
+ ...r.encrypted_password != null && { encryptedPassword: r.encrypted_password },
393
446
  ...r.ssh_options != null && { sshOptions: r.ssh_options }
394
447
  }));
395
448
  }
@@ -465,7 +518,7 @@ function saveConfig(config) {
465
518
  }
466
519
  d.prepare("DELETE FROM remote_hosts").run();
467
520
  const insertHost = d.prepare(
468
- "INSERT INTO remote_hosts (id, label, hostname, user, port, ssh_key_path, ssh_options) VALUES (?, ?, ?, ?, ?, ?, ?)"
521
+ "INSERT INTO remote_hosts (id, label, hostname, user, port, auth_method, ssh_key_path, credential_id, encrypted_password, ssh_options) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
469
522
  );
470
523
  for (const h of config.remoteHosts ?? []) {
471
524
  insertHost.run(
@@ -474,7 +527,10 @@ function saveConfig(config) {
474
527
  h.hostname,
475
528
  h.user,
476
529
  h.port,
530
+ h.authMethod ?? "agent",
477
531
  h.sshKeyPath ?? null,
532
+ h.credentialId ?? null,
533
+ h.encryptedPassword ?? null,
478
534
  h.sshOptions ?? null
479
535
  );
480
536
  }
@@ -2451,7 +2507,7 @@ console.warn = (...args) => _origError("[mcp:warn]", ...args);
2451
2507
  console.error = (...args) => _origError("[mcp:error]", ...args);
2452
2508
  async function main() {
2453
2509
  configManager.init();
2454
- const version = true ? "0.2.0" : createRequire(import.meta.url)("../package.json").version;
2510
+ const version = true ? "0.2.2" : createRequire(import.meta.url)("../package.json").version;
2455
2511
  const server = createMcpServer(version);
2456
2512
  const transport = new StdioServerTransport();
2457
2513
  await server.connect(transport);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibegrid/mcp",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "VibeGrid MCP server — task management, git, and workflow tools for AI coding agents",
5
5
  "type": "module",
6
6
  "license": "MIT",