gm-copilot-cli 2.0.76 → 2.0.77

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.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: gm
3
- version: 2.0.76
3
+ version: 2.0.77
4
4
  description: State machine agent with hooks, skills, and automated git enforcement
5
5
  author: AnEntrypoint
6
6
  repository: https://github.com/AnEntrypoint/gm-copilot-cli
@@ -76,22 +76,12 @@ try {
76
76
  if (isGemini) {
77
77
  console.log(JSON.stringify({ decision: 'deny', reason: result.reason }));
78
78
  } else {
79
- console.log(JSON.stringify({ hookSpecificOutput: { hookEventName: 'PreToolUse', permissionDecision: 'deny', permissionDecisionReason: result.reason } }));
79
+ console.log(JSON.stringify({ decision: 'block', reason: result.reason }));
80
80
  }
81
81
  process.exit(0);
82
82
  }
83
83
 
84
- if (isGemini) {
85
- console.log(JSON.stringify({ decision: 'allow' }));
86
- } else {
87
- console.log(JSON.stringify({ hookSpecificOutput: { hookEventName: 'PreToolUse', permissionDecision: 'allow' } }));
88
- }
89
84
  process.exit(0);
90
85
  } catch (error) {
91
- if (isGemini) {
92
- console.log(JSON.stringify({ decision: 'allow' }));
93
- } else {
94
- console.log(JSON.stringify({ hookSpecificOutput: { hookEventName: 'PreToolUse', permissionDecision: 'allow' } }));
95
- }
96
86
  process.exit(0);
97
87
  }
@@ -65,7 +65,7 @@ const emit = (additionalContext) => {
65
65
  } else if (isOpenCode) {
66
66
  console.log(JSON.stringify({ hookSpecificOutput: { hookEventName: 'message.updated', additionalContext } }, null, 2));
67
67
  } else {
68
- console.log(JSON.stringify({ hookSpecificOutput: { hookEventName: 'UserPromptSubmit', additionalContext } }, null, 2));
68
+ console.log(JSON.stringify({ additionalContext }, null, 2));
69
69
  }
70
70
  };
71
71
 
@@ -4,7 +4,7 @@ const fs = require('fs');
4
4
  const path = require('path');
5
5
  const { execSync } = require('child_process');
6
6
 
7
- const pluginRoot = process.env.CLAUDE_PLUGIN_ROOT || process.env.GEMINI_PROJECT_DIR || process.env.OC_PLUGIN_ROOT || process.env.KILO_PLUGIN_ROOT;
7
+ const pluginRoot = process.env.CLAUDE_PLUGIN_ROOT || process.env.GEMINI_PROJECT_DIR || process.env.OC_PLUGIN_ROOT || process.env.KILO_PLUGIN_ROOT || path.join(__dirname, '..');
8
8
  const projectDir = process.env.CLAUDE_PROJECT_DIR || process.env.GEMINI_PROJECT_DIR || process.env.OC_PROJECT_DIR || process.env.KILO_PROJECT_DIR;
9
9
 
10
10
  const ensureGitignore = () => {
@@ -116,26 +116,11 @@ When exploring unfamiliar code, finding similar patterns, understanding integrat
116
116
  const isKilo = process.env.KILO_PLUGIN_ROOT !== undefined;
117
117
 
118
118
  if (isGemini) {
119
- const result = {
120
- systemMessage: additionalContext
121
- };
122
- console.log(JSON.stringify(result, null, 2));
119
+ console.log(JSON.stringify({ systemMessage: additionalContext }, null, 2));
123
120
  } else if (isOpenCode || isKilo) {
124
- const result = {
125
- hookSpecificOutput: {
126
- hookEventName: 'session.created',
127
- additionalContext
128
- }
129
- };
130
- console.log(JSON.stringify(result, null, 2));
121
+ console.log(JSON.stringify({ hookSpecificOutput: { hookEventName: 'session.created', additionalContext } }, null, 2));
131
122
  } else {
132
- const result = {
133
- hookSpecificOutput: {
134
- hookEventName: 'SessionStart',
135
- additionalContext
136
- }
137
- };
138
- console.log(JSON.stringify(result, null, 2));
123
+ console.log(JSON.stringify({ additionalContext }, null, 2));
139
124
  }
140
125
  } catch (error) {
141
126
  const isGemini = process.env.GEMINI_PROJECT_DIR !== undefined;
@@ -143,23 +128,11 @@ When exploring unfamiliar code, finding similar patterns, understanding integrat
143
128
  const isKilo = process.env.KILO_PLUGIN_ROOT !== undefined;
144
129
 
145
130
  if (isGemini) {
146
- console.log(JSON.stringify({
147
- systemMessage: `Error executing hook: ${error.message}`
148
- }, null, 2));
131
+ console.log(JSON.stringify({ systemMessage: `Error executing hook: ${error.message}` }, null, 2));
149
132
  } else if (isOpenCode || isKilo) {
150
- console.log(JSON.stringify({
151
- hookSpecificOutput: {
152
- hookEventName: 'session.created',
153
- additionalContext: `Error executing hook: ${error.message}`
154
- }
155
- }, null, 2));
133
+ console.log(JSON.stringify({ hookSpecificOutput: { hookEventName: 'session.created', additionalContext: `Error executing hook: ${error.message}` } }, null, 2));
156
134
  } else {
157
- console.log(JSON.stringify({
158
- hookSpecificOutput: {
159
- hookEventName: 'SessionStart',
160
- additionalContext: `Error executing hook: ${error.message}`
161
- }
162
- }, null, 2));
135
+ console.log(JSON.stringify({ additionalContext: `Error executing hook: ${error.message}` }, null, 2));
163
136
  }
164
137
  process.exit(0);
165
138
  }
package/manifest.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  name: gm
2
- version: 2.0.76
2
+ version: 2.0.77
3
3
  description: State machine agent with hooks, skills, and automated git enforcement
4
4
  author: AnEntrypoint
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-copilot-cli",
3
- "version": "2.0.76",
3
+ "version": "2.0.77",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",
package/tools.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.76",
3
+ "version": "2.0.77",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "tools": [
6
6
  {