gm-copilot-cli 2.0.369 → 2.0.371

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.369
3
+ version: 2.0.371
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
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.369";
21
+ const DESCRIPTION="State machine agent with hooks, skills, and automated git enforcement",VERSION="2.0.371";
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.369
2
+ version: 2.0.371
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.369",
3
+ "version": "2.0.371",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",
@@ -8,48 +8,21 @@ allowed-tools: Bash(browser:*), Bash(exec:browser*)
8
8
 
9
9
  ## Two Pathways
10
10
 
11
- **Session commands** — use `browser:` prefix via Bash for all browser control.
11
+ **Session management** — use `browser:` prefix via Bash for session lifecycle only.
12
12
 
13
- Create a session first, then run commands against it. Use `--direct` for CDP mode (no extension needed — requires Chrome with remote debugging):
13
+ Create a session first:
14
14
 
15
15
  ```
16
16
  browser:
17
17
  playwriter session new --direct
18
18
  ```
19
19
 
20
- Returns a numeric session ID (e.g. `1`). Use that ID for all subsequent commands.
20
+ Returns a numeric session ID (e.g. `1`). Use that ID for all subsequent `exec:browser` calls.
21
21
 
22
22
  If `--direct` fails, the user needs Chrome running with debugging enabled:
23
23
  - Open `chrome://inspect/#remote-debugging` in Chrome, OR
24
24
  - Launch Chrome with `chrome --remote-debugging-port=9222`
25
25
 
26
- ```
27
- browser:
28
- playwriter -s 1 -e 'await page.goto("https://example.com")'
29
- ```
30
-
31
- ```
32
- browser:
33
- playwriter -s 1 -e 'await snapshot({ page })'
34
- ```
35
-
36
- ```
37
- browser:
38
- playwriter -s 1 -e 'await screenshotWithAccessibilityLabels({ page })'
39
- ```
40
-
41
- State persists across calls within a session:
42
-
43
- ```
44
- browser:
45
- playwriter -s 1 -e 'state.x = 1'
46
- ```
47
-
48
- ```
49
- browser:
50
- playwriter -s 1 -e 'console.log(state.x)'
51
- ```
52
-
53
26
  List active sessions:
54
27
 
55
28
  ```
@@ -57,7 +30,7 @@ browser:
57
30
  playwriter session list
58
31
  ```
59
32
 
60
- **JS eval in browser** — use `exec:browser` via Bash when you need to run JavaScript in the page context directly.
33
+ **JS eval** — use `exec:browser` via Bash for ALL JavaScript execution. Never use `playwriter -s <id> -e '...'` for JS code — single-quote quoting fails on Windows CMD. The exec runner writes code to a temp file, avoiding all shell quoting issues.
61
34
 
62
35
  ```
63
36
  exec:browser
@@ -71,27 +44,28 @@ const title = await page.title()
71
44
  console.log(title)
72
45
  ```
73
46
 
74
- Always use single quotes for the `-e` argument to avoid shell quoting issues.
47
+ State persists across `exec:browser` calls within a session. Never add shell quoting or escaping to the exec body — write plain JavaScript directly.
75
48
 
76
49
  ## Core Workflow
77
50
 
78
51
  Every browser automation follows this pattern:
79
52
 
80
- 1. **Create session**: `playwriter session new` (note the returned ID)
81
- 2. **Navigate**: `playwriter -s <id> -e 'await page.goto("https://example.com")'`
82
- 3. **Snapshot**: `playwriter -s <id> -e 'await snapshot({ page })'`
83
- 4. **Interact**: click, fill, type via JS expressions
84
- 5. **Re-snapshot**: after navigation or DOM changes
53
+ 1. **Create session**: `browser:\nplaywriter session new --direct` (note the returned ID)
54
+ 2. **All JS code**: use `exec:browser` with plain JS body — navigate, interact, snapshot, extract
85
55
 
86
56
  ```
87
57
  browser:
88
- playwriter session new
89
- playwriter -s 1 -e 'await page.goto("https://example.com/form")'
90
- playwriter -s 1 -e 'await snapshot({ page })'
91
- playwriter -s 1 -e 'await page.fill("[name=email]", "user@example.com")'
92
- playwriter -s 1 -e 'await page.click("[type=submit]")'
93
- playwriter -s 1 -e 'await page.waitForLoadState("networkidle")'
94
- playwriter -s 1 -e 'await snapshot({ page })'
58
+ playwriter session new --direct
59
+ ```
60
+
61
+ ```
62
+ exec:browser
63
+ await page.goto('https://example.com/form')
64
+ await snapshot({ page })
65
+ await page.fill('[name=email]', 'user@example.com')
66
+ await page.click('[type=submit]')
67
+ await page.waitForLoadState('networkidle')
68
+ await snapshot({ page })
95
69
  ```
