thachvd-kit 1.0.20 → 1.0.21
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/.agent/docs/tooling.md +21 -1
- package/bin/cli.js +76 -9
- package/package.json +1 -1
package/.agent/docs/tooling.md
CHANGED
|
@@ -23,6 +23,12 @@ args = ["-y", "@upstash/context7-mcp"]
|
|
|
23
23
|
startup_timeout_sec = 20
|
|
24
24
|
tool_timeout_sec = 120
|
|
25
25
|
|
|
26
|
+
[mcp_servers.filesystem]
|
|
27
|
+
command = "npx"
|
|
28
|
+
args = ["-y", "@modelcontextprotocol/server-filesystem", "<projectPath>"]
|
|
29
|
+
startup_timeout_sec = 20
|
|
30
|
+
tool_timeout_sec = 120
|
|
31
|
+
|
|
26
32
|
[mcp_servers.playwright]
|
|
27
33
|
command = "npx"
|
|
28
34
|
args = ["-y", "@playwright/mcp"]
|
|
@@ -67,6 +73,10 @@ Gemini CLI / Antigravity `mcp_config.json` example:
|
|
|
67
73
|
"command": "npx",
|
|
68
74
|
"args": ["-y", "@upstash/context7-mcp"]
|
|
69
75
|
},
|
|
76
|
+
"filesystem": {
|
|
77
|
+
"command": "npx",
|
|
78
|
+
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/project"]
|
|
79
|
+
},
|
|
70
80
|
"playwright": {
|
|
71
81
|
"command": "npx",
|
|
72
82
|
"args": ["-y", "@playwright/mcp"]
|
|
@@ -91,6 +101,16 @@ Claude Code user config example:
|
|
|
91
101
|
"command": "codegraph",
|
|
92
102
|
"args": ["serve", "--mcp"]
|
|
93
103
|
},
|
|
104
|
+
"context7": {
|
|
105
|
+
"type": "stdio",
|
|
106
|
+
"command": "npx",
|
|
107
|
+
"args": ["-y", "@upstash/context7-mcp"]
|
|
108
|
+
},
|
|
109
|
+
"filesystem": {
|
|
110
|
+
"type": "stdio",
|
|
111
|
+
"command": "npx",
|
|
112
|
+
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/project"]
|
|
113
|
+
},
|
|
94
114
|
"playwright": {
|
|
95
115
|
"type": "stdio",
|
|
96
116
|
"command": "npx",
|
|
@@ -102,7 +122,7 @@ Claude Code user config example:
|
|
|
102
122
|
|
|
103
123
|
Common local path:
|
|
104
124
|
|
|
105
|
-
- Claude Code: `~/.claude.json`
|
|
125
|
+
- Claude Code: `~/.claude.json` or `~/.claude/settings.json`
|
|
106
126
|
|
|
107
127
|
The shared kit skills live in `.agent/skills/`. Antigravity reads that folder directly. Codex shows skills from `~/.codex/skills/` in the `$` menu. Claude Code reads project skills from `.claude/skills/`.
|
|
108
128
|
|
package/bin/cli.js
CHANGED
|
@@ -1208,6 +1208,12 @@ args = ["-y", "@upstash/context7-mcp"]
|
|
|
1208
1208
|
startup_timeout_sec = 20
|
|
1209
1209
|
tool_timeout_sec = 120
|
|
1210
1210
|
|
|
1211
|
+
[mcp_servers.filesystem]
|
|
1212
|
+
command = "npx"
|
|
1213
|
+
args = ["-y", "@modelcontextprotocol/server-filesystem", "<projectPath>"]
|
|
1214
|
+
startup_timeout_sec = 20
|
|
1215
|
+
tool_timeout_sec = 120
|
|
1216
|
+
|
|
1211
1217
|
[mcp_servers.playwright]
|
|
1212
1218
|
command = "npx"
|
|
1213
1219
|
args = ["-y", "@playwright/mcp"]
|
|
@@ -1252,6 +1258,10 @@ Gemini CLI / Antigravity \`mcp_config.json\` example:
|
|
|
1252
1258
|
"command": "npx",
|
|
1253
1259
|
"args": ["-y", "@upstash/context7-mcp"]
|
|
1254
1260
|
},
|
|
1261
|
+
"filesystem": {
|
|
1262
|
+
"command": "npx",
|
|
1263
|
+
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/project"]
|
|
1264
|
+
},
|
|
1255
1265
|
"playwright": {
|
|
1256
1266
|
"command": "npx",
|
|
1257
1267
|
"args": ["-y", "@playwright/mcp"]
|
|
@@ -1276,6 +1286,16 @@ Claude Code user config example:
|
|
|
1276
1286
|
"command": "codegraph",
|
|
1277
1287
|
"args": ["serve", "--mcp"]
|
|
1278
1288
|
},
|
|
1289
|
+
"context7": {
|
|
1290
|
+
"type": "stdio",
|
|
1291
|
+
"command": "npx",
|
|
1292
|
+
"args": ["-y", "@upstash/context7-mcp"]
|
|
1293
|
+
},
|
|
1294
|
+
"filesystem": {
|
|
1295
|
+
"type": "stdio",
|
|
1296
|
+
"command": "npx",
|
|
1297
|
+
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/project"]
|
|
1298
|
+
},
|
|
1279
1299
|
"playwright": {
|
|
1280
1300
|
"type": "stdio",
|
|
1281
1301
|
"command": "npx",
|
|
@@ -1287,7 +1307,7 @@ Claude Code user config example:
|
|
|
1287
1307
|
|
|
1288
1308
|
Common local path:
|
|
1289
1309
|
|
|
1290
|
-
- Claude Code: \`~/.claude.json\`
|
|
1310
|
+
- Claude Code: \`~/.claude.json\` or \`~/.claude/settings.json\`
|
|
1291
1311
|
|
|
1292
1312
|
## Native Skill Folders
|
|
1293
1313
|
|
|
@@ -1446,7 +1466,7 @@ function writeJsonFile(filePath, data) {
|
|
|
1446
1466
|
fs.writeFileSync(filePath, JSON.stringify(data, null, 2) + '\n', 'utf8');
|
|
1447
1467
|
}
|
|
1448
1468
|
|
|
1449
|
-
function mergeMcpJson(filePath, withType = false
|
|
1469
|
+
function mergeMcpJson(filePath, withType = false) {
|
|
1450
1470
|
const data = readJsonFile(filePath);
|
|
1451
1471
|
if (data === null) {
|
|
1452
1472
|
return { ok: false, message: `${filePath} is not valid JSON; skipped` };
|
|
@@ -1454,14 +1474,49 @@ function mergeMcpJson(filePath, withType = false, includeContext7 = false) {
|
|
|
1454
1474
|
data.mcpServers = data.mcpServers || {};
|
|
1455
1475
|
const baseServers = {
|
|
1456
1476
|
codegraph: { command: 'codegraph', args: ['serve', '--mcp'] },
|
|
1457
|
-
playwright: { command: 'npx', args: ['-y', '@playwright/mcp'] }
|
|
1477
|
+
playwright: { command: 'npx', args: ['-y', '@playwright/mcp'] },
|
|
1478
|
+
context7: { command: 'npx', args: ['-y', '@upstash/context7-mcp'] },
|
|
1479
|
+
filesystem: { command: 'npx', args: ['-y', '@modelcontextprotocol/server-filesystem', targetDir.replace(/\\/g, '/')] }
|
|
1458
1480
|
};
|
|
1459
|
-
if (
|
|
1460
|
-
|
|
1481
|
+
if (data.permissions && Array.isArray(data.permissions.allow)) {
|
|
1482
|
+
const requiredPermissions = [
|
|
1483
|
+
"mcp__filesystem__read_file",
|
|
1484
|
+
"mcp__filesystem__read_multiple_files",
|
|
1485
|
+
"mcp__filesystem__list_directory",
|
|
1486
|
+
"mcp__filesystem__directory_tree",
|
|
1487
|
+
"mcp__filesystem__search_files",
|
|
1488
|
+
"mcp__filesystem__get_file_info",
|
|
1489
|
+
"mcp__filesystem__write_file",
|
|
1490
|
+
"mcp__context7__resolve-library-id",
|
|
1491
|
+
"mcp__context7__query-docs"
|
|
1492
|
+
];
|
|
1493
|
+
for (const perm of requiredPermissions) {
|
|
1494
|
+
if (!data.permissions.allow.includes(perm)) {
|
|
1495
|
+
data.permissions.allow.push(perm);
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1461
1498
|
}
|
|
1462
1499
|
for (const [name, server] of Object.entries(baseServers)) {
|
|
1463
1500
|
if (!data.mcpServers[name]) {
|
|
1464
1501
|
data.mcpServers[name] = withType ? { type: 'stdio', ...server } : server;
|
|
1502
|
+
} else if (name === 'filesystem') {
|
|
1503
|
+
const fsServer = data.mcpServers[name];
|
|
1504
|
+
if (fsServer && Array.isArray(fsServer.args)) {
|
|
1505
|
+
// If it points to non-existent AppData roaming file, fix it to use npx
|
|
1506
|
+
const isLegacyNode = fsServer.command === 'node' && fsServer.args[0] && fsServer.args[0].includes('server-filesystem');
|
|
1507
|
+
if (isLegacyNode) {
|
|
1508
|
+
fsServer.command = 'npx';
|
|
1509
|
+
fsServer.args[0] = '-y';
|
|
1510
|
+
fsServer.args.splice(1, 0, '@modelcontextprotocol/server-filesystem');
|
|
1511
|
+
}
|
|
1512
|
+
const normalizedTarget = targetDir.replace(/\\/g, '/');
|
|
1513
|
+
const hasTarget = fsServer.args.some(arg => {
|
|
1514
|
+
return typeof arg === 'string' && (arg.replace(/\\/g, '/').toLowerCase() === normalizedTarget.toLowerCase());
|
|
1515
|
+
});
|
|
1516
|
+
if (!hasTarget) {
|
|
1517
|
+
fsServer.args.push(normalizedTarget);
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1465
1520
|
}
|
|
1466
1521
|
}
|
|
1467
1522
|
writeJsonFile(filePath, data);
|
|
@@ -1473,12 +1528,21 @@ function appendMcpTomlIfMissing(filePath) {
|
|
|
1473
1528
|
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
1474
1529
|
const existing = fs.existsSync(filePath) ? fs.readFileSync(filePath, 'utf8') : '';
|
|
1475
1530
|
const blocks = [];
|
|
1531
|
+
const normalizedTarget = targetDir.replace(/\\/g, '/');
|
|
1476
1532
|
if (!/\[mcp_servers\.context7\]/.test(existing)) {
|
|
1477
1533
|
blocks.push(`[mcp_servers.context7]
|
|
1478
1534
|
command = "npx"
|
|
1479
1535
|
args = ["-y", "@upstash/context7-mcp"]
|
|
1480
1536
|
startup_timeout_sec = 20
|
|
1481
1537
|
tool_timeout_sec = 120
|
|
1538
|
+
`);
|
|
1539
|
+
}
|
|
1540
|
+
if (!/\[mcp_servers\.filesystem\]/.test(existing)) {
|
|
1541
|
+
blocks.push(`[mcp_servers.filesystem]
|
|
1542
|
+
command = "npx"
|
|
1543
|
+
args = ["-y", "@modelcontextprotocol/server-filesystem", "${normalizedTarget}"]
|
|
1544
|
+
startup_timeout_sec = 20
|
|
1545
|
+
tool_timeout_sec = 120
|
|
1482
1546
|
`);
|
|
1483
1547
|
}
|
|
1484
1548
|
if (!/\[mcp_servers\.codegraph\]/.test(existing)) {
|
|
@@ -1502,7 +1566,7 @@ tool_timeout_sec = 120
|
|
|
1502
1566
|
}
|
|
1503
1567
|
const separator = existing && !existing.endsWith('\n') ? '\n\n' : existing ? '\n' : '';
|
|
1504
1568
|
fs.writeFileSync(filePath, existing + separator + blocks.join('\n'), 'utf8');
|
|
1505
|
-
return { ok: true, message: `configured context7, codegraph, playwright MCP in ${filePath}` };
|
|
1569
|
+
return { ok: true, message: `configured context7, filesystem, codegraph, playwright MCP in ${filePath}` };
|
|
1506
1570
|
}
|
|
1507
1571
|
|
|
1508
1572
|
function setupMcpServers() {
|
|
@@ -1513,19 +1577,22 @@ function setupMcpServers() {
|
|
|
1513
1577
|
if (codexConfig) results.push(appendMcpTomlIfMissing(codexConfig));
|
|
1514
1578
|
|
|
1515
1579
|
const geminiConfig = homePath('.gemini', 'config', 'mcp_config.json');
|
|
1516
|
-
if (geminiConfig) results.push(mergeMcpJson(geminiConfig, false
|
|
1580
|
+
if (geminiConfig) results.push(mergeMcpJson(geminiConfig, false));
|
|
1517
1581
|
|
|
1518
1582
|
const antigravityIdeConfig = homePath('.gemini', 'antigravity-ide', 'mcp_config.json');
|
|
1519
|
-
if (antigravityIdeConfig) results.push(mergeMcpJson(antigravityIdeConfig, false
|
|
1583
|
+
if (antigravityIdeConfig) results.push(mergeMcpJson(antigravityIdeConfig, false));
|
|
1520
1584
|
|
|
1521
1585
|
const antigravityConfig = homePath('.gemini', 'antigravity', 'mcp_config.json');
|
|
1522
1586
|
if (antigravityConfig && fs.existsSync(path.dirname(antigravityConfig))) {
|
|
1523
|
-
results.push(mergeMcpJson(antigravityConfig, false
|
|
1587
|
+
results.push(mergeMcpJson(antigravityConfig, false));
|
|
1524
1588
|
}
|
|
1525
1589
|
|
|
1526
1590
|
const claudeConfig = homePath('.claude.json');
|
|
1527
1591
|
if (claudeConfig) results.push(mergeMcpJson(claudeConfig, true));
|
|
1528
1592
|
|
|
1593
|
+
const claudeSettings = homePath('.claude', 'settings.json');
|
|
1594
|
+
if (claudeSettings) results.push(mergeMcpJson(claudeSettings, true));
|
|
1595
|
+
|
|
1529
1596
|
return results;
|
|
1530
1597
|
}
|
|
1531
1598
|
|