gm-copilot-cli 2.0.370 → 2.0.372

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.370
3
+ version: 2.0.372
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.370";
21
+ const DESCRIPTION="State machine agent with hooks, skills, and automated git enforcement",VERSION="2.0.372";
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.370
2
+ version: 2.0.372
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.370",
3
+ "version": "2.0.372",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",
@@ -1,63 +1,12 @@
1
1
  ---
2
2
  name: browser
3
- description: Browser automation via playwriter. Use when user needs to interact with websites, navigate pages, fill forms, click buttons, take screenshots, extract data, test web apps, or automate any browser task.
4
- allowed-tools: Bash(browser:*), Bash(exec:browser*)
3
+ description: Browser automation. Use when user needs to interact with websites, navigate pages, fill forms, click buttons, take screenshots, extract data, test web apps, or automate any browser task.
4
+ allowed-tools: Bash(exec:browser*)
5
5
  ---
6
6
 
7
- # Browser Automation with playwriter
7
+ # Browser Automation
8
8
 
9
- ## Two Pathways
10
-
11
- **Session commands** — use `browser:` prefix via Bash for all browser control.
12
-
13
- Create a session first, then run commands against it. Use `--direct` for CDP mode (no extension needed — requires Chrome with remote debugging):
14
-
15
- ```
16
- browser:
17
- playwriter session new --direct
18
- ```
19
-
20
- Returns a numeric session ID (e.g. `1`). Use that ID for all subsequent commands.
21
-
22
- If `--direct` fails, the user needs Chrome running with debugging enabled:
23
- - Open `chrome://inspect/#remote-debugging` in Chrome, OR
24
- - Launch Chrome with `chrome --remote-debugging-port=9222`
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
- List active sessions:
54
-
55
- ```
56
- browser:
57
- playwriter session list
58
- ```
59
-
60
- **JS eval in browser** — use `exec:browser` via Bash when you need to run JavaScript in the page context directly.
9
+ Use `exec:browser` via Bash for all browser automation. The runtime provides `page`, `snapshot`, `screenshotWithAccessibilityLabels`, and `state` as globals. Sessions persist across calls automatically.
61
10
 
62
11
  ```
63
12
  exec:browser
@@ -65,51 +14,27 @@ await page.goto('https://example.com')
65
14
  await snapshot({ page })
66
15
  ```
67
16
 
68
- ```
69
- exec:browser
70
- const title = await page.title()
71
- console.log(title)
72
- ```
73
-
74
- Always use single quotes for the `-e` argument to avoid shell quoting issues.
75
-
76
17
  ## Core Workflow
77
18
 
78
- Every browser automation follows this pattern:
79
-
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
19
+ Navigate, snapshot to understand the page, then interact:
85
20
 
86
21
  ```
87
- 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 })'
22
+ exec:browser
23
+ await page.goto('https://example.com/form')
24
+ await snapshot({ page })
25
+ await page.fill('[name=email]', 'user@example.com')
26
+ await page.click('[type=submit]')
27
+ await page.waitForLoadState('networkidle')
28
+ await snapshot({ page })
95
29
  ```
96
30
 
97
31
  ## Common Patterns
98
32
 
99
- ### Navigation and Snapshot
100
-
101
- ```
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 })'
106
- ```
107
-
108
33
  ### Screenshot with Accessibility Labels
109
34
 
110
35
  ```
111
- browser:
112
- playwriter -s 1 -e 'await screenshotWithAccessibilityLabels({ page })'
36
+ exec:browser
37
+ await screenshotWithAccessibilityLabels({ page })
113
38
  ```
114
39
 
115
40
  ### Data Extraction
@@ -124,52 +49,35 @@ console.log(JSON.stringify(items))
124
49
  ### Persistent State Across Steps
125
50
 
126
51
  ```
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'
52
+ exec:browser
53
+ state.count = 0
54
+ await page.goto('https://example.com')
55
+ state.title = await page.title()
134
56
  ```
135
57
 
136
- ### Multiple Sessions
137
-
138
58
  ```
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
59
+ exec:browser
60
+ console.log(state.title, state.count)
145
61
  ```
146
62
 
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.
63
+ ### Console Monitoring
150
64
 
151
65
  ```
152
66
  exec:browser
153
- await page.goto('https://example.com')
154
- await snapshot({ page })
67
+ state.consoleMsgs = []
68
+ page.on('console', msg => state.consoleMsgs.push({ type: msg.type(), text: msg.text() }))
69
+ page.on('pageerror', e => state.consoleMsgs.push({ type: 'error', text: e.message }))
155
70
  ```
156
71
 
157
72
  ```
158
73
  exec:browser
159
- const links = await page.$$eval('a', els => els.map(e => e.href))
160
- console.log(JSON.stringify(links))
74
+ console.log(JSON.stringify(state.consoleMsgs))
161
75
  ```
162
76
 
163
- Never add shell quoting or escaping to the exec body — write plain JavaScript directly.
164
-
165
- ## Key Patterns for Agents
166
-
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
77
+ ## Key Rules
170
78
 
171
- **Always use single quotes** for the `-e` argument to playwriter to avoid shell interpretation.
79
+ **Only `exec:browser`** never run any browser CLI tool directly via Bash.
172
80
 
173
- **Session IDs are numeric**: `playwriter session new` returns `1`, `2`, etc. Use the exact returned value.
81
+ **Snapshot before interacting** always call `await snapshot({ page })` to understand current page state before clicking or filling.
174
82
 
175
- **Snapshot before interacting**: always call `await snapshot({ page })` to understand current page state before clicking or filling.
83
+ **State persists** `state` object and page session carry across multiple `exec:browser` calls.
package/tools.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.370",
3
+ "version": "2.0.372",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "tools": [
6
6
  {