gm-kilo 2.0.908 → 2.0.910
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/gm-kilo.mjs +5 -5
- package/package.json +1 -1
package/gm-kilo.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { tmpdir } from 'os';
|
|
|
6
6
|
|
|
7
7
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
8
8
|
const LANG_ALIASES = { js:'nodejs',javascript:'nodejs',ts:'typescript',node:'nodejs',py:'python',sh:'bash',shell:'bash',zsh:'bash' };
|
|
9
|
-
const FORBIDDEN_TOOLS = new Set(['glob','Glob','grep','Grep','search_file_content','Find','find']);
|
|
9
|
+
const FORBIDDEN_TOOLS = new Set(['glob','Glob','fs.glob','grep','Grep','search_file_content','Find','find']);
|
|
10
10
|
const FORBIDDEN_FILE_RE = [/\.(test|spec)\.(js|ts|jsx|tsx|mjs|cjs)$/, /^(jest|vitest|mocha|ava|jasmine|tap)\.(config|setup)/, /\.(snap|stub|mock|fixture)\.(js|ts|json)$/];
|
|
11
11
|
const FORBIDDEN_PATH_RE = ['/__tests__/','/test/','/tests/','/fixtures/','/test-data/',"/__mocks__/"];
|
|
12
12
|
const DOC_BLOCK_RE = /\.(md|txt)$/;
|
|
@@ -147,6 +147,9 @@ export async function GmPlugin({ directory }) {
|
|
|
147
147
|
const tool = input.tool || '';
|
|
148
148
|
const args = (input.args || (output && output.args) || {});
|
|
149
149
|
const skillName = (args.skill || args.name || '').toString();
|
|
150
|
+
if (FORBIDDEN_TOOLS.has(input.tool)) {
|
|
151
|
+
throw new Error('Use the code-search skill for codebase exploration instead of '+input.tool+'. Describe what you need in plain language.');
|
|
152
|
+
}
|
|
150
153
|
if (tool === 'Skill' || tool === 'skill') {
|
|
151
154
|
try {
|
|
152
155
|
if (!existsSync(gmDir)) { try { require('fs').mkdirSync(gmDir, { recursive: true }); } catch(e) {} }
|
|
@@ -174,9 +177,6 @@ export async function GmPlugin({ directory }) {
|
|
|
174
177
|
}
|
|
175
178
|
}
|
|
176
179
|
}
|
|
177
|
-
if (FORBIDDEN_TOOLS.has(input.tool)) {
|
|
178
|
-
throw new Error('Use the code-search skill for codebase exploration instead of '+input.tool+'. Describe what you need in plain language.');
|
|
179
|
-
}
|
|
180
180
|
if (input.tool === 'EnterPlanMode') {
|
|
181
181
|
throw new Error('Plan mode is disabled. Use the gm skill (PLAN→EXECUTE→EMIT→VERIFY→COMPLETE state machine) instead.');
|
|
182
182
|
}
|
|
@@ -199,7 +199,7 @@ export async function GmPlugin({ directory }) {
|
|
|
199
199
|
throw new Error('Cannot create test/doc files. Use .prd for task notes, AGENTS.md for permanent notes.');
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
|
-
if (input.tool !== 'bash' && input.tool !== 'Bash') return;
|
|
202
|
+
if (input.tool !== 'bash' && input.tool !== 'Bash' && input.tool !== 'shell' && input.tool !== 'Shell') return;
|
|
203
203
|
const cmd = (output.args && output.args.command) || '';
|
|
204
204
|
if (!cmd) return;
|
|
205
205
|
if (/^\s*git(?:\s|$)/.test(cmd)) return;
|