gm-cc 2.0.168 → 2.0.169

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.
@@ -4,7 +4,7 @@
4
4
  "name": "AnEntrypoint"
5
5
  },
6
6
  "description": "State machine agent with hooks, skills, and automated git enforcement",
7
- "version": "2.0.168",
7
+ "version": "2.0.169",
8
8
  "metadata": {
9
9
  "description": "State machine agent with hooks, skills, and automated git enforcement"
10
10
  },
@@ -115,10 +115,11 @@ const run = () => {
115
115
  const extMap = { typescript: 'ts', deno: 'ts' };
116
116
  const ext = extMap[lang] || 'mjs';
117
117
  const tmpFile = path.join(os.tmpdir(), `gm-exec-${Date.now()}.${ext}`);
118
- const wrapped = `const __result = await (async () => {\n${code}\n})();\nif (__result !== undefined) { const t = typeof __result; if (t === 'object' || Array.isArray(__result)) { console.log(JSON.stringify(__result, null, 2)); } else if (t !== 'undefined') { console.log(__result); } }`;
118
+ const wrapped = `const __result = await (async () => {\n${code}\n})();\nif (__result !== undefined) { const t = typeof __result; if (t === 'object' || Array.isArray(__result)) { console.log(JSON.stringify(__result, null, 2)); } else { console.log(__result); } }`;
119
119
  fs.writeFileSync(tmpFile, wrapped, 'utf-8');
120
120
  result = spawnDirect('bun', ['run', tmpFile]);
121
121
  try { fs.unlinkSync(tmpFile); } catch (e) {}
122
+ if (result) result = result.split(tmpFile).join('<script>');
122
123
  } else {
123
124
  result = runExec(['x', 'gm-exec', 'exec', `--lang=${lang}`, ...(cwd ? [`--cwd=${cwd}`] : []), code]);
124
125
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-cc",
3
- "version": "2.0.168",
3
+ "version": "2.0.169",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",
package/plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.168",
3
+ "version": "2.0.169",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": {
6
6
  "name": "AnEntrypoint",