A plugin marketplace for GitHub Copilot and other AI agents that provides Power Platform development plugins, including reusable skills, agents, and commands for building and deploying solutions.
JavaScript claude-code-pluginclaude-code-skillscode-appsgithub-copilot-pluginpower-appspower-pagespower-platform
Prefer scoped pickers for media and document access (#504)
Ameya Apted1c1e71b4343
diff --git a/plugins/mobile-apps/agents/native-app-planner.md b/plugins/mobile-apps/agents/native-app-planner.mdindex 1dc83678b..8006644d4 100644--- a/plugins/mobile-apps/agents/native-app-planner.md+++ b/plugins/mobile-apps/agents/native-app-planner.md@@ -170,7 +170,7 @@ Map each shipped module to a user-facing capability slug. Use this known mapping|---|---|---|| `camera` | `expo-camera` | `/add-native camera` || `image-picker` | `expo-image-picker` | `/add-native image-picker` |-| `document-picker` | `expo-document-picker` | — |+| `document-picker` | `expo-document-picker` | `/add-native document-picker` || `pdf-report` | `expo-print` (+ `expo-sharing` when local share is needed and present) | `/add-native pdf-report` || `native-pdf-viewer` | `@microsoft/power-apps-native-pdf-viewer` | `/add-native pdf-viewer` || `pen-input` | `@microsoft/power-apps-native-pen-input` | `/add-native pen-input` |@@ -182,13 +182,14 @@ Map each shipped module to a user-facing capability slug. Use this known mapping| `biometrics` / `local-authentication` | `expo-local-authentication` | `/add-native biometrics` || `clipboard` | `expo-clipboard` | `/add-native clipboard` || `mail-composer` / `email-draft` | `expo-mail-composer` | `/add-native mail-composer` |-| `media-library` | `expo-media-library` | `/add-native media-library` || `audio` | `expo-audio` | `/add-native audio` || `video` | `expo-video` | `/add-native video` || `sensors` | `expo-sensors` | `/add-native sensors` || `screen-orientation` | `expo-screen-orientation` | `/add-native screen-orientation` || `date-time-picker` | `@react-native-community/datetimepicker` | screen-builder form component rule |+For custom workflows outside Dataverse File/Image form fields, plan `image-picker` with `/add-native image-picker` for user-selected photos and videos, or `document-picker` with `/add-native document-picker` for documents and other files. For Dataverse-bound File/Image fields, plan host `<FilePicker>` / `<ImagePicker>` controls instead. Do not plan broad media-library access when either scoped picker path satisfies the workflow.+Do not propose `native-pdf-viewer` or `pen-input` unless the exact extension package is present in the template allowlist output (`@microsoft/power-apps-native-pdf-viewer` and `@microsoft/power-apps-native-pen-input`). Do not propose `geolocation` unless `@microsoft/power-apps-native-bglocation` is present, and only for continuous/background tracking or durable Dataverse upload — use one-shot `location` (`expo-location`) for a single foreground coordinate read. When proposing `geolocation`, record that its Dataverse target table must already exist and must be verified by `/add-native geolocation` (default entity set `msdyn_locationrecords`, or a custom `tableName` whose `fieldMap` columns exist). Do not propose `pdf-report` unless `expo-print` is present. Do not propose local sharing for generated PDFs unless `expo-sharing` is present. If neither package path is present, drop the PDF capability and add a transparency note.PDF fallback order:diff --git a/plugins/mobile-apps/skills/add-native/SKILL.md b/plugins/mobile-apps/skills/add-native/SKILL.mdindex baeef2906..ea735940d 100644--- a/plugins/mobile-apps/skills/add-native/SKILL.md+++ b/plugins/mobile-apps/skills/add-native/SKILL.md@@ -141,7 +141,6 @@ Apply the Native capability gate above. This table is a known capability-to-pack| `biometrics`, `local-authentication` | `expo-local-authentication` | `src/native/biometrics.ts` | Use only when the current template package contains `expo-local-authentication` || `clipboard` | `expo-clipboard` | `src/native/clipboard.ts` | Use only when the current template package contains `expo-clipboard` || `mail-composer`, `email-draft` | `expo-mail-composer` | `src/native/mailComposer.ts` | Opens native mail compose when the package is present; connectors still own server-side email sends |-| `media-library` | `expo-media-library` | `src/native/mediaLibrary.ts` | Use for device media-library access only when package is present || `audio` | `expo-audio` | `src/native/audio.ts` | Use for audio recording/playback only when package is present || `video` | `expo-video` | `src/native/video.ts` | Use for video playback only when package is present || `sensors` | `expo-sensors` | `src/native/sensors.ts` | Use only for sensor APIs exposed by the installed package |@@ -149,6 +148,8 @@ Apply the Native capability gate above. This table is a known capability-to-pack| `device-info` | `expo-device` / `expo-application` / `expo-cellular` | `src/native/deviceInfo.ts` | Read-only device/app/cellular metadata wrappers || `date-time-picker` | `@react-native-community/datetimepicker` | screen-level component usage | Use directly in form screens per screen-builder rules; no `/add-native` wrapper required |+For custom workflows outside Dataverse File/Image form fields, use the `image-picker` capability via `/add-native image-picker` for user-selected photos and videos, or the `document-picker` capability via `/add-native document-picker` for documents and other files. These wrappers use scoped system-picker flows. Dataverse File/Image form fields remain the exception: use host `<FilePicker>` / `<ImagePicker>` controls as described above, not `/add-native` wrappers or raw Expo module imports.+### PDF / pen routing rules- Do not treat every PDF request as `document-picker`.diff --git a/plugins/mobile-apps/template/package.json b/plugins/mobile-apps/template/package.jsonindex 75312d2be..1f3053aec 100644--- a/plugins/mobile-apps/template/package.json+++ b/plugins/mobile-apps/template/package.json@@ -56,7 +56,6 @@"expo-local-authentication": "55.0.13","expo-location": "55.1.9","expo-mail-composer": "55.0.13",- "expo-media-library": "55.0.16","expo-modules-core": "55.0.25","expo-print": "55.0.14","expo-router": "55.0.14",