gm-kilo 2.0.9 → 2.0.11
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/.mcp.json +2 -2
- package/README.md +2 -2
- package/gm.js +12 -35
- package/kilocode.json +2 -2
- package/package.json +1 -1
package/.mcp.json
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
"$schema": "https://schemas.modelcontextprotocol.io/0.1.0/mcp.json",
|
|
3
3
|
"mcpServers": {
|
|
4
4
|
"dev": {
|
|
5
|
-
"command": "
|
|
5
|
+
"command": "bun x",
|
|
6
6
|
"args": [
|
|
7
7
|
"mcp-gm@latest"
|
|
8
8
|
],
|
|
9
9
|
"timeout": 360000
|
|
10
10
|
},
|
|
11
11
|
"code-search": {
|
|
12
|
-
"command": "
|
|
12
|
+
"command": "bun x",
|
|
13
13
|
"args": [
|
|
14
14
|
"codebasesearch@latest"
|
|
15
15
|
],
|
package/README.md
CHANGED
|
@@ -34,13 +34,13 @@ Kilo uses the OpenCode configuration format. Create or update `~/.config/kilo/op
|
|
|
34
34
|
"mcp": {
|
|
35
35
|
"dev": {
|
|
36
36
|
"type": "local",
|
|
37
|
-
"command": ["
|
|
37
|
+
"command": ["bun x", "mcp-gm@latest"],
|
|
38
38
|
"timeout": 360000,
|
|
39
39
|
"enabled": true
|
|
40
40
|
},
|
|
41
41
|
"code-search": {
|
|
42
42
|
"type": "local",
|
|
43
|
-
"command": ["
|
|
43
|
+
"command": ["bun x", "codebasesearch@latest"],
|
|
44
44
|
"timeout": 360000,
|
|
45
45
|
"enabled": true
|
|
46
46
|
}
|
package/gm.js
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
const fs = require('fs');
|
|
2
2
|
const path = require('path');
|
|
3
|
-
const { analyze } = require('mcp-thorns');
|
|
4
|
-
|
|
5
|
-
const SHELL_TOOLS = ['bash'];
|
|
6
|
-
const SEARCH_TOOLS = ['glob', 'grep', 'list'];
|
|
7
|
-
|
|
8
|
-
let thornsOutput = '';
|
|
9
3
|
|
|
10
4
|
const GmPlugin = async ({ project, client, $, directory, worktree }) => {
|
|
11
5
|
const pluginDir = __dirname;
|
|
@@ -66,41 +60,24 @@ const GmPlugin = async ({ project, client, $, directory, worktree }) => {
|
|
|
66
60
|
}
|
|
67
61
|
};
|
|
68
62
|
|
|
69
|
-
|
|
70
|
-
event: async ({ event }) => {
|
|
71
|
-
if (event.type === 'session.created') await runThornsAnalysis();
|
|
72
|
-
else if (event.type === 'session.idle') await runSessionIdle();
|
|
73
|
-
},
|
|
63
|
+
const prdFile = path.join(directory, '.prd');
|
|
74
64
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
throw new Error('Use plugin:gm:dev execute for all command execution');
|
|
79
|
-
}
|
|
80
|
-
if (SEARCH_TOOLS.includes(tool)) {
|
|
81
|
-
throw new Error('Use plugin:gm:code-search or plugin:gm:dev for code exploration');
|
|
82
|
-
}
|
|
83
|
-
if (tool === 'write' || tool === 'edit' || tool === 'patch') {
|
|
84
|
-
const fp = output.args?.file_path || output.args?.filePath || output.args?.path || '';
|
|
85
|
-
const ext = path.extname(fp);
|
|
86
|
-
const base = path.basename(fp).toLowerCase();
|
|
87
|
-
const inSkills = fp.includes('/skills/');
|
|
88
|
-
if ((ext === '.md' || ext === '.txt' || base.startsWith('features_list')) &&
|
|
89
|
-
!base.startsWith('claude') && !base.startsWith('readme') && !base.startsWith('gm') && !inSkills) {
|
|
90
|
-
throw new Error('Cannot create documentation files. Only CLAUDE.md, GM.md, and README.md are maintained.');
|
|
91
|
-
}
|
|
92
|
-
}
|
|
65
|
+
return {
|
|
66
|
+
onLoad: async () => {
|
|
67
|
+
console.log('✓ gm plugin loaded');
|
|
93
68
|
},
|
|
94
69
|
|
|
95
|
-
|
|
70
|
+
getSystemPrompt: async () => {
|
|
96
71
|
const rules = loadAgentRules();
|
|
97
|
-
|
|
98
|
-
|
|
72
|
+
const prd = fs.existsSync(prdFile) ? fs.readFileSync(prdFile, 'utf-8').trim() : '';
|
|
73
|
+
let prompt = rules || '';
|
|
74
|
+
if (prd) prompt += '\n\nPENDING WORK (.prd):\n' + prd;
|
|
75
|
+
return prompt;
|
|
99
76
|
},
|
|
100
77
|
|
|
101
|
-
|
|
102
|
-
const
|
|
103
|
-
if (
|
|
78
|
+
onSessionEnd: async () => {
|
|
79
|
+
const prd = fs.existsSync(prdFile) ? fs.readFileSync(prdFile, 'utf-8').trim() : '';
|
|
80
|
+
if (prd) throw new Error('Work items remain in .prd - commit changes before exiting');
|
|
104
81
|
}
|
|
105
82
|
};
|
|
106
83
|
};
|
package/kilocode.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"mcp": {
|
|
5
5
|
"dev": {
|
|
6
6
|
"type": "local",
|
|
7
|
-
"command": "
|
|
7
|
+
"command": "bun x",
|
|
8
8
|
"args": [
|
|
9
9
|
"mcp-gm@latest"
|
|
10
10
|
],
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"code-search": {
|
|
15
15
|
"type": "local",
|
|
16
|
-
"command": "
|
|
16
|
+
"command": "bun x",
|
|
17
17
|
"args": [
|
|
18
18
|
"codebasesearch@latest"
|
|
19
19
|
],
|