gm-kilo 2.0.38 → 2.0.39

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.
Files changed (2) hide show
  1. package/gm.mjs +4 -4
  2. package/package.json +1 -1
package/gm.mjs CHANGED
@@ -9,7 +9,6 @@ export default async ({ project, client, $, directory, worktree }) => {
9
9
  let agentRules = '';
10
10
  let thornsPromise = null;
11
11
  let thornsOutput = '';
12
- let thornsInjected = false;
13
12
 
14
13
  const loadAgentRules = () => {
15
14
  if (agentRules) return agentRules;
@@ -40,9 +39,10 @@ export default async ({ project, client, $, directory, worktree }) => {
40
39
  const prd = fs.existsSync(prdFile) ? fs.readFileSync(prdFile, 'utf-8').trim() : '';
41
40
  let content = rules || '';
42
41
  if (prd) content += '\n\nPENDING WORK (.prd):\n' + prd;
43
- // Inject thorns only once at start of conversation
44
- if (!thornsInjected) {
45
- thornsInjected = true;
42
+ // Inject thorns only on the first API call of a conversation (no assistant messages yet)
43
+ const msgs = input?.messages || [];
44
+ const isFirstCall = !msgs.some(m => m.role === 'assistant');
45
+ if (isFirstCall) {
46
46
  const thorns = await startThorns();
47
47
  if (thorns) content += '\n\n=== Repository Analysis (mcp-thorns) ===\n' + thorns;
48
48
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-kilo",
3
- "version": "2.0.38",
3
+ "version": "2.0.39",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",