96
70
 
97
71
  ## Common Patterns
@@ -99,17 +73,16 @@ playwriter -s 1 -e 'await snapshot({ page })'
99
73
  ### Navigation and Snapshot
100
74
 
101
75
  ```
102
- browser:
103
- playwriter session new
104
- playwriter -s 1 -e 'await page.goto("https://example.com")'
105
- playwriter -s 1 -e 'await snapshot({ page })'
76
+ exec:browser
77
+ await page.goto('https://example.com')
78
+ await snapshot({ page })
106
79
  ```
107
80
 
108
81
  ### Screenshot with Accessibility Labels
109
82
 
110
83
  ```
111
- browser:
112
- playwriter -s 1 -e 'await screenshotWithAccessibilityLabels({ page })'
84
+ exec:browser
85
+ await screenshotWithAccessibilityLabels({ page })
113
86
  ```
114
87
 
115
88
  ### Data Extraction
@@ -124,51 +97,34 @@ console.log(JSON.stringify(items))
124
97
  ### Persistent State Across Steps
125
98
 
126
99
  ```
127
- browser:
128
- playwriter -s 1 -e 'state.loginDone = false'
129
- playwriter -s 1 -e 'await page.goto("https://app.example.com/login")'
130
- playwriter -s 1 -e 'await page.fill("[name=user]", "admin")'
131
- playwriter -s 1 -e 'await page.fill("[name=pass]", "secret")'
132
- playwriter -s 1 -e 'await page.click("[type=submit]")'
133
- playwriter -s 1 -e 'state.loginDone = true'
134
- ```
135
-
136
- ### Multiple Sessions
137
-
138
- ```
139
- browser:
140
- playwriter session new
141
- playwriter session new
142
- playwriter -s 1 -e 'await page.goto("https://site-a.com")'
143
- playwriter -s 2 -e 'await page.goto("https://site-b.com")'
144
- playwriter session list
100
+ exec:browser
101
+ state.loginDone = false
102
+ await page.goto('https://app.example.com/login')
103
+ await page.fill('[name=user]', 'admin')
104
+ await page.fill('[name=pass]', 'secret')
105
+ await page.click('[type=submit]')
106
+ state.loginDone = true
145
107
  ```
146
108
 
147
- ## JavaScript Evaluation (exec pathway)
148
-
149
- Use `exec:browser` via Bash when you need direct page access. The body is plain JavaScript executed in the browser context.
109
+ ### Console Monitoring
150
110
 
151
111
  ```
152
112
  exec:browser
153
- await page.goto('https://example.com')
154
- await snapshot({ page })
113
+ state.consoleMsgs = []
114
+ page.on('console', msg => state.consoleMsgs.push({ type: msg.type(), text: msg.text() }))
115
+ page.on('pageerror', e => state.consoleMsgs.push({ type: 'error', text: e.message }))
155
116
  ```
156
117
 
157
118
  ```
158
119
  exec:browser
159
- const links = await page.$$eval('a', els => els.map(e => e.href))
160
- console.log(JSON.stringify(links))
120
+ console.log(JSON.stringify(state.consoleMsgs))
161
121
  ```
162
122
 
163
- Never add shell quoting or escaping to the exec body — write plain JavaScript directly.
164
-
165
123
  ## Key Patterns for Agents
166
124
 
167
- **Which pathway to use**:
168
- - Multi-step session workflows → `browser:` prefix with `playwriter -s <id> -e '...'`
169
- - Quick JS eval or data extraction → `exec:browser` with plain JS body
125
+ **Always use `exec:browser`** for any JavaScript — never `playwriter -s <id> -e '...'` for JS code.
170
126
 
171
- **Always use single quotes** for the `-e` argument to playwriter to avoid shell interpretation.
127
+ **`browser:` prefix** is only for session management: `playwriter session new`, `playwriter session list`.
172
128
 
173
129
  **Session IDs are numeric**: `playwriter session new` returns `1`, `2`, etc. Use the exact returned value.
174
130
 
package/tools.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.369",
3
+ "version": "2.0.371",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "tools": [
6
6
  {