createSimulatorSession
Provision a persistent browser simulator session for your smart glasses app, resuming an existing one if present, to test device capabilities without physical hardware.
Instructions
Get-or-create: provision a browser-based simulator session for this project, OR return the existing saved one. The simulator hosts your customer-built app running against a Meta-DAT-shaped transport stub — glasses.audio.transcriptions(), glasses.camera.capturePhoto(), glasses.audio.speak() and every other capability primitive flow through it exactly as they would on real hardware, so the agent can dogfood a handler in a browser before a Meta DAT is paired. Persistent-simulations model: each project + platform has at most one saved sim tied to the user's account. Calling this returns that sim's existing URL if it exists (status:'resumed') instead of creating a new one. Rotating to a new sim identity is a deliberate two-step act: deleteSimulatorSession({ sessionId }) first, THEN mint again. There is no force-fresh flag, on purpose — a discarded sim leaves device registrations behind that outlive it, so a silent replace can auto-bind the next mint to an app that is already gone. First-time per project: creates the sim (status:'active'); subsequent calls in any future session return the same sim. Auto-bind (response carries autoBind:'attached'): when the dev's running app is reachable via the MCP local bridge, attaches it to the session — no rebuild needed. Otherwise URL-bake fallback (Android: buildConfigField patch; iOS: plist write). For 'resumed' responses, the URL is unchanged from last time so no rebuild/patch is needed regardless. Iteration model — DO NOT call this per change: app-code edits rebuild + reinstall and reattach automatically; the simulator URL is stable. Calling this again on the same project just returns the same sim — cheap, idempotent. First-link auto-poll: when account-linking is required, by default polls completeAuthLink internally for autoLinkSeconds (default 30) and re-mints on success. autoLink: false for CI / non-interactive contexts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| glasses | Yes | Target glasses vendor. Canonical: 'meta'. 'meta_rayban' is a legacy alias (same vendor) kept for compatibility. 'android_xr' is EXPERIMENTAL/PREVIEW (Android XR projected glasses — no shipping hardware) and 'brilliant' is PREVIEW (Brilliant Labs Halo and Frame — the Extentos BLE transport is built on BOTH platforms and Halo is orderable, but the vendor says first units ship early August 2026, so nothing has run on a device and there is no emulator either). For both, simulator sessions CAN be minted, so an app's behaviour under that device identity is testable today; code scaffolding remains Meta-only. ⚠️ PLATFORM CONSTRAINT: 'android_xr' is Android-ONLY and minting it with platform:'ios' is REFUSED — Google's model is a projected activity, which is an Android activity, so no iOS transport can exist and simulating one would teach your app a combination no device can be. 'meta' and 'brilliant' mint on either platform. | |
| autoLink | No | When true (default), if the backend returns auth_required, this handler polls completeAuthLink internally for `autoLinkSeconds` and re-mints on success. Set false in CI / non-interactive contexts. | |
| platform | No | ||
| projectPath | No | Absolute path to the app project — the SAME value you pass to generateConnectionModule and validateIntegration. This is how a sim gets BOUND to a project: the manifest there supplies the key that makes this call get-or-create rather than mint. **Omitting it silently falls back to the process working directory**, so a call made from a directory with no extentos.manifest.json returns an UNBOUND sim that is shared across every unscaffolded directory for this account — which is how a workspace ends up with a row of unnamed, indistinguishable simulators. Pass it explicitly once the project exists. | |
| recordBinary | No | ||
| autoLinkSeconds | No | Max seconds to wait for the user to approve the verification URL when autoLink is true. Default 30. Clamped to [10, 300]. | |
| autoOpenBrowser | No |