thachvd-kit 1.0.20 → 1.0.22
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 +80 -11
- 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,22 +1466,58 @@ 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` };
|
|
1453
1473
|
}
|
|
1454
1474
|
data.mcpServers = data.mcpServers || {};
|
|
1475
|
+
const npxCmd = process.platform === 'win32' ? 'npx.cmd' : 'npx';
|
|
1455
1476
|
const baseServers = {
|
|
1456
1477
|
codegraph: { command: 'codegraph', args: ['serve', '--mcp'] },
|
|
1457
|
-
playwright: { command:
|
|
1478
|
+
playwright: { command: npxCmd, args: ['-y', '@playwright/mcp'] },
|
|
1479
|
+
context7: { command: npxCmd, args: ['-y', '@upstash/context7-mcp'] },
|
|
1480
|
+
filesystem: { command: npxCmd, args: ['-y', '@modelcontextprotocol/server-filesystem', targetDir.replace(/\\/g, '/')] }
|
|
1458
1481
|
};
|
|
1459
|
-
if (
|
|
1460
|
-
|
|
1482
|
+
if (data.permissions && Array.isArray(data.permissions.allow)) {
|
|
1483
|
+
const requiredPermissions = [
|
|
1484
|
+
"mcp__filesystem__read_file",
|
|
1485
|
+
"mcp__filesystem__read_multiple_files",
|
|
1486
|
+
"mcp__filesystem__list_directory",
|
|
1487
|
+
"mcp__filesystem__directory_tree",
|
|
1488
|
+
"mcp__filesystem__search_files",
|
|
1489
|
+
"mcp__filesystem__get_file_info",
|
|
1490
|
+
"mcp__filesystem__write_file",
|
|
1491
|
+
"mcp__context7__resolve-library-id",
|
|
1492
|
+
"mcp__context7__query-docs"
|
|
1493
|
+
];
|
|
1494
|
+
for (const perm of requiredPermissions) {
|
|
1495
|
+
if (!data.permissions.allow.includes(perm)) {
|
|
1496
|
+
data.permissions.allow.push(perm);
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1461
1499
|
}
|
|
1462
1500
|
for (const [name, server] of Object.entries(baseServers)) {
|
|
1463
1501
|
if (!data.mcpServers[name]) {
|
|
1464
1502
|
data.mcpServers[name] = withType ? { type: 'stdio', ...server } : server;
|
|
1503
|
+
} else if (name === 'filesystem') {
|
|
1504
|
+
const fsServer = data.mcpServers[name];
|
|
1505
|
+
if (fsServer && Array.isArray(fsServer.args)) {
|
|
1506
|
+
// If it points to non-existent AppData roaming file, fix it to use npx
|
|
1507
|
+
const isLegacyNode = fsServer.command === 'node' && fsServer.args[0] && fsServer.args[0].includes('server-filesystem');
|
|
1508
|
+
if (isLegacyNode) {
|
|
1509
|
+
fsServer.command = npxCmd;
|
|
1510
|
+
fsServer.args[0] = '-y';
|
|
1511
|
+
fsServer.args.splice(1, 0, '@modelcontextprotocol/server-filesystem');
|
|
1512
|
+
}
|
|
1513
|
+
const normalizedTarget = targetDir.replace(/\\/g, '/');
|
|
1514
|
+
const hasTarget = fsServer.args.some(arg => {
|
|
1515
|
+
return typeof arg === 'string' && (arg.replace(/\\/g, '/').toLowerCase() === normalizedTarget.toLowerCase());
|
|
1516
|
+
});
|
|
1517
|
+
if (!hasTarget) {
|
|
1518
|
+
fsServer.args.push(normalizedTarget);
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1465
1521
|
}
|
|
1466
1522
|
}
|
|
1467
1523
|
writeJsonFile(filePath, data);
|
|
@@ -1473,12 +1529,22 @@ function appendMcpTomlIfMissing(filePath) {
|
|
|
1473
1529
|
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
1474
1530
|
const existing = fs.existsSync(filePath) ? fs.readFileSync(filePath, 'utf8') : '';
|
|
1475
1531
|
const blocks = [];
|
|
1532
|
+
const normalizedTarget = targetDir.replace(/\\/g, '/');
|
|
1533
|
+
const npxCmd = process.platform === 'win32' ? 'npx.cmd' : 'npx';
|
|
1476
1534
|
if (!/\[mcp_servers\.context7\]/.test(existing)) {
|
|
1477
1535
|
blocks.push(`[mcp_servers.context7]
|
|
1478
|
-
command = "
|
|
1536
|
+
command = "${npxCmd}"
|
|
1479
1537
|
args = ["-y", "@upstash/context7-mcp"]
|
|
1480
1538
|
startup_timeout_sec = 20
|
|
1481
1539
|
tool_timeout_sec = 120
|
|
1540
|
+
`);
|
|
1541
|
+
}
|
|
1542
|
+
if (!/\[mcp_servers\.filesystem\]/.test(existing)) {
|
|
1543
|
+
blocks.push(`[mcp_servers.filesystem]
|
|
1544
|
+
command = "${npxCmd}"
|
|
1545
|
+
args = ["-y", "@modelcontextprotocol/server-filesystem", "${normalizedTarget}"]
|
|
1546
|
+
startup_timeout_sec = 20
|
|
1547
|
+
tool_timeout_sec = 120
|
|
1482
1548
|
`);
|
|
1483
1549
|
}
|
|
1484
1550
|
if (!/\[mcp_servers\.codegraph\]/.test(existing)) {
|
|
@@ -1491,7 +1557,7 @@ tool_timeout_sec = 120
|
|
|
1491
1557
|
}
|
|
1492
1558
|
if (!/\[mcp_servers\.playwright\]/.test(existing)) {
|
|
1493
1559
|
blocks.push(`[mcp_servers.playwright]
|
|
1494
|
-
command = "
|
|
1560
|
+
command = "${npxCmd}"
|
|
1495
1561
|
args = ["-y", "@playwright/mcp"]
|
|
1496
1562
|
startup_timeout_sec = 20
|
|
1497
1563
|
tool_timeout_sec = 120
|
|
@@ -1502,7 +1568,7 @@ tool_timeout_sec = 120
|
|
|
1502
1568
|
}
|
|
1503
1569
|
const separator = existing && !existing.endsWith('\n') ? '\n\n' : existing ? '\n' : '';
|
|
1504
1570
|
fs.writeFileSync(filePath, existing + separator + blocks.join('\n'), 'utf8');
|
|
1505
|
-
return { ok: true, message: `configured context7, codegraph, playwright MCP in ${filePath}` };
|
|
1571
|
+
return { ok: true, message: `configured context7, filesystem, codegraph, playwright MCP in ${filePath}` };
|
|
1506
1572
|
}
|
|
1507
1573
|
|
|
1508
1574
|
function setupMcpServers() {
|
|
@@ -1513,19 +1579,22 @@ function setupMcpServers() {
|
|
|
1513
1579
|
if (codexConfig) results.push(appendMcpTomlIfMissing(codexConfig));
|
|
1514
1580
|
|
|
1515
1581
|
const geminiConfig = homePath('.gemini', 'config', 'mcp_config.json');
|
|
1516
|
-
if (geminiConfig) results.push(mergeMcpJson(geminiConfig, false
|
|
1582
|
+
if (geminiConfig) results.push(mergeMcpJson(geminiConfig, false));
|
|
1517
1583
|
|
|
1518
1584
|
const antigravityIdeConfig = homePath('.gemini', 'antigravity-ide', 'mcp_config.json');
|
|
1519
|
-
if (antigravityIdeConfig) results.push(mergeMcpJson(antigravityIdeConfig, false
|
|
1585
|
+
if (antigravityIdeConfig) results.push(mergeMcpJson(antigravityIdeConfig, false));
|
|
1520
1586
|
|
|
1521
1587
|
const antigravityConfig = homePath('.gemini', 'antigravity', 'mcp_config.json');
|
|
1522
1588
|
if (antigravityConfig && fs.existsSync(path.dirname(antigravityConfig))) {
|
|
1523
|
-
results.push(mergeMcpJson(antigravityConfig, false
|
|
1589
|
+
results.push(mergeMcpJson(antigravityConfig, false));
|
|
1524
1590
|
}
|
|
1525
1591
|
|
|
1526
1592
|
const claudeConfig = homePath('.claude.json');
|
|
1527
1593
|
if (claudeConfig) results.push(mergeMcpJson(claudeConfig, true));
|
|
1528
1594
|
|
|
1595
|
+
const claudeSettings = homePath('.claude', 'settings.json');
|
|
1596
|
+
if (claudeSettings) results.push(mergeMcpJson(claudeSettings, true));
|
|
1597
|
+
|
|
1529
1598
|
return results;
|
|
1530
1599
|
}
|
|
1531
1600
|
|