gm-copilot-cli 2.0.239 → 2.0.240

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.239
3
+ version: 2.0.240
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
@@ -225,17 +225,6 @@ const run = () => {
225
225
  const command = (tool_input?.command || '').trim();
226
226
  const stripFooter = (s) => s.replace(/\n\[Running tools\][\s\S]*$/, '').trimEnd();
227
227
 
228
- if (/^exec:pm2list\s*$/.test(command)) {
229
- const r = runGmExec(['pm2list']);
230
- return allowWithNoop(`exec:pm2list output:\n\n${stripFooter((r.stdout || '') + (r.stderr || ''))}`);
231
- }
232
- if (/^exec:pm2logs(\s|$)/.test(command)) {
233
- const args = command.replace(/^exec:pm2logs\s*/, '').trim();
234
- const pmArgs = args ? ['logs', '--nostream', '--lines', '50', args] : ['logs', '--nostream', '--lines', '50'];
235
- const r = spawnSync('pm2', pmArgs, { encoding: 'utf-8', timeout: 15000, windowsHide: true });
236
- return allowWithNoop(`exec:pm2logs output:\n\n${stripFooter((r.stdout || '') + (r.stderr || '')) || '(no logs)'}`);
237
- }
238
-
239
228
  const execMatch = command.match(/^exec(?::(\S+))?\n([\s\S]+)$/);
240
229
  if (execMatch) {
241
230
  const rawLang = (execMatch[1] || '').toLowerCase();
@@ -247,7 +236,7 @@ const run = () => {
247
236
 
248
237
  // ─── Lang plugin dispatch ─────────────────────────────────────────────
249
238
  if (rawLang) {
250
- const builtins = new Set(['js','javascript','ts','typescript','node','nodejs','py','python','sh','bash','shell','zsh','powershell','ps1','go','rust','c','cpp','java','deno','cmd','browser','ab','agent-browser','codesearch','search','status','sleep','close','runner','type','pm2list']);
239
+ const builtins = new Set(['js','javascript','ts','typescript','node','nodejs','py','python','sh','bash','shell','zsh','powershell','ps1','go','rust','c','cpp','java','deno','cmd','browser','ab','agent-browser','codesearch','search','status','sleep','close','runner','type']);
251
240
  if (!builtins.has(rawLang)) {
252
241
  const plugins = loadLangPlugins(projectDir);
253
242
  const plugin = plugins.find(p => p.exec.match.test(`exec:${rawLang}\n${code}`));
@@ -274,7 +263,7 @@ const run = () => {
274
263
  return 'nodejs';
275
264
  };
276
265
  // Note: 'cmd' is NOT aliased to 'bash' — it has its own handler below
277
- const aliases = { js: 'nodejs', javascript: 'nodejs', ts: 'typescript', node: 'nodejs', py: 'python', sh: 'bash', shell: 'bash', zsh: 'bash', powershell: 'powershell', ps1: 'powershell', browser: 'agent-browser', ab: 'agent-browser', codesearch: 'codesearch', search: 'search', status: 'status', sleep: 'sleep', close: 'close', runner: 'runner', type: 'type', pm2list: 'pm2list' };
266
+ const aliases = { js: 'nodejs', javascript: 'nodejs', ts: 'typescript', node: 'nodejs', py: 'python', sh: 'bash', shell: 'bash', zsh: 'bash', powershell: 'powershell', ps1: 'powershell', browser: 'agent-browser', ab: 'agent-browser', codesearch: 'codesearch', search: 'search', status: 'status', sleep: 'sleep', close: 'close', runner: 'runner', type: 'type' };
278
267
  const lang = aliases[rawLang] || rawLang || detectLang(code);
279
268
  const langExts = { nodejs: 'mjs', typescript: 'ts', deno: 'ts', python: 'py', bash: 'sh', powershell: 'ps1', go: 'go', rust: 'rs', c: 'c', cpp: 'cpp', java: 'java' };
280
269
 
@@ -343,11 +332,6 @@ const run = () => {
343
332
  const r = runGmExec(['type', taskId, inputData], { timeout: 15000 });
344
333
  return allowWithNoop(`exec:type output:\n\n${stripFooter((r.stdout || '') + (r.stderr || ''))}`);
345
334
  }
346
- if (lang === 'pm2list') {
347
- const r = runGmExec(['pm2list'], { timeout: 15000 });
348
- return allowWithNoop(`exec:pm2list output:\n\n${stripFooter((r.stdout || '') + (r.stderr || ''))}`);
349
- }
350
-
351
335
  try {
352
336
  let result;
353
337
  if (lang === 'bash') {
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.239";
21
+ const DESCRIPTION="State machine agent with hooks, skills, and automated git enforcement",VERSION="2.0.240";
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.239
2
+ version: 2.0.240
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.239",
3
+ "version": "2.0.240",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",
@@ -67,14 +67,12 @@ exec:close
67
67
  <task_id>
68
68
  ```
69
69
 
70
- **Runner management** (the runner itself is a PM2 process named `gm-exec-runner`):
70
+ **Runner management**:
71
71
  ```
72
72
  exec:runner
73
73
  start|stop|status
74
74
  ```
75
75
 
76
- `exec:runner start` launches the `gm-exec-runner` PM2 process. Each `exec:<lang>` call creates its own `gm-exec-task-{id}` PM2 process — all appear in `pm2 list`. Use `exec:runner status` to check the runner. Use `exec:pm2list` to see all processes including exec tasks.
77
-
78
76
  ## CODEBASE EXPLORATION
79
77
 
80
78
  ```
@@ -101,6 +99,15 @@ Invoke `agent-browser` skill. Escalation — exhaust each before advancing:
101
99
  **`update-docs`** — Refresh README, CLAUDE.md, and docs to reflect session changes. Invoked by `gm-complete`.
102
100
  **`agent-browser`** — Browser automation. Invoke inside EXECUTE for all browser/UI work.
103
101
 
102
+ ## DO NOT STOP
103
+
104
+ **You may not respond to the user or stop working while any of these are true:**
105
+ - .prd file exists and has items
106
+ - git has uncommitted changes
107
+ - git has unpushed commits
108
+
109
+ Completing a phase is NOT stopping. After every phase: read .prd, check git, invoke next skill. Only when .prd is deleted AND git is clean AND all commits are pushed may you return a final response to the user.
110
+
104
111
  ## CONSTRAINTS
105
112
 
106
113
  **Tier 0**: no_crash, no_exit, ground_truth_only, real_execution
@@ -108,6 +115,6 @@ Invoke `agent-browser` skill. Escalation — exhaust each before advancing:
108
115
  **Tier 2**: no_duplication, no_hardcoded_values, modularity
109
116
  **Tier 3**: no_comments, convention_over_code
110
117
 
111
- **Never**: `Bash(node/npm/npx/bun)` | skip planning | sequential independent items | screenshot before JS exhausted | narrate past unresolved mutables
118
+ **Never**: `Bash(node/npm/npx/bun)` | skip planning | sequential independent items | screenshot before JS exhausted | narrate past unresolved mutables | stop while .prd has items | ask the user what to do next while work remains
112
119
 
113
- **Always**: invoke named skill at every transition | snake to planning on any new unknown | witnessed execution only | keep going until .prd empty and git clean
120
+ **Always**: invoke named skill at every transition | snake to planning on any new unknown | witnessed execution only | keep going until .prd deleted and git clean
@@ -55,7 +55,7 @@ For browser/UI: invoke `agent-browser` skill with real workflows. Server + clien
55
55
 
56
56
  `exec:nodejs` (default) | `exec:bash` | `exec:python` | `exec:typescript` | `exec:go` | `exec:rust` | `exec:java` | `exec:deno` | `exec:cmd`
57
57
 
58
- Only git in bash directly. Background tasks: `exec:sleep\n<id>`, `exec:status\n<id>`, `exec:close\n<id>`. Runner: `exec:runner\nstart|stop|status`. All activity visible in `pm2 list` and `pm2 monit` in user terminal.
58
+ Only git in bash directly. Background tasks: `exec:sleep\n<id>`, `exec:status\n<id>`, `exec:close\n<id>`. Runner: `exec:runner\nstart|stop|status`.
59
59
 
60
60
  ## CODEBASE EXPLORATION
61
61
 
@@ -82,16 +82,20 @@ Must return 0. If not: stage → commit → push → re-verify. Local commit wit
82
82
 
83
83
  All of: witnessed end-to-end output | all failure paths exercised | .prd empty | git clean and pushed | `user_steps_remaining=0`
84
84
 
85
+ ## DO NOT STOP
86
+
87
+ After end-to-end verification passes: read .prd from disk. If any items remain, immediately invoke `gm-execute` skill — do not respond to the user. Only respond when .prd is deleted AND git is clean AND all commits are pushed.
88
+
85
89
  ## CONSTRAINTS
86
90
 
87
- **Never**: claim done without witnessed output | uncommitted changes | unpushed commits | .prd items remaining | stop at first green | absorb surprises silently
91
+ **Never**: claim done without witnessed output | uncommitted changes | unpushed commits | .prd items remaining | stop at first green | absorb surprises silently | respond to user while .prd has items
88
92
 
89
- **Always**: triage failure before snaking | witness end-to-end | snake to planning on any new unknown | enumerate remaining after every success
93
+ **Always**: triage failure before snaking | witness end-to-end | snake to planning on any new unknown | enumerate remaining after every success | check .prd after every verification pass
90
94
 
91
95
  ---
92
96
 
93
- **→ FORWARD**: .prd items remain → invoke `gm-execute` skill.
94
- **→ FORWARD**: .prd empty + feature work pushed → invoke `update-docs` skill.
97
+ **→ FORWARD**: .prd items remain → invoke `gm-execute` skill (keep going, do not stop).
98
+ **→ FORWARD**: .prd deleted + feature work pushed → invoke `update-docs` skill.
95
99
  **↩ SNAKE to EMIT**: file output wrong → invoke `gm-emit` skill.
96
100
  **↩ SNAKE to EXECUTE**: logic wrong → invoke `gm-execute` skill.
97
101
  **↩ SNAKE to PLAN**: new unknown or wrong requirements → invoke `planning` skill, restart chain.
@@ -87,15 +87,19 @@ Invoke `agent-browser` skill. Escalation: (1) `exec:agent-browser\n<js>` → (2)
87
87
 
88
88
  File ≤200 lines | No duplication | Pre-emit passed | No mocks | No comments | Docs match | All spotted issues fixed
89
89
 
90
+ ## DO NOT STOP
91
+
92
+ Never respond to the user from this phase. When all gate conditions pass, immediately invoke `gm-complete` skill. Do not pause, summarize, or ask questions.
93
+
90
94
  ## CONSTRAINTS
91
95
 
92
- **Never**: write before pre-emit passes | advance with post-emit variance | absorb surprises silently | comments | hardcoded values | defer spotted issues
96
+ **Never**: write before pre-emit passes | advance with post-emit variance | absorb surprises silently | comments | hardcoded values | defer spotted issues | respond to user or pause for input
93
97
 
94
- **Always**: pre-emit debug before writing | post-emit verify from disk | snake to planning on any new unknown | fix immediately
98
+ **Always**: pre-emit debug before writing | post-emit verify from disk | snake to planning on any new unknown | fix immediately | invoke next skill immediately when gates pass
95
99
 
96
100
  ---
97
101
 
98
- **→ FORWARD**: All gates pass → invoke `gm-complete` skill.
102
+ **→ FORWARD**: All gates pass → invoke `gm-complete` skill immediately.
99
103
  **↺ SELF-LOOP**: Known post-emit variance → fix, re-verify.
100
104
  **↩ SNAKE to EXECUTE**: Known logic error → invoke `gm-execute` skill.
101
105
  **↩ SNAKE to PLAN**: Any new unknown → invoke `planning` skill, restart chain.
@@ -47,7 +47,7 @@ exec:close
47
47
  <task_id>
48
48
  ```
49
49
 
50
- **Runner** (PM2-backed — all activity visible in `pm2 list` and `pm2 monit` in user terminal):
50
+ **Runner**:
51
51
  ```
52
52
  exec:runner
53
53
  start|stop|status
@@ -108,14 +108,18 @@ window.__gm = { captures: [], log: (...a) => window.__gm.captures.push({t:Date.n
108
108
 
109
109
  Real services, real data, real timing. Mocks/fakes/stubs = delete immediately. No .test.js/.spec.js. Delete on discovery.
110
110
 
111
+ ## DO NOT STOP
112
+
113
+ Never respond to the user from this phase. When all mutables are KNOWN, immediately invoke `gm-emit` skill. The chain continues until .prd is deleted and git is clean — that happens in `gm-complete`, not here.
114
+
111
115
  ## CONSTRAINTS
112
116
 
113
- **Never**: `Bash(node/npm/npx/bun)` | fake data | mock files | Glob/Grep/Explore | sequential independent items | absorb surprises silently
117
+ **Never**: `Bash(node/npm/npx/bun)` | fake data | mock files | Glob/Grep/Explore | sequential independent items | absorb surprises silently | respond to user or pause for input
114
118
 
115
- **Always**: witness every hypothesis | import real modules | snake to planning on any new unknown | fix immediately on discovery
119
+ **Always**: witness every hypothesis | import real modules | snake to planning on any new unknown | fix immediately on discovery | invoke next skill immediately when done
116
120
 
117
121
  ---
118
122
 
119
- **→ FORWARD**: All mutables KNOWN → invoke `gm-emit` skill.
123
+ **→ FORWARD**: All mutables KNOWN → invoke `gm-emit` skill immediately.
120
124
  **↺ SELF-LOOP**: Still UNKNOWN → re-run (max 2 passes).
121
125
  **↩ SNAKE to PLAN**: Any new unknown → invoke `planning` skill, restart chain.
@@ -83,8 +83,12 @@ Independent items (empty `blockedBy`) run in parallel waves of ≤3 subagents.
83
83
 
84
84
  **Skip planning entirely** if: task is single-step, trivially bounded, zero unknowns, under 5 minutes.
85
85
 
86
+ ## DO NOT STOP
87
+
88
+ Never respond to the user from this phase. When .prd is complete (zero new items in last pass), immediately invoke `gm-execute` skill. Do not pause, summarize, or ask for confirmation.
89
+
86
90
  ---
87
91
 
88
- **→ FORWARD**: No new mutables → invoke `gm-execute` skill.
92
+ **→ FORWARD**: No new mutables → invoke `gm-execute` skill immediately.
89
93
  **↺ SELF-LOOP**: New items discovered → add to .prd → plan again.
90
94
  **↩ SNAKE here**: New unknown surfaces in any later phase → add it, re-plan, re-advance.
package/tools.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.239",
3
+ "version": "2.0.240",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "tools": [
6
6
  {