Skip to content
Back to search

power-platform-skills

MarketplaceWorks with Claude CodeGitHubIncomplete

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026. Its scripts were only partly scanned.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/microsoft/power-platform-skills with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/microsoft/power-platform-skills'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/microsoft-power-platform-skills/badge.svg)](/listings/microsoft-power-platform-skills)

HTML

<a href="/listings/microsoft-power-platform-skills"><img src="/api/listings/microsoft-power-platform-skills/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Quick Install (Recommended)

Run the installer to set up all plugins with auto-update enabled:

**Windows (PowerShell)**:

iwr https://raw.githubusercontent.com/microsoft/power-platform-skills/main/scripts/install.js -OutFile install.js; node install.js; del install.js

**Mac OS/Linux/Windows (cmd)**:

curl -fsSL https://raw.githubusercontent.com/microsoft/power-platform-skills/main/scripts/install.js | node

The installer automatically:

- Installs `pac` CLI if not already installed - Detects available tools (GitHub Copilot CLI, Claude Code) - Registers the plugin marketplace and installs all listed plugins except `dataverse` - Enables auto-update so plugins stay current

The installer validates plugin names in local and downloaded marketplace manifests before installation. Names must follow the Open Plugins format: 1–64 lowercase ASCII letters or digits, with single dots or hyphens allowed between alphanumeric endpoints. CLI arguments are passed directly to executables; Windows batch launchers accept only shell-inert arguments.

