Skip to content

Commit a8d8624

Browse files
author
Shubham Agarwal
committed
Fixes for create app registration
1 parent f877278 commit a8d8624

9 files changed

Lines changed: 146 additions & 734 deletions

File tree

plugins/mobile-apps/AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Do not add preparation rewrites for `scheme`, `package`, `bundleIdentifier`, `sr
8080
-`/edit-app` skill for post-generation app iteration: updates the approved plan delta, applies Dataverse/native/design/screen mutations, verifies, and refreshes preview output. `--plan-only` is the explicit docs-only escape hatch.
8181
- ✅ Single `/deploy` skill — `npm run build` + `npx power-apps push`; no local native compile, no OTA in v0
8282
- ✅ Connection model: per-environment connections, with platform-specific auth (`expo-msal-intune` on native, `expo-auth-session` on web)
83-
- ✅ Auth: `/create-mobile-app` asks for an existing Entra app registration client ID and writes it to `auth.config.json` with the tenant resolved from the selected Power Platform environment (`scripts/resolve-environment.js`). `/set-app-registration-native` is retained for advanced tenant-admin create/update scenarios.
83+
- ✅ Auth: `/create-mobile-app` resolves the tenant from the selected Power Platform environment (`scripts/resolve-environment.js`), writes that tenant to `auth.config.json`, then lets the user paste an app registration client ID, create one from the Power Apps Wrap page and paste it, or skip auth for later. `/set-app-registration-native` is a manual helper for the same Wrap-page + pasted-client-ID flow.
8484
-`/add-native` v0 scope: camera, location, push, biometrics, secure-store (already in template)
8585
- ✅ Template is supplied as a fresh `pa-wrap-tools/templates/expo-app-standalone` folder before `/create-mobile-app` runs; users materialize it with `degit`, run `npm install`, then invoke the skill from that folder. The skill validates/prepares the folder and runs `npx power-apps init`.
8686
-`brand/` directory convention: `/design-system` (Step 6.75) writes `brand/design-system.md` (spec), `brand/tokens.ts` (importable Tamagui tokens), and `brand/design-system.html` (visual gallery). Screen-builders MUST read `brand/design-system.md` if present; `## Negatives` = HARD RULES. `/create-mobile-app` Step 9b imports `brand/tokens.ts` via `skills/design-system/references/tamagui-integration.md`. Projects without `brand/` fall back to `## Design Direction` only — no breakage.

plugins/mobile-apps/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ The skill checks these in Step 1 (Prerequisites) and stops with a clear error if
155155
| Tool | Min version | How to install / check |
156156
|---|---|---|
157157
| Node.js | **22.x** | `node -v` — install via [nvm](https://github.com/nvm-sh/nvm) (`nvm install 22 && nvm use 22`) |
158-
| `az` (Azure CLI) | **2.60+** | `az --version` — needed for Dataverse helper scripts and advanced `/set-app-registration-native` scenarios. Install via Homebrew: `brew install azure-cli` |
158+
| `az` (Azure CLI) | **2.60+** | `az --version` — needed for Dataverse helper scripts. Install via Homebrew: `brew install azure-cli` |
159159
| `git` | any recent | required for upstream template clone |
160160

161161
Detailed matrix (and Xcode/Android Studio notes if you want local native builds): [`shared/version-check.md`](shared/version-check.md).
@@ -335,8 +335,8 @@ At Step 6.75 of `/create-mobile-app`, the `/design-system` skill offers a cost p
335335

336336
| Command | Status | Description |
337337
| --- | --- | --- |
338-
| `/create-mobile-app` | ✅ v0 | Orchestrator — starts from a fresh installed `expo-app-standalone` template folder, gates planning, runs `npx power-apps init`, asks for an existing app registration client ID, wires `auth.config.json`, applies data/native/connectors, builds screens, starts dev server |
339-
| `/set-app-registration-native` |advanced | Tenant-admin utility to create/update a native Wrap Entra app registration and permissions. Not used by the default create flow. Normal users paste an existing client ID during `/create-mobile-app`. |
338+
| `/create-mobile-app` | ✅ v0 | Orchestrator — starts from a fresh installed `expo-app-standalone` template folder, gates planning, runs `npx power-apps init`, resolves the selected environment tenant, lets the user paste an app registration client ID, create one in the portal and paste it, or skip auth for later, then applies data/native/connectors, builds screens, starts dev server |
339+
| `/set-app-registration-native` |v0 | Manual auth helper — opens the Power Apps Wrap app-registration page for the selected environment, captures the pasted client ID, and writes `auth.config.json`. |
340340
| `/add-dataverse` | ✅ v0 | Add Dataverse — connect to existing tables, or create / extend tables in Tier 0 → N order via the Dataverse Web API, then generate TS services. Accepts ER diagrams via image / Mermaid / text, or spawns the data-model-architect agent. |
341341
| `/setup-datamodel` | ✅ v0 | Discoverable alias for `/add-dataverse` optimized for the design-first entry point ("how do I plan my Dataverse schema?"). Same workflow under a more searchable name. |
342342
| `/add-connector` | ✅ v0 | Generic connector — runs `npx power-apps add-data-source` for any first-party or custom connector |
@@ -383,7 +383,7 @@ At Step 6.75 of `/create-mobile-app`, the `/design-system` skill offers a cost p
383383
| File | Purpose |
384384
| --- | --- |
385385
| [`shared/shared-instructions.md`](shared/shared-instructions.md) | **Read first by every skill.** Cross-cutting safety rules, memory-bank protocol, preferred-environment policy, connector-first rule, OS-aware CLI invocation, command-failure handling, prompt-injection guard, sub-skill invocation, execution style. |
386-
| [`shared/version-check.md`](shared/version-check.md) | Single source of truth for minimum tool versions. Always-required: Node 22+, npm 10+. Conditional: `az` 2.60+ for ADO npm token setup, `/add-dataverse` token acquisition, and advanced `/set-app-registration-native`. Xcode/JDK/Android Studio are documented but **not gated by any skill** — user-managed if they want local native builds. |
386+
| [`shared/version-check.md`](shared/version-check.md) | Single source of truth for minimum tool versions. Always-required: Node 22+, npm 10+. Conditional: `az` 2.60+ for ADO npm token setup and `/add-dataverse` token acquisition. Xcode/JDK/Android Studio are documented but **not gated by any skill** — user-managed if they want local native builds. |
387387
| [`shared/preferred-environment.md`](shared/preferred-environment.md) | Environment selection priority: `power.config.json` → memory-bank → explicit environment URL/ID. Never silent switches. |
388388
| [`shared/connector-reference.md`](shared/connector-reference.md) | Connection ID workflow, common API names, dataset/table discovery, Grep-not-Read pattern for large generated files. |
389389
| [`shared/references/expo-mcp.md`](shared/references/expo-mcp.md) | **Opt-in MCP server** — the plugin's [`.mcp.json`](.mcp.json) registers `expo-mcp` (MIT, free, local-only) pointed at the Metro dev server (`http://localhost:8081`). Skills prefer 5 structured `expo.*` tools (project info, SDK-matched installs, plugin effects preview, build with parsed errors, doctor diagnostics) when the host advertises them; shell fallback otherwise. **Dev loop**: while `npm run dev` is running, the agent reads live runtime errors via MCP, fixes code, and Metro hot-reloads. No EAS/cloud calls. |

0 commit comments

Comments
 (0)