gm-copilot-cli 2.0.116 → 2.0.117
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/copilot-profile.md +1 -1
- package/hooks/pre-tool-use-hook.js +2 -9
- package/manifest.yml +1 -1
- package/package.json +1 -1
- package/tools.json +1 -1
package/copilot-profile.md
CHANGED
|
@@ -64,15 +64,8 @@ const run = () => {
|
|
|
64
64
|
|
|
65
65
|
if (tool_name === 'Bash') {
|
|
66
66
|
const command = (tool_input?.command || '').trim();
|
|
67
|
-
if (
|
|
68
|
-
return { block: true, reason: '
|
|
69
|
-
}
|
|
70
|
-
if (/\bmcp-(?!gm\b)/.test(command) || /\bnpx\s+mcp-/.test(command) || /\bbunx\s+mcp-(?!gm\b)/.test(command)) {
|
|
71
|
-
return { block: true, reason: 'Only bun x mcp-gm is allowed as the MCP CLI tool. Replace with: bun x mcp-gm' };
|
|
72
|
-
}
|
|
73
|
-
const allowed = /^(git |gh |npm |npx |bun |node |python |python3 |ruby |go |deno |tsx |ts-node |docker |sudo systemctl|systemctl |pm2 |cd |agent-browser )/.test(command);
|
|
74
|
-
if (!allowed) {
|
|
75
|
-
return { block: true, reason: 'Bash only allows: git, gh, node, python, bun, npx, ruby, go, deno, docker, npm, systemctl, pm2, cd. Write all logic as code and execute it via Bash (e.g. node -e "...", python -c "...", bun -e "..."). Use Read/Write/Edit for file ops. Use code-search skill for exploration.' };
|
|
67
|
+
if (!/^bun x mcp-gm(\s|$)/.test(command)) {
|
|
68
|
+
return { block: true, reason: 'Bash is restricted to: bun x mcp-gm. All other commands are blocked.' };
|
|
76
69
|
}
|
|
77
70
|
}
|
|
78
71
|
|
package/manifest.yml
CHANGED
package/package.json
CHANGED