To also install the [Dataverse](#dataverse-external) plugin, pass `--include-dataverse`:

iwr https://raw.githubusercontent.com/microsoft/power-platform-skills/main/scripts/install.js -OutFile install.js; node install.js --include-dataverse; del install.js
curl -fsSL https://raw.githubusercontent.com/microsoft/power-platform-skills/main/scripts/install.js | node - --include-dataverse

The `-` tells Node to read the piped script, so the arguments after it reach the installer.

Manual Installation

If you prefer to install manually, run these commands inside a GitHub Copilot CLI or Claude Code session:

1. Add the marketplace

```bash /plugin marketplace add microsoft/power-platform-skills ```

2. Install the desired plugin

```bash /plugin install power-pages@power-platform-skills /plugin install model-apps@power-platform-skills /plugin install pcf@power-platform-skills /plugin install mcp-apps@power-platform-skills /plugin install code-apps-preview@power-platform-skills /plugin install mobile-app@power-platform-skills /plugin install power-apps-mobile-extension@power-platform-skills /plugin install canvas-apps@power-platform-skills /plugin install power-automate@power-platform-skills /plugin install process-intelligence@power-platform-skills /plugin install dataverse@power-platform-skills ```

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 60 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. {
  2. "name": "power-platform-skills",
  3. "owner": {
  4. "name": "Microsoft"
  5. },
  6. "metadata": {
  7. "description": "Plugins for Power Platform development with Claude Code and GitHub Copilot",
  8. "pluginRoot": "."
  9. },
  10. "plugins": [
  11. {
  12. "name": "power-pages",
  13. "source": "./plugins/power-pages"
  14. },
  15. {
  16. "name": "model-apps",
  17. "source": "./plugins/model-apps"
  18. },
  19. {
  20. "name": "pcf",
  21. "source": "./plugins/pcf"
  22. },
  23. {
  24. "name": "mcp-apps",
  25. "source": "./plugins/mcp-apps"
  26. },
  27. {
  28. "name": "canvas-apps",
  29. "source": "./plugins/canvas-apps"
  30. },
  31. {
  32. "name": "code-apps-preview",
  33. "source": "./plugins/code-apps"
  34. },
  35. {
  36. "name": "mobile-app",
  37. "source": "./plugins/mobile-apps"
  38. },
  39. {
  40. "name": "power-apps-mobile-extension",
  41. "source": "./plugins/power-apps-mobile-extension"
  42. },
  43. {
  44. "name": "power-automate",
  45. "source": "./plugins/power-automate"
  46. },
  47. {
  48. "name": "process-intelligence",
  49. "source": "./plugins/process-intelligence"
  50. },
  51. {
  52. "name": "dataverse",
  53. "source": {
  54. "source": "git-subdir",
  55. "url": "microsoft/Dataverse-skills",
  56. "path": ".github/plugins/dataverse"
  57. }
  58. }
  59. ]
  60. }
README.md · README · 404 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # Power Platform Skills
  2. Plugins from Microsoft that teach AI assistants, such as GitHub Copilot and Claude Code, to build on Power Platform.
  3. **[Browse the plugins and install them with one click](https://microsoft.github.io/power-platform-skills/)**
  4. You describe what you want in your own words, such as "Create a Power Pages site with React for a job board" or "Why did the last run of my approval flow fail?".
  5. Your assistant asks follow-up questions, shows you what it plans to do, and asks before it runs commands or changes files.
  6. Then it does the work, from creating tables to publishing the result to your Power Platform environment.
  7. ## What can I build?
  8. | I want to... | Plugin | Try asking |
  9. | --- | --- | --- |
  10. | Build a website | [Power Pages](plugins/power-pages/README.md) | "Create a Power Pages site with React for a job board" |
  11. | Build a business app | [Model-driven apps](plugins/model-apps/README.md) | "Build an app for tracking service requests" |
  12. | Build or change a canvas app | [Canvas apps](plugins/canvas-apps/README.md) | "Edit my Canvas App to add a new screen for reports" |
  13. | Build a web app with code | [Code apps](plugins/code-apps/README.md) (preview) | "Create a code app for tracking customer requests" |
  14. | Build a phone app | [Mobile apps](plugins/mobile-apps/README.md) (private preview) | "Build me a small notes app" |
  15. | Add native phone features to a canvas app | [Power Apps Mobile extensions](plugins/power-apps-mobile-extension/README.md) (preview) | "Design a native barcode scanning feature for my wrapped canvas app" |
  16. | Automate work | [Power Automate](plugins/power-automate/README.md) | "Create a flow that emails me when a new item is added to my SharePoint list" |
  17. | Work with Dataverse data | [Dataverse](https://github.com/microsoft/Dataverse-skills) | "Import this CSV into the contacts table" |
  18. | Find where a process slows down | [Process Intelligence](plugins/process-intelligence/README.md) | "Which steps cause the most waiting in this process?" |
  19. | Build custom controls for forms and views | [PCF](plugins/pcf/README.md) (preview) | "Create a PCF star rating control for a model-driven form" |
  20. | Build tools and widgets for AI assistants | [MCP Apps](plugins/mcp-apps/README.md) | "Show account revenue as a bar chart" |
  21. The [plugin website](https://microsoft.github.io/power-platform-skills/) shows what each plugin needs and more things to ask.
  22. ## Before you start
  23. - **Choose an AI assistant.** Use the [GitHub Copilot app](https://github.com/features/ai/github-app), [GitHub Copilot CLI](https://docs.github.com/copilot/how-tos/copilot-cli/set-up-copilot-cli/install-copilot-cli), or [Claude Code](https://code.claude.com/docs/en/setup).
  24. - **Get a Power Platform environment.** You'll need permission to create or change resources in it.
  25. For learning and experiments, start with a free [developer environment](https://learn.microsoft.com/power-platform/developer/create-developer-environment) rather than an environment with live apps or data.
  26. - **Install [Node.js](https://nodejs.org/en/download).** The quick installer and most plugins need it to run.
  27. Check your chosen plugin's page for any additional tools, such as the Azure CLI or the .NET SDK.
  28. Requirements vary by plugin, so you don't need to install every tool up front.
  29. ## Installation
  30. ### Quick install (recommended)
  31. Open a terminal and run one command.
  32. It installs every plugin into Claude Code and GitHub Copilot CLI, whichever you have.
  33. **Windows (PowerShell)**:
  34. ```powershell
  35. iwr https://raw.githubusercontent.com/microsoft/power-platform-skills/main/scripts/install.js -OutFile install.js; node install.js; del install.js
  36. ```
  37. **macOS, Linux, or Windows (cmd)**:
  38. ```bash
  39. curl -fsSL https://raw.githubusercontent.com/microsoft/power-platform-skills/main/scripts/install.js | node
  40. ```
  41. The installer:
  42. - Installs the Power Platform CLI (`pac`) if it is missing
  43. - Finds Claude Code and GitHub Copilot CLI on your computer
  44. - Adds this plugin marketplace and installs every plugin except `dataverse`
  45. - Turns on automatic updates, so your plugins stay current
  46. To also install the [Dataverse](#dataverse-external) plugin, pass `--include-dataverse`:
  47. ```powershell
  48. iwr https://raw.githubusercontent.com/microsoft/power-platform-skills/main/scripts/install.js -OutFile install.js; node install.js --include-dataverse; del install.js
  49. ```
  50. ```bash
  51. curl -fsSL https://raw.githubusercontent.com/microsoft/power-platform-skills/main/scripts/install.js | node - --include-dataverse
  52. ```
  53. The `-` tells Node to read the piped script, so the arguments after it reach the installer.
  54. ### Install one plugin with a click
  55. The **Claude Code** links open a terminal with the install command already typed.
  56. Press Enter to install.
  57. If nothing happens, open Claude Code once and send any message, then try the link again.
  58. For the **GitHub Copilot app**, [add the Power Platform marketplace](https://github.com/copilot/app/launch?open=ghapp%3A%2F%2Fplugins%2Fmarketplace%2Fadd%3Fsource%3Dmicrosoft%252Fpower-platform-skills) first.
  59. You only do this once.
  60. The app asks you to confirm each step.
  61. | Plugin | Claude Code | GitHub Copilot app |
  62. | --- | --- | --- |
  63. | Power Pages | [Install in Claude Code](https://microsoft.github.io/power-platform-skills/install/?app=claude-code&plugin=power-pages) | [Install in GitHub Copilot app](https://github.com/copilot/app/launch?open=ghapp%3A%2F%2Fplugins%2Finstall%3Fsource%3Dpower-pages%2540power-platform-skills) |
  64. | Model-driven apps | [Install in Claude Code](https://microsoft.github.io/power-platform-skills/install/?app=claude-code&plugin=model-apps) | [Install in GitHub Copilot app](https://github.com/copilot/app/launch?open=ghapp%3A%2F%2Fplugins%2Finstall%3Fsource%3Dmodel-apps%2540power-platform-skills) |
  65. | Canvas apps | [Install in Claude Code](https://microsoft.github.io/power-platform-skills/install/?app=claude-code&plugin=canvas-apps) | [Install in GitHub Copilot app](https://github.com/copilot/app/launch?open=ghapp%3A%2F%2Fplugins%2Finstall%3Fsource%3Dcanvas-apps%2540power-platform-skills) |
  66. | Code apps | [Install in Claude Code](https://microsoft.github.io/power-platform-skills/install/?app=claude-code&plugin=code-apps-preview) | [Install in GitHub Copilot app](https://github.com/copilot/app/launch?open=ghapp%3A%2F%2Fplugins%2Finstall%3Fsource%3Dcode-apps-preview%2540power-platform-skills) |
  67. | Mobile apps | [Install in Claude Code](https://microsoft.github.io/power-platform-skills/install/?app=claude-code&plugin=mobile-app) | [Install in GitHub Copilot app](https://github.com/copilot/app/launch?open=ghapp%3A%2F%2Fplugins%2Finstall%3Fsource%3Dmobile-app%2540power-platform-skills) |
  68. | Power Apps Mobile extensions | [Install in Claude Code](https://microsoft.github.io/power-platform-skills/install/?app=claude-code&plugin=power-apps-mobile-extension) | [Install in GitHub Copilot app](https://github.com/copilot/app/launch?open=ghapp%3A%2F%2Fplugins%2Finstall%3Fsource%3Dpower-apps-mobile-extension%2540power-platform-skills) |
  69. | Power Automate | [Install in Claude Code](https://microsoft.github.io/power-platform-skills/install/?app=claude-code&plugin=power-automate) | [Install in GitHub Copilot app](https://github.com/copilot/app/launch?open=ghapp%3A%2F%2Fplugins%2Finstall%3Fsource%3Dpower-automate%2540power-platform-skills) |
  70. | Process Intelligence | [Install in Claude Code](https://microsoft.github.io/power-platform-skills/install/?app=claude-code&plugin=process-intelligence) | [Install in GitHub Copilot app](https://github.com/copilot/app/launch?open=ghapp%3A%2F%2Fplugins%2Finstall%3Fsource%3Dprocess-intelligence%2540power-platform-skills) |
  71. | Dataverse | [Install in Claude Code](https://microsoft.github.io/power-platform-skills/install/?app=claude-code&plugin=dataverse) | [Install in GitHub Copilot app](https://github.com/copilot/app/launch?open=ghapp%3A%2F%2Fplugins%2Finstall%3Fsource%3Ddataverse%2540power-platform-skills) |
  72. | PCF code components | [Install in Claude Code](https://microsoft.github.io/power-platform-skills/install/?app=claude-code&plugin=pcf) | [Install in GitHub Copilot app](https://github.com/copilot/app/launch?open=ghapp%3A%2F%2Fplugins%2Finstall%3Fsource%3Dpcf%2540power-platform-skills) |
  73. | MCP Apps | [Install in Claude Code](https://microsoft.github.io/power-platform-skills/install/?app=claude-code&plugin=mcp-apps) | [Install in GitHub Copilot app](https://github.com/copilot/app/launch?open=ghapp%3A%2F%2Fplugins%2Finstall%3Fsource%3Dmcp-apps%2540power-platform-skills) |
  74. The Claude desktop app's Code tab and the Claude Code extension for VS Code use the plugins you install in Claude Code.
  75. VS Code also picks up plugins you install with GitHub Copilot CLI.
  76. ### Manual installation
  77. To install from inside a GitHub Copilot CLI or Claude Code session, run these commands:
  78. 1. Add the marketplace
  79. ```bash
  80. /plugin marketplace add microsoft/power-platform-skills
  81. ```
  82. 2. Install the plugins you want
  83. ```bash
  84. /plugin install power-pages@power-platform-skills
  85. /plugin install model-apps@power-platform-skills
  86. /plugin install canvas-apps@power-platform-skills
  87. /plugin install code-apps-preview@power-platform-skills
  88. /plugin install mobile-app@power-platform-skills
  89. /plugin install power-apps-mobile-extension@power-platform-skills
  90. /plugin install power-automate@power-platform-skills
  91. /plugin install process-intelligence@power-platform-skills
  92. /plugin install dataverse@power-platform-skills
  93. /plugin install pcf@power-platform-skills
  94. /plugin install mcp-apps@power-platform-skills
  95. ```
  96. ## Your first request
  97. 1. Open a terminal, make an empty folder for your project, and go into it:
  98. ```bash
  99. mkdir my-first-site
  100. cd my-first-site
  101. ```
  102. 2. Start your assistant by typing `claude` or `copilot`.
  103. In the GitHub Copilot app, add the folder and start a session instead.
  104. 3. Describe what you want, for example "Create a Power Pages site with React for a job board".
  105. 4. Answer its questions.
  106. It may ask you to sign in to Power Platform in your browser and to pick an environment.
  107. 5. Read each permission request before you approve it.
  108. When it finishes, it tells you what it created.
  109. ## Questions
  110. ### Do I need to know how to code?
  111. No.
  112. You describe what you want in your own words.
  113. You run a few commands to install things, and some plugins are aimed at developers.
  114. The [plugin website](https://microsoft.github.io/power-platform-skills/) says who each plugin is for.
  115. ### What does it cost?
  116. The plugins are free and open source under the [MIT](LICENSE) license.
  117. You need your own AI assistant, such as GitHub Copilot or Claude, and a Power Platform environment, which can need Power Platform licenses.
  118. ### Can it break something?
  119. Your assistant asks before it runs commands or changes files.
  120. Many plugins also show you a plan or confirm the environment before they publish.
  121. Try things in a [developer environment](https://learn.microsoft.com/power-platform/developer/create-developer-environment) first.
  122. It's free and separate from your organization's live apps.
  123. ### Why does my assistant keep asking for permission?
  124. Plugins edit files, run commands, and call MCP servers, and your assistant asks before each one by default.
  125. Read what it wants to do before you approve it.
  126. If you trust the work and want fewer prompts, see [Running Without Interruption](#running-without-interruption).
  127. ### What data is collected?
  128. Some plugins send usage data to Microsoft by default, and each one has a command to turn it off.
  129. See [Telemetry](#telemetry) for what is collected.
  130. ### How do I update or remove a plugin?
  131. The quick install turns on automatic updates.
  132. Otherwise, run `claude plugin update <name>` or `copilot plugin update <name>`.
  133. To remove a plugin, run `claude plugin uninstall <name>` or `copilot plugin uninstall <name>`.
  134. ### Where do I get help?
  135. Most plugins include a `report-issue` skill that drafts a bug report for you.
  136. You can also [open an issue](https://github.com/microsoft/power-platform-skills/issues) or read [SUPPORT.md](SUPPORT.md).
  137. ## Words you'll see
  138. For plugins and skills in action, watch the 35-second video [What are plugins and skills?](https://microsoft.github.io/power-platform-skills/#questions) on the plugin website.
  139. | Word | What it means |
  140. | --- | --- |
  141. | AI assistant | An AI tool that can work on your computer, such as Claude Code or GitHub Copilot. |
  142. | Plugin | A package that teaches your assistant a set of jobs. |
  143. | Skill | Instructions for one job, such as creating a site. Your assistant picks one from your request, or you can type its name, such as `/create-site`. |
  144. | Marketplace | A list of plugins your assistant can install. This repository is one. |
  145. | Environment | A space in Power Platform that holds your apps, flows, and data. |
  146. | Dataverse | The database behind Power Apps and Power Automate. |
  147. | PAC CLI | The Power Platform command-line tool. Plugins use it to sign in and publish. |
  148. | Azure CLI | Microsoft's command-line tool for Azure. Some plugins use it to sign in. |
  149. | MCP server | A small program that gives your assistant extra tools, such as access to a service. |
  150. ## Available Plugins
  151. ### [Power Pages](plugins/power-pages/README.md) (`plugins/power-pages`)
  152. Create and deploy Power Pages sites using modern development approaches.
  153. **Currently supported**: Code Sites (SPAs) with React, Angular, Vue, or Astro
  154. ### [Model Apps](plugins/model-apps/README.md) (`plugins/model-apps`)
  155. Build model-driven Power Apps end to end, and the generative pages that go in them.
  156. **Skills**: `/app-builder` builds and edits a whole app — tables, relationships, forms,
  157. views, charts, security roles, app + sitemap — from a natural-language intent; `/genpage` builds
  158. generative pages for an app that already exists. Use either independently — neither requires the other
  159. **Stack**: React + TypeScript + Fluent, deployed through the headless `cds-maker-sdk` (PAC CLI signs you in and chooses the environment)
  160. ### [PCF](plugins/pcf/README.md) (`plugins/pcf`)
  161. Build, test, diagnose, upgrade, deploy, verify and inventory Power Apps component framework (PCF) code components for model-driven apps, with guided setup for Power Pages field controls and canvas apps. Canvas apps need an admin to turn on **Power Apps component framework for canvas apps** in each environment.
  162. **Skills**: `/pcf:pcf` scaffolds Microsoft-maintained PCF templates and recipes, runs gates, deploys with PAC, and verifies registration and bindings.
  163. **Status**: Preview — see [capabilities](plugins/pcf/docs/pcf-capabilities.md)
  164. **Stack**: Node.js 20+, Power Apps component framework, PAC CLI, .NET SDK, and Azure CLI for verification/inventory
  165. ### [MCP Apps](plugins/mcp-apps/README.md) (`plugins/mcp-apps`)
  166. Generate self-contained JavaScript server runtimes, JSON Schema registration metadata,
  167. and interactive single-file MCP App widgets for codeful MCP tools.
  168. **Skills**: `/generate-codeful-mcp-tool` creates a named `runTool` server entry point plus
  169. its description, MCP behavior annotations, input schema, and structured output schema,
  170. with verified Dataverse access; `/generate-mcp-app-ui` creates an HTML widget that embeds
  171. its runtime by default for hosts that block public URLs, while retaining an opt-in CDN
  172. mode. It can consume model-visible content, structured output, and widget-private
  173. metadata.
  174. **Stack**: JavaScript codeful tools + HTML widgets using the MCP Apps protocol
  175. ### [Code Apps](plugins/code-apps/AGENTS.md) (`plugins/code-apps`)
  176. Build and deploy Power Apps code apps connected to Power Platform via connectors.
  177. **Stack**: React + Vite + TypeScript, deployed via PAC CLI
  178. ### [Mobile Apps](plugins/mobile-apps/README.md) (`plugins/mobile-apps`)
  179. Build and deploy Power Apps code apps for mobile with native device capabilities.
  180. **Stack**: Expo + React Native + TypeScript, deployed via Power Apps Wrap
  181. ### [Power Apps Mobile Extension](plugins/power-apps-mobile-extension/README.md) (`plugins/power-apps-mobile-extension`)
  182. Build third-party native controls for wrapped Canvas apps and package them as verified
  183. `.ppmplugin` bundles with matching dispatcher PCF controls.
  184. **Stack**: Kotlin + Objective-C, Power Apps component framework, and Power Apps Wrap
  185. ### [Canvas Apps](plugins/canvas-apps/AGENTS.md) (`plugins/canvas-apps`)
  186. Author Power Apps Canvas Apps using the Canvas Authoring MCP server.
  187. **Stack**: PA YAML (`.pa.yaml`) authored via `CanvasAuthoringMcpServer`, requires .NET 10 SDK
  188. ### [Power Automate](plugins/power-automate/README.md) (`plugins/power-automate`)
  189. Build, edit, run, and debug Power Automate cloud flows via the FlowAgent MCP server.
  190. **Stack**: Node.js 18+, Azure CLI (`az login`), self-contained MCP bundle
  191. ### [Process Intelligence](plugins/process-intelligence/README.md) (`plugins/process-intelligence`)
  192. Analyze Power Automate Process Mining data, including bottlenecks, variants,
  193. cohorts, rework and object-centric executions through guided MCP workflows.
  194. **Skills**: `/analytics` and `/investigate-process` guide analysis;
  195. `/analyze-performance`, `/analyze-variants`, `/analyze-drivers`, `/compare-cohorts`,
  196. `/derive-metric` and `/analyze-objects` answer focused questions.
  197. `/setup` and `/report-issue` handle connection setup and support drafts.
  198. See the [skill catalog](plugins/process-intelligence/README.md#skills).
  199. **Stack**: Node.js 22+ (maintained LTS recommended), Azure CLI, self-contained MCP bundle
  200. GCC, GCC High, DoD and Mooncake are not supported yet.
  201. ### [Dataverse](https://github.com/microsoft/Dataverse-skills) (external)
  202. Work with Microsoft Dataverse: connect to an environment, query and change records, manage tables and columns, and handle security, administration, and solutions.
  203. **Stack**: Dataverse MCP server, Dataverse CLI, Python SDK, and PAC CLI
  204. This plugin is maintained in [microsoft/Dataverse-skills](https://github.com/microsoft/Dataverse-skills), and this marketplace installs it straight from that repository's default branch.
  205. Report issues and send changes there.
  206. If you already installed `dataverse` from the `dataverse-skills` marketplace, keep only one of the two installs so its skills are not loaded twice.
  207. ## Running Without Interruption
  208. Plugins in this repo may invoke multiple tools (file edits, shell commands, MCP servers) during a session, which can result in frequent approval prompts. Use the options below to reduce or eliminate these interruptions.
  209. > **Warning**: Auto-approval options give the agent the same access you have on your machine. Only use these in trusted or sandboxed environments.
  210. ### GitHub Copilot CLI
  211. #### Option 1 — Allow specific tools (recommended)
  212. Pre-approve only the tools your workflow needs:
  213. ```bash
  214. copilot --allow-tool 'write' --allow-tool 'shell(npm run build)' --allow-tool 'shell(pac *)'
  215. ```
  216. #### Option 2 — Allow all tools in Copilot
  217. ```bash
  218. copilot --allow-all-tools
  219. ```
  220. To allow everything except dangerous commands:
  221. ```bash
  222. copilot --allow-all-tools --deny-tool 'shell(rm)' --deny-tool 'shell(git push)'
  223. ```
  224. See the [Copilot CLI docs](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/use-copilot-cli) for the full reference.
  225. ### Claude Code
  226. #### Option 1 — Permission mode (recommended)
  227. Set the `acceptEdits` mode to auto-approve file edits while still prompting for shell commands:
  228. ```jsonc
  229. // .claude/settings.json (project-level) or ~/.claude/settings.json (user-level)
  230. {
  231. "defaultMode": "acceptEdits",
  232. "permissions": {
  233. "allow": [
  234. "Bash(npm run *)",
  235. "Bash(git *)",
  236. "Bash(pac *)"
  237. // add other commands your workflow needs
  238. ]
  239. }
  240. }
  241. ```
  242. #### Option 2 — Allow all tools
  243. Press <kbd>Shift</kbd>+<kbd>Tab</kbd> during a session to cycle to **auto-accept** mode, or launch with:
  244. ```bash
  245. claude --dangerously-skip-permissions
  246. ```
  247. See the [Claude Code permissions docs](https://code.claude.com/docs/en/permissions) for the full reference.
  248. ## Documentation
  249. - [Power Pages Code Sites](https://learn.microsoft.com/en-us/power-pages/configure/create-code-sites)
  250. - [Power Pages REST API](https://learn.microsoft.com/en-us/rest/api/power-platform/powerpages/websites)
  251. - [Generative Pages with External Tools](https://learn.microsoft.com/en-us/power-apps/maker/model-driven-apps/generative-page-external-tools)
  252. - [Build Model-Driven Apps with External Tools](https://learn.microsoft.com/en-us/power-apps/maker/model-driven-apps/model-driven-app-external-tools)
  253. - [Power Apps Code Apps](https://learn.microsoft.com/power-apps/developer/code-apps/)
  254. - [PAC CLI Reference](https://learn.microsoft.com/en-us/power-platform/developer/cli/reference)
  255. ## Contributing
  256. To work on the plugins, see [CONTRIBUTING.md](CONTRIBUTING.md) and the [developer guide](docs/development.md).
  257. The developer guide covers loading a plugin from a local checkout and how the repository fits together.
  258. ## License
  259. The code in this repo is licensed under the [MIT](LICENSE) license.
  260. ## Trademarks
  261. This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
  262. trademarks or logos is subject to and must follow
  263. [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/legal/intellectualproperty/trademarks/usage/general).
  264. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
  265. Any use of third-party trademarks or logos are subject to those third-party's policies.
  266. ## Telemetry
  267. Some plugins send usage data to Microsoft to help improve them: Power Pages, Model-driven apps, PCF, Mobile apps, Power Apps Mobile extensions, and Power Automate.
  268. It is on by default.
  269. - **What's sent:** which skill ran, the plugin version, your AI assistant, and your operating system, and for some skills whether they succeeded and how long they took.
  270. When you're signed in to Power Platform, it can also include your organization and tenant IDs, and for some plugins your Microsoft Entra user ID.
  271. - **What's never sent:** what you type, file paths, site or app names, error messages, or usernames.
  272. - **To turn it off** for a plugin, ask your assistant to "turn off telemetry", or run the plugin's telemetry skill, such as `/power-pages:telemetry off`.
  273. In scripts and CI, set the plugin's environment variable instead, such as `POWER_PLATFORM_SKILLS_TELEMETRY_POWER_PAGES_OPTOUT=1`.
  274. Turning it off stops sending; the plugin still keeps a local log, so you can see what would have been sent.
  275. Each plugin's README lists exactly what it sends, and the [telemetry guide](shared/telemetry/README.md) has the full details.
  276. See also the [Microsoft Privacy Statement](https://www.microsoft.com/privacy/privacystatement).
plugins/mobile-apps/scripts/lib/telemetry/lib/agent-info.js · Bundled script · 215 lines · 1 finding marked
  1. "use strict";
  2. const fs = require("node:fs");
  3. const path = require("node:path");
  4. const { runNative } = require("./native-exec");
  5. let pacCliVersionCache;
  6. // Reads the PAC CLI version once per process via `pac --version`, started by
  7. // absolute path from PATH (see native-exec.js). Best-effort
  8. // and fail-closed: missing executable, timeout, or unparseable output all
  9. // resolve to "".
  10. //
  11. // PAC 2.x prints the version banner ("Version: X.Y.Z+...") to stdout as part
  12. // of its preamble but then treats `--version` as an unknown command and
  13. // exits with status 1. execFileSync throws on non-zero exit, attaching the
  14. // captured stdout to err.stdout — so we parse that fallback path too.
  15. function readPacCliVersion(opts = {}) {
  16. if (pacCliVersionCache !== undefined) return pacCliVersionCache;
  17. if (opts._exec === false) {
  18. pacCliVersionCache = "";
  19. return "";
  20. }
  21. const exec = typeof opts._exec === "function" ? opts._exec : runNative;
  22. let stdout = "";
  23. try {
  24. stdout = exec("pac", ["--version"], {
  25. encoding: "utf8",
  26. timeout: 8000,
  27. stdio: ["ignore", "pipe", "pipe"],
  28. });
  29. } catch (err) {
  30. stdout = (err && err.stdout) ? String(err.stdout) : "";
  31. }
  32. const match = String(stdout || "").match(/Version:\s*(\d+\.\d+\.\d+(?:\.\d+)?)/);
  33. pacCliVersionCache = match ? match[1] : "";
  34. return pacCliVersionCache;
  35. }
  36. // Test seam.
  37. function _resetCache() {
  38. pacCliVersionCache = undefined;
  39. }
  40. // Parses a dotted semver out of the AI_AGENT env var. Claude Code sets
  41. // AI_AGENT=claude-code_<maj>-<min>-<patch>_agent (e.g.
  42. // "claude-code_2-1-156_agent"); the version segment uses dashes, so we
  43. // normalize separators to dots. The "claude-code" name prefix carries no
  44. // digits, so the first numeric run is the version.
  45. function parseVersionFromAiAgent(aiAgent) {
  46. if (typeof aiAgent !== "string") return "";
  47. const match = aiAgent.match(/\d+(?:[._-]\d+)+/);
  48. return match ? match[0].replace(/[._-]/g, ".") : "";
  49. }
  50. // Reads the Claude Code CLI version. Primary source is the installed
  51. // package.json: the hook subprocess inherits CLAUDE_CODE_EXECPATH from Claude
  52. // Code, and jumping one directory above the executable's bin/ lands on the npm
  53. // package root. That layout only exists for npm-global installs — the native
  54. // installer ships a standalone binary with no sibling package.json — so when
  55. // the read yields nothing, fall back to the version carried in AI_AGENT, which
  56. // Claude Code sets regardless of install method.
  57. function readClaudeCodeVersion(env) {
  58. const execPath = env.CLAUDE_CODE_EXECPATH;
  59. if (execPath) {
  60. try {
  61. const pkgPath = path.join(path.dirname(execPath), "..", "package.json");
  62. const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
  63. if (pkg && typeof pkg.version === "string") return pkg.version;
  64. } catch {
  65. // pkg unreadable; fall through to the AI_AGENT fallback
  66. }
  67. }
  68. return parseVersionFromAiAgent(env.AI_AGENT);
  69. }
  70. function isTruthyEnv(value) {
  71. if (typeof value !== "string") return false;
  72. const normalized = value.trim().toLowerCase();
  73. return normalized !== "" && normalized !== "0" && normalized !== "false";
  74. }
  75. function firstEnv(env, keys) {
  76. for (const key of keys) {
  77. if (typeof env[key] === "string" && env[key]) return env[key];
  78. }
  79. return "";
  80. }
  81. function normalizeAgentName(name) {
  82. return String(name || "").toLowerCase().replace(/[^a-z0-9]/g, "");
  83. }
  84. const AGENT_DETECTORS = [
  85. {
  86. name: "Claude Code",
  87. aliases: ["claude", "claudecode"],
  88. isPresent: (env) => isTruthyEnv(env.CLAUDECODE),
  89. version: readClaudeCodeVersion,
  90. },
  91. {
  92. name: "Copilot CLI",
  93. aliases: ["copilot", "copilotcli", "githubcopilot", "githubcopilotcli"],
  94. isPresent: (env) => isTruthyEnv(env.COPILOT_CLI),
  95. version: (env) =>
  96. firstEnv(env, ["COPILOT_CLI_BINARY_VERSION", "COPILOT_CLI_VERSION"]),
  97. },
  98. {
  99. name: "Codex",
  100. aliases: ["codex", "codexcli", "openaicodex"],
  101. isPresent: (env) => isTruthyEnv(env.CODEX_CLI) || isTruthyEnv(env.CODEX),
  102. version: (env) =>
  103. firstEnv(env, [
  104. "CODEX_CLI_BINARY_VERSION",
  105. "CODEX_CLI_VERSION",
  106. "CODEX_VERSION",
  107. ]) || parseVersionFromAiAgent(env.AI_AGENT),
  108. },
  109. {
  110. name: "OpenCode",
  111. aliases: ["opencode", "opencodecli", "open_code"],
  112. isPresent: (env) => isTruthyEnv(env.OPENCODE_CLI) || isTruthyEnv(env.OPENCODE),
  113. version: (env) =>
  114. firstEnv(env, [
  115. "OPENCODE_CLI_BINARY_VERSION",
  116. "OPENCODE_CLI_VERSION",
  117. "OPENCODE_VERSION",
  118. ]) || parseVersionFromAiAgent(env.AI_AGENT),
  119. },
  120. {
  121. name: "Hermes",
  122. aliases: ["hermes", "hermescli", "hermesagent"],
  123. isPresent: (env) =>
  124. isTruthyEnv(env.HERMES_CLI) ||
  125. isTruthyEnv(env.HERMES) ||
  126. isTruthyEnv(env.HERMES_AGENT),
  127. version: (env) =>
  128. firstEnv(env, [
  129. "HERMES_CLI_BINARY_VERSION",
  130. "HERMES_CLI_VERSION",
  131. "HERMES_AGENT_VERSION",
  132. "HERMES_VERSION",
  133. ]) || parseVersionFromAiAgent(env.AI_AGENT),
  134. },
  135. {
  136. name: "OpenClaw",
  137. aliases: ["openclaw", "openclawcli"],
    • Note: Quoted as data in code: Matches the ClawHavoc malware campaign against agent skills (Koi Security, February 2026; samples in the openclaw/skills archive)
    • Line 147 on GitHub
  138. isPresent: (env) =>
  139. isTruthyEnv(env.OPENCLAW_CLI) || isTruthyEnv(env.OPENCLAW),
  140. version: (env) =>
  141. firstEnv(env, [
  142. "OPENCLAW_CLI_BINARY_VERSION",
  143. "OPENCLAW_CLI_VERSION",
  144. "OPENCLAW_VERSION",
  145. ]) || parseVersionFromAiAgent(env.AI_AGENT),
  146. },
  147. ];
  148. function detectorForName(name) {
  149. const normalized = normalizeAgentName(name);
  150. return AGENT_DETECTORS.find((detector) =>
  151. detector.aliases.some((alias) => normalizeAgentName(alias) === normalized)
  152. );
  153. }
  154. function detectFromAiAgent(env) {
  155. const aiAgent = env.AI_AGENT;
  156. if (typeof aiAgent !== "string" || !aiAgent) return null;
  157. const normalized = normalizeAgentName(aiAgent);
  158. const detector = AGENT_DETECTORS.find((candidate) =>
  159. candidate.aliases.some((alias) => normalized.includes(normalizeAgentName(alias)))
  160. );
  161. if (!detector) return null;
  162. return {
  163. aiAgentName: detector.name,
  164. aiAgentVersion: detector.version(env) || parseVersionFromAiAgent(aiAgent),
  165. };
  166. }
  167. function detectKnownAgent(env) {
  168. for (const detector of AGENT_DETECTORS) {
  169. if (detector.isPresent(env)) {
  170. return {
  171. aiAgentName: detector.name,
  172. aiAgentVersion: detector.version(env) || "",
  173. };
  174. }
  175. }
  176. return detectFromAiAgent(env);
  177. }
  178. // Detects the AI agent host. Prefers explicit env vars; falls back to
  179. // built-in detection for known CLI hosts. When AI_AGENT_NAME is set explicitly
  180. // but AI_AGENT_VERSION is empty, backfill the version from whichever detector
  181. // matches — avoids emitting an empty aiAgentVersion just because the settings
  182. // file only carried half the pair.
  183. function readAiAgent(env = process.env) {
  184. const explicitName = env.AI_AGENT_NAME;
  185. const explicitVersion = env.AI_AGENT_VERSION;
  186. if (explicitName) {
  187. let version = explicitVersion || "";
  188. if (!version) {
  189. const explicitDetector = detectorForName(explicitName);
  190. const detected = detectKnownAgent(env);
  191. if (explicitDetector) version = explicitDetector.version(env) || "";
  192. if (!version && detected) version = detected.aiAgentVersion || "";
  193. }
  194. return { aiAgentName: explicitName, aiAgentVersion: version };
  195. }
  196. const detected = detectKnownAgent(env);
  197. if (detected) return detected;
  198. return { aiAgentName: "", aiAgentVersion: "" };
  199. }
  200. module.exports = { readPacCliVersion, readAiAgent, _resetCache };
plugins/model-apps/scripts/lib/cli-failure.js · Bundled script · 137 lines · 1 finding marked
  1. 'use strict';
  2. // How a CLI child process failed, and how long one Azure CLI call may take.
  3. //
  4. // The auth preflight and every Dataverse token read shell out to `az` (check-auth also to `pac`), and
  5. // each failure used to come back as the same thing: null. A slow Azure CLI therefore read as a missing
  6. // or signed-out one — a cached-token read was measured at 44.6 s on a busy machine, past the 30 s
  7. // budget, and check-auth reported `az_missing` ("not installed") while every script said "run az login".
  8. // Neither was the problem. A failure now has one of three kinds, and a timeout is reported as one.
  9. const AZ_TIMEOUT_ENV = 'POWER_PLATFORM_SKILLS_AZ_TIMEOUT_MS';
  10. const DEFAULT_AZ_TIMEOUT_MS = 60000;
  11. // The range an override may take: 1 s to 15 min. Shared by the parser and the advice below, so the
  12. // advice can never suggest a value the parser would reject — and so fall back to the 60 s default.
  13. const MIN_AZ_TIMEOUT_MS = 1000;
  14. const MAX_AZ_TIMEOUT_MS = 900000;
  15. // The budget for one Azure CLI call: 60 s, or POWER_PLATFORM_SKILLS_AZ_TIMEOUT_MS milliseconds (1 s to
  16. // 15 min). An unusable value keeps the default rather than failing the run — this is a tuning knob for
  17. // a slow machine, not an input a mistake in which should stop the work.
  18. function azTimeoutMs(env = process.env) {
  19. const n = Number(env && env[AZ_TIMEOUT_ENV]);
  20. return Number.isInteger(n) && n >= MIN_AZ_TIMEOUT_MS && n <= MAX_AZ_TIMEOUT_MS ? n : DEFAULT_AZ_TIMEOUT_MS;
  21. }
  22. // 'timeout' | 'missing' | 'failed' for an error from the process runner, or null for none. The shapes
  23. // Node gives each case (https://nodejs.org/api/child_process.html):
  24. // execFileSync / spawnSync past `timeout` code 'ETIMEDOUT'
  25. // execFile past `timeout` killed: true, signal: the kill signal, code: null
  26. // not on PATH code 'ENOENT' — the runner resolves the executable before
  27. // it spawns anything ("spawn az ENOENT: not found on PATH")
  28. // Any other code (a non-zero exit, output past maxBuffer — which also kills the child) is 'failed'.
  29. function cliFailureKind(error) {
  30. if (!error) return null;
  31. if (error.code === 'ETIMEDOUT') return 'timeout';
  32. if (error.code === 'ENOENT') return 'missing';
  33. if (typeof error.code === 'string') return 'failed';
  34. if (error.killed === true && error.signal) return 'timeout';
  35. if (/\bENOENT\b/.test(String(error.message || ''))) return 'missing';
  36. return 'failed';
  37. }
  38. // What to tell the user when `command` ran out of time: that it was slow, and how to allow it longer. The
  39. // suggested budget is double the one that ran out (at least 2 min), CAPPED at the maximum the parser
  40. // accepts — a suggestion above it would be rejected and quietly put the budget back to 60 s. Once the
  41. // budget is already the maximum, more time is not the remedy, and the advice says so.
  42. function azTimeoutAdvice(command, ms = azTimeoutMs()) {
  43. const ranOut = `\`${command}\` did not answer within ${Math.round(ms / 1000)} s.`;
  44. if (ms >= MAX_AZ_TIMEOUT_MS) {
  45. return `${ranOut} That is already the longest ${AZ_TIMEOUT_ENV} allows (${MAX_AZ_TIMEOUT_MS / 60000} min), so `
  46. + `waiting longer will not help: run \`${command}\` yourself to see whether Azure CLI answers at all, then retry.`;
  47. }
  48. const longer = Math.min(Math.max(ms * 2, 120000), MAX_AZ_TIMEOUT_MS);
  49. return `${ranOut} Azure CLI can take that long to start on a busy machine — retry, or allow it longer with `
  50. + `${AZ_TIMEOUT_ENV}=${longer}.`;
  51. }
  52. // One argument of a command that a message tells the user — or the agent driving the skill — to paste, written so that pasting the command hands the
  53. // program it runs (`node`) exactly this value, as ONE argument, in the shells the skill's own commands are written for: PowerShell (Windows PowerShell 5.1
  54. // and PowerShell 7) and the POSIX shells (sh, bash, zsh). The skill's instructions quote arguments in single quotes ('<working-dir>/<file>.tsx'); cmd.exe,
  55. // which reads no single quotes, is not one of them.
  56. // letters and digits of any script, and `_ . / : -` written bare: no shell reads anything in them
  57. // (not a leading `-`)
  58. // anything else single-quoted: inside '…' neither PowerShell nor a POSIX shell expands, substitutes or splits
  59. // anything, so `;`, `$(…)`, backticks, `|`, `&`, globs, `\` and white space stay literal
  60. // null — no spelling, so the caller writes a placeholder and names the value outside the command (commandArgOrPlaceholder) — for:
  61. // a single quote, or one PowerShell reads as one PowerShell doubles a quote, a POSIX shell closes and reopens one: no spelling is literal in both
  62. // (‘ ’ ‚ ‛), a line break or another control
  63. // character (a tab is fine)
  64. // a double quote; white space with a `\` at the Windows PowerShell does not hand a native program its arguments as they are: it joins them into one
  65. // end; the empty value command line, wrapping a value that holds white space in double quotes and escaping nothing, so the
  66. // program drops a `"` ('x"y.tsx' arrives as xy.tsx) and reads the closing quote after a final `\` as
  67. // an escaped one ('C:\Dev User\' arrives as C:\Dev User"); an empty value is not passed at all.
  68. // PowerShell 7.3 and later pass all three as they are; Windows PowerShell 5.1 is still the one
  69. // Windows ships.
  70. // exactly `--%` PowerShell's stop-parsing token: both PowerShells take it for the token even quoted, and drop it
  71. // Measured on Windows PowerShell 5.1 and PowerShell 7.6 (tests/cli-failure.test.js runs every spelling through each shell it finds and reads node's argv).
  72. // See https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_parsing#passing-arguments-that-contain-quote-characters and
  73. // https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_parsing#the-stop-parsing-token.
  74. // A path can come from an untrusted checkout, so a value is written bare only when it is plain: a file named `x;rm -rf ~;.tsx`, written bare or in double
    • Note: Quoted as data in code: Runs `rm -rf` against a root or home-directory path
    • Line 80 on GitHub
  75. // quotes, would run its second half when the advice is pasted.
  76. const BARE_ARG = /^(?!-)[\p{L}\p{N}_./:-]+$/u;
  77. const UNQUOTABLE = /['"\u2018\u2019\u201A\u201B\p{Zl}\p{Zp}]|[^\P{Cc}\t]/u;
  78. function commandArg(value) {
  79. const text = String(value);
  80. if (BARE_ARG.test(text)) return text;
  81. if (UNQUOTABLE.test(text) || text === '' || text === '--%' || (/\s/u.test(text) && text.endsWith('\\'))) return null;
  82. return `'${text}'`;
  83. }
  84. // commandArg's spelling of `value`, or — when it has none — `placeholder` (`<file>`), with the sentence a message adds to name the value as data, never as part of
  85. // a command.
  86. function commandArgOrPlaceholder(value, placeholder) {
  87. const arg = commandArg(value);
  88. if (arg !== null) return { arg, note: '' };
  89. return {
  90. arg: placeholder,
  91. note: `${placeholder} is ${JSON.stringify(String(value))}; it is not written into the command because no way of writing it reaches the command unchanged in both PowerShell and a POSIX shell.`,
  92. };
  93. }
  94. // The `--authorize <approval>` flag a message tells the maker to paste, as ONE argument. An approval is built from a name the maker wrote (a view, a form, a rule,
  95. // a dashboard key), so it can hold white space — `adopt:view:contoso_item/Declared Items` — and an unquoted paste reaches the CLI as two arguments
  96. // (`adopt:view:contoso_item/Declared`, `Items`), which it rejects as an approval nothing declares.
  97. // A spelling is printed only when it reaches Windows PowerShell 5.1, PowerShell 7 and the POSIX shells as that one unchanged argument (measured in each):
  98. // plain (letters, digits, `_ . / : -`) written bare, exactly as before: `--authorize adopt:view:contoso_item/Items`
  99. // white space and ordinary punctuation double-quoted, the spelling the printed approvals already used for a form, a rule and a process flow:
  100. // `--authorize "adopt:view:contoso_item/Declared Items"`
  101. // a `$`, a backtick, `\`, `!` or a curly double quote, and no quote of any kind
  102. // commandArg's single-quoted spelling, literal in all three: `--authorize 'adopt:view:contoso_item/cost $5'`
  103. // anything else (a `"`; an apostrophe together with one of the characters above; a final `\`; a control character)
  104. // no spelling is printed. The three shells quote these characters differently — Windows PowerShell 5.1 in particular joins
  105. // its arguments into one command line and re-splits it, so a `"` followed by white space is cut in two whatever is written
  106. // around it — and a spelling that is wrong in one of them hands the CLI a different, shortened key. The message gives the
  107. // exact key as a JSON string and says to pass that key as ONE `--authorize` argument.
  108. // a line break (`\n`, `\r`, U+2028, U+2029) or NUL (U+0000)
  109. // cannot be given at all: the approval parser (build-model-app.js authorizationKeys) reads a name with `.`, which stops at a
  110. // line break, and refuses NUL by name (no operating system passes NUL in a process argument), so it refuses such a key
  111. // whatever the shell does; the message says so.
  112. // Double quotes rather than commandArg's single quotes keep the spelling already printed (and pinned) for forms, rules and process flows.
  113. const DOUBLE_QUOTE_UNSAFE = /["$`\\!\u201C\u201D\u201E\u201F\p{Zl}\p{Zp}]|[^\P{Cc}\t]/u;
  114. const LINE_BREAK = /[\n\r\u2028\u2029]|\u0000/;
  115. function authorizeFlag(approval) {
  116. const text = String(approval);
  117. if (BARE_ARG.test(text)) return `--authorize ${text}`;
  118. if (text !== '' && !DOUBLE_QUOTE_UNSAFE.test(text)) return `--authorize "${text}"`;
  119. if (LINE_BREAK.test(text)) {
  120. return `--authorize <approval> — <approval> is ${JSON.stringify(text)}; it holds ${text.includes('\u0000') ? 'a NUL character (U+0000), which no command-line argument can carry and' : 'a line break, which'} the build's approval reader does not accept in a name, so this approval cannot be given: rename the item so its name has none`;
  121. }
  122. // Windows PowerShell 5.1 wraps an argument that holds white space in double quotes itself, so a final `\` would escape that closing quote.
  123. const single = text.endsWith('\\') ? null : commandArg(text);
  124. if (single !== null) return `--authorize ${single}`;
  125. return `--authorize <approval> — <approval> is exactly the JSON string ${JSON.stringify(text)} (decode its escapes); its characters are quoted differently by each shell, so pass that exact key as ONE --authorize argument, for example by asking the agent to run the build with it`;
  126. }
  127. module.exports = { AZ_TIMEOUT_ENV, DEFAULT_AZ_TIMEOUT_MS, MIN_AZ_TIMEOUT_MS, MAX_AZ_TIMEOUT_MS, azTimeoutMs, cliFailureKind, azTimeoutAdvice, commandArg,
  128. commandArgOrPlaceholder, authorizeFlag };

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.