gm-copilot-cli 2.0.109 → 2.0.111
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 +10 -0
- package/manifest.yml +1 -1
- package/package.json +1 -1
- package/tools.json +1 -1
package/copilot-profile.md
CHANGED
|
@@ -55,8 +55,18 @@ const run = () => {
|
|
|
55
55
|
return { block: true, reason: 'Plan mode is disabled. Use GM agent planning (PLAN→EXECUTE→EMIT→VERIFY→COMPLETE state machine) via gm:gm subagent instead.' };
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
if (tool_name === 'Skill') {
|
|
59
|
+
const skill = (tool_input?.skill || '').toLowerCase().replace(/^gm:/, '');
|
|
60
|
+
if (skill === 'explore' || skill === 'search') {
|
|
61
|
+
return { block: true, reason: 'Use the code-search skill for codebase exploration. Describe what you need in plain language — it understands intent, not just patterns.' };
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
58
65
|
if (tool_name === 'Bash') {
|
|
59
66
|
const command = (tool_input?.command || '').trim();
|
|
67
|
+
if (/\bcodebasesearch\b/.test(command) && !/^git /.test(command)) {
|
|
68
|
+
return { block: true, reason: 'Use the code-search skill instead of running codebasesearch directly via Bash. Invoke it as a skill with your natural language query.' };
|
|
69
|
+
}
|
|
60
70
|
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);
|
|
61
71
|
if (!allowed) {
|
|
62
72
|
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.' };
|
package/manifest.yml
CHANGED
package/package.json
CHANGED