V- Modal AI: Visual Video / Image Search - Flutter Video SDK
Dart android-sdkflutterflutter-appflutter-packageflutter-sdkflutter-videoflutter-video-editingflutter-video-playerflutter-video-sdkflutter-videosflutter-videosdkmobile-videomobile-video-editor-sdkmobile-video-sdkvideo-editingvideo-sdkvideo-searchvideo-search-enginevideo-streaming
Release Flutter SDK from cb57e789dd9179cf6760dff61ef8d6bd9e20f72a
vmodal-release-app0d4db7f3d00f
diff --git a/.gitleaks.toml b/.gitleaks.tomlnew file mode 100644index 0000000..e57241f--- /dev/null+++ b/.gitleaks.toml@@ -0,0 +1,15 @@+[extend]+useDefault = true++[[allowlists]]+description = "Internal implementation plans contain documented credential-pattern examples"+paths = ['''(^|/)uinterface/sdk_flutter/docs/dev_plan(_step)?\.md$''', '''^docs/dev_plan(_step)?\.md$''']++[[allowlists]]+description = "Generated Flutter build outputs are excluded from source secret detection"+paths = ['''(^|/)build/''']++[[allowlists]]+description = "Reviewed generated route names are not credentials"+targetRules = ["generic-api-key"]+paths = ['''(^|/)uinterface/sdk_flutter/lib/src/routes\.g\.dart$''', '''^lib/src/routes\.g\.dart$''']diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 5469341..f7cab2a 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -1,5 +1,11 @@## 1.0.0+- Added the immutable `VModal`, `VModalProject`, and `VModalScope` facade.+- Added centralized project/collection/stream validation and mapping across+ upload, metadata, search, collection mutation, index lifecycle, listing, and+ deletion.+- Preserved `VmodalClient` as the low-level compatibility API with unchanged+ wire, upload, cancellation, retry, and API-key rotation behavior.- Initial Android/iOS Flutter SDK with typed API resources.- Bearer-only gateway authentication and request-time API-key rotation.- Bounded streamed responses and cancelable signed uploads.diff --git a/README.md b/README.mdindex ab40b3d..610daec 100644--- a/README.md+++ b/README.md@@ -1,3 +1,45 @@+## Prompt to start++```text+Set up and validate the Flutter application in+`uinterface/sdk_flutter/example/01_full_app/`+as a complete Android and iOS example for the local VModal Flutter SDK.++Before editing, inspect the existing SDK, example app, scripts, tests, and+documentation. Reuse the current implementation and improve it in place; do+not replace working components or duplicate SDK logic inside the example.++Requirements:+- Keep `vmodal_sdk_flutter: path: ..` as the SDK dependency.+- Provide a simple runnable flow for an API key supplied at runtime: configure+ the client, call `auth.me()`, list video collections, upload a selected or+ bundled sample video with progress and cancellation, create/check an image+ index, search the selected collection, resolve result images in bulk, and+ display the results.+- Keep credentials in memory only. Never hard-code, persist, print, or commit+ API keys, bearer tokens, or presigned URLs.+- Support Android and iOS only; do not add Flutter Web behavior.+- Keep the example beginner-friendly and small. Use the public typed SDK API,+ preserve request/response contracts, handle loading, empty, error, and+ cleanup states, and close/cancel SDK resources when the widget is disposed.+- Update `example/01_full_app/README.md` when setup steps or behavior change.+- Use the repository scripts and pinned Flutter version. Do not create another+ environment or install an unrelated global Flutter version.++From `uinterface/sdk_flutter`, verify the completed work with:++ bash install.sh check+ bash build.sh pub_get+ bash build.sh analyze+ bash build.sh test+ bash build.sh example_android++If macOS and Xcode are available, also run `bash build.sh example_ios`. Report+the files changed, validation results, and any platform build that could not be+run with the exact blocker. Do not claim a live API flow passed unless it was+tested with a valid runtime key.+```+<div align="center"><img src="readme_assets/logo_vmodal_owl.jpeg" alt="VModal owl" width="96"><h1>VModal for Flutter</h1>@@ -18,10 +60,6 @@<p align="center"><em>Turn every video library into an experience your users can explore.</em></p>-## API Key available:- www.v-modal.com--## Build the feature people rememberVModal brings multimodal video search and mobile-friendly uploads to Dart with a small, typed API. Your app owns the interface; the SDK handles the VModal gateway, request models, responses, upload streams, progress, and cancellation.@@ -35,8 +73,47 @@ VModal brings multimodal video search and mobile-friendly uploads to Dart with a| Collection and indexing screens | Typed collection, index, usage, and image resources || Login and account switching your way | App-owned runtime credentials—no login UI imposed |+## Gettting started with one prompt++Copy this prompt into your coding agent:++```text+1. Clone https://github.com/v-modal/vmodal_sdk_flutter.git and enter the+ vmodal_sdk_flutter directory.+2. Inspect the repository instructions and+ example/01_full_app/README.md before making changes.+3. Use the repository's pinned Flutter toolchain; do not install another+ global Flutter version. Run:+ bash install.sh install+ bash build.sh pub_get+ bash build.sh analyze+ bash build.sh test+4. Start or select an Android emulator/device or, on macOS, an iOS+ simulator/device. List devices with:+ flutter_bin="$(bash install.sh flutter_bin)"+ "$flutter_bin" devices+5. Run example/01_full_app on the selected mobile device with:+ bash run.sh example --device DEVICE_ID++Keep working until the app builds, installs, and opens. Fix any repository+setup issue you can safely resolve. Do not add Flutter Web support, hard-code+credentials, or persist an API key. When the app opens, explain how to enter a+runtime VModal API key and complete the authentication, collection, upload,+index, and search flow. If a required host tool, emulator, simulator, or API+key is unavailable, stop at that boundary and report the exact blocker and the+next command I should run.+```++### How to get get API KEY :+ Get an API Key : [API Key](https://v-modal.com/page/contact.ts)++## Start in minutes+[SDK docs: v-modal.github.io/vmodal_sdk_flutter/](https://v-modal.github.io/vmodal_sdk_flutter/)+++The public package source is available on GitHub. Add it to your app:```yaml@@ -53,38 +130,43 @@ Then run:flutter pub get```-Create one client from the API key already loaded by your authenticated app:+Create one project from the API key already loaded by your authenticated app,+then retain immutable scopes wherever your app performs content operations:```dartimport 'package:vmodal_sdk_flutter/vmodal_sdk_flutter.dart';final keys = MutableApiKeyProvider(runtimeApiKey);-final vmodal = VmodalClient(- config: SdkConfig(apiKeyProvider: keys),+final project = VModal.configure(+ projectId: 'food_app',+ apiKeyProvider: keys,+);+final favorites = project.scope(+ collectionName: 'user_123',+ streamName: 'favorites',);```-> The SDK never owns your login screen or persists your API key. It receives an in-memory credential from your application at runtime.+`projectId`, `collectionName`, and `streamName` accept only letters, digits,+and underscore. Each is trimmed and limited to 80 characters. Project and+collection names cannot contain the reserved `__` separator, and their encoded+backend value is also limited to 80 characters. The SDK performs that encoding+internally.++> The SDK never owns your login screen or persists your API key. Authentication identity is separate from project, collection, and stream organization.## Search video with natural language```dart-final groups = await vmodal.collections.listGroups(mode: 'vid_file');-if (groups.data.isEmpty) {+final collections = await project.listCollections(mode: 'vid_file');+if (!collections.contains('user_123')) {throw StateError('No video collection exists for this API key');}-final group = groups.data.first;-final version = group.latestLancedbVersion;-if (version == null) {- throw StateError('The collection has no searchable LanceDB version');-}-final results = await vmodal.searches.searchVideo(- SearchRequest(- queryText: 'the cyclist crossing the bridge at sunset',- groupName: group.groupName,- searchSources: const ['image'],- versionLancedb: version,+final results = await favorites.search(+ 'the cyclist crossing the bridge at sunset',+ options: const ScopedSearchOptions(+ searchSources: ['image'],limit: 20,),);@@ -95,14 +177,10 @@ for (final moment in results.data) {}```-The collection must be a `vid_file` `GroupItem` returned-for the current runtime API key. Collection access is key-scoped; a name copied-from another account or environment can return HTTP 404 even when the search-route is healthy. The example name `flutter_example` is valid only after that-key has uploaded or otherwise created the collection and a refreshed-`listGroups()` response contains it. Search must also send an advertised-`lancedbVersions` value; `latestLancedbVersion` converts values such as `v1`-to the numeric request field `version_lancedb: 1`.+Collection access is key-scoped. A logical name copied from another account or+environment can return HTTP 404 even when the search route is healthy. Use+`ScopedSearchOptions(versionLancedb: version)` when your application tracks a+specific index version.The response stays typed where the contract is stable and preserves the raw JSON so new server fields remain available immediately.@@ -113,10 +191,8 @@ The SDK reads an app-accessible `File` as a stream. It does not load the entire```dartimport 'dart:io';-final task = vmodal.collections.videoUpload(+final task = favorites.upload(UploadSource.fromFile(File(videoPath)),- collectionName: 'travel_diaries',- subCollectionName: 'mobile_uploads',);final progress = task.progress.listen((value) {@@ -139,23 +215,85 @@ Signed single upload is the production default for every file size. Multipart up- Cancel search or upload work when a screen closes.- Show upload progress from a broadcast Dart stream.- Keep file picking, secure storage, background scheduling, and lifecycle UI in the parent app.-- Close network resources deterministically with `await vmodal.close()`.+- Close network resources deterministically with `await project.close()`.-For logout or account switching, cancel active work, clear upload persistence, call `keys.clear()`, close the client, and create a new client for the next identity. Key rotation alone is not an identity switch.+For logout or account switching, cancel active work, clear upload persistence,+call `keys.clear()`, close the project, and create a new project and scopes for+the next identity. Key rotation alone is not an identity, project, collection,+or stream switch.-## One client, focused resources+## Common organization flows```text-vmodal.auth identity and health-vmodal.searches multimodal video search-vmodal.collections upload and collection lifecycle-vmodal.indexes create, inspect, and delete indexes-vmodal.admin usage and cache statistics-vmodal.r2 presigned object-storage operations-vmodal.images image retrieval+global index project=video_search collection=global stream=uploads+per-user index project=food_app collection=user_123 stream=personal_videos+multiple streams project=food_app collection=user_123 stream=camera/favorites+catalog project=shopping_app collection=product_catalog stream=merchant_uploads+```++Create a separate `VModalProject` for each developer project. On account+switch, create fresh project/client state; an already running task retains the+immutable scope with which it started.++## Developer use cases from the Android examples++The native Android examples are useful product and data-flow references even+when your application is written in Flutter. Choose the example that matches+the feature you are building, then implement the same SDK contract with Dart+widgets, state, and lifecycle ownership.++| Developer goal | Android reference | What to carry into Flutter |+|---|---|---|+| Learn or troubleshoot one capability | [Kotlin starter examples](https://github.com/v-modal/vmodal_sdk_android/tree/main/examples/01_starter) | Follow focused examples for authentication, health, filtered search, collection listing, picker uploads, cancellation, resumable or bulk uploads, metadata, index lifecycle, images, admin, and R2. Reproduce only the Dart capability your feature needs. |+| Build an upload-and-search screen | [Upload → index → search app](https://github.com/v-modal/vmodal_sdk_android/tree/main/examples/02_search) | Use the complete dependency chain: pick a video, stream the upload with progress, poll the image-index job, search the same collection and stream, resolve image URLs in bulk, and render result states. |+| Validate an integration one stage at a time | [Staged full application](https://github.com/v-modal/vmodal_sdk_android/tree/main/examples/03_fullapp) | Keep configuration, `auth.me()`, collection discovery, upload, indexing, search, and image rendering as visible stages. This makes authentication, data-scope, and asynchronous-index failures easy to isolate. |+| Choose a content tenancy model | [User and business index layouts](https://github.com/v-modal/vmodal_sdk_android/tree/main/examples/04_user) | Model a global library, one private collection per user, several streams per user, or a shared product catalog with stable `projectId`, `collectionName`, and `streamName` values. |++When translating the Android flows:++- Replace `ViewModel` plus `StateFlow` with your Flutter state-management+ approach, but keep one immutable state model for loading, progress, empty,+ success, error, and cleanup states.+- Replace the Android `content://` adapter with a picker result exposed as an+ app-readable Dart `File`, then create `UploadSource.fromFile(...)`.+- Replace coroutine upload Flow collection with `UploadTask.progress`,+ `UploadTask.result`, and `UploadTask.cancel()`. The screen owns the+ subscription and cancels it during disposal.+- Preserve collection and stream coupling across upload, index creation,+ search, and bulk image lookup. Never display a job or result after the user+ has switched scope or identity.+- Load presigned result images without adding the VModal bearer credential.+ Refresh expired URLs by repeating the image lookup.+- Treat Android `WorkManager` patterns as lifecycle guidance only; background+ scheduling remains application-owned and platform-specific in Flutter.++## Advanced low-level resources++`VmodalClient` remains supported for auth, usage, image lookup, and advanced+wire-level integration. To combine it with scopes, construct the client first+and transfer lifecycle ownership to the project:++```dart+final client = VmodalClient(+ config: SdkConfig(apiKeyProvider: keys),+);+final project = VModal.fromClient(+ projectId: 'food_app',+ client: client,+);++final profile = await client.auth.me();+final scope = project.scope(+ collectionName: 'user_123',+ streamName: 'favorites',+);++await project.close(); // closes the transferred client```-Gateway mode is the safe default and sends caller identity only as a bearer credential. `VmodalClient.unsafeDirect` is reserved for trusted private networks.+Gateway mode is the default and sends caller identity only as a bearer+credential. `VmodalClient.unsafeDirect` is reserved for trusted private+networks.## Platform support@@ -171,7 +309,8 @@ Minimum toolchain: Flutter `3.44.0` and Dart `3.12.0`.## Explore the SDK- [Browse the public SDK reference](https://v-modal.github.io/vmodal_sdk_flutter/)-- [Run the complete example app](https://github.com/v-modal/vmodal_sdk_flutter/tree/main/example)+- [Run the complete example app](https://github.com/v-modal/vmodal_sdk_flutter/tree/main/example/01_full_app)+- [Organize global, per-user, multi-stream, and catalog indexes](example/02_users/README.md)- [Read the SDK guide](https://github.com/v-modal/vmodal_sdk_flutter/blob/main/doc/sdk_doc.md)- [Manage API keys safely](https://github.com/v-modal/vmodal_sdk_flutter/blob/main/doc/manage_api_key.md)- [Build a search experience](https://github.com/v-modal/vmodal_sdk_flutter/blob/main/doc/search_app.md)diff --git a/RELEASE_METADATA b/RELEASE_METADATAindex 426e932..3ab8b54 100644--- a/RELEASE_METADATA+++ b/RELEASE_METADATA@@ -1 +1 @@-Source-vmx-api: 445867a02d6f0648b06dc1286b28df11200f5f1b+Source-vmx-api: cb57e789dd9179cf6760dff61ef8d6bd9e20f72adiff --git a/SOURCE_MANIFEST.sha256 b/SOURCE_MANIFEST.sha256index 893bc40..ae46ed1 100644--- a/SOURCE_MANIFEST.sha256+++ b/SOURCE_MANIFEST.sha256@@ -1,90 +1,103 @@e789cd4d1bed8a78ec8014c5c5913e300f81b63ea56a56aacb0dfec3b5e7ce2b ./.flutter-versionfbbda2e7e29bbd860539a9ca18c478f3b02de140f25a872c19a6dbecd11bc94b ./.github/workflows/publish.yml+a98f72526420d47e76b9b4e67ac86acd06b7088ad1f4c35617b11b09e59346ea ./.gitleaks.toml5115d06bd9913f466d50fcbf8ad8890372349060c54a4581f3481ea084cfdec6 ./.pubignore-44900e7c55f6cf8e5068d7a3f169fdf8590ae63bb20602ef67941b879e70582a ./CHANGELOG.md+0e35aa931a7e39b40c6bac4c0a4ee4ddc6e0de1e26d8f0a47d4f7e72326f3574 ./CHANGELOG.md37b7148216ac6090e36adfb699d642b8dd1e1b8ba99870e65e88733947a59fa6 ./LICENSE-691400d97ff36d07087f587b8d1d65bdf4bf7dd23a06816ac550ddff8b2bb1c8 ./README.md-5b9eba243ef61d72ed6acd0c6994eb86d76eac9e3e009d7351028293f669e26d ./RELEASE_METADATA+fbdc44acf070aae16ed5fa001c411d7bef1344ecf67f68366e63d585983a86e2 ./README.md+89500ab4c00d85037f115e7aa05ca2ada35bba3d2c3dc2db0c252395a99739f6 ./RELEASE_METADATAdef7e4f643adff5b01b877b6a7fa5b2381612b693c0bf06bd232ee0f7197d342 ./analysis_options.yaml-09a850ca6ebd5470138b7f20204d4dbe0fec89d268a205f14cf3bff0b99f365b ./build.sh+8c2d096dc399d9bea2fcc5ae19d987e7458c8503cf2a7edf1f1497ae00d681aa ./build.sh4f18642680fb433554a5523d00bd99e0d650af340bcaebe628f59f63ac84e458 ./dartdoc_options.yaml-28c321f8798c0e803246c737e0b634c5f3ade930239bb6e5429098bb2b096d86 ./doc/manage_api_key.md+75461620cf3a062f4dad10e034952b82cca461b483788de1f46c539aca8b0f0f ./doc/manage_api_key.mdcae6114908952cf81a908b7fcc8c0ba4ce3f866e9dbaf974303273f334e0e3f6 ./doc/release.md-13bacc486006b6b6ae11ae37b2cda0dddf588b8aa8e72c1b13e570b95f36aa59 ./doc/sdk_contract.md-37ba2dc3e0ebcc1441ee57b557f93dacd6a941a3549fe31bfbe06ccd14078fa3 ./doc/sdk_doc.md-3c7dd1e5da3a1d287e8578a83a51f7b416036d0bf4e6cc16288c11d547959181 ./doc/search_app.md+9658204ef997b490bc8634b919fbbe01e53455aa65e3bfef4010d3be798c8e9d ./doc/sdk_contract.md+2c07c5319044416d722732f731cc709fc6f6f3e375861bb6b5326a8768258de5 ./doc/sdk_doc.md+67e61ba8626a46ccf7de847a39f4900bdb2a2d36b0102b5ad703ca5a5ef05080 ./doc/search_app.mde246ed229511a24a1ee7e98529c203ef90d1d352290ce8486caebe05683db3a0 ./env.sh-c5ce516b547327aab5b6fa27a523d4c76e66294ada3248b293c54b9595cd3a87 ./example/.metadata-6a1b121762f656d6772c07f95252440471569426806d559868ef5647d7637863 ./example/README.md-e0ea485cfdbc3e12b93efb8679a5ea73ebfe20ea4ca0c473dc594fc2fb274ed5 ./example/analysis_options.yaml-807e56bf3e3fb8a082d8b802658ce8735bef5b88998ccd6f46f010955aa0081a ./example/android/app/build.gradle.kts-30b0832ed8b92dfbd6ae2abfa939ccf26333d37600056b1572bd4a397a18a74b ./example/android/app/src/debug/AndroidManifest.xml-b8013ee0b123493f6277937c99ea4432063162a4167d99d5356647738261b7c1 ./example/android/app/src/main/AndroidManifest.xml-47ce679eef585b28fe5e10a92a642eef4946c5d33d56411202734139b1db8e7b ./example/android/app/src/main/kotlin/com/vmodal/sdk/vmodal_example/MainActivity.kt-7ca6d5cec2169c5a98661a119db23a6f3399c8fef2256ff04f3a642831282478 ./example/android/app/src/main/res/drawable-v21/launch_background.xml-94433756fe10005ddd6fc55cc5c0b1e9f3c10b66a08ceac795ece6713d34e28a ./example/android/app/src/main/res/drawable/launch_background.xml-6a7c8f0d703e3682108f9662f813302236240d3f8f638bb391e32bfb96055fef ./example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png-c7c0c0189145e4e32a401c61c9bdc615754b0264e7afae24e834bb81049eaf81 ./example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png-e14aa40904929bf313fded22cf7e7ffcbf1d1aac4263b5ef1be8bfce650397aa ./example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png-4d470bf22d5c17d84edc5f82516d1ba8a1c09559cd761cefb792f86d9f52b540 ./example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png-3c34e1f298d0c9ea3455d46db6b7759c8211a49e9ec6e44b635fc5c87dfb4180 ./example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png-8c5bad5152f217e837519f9c15211d19f39bd45f5f67faf6dd81cb4b299e518f ./example/android/app/src/main/res/values-night/styles.xml-937d7c82f539c72eb94fd3a3773f29b3d3fef1997213c92cb632298cedf4bda9 ./example/android/app/src/main/res/values/styles.xml-30b0832ed8b92dfbd6ae2abfa939ccf26333d37600056b1572bd4a397a18a74b ./example/android/app/src/profile/AndroidManifest.xml-6a26dba2cb8dfba1e74f540b0d17a89d96c1301d3c3bfda14348bed257fddcba ./example/android/build.gradle.kts-cfff9cdf89ea54b00de5fc13eba57e8aeef785a0a53b892c77be41772531ae7f ./example/android/gradle.properties-3221993eac1057198d652b7437105e2953ca4850d415eb0eb2b9625874fd059e ./example/android/gradle/wrapper/gradle-wrapper.properties-42a222e5112523a5bce0752a2b6392ee18f8684c739918b6382145d398bb1e80 ./example/android/settings.gradle.kts-2eaee2d6e00f6085ad65d7ff63a20963e78b635cb3d41eb15be4f37f55430295 ./example/asset/video_10frames.mp4-da12038f9b2688a8a26160fea2609fa8fcb11421448c109f09c0f573efe7698d ./example/ios/Flutter/AppFrameworkInfo.plist-a82d7765b37116ee4821d2cd1d65942febf8032353757ffb0826eabde785b4a6 ./example/ios/Flutter/Debug.xcconfig-a82d7765b37116ee4821d2cd1d65942febf8032353757ffb0826eabde785b4a6 ./example/ios/Flutter/Release.xcconfig-2261aee252795421960040a611bdda5cc86fe649411b13391e62a86e9d73a4f3 ./example/ios/Runner.xcodeproj/project.pbxproj-7f3b00b5c3fdb45242d7b87e1e5c4e25d1fa8129a16c94295ecc4e8ea2235c5f ./example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata-dfa0f9bb85b95ccba9c6811adadf8cb407fb5d52088e89db83ebc308ec448542 ./example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist-11b247bc6796892d67c9a821d18604db4dd6a880981b34f38460b9866e6b247f ./example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings-9fbce429f56243561dd437a527136c9f9ed77165e3b271b923faf236cfcd0484 ./example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme-46c3c9702ff7c5584e11c954d943cfb6e07fb26e3fbd072ddbc0f388aa352de1 ./example/ios/Runner.xcworkspace/contents.xcworkspacedata-dfa0f9bb85b95ccba9c6811adadf8cb407fb5d52088e89db83ebc308ec448542 ./example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist-11b247bc6796892d67c9a821d18604db4dd6a880981b34f38460b9866e6b247f ./example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings-451c6d9ba0a2b3ff43092ea349c60fa79a91f1158b915eb29dbdd357cb95d7b8 ./example/ios/Runner/AppDelegate.swift-3b1e214f466ffedff74baa5598ad5c4421130eea6bc8d57b8fe23435e8280ae4 ./example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json-7770183009e914112de7d8ef1d235a6a30c5834424858e0d2f8253f6b8d31926 ./example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]-cab10a0d391ec5bc09ef50ce49e8ad401cee7ef03707ec0923a222c5c2b3d212 ./example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]-b9ad02cf6576a04d1b6806ac02a2431481b448dd0c2e505ce25842d1f7c4730b ./example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]-c6e6d3b215ae744a9c391f4c4d44157eff5e739d6ad6c39f9bfa5df66dddd267 ./example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]-5dee24dc104ac76dc162e42ae0beb163d426bf365562ee28ba7b3ad368559a60 ./example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]-a9b21eb6f4271385655a8771f76e29eef8c1107d7879cbcfc567e6619d1f716a ./example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]-e677d701ffe4af7bc2935098d6b3984cc9ab7ace573e6900955a5535b12410cf ./example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]-b9ad02cf6576a04d1b6806ac02a2431481b448dd0c2e505ce25842d1f7c4730b ./example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]-7c61c42fc7b657d9cf314d32a4ec458f0647c3aaf360be1b9377857266ec2499 ./example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]-19be171481dc71a0b2803ebcd01dd8b0c5fd5778dee34c0a3cabc948c225f24e ./example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]-19be171481dc71a0b2803ebcd01dd8b0c5fd5778dee34c0a3cabc948c225f24e ./example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]-4209a49e44a92ec40a327d3455eb1b1c153ee83d75de1c2be0a12ab18b2ff9de ./example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]-836c918cb613249eba0483a6b02fa3df3c1c0a89a315ee4d3b88509b83c7ab73 ./example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]-41c7d42f6e61f8fe7f30b1ffa2256aecbc9682be06d18c4a3062043e1a2e547c ./example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]-5d7e5bdf01b93802bc973345b3a78c038907147625035952a08a115a563b7f81 ./example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]-ccc7950fd5f5b82067c85f667940a9d59189151460761ece8098ca78daa19469 ./example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json-93ae7d494fad0fb30cbf3ae746a39c4bc7a0f8bbf87fbb587a3f3c01f3c5ce20 ./example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png-93ae7d494fad0fb30cbf3ae746a39c4bc7a0f8bbf87fbb587a3f3c01f3c5ce20 ./example/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]-93ae7d494fad0fb30cbf3ae746a39c4bc7a0f8bbf87fbb587a3f3c01f3c5ce20 ./example/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]-a985b626c4f7546a8ba392d135e9226c3547c8e2b46895f5f2bdf40d7b14ef9f ./example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md-857e61203b3deafb05766d8fcda898b86a7cb6f3d5e385ecc9926c4d698215e9 ./example/ios/Runner/Base.lproj/LaunchScreen.storyboard-fd367b6c43006d61b730f674970dd48b9f662c8f2264e52ffc1558102a2c9f2d ./example/ios/Runner/Base.lproj/Main.storyboard-318ca9f582d3a74cbee346857d2df1b50a2deeb7fb687ab64eeeddd037157b3e ./example/ios/Runner/Info.plist-1a8d11d01d1cc92c650c9c9ed35299240052d4683a15a719a2315ef44185e074 ./example/ios/Runner/Runner-Bridging-Header.h-add68b905971dedfcc0d0b5b7118030de5925ba8c081ad9815463699e3a444ad ./example/ios/Runner/SceneDelegate.swift-5e8f4908dacea6f29b2a790e4d38bf5fded69096063f9a27a2f21584d62b30c0 ./example/ios/RunnerTests/RunnerTests.swift-b5a801d6411bbaeaca924c76dff81bb03c825d87c6d176d91f899cb53868e60c ./example/lib/main.dart-c59d35f6e3b82291eff92d5c7d55d9efb18ef2375cdef091c282282930729cad ./example/pubspec.lock-ca703ea63f5117dea4c308af57be8ff3a65e95400862159b7e793a90dc4d3200 ./example/pubspec.yaml-a3eb68137be846dd8f21470c3087c8c7f141a5d2390ffde27ccc2653e7aedb6d ./example/test/widget_test.dart+c5ce516b547327aab5b6fa27a523d4c76e66294ada3248b293c54b9595cd3a87 ./example/01_full_app/.metadata+7b50a141c330c810a229422ca37d5ca28d34b9a9ec2ac701ec38d7bb1f49c8fb ./example/01_full_app/README.md+e0ea485cfdbc3e12b93efb8679a5ea73ebfe20ea4ca0c473dc594fc2fb274ed5 ./example/01_full_app/analysis_options.yaml+807e56bf3e3fb8a082d8b802658ce8735bef5b88998ccd6f46f010955aa0081a ./example/01_full_app/android/app/build.gradle.kts+30b0832ed8b92dfbd6ae2abfa939ccf26333d37600056b1572bd4a397a18a74b ./example/01_full_app/android/app/src/debug/AndroidManifest.xml+b8013ee0b123493f6277937c99ea4432063162a4167d99d5356647738261b7c1 ./example/01_full_app/android/app/src/main/AndroidManifest.xml+47ce679eef585b28fe5e10a92a642eef4946c5d33d56411202734139b1db8e7b ./example/01_full_app/android/app/src/main/kotlin/com/vmodal/sdk/vmodal_example/MainActivity.kt+7ca6d5cec2169c5a98661a119db23a6f3399c8fef2256ff04f3a642831282478 ./example/01_full_app/android/app/src/main/res/drawable-v21/launch_background.xml+94433756fe10005ddd6fc55cc5c0b1e9f3c10b66a08ceac795ece6713d34e28a ./example/01_full_app/android/app/src/main/res/drawable/launch_background.xml+6a7c8f0d703e3682108f9662f813302236240d3f8f638bb391e32bfb96055fef ./example/01_full_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png+c7c0c0189145e4e32a401c61c9bdc615754b0264e7afae24e834bb81049eaf81 ./example/01_full_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png+e14aa40904929bf313fded22cf7e7ffcbf1d1aac4263b5ef1be8bfce650397aa ./example/01_full_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png+4d470bf22d5c17d84edc5f82516d1ba8a1c09559cd761cefb792f86d9f52b540 ./example/01_full_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png+3c34e1f298d0c9ea3455d46db6b7759c8211a49e9ec6e44b635fc5c87dfb4180 ./example/01_full_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png+8c5bad5152f217e837519f9c15211d19f39bd45f5f67faf6dd81cb4b299e518f ./example/01_full_app/android/app/src/main/res/values-night/styles.xml+937d7c82f539c72eb94fd3a3773f29b3d3fef1997213c92cb632298cedf4bda9 ./example/01_full_app/android/app/src/main/res/values/styles.xml+30b0832ed8b92dfbd6ae2abfa939ccf26333d37600056b1572bd4a397a18a74b ./example/01_full_app/android/app/src/profile/AndroidManifest.xml+6a26dba2cb8dfba1e74f540b0d17a89d96c1301d3c3bfda14348bed257fddcba ./example/01_full_app/android/build.gradle.kts+cfff9cdf89ea54b00de5fc13eba57e8aeef785a0a53b892c77be41772531ae7f ./example/01_full_app/android/gradle.properties+3221993eac1057198d652b7437105e2953ca4850d415eb0eb2b9625874fd059e ./example/01_full_app/android/gradle/wrapper/gradle-wrapper.properties+42a222e5112523a5bce0752a2b6392ee18f8684c739918b6382145d398bb1e80 ./example/01_full_app/android/settings.gradle.kts+2eaee2d6e00f6085ad65d7ff63a20963e78b635cb3d41eb15be4f37f55430295 ./example/01_full_app/asset/video_10frames.mp4+da12038f9b2688a8a26160fea2609fa8fcb11421448c109f09c0f573efe7698d ./example/01_full_app/ios/Flutter/AppFrameworkInfo.plist+a82d7765b37116ee4821d2cd1d65942febf8032353757ffb0826eabde785b4a6 ./example/01_full_app/ios/Flutter/Debug.xcconfig+a82d7765b37116ee4821d2cd1d65942febf8032353757ffb0826eabde785b4a6 ./example/01_full_app/ios/Flutter/Release.xcconfig+2261aee252795421960040a611bdda5cc86fe649411b13391e62a86e9d73a4f3 ./example/01_full_app/ios/Runner.xcodeproj/project.pbxproj+7f3b00b5c3fdb45242d7b87e1e5c4e25d1fa8129a16c94295ecc4e8ea2235c5f ./example/01_full_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata+dfa0f9bb85b95ccba9c6811adadf8cb407fb5d52088e89db83ebc308ec448542 ./example/01_full_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist+11b247bc6796892d67c9a821d18604db4dd6a880981b34f38460b9866e6b247f ./example/01_full_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings+9fbce429f56243561dd437a527136c9f9ed77165e3b271b923faf236cfcd0484 ./example/01_full_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme+46c3c9702ff7c5584e11c954d943cfb6e07fb26e3fbd072ddbc0f388aa352de1 ./example/01_full_app/ios/Runner.xcworkspace/contents.xcworkspacedata+dfa0f9bb85b95ccba9c6811adadf8cb407fb5d52088e89db83ebc308ec448542 ./example/01_full_app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist+11b247bc6796892d67c9a821d18604db4dd6a880981b34f38460b9866e6b247f ./example/01_full_app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings+451c6d9ba0a2b3ff43092ea349c60fa79a91f1158b915eb29dbdd357cb95d7b8 ./example/01_full_app/ios/Runner/AppDelegate.swift+3b1e214f466ffedff74baa5598ad5c4421130eea6bc8d57b8fe23435e8280ae4 ./example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json+7770183009e914112de7d8ef1d235a6a30c5834424858e0d2f8253f6b8d31926 ./example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]+cab10a0d391ec5bc09ef50ce49e8ad401cee7ef03707ec0923a222c5c2b3d212 ./example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]+b9ad02cf6576a04d1b6806ac02a2431481b448dd0c2e505ce25842d1f7c4730b ./example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]+c6e6d3b215ae744a9c391f4c4d44157eff5e739d6ad6c39f9bfa5df66dddd267 ./example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]+5dee24dc104ac76dc162e42ae0beb163d426bf365562ee28ba7b3ad368559a60 ./example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]+a9b21eb6f4271385655a8771f76e29eef8c1107d7879cbcfc567e6619d1f716a ./example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]+e677d701ffe4af7bc2935098d6b3984cc9ab7ace573e6900955a5535b12410cf ./example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]+b9ad02cf6576a04d1b6806ac02a2431481b448dd0c2e505ce25842d1f7c4730b ./example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]+7c61c42fc7b657d9cf314d32a4ec458f0647c3aaf360be1b9377857266ec2499 ./example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]+19be171481dc71a0b2803ebcd01dd8b0c5fd5778dee34c0a3cabc948c225f24e ./example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]+19be171481dc71a0b2803ebcd01dd8b0c5fd5778dee34c0a3cabc948c225f24e ./example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]+4209a49e44a92ec40a327d3455eb1b1c153ee83d75de1c2be0a12ab18b2ff9de ./example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]+836c918cb613249eba0483a6b02fa3df3c1c0a89a315ee4d3b88509b83c7ab73 ./example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]+41c7d42f6e61f8fe7f30b1ffa2256aecbc9682be06d18c4a3062043e1a2e547c ./example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]+5d7e5bdf01b93802bc973345b3a78c038907147625035952a08a115a563b7f81 ./example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]+ccc7950fd5f5b82067c85f667940a9d59189151460761ece8098ca78daa19469 ./example/01_full_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json+93ae7d494fad0fb30cbf3ae746a39c4bc7a0f8bbf87fbb587a3f3c01f3c5ce20 ./example/01_full_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png+93ae7d494fad0fb30cbf3ae746a39c4bc7a0f8bbf87fbb587a3f3c01f3c5ce20 ./example/01_full_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]+93ae7d494fad0fb30cbf3ae746a39c4bc7a0f8bbf87fbb587a3f3c01f3c5ce20 ./example/01_full_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]+a985b626c4f7546a8ba392d135e9226c3547c8e2b46895f5f2bdf40d7b14ef9f ./example/01_full_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md+857e61203b3deafb05766d8fcda898b86a7cb6f3d5e385ecc9926c4d698215e9 ./example/01_full_app/ios/Runner/Base.lproj/LaunchScreen.storyboard+fd367b6c43006d61b730f674970dd48b9f662c8f2264e52ffc1558102a2c9f2d ./example/01_full_app/ios/Runner/Base.lproj/Main.storyboard+318ca9f582d3a74cbee346857d2df1b50a2deeb7fb687ab64eeeddd037157b3e ./example/01_full_app/ios/Runner/Info.plist+1a8d11d01d1cc92c650c9c9ed35299240052d4683a15a719a2315ef44185e074 ./example/01_full_app/ios/Runner/Runner-Bridging-Header.h+add68b905971dedfcc0d0b5b7118030de5925ba8c081ad9815463699e3a444ad ./example/01_full_app/ios/Runner/SceneDelegate.swift+5e8f4908dacea6f29b2a790e4d38bf5fded69096063f9a27a2f21584d62b30c0 ./example/01_full_app/ios/RunnerTests/RunnerTests.swift+b5a801d6411bbaeaca924c76dff81bb03c825d87c6d176d91f899cb53868e60c ./example/01_full_app/lib/main.dart+b47637ff3628c6e7d897a5f6eed123cd74bb6b98850352325bfad8ca239a2538 ./example/01_full_app/pubspec.lock+875af508f7c6d9654985b402c26364d4ca6b1c06b3846a71a77997b905e2ad6e ./example/01_full_app/pubspec.yaml+a3eb68137be846dd8f21470c3087c8c7f141a5d2390ffde27ccc2653e7aedb6d ./example/01_full_app/test/widget_test.dart+3c54909945bc3d6fe78d70a0f673377b6ab6b0c6c4b86c02291f5fbefdc9736f ./example/02_users/README.md+bf7d17dfdbc3aa4dcba00ef52506c50fd798bbcf3d0f907e875fa38bdfa9846f ./example/02_users/analysis_options.yaml+a15f6dfd128db08dff98caa715b2c5041812f794fbfe283098bb98b94b345841 ./example/02_users/lib/global_search_index.dart+170351e9bac0dc421865ea44237ca38fc702386ab2d96b05a693a2aac3c338e2 ./example/02_users/lib/private_user_index.dart+16dc99fc0be4d40a2d6f351981617961d73333a6199054bb2451b96a79dbfb13 ./example/02_users/lib/product_catalog.dart+b373342c889d099d99a3209cb01cea188b53eb5b43ae26cad952abf5fda833bd ./example/02_users/lib/src/example_session.dart+94fc4c3cfb6774eee9f39c1d97447abab52105ce6be85457d8f9d25bff3014ab ./example/02_users/lib/user_examples.dart+4d7075d4d50457aa65b2a91d4bcdf9778ae95e86c6c276a91172dcc5cd60017c ./example/02_users/lib/user_streams.dart+3e2586912a086f3687fb05d2b7d0f268bd5ad02d4a2d01bc1075cb4aa93ceb39 ./example/02_users/pubspec.lock+fa541e11cb4b9b791630b658c6856743ec4c31d957deb285ed031e7d4c2d48c6 ./example/02_users/pubspec.yaml+31f28ca22dfb931fe963d2f766d8b5cba3c2722bca839787a506f1a692393a8c ./example/02_users/test/user_examples_test.dart23756b83470b1f25f6a7e6b5a6270f123a5224e49fd8e2eda36001358951b688 ./install.sh7becacd31a8d134fa435b39cd819798d5fbf58f89b9f30c50362e2dcf757aaed ./lib/src/adaptive_upload.dart9464fff0c519a1ce70cddefb3e3eaa95d07b97ccdaf5b8381c01d7c88767ae83 ./lib/src/api_key_provider.dartd796fc674bb0b8c784fac0f0470b6ff816c98d9ace4b90f593912e5479e45d4e ./lib/src/client.dartef4f3226baaefde24d45c7b4d8e9592665d85e1abbdafae4c7e59c462fd42b7d ./lib/src/collection_uploads.dart58e4e7162a6c46d2981935649a3f1d40c969dc1fc3a81cab34f518673a479e6a ./lib/src/config.dart+d3e03d9a72a499659c70f2296115d1d3138b9370a017e027d8255f85f7fb1c5c ./lib/src/content_scope.dart873d969cfed5c725d34df0fd0c8769462b56992cf523710fcf741a81fa1bbcad ./lib/src/errors.dart2ad9b4183bce96eacd91c5514de9231b1f0a4f269392726e174507cfa507981a ./lib/src/http.dart52d09295f014fc4f8f8ff1ad714a8be830729b7e29cd6aa5421678e58edd2f0e ./lib/src/models.dart@@ -94,31 +107,33 @@ ed22b7665e09c9f2f4158c225affe6527b7d3eb921db0ccdf06c01c8cf31db96 ./lib/src/resof0e69d1016f82fbad2a96434129a54a0129f095a0e138cce555db37c8120023f ./lib/src/transport.dartd407a3846da3236f37c5dc6af6c231116cc4f23844f623eb22db5365c6616bb5 ./lib/src/upload.dart732e7f2f942e1c427e19ee3bdb766053f625f69e87dcf770d969555dbc7a9881 ./lib/src/utils.dart-17f7649a89019dd0664fb4b18a5697fa52012e9c27e45afe0fc70aaa03626009 ./lib/vmodal_sdk_flutter.dart+b226ddcc0b8cb58b4753545752c2df1c6301bdf76842730e7f6ecf2d06d29892 ./lib/src/vmodal.dart+120c8c5cd98d4aebaa4fe39525c1370b53bc89413ab54d73a8ea642d661555ea ./lib/vmodal_sdk_flutter.dart72fff91181fd3e25fd9afd766930a67025205b61096fd35c55cbdd9a3178ecf0 ./pubspec.lock2b969fbd1d82d89a5dc7822032ce9fe0df4bda625da969bc8e93c57e43fcf2c2 ./pubspec.yamla80b38547f5d9ca1874f60e71c648e3fc12ab5f7cb88d1bead6d5b863d3c0245 ./readme_assets/dev_homepage.jpgc56419d129059b64551e06f074e88ef62676f25938dc2a1fe28a6ab3f2ba8547 ./readme_assets/logo_vmodal_owl.jpeg-d31d6bb36542a9022c62d2d9940b0efd07f60b1cdfb30e35f8be8b15a226c843 ./run.sh+3198051c448338c5331baef7e17ff32bfbaf1265b59543a8aca2baf57513feed ./run.shd2dfce0e68717f8626ecaadb4552f7471ced1dbdfe6a51182e0d62c24a1b718b ./security_check.sh3d4e4935fa33de6589ebf3303963a9cfe60adcbd7f8f38ba4ba3e58e85646c11 ./test.shbe59599b9ba77d031e9b4bad7f8d5c59efd2687888c5b73be4fbea115902106b ./test/adaptive_upload_test.dart002abcc5d95c0cf20375adefe4ee2472581a615e64f5726bf361dd5c679cdea7 ./test/auth_http_test.dart29dbaadfb34d6c39048edc7e2caccd16ecfbdfaddfc29519326d719de4741936 ./test/client_test.dartba941377f1ee717091dd30522609d028f32cd60df575564c75ab0228c2543d35 ./test/config_routes_test.dart-7f8b5f0faaec667a991dcf800da5d56b509c1934206a8b5a6392c6167ac1fbba ./test/docs_reference_test.dart+4b9358bc8c8eb76b84dffc1c85d699169d890b4878af967f490bcddfcd6bd869 ./test/docs_reference_test.dart1e0c931471bbee5832c7186ffc67b526da4c1c3d6385b8dfebb8cf0b49b2a99e ./test/errors_leak_test.darta998f548e5e7bf975222cabd530302e47e45bd7cdc21697fbd333ae7d98965c2 ./test/fakes.dart0a1394c90829b91541aa01e9786e3195aae04fc49a7b92775dbf404bf2802107 ./test/fakes_test.dart14368b598ece0ce9b2e249148a10a92f2c80e38427c077013a1515826f4365bd ./test/fixtures/routes_contract.jsonfd2bad0ad87fbf2f15f7e9845b830db58408bb4c502c6ff105f39e4e7cce1905 ./test/multipart_upload_test.dart-5828c88fff50231ac71bc2e9bdf2a4795daa008c74e7abaefa28807d27bbd008 ./test/regression_manifest_test.dart+cfcc97997e08295d08e08f27b3ad860088075f3822947f6b6200553847f859ec ./test/new_api_surface_test.dart+86b093ffdab0bc6b2d412cd8f41667058bbc1117cedae9082d2635e98ef6488e ./test/regression_manifest_test.dartec2d3ab09457fdccf30fc338585b89cf466f5d8f7fc8ce5f6c0ae52357390277 ./test/resources_models_test.dart-f8a9db8ec058072c6bb13d1052306e826010331c36848024faa3e2694732ff86 ./test/shell_scripts_test.dart+8619ce113bb8669612f9a2a16b1b334ac68435c5972e84828a789511467fcb77 ./test/shell_scripts_test.dart79e3de3c03451cd9d62327430106edf861da6aeb97b546bbac2d93a0bcbbe3d3 ./test/transport_test.dartc13557f89597f0be73f48dc8463aa7513e9e814c0e6a0ab871e441834687abb1 ./test/upload_test.dart-5781ecdda41052a0a68b3d5a2f6a976a47f20cedd01b708e33f9af758bccbd6d ./test/workflow_layout_test.dart+dbafa9aad5d421c72452c9201284ea65fb451f215d573459c9c9967e47289d3a ./test/workflow_layout_test.dart406de1350b79662fcaf007cb0cacd7a6b71b83815dc7cd3c7b561fcfba5600a3 ./tool/check_route_sync.dartd5f5f9246656a5c275c5ab5863dbf3945d8ef6b1c9042c9d1912cfafce93646f ./tool/flutter_checksums.txtd09e2ee68e0e238b86e54a8248a0da92db81c953ce691628708bffd63fa3e737 ./tool/live_test.dart-84fe3892295b846e13fea3c3c791328f658efd7baa5a92e21a18500206cb0925 ./tool/release_manifest.dart+f9ef953b6a5e57aae1e113ba233e96843cbe7cfe9ebd56b99a17efd51cc009a5 ./tool/release_manifest.dartdiff --git a/build.sh b/build.shindex 18aaf5d..779807c 100755--- a/build.sh+++ b/build.sh@@ -39,7 +39,8 @@ sdk_pub_get() {'bash install.sh checksdk_flutter pub get- (cd example && sdk_flutter pub get)+ (cd example/01_full_app && sdk_flutter pub get)+ (cd example/02_users && sdk_flutter pub get)}sdk_format() {@@ -47,7 +48,7 @@ sdk_format() {## Usage:bash build.sh format'- sdk_dart format --output=none --set-exit-if-changed lib test tool example/lib example/test+ sdk_dart format --output=none --set-exit-if-changed lib test tool example/01_full_app/lib example/01_full_app/test example/02_users/lib example/02_users/test}sdk_analyze() {@@ -56,7 +57,8 @@ sdk_analyze() {bash build.sh analyze'sdk_flutter analyze- (cd example && sdk_flutter analyze)+ (cd example/01_full_app && sdk_flutter analyze)+ (cd example/02_users && sdk_flutter analyze)}sdk_test() {@@ -65,7 +67,8 @@ sdk_test() {bash build.sh test'sdk_flutter test- (cd example && sdk_flutter test)+ (cd example/01_full_app && sdk_flutter test)+ (cd example/02_users && sdk_flutter test)}sdk_example_android() {@@ -73,7 +76,7 @@ sdk_example_android() {## Usage:bash build.sh example_android'- (cd example && sdk_flutter build apk --debug)+ (cd example/01_full_app && sdk_flutter build apk --debug)}sdk_example_ios() {@@ -82,7 +85,7 @@ sdk_example_ios() {bash build.sh example_ios'[[ "$(uname -s)" == 'Darwin' ]] || { echo 'iOS builds require a configured macOS runner.' >&2; return 2; }- (cd example && sdk_flutter build ios --simulator --debug --no-codesign)+ (cd example/01_full_app && sdk_flutter build ios --simulator --debug --no-codesign)}sdk_package() {@@ -115,7 +118,7 @@ sdk_clean() {## Usage:bash build.sh clean'- [[ -f "$sdk_dir/pubspec.yaml" && -f "$sdk_dir/example/pubspec.yaml" ]] || {+ [[ -f "$sdk_dir/pubspec.yaml" && -f "$sdk_dir/example/01_full_app/pubspec.yaml" && -f "$sdk_dir/example/02_users/pubspec.yaml" ]] || {echo 'Refusing to clean outside the VModal Flutter SDK.' >&2return 2}@@ -124,7 +127,8 @@ sdk_clean() {return 2}sdk_flutter clean- (cd example && sdk_flutter clean)+ (cd example/01_full_app && sdk_flutter clean)+ (cd example/02_users && sdk_flutter clean)}sdk_help() {diff --git a/doc/manage_api_key.md b/doc/manage_api_key.mdindex bada872..599a729 100644--- a/doc/manage_api_key.md+++ b/doc/manage_api_key.md@@ -5,17 +5,22 @@ them into memory, then inject `MutableApiKeyProvider`. The SDK never stores a ke```dartfinal provider = MutableApiKeyProvider(await authService.currentApiKey());-final client = VmodalClient(- config: SdkConfig(apiKeyProvider: provider),+final project = VModal.configure(+ projectId: 'food_app',+ apiKeyProvider: provider,);````rotate` validates the complete new key before replacing the old one. A requestreads one snapshot; rotation affects the next request. `clear` and `close` failclosed. Logout/account switch order is: cancel active work, clear upload state,-clear the provider, close the client, authenticate the next account, then create-a new provider and client. Key rotation is not an identity switch.+clear the provider, close the project, authenticate the next account, then+create a new provider, project, and immutable scopes. Key rotation is not an+identity, project, collection, or stream switch.++Keep `projectId` separate from the authenticated end-user ID. If content is+isolated per user, express the app-owned normalized identifier through a fresh+`collectionName` scope after account switch.Do not commit keys, put them in assets, log them, add them to presigned requests,or use compile-time `--dart-define` values as production mobile credential storage.-diff --git a/doc/sdk_contract.md b/doc/sdk_contract.mdindex 992a0a9..1cc0da4 100644--- a/doc/sdk_contract.md+++ b/doc/sdk_contract.md@@ -7,6 +7,8 @@ behavior. `test/fixtures/routes_contract.json` is the reviewed normalized mirror| Resource | Public Flutter operations | Contract status ||---|---|---|+| Scoped facade | `VModal.configure`, `VModal.fromClient`, `VModalProject.scope`, `listCollections`, `close` | Preferred additive API |+| Scoped operations | `upload`, `uploadMetadata`, `search`, `addAssets`, `updateAsset`, index lifecycle, collection deletion | Immutable organization; delegates to resources || Client/auth | `health`, `authCheck`, `auth.me` | Active; gateway bearer only || Searches | `searchVideo(SearchRequest)` | Active; exact Python/Android defaults || Collections | `listGroups`, `uploadFile`, `uploadMetadataJsonl`, `addAssets`, `updateDescription`, `delete` | Active |@@ -23,10 +25,26 @@ Every operation uses the centralized `Routes`, `VmodalHttp`, bounded responsereader, retry classifier, and cancellation token. Gateway payload serializersremove caller identity; only unsafe direct mode may emit trusted identity fields.+The facade's single organization mapping is:++```text+projectId + "__" + collectionName -> backend group/collection+streamName -> backend stream/sub-collection+```++All public names are trimmed and accept only `[A-Za-z0-9_]`, with an+80-character field limit. Project and collection reject `__`; their encoded+value must also fit 80 characters. Authentication identity is never derived+from these names.++The facade changes no route, serializer, response, retry, upload, cancellation,+or API-key-provider contract. `VmodalClient` remains public and compatible.+`VModal.fromClient` transfers lifecycle ownership, so the project is the object+that must be closed.+Android regression groups map to Flutter suites as follows: configuration/routesand credentials (`config_routes_test`, `auth_http_test`), transport/bounds andcancellation (`transport_test`), resources/models (`resources_models_test`),signed/bulk upload (`upload_test`), multipart/checkpoint (`multipart_upload_test`),adaptive vectors (`adaptive_upload_test`), and release/tooling(`shell_scripts_test`, `workflow_layout_test`).-diff --git a/doc/sdk_doc.md b/doc/sdk_doc.mdindex c26ab73..3e480e1 100644--- a/doc/sdk_doc.md+++ b/doc/sdk_doc.md@@ -8,14 +8,62 @@ part of the standalone package. Backend hosts, wire paths, and implementationbodies are intentionally excluded; mobile applications should use the typedresources described there.-Construct `VmodalClient` with an explicit `SdkConfig` and an app-owned-`ApiKeyProvider`. All ordinary operations are asynchronous. Gateway mode is the-default and sends only `Authorization: Bearer <key>` as caller identity.+Use `VModal.configure` with a developer-owned project ID and an app-owned+`ApiKeyProvider`, then create immutable collection/stream scopes:++```dart+final keys = MutableApiKeyProvider(runtimeApiKey);+final project = VModal.configure(+ projectId: 'food_app',+ apiKeyProvider: keys,+);+final scope = project.scope(+ collectionName: 'user_123',+ streamName: 'favorites',+);++final upload = scope.upload(UploadSource.fromFile(video));+final result = await scope.search('birthday dinner');++await project.close();+```++Configuration and scope creation perform no network I/O. Every Future-based+scoped operation accepts `CancellationToken?`; uploads retain `UploadTask`+progress and cancellation. `VModalProject.close()` owns and idempotently closes+the low-level client.++Names are trimmed, required, limited to ASCII letters, digits, and underscore,+and limited to 80 characters. `projectId` and `collectionName` cannot contain+`__`. The SDK internally maps project plus collection to one backend collection+and maps stream directly; callers never construct or parse that value.++`listCollections` returns logical names for the exact project prefix in backend+order, removes duplicates after their first occurrence, and excludes other+projects. A malformed name under the current project is a+`MalformedResponse`.++Common layouts include one `global` collection, one `user_123` collection per+end user, several streams in one user collection, a `product_catalog`+collection, and separate `VModalProject` values for separate apps. Account+switching creates fresh project/client state; API-key rotation alone does not+change identity or content scope.++`VmodalClient` remains the advanced compatibility API for auth, image lookup,+usage, and direct resource access. `VModal.fromClient` accepts an existing+fully configured client and transfers close ownership to the returned project.+All ordinary operations are asynchronous. Gateway mode sends only+`Authorization: Bearer <key>` as caller identity.Resources are grouped under `auth`, `searches`, `collections`, `indexes`,`admin`, `r2`, and `images`. Request models preserve server snake_case duringserialization and response classes retain the raw JSON map for extension fields.+Scoped migration replaces low-level `groupName` or `collectionName` plus+`streamName` arguments with one immutable `VModalScope`. Use scoped option+classes for operation settings; they deliberately contain no organization+override fields.+Responses are consumed through one bounded stream reader: JSON/text is limitedto 8 MiB, errors to 1 MiB, and binary results to 64 MiB. Only GET and HEAD retryrecognized transport failures or 500/502/503/504. Mutating requests are sentdiff --git a/doc/search_app.md b/doc/search_app.mdindex caff236..b1f8d19 100644--- a/doc/search_app.md+++ b/doc/search_app.md@@ -1,27 +1,30 @@# Search application integration-Keep the client above individual pages so navigation does not close shared-network state. Before searching, confirm that the selected authenticated video-collection exists and use its latest advertised LanceDB version.+Keep the project above individual pages so navigation does not close shared+network state. Retain an immutable scope in the page controller, provider,+BLoC, or notifier:```dart-final groups = await client.collections.listGroups(mode: 'vid_file');-final group = groups.findGroup('agroup', mode: 'vid_file');-final version = group?.latestLancedbVersion;-if (version == null) throw StateError('Finish the image index first');--final result = await client.searches.searchVideo(- SearchRequest(- queryText: 'red bicycle',- mode: 'vid_file',- groupName: 'agroup',- streamName: 'astream',- searchSources: const ['image'],- versionLancedb: version,+final project = VModal.configure(+ projectId: 'video_search',+ apiKeyProvider: keys,+);+final scope = project.scope(+ collectionName: 'global',+ streamName: 'uploads',+);+final result = await scope.search(+ 'red bicycle',+ options: const ScopedSearchOptions(+ searchSources: ['image'],),);```+Use `versionLancedb` in `ScopedSearchOptions` when your application tracks a+specific index version. Collection and stream cannot be overridden per search,+so overlapping searches retain the organization with which they started.+Search hits contain stored image coordinates, not public image URLs. Converteach usable hit into one bulk lookup record with these fields:@@ -40,6 +43,12 @@ Normalize timestamps from `ts_unix_13digits`, `ts_unix`, or `timestamp_ms`:truncate values longer than 13 digits, multiply 10-digit seconds by 1000, andleft-pad other nonblank numeric values to 13 digits.+Image URL resolution remains an advanced low-level resource. When a result+flow needs it, create `VmodalClient` first, pass it to `VModal.fromClient`, and+use `client.images` while the project is alive. Obtain raw image selectors from+trusted result data or a low-level collection response; never manually compose+a backend project/collection name.+Send all candidate records in one request:```dartdiff --git a/example/.gitignore b/example/01_full_app/.gitignoresimilarity index 100%rename from example/.gitignorerename to example/01_full_app/.gitignorediff --git a/example/.metadata b/example/01_full_app/.metadatasimilarity index 100%rename from example/.metadatarename to example/01_full_app/.metadatadiff --git a/example/README.md b/example/01_full_app/README.mdsimilarity index 95%rename from example/README.mdrename to example/01_full_app/README.mdindex 1a2eda6..8879d6f 100644--- a/example/README.md+++ b/example/01_full_app/README.md@@ -1,5 +1,13 @@# VModal Flutter example+This application intentionally remains the advanced `VmodalClient`+compatibility example for this release. It exercises auth, raw collection+index-version metadata, image URL resolution, and content operations in one+progressive UI. Migrating it fully to `VModalScope` is deferred until the+high-level facade exposes a typed index-version/image-selector flow; the+example must not reconstruct or parse backend project/collection names in the+meantime. `VmodalClient` remains a supported public API.+This application shows a complete VModal SDK evaluation workflow on Android oriOS:@@ -54,7 +62,7 @@ use its reviewed Flutter version (`3.44.6`) from a user-owned cache.## 1. Open the SDK directoryRun the following commands from the Flutter SDK directory—the directory that-contains `install.sh`, `run.sh`, and this `example/` folder.+contains `install.sh`, `run.sh`, and this `example/01_full_app/` folder.From the VModal monorepo root:@@ -419,13 +427,13 @@ the next identity.## How the example is connected to the SDK-The example uses the SDK source from the parent directory rather than a+The example uses the SDK source from two directories above rather than apublished package:```yamldependencies:vmodal_sdk_flutter:- path: ..+ path: ../..```This line in [`pubspec.yaml`](pubspec.yaml) means changes made to the SDK's@@ -547,7 +555,7 @@ bash build.sh pub_get## Next steps-- Read the [SDK guide](../doc/sdk_doc.md).-- Learn how to [manage API keys](../doc/manage_api_key.md).-- Follow the [search application guide](../doc/search_app.md).-- Review the [SDK contract](../doc/sdk_contract.md).+- Read the [SDK guide](../../doc/sdk_doc.md).+- Learn how to [manage API keys](../../doc/manage_api_key.md).+- Follow the [search application guide](../../doc/search_app.md).+- Review the [SDK contract](../../doc/sdk_contract.md).diff --git a/example/analysis_options.yaml b/example/01_full_app/analysis_options.yamlsimilarity index 100%rename from example/analysis_options.yamlrename to example/01_full_app/analysis_options.yamldiff --git a/example/android/.gitignore b/example/01_full_app/android/.gitignoresimilarity index 100%rename from example/android/.gitignorerename to example/01_full_app/android/.gitignorediff --git a/example/android/app/build.gradle.kts b/example/01_full_app/android/app/build.gradle.ktssimilarity index 100%rename from example/android/app/build.gradle.ktsrename to example/01_full_app/android/app/build.gradle.ktsdiff --git a/example/android/app/src/debug/AndroidManifest.xml b/example/01_full_app/android/app/src/debug/AndroidManifest.xmlsimilarity index 100%rename from example/android/app/src/debug/AndroidManifest.xmlrename to example/01_full_app/android/app/src/debug/AndroidManifest.xmldiff --git a/example/android/app/src/main/AndroidManifest.xml b/example/01_full_app/android/app/src/main/AndroidManifest.xmlsimilarity index 100%rename from example/android/app/src/main/AndroidManifest.xmlrename to example/01_full_app/android/app/src/main/AndroidManifest.xmldiff --git a/example/android/app/src/main/kotlin/com/vmodal/sdk/vmodal_example/MainActivity.kt b/example/01_full_app/android/app/src/main/kotlin/com/vmodal/sdk/vmodal_example/MainActivity.ktsimilarity index 100%rename from example/android/app/src/main/kotlin/com/vmodal/sdk/vmodal_example/MainActivity.ktrename to example/01_full_app/android/app/src/main/kotlin/com/vmodal/sdk/vmodal_example/MainActivity.ktdiff --git a/example/android/app/src/main/res/drawable-v21/launch_background.xml b/example/01_full_app/android/app/src/main/res/drawable-v21/launch_background.xmlsimilarity index 100%rename from example/android/app/src/main/res/drawable-v21/launch_background.xmlrename to example/01_full_app/android/app/src/main/res/drawable-v21/launch_background.xmldiff --git a/example/android/app/src/main/res/drawable/launch_background.xml b/example/01_full_app/android/app/src/main/res/drawable/launch_background.xmlsimilarity index 100%rename from example/android/app/src/main/res/drawable/launch_background.xmlrename to example/01_full_app/android/app/src/main/res/drawable/launch_background.xmldiff --git a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/example/01_full_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.pngsimilarity index 100%rename from example/android/app/src/main/res/mipmap-hdpi/ic_launcher.pngrename to example/01_full_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.pngdiff --git a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/example/01_full_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.pngsimilarity index 100%rename from example/android/app/src/main/res/mipmap-mdpi/ic_launcher.pngrename to example/01_full_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.pngdiff --git a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/example/01_full_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.pngsimilarity index 100%rename from example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.pngrename to example/01_full_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.pngdiff --git a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/example/01_full_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.pngsimilarity index 100%rename from example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.pngrename to example/01_full_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.pngdiff --git a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/example/01_full_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.pngsimilarity index 100%rename from example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.pngrename to example/01_full_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.pngdiff --git a/example/android/app/src/main/res/values-night/styles.xml b/example/01_full_app/android/app/src/main/res/values-night/styles.xmlsimilarity index 100%rename from example/android/app/src/main/res/values-night/styles.xmlrename to example/01_full_app/android/app/src/main/res/values-night/styles.xmldiff --git a/example/android/app/src/main/res/values/styles.xml b/example/01_full_app/android/app/src/main/res/values/styles.xmlsimilarity index 100%rename from example/android/app/src/main/res/values/styles.xmlrename to example/01_full_app/android/app/src/main/res/values/styles.xmldiff --git a/example/android/app/src/profile/AndroidManifest.xml b/example/01_full_app/android/app/src/profile/AndroidManifest.xmlsimilarity index 100%rename from example/android/app/src/profile/AndroidManifest.xmlrename to example/01_full_app/android/app/src/profile/AndroidManifest.xmldiff --git a/example/android/build.gradle.kts b/example/01_full_app/android/build.gradle.ktssimilarity index 100%rename from example/android/build.gradle.ktsrename to example/01_full_app/android/build.gradle.ktsdiff --git a/example/android/gradle.properties b/example/01_full_app/android/gradle.propertiessimilarity index 100%rename from example/android/gradle.propertiesrename to example/01_full_app/android/gradle.propertiesdiff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/01_full_app/android/gradle/wrapper/gradle-wrapper.propertiessimilarity index 100%rename from example/android/gradle/wrapper/gradle-wrapper.propertiesrename to example/01_full_app/android/gradle/wrapper/gradle-wrapper.propertiesdiff --git a/example/android/settings.gradle.kts b/example/01_full_app/android/settings.gradle.ktssimilarity index 100%rename from example/android/settings.gradle.ktsrename to example/01_full_app/android/settings.gradle.ktsdiff --git a/example/asset/video_10frames.mp4 b/example/01_full_app/asset/video_10frames.mp4similarity index 100%rename from example/asset/video_10frames.mp4rename to example/01_full_app/asset/video_10frames.mp4diff --git a/example/ios/.gitignore b/example/01_full_app/ios/.gitignoresimilarity index 100%rename from example/ios/.gitignorerename to example/01_full_app/ios/.gitignorediff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/01_full_app/ios/Flutter/AppFrameworkInfo.plistsimilarity index 100%rename from example/ios/Flutter/AppFrameworkInfo.plistrename to example/01_full_app/ios/Flutter/AppFrameworkInfo.plistdiff --git a/example/ios/Flutter/Debug.xcconfig b/example/01_full_app/ios/Flutter/Debug.xcconfigsimilarity index 100%rename from example/ios/Flutter/Debug.xcconfigrename to example/01_full_app/ios/Flutter/Debug.xcconfigdiff --git a/example/ios/Flutter/Release.xcconfig b/example/01_full_app/ios/Flutter/Release.xcconfigsimilarity index 100%rename from example/ios/Flutter/Release.xcconfigrename to example/01_full_app/ios/Flutter/Release.xcconfigdiff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/01_full_app/ios/Runner.xcodeproj/project.pbxprojsimilarity index 100%rename from example/ios/Runner.xcodeproj/project.pbxprojrename to example/01_full_app/ios/Runner.xcodeproj/project.pbxprojdiff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/example/01_full_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedatasimilarity index 100%rename from example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedatarename to example/01_full_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedatadiff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/01_full_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plistsimilarity index 100%rename from example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plistrename to example/01_full_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plistdiff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example/01_full_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettingssimilarity index 100%rename from example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettingsrename to example/01_full_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettingsdiff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/01_full_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcschemesimilarity index 100%rename from example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcschemerename to example/01_full_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcschemediff --git a/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/example/01_full_app/ios/Runner.xcworkspace/contents.xcworkspacedatasimilarity index 100%rename from example/ios/Runner.xcworkspace/contents.xcworkspacedatarename to example/01_full_app/ios/Runner.xcworkspace/contents.xcworkspacedatadiff --git a/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/01_full_app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plistsimilarity index 100%rename from example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plistrename to example/01_full_app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plistdiff --git a/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example/01_full_app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettingssimilarity index 100%rename from example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettingsrename to example/01_full_app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettingsdiff --git a/example/ios/Runner/AppDelegate.swift b/example/01_full_app/ios/Runner/AppDelegate.swiftsimilarity index 100%rename from example/ios/Runner/AppDelegate.swiftrename to example/01_full_app/ios/Runner/AppDelegate.swiftdiff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.jsonsimilarity index 100%rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.jsonrename to example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.jsondiff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]similarity index 100%rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]rename to example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]similarity index 100%rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]rename to example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]similarity index 100%rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]rename to example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]similarity index 100%rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]rename to example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]similarity index 100%rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]rename to example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]similarity index 100%rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]rename to example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]similarity index 100%rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]rename to example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]similarity index 100%rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]rename to example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]similarity index 100%rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]rename to example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]similarity index 100%rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]rename to example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]similarity index 100%rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]rename to example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]similarity index 100%rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]rename to example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]similarity index 100%rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]rename to example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]similarity index 100%rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]rename to example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]similarity index 100%rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]rename to example/01_full_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/example/01_full_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.jsonsimilarity index 100%rename from example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.jsonrename to example/01_full_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.jsondiff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/example/01_full_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.pngsimilarity index 100%rename from example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.pngrename to example/01_full_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.pngdiff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected] b/example/01_full_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]similarity index 100%rename from example/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]rename to example/01_full_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected] b/example/01_full_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]similarity index 100%rename from example/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]rename to example/01_full_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/example/01_full_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.mdsimilarity index 100%rename from example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.mdrename to example/01_full_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.mddiff --git a/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/example/01_full_app/ios/Runner/Base.lproj/LaunchScreen.storyboardsimilarity index 100%rename from example/ios/Runner/Base.lproj/LaunchScreen.storyboardrename to example/01_full_app/ios/Runner/Base.lproj/LaunchScreen.storyboarddiff --git a/example/ios/Runner/Base.lproj/Main.storyboard b/example/01_full_app/ios/Runner/Base.lproj/Main.storyboardsimilarity index 100%rename from example/ios/Runner/Base.lproj/Main.storyboardrename to example/01_full_app/ios/Runner/Base.lproj/Main.storyboarddiff --git a/example/ios/Runner/Info.plist b/example/01_full_app/ios/Runner/Info.plistsimilarity index 100%rename from example/ios/Runner/Info.plistrename to example/01_full_app/ios/Runner/Info.plistdiff --git a/example/ios/Runner/Runner-Bridging-Header.h b/example/01_full_app/ios/Runner/Runner-Bridging-Header.hsimilarity index 100%rename from example/ios/Runner/Runner-Bridging-Header.hrename to example/01_full_app/ios/Runner/Runner-Bridging-Header.hdiff --git a/example/ios/Runner/SceneDelegate.swift b/example/01_full_app/ios/Runner/SceneDelegate.swiftsimilarity index 100%rename from example/ios/Runner/SceneDelegate.swiftrename to example/01_full_app/ios/Runner/SceneDelegate.swiftdiff --git a/example/ios/RunnerTests/RunnerTests.swift b/example/01_full_app/ios/RunnerTests/RunnerTests.swiftsimilarity index 100%rename from example/ios/RunnerTests/RunnerTests.swiftrename to example/01_full_app/ios/RunnerTests/RunnerTests.swiftdiff --git a/example/lib/main.dart b/example/01_full_app/lib/main.dartsimilarity index 100%rename from example/lib/main.dartrename to example/01_full_app/lib/main.dartdiff --git a/example/pubspec.yaml b/example/01_full_app/pubspec.yamlsimilarity index 99%rename from example/pubspec.yamlrename to example/01_full_app/pubspec.yamlindex 8b63cc4..d3b970a 100644--- a/example/pubspec.yaml+++ b/example/01_full_app/pubspec.yaml@@ -32,7 +32,7 @@ dependencies:flutter:sdk: fluttervmodal_sdk_flutter:- path: ..+ path: ../..# The following adds the Cupertino Icons font to your application.# Use with the CupertinoIcons class for iOS style icons.diff --git a/example/test/widget_test.dart b/example/01_full_app/test/widget_test.dartsimilarity index 100%rename from example/test/widget_test.dartrename to example/01_full_app/test/widget_test.dartdiff --git a/example/02_users/README.md b/example/02_users/README.mdnew file mode 100644index 0000000..8ec7974--- /dev/null+++ b/example/02_users/README.md@@ -0,0 +1,157 @@+# User and business index organization++These compile-checked Flutter examples show four ways an application can+organize searchable content with the immutable `VModal` project, collection,+and stream facade.++The SDK does not create or manage application user accounts. Your application+authenticates its user, obtains a VModal runtime API key, and maps its stable+user identifier to a collection name. The examples keep that content mapping+separate from VModal bearer-token identity.++## Progressive flow++Every example starts in the same order:++```text+runtime API key+ -> authenticate with auth.me()+ -> list this project's collections+ -> list index jobs for the selected collection+ -> upload, index, or search+```++Stop after an authentication failure. Empty collection and index-job lists are+valid for a new account; upload content and create an index before searching.++## Four cases++| Case | Class | Project / collection / stream |+|---|---|---|+| Shared search | `GlobalSearchIndex` | `video_search / global / uploads` |+| Private user index | `PrivateUserIndex` | `food_app / user_<id> / personal_videos` |+| User streams | `UserStreams` | `food_app / user_<id> / camera, favorites, uploads` |+| Product catalog | `ProductCatalog` | `shopping_app / product_catalog / merchant_uploads` |++Import all four examples from:++```dart+import 'package:vmodal_user_examples/user_examples.dart';+```++## Private index per application user++Supply the API key at runtime. Never embed it in source, assets, logs, or build+arguments.++```dart+import 'package:vmodal_sdk_flutter/vmodal_sdk_flutter.dart';+import 'package:vmodal_user_examples/user_examples.dart';++Future<void> openUserLibrary(+ String runtimeApiKey,+ String authenticatedUserId,+) async {+ final keys = MutableApiKeyProvider(runtimeApiKey);+ final user = PrivateUserIndex(+ apiKeyProvider: keys,+ endUserId: authenticatedUserId,+ );++ try {+ final profile = await user.authenticate();+ final collections = await user.listCollections();+ final jobs = await user.listIndexJobs();++ print('Authenticated type: ${profile.type}');+ print('Project collections: ${collections.length}');+ print('Index jobs: ${jobs.total}');++ // Keep UploadTask when uploading so the UI can observe progress or cancel:+ // final task = user.upload(UploadSource.fromFile(videoFile));+ // final uploaded = await task.result;++ final results = await user.search('pasta recipe');+ print('Matches: ${results.cntActual}');+ } finally {+ keys.clear();+ await user.close();+ }+}+```++Only call `listIndexJobs()` after authentication. For a new user collection,+the request may return an empty list until content is uploaded and indexed.++## Multiple streams for one user++Use one collection when all content belongs to the same application user, then+select a stream by source or purpose:++```dart+final user = UserStreams(+ apiKeyProvider: keys,+ endUserId: authenticatedUserId,+);++final cameraTask = user.camera.upload(UploadSource.fromFile(cameraVideo));+final favoriteResults = await user.favorites.search('birthday dinner');+final uploadJobs = await user.uploads.listIndexJobs();+```++`camera`, `favorites`, and `uploads` all map to the same user collection. A+collection deletion therefore affects every stream in that collection.++## Global and business-domain collections++Use `GlobalSearchIndex` when all application content belongs in one shared+search index. Use `ProductCatalog` when the collection is owned by a business+domain rather than by an end user.++Both expose the same progressive methods as `PrivateUserIndex`:++```dart+await example.authenticate();+await example.listCollections();+await example.listIndexJobs();+final task = example.upload(source);+final uploaded = await task.result;+final results = await example.search(query);+await example.close();+```++## Naming contract++`VModal` encodes the public project and collection into the backend collection:++```text+<projectId>__<collectionName>+```++The double underscore is reserved for this encoding. Do not include `__` in+either public value. For example, application user `123` becomes logical+collection `user_123`, which project `food_app` encodes internally as+`food_app__user_123`.++The application owns this mapping. The source user ID must:++- remain stable for that user;+- contain only letters, digits, and underscores after the `user_` prefix;+- fit the SDK's 80-character encoded-name limit; and+- never be lossy-sanitized in a way that can map two users to one collection.++Invalid mappings throw `ValidationException` locally before a network request.++## Verify all four cases++From `uinterface/sdk_flutter`:++```bash+bash build.sh pub_get+bash build.sh format+bash build.sh analyze+bash build.sh test+```++The standard SDK checks resolve, format, analyze, and test this package+together with the main SDK and `example/01_full_app`.diff --git a/example/02_users/analysis_options.yaml b/example/02_users/analysis_options.yamlnew file mode 100644index 0000000..f04c6cf--- /dev/null+++ b/example/02_users/analysis_options.yaml@@ -0,0 +1 @@+include: ../../analysis_options.yamldiff --git a/example/02_users/lib/global_search_index.dart b/example/02_users/lib/global_search_index.dartnew file mode 100644index 0000000..dfc98dd--- /dev/null+++ b/example/02_users/lib/global_search_index.dart@@ -0,0 +1,34 @@+import 'package:vmodal_sdk_flutter/vmodal_sdk_flutter.dart';++import 'src/example_session.dart';++/// Google Search-style organization with one shared application index.+final class GlobalSearchIndex {+ GlobalSearchIndex({required ApiKeyProvider apiKeyProvider})+ : _session = ExampleSession(+ projectId: 'video_search',+ apiKeyProvider: apiKeyProvider,+ ) {+ content = _session.project.scope(+ collectionName: 'global',+ streamName: 'uploads',+ );+ }++ final ExampleSession _session;+ late final VModalScope content;++ Future<UserProfile> authenticate() => _session.authenticate();++ Future<List<String>> listCollections() => _session.listCollections();++ Future<IndexationJobsListResponse> listIndexJobs() => content.listIndexJobs();++ UploadTask<VideoUploadResponse> upload(UploadSource video) =>+ content.upload(video);++ Future<SearchResponse> search([String query = 'red bicycle near a bridge']) =>+ content.search(query);++ Future<void> close() => _session.close();+}diff --git a/example/02_users/lib/private_user_index.dart b/example/02_users/lib/private_user_index.dartnew file mode 100644index 0000000..6775205--- /dev/null+++ b/example/02_users/lib/private_user_index.dart@@ -0,0 +1,39 @@+import 'package:vmodal_sdk_flutter/vmodal_sdk_flutter.dart';++import 'src/example_session.dart';++/// One isolated searchable collection for an application end user.+final class PrivateUserIndex {+ PrivateUserIndex({+ required ApiKeyProvider apiKeyProvider,+ required String endUserId,+ }) : collectionName = exampleUserCollectionName(endUserId),+ _session = ExampleSession(+ projectId: 'food_app',+ apiKeyProvider: apiKeyProvider,+ ) {+ personal = _session.project.scope(+ collectionName: collectionName,+ streamName: 'personal_videos',+ );+ }++ final String collectionName;+ final ExampleSession _session;+ late final VModalScope personal;++ Future<UserProfile> authenticate() => _session.authenticate();++ Future<List<String>> listCollections() => _session.listCollections();++ Future<IndexationJobsListResponse> listIndexJobs() =>+ personal.listIndexJobs();++ UploadTask<VideoUploadResponse> upload(UploadSource video) =>+ personal.upload(video);++ Future<SearchResponse> search([String query = 'pasta recipe']) =>+ personal.search(query);++ Future<void> close() => _session.close();+}diff --git a/example/02_users/lib/product_catalog.dart b/example/02_users/lib/product_catalog.dartnew file mode 100644index 0000000..d55ed56--- /dev/null+++ b/example/02_users/lib/product_catalog.dart@@ -0,0 +1,33 @@+import 'package:vmodal_sdk_flutter/vmodal_sdk_flutter.dart';++import 'src/example_session.dart';++/// Commerce organization based on a business domain, not an end user.+final class ProductCatalog {+ ProductCatalog({required ApiKeyProvider apiKeyProvider})+ : _session = ExampleSession(+ projectId: 'shopping_app',+ apiKeyProvider: apiKeyProvider,+ ) {+ catalog = _session.project.scope(+ collectionName: 'product_catalog',+ streamName: 'merchant_uploads',+ );+ }++ final ExampleSession _session;+ late final VModalScope catalog;++ Future<UserProfile> authenticate() => _session.authenticate();++ Future<List<String>> listCollections() => _session.listCollections();++ Future<IndexationJobsListResponse> listIndexJobs() => catalog.listIndexJobs();++ UploadTask<VideoUploadResponse> upload(UploadSource asset) =>+ catalog.upload(asset);++ Future<SearchResponse> search(String query) => catalog.search(query);++ Future<void> close() => _session.close();+}diff --git a/example/02_users/lib/src/example_session.dart b/example/02_users/lib/src/example_session.dartnew file mode 100644index 0000000..4d7f420--- /dev/null+++ b/example/02_users/lib/src/example_session.dart@@ -0,0 +1,50 @@+import 'package:vmodal_sdk_flutter/vmodal_sdk_flutter.dart';++const int _foodUserCollectionMax = 70;+final RegExp _userIdPattern = RegExp(r'^[A-Za-z0-9_]+$');++/// Shared progressive setup for the compile-checked organization examples.+final class ExampleSession {+ ExampleSession({+ required String projectId,+ required ApiKeyProvider apiKeyProvider,+ }) : client = VmodalClient(+ config: SdkConfig(apiKeyProvider: apiKeyProvider),+ ) {+ project = VModal.fromClient(projectId: projectId, client: client);+ }++ final VmodalClient client;+ late final VModalProject project;++ Future<UserProfile> authenticate() => client.auth.me();++ Future<List<String>> listCollections() =>+ project.listCollections(mode: 'vid_file');++ Future<void> close() => project.close();+}++String exampleUserCollectionName(String endUserId) {+ final id = endUserId.trim();+ if (id.isEmpty) {+ throw const ValidationException('endUserId is required');+ }+ if (!_userIdPattern.hasMatch(id)) {+ throw const ValidationException(+ 'endUserId must contain only letters, digits, and underscore',+ );+ }+ final name = 'user_$id';+ if (name.contains('__')) {+ throw const ValidationException(+ 'endUserId must not create the reserved separator "__"',+ );+ }+ if (name.length > _foodUserCollectionMax) {+ throw const ValidationException(+ 'endUserId is too long for the food_app project',+ );+ }+ return name;+}diff --git a/example/02_users/lib/user_examples.dart b/example/02_users/lib/user_examples.dartnew file mode 100644index 0000000..4d1a7c5--- /dev/null+++ b/example/02_users/lib/user_examples.dart@@ -0,0 +1,4 @@+export 'global_search_index.dart';+export 'private_user_index.dart';+export 'product_catalog.dart';+export 'user_streams.dart';diff --git a/example/02_users/lib/user_streams.dart b/example/02_users/lib/user_streams.dartnew file mode 100644index 0000000..868ae88--- /dev/null+++ b/example/02_users/lib/user_streams.dart@@ -0,0 +1,42 @@+import 'package:vmodal_sdk_flutter/vmodal_sdk_flutter.dart';++import 'src/example_session.dart';++/// One user collection divided by asset source or purpose.+final class UserStreams {+ UserStreams({+ required ApiKeyProvider apiKeyProvider,+ required String endUserId,+ }) : collectionName = exampleUserCollectionName(endUserId),+ _session = ExampleSession(+ projectId: 'food_app',+ apiKeyProvider: apiKeyProvider,+ ) {+ camera = _session.project.scope(+ collectionName: collectionName,+ streamName: 'camera',+ );+ favorites = _session.project.scope(+ collectionName: collectionName,+ streamName: 'favorites',+ );+ uploads = _session.project.scope(+ collectionName: collectionName,+ streamName: 'uploads',+ );+ }++ final String collectionName;+ final ExampleSession _session;+ late final VModalScope camera;+ late final VModalScope favorites;+ late final VModalScope uploads;++ Future<UserProfile> authenticate() => _session.authenticate();++ Future<List<String>> listCollections() => _session.listCollections();++ Future<IndexationJobsListResponse> listIndexJobs() => uploads.listIndexJobs();++ Future<void> close() => _session.close();+}diff --git a/example/02_users/pubspec.yaml b/example/02_users/pubspec.yamlnew file mode 100644index 0000000..8066020--- /dev/null+++ b/example/02_users/pubspec.yaml@@ -0,0 +1,22 @@+name: vmodal_user_examples+description: Compile-checked VModal Flutter user-organization examples.+publish_to: none+version: 1.0.0++environment:+ sdk: '>=3.12.0 <4.0.0'+ flutter: '>=3.44.0'++dependencies:+ flutter:+ sdk: flutter+ vmodal_sdk_flutter:+ path: ../..++dev_dependencies:+ flutter_lints: ^6.0.0+ flutter_test:+ sdk: flutter++flutter:+ uses-material-design: truediff --git a/example/02_users/test/user_examples_test.dart b/example/02_users/test/user_examples_test.dartnew file mode 100644index 0000000..f920b79--- /dev/null+++ b/example/02_users/test/user_examples_test.dart@@ -0,0 +1,115 @@+import 'package:flutter_test/flutter_test.dart';+import 'package:vmodal_sdk_flutter/vmodal_sdk_flutter.dart';+import 'package:vmodal_user_examples/user_examples.dart';++void main() {+ test('P1 global search uses one shared application scope', () async {+ final example = GlobalSearchIndex(+ apiKeyProvider: MutableApiKeyProvider('runtime-key'),+ );+ addTearDown(example.close);++ expect(example.content.projectId, 'video_search');+ expect(example.content.collectionName, 'global');+ expect(example.content.streamName, 'uploads');+ expect(example.authenticate, isA<Future<UserProfile> Function()>());+ expect(example.listCollections, isA<Future<List<String>> Function()>());+ expect(+ example.listIndexJobs,+ isA<Future<IndexationJobsListResponse> Function()>(),+ );+ expect(+ example.upload,+ isA<UploadTask<VideoUploadResponse> Function(UploadSource)>(),+ );+ });++ test('P2 private index maps one application user to one scope', () async {+ final example = PrivateUserIndex(+ apiKeyProvider: MutableApiKeyProvider('runtime-key'),+ endUserId: ' 123 ',+ );+ addTearDown(example.close);++ expect(example.collectionName, 'user_123');+ expect(example.personal.projectId, 'food_app');+ expect(example.personal.collectionName, 'user_123');+ expect(example.personal.streamName, 'personal_videos');+ });++ test('P2 private index rejects missing or invalid user names locally', () {+ expect(+ () => PrivateUserIndex(+ apiKeyProvider: MutableApiKeyProvider('runtime-key'),+ endUserId: ' ',+ ),+ throwsA(isA<ValidationException>()),+ );+ expect(+ () => PrivateUserIndex(+ apiKeyProvider: MutableApiKeyProvider('runtime-key'),+ endUserId: 'invalid-user',+ ),+ throwsA(isA<ValidationException>()),+ );+ expect(+ () => PrivateUserIndex(+ apiKeyProvider: MutableApiKeyProvider('runtime-key'),+ endUserId: 'invalid__user',+ ),+ throwsA(isA<ValidationException>()),+ );+ expect(+ () => PrivateUserIndex(+ apiKeyProvider: MutableApiKeyProvider('runtime-key'),+ endUserId: List<String>.filled(66, 'a').join(),+ ),+ throwsA(isA<ValidationException>()),+ );+ });++ test('P3 user streams share one collection and keep distinct streams', () {+ final example = UserStreams(+ apiKeyProvider: MutableApiKeyProvider('runtime-key'),+ endUserId: '123',+ );+ addTearDown(example.close);++ expect(example.collectionName, 'user_123');+ expect(+ <String>{+ example.camera.projectId,+ example.favorites.projectId,+ example.uploads.projectId,+ },+ <String>{'food_app'},+ );+ expect(+ <String>{+ example.camera.collectionName,+ example.favorites.collectionName,+ example.uploads.collectionName,+ },+ <String>{'user_123'},+ );+ expect(+ <String>{+ example.camera.streamName,+ example.favorites.streamName,+ example.uploads.streamName,+ },+ <String>{'camera', 'favorites', 'uploads'},+ );+ });++ test('P4 product catalog uses a user-independent business scope', () {+ final example = ProductCatalog(+ apiKeyProvider: MutableApiKeyProvider('runtime-key'),+ );+ addTearDown(example.close);++ expect(example.catalog.projectId, 'shopping_app');+ expect(example.catalog.collectionName, 'product_catalog');+ expect(example.catalog.streamName, 'merchant_uploads');+ });+}diff --git a/lib/src/content_scope.dart b/lib/src/content_scope.dartnew file mode 100644index 0000000..3bd4747--- /dev/null+++ b/lib/src/content_scope.dart@@ -0,0 +1,88 @@+import 'errors.dart';++const String _separator = '__';+const int _nameMax = 80;+final RegExp _namePattern = RegExp(r'^[A-Za-z0-9_]+$');++/// Internal normalized content organization.+///+/// This file is intentionally not exported from the package library.+final class ContentScope {+ ContentScope._(this.projectId, this.collectionName, this.streamName)+ : backendCollectionName = '$projectId$_separator$collectionName';++ final String projectId;+ final String collectionName;+ final String streamName;+ final String backendCollectionName;++ static String project(String value) =>+ _normalize(value, 'projectId', reservedSeparator: true);++ static ContentScope create(+ String projectId,+ String collectionName,+ String streamName,+ ) {+ final project = ContentScope.project(projectId);+ final collection = _normalize(+ collectionName,+ 'collectionName',+ reservedSeparator: true,+ );+ final stream = _normalize(streamName, 'streamName');+ if (project.length + _separator.length + collection.length > _nameMax) {+ throw const ValidationException(+ 'projectId and collectionName must encode to at most 80 characters',+ );+ }+ return ContentScope._(project, collection, stream);+ }++ static String? decodeCollection(String projectId, String backendName) {+ final prefix = '$projectId$_separator';+ if (!backendName.startsWith(prefix)) return null;+ try {+ final collection = _normalize(+ backendName.substring(prefix.length),+ 'collectionName',+ reservedSeparator: true,+ );+ if (backendName.length > _nameMax) {+ throw const ValidationException(+ 'projectId and collectionName must encode to at most 80 characters',+ );+ }+ return collection;+ } on ValidationException {+ throw const MalformedResponse(+ 'collection listing returned an invalid collectionName',+ );+ }+ }++ static String _normalize(+ String value,+ String field, {+ bool reservedSeparator = false,+ }) {+ final clean = value.trim();+ if (clean.isEmpty) {+ throw ValidationException('$field is required');+ }+ if (clean.length > _nameMax) {+ throw ValidationException('$field must be at most 80 characters');+ }+ if (!_namePattern.hasMatch(clean)) {+ throw ValidationException(+ '$field must contain only letters, digits, and underscore',+ );+ }+ if (reservedSeparator && clean.contains(_separator)) {+ throw ValidationException(+ '$field must not contain the reserved separator "$_separator"',+ );+ }+ return clean;+ }+}diff --git a/lib/src/vmodal.dart b/lib/src/vmodal.dartnew file mode 100644index 0000000..0128b2b--- /dev/null+++ b/lib/src/vmodal.dart@@ -0,0 +1,414 @@+import 'api_key_provider.dart';+import 'client.dart';+import 'collection_uploads.dart';+import 'config.dart';+import 'content_scope.dart';+import 'models.dart';+import 'transport.dart';+import 'upload.dart';+import 'utils.dart';++/// Preferred entry point for project, collection, and stream scoped clients.+abstract final class VModal {+ /// Creates one owned project client without performing network I/O.+ static VModalProject configure({+ required String projectId,+ required ApiKeyProvider apiKeyProvider,+ Uri? baseUri,+ Duration timeout = const Duration(seconds: 30),+ String mode = 'gateway',+ int maxRetries = 1,+ }) {+ final project = ContentScope.project(projectId);+ final config = SdkConfig(+ baseUrl: baseUri?.toString(),+ timeout: timeout,+ mode: mode,+ maxRetries: maxRetries,+ apiKeyProvider: apiKeyProvider,+ );+ return VModalProject._(project, VmodalClient(config: config));+ }++ /// Creates a project and transfers ownership of [client] to it.+ ///+ /// After this call, close the returned project instead of closing [client]+ /// separately.+ static VModalProject fromClient({+ required String projectId,+ required VmodalClient client,+ }) => VModalProject._(ContentScope.project(projectId), client);+}++/// Immutable client for one developer-owned project.+final class VModalProject {+ VModalProject._(this.projectId, this._client);++ /// Normalized public project identifier.+ final String projectId;+ final VmodalClient _client;+ bool _closed = false;++ /// Creates an immutable collection and stream scope without network I/O.+ VModalScope scope({+ required String collectionName,+ required String streamName,+ }) => VModalScope._(+ ContentScope.create(projectId, collectionName, streamName),+ _client,+ );++ /// Lists decoded logical collection names owned by this project.+ ///+ /// Backend order and the first occurrence of duplicates are preserved.+ Future<List<String>> listCollections({+ String? mode,+ CancellationToken? cancellation,+ }) async {+ final response = await _client.collections.listGroups(+ mode: mode,+ cancellation: cancellation,+ );+ final found = <String>{};+ for (final item in response.data) {+ final name = ContentScope.decodeCollection(projectId, item.groupName);+ if (name != null) found.add(name);+ }+ return found.toList(growable: false);+ }++ /// Closes the owned low-level client. Repeated calls have no effect.+ Future<void> close() async {+ if (_closed) return;+ _closed = true;+ await _client.close();+ }+}++/// Immutable operations for one project, collection, and stream.+final class VModalScope {+ VModalScope._(this._scope, this._client)+ : projectId = _scope.projectId,+ collectionName = _scope.collectionName,+ streamName = _scope.streamName;++ final ContentScope _scope;+ final VmodalClient _client;++ /// Normalized public project identifier.+ final String projectId;++ /// Normalized logical collection name.+ final String collectionName;++ /// Normalized stream name.+ final String streamName;++ /// Starts a signed upload using this scope.+ UploadTask<VideoUploadResponse> upload(+ UploadSource source, {+ ScopedUploadOptions options = const ScopedUploadOptions(),+ }) => _client.collections.videoUpload(+ source,+ collectionName: _scope.backendCollectionName,+ subCollectionName: streamName,+ mode: options.mode,+ modality: options.modality,+ ttl: options.ttl,+ options: options.uploadOptions,+ );++ /// Uploads JSON Lines metadata using this scope.+ Future<MetadataParquetUploadResponse> uploadMetadata(+ VmodalFilePart part, {+ ScopedMetadataOptions options = const ScopedMetadataOptions(),+ CancellationToken? cancellation,+ }) => _client.collections.uploadMetadataJsonl(+ part,+ mode: options.mode,+ groupName: _scope.backendCollectionName,+ streamName: streamName,+ writeMode: options.writeMode,+ allowOverlap: options.allowOverlap,+ cancellation: cancellation,+ );++ /// Searches only this collection and stream.+ Future<SearchResponse> search(+ String query, {+ ScopedSearchOptions options = const ScopedSearchOptions(),+ CancellationToken? cancellation,+ }) => _client.searches.searchVideo(+ SearchRequest(+ queryText: query,+ queryMetadata: options.queryMetadata,+ imageQuery: options.imageQuery,+ mode: options.mode,+ groupName: _scope.backendCollectionName,+ streamName: streamName,+ searchSources: options.searchSources,+ searchCombineMode: options.searchCombineMode,+ startDate: options.startDate,+ endDate: options.endDate,+ offset: options.offset,+ limit: options.limit,+ textEmbScoreMin: options.textEmbScoreMin,+ imageEmbScoreMin: options.imageEmbScoreMin,+ versionLancedb: options.versionLancedb,+ ),+ cancellation: cancellation,+ );++ /// Associates existing asset identifiers with this collection and stream.+ Future<CollectionAddAssetsResponse> addAssets(+ String collectionId,+ List<String> assetIds, {+ ScopedAddAssetsOptions options = const ScopedAddAssetsOptions(),+ CancellationToken? cancellation,+ }) => _client.collections.addAssets(+ collectionId: collectionId,+ assetIds: assetIds,+ mode: options.mode,+ groupName: _scope.backendCollectionName,+ streamName: streamName,+ cancellation: cancellation,+ );++ /// Updates one asset in this collection and stream.+ Future<CollectionDescriptionUpdateResponse> updateAsset(+ String filename, {+ required ScopedAssetChanges changes,+ CancellationToken? cancellation,+ }) {+ final clean = strRequired(filename, 'filename');+ final mode = strRequired(changes.mode, 'mode');+ return _client.collections.updateDescription(+ groupName: _scope.backendCollectionName,+ mode: mode,+ streamName: streamName,+ filenameSanitized: clean,+ description: changes.description,+ tag: changes.tags,+ cancellation: cancellation,+ );+ }++ /// Creates an index job for this collection and stream.+ Future<IndexationSubmitResponse> createIndex({+ ScopedCreateIndexOptions options = const ScopedCreateIndexOptions(),+ CancellationToken? cancellation,+ }) => _client.indexes.createIndex(+ IndexationSubmitRequest(+ mode: options.mode,+ groupName: _scope.backendCollectionName,+ streamName: streamName,+ indexType: options.indexType,+ modality: options.modality,+ insertMode: options.insertMode,+ createIndex: options.createIndex,+ version: options.version,+ startDate: options.startDate,+ endDate: options.endDate,+ embeddingModel: options.embeddingModel,+ reProcess: options.reProcess,+ dryRun: options.dryRun,+ ),+ cancellation: cancellation,+ );++ /// Lists index jobs filtered to this collection.+ Future<IndexationJobsListResponse> listIndexJobs({+ ScopedIndexJobsOptions options = const ScopedIndexJobsOptions(),+ CancellationToken? cancellation,+ }) => _client.indexes.jobsList(+ status: options.status,+ mode: options.mode,+ groupName: _scope.backendCollectionName,+ limit: options.limit,+ cancellation: cancellation,+ );++ /// Reads one index job without organization overrides.+ Future<IndexationStatusResponse> indexStatus(+ String jobId, {+ CancellationToken? cancellation,+ }) => _client.indexes.indexStatus(jobId, cancellation: cancellation);++ /// Deletes one index version from this collection.+ Future<IndexationDeleteResponse> deleteIndex(+ String version, {+ ScopedDeleteIndexOptions options = const ScopedDeleteIndexOptions(),+ CancellationToken? cancellation,+ }) => _client.indexes.deleteIndex(+ IndexationDeleteRequest(+ mode: options.mode,+ groupName: _scope.backendCollectionName,+ version: version,+ modality: options.modality,+ dryRun: options.dryRun,+ confirm: options.confirm,+ ),+ cancellation: cancellation,+ );++ /// Deletes the complete logical collection, including all streams.+ Future<DeleteCollectionResponse> deleteCollection({+ ScopedDeleteCollectionOptions options =+ const ScopedDeleteCollectionOptions(),+ CancellationToken? cancellation,+ }) => _client.collections.delete(+ groupName: _scope.backendCollectionName,+ mode: options.mode,+ scope: options.scope,+ dryRun: options.dryRun,+ confirm: options.confirm,+ cancellation: cancellation,+ );+}++/// Signed-upload behavior without organization fields.+final class ScopedUploadOptions {+ const ScopedUploadOptions({+ this.mode = 'vid_file',+ this.modality = 'vid_raw',+ this.ttl = 12600,+ this.uploadOptions = const VideoUploadOptions(),+ });++ final String mode;+ final String modality;+ final int ttl;+ final VideoUploadOptions uploadOptions;+}++/// Metadata-upload behavior without organization fields.+final class ScopedMetadataOptions {+ const ScopedMetadataOptions({+ this.mode = 'img_file',+ this.writeMode = 'append',+ this.allowOverlap = false,+ });++ final String mode;+ final String writeMode;+ final bool allowOverlap;+}++/// Search behavior without organization fields.+final class ScopedSearchOptions {+ const ScopedSearchOptions({+ this.queryMetadata,+ this.imageQuery,+ this.mode = 'vid_file',+ this.searchSources = const <String>['ocr', 'asr', 'image'],+ this.searchCombineMode = 'union',+ this.startDate,+ this.endDate,+ this.offset = 0,+ this.limit = 50,+ this.textEmbScoreMin = 0.90,+ this.imageEmbScoreMin = 1.5,+ this.versionLancedb,+ });++ final Map<String, Object?>? queryMetadata;+ final String? imageQuery;+ final String mode;+ final List<String> searchSources;+ final String searchCombineMode;+ final String? startDate;+ final String? endDate;+ final int offset;+ final int limit;+ final double textEmbScoreMin;+ final double imageEmbScoreMin;+ final int? versionLancedb;+}++/// Add-assets behavior without organization fields.+final class ScopedAddAssetsOptions {+ const ScopedAddAssetsOptions({this.mode = 'vid_file'});++ final String mode;+}++/// Asset changes for the selected scope.+final class ScopedAssetChanges {+ const ScopedAssetChanges({+ this.mode = 'vid_file',+ this.description,+ this.tags,+ });++ final String mode;+ final String? description;+ final List<String>? tags;+}++/// Index-creation behavior without organization fields.+final class ScopedCreateIndexOptions {+ const ScopedCreateIndexOptions({+ this.mode = 'vid_file',+ this.indexType,+ this.modality,+ this.insertMode = 'append',+ this.createIndex = true,+ this.version = 'new_version',+ this.startDate,+ this.endDate,+ this.embeddingModel,+ this.reProcess = false,+ this.dryRun = false,+ });++ final String mode;+ final String? indexType;+ final String? modality;+ final String insertMode;+ final bool createIndex;+ final String version;+ final String? startDate;+ final String? endDate;+ final String? embeddingModel;+ final bool reProcess;+ final bool dryRun;+}++/// Index-job filters without organization fields.+final class ScopedIndexJobsOptions {+ const ScopedIndexJobsOptions({this.status, this.mode, this.limit = 200});++ final String? status;+ final String? mode;+ final int limit;+}++/// Index-deletion behavior without organization fields.+final class ScopedDeleteIndexOptions {+ const ScopedDeleteIndexOptions({+ this.mode = 'vid_file',+ this.modality,+ this.dryRun = false,+ this.confirm = false,+ });++ final String mode;+ final String? modality;+ final bool dryRun;+ final bool confirm;+}++/// Collection-deletion behavior without organization fields.+final class ScopedDeleteCollectionOptions {+ const ScopedDeleteCollectionOptions({+ this.mode = 'vid_file',+ this.scope = 'all',+ this.dryRun = false,+ this.confirm = false,+ });++ final String mode;+ final String scope;+ final bool dryRun;+ final bool confirm;+}diff --git a/lib/vmodal_sdk_flutter.dart b/lib/vmodal_sdk_flutter.dartindex 5da5602..62fb0f2 100644--- a/lib/vmodal_sdk_flutter.dart+++ b/lib/vmodal_sdk_flutter.dart@@ -1,26 +1,31 @@/// Typed Flutter client for uploading, indexing, and searching VModal media.///-/// Create one [VmodalClient] for the active signed-in session and share its-/// resource objects across the app. The SDK does not own login UI or persist-/// credentials; supply the current key through [MutableApiKeyProvider] and-/// close the client when the session ends.+/// Configure one [VModalProject], create immutable [VModalScope] values, and+/// close the project when the app session ends. Authentication remains+/// separate from project, collection, and stream organization.////// ```dart/// final keys = MutableApiKeyProvider(runtimeApiKey);-/// final vmodal = VmodalClient(config: SdkConfig(apiKeyProvider: keys));-///-/// final groups = await vmodal.collections.listGroups();-/// final results = await vmodal.searches.searchVideo(-/// const SearchRequest(queryText: 'a person entering the room'),+/// final project = VModal.configure(+/// projectId: 'food_app',+/// apiKeyProvider: keys,+/// );+/// final favorites = project.scope(+/// collectionName: 'user_123',+/// streamName: 'favorites',/// );///-/// await vmodal.close();+/// final groups = await project.listCollections();+/// final results = await favorites.search('a person entering the room');+///+/// await project.close();/// keys.close();/// ```////// Long-running calls accept a [CancellationToken]. Media uploads return an/// [UploadTask], whose [UploadTask.progress] stream is suitable for progress/// indicators and whose [UploadTask.cancel] method stops pending work.+/// [VmodalClient] remains available as the advanced compatibility API.// ignore: unnecessary_library_namelibrary vmodal_sdk_flutter;@@ -45,3 +50,4 @@ export 'src/transport.dart'guessContentType,streamPart;export 'src/upload.dart';+export 'src/vmodal.dart';diff --git a/run.sh b/run.shindex 260d19f..19c2baa 100755--- a/run.sh+++ b/run.sh@@ -52,7 +52,7 @@ sdk_run_example() {esacdone[[ -n "$device" ]] || { echo '--device DEVICE_ID is required.' >&2; return 2; }- (cd example && sdk_flutter run --device-id "$device")+ (cd example/01_full_app && sdk_flutter run --device-id "$device")}sdk_help() {diff --git a/test/docs_reference_test.dart b/test/docs_reference_test.dartindex cde5c89..14052aa 100644--- a/test/docs_reference_test.dart+++ b/test/docs_reference_test.dart@@ -14,6 +14,15 @@ final requiredDocs = <String>['vmodal_sdk_flutter/VmodalClient-class.html','vmodal_sdk_flutter/VmodalClient/VmodalClient.html','vmodal_sdk_flutter/VmodalClient/close.html',+ 'vmodal_sdk_flutter/VModal-class.html',+ 'vmodal_sdk_flutter/VModal/configure.html',+ 'vmodal_sdk_flutter/VModalProject-class.html',+ 'vmodal_sdk_flutter/VModalProject/scope.html',+ 'vmodal_sdk_flutter/VModalProject/listCollections.html',+ 'vmodal_sdk_flutter/VModalProject/close.html',+ 'vmodal_sdk_flutter/VModalScope-class.html',+ 'vmodal_sdk_flutter/VModalScope/upload.html',+ 'vmodal_sdk_flutter/VModalScope/search.html','vmodal_sdk_flutter/CollectionsResource/listGroups.html','vmodal_sdk_flutter/CollectionUploads/videoUpload.html','vmodal_sdk_flutter/UploadTask-class.html',@@ -83,6 +92,14 @@ void main() {.toSet();const expected = <String>['vmodal_sdk_flutter.VmodalClient',+ 'vmodal_sdk_flutter.VModal',+ 'vmodal_sdk_flutter.VModalProject',+ 'vmodal_sdk_flutter.VModalScope',+ 'vmodal_sdk_flutter.VModal.configure',+ 'vmodal_sdk_flutter.VModalProject.scope',+ 'vmodal_sdk_flutter.VModalProject.listCollections',+ 'vmodal_sdk_flutter.VModalScope.upload',+ 'vmodal_sdk_flutter.VModalScope.search','vmodal_sdk_flutter.SearchesResource.searchVideo','vmodal_sdk_flutter.CollectionUploads.videoUpload','vmodal_sdk_flutter.UploadTask',diff --git a/test/new_api_surface_test.dart b/test/new_api_surface_test.dartnew file mode 100644index 0000000..b7318e7--- /dev/null+++ b/test/new_api_surface_test.dart@@ -0,0 +1,495 @@+import 'dart:async';+import 'dart:io';++import 'package:flutter_test/flutter_test.dart';+import 'package:vmodal_sdk_flutter/vmodal_sdk_flutter.dart';++import 'fakes.dart';++({VModalProject project, FakeTransport api, FakeSignedUploadTransport signed})+facade({String projectId = 'food_app'}) {+ final api = FakeTransport();+ final signed = FakeSignedUploadTransport();+ final client = VmodalClient(+ config: SdkConfig(baseUrl: 'https://gateway.test', token: 'key'),+ transport: api,+ signedUploadTransport: signed,+ );+ return (+ project: VModal.fromClient(projectId: projectId, client: client),+ api: api,+ signed: signed,+ );+}++Map<String, Object?> requestValues(VmodalRequest request) {+ final json = request.jsonBody is Map<String, Object?>+ ? request.jsonBody! as Map<String, Object?>+ : const <String, Object?>{};+ return <String, Object?>{+ ...json,+ ...request.formFields,+ ...request.uri.queryParameters,+ };+}++Map<String, Object?> group(String name) => <String, Object?>{+ 'group_name': name,+ 'mode': 'vid_file',+};++UploadSource source() => UploadSource(+ fileName: 'video.mp4',+ contentLength: 2,+ sourceId: 'facade-video',+ opener: () => Stream<List<int>>.value(<int>[1, 2]),+);++VmodalFilePart metadataPart() => VmodalFilePart.bytes(+ fieldName: 'file',+ fileName: 'metadata.jsonl',+ bytes: <int>[123, 125],+);++String repeated(String value, int count) =>+ List<String>.filled(count, value).join();++void main() {+ test('configuration and scope validation are local and deterministic', () {+ stdout.writeln('[facade] validating names and composite boundaries');+ final cfg = facade(projectId: ' food_app ');+ final scope = cfg.project.scope(+ collectionName: ' user_123 ',+ streamName: ' favorites__saved ',+ );+ expect(cfg.project.projectId, 'food_app');+ expect(scope.projectId, 'food_app');+ expect(scope.collectionName, 'user_123');+ expect(scope.streamName, 'favorites__saved');+ expect('${scope.projectId}__${scope.collectionName}', 'food_app__user_123');++ final invalid = <String>['', ' ', 'a-b', 'a b', 'a/b', 'a.b', 'é'];+ for (final value in invalid) {+ expect(+ () => facade(projectId: value),+ throwsA(isA<ValidationException>()),+ reason: 'projectId=$value',+ );+ expect(+ () => cfg.project.scope(collectionName: value, streamName: 'stream'),+ throwsA(isA<ValidationException>()),+ reason: 'collectionName=$value',+ );+ expect(+ () =>+ cfg.project.scope(collectionName: 'collection', streamName: value),+ throwsA(isA<ValidationException>()),+ reason: 'streamName=$value',+ );+ }+ expect(+ () => facade(projectId: 'bad__project'),+ throwsA(isA<ValidationException>()),+ );+ expect(+ () => cfg.project.scope(+ collectionName: 'bad__collection',+ streamName: 'stream',+ ),+ throwsA(isA<ValidationException>()),+ );+ expect(+ cfg.project+ .scope(collectionName: 'a', streamName: repeated('s', 80))+ .streamName,+ hasLength(80),+ );+ expect(+ () =>+ cfg.project.scope(collectionName: 'a', streamName: repeated('s', 81)),+ throwsA(isA<ValidationException>()),+ );+ expect(+ facade(projectId: repeated('p', 80)).project.projectId,+ hasLength(80),+ );+ expect(+ () => facade(projectId: repeated('p', 81)),+ throwsA(isA<ValidationException>()),+ );+ expect(+ cfg.project+ .scope(collectionName: repeated('c', 70), streamName: 'stream')+ .collectionName,+ hasLength(70),+ reason: 'food_app + separator + 70 characters is exactly 80',+ );+ final short = facade(projectId: 'p');+ expect(+ short.project+ .scope(collectionName: repeated('c', 77), streamName: 'stream')+ .collectionName,+ hasLength(77),+ reason: 'encoded collection is exactly 80 characters',+ );+ expect(+ () => short.project.scope(+ collectionName: repeated('c', 78),+ streamName: 'stream',+ ),+ throwsA(isA<ValidationException>()),+ );+ expect(cfg.api.requests, isEmpty);+ expect(short.api.requests, isEmpty);+ });++ test('configure does not read credentials or perform network I/O', () async {+ stdout.writeln('[facade] checking configure lifecycle');+ final keys = CountingKeyProvider('key');+ final project = VModal.configure(+ projectId: ' demo_app ',+ apiKeyProvider: keys,+ baseUri: Uri.parse('https://gateway.test'),+ );+ expect(project.projectId, 'demo_app');+ expect(keys.reads, 0);+ await project.close();+ await project.close();+ });++ test('all scoped operations use one collection and stream mapping', () async {+ stdout.writeln('[facade] checking delegated request contracts');+ final cfg = facade();+ final scope = cfg.project.scope(+ collectionName: 'user_123',+ streamName: 'favorites',+ );+ final cancel = CancellationToken();+ for (var i = 0; i < 9; i++) {+ cfg.api.addJson(<String, Object?>{+ 'data': <Object?>[],+ 'total': 0,+ 'job_id': 'job-1',+ 'status': 'ok',+ });+ }++ await scope.uploadMetadata(+ metadataPart(),+ options: const ScopedMetadataOptions(+ mode: 'img_file',+ writeMode: 'replace',+ allowOverlap: true,+ ),+ cancellation: cancel,+ );+ await scope.search(+ 'birthday dinner',+ options: const ScopedSearchOptions(+ queryMetadata: <String, Object?>{'kind': 'meal'},+ imageQuery: 'image-ref',+ mode: 'vid_file',+ searchSources: <String>['asr'],+ searchCombineMode: 'intersection',+ startDate: '2026-01-01',+ endDate: '2026-02-01',+ offset: 4,+ limit: 9,+ textEmbScoreMin: 0.7,+ imageEmbScoreMin: 1.2,+ versionLancedb: 3,+ ),+ cancellation: cancel,+ );+ await scope.addAssets(+ 'collection-id',+ <String>['asset-1'],+ options: const ScopedAddAssetsOptions(mode: 'vid_file'),+ cancellation: cancel,+ );+ await scope.updateAsset(+ 'video.mp4',+ changes: const ScopedAssetChanges(+ description: 'updated',+ tags: <String>['favorite'],+ ),+ cancellation: cancel,+ );+ await scope.createIndex(+ options: const ScopedCreateIndexOptions(+ indexType: 'vector',+ modality: 'vid_raw',+ insertMode: 'replace',+ createIndex: false,+ version: 'v3',+ startDate: '2026-01-01',+ endDate: '2026-02-01',+ embeddingModel: 'model-a',+ reProcess: true,+ dryRun: true,+ ),+ cancellation: cancel,+ );+ await scope.listIndexJobs(+ options: const ScopedIndexJobsOptions(+ status: 'queued',+ mode: 'vid_file',+ limit: 10,+ ),+ cancellation: cancel,+ );+ await scope.indexStatus('job-1', cancellation: cancel);+ await scope.deleteIndex(+ 'v3',+ options: const ScopedDeleteIndexOptions(+ modality: 'vid_raw',+ dryRun: true,+ confirm: false,+ ),+ cancellation: cancel,+ );+ await scope.deleteCollection(+ options: const ScopedDeleteCollectionOptions(+ scope: 'all',+ dryRun: true,+ confirm: false,+ ),+ cancellation: cancel,+ );++ expect(cfg.api.requests, hasLength(9));+ for (final request in cfg.api.requests) {+ expect(request.cancellation, same(cancel));+ }+ final values = cfg.api.requests.map(requestValues).toList();+ for (final index in <int>[0, 1, 2, 3, 4, 5, 7, 8]) {+ expect(+ values[index]['group_name'],+ 'food_app__user_123',+ reason: 'request $index',+ );+ }+ for (final index in <int>[0, 1, 2, 3, 4]) {+ expect(+ values[index]['stream_name'],+ 'favorites',+ reason: 'request $index',+ );+ }+ expect(values[0]['write_mode'], 'replace');+ expect(values[0]['allow_overlap'], 'true');+ expect(values[1]['query_metadata'], <String, Object?>{'kind': 'meal'});+ expect(values[1]['image_query'], 'image-ref');+ expect(values[1]['search_sources'], <String>['asr']);+ expect(values[1]['search_combine_mode'], 'intersection');+ expect(values[1]['offset'], 4);+ expect(values[1]['limit'], 9);+ expect(values[4]['version'], 'v3');+ expect(values[4]['re_process'], isTrue);+ expect(values[5]['limit'], '10');+ expect(cfg.api.requests[6].uri.path, endsWith('/job-1'));+ expect(values[6], isNot(contains('group_name')));+ expect(values[7]['dry_run'], isTrue);+ expect(values[7]['confirm'], isFalse);+ expect(values[8]['scope'], 'all');+ expect(values[8]['dry_run'], isTrue);+ });++ test(+ 'scoped upload preserves task, progress, cancellation, and mapping',+ () async {+ stdout.writeln('[facade] checking signed upload behavior');+ final cfg = facade();+ cfg.api+ ..addJson(<String, Object?>{+ 'url': 'https://objects.test/video',+ 'method': 'PUT',+ 'key': 'uploads/video',+ })+ ..addJson(<String, Object?>{'dest_path': 'done/video.mp4'});+ final scope = cfg.project.scope(+ collectionName: 'user_123',+ streamName: 'favorites',+ );+ final task = scope.upload(+ source(),+ options: const ScopedUploadOptions(+ mode: 'vid_file',+ modality: 'vid_raw',+ ttl: 42,+ ),+ );+ final progress = <int>[];+ final sub = task.progress.listen(+ (UploadProgress value) => progress.add(value.uploadedBytes),+ );+ final result = await task.result;+ await sub.cancel();++ expect(task, isA<UploadTask<VideoUploadResponse>>());+ expect(task.state, UploadTaskState.succeeded);+ expect(result.destPath, 'done/video.mp4');+ expect(progress, <int>[2]);+ expect(cfg.signed.calls, hasLength(1));+ expect(cfg.api.requests, hasLength(2));+ for (final request in cfg.api.requests) {+ final values = requestValues(request);+ expect(values['group_name'], 'food_app__user_123');+ expect(values['stream_name'], 'favorites');+ }+ expect(requestValues(cfg.api.requests.first)['ttl'], '42');+ },+ );++ test(+ 'collection listing decodes exact project names in stable order',+ () async {+ stdout.writeln('[facade] checking collection listing decode');+ final cfg = facade();+ final cancel = CancellationToken();+ cfg.api.addJson(<String, Object?>{+ 'data': <Object?>[+ group('food_app__global'),+ group('food__global'),+ group('food_app__user_123'),+ group('food_apps__global'),+ group('food_app__global'),+ ],+ 'total': 5,+ });+ expect(+ await cfg.project.listCollections(+ mode: 'vid_file',+ cancellation: cancel,+ ),+ <String>['global', 'user_123'],+ );+ expect(cfg.api.requests.single.cancellation, same(cancel));+ expect(cfg.api.requests.single.uri.queryParameters['mode'], 'vid_file');++ cfg.api.addJson(<String, Object?>{+ 'data': <Object?>[group('food_app__bad-name')],+ 'total': 1,+ });+ await expectLater(+ cfg.project.listCollections(),+ throwsA(isA<MalformedResponse>()),+ );+ },+ );++ test('overlapping scopes retain immutable request organization', () async {+ stdout.writeln('[facade] checking concurrent scope isolation');+ final waits = <String, Completer<VmodalResponse>>{+ 'first': Completer<VmodalResponse>(),+ 'second': Completer<VmodalResponse>(),+ };+ final api = HandlerTransport((VmodalRequest request) {+ final query = requestValues(request)['query_text']! as String;+ return waits[query]!.future;+ });+ final client = VmodalClient(+ config: SdkConfig(baseUrl: 'https://gateway.test', token: 'key'),+ transport: api,+ signedUploadTransport: FakeSignedUploadTransport(),+ );+ final project = VModal.fromClient(projectId: 'app', client: client);+ final first = project.scope(collectionName: 'user_1', streamName: 'camera');+ final second = project.scope(+ collectionName: 'user_2',+ streamName: 'favorites',+ );+ final firstResult = first.search('first');+ final secondResult = second.search('second');+ expect(api.requests, hasLength(2));+ expect(requestValues(api.requests[0])['group_name'], 'app__user_1');+ expect(requestValues(api.requests[0])['stream_name'], 'camera');+ expect(requestValues(api.requests[1])['group_name'], 'app__user_2');+ expect(requestValues(api.requests[1])['stream_name'], 'favorites');++ waits['second']!.complete(+ jsonResponse('{"data":[],"cnt_actual":2,"cnt_total":2}'),+ );+ waits['first']!.complete(+ jsonResponse('{"data":[],"cnt_actual":1,"cnt_total":1}'),+ );+ expect((await secondResult).cntActual, 2);+ expect((await firstResult).cntActual, 1);+ });++ test('invalid operation input fails before transport', () async {+ stdout.writeln('[facade] checking delegated local validation');+ final cfg = facade();+ final scope = cfg.project.scope(+ collectionName: 'global',+ streamName: 'uploads',+ );+ await expectLater(scope.search(' '), throwsA(isA<ValidationException>()));+ await expectLater(+ scope.addAssets('', const <String>[]),+ throwsA(isA<ValidationException>()),+ );+ expect(+ () => scope.updateAsset(' ', changes: const ScopedAssetChanges()),+ throwsA(isA<ValidationException>()),+ );+ await expectLater(+ scope.createIndex(options: const ScopedCreateIndexOptions(mode: '')),+ throwsA(isA<ValidationException>()),+ );+ await expectLater(+ scope.listIndexJobs(options: const ScopedIndexJobsOptions(limit: 0)),+ throwsA(isA<ValidationException>()),+ );+ await expectLater(+ scope.indexStatus(' '),+ throwsA(isA<ValidationException>()),+ );+ await expectLater(+ scope.deleteIndex(' '),+ throwsA(isA<ValidationException>()),+ );+ await expectLater(+ scope.deleteCollection(+ options: const ScopedDeleteCollectionOptions(mode: ''),+ ),+ throwsA(isA<ValidationException>()),+ );+ expect(cfg.api.requests, isEmpty);+ });++ test(+ 'project owns client lifecycle and low-level API stays compatible',+ () async {+ stdout.writeln('[facade] checking ownership and compatibility');+ final cfg = facade();+ await cfg.project.close();+ await cfg.project.close();+ expect(cfg.api.closeCalls, 1);+ expect(cfg.signed.closeCalls, 1);++ final api = FakeTransport()+ ..addJson(<String, Object?>{+ 'data': <Object?>[],+ 'cnt_actual': 0,+ 'cnt_total': 0,+ });+ final client = VmodalClient(+ config: SdkConfig(baseUrl: 'https://gateway.test', token: 'key'),+ transport: api,+ signedUploadTransport: FakeSignedUploadTransport(),+ );+ await client.searches.searchVideo(+ const SearchRequest(+ queryText: 'compatible',+ groupName: 'raw_backend_name',+ streamName: 'raw_stream',+ ),+ );+ expect(+ requestValues(api.requests.single)['group_name'],+ 'raw_backend_name',+ );+ },+ );+}diff --git a/test/regression_manifest_test.dart b/test/regression_manifest_test.dartindex cb39378..22584d9 100644--- a/test/regression_manifest_test.dart+++ b/test/regression_manifest_test.dart@@ -47,13 +47,19 @@ void main() {'dartdoc_options.yaml','lib/vmodal_sdk_flutter.dart','lib/src/client.dart',+ 'lib/src/content_scope.dart','lib/src/transport.dart','lib/src/upload.dart','lib/src/adaptive_upload.dart',+ 'lib/src/vmodal.dart','lib/src/routes.g.dart','tool/check_route_sync.dart','tool/release_manifest.dart',- 'example/lib/main.dart',+ 'example/01_full_app/lib/main.dart',+ 'example/02_users/README.md',+ 'example/02_users/lib/user_examples.dart',+ 'example/02_users/test/user_examples_test.dart',+ 'test/new_api_surface_test.dart',];for (final path in files) {expect(File(path).existsSync(), isTrue, reason: path);@@ -140,15 +146,22 @@ void main() {expect(result.exitCode, 0, reason: '${result.stderr}');expect(File('${dir.path}/pubspec.lock').existsSync(), isTrue);expect(File('${dir.path}/dartdoc_options.yaml').existsSync(), isTrue);+ expect(File('${dir.path}/.gitleaks.toml').existsSync(), isTrue);for (final path in <String>['install.sh','build.sh','run.sh','test.sh','tool/live_test.dart',- 'example/README.md',- 'example/lib/main.dart',- 'example/asset/video_10frames.mp4',+ 'example/01_full_app/README.md',+ 'example/01_full_app/lib/main.dart',+ 'example/01_full_app/asset/video_10frames.mp4',+ 'example/02_users/README.md',+ 'example/02_users/lib/global_search_index.dart',+ 'example/02_users/lib/private_user_index.dart',+ 'example/02_users/lib/user_streams.dart',+ 'example/02_users/lib/product_catalog.dart',+ 'example/02_users/test/user_examples_test.dart','doc/search_app.md','doc/sdk_doc.md','doc/manage_api_key.md',@@ -157,7 +170,7 @@ void main() {expect(File('${dir.path}/$path').existsSync(), isTrue, reason: path);}final exampleReadme = File(- '${dir.path}/example/README.md',+ '${dir.path}/example/01_full_app/README.md',).readAsStringSync();final searchGuide = File('${dir.path}/doc/search_app.md',@@ -167,17 +180,19 @@ void main() {expect(searchGuide, contains('input_index'));expect(searchGuide, contains('NetworkImage'));for (final path in <String>[- 'example/android/local.properties',- 'example/android/gradle/wrapper/gradle-wrapper.jar',- 'example/android/gradlew',- 'example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java',- 'example/.idea',- 'example/vmodal_example.iml',- 'example/ios/Flutter/Generated.xcconfig',- 'example/ios/Flutter/flutter_export_environment.sh',- 'example/ios/Flutter/ephemeral',- 'example/ios/Runner/GeneratedPluginRegistrant.h',- 'example/ios/Runner/GeneratedPluginRegistrant.m',+ 'example/01_full_app/android/local.properties',+ 'example/01_full_app/android/gradle/wrapper/gradle-wrapper.jar',+ 'example/01_full_app/android/gradlew',+ 'example/01_full_app/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java',+ 'example/01_full_app/.idea',+ 'example/01_full_app/vmodal_example.iml',+ 'example/01_full_app/ios/Flutter/Generated.xcconfig',+ 'example/01_full_app/ios/Flutter/flutter_export_environment.sh',+ 'example/01_full_app/ios/Flutter/ephemeral',+ 'example/01_full_app/ios/Runner/GeneratedPluginRegistrant.h',+ 'example/01_full_app/ios/Runner/GeneratedPluginRegistrant.m',+ 'example/02_users/.dart_tool',+ 'example/02_users/build','doc/todo/sdk_doc.md','docs_sdk','docs.py',diff --git a/test/shell_scripts_test.dart b/test/shell_scripts_test.dartindex 257f5d0..120ae07 100644--- a/test/shell_scripts_test.dart+++ b/test/shell_scripts_test.dart@@ -63,7 +63,8 @@ void main() {final build = File('build.sh').readAsStringSync();expect(build, contains('name: vmodal_sdk_flutter'));- expect(build, contains('example/pubspec.yaml'));+ expect(build, contains('example/01_full_app/pubspec.yaml'));+ expect(build, contains('example/02_users/pubspec.yaml'));expect(build, isNot(contains('*/uinterface/sdk_flutter')));},);diff --git a/test/workflow_layout_test.dart b/test/workflow_layout_test.dartindex 123279f..8450d9f 100644--- a/test/workflow_layout_test.dart+++ b/test/workflow_layout_test.dart@@ -13,12 +13,14 @@ final publicFile = File('release/public_publish.yml').existsSync(): File('.github/workflows/publish.yml');final public = publicFile.readAsStringSync();final androidProperties = File(- 'example/android/gradle.properties',+ 'example/01_full_app/android/gradle.properties',).readAsStringSync();final androidSettings = File(- 'example/android/settings.gradle.kts',+ 'example/01_full_app/android/settings.gradle.kts',+).readAsStringSync();+final examplePubspec = File(+ 'example/01_full_app/pubspec.yaml',).readAsStringSync();-final examplePubspec = File('example/pubspec.yaml').readAsStringSync();void checkWorkflow(String main, String tagged) {const releaseOnly =@@ -27,6 +29,8 @@ void checkWorkflow(String main, String tagged) {"if: \${{ github.event_name == 'workflow_dispatch' && (inputs.publish_sdk_flutter || inputs.publish_pub_dev || inputs.publish_sdk_docs_only) }}";const buildDocs ="if: \${{ always() && github.event_name == 'workflow_dispatch' && (inputs.publish_sdk_flutter || inputs.publish_pub_dev || inputs.publish_sdk_docs_only) && needs.secret_detection.result == 'success' && (inputs.publish_sdk_docs_only || needs.publish_sdk_flutter.result == 'success') }}";+ const publishBuiltDocs =+ "if: \${{ always() && github.event_name == 'workflow_dispatch' && (inputs.publish_sdk_flutter || inputs.publish_pub_dev || inputs.publish_sdk_docs_only) && needs.sdk_docs_artifact.result == 'success' }}";expect(main, contains('name: sdk_flutter_test_release'));expect(main, contains('publish_sdk_flutter:'));expect(main, contains('publish_pub_dev:'));@@ -93,6 +97,18 @@ void checkWorkflow(String main, String tagged) {main,contains('git ls-files --error-unmatch install.sh build.sh run.sh test.sh'),);+ expect(+ main,+ contains(+ 'sha256sum example/01_full_app/build/app/outputs/flutter-apk/app-debug.apk',+ ),+ );+ expect(+ main,+ contains("find example/01_full_app/build/ios -name '*.app'"),+ );+ expect(main, isNot(contains('sha256sum example/build/')));+ expect(main, isNot(contains('find example/build/ios')));expect(main, contains('RELEASE_TOKEN: \${{ secrets.GH_TOKEN }}'));expect(main, isNot(contains('FLUTTER_SDK_APP_')));expect(main, contains('git push --atomic'));@@ -111,7 +127,7 @@ void checkWorkflow(String main, String tagged) {expect(main,contains(- 'publish_sdk_docs:\n needs: sdk_docs_artifact\n $publishDocs',+ 'publish_sdk_docs:\n needs: sdk_docs_artifact\n $publishBuiltDocs',),);expect(main, contains('python "\$WORKDIR/docs.py" generate'));@@ -132,6 +148,18 @@ void checkWorkflow(String main, String tagged) {main,contains('"\$WORKDIR/docs_sdk/vmodal_sdk_flutter/VmodalClient-class.html"'),);+ for (final name in <String>['VModal', 'VModalProject', 'VModalScope']) {+ expect(+ main,+ contains('"\$WORKDIR/docs_sdk/vmodal_sdk_flutter/$name-class.html"'),+ );+ expect(+ main,+ contains(+ '"\$RUNNER_TEMP/sdk-docs-site/vmodal_sdk_flutter/$name-class.html"',+ ),+ );+ }expect(main, isNot(contains('PyYAML')));expect(main, isNot(contains('openapi-spec-validator')));expect(main.toLowerCase(), isNot(contains('swagger')));diff --git a/tool/release_manifest.dart b/tool/release_manifest.dartindex 7fc7cf5..450c47f 100644--- a/tool/release_manifest.dart+++ b/tool/release_manifest.dart@@ -88,6 +88,7 @@ Future<void> _export(Directory root, Directory destination) async {'readme_assets','CHANGELOG.md','.flutter-version',+ '.gitleaks.toml','.pubignore','lib','test',