gm-oc 2.0.337 → 2.0.339

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-oc.mjs +5 -1
  2. package/package.json +1 -1
package/gm-oc.mjs CHANGED
@@ -132,8 +132,12 @@ export async function GmPlugin({ directory }) {
132
132
  if (input.tool !== 'bash') return;
133
133
  const cmd = output.args && output.args.command;
134
134
  if (!cmd) return;
135
+ if (/^\s*git(?:\s|$)/.test(cmd)) return;
135
136
  const m = cmd.match(/^exec(?::(\S+))?\n([\s\S]+)$/);
136
- if (!m) return;
137
+ if (!m) {
138
+ output.args = { ...output.args, command: safePrintf('Bash tool can only be used with exec syntax:\n\nexec[:lang]\n<command>\n\nExamples:\nexec\nls -la\n\nexec:nodejs\nnode -e "console.log(1)"') };
139
+ return;
140
+ }
137
141
  const result = runExec(m[1]||'', m[2], output.args.workdir || directory);
138
142
  output.args = { ...output.args, command: safePrintf('exec:'+(m[1]||'auto')+' output:\n\n'+result) };
139
143
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-oc",
3
- "version": "2.0.337",
3
+ "version": "2.0.339",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",