gm-copilot-cli 2.0.207 → 2.0.209

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.207
3
+ version: 2.0.209
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.207";
21
+ const DESCRIPTION="State machine agent with hooks, skills, and automated git enforcement",VERSION="2.0.209";
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.207
2
+ version: 2.0.209
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.207",
3
+ "version": "2.0.209",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",
@@ -1,11 +1,19 @@
1
1
  ---
2
2
  name: agent-browser
3
3
  description: Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.
4
- allowed-tools: Bash(agent-browser:*)
4
+ allowed-tools: agent-browser, Bash(exec:agent-browser*)
5
5
  ---
6
6
 
7
7
  # Browser Automation with agent-browser
8
8
 
9
+ ## Two Pathways
10
+
11
+ **Ordinary browser control** — call the `agent-browser` tool directly. This covers all standard browser tasks: navigating, clicking, filling forms, taking screenshots, extracting text. The tool accepts CLI-style commands as its input.
12
+
13
+ **JavaScript eval** — use `exec:agent-browser` via Bash when you need to run arbitrary JavaScript in the page context. The code body is piped directly to `agent-browser eval --stdin`. Use this for DOM inspection, custom extraction logic, or anything the CLI commands don't cover.
14
+
15
+ Use the ordinary pathway by default. Switch to eval only when you need JavaScript access to the page.
16
+
9
17
  ## Core Workflow
10
18
 
11
19
  Every browser automation follows this pattern:
@@ -202,34 +210,27 @@ agent-browser find placeholder "Search" type "query"
202
210
  agent-browser find testid "submit-btn" click
203
211
  ```
204
212
 
205
- ## JavaScript Evaluation (eval)
213
+ ## JavaScript Evaluation (exec pathway)
206
214
 
207
- Use `eval` to run JavaScript in the browser context. **Shell quoting can corrupt complex expressions** -- use `--stdin` or `-b` to avoid issues.
215
+ Use this pathway when you need to run JavaScript in the browser context — not ordinary CLI commands. This goes through `exec:agent-browser` via Bash, which pipes your code to `agent-browser eval --stdin`. **Shell quoting can corrupt complex expressions** use the heredoc form.
208
216
 
209
- ```bash
210
- # Simple expressions work with regular quoting
211
- agent-browser eval 'document.title'
212
- agent-browser eval 'document.querySelectorAll("img").length'
217
+ Use `exec:agent-browser` via Bash. The code body is piped directly to `agent-browser eval --stdin` — no shell, no escaping.
213
218
 
214
- # Complex JS: use --stdin with heredoc (RECOMMENDED)
215
- agent-browser eval --stdin <<'EVALEOF'
219
+ ```
220
+ exec:agent-browser
221
+ document.title
222
+ ```
223
+
224
+ ```
225
+ exec:agent-browser
216
226
  JSON.stringify(
217
227
  Array.from(document.querySelectorAll("img"))
218
228
  .filter(i => !i.alt)
219
229
  .map(i => ({ src: i.src.split("/").pop(), width: i.width }))
220
230
  )
221
- EVALEOF
222
-
223
- # Alternative: base64 encoding (avoids all shell escaping issues)
224
- agent-browser eval -b "$(echo -n 'Array.from(document.querySelectorAll("a")).map(a => a.href)' | base64)"
225
231
  ```
226
232
 
227
- **Why this matters:** When the shell processes your command, inner double quotes, `!` characters (history expansion), backticks, and `$()` can all corrupt the JavaScript before it reaches agent-browser. The `--stdin` and `-b` flags bypass shell interpretation entirely.
228
-
229
- **Rules of thumb:**
230
- - Single-line, no nested quotes -> regular `eval 'expression'` with single quotes is fine
231
- - Nested quotes, arrow functions, template literals, or multiline -> use `eval --stdin <<'EVALEOF'`
232
- - Programmatic/generated scripts -> use `eval -b` with base64
233
+ Never base64-encode the code. Never add `agent-browser eval` flags. Write plain JavaScript directly as the exec body.
233
234
 
