greenrun-cli 0.1.1 → 0.1.3

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.
@@ -66,12 +66,12 @@ async function validateToken(token) {
66
66
  }
67
67
  function configureMcpLocal(token) {
68
68
  try {
69
- execSync(`claude mcp add --transport stdio -e GREENRUN_API_TOKEN=${token} greenrun -- npx -y greenrun-cli@latest`, { stdio: 'inherit' });
69
+ execSync(`claude mcp add greenrun --transport stdio -e GREENRUN_API_TOKEN=${token} -- npx -y greenrun-cli@latest`, { stdio: 'inherit' });
70
70
  }
71
71
  catch {
72
72
  console.error('\nFailed to run "claude mcp add". Make sure Claude Code is installed and in your PATH.');
73
73
  console.error('You can add the MCP server manually by running:\n');
74
- console.error(` claude mcp add --transport stdio -e GREENRUN_API_TOKEN=${token} greenrun -- npx -y greenrun-cli@latest\n`);
74
+ console.error(` claude mcp add greenrun --transport stdio -e GREENRUN_API_TOKEN=${token} -- npx -y greenrun-cli@latest\n`);
75
75
  }
76
76
  }
77
77
  function configureMcpProject(token) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "greenrun-cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "CLI and MCP server for Greenrun - browser test management for Claude Code",
5
5
  "type": "module",
6
6
  "main": "dist/server.js",
@@ -40,7 +40,7 @@ Ask the user if they want to run the affected tests. If yes, execute them **in p
40
40
 
41
41
  Use the project's `concurrency` setting (default: 5) to determine batch size. Split affected tests into batches and launch each batch simultaneously using the **Task tool** with `run_in_background: true`.
42
42
 
43
- For each test in a batch, launch a background agent with this prompt:
43
+ For each test in a batch, launch a background agent with `max_turns: 30` and `model: "sonnet"`. Use this prompt:
44
44
 
45
45
  ```
46
46
  You are executing a single Greenrun browser test. You have access to browser automation tools and Greenrun MCP tools.
@@ -50,14 +50,19 @@ You are executing a single Greenrun browser test. You have access to browser aut
50
50
  Step 1: Call `get_test` with test_id "{test_id}" to get full instructions.
51
51
  Step 2: Call `start_run` with test_id "{test_id}" to begin - save the returned `run_id`.
52
52
  Step 3: Execute the test instructions using browser automation:
53
- - Create a new browser tab for this test
53
+ - Call `tabs_context_mcp` then create a new browser tab for this test
54
54
  - Follow each instruction step exactly as written
55
55
  - The instructions will tell you where to navigate and what to do
56
- - Observe results and take screenshots as needed for verification
56
+ - Only take a screenshot when you need to verify a visual assertion — not for every navigation or click
57
+ - When reading page content, prefer `find` or `read_page` with `filter: "interactive"` over full DOM reads
58
+ - NEVER trigger JavaScript alerts, confirms, or prompts — they block the browser extension entirely. Before clicking delete buttons or other destructive actions, use `javascript_tool` to override: `window.alert = () => {}; window.confirm = () => true; window.prompt = () => null;`
59
+ - If browser tools stop responding (no result or timeout), assume a dialog is blocking — report the error and stop. Do not keep retrying.
60
+ - If you get stuck or a step fails, record the failure and move on — do not retry more than once
57
61
  Step 4: Call `complete_run` with:
58
62
  - run_id: the run ID from step 2
59
63
  - status: "passed" if all checks succeeded, "failed" if any check failed, "error" if execution was blocked
60
- - result: a brief summary of what happened
64
+ - result: a brief summary of what happened (include the failure reason if failed/error)
65
+ Step 5: Close the browser tab you created to clean up.
61
66
 
62
67
  Return a single line summary: {test_name} | {status} | {result_summary}
63
68
  ```
@@ -33,6 +33,8 @@ For each batch, launch all tests simultaneously using the **Task tool** with `ru
33
33
  For each test in the current batch, call the Task tool with:
34
34
  - subagent_type: "general-purpose"
35
35
  - run_in_background: true
36
+ - max_turns: 30
37
+ - model: "sonnet"
36
38
  - prompt: (see below)
37
39
  ```
38
40
 
@@ -46,14 +48,19 @@ You are executing a single Greenrun browser test. You have access to browser aut
46
48
  Step 1: Call `get_test` with test_id "{test_id}" to get full instructions.
47
49
  Step 2: Call `start_run` with test_id "{test_id}" to begin - save the returned `run_id`.
48
50
  Step 3: Execute the test instructions using browser automation:
49
- - Create a new browser tab for this test
51
+ - Call `tabs_context_mcp` then create a new browser tab for this test
50
52
  - Follow each instruction step exactly as written
51
53
  - The instructions will tell you where to navigate and what to do
52
- - Observe results and take screenshots as needed for verification
54
+ - Only take a screenshot when you need to verify a visual assertion — not for every navigation or click
55
+ - When reading page content, prefer `find` or `read_page` with `filter: "interactive"` over full DOM reads
56
+ - NEVER trigger JavaScript alerts, confirms, or prompts — they block the browser extension entirely. Before clicking delete buttons or other destructive actions, use `javascript_tool` to override: `window.alert = () => {}; window.confirm = () => true; window.prompt = () => null;`
57
+ - If browser tools stop responding (no result or timeout), assume a dialog is blocking — report the error and stop. Do not keep retrying.
58
+ - If you get stuck or a step fails, record the failure and move on — do not retry more than once
53
59
  Step 4: Call `complete_run` with:
54
60
  - run_id: the run ID from step 2
55
61
  - status: "passed" if all checks succeeded, "failed" if any check failed, "error" if execution was blocked
56
- - result: a brief summary of what happened
62
+ - result: a brief summary of what happened (include the failure reason if failed/error)
63
+ Step 5: Close the browser tab you created to clean up.
57
64
 
58
65
  Return a single line summary: {test_name} | {status} | {result_summary}
59
66
  ```