generateConnectionModule
Scaffolds a fresh Extentos integration: emits the bootstrap module wiring Extentos.create into your app plus dependency, permission, and manifest updates. Run once per project before writing handlers.
Instructions
One-shot project scaffold — emits the bootstrap module that wires Extentos.create(...) into the host app, build-script changes, dependencies, permissions, and the integration manifest. Run once per project; after this lands, the agent writes its own Handler classes against the SDK primitives surfaced by getCapabilityGuide / getCodeExample. PATH IS DERIVED FROM capabilities. An audio-only footprint emits the VOICE scaffold — SDK dependency, mic permission, bootstrap; NO connection page, NO Meta account, NO App ID or Client Token, NO credentialed repository, and NO placement round trip (single call). PLATFORM NUANCE on the vendor SDK itself: on Android the voice path genuinely does not pull it (com.extentos:glasses is vendorless; only com.extentos:glasses-meta carries the DAT artifacts, which is why the split exists — Meta's Android artifacts sit behind a credentialed repo that returns 401 without a PAT). On iOS the swift-glasses package is a single umbrella and GlassesCore links MWDATCore/MWDATCamera, so the DAT SDK IS in the graph for a voice app — but Meta's iOS repo is PUBLIC, so it resolves with no account, no token and no auth. The developer-facing promise holds on both; the dependency graph differs. Splitting iOS to mirror Android is a 3.0 item (breaking for existing consumers). A footprint including camera / video / display emits the DEVICE scaffold: adds com.extentos:glasses-meta plus the Meta DAT repository, and requires the vendor credential setup. Omitting capabilities defaults to VOICE. The two-call flow below applies to the DEVICE scaffold only. Two-call flow: call once WITHOUT placement to receive status: "needs_placement" plus the question to ask the dev (where should ExtentosConnectionPage live in the app?); after the dev answers, call again WITH placement set to one of the 5 ids to receive the full scaffold (files, suggestedRendering, etc.). Existing-app detection (Android): pass projectPath so the handler reads AndroidManifest.xml and detects whether you already have an Application subclass. If yes, the emitted ExtentosBootstrap is an object (init helper) plus a manual_patch for your existing class — no clobber. If no (greenfield) OR projectPath omitted, the bootstrap is emitted as a full Application subclass and the agent sets <application android:name> accordingly. Returns files[] with action values 'create' and 'manual_patch' — see searchDocs('file_actions') for how to apply each. Pass capabilities (the SDK feature names your app uses, incl. display) so the scaffold records them in the manifest AND emits ExtentosConfig.usedCapabilities — the connection page then shows one tile per capability, lit per the connected glasses. USE as the first generation tool when scaffolding a fresh project. DON'T USE when Extentos is already installed (use inspectIntegration to read current state).
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. | |
| platform | Yes | ||
| placement | No | Where ExtentosConnectionPage should live in the app. Omit on the first call to receive the placement question; pass on the second call after the dev has chosen. | |
| appPackage | Yes | The Extentos project identity (reverse-DNS). This is what the SDK reports as the app id for telemetry, agent config, and sounds — it is NOT required to equal the store bundle id / applicationId (the scaffold bakes it as config.appId, decoupled). For a NEW app, use your bundle id. For an EXISTING app already shipped to both stores with DIFFERENT locked bundle ids, pass the SAME appPackage on BOTH platforms — both then share ONE Extentos project (one agent config, one sound set, per-platform analytics) regardless of the store ids. | |
| projectPath | No | Absolute path to the project root. Android-only: when provided, the handler reads `app/src/main/AndroidManifest.xml` to detect an existing Application subclass and emit an init-helper bootstrap (object) + a manual_patch for that class — avoiding the Application clobber. Optional; absent → assume greenfield and emit the Application-subclass form. | |
| capabilities | No | The SDK capabilities your app uses (feature names from getPlatformInfo — e.g. ["capture_photo", "transcription_incremental", "speak", "display"]). The scaffold records them in the integration manifest AND emits ExtentosConfig.usedCapabilities (Android) so the connection page shows one tile per capability — lit when the connected glasses provide it, dimmed when they don't (e.g. Display on a non-display Ray-Ban). Omit → no capability tiles and no derived camera/mic/speaker permissions (declare nothing, show nothing). Re-run with an updated set to change it (the bootstrap regenerates). Both platforms emit ExtentosConfig.usedCapabilities — Kotlin setOf(CapabilityKind.X, …) / Swift [.camera, …]. | |
| libraryVersion | No | ||
| responseFormat | No |