You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/power-pages/.mcp.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
"command": "node",
5
5
"args": [
6
6
"-e",
7
-
"const fs=require('node:fs'); const path=require('node:path'); const root=process.env.PLUGIN_ROOT||process.env.CLAUDE_PLUGIN_ROOT||process.cwd(); const entry=path.resolve(root,'scripts','launch-playwright-mcp.js'); if(!fs.existsSync(entry)) throw new Error('Could not resolve Power Pages plugin root; set PLUGIN_ROOT or launch from the plugin root'); const mod=require(entry); if(!mod||typeof mod.launch!=='function') throw new Error('Power Pages Playwright MCP launcher did not export launch()'); mod.launch();"
7
+
"const fs=require('node:fs'); const path=require('node:path'); const fail=(message)=>{throw new Error('[Power Pages Playwright MCP] '+message);}; const declaredRoot=process.env.PLUGIN_ROOT||process.env.CLAUDE_PLUGIN_ROOT; if(!declaredRoot) fail('PLUGIN_ROOT or CLAUDE_PLUGIN_ROOT must be set; refusing to resolve the launcher from the current working directory.'); if(!path.isAbsolute(declaredRoot)) fail('Declared plugin root must be an absolute path: '+declaredRoot+'.'); let root; try{root=fs.realpathSync(declaredRoot);}catch(error){fail('Declared plugin root is invalid: '+declaredRoot+' ('+(error.code||error.message)+').');} if(!fs.statSync(root).isDirectory()) fail('Declared plugin root is not a directory: '+declaredRoot+'.'); const candidate=path.resolve(root,'scripts','launch-playwright-mcp.js'); let entry; try{entry=fs.realpathSync(candidate);}catch(error){fail('Launcher was not found under the declared plugin root: '+candidate+'.');} const relative=path.relative(root,entry); if(relative.startsWith('..'+path.sep)||path.isAbsolute(relative)) fail('Resolved launcher escapes the declared plugin root: '+entry+'.'); if(!fs.statSync(entry).isFile()) fail('Resolved launcher is not a file: '+entry+'.'); const mod=require(entry); if(!mod||typeof mod.launch!=='function') fail('Launcher did not export launch(): '+entry+'.'); mod.launch();"
Copy file name to clipboardExpand all lines: plugins/power-pages/README.md
+14-25Lines changed: 14 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -436,6 +436,8 @@ The plugin ships with two MCP servers configured in `.mcp.json` — they start a
436
436
|**playwright**| Headless browser automation for live previews and runtime tests |
437
437
|**microsoft-learn**| Grounded search/fetch over official Microsoft Learn docs |
438
438
439
+
The plugin host must provide an absolute `PLUGIN_ROOT` (GitHub Copilot) or `CLAUDE_PLUGIN_ROOT` (Claude Code). The Playwright bootstrap resolves its launcher only from that declared plugin root and never from the workspace working directory.
440
+
439
441
## Typical Workflow
440
442
441
443
A common end-to-end workflow looks like this:
@@ -465,33 +467,20 @@ A common end-to-end workflow looks like this:
465
467
466
468
Steps can be run independently — you don't need to follow this exact order. Each skill checks its own prerequisites and will tell you if something is missing. If something goes wrong, `/diagnose-deployment` pattern-matches deployment errors and `/report-issue` opens a pre-filled GitHub issue.
467
469
468
-
## Running Without Interruption
469
-
470
-
The plugin invokes multiple tools during a session. To reduce approval prompts:
471
-
472
-
**Option 1 — Permission mode (recommended)**
473
-
474
-
```jsonc
475
-
// .claude/settings.json
476
-
{
477
-
"defaultMode":"acceptEdits",
478
-
"permissions": {
479
-
"allow": [
480
-
"Bash(npm run *)",
481
-
"Bash(git *)",
482
-
"Bash(pac *)",
483
-
"Bash(az *)",
484
-
"Bash(node *)"
485
-
]
486
-
}
487
-
}
488
-
```
470
+
## Runtime approvals
489
471
490
-
**Option 2 — Auto-accept all**
472
+
Keep your AI host's runtime approval prompts enabled while using this plugin.
473
+
Plugin scripts run on your workstation with the filesystem access and cloud sign-in state available to your user account.
474
+
A script that invokes `pac` or `az` may therefore act on Power Platform environments, Dataverse data, and Azure tenants that you can access.
491
475
492
-
```bash
493
-
claude --dangerously-skip-permissions
494
-
```
476
+
Before approving a command, check the executable, script path, arguments, and target environment.
477
+
Pay particular attention to commands that read or change project files, environment configuration, tenant resources, or business data.
478
+
Do not grant blanket approval to command families such as `node`, `npm`, `git`, `pac`, or `az`.
479
+
480
+
If your host supports command-specific allow rules, use them only for an exact plugin script path that you have inspected and expect to run.
481
+
Keep approval prompts for commands whose arguments or environment variables select a project, environment, tenant, or data source.
482
+
Permission features and rule syntax vary by host and version, so follow the documentation for your host.
483
+
Suppressing an approval prompt does not sandbox a script, restrict the programs it can start, or guarantee that the command is safe.
0 commit comments