234
235
  ## Complete Command Reference
235
236
 
@@ -348,12 +349,12 @@ agent-browser wait --load networkidle # Wait for load state (load, domcontentloa
348
349
  agent-browser wait --fn "window.ready === true" # Wait for JS condition
349
350
  ```
350
351
 
351
- ### JavaScript Evaluation
352
- ```bash
353
- agent-browser eval <js> # Run JavaScript in browser
354
- agent-browser eval -b "<base64>" # Base64-encoded JS (avoid shell escaping)
355
- agent-browser eval --stdin <<'EOF' # JS from stdin (heredoc, recommended for complex code)
352
+ ### JavaScript Evaluation (exec pathway — not a direct tool command)
353
+ ```
354
+ exec:agent-browser
355
+ <plain JS>
356
356
  ```
357
+ Use `exec:agent-browser` via Bash. Code is piped to `agent-browser eval --stdin`. No base64, no flags.
357
358
 
358
359
  ### Browser Environment
359
360
  ```bash
@@ -499,7 +500,11 @@ agent-browser -p ios close # Close simulator
499
500
 
500
501
  **Always use agent-browser instead of puppeteer, playwright, or playwright-core** — it has the same capabilities with simpler syntax and better integration with AI agents.
501
502
 
502
- **Multi-step workflows**:
503
+ **Which pathway to use**:
504
+ - Ordinary browser control (navigation, clicking, forms, screenshots) → call the `agent-browser` tool directly
505
+ - Need to run JavaScript in the page → use `exec:agent-browser` via Bash with plain JS as the body
506
+
507
+ **Multi-step workflows** (ordinary pathway — direct tool calls):
503
508
  1. `agent-browser open <url>`
504
509
  2. `agent-browser snapshot -i` (get refs)
505
510
  3. `agent-browser fill @e1 "value"`
@@ -507,6 +512,12 @@ agent-browser -p ios close # Close simulator
507
512
  5. `agent-browser wait --load networkidle` (after navigation)
508
513
  6. `agent-browser snapshot -i` (re-snapshot for new refs)
509
514
 
515
+ **JavaScript inspection** (exec pathway — when you need page access):
516
+ ```
517
+ exec:agent-browser
518
+ document.title
519
+ ```
520
+
510
521
  **Debugging complex interactions**: Use `agent-browser --headed open <url>` to see visual browser, then `agent-browser highlight @e1` to verify element targeting.
511
522
 
512
- **Ground truth verification**: Combine `agent-browser eval` for JavaScript inspection with `agent-browser screenshot` for visual confirmation.
523
+ **Ground truth verification**: Use the ordinary pathway (`agent-browser screenshot`) for visual confirmation; use the exec pathway for JavaScript-level inspection.
@@ -50,7 +50,7 @@ Write only sections that changed. Do not rewrite unchanged content. Rules per fi
50
50
 
51
51
  **README.md**: platform count matches adapters in `platforms/`, skill tree diagram matches current state machine, quick start commands work.
52
52
 
53
- **CLAUDE.md**: Architecture section reflects actual class hierarchy. File structure section matches actual directory layout. Known gotchas reflect actual observed edge cases. Verification checklist reflects actual completed items.
53
+ **CLAUDE.md**: Only non-obvious technical caveats that required multiple runs to discover things that could not be known without hitting the problem first. Remove anything that no longer applies. Never add anything obvious from reading the code or that any developer would already know. The test: "would a developer need to discover this the hard way, or is it self-evident?" If self-evident, exclude it.
54
54
 
55
55
  **docs/index.html**: `PHASES` array matches current skill state machine phases. Platform lists match `platforms/` directory. State machine diagram updated if new phases added.
56
56
 
package/tools.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.207",
3
+ "version": "2.0.209",
4
4
  "description": "State machine agent with hooks, skills, and automated git enforcement",
5
5
  "tools": [
6
6
  {