gm-copilot-cli 2.0.173 → 2.0.174

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.173
3
+ version: 2.0.174
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
@@ -81,8 +81,9 @@ const run = () => {
81
81
  const langAliases = { js: 'nodejs', javascript: 'nodejs', ts: 'typescript', node: 'nodejs', py: 'python', sh: 'bash', shell: 'bash', zsh: 'bash', powershell: 'bash', ps1: 'bash', cmd: 'bash', browser: 'agent-browser', ab: 'agent-browser' };
82
82
  const lang = langAliases[rawLang] || rawLang || detectLang(code);
83
83
  const stripFooter = (s) => s.replace(/\n\[Running tools\][\s\S]*$/, '').trimEnd();
84
+ const IS_WIN = process.platform === 'win32';
84
85
  const gmExecLangs = new Set(['go', 'rust', 'c', 'cpp', 'java']);
85
- const langExts = { nodejs: 'mjs', typescript: 'ts', deno: 'ts', python: 'py', bash: 'ps1', go: 'go', rust: 'rs', c: 'c', cpp: 'cpp', java: 'java' };
86
+ const langExts = { nodejs: 'mjs', typescript: 'ts', deno: 'ts', python: 'py', bash: IS_WIN ? 'ps1' : 'sh', go: 'go', rust: 'rs', c: 'c', cpp: 'cpp', java: 'java' };
86
87
  const spawnDirect = (bin, args, input) => {
87
88
  const opts = { encoding: 'utf-8', timeout: 60000 };
88
89
  if (cwd) opts.cwd = cwd;
@@ -114,11 +115,18 @@ const run = () => {
114
115
  try {
115
116
  let result;
116
117
  if (lang === 'bash') {
117
- const shFile = path.join(os.tmpdir(), `gm-exec-${Date.now()}.ps1`);
118
+ const ext = IS_WIN ? 'ps1' : 'sh';
119
+ const shFile = path.join(os.tmpdir(), `gm-exec-${Date.now()}.${ext}`);
118
120
  fs.writeFileSync(shFile, code, 'utf-8');
119
- result = spawnDirect('powershell', ['-NoProfile', '-NonInteractive', '-File', shFile]);
120
- try { fs.unlinkSync(shFile); } catch (e) {}
121
- if (!result || result.startsWith('[spawn error:')) result = runWithFile('bash', code);
121
+ if (IS_WIN) {
122
+ result = spawnDirect('powershell', ['-NoProfile', '-NonInteractive', '-File', shFile]);
123
+ try { fs.unlinkSync(shFile); } catch (e) {}
124
+ if (!result || result.startsWith('[spawn error:')) result = runWithFile('bash', code);
125
+ } else {
126
+ result = spawnDirect('bash', [shFile]);
127
+ try { fs.unlinkSync(shFile); } catch (e) {}
128
+ if (!result || result.startsWith('[spawn error:')) result = runWithFile('bash', code);
129
+ }
122
130
  } else if (lang === 'python') {
123
131
  result = spawnDirect('python3', ['-c', code]);
124
132
  if (!result || result.startsWith('[spawn error:')) result = spawnDirect('python', ['-c', code]);
package/index.html CHANGED
@@ -18,7 +18,7 @@
18
18
  <script type="module">
19
19
  import { createElement as h, applyDiff, Fragment } from "webjsx";
20
20
  const PLATFORM_NAME="Copilot CLI",PLATFORM_TYPE="CLI Tool",PLATFORM_TYPE_COLOR="#3b82f6";
21
- const DESCRIPTION="State machine agent with hooks, skills, and automated git enforcement",VERSION="2.0.173";
21
+ const DESCRIPTION="State machine agent with hooks, skills, and automated git enforcement",VERSION="2.0.174";
22
22
  const GITHUB_URL="https://github.com/AnEntrypoint/gm-copilot-cli",BADGE_LABEL="copilot-cli";
23
23
  const FEATURES=[{"title":"State Machine","desc":"Immutable PLAN→EXECUTE→EMIT→VERIFY→COMPLETE phases with full mutable tracking"},{"title":"Semantic Search","desc":"Natural language codebase exploration via codesearch skill — no grep needed"},{"title":"Hooks","desc":"Pre-tool, session-start, prompt-submit, and stop hooks for full lifecycle control"},{"title":"Agents","desc":"gm, codesearch, and websearch agents pre-configured and ready to use"},{"title":"MCP Integration","desc":"Model Context Protocol server support built in"},{"title":"Auto-Recovery","desc":"Supervisor hierarchy ensures the system never crashes"}],INSTALL_STEPS=[{"desc":"Install via GitHub CLI","cmd":"gh extension install AnEntrypoint/gm-copilot-cli"},{"desc":"Restart your terminal — activates automatically"}];
24
24
  const CURRENT_PLATFORM="gm-copilot-cli";
package/manifest.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  name: gm
2
- version: 2.0.173
2
+ version: 2.0.174
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.173",
3
+ "version": "2.0.174",
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.173",
3
+ "version": "2.0.174",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "tools": [
6
6
  {