@basegrid_tech/mcp 0.17.7 → 0.18.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.
Files changed (3) hide show
  1. package/LICENSE +28 -0
  2. package/dist/index.js +43 -30
  3. package/package.json +4 -4
package/LICENSE ADDED
@@ -0,0 +1,28 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Kirill Olegovich Sokolov
4
+ Portions Copyright (c) 2024 Javier Canizalez
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
23
+
24
+ ---
25
+
26
+ This MIT license covers the BaseGrid MCP server (`@basegrid_tech/mcp`) only.
27
+ The rest of the BaseGrid application is proprietary — see the LICENSE file at
28
+ the repository root.
package/dist/index.js CHANGED
@@ -149,28 +149,6 @@ function getDbPath() {
149
149
  import { execFileSync, execFile } from "child_process";
150
150
  import fs2 from "fs";
151
151
  import path2 from "path";
152
- function getUserShellEnv() {
153
- if (process.platform === "win32") return { ...process.env };
154
- try {
155
- const shell = process.env.SHELL || "/bin/zsh";
156
- const output = execFileSync(shell, ["-ilc", "env"], {
157
- encoding: "utf-8",
158
- timeout: 5e3,
159
- stdio: ["pipe", "pipe", "pipe"]
160
- });
161
- const env = {};
162
- for (const line of output.split("\n")) {
163
- const idx = line.indexOf("=");
164
- if (idx > 0) {
165
- env[line.substring(0, idx)] = line.substring(idx + 1);
166
- }
167
- }
168
- return env;
169
- } catch {
170
- return { ...process.env };
171
- }
172
- }
173
- var resolvedEnv = getUserShellEnv();
174
152
  var DEFAULT_NO_PROXY_HOSTS = [
175
153
  "localhost",
176
154
  "127.0.0.1",
@@ -475,7 +453,9 @@ function createSchema() {
475
453
  icon_color TEXT,
476
454
  host_ids TEXT,
477
455
  project_id TEXT,
478
- basegrid_config TEXT
456
+ basegrid_config TEXT,
457
+ created_at INTEGER,
458
+ last_activity_at INTEGER
479
459
  );
480
460
  -- UNIQUE INDEX \u043F\u043E project_id \u0441\u043E\u0437\u0434\u0430\u0451\u0442\u0441\u044F \u0432 \u043C\u0438\u0433\u0440\u0430\u0446\u0438\u0438 v17 (\u0441\u043C. migrateSchema):
481
461
  -- \u043D\u0430 upgrade-\u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u043A\u043E\u043B\u043E\u043D\u043A\u0438 project_id \u0435\u0449\u0451 \u043D\u0435\u0442, \u0438 CREATE INDEX \u0437\u0434\u0435\u0441\u044C \u043F\u0430\u0434\u0430\u043B \u0431\u044B.
@@ -1482,6 +1462,22 @@ function migrateSchema(d) {
1482
1462
  })();
1483
1463
  logger_default.info("[database] migrated schema to version 32 (quick command shell)");
1484
1464
  }
1465
+ if (version < 33) {
1466
+ d.transaction(() => {
1467
+ const cols = d.prepare("PRAGMA table_info(projects)").all();
1468
+ if (!cols.some((c) => c.name === "created_at")) {
1469
+ d.exec("ALTER TABLE projects ADD COLUMN created_at INTEGER");
1470
+ }
1471
+ if (!cols.some((c) => c.name === "last_activity_at")) {
1472
+ d.exec("ALTER TABLE projects ADD COLUMN last_activity_at INTEGER");
1473
+ }
1474
+ d.prepare("UPDATE projects SET created_at = ? WHERE created_at IS NULL").run(Date.now());
1475
+ d.prepare(
1476
+ "INSERT OR REPLACE INTO schema_meta (key, value) VALUES ('schema_version', '33')"
1477
+ ).run();
1478
+ })();
1479
+ logger_default.info("[database] migrated schema to version 33 (projects activity timestamps)");
1480
+ }
1485
1481
  }
1486
1482
  function verifySchema(d) {
1487
1483
  const expectedTables = [
@@ -1556,6 +1552,14 @@ function verifySchema(d) {
1556
1552
  {
1557
1553
  column: "basegrid_config",
1558
1554
  ddl: "ALTER TABLE projects ADD COLUMN basegrid_config TEXT"
1555
+ },
1556
+ {
1557
+ column: "created_at",
1558
+ ddl: "ALTER TABLE projects ADD COLUMN created_at INTEGER"
1559
+ },
1560
+ {
1561
+ column: "last_activity_at",
1562
+ ddl: "ALTER TABLE projects ADD COLUMN last_activity_at INTEGER"
1559
1563
  }
1560
1564
  ],
1561
1565
  workflows: [
@@ -1889,13 +1893,18 @@ function saveConfig(config) {
1889
1893
  }
1890
1894
  }
1891
1895
  const existingIds = /* @__PURE__ */ new Map();
1892
- for (const r of d.prepare("SELECT name, project_id FROM projects").all()) {
1896
+ const existingCreatedAt = /* @__PURE__ */ new Map();
1897
+ const existingActivity = /* @__PURE__ */ new Map();
1898
+ for (const r of d.prepare("SELECT name, project_id, created_at, last_activity_at FROM projects").all()) {
1893
1899
  if (r.project_id) existingIds.set(r.name, r.project_id);
1900
+ if (r.created_at != null) existingCreatedAt.set(r.name, r.created_at);
1901
+ if (r.last_activity_at != null) existingActivity.set(r.name, r.last_activity_at);
1894
1902
  }
1895
1903
  d.prepare("DELETE FROM projects").run();
1896
1904
  const insertProject = d.prepare(
1897
- "INSERT INTO projects (name, path, preferred_agents, icon, icon_color, host_ids, workspace_id, project_id, basegrid_config) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)"
1905
+ "INSERT INTO projects (name, path, preferred_agents, icon, icon_color, host_ids, workspace_id, project_id, basegrid_config, created_at, last_activity_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
1898
1906
  );
1907
+ const savedAt = Date.now();
1899
1908
  for (const p of config.projects) {
1900
1909
  const projectId = p.projectId ?? existingIds.get(p.name) ?? randomUUID();
1901
1910
  insertProject.run(
@@ -1907,7 +1916,9 @@ function saveConfig(config) {
1907
1916
  p.hostIds ? JSON.stringify(p.hostIds) : null,
1908
1917
  p.workspaceId ?? "personal",
1909
1918
  projectId,
1910
- serializeBasegridConfig(p.basegridConfig)
1919
+ serializeBasegridConfig(p.basegridConfig),
1920
+ existingCreatedAt.get(p.name) ?? p.createdAt ?? savedAt,
1921
+ existingActivity.get(p.name) ?? null
1911
1922
  );
1912
1923
  }
1913
1924
  d.prepare("DELETE FROM workflows").run();
@@ -2120,7 +2131,7 @@ function dbGetProject(name) {
2120
2131
  function dbInsertProject(project) {
2121
2132
  const projectId = project.projectId ?? randomUUID();
2122
2133
  getDb().prepare(
2123
- "INSERT INTO projects (name, path, preferred_agents, icon, icon_color, host_ids, workspace_id, project_id, basegrid_config) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)"
2134
+ "INSERT INTO projects (name, path, preferred_agents, icon, icon_color, host_ids, workspace_id, project_id, basegrid_config, created_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
2124
2135
  ).run(
2125
2136
  project.name,
2126
2137
  project.path,
@@ -2130,7 +2141,8 @@ function dbInsertProject(project) {
2130
2141
  project.hostIds ? JSON.stringify(project.hostIds) : null,
2131
2142
  project.workspaceId ?? "personal",
2132
2143
  projectId,
2133
- serializeBasegridConfig(project.basegridConfig)
2144
+ serializeBasegridConfig(project.basegridConfig),
2145
+ project.createdAt ?? Date.now()
2134
2146
  );
2135
2147
  }
2136
2148
  function dbUpdateProject(name, updates) {
@@ -2317,7 +2329,8 @@ function rowToProject(r) {
2317
2329
  ...r.host_ids != null && { hostIds: JSON.parse(r.host_ids) },
2318
2330
  workspaceId: r.workspace_id ?? "personal",
2319
2331
  ...r.project_id != null && r.project_id !== "" && { projectId: r.project_id },
2320
- ...basegridConfig && { basegridConfig }
2332
+ ...basegridConfig && { basegridConfig },
2333
+ ...r.created_at != null && { createdAt: r.created_at }
2321
2334
  };
2322
2335
  }
2323
2336
  function parseBasegridConfig(raw) {
@@ -4399,7 +4412,7 @@ console.warn = (...args) => _origError("[mcp:warn]", ...args);
4399
4412
  console.error = (...args) => _origError("[mcp:error]", ...args);
4400
4413
  async function main() {
4401
4414
  configManager.init();
4402
- const version = true ? "0.17.7" : createRequire(import.meta.url)("../package.json").version;
4415
+ const version = true ? "0.18.0" : createRequire(import.meta.url)("../package.json").version;
4403
4416
  const server = createMcpServer(version);
4404
4417
  const transport = new StdioServerTransport();
4405
4418
  await server.connect(transport);
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@basegrid_tech/mcp",
3
- "version": "0.17.7",
3
+ "version": "0.18.0",
4
4
  "description": "BaseGrid MCP server — task management, git, and workflow tools for AI coding agents",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
- "author": "BaseGrid LLC",
7
+ "author": "Kirill Sokolov",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+https://github.com/pxlvoid/basegrid.git",
@@ -42,8 +42,8 @@
42
42
  "zod": "^4.3.6"
43
43
  },
44
44
  "devDependencies": {
45
- "@basegrid/server": "0.17.7",
46
- "@basegrid/shared": "0.17.7",
45
+ "@basegrid/server": "0.18.0",
46
+ "@basegrid/shared": "0.18.0",
47
47
  "tsup": "^8.5.1",
48
48
  "tsx": "^4.21.0",
49
49
  "typescript": "^6.0.3"