Skip to content

V- Modal AI: Visual Video / Image Search - Flutter Video SDK

Release Flutter SDK from f836cc003c6e8bbf52367cd8fb1ef82e09f1f193

vmodal-release-appb14b2b5d203d
diff --git a/README.md b/README.md
index b9225f8..f69cb89 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@
<p align="center"><em>Turn every video library into an experience your users can explore.</em></p>
-## Build the feature to remember things
+## Build the feature people remember
VModal 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.
diff --git a/RELEASE_METADATA b/RELEASE_METADATA
index 3b35c0f..133bb47 100644
--- a/RELEASE_METADATA
+++ b/RELEASE_METADATA
@@ -1 +1 @@
-Source-vmx-api: 42f5d246c812f9ad7b24585f15d252141808a153
+Source-vmx-api: f836cc003c6e8bbf52367cd8fb1ef82e09f1f193
diff --git a/SOURCE_MANIFEST.sha256 b/SOURCE_MANIFEST.sha256
index 5784715..230cce9 100644
--- a/SOURCE_MANIFEST.sha256
+++ b/SOURCE_MANIFEST.sha256
@@ -5,15 +5,15 @@ a98f72526420d47e76b9b4e67ac86acd06b7088ad1f4c35617b11b09e59346ea ./.gitleaks.to
0e35aa931a7e39b40c6bac4c0a4ee4ddc6e0de1e26d8f0a47d4f7e72326f3574 ./CHANGELOG.md
37b7148216ac6090e36adfb699d642b8dd1e1b8ba99870e65e88733947a59fa6 ./LICENSE
b10b6747e23e7a3833882317c86c78cfa9b187faeb9914407d82fabc1c712bcf ./README.md
-e00500ad74a491d6ceb9d73de4f81ea9293d21e5c5d21e7737cfe72d8c4e6937 ./RELEASE_METADATA
+e21bc90a60861b62b32f7b74d9c4bfda8d6fdf40cdaffe15c4a51025d6ba41a4 ./RELEASE_METADATA
def7e4f643adff5b01b877b6a7fa5b2381612b693c0bf06bd232ee0f7197d342 ./analysis_options.yaml
8c2d096dc399d9bea2fcc5ae19d987e7458c8503cf2a7edf1f1497ae00d681aa ./build.sh
4f18642680fb433554a5523d00bd99e0d650af340bcaebe628f59f63ac84e458 ./dartdoc_options.yaml
75461620cf3a062f4dad10e034952b82cca461b483788de1f46c539aca8b0f0f ./doc/manage_api_key.md
cae6114908952cf81a908b7fcc8c0ba4ce3f866e9dbaf974303273f334e0e3f6 ./doc/release.md
-9658204ef997b490bc8634b919fbbe01e53455aa65e3bfef4010d3be798c8e9d ./doc/sdk_contract.md
+20aed670d90634d385e08b8010f54a18ba24cc3ed90c04261a4abaaf62bc0d71 ./doc/sdk_contract.md
2c07c5319044416d722732f731cc709fc6f6f3e375861bb6b5326a8768258de5 ./doc/sdk_doc.md
-67e61ba8626a46ccf7de847a39f4900bdb2a2d36b0102b5ad703ca5a5ef05080 ./doc/search_app.md
+6139d92cf19577ec2d920daa5416d2982e425f63639f858201c91caf39b109bf ./doc/search_app.md
7b0acfc01cfa4c8bf3af8aeb19741e65b8e9406935d9ab8e0f4cb84547483e55 ./doc/transcode_360.md
e246ed229511a24a1ee7e98529c203ef90d1d352290ce8486caebe05683db3a0 ./env.sh
c5ce516b547327aab5b6fa27a523d4c76e66294ada3248b293c54b9595cd3a87 ./example/01_full_app/.metadata
@@ -100,15 +100,15 @@ d796fc674bb0b8c784fac0f0470b6ff816c98d9ace4b90f593912e5479e45d4e ./lib/src/clie
58e4e7162a6c46d2981935649a3f1d40c969dc1fc3a81cab34f518673a479e6a ./lib/src/config.dart
d3e03d9a72a499659c70f2296115d1d3138b9370a017e027d8255f85f7fb1c5c ./lib/src/content_scope.dart
873d969cfed5c725d34df0fd0c8769462b56992cf523710fcf741a81fa1bbcad ./lib/src/errors.dart
-2ad9b4183bce96eacd91c5514de9231b1f0a4f269392726e174507cfa507981a ./lib/src/http.dart
+8fcee5e6ae16462935bdd3b520b7ed5f15724074f9b244ed8271511e57d21af6 ./lib/src/http.dart
7670598bf28a23808d0e0bd3e3ea1ec7270fbc450caef2ecc1c0ab0921d17538 ./lib/src/models.dart
ed22b7665e09c9f2f4158c225affe6527b7d3eb921db0ccdf06c01c8cf31db96 ./lib/src/resources.dart
43770c621bffccf69eacebd1e3b297503ca288093c848f0e8ccbd118d7f0d88a ./lib/src/routes.dart
27056230065682f3ea3aa747c39c08950dcdca87387f4733adfad18f4b345b06 ./lib/src/routes.g.dart
42331852249c8f99874a5e3889c752fd344ad8a5301ede246d5a4fbccb4191f2 ./lib/src/transcode.dart
f0e69d1016f82fbad2a96434129a54a0129f095a0e138cce555db37c8120023f ./lib/src/transport.dart
-b32d388d73edf7d824cc4391b6af55c21a20bcb1e721d66afca1a69b559287f4 ./lib/src/upload.dart
-732e7f2f942e1c427e19ee3bdb766053f625f69e87dcf770d969555dbc7a9881 ./lib/src/utils.dart
+9b42b147074ac0d54e23ffd148877750f04eb050a9061827459bd5e676522bed ./lib/src/upload.dart
+785e261474d92bc6aa5da8a4dcc9429577b590dbeda2098da2c581d862e3f6a8 ./lib/src/utils.dart
b226ddcc0b8cb58b4753545752c2df1c6301bdf76842730e7f6ecf2d06d29892 ./lib/src/vmodal.dart
5cc38f87cde8643b914a6f54f2e691d4c12a36533be9177ae6174905055230f7 ./lib/vmodal_sdk_flutter.dart
72fff91181fd3e25fd9afd766930a67025205b61096fd35c55cbdd9a3178ecf0 ./pubspec.lock
@@ -123,7 +123,7 @@ be59599b9ba77d031e9b4bad7f8d5c59efd2687888c5b73be4fbea115902106b ./test/adaptiv
29dbaadfb34d6c39048edc7e2caccd16ecfbdfaddfc29519326d719de4741936 ./test/client_test.dart
ba941377f1ee717091dd30522609d028f32cd60df575564c75ab0228c2543d35 ./test/config_routes_test.dart
4b9358bc8c8eb76b84dffc1c85d699169d890b4878af967f490bcddfcd6bd869 ./test/docs_reference_test.dart
-1e0c931471bbee5832c7186ffc67b526da4c1c3d6385b8dfebb8cf0b49b2a99e ./test/errors_leak_test.dart
+b45470d8e7674bcb87828a8dcf231ac29afb4418774972c66e60cea9788270db ./test/errors_leak_test.dart
a998f548e5e7bf975222cabd530302e47e45bd7cdc21697fbd333ae7d98965c2 ./test/fakes.dart
0a1394c90829b91541aa01e9786e3195aae04fc49a7b92775dbf404bf2802107 ./test/fakes_test.dart
14368b598ece0ce9b2e249148a10a92f2c80e38427c077013a1515826f4365bd ./test/fixtures/routes_contract.json
diff --git a/doc/sdk_contract.md b/doc/sdk_contract.md
index 1cc0da4..03140f3 100644
--- a/doc/sdk_contract.md
+++ b/doc/sdk_contract.md
@@ -24,6 +24,10 @@ behavior. `test/fixtures/routes_contract.json` is the reviewed normalized mirror
Every operation uses the centralized `Routes`, `VmodalHttp`, bounded response
reader, retry classifier, and cancellation token. Gateway payload serializers
remove caller identity; only unsafe direct mode may emit trusted identity fields.
+Application-visible error bodies and details retain their structured shape, but
+the SDK replaces Unix, Windows, UNC, and `file:` filesystem paths with `****`
+before constructing a server-response exception. Exception strings continue to
+omit response bodies entirely.
The facade's single organization mapping is:
diff --git a/doc/search_app.md b/doc/search_app.md
index b1f8d19..c6103b2 100644
--- a/doc/search_app.md
+++ b/doc/search_app.md
@@ -89,3 +89,6 @@ Render only safe `SdkException.toString()` output. It contains classification
and status metadata, never response bodies, URLs, keys, or identities. Cancel
an upload task when the user explicitly cancels it; do not close the shared
application client merely because a page was disposed.
+If application logic inspects a structured error body, server filesystem paths
+are replaced with `****` before the exception reaches the application. Do not
+render the remaining raw server detail as user-facing copy.
diff --git a/lib/src/http.dart b/lib/src/http.dart
index 1f9c3ad..8f2e45c 100644
--- a/lib/src/http.dart
+++ b/lib/src/http.dart
@@ -212,12 +212,12 @@ class VmodalHttp {
text.trimLeft().startsWith('{') ||
text.trimLeft().startsWith('[')) {
try {
- body = jsonDecode(text);
+ body = objRedactServerDetails(jsonDecode(text));
} on Object {
body = null;
}
} else {
- body = text;
+ body = strRedactServerPaths(text);
}
}
if (response.statusCode == 401) {
diff --git a/lib/src/upload.dart b/lib/src/upload.dart
index a33d529..efa4e8f 100644
--- a/lib/src/upload.dart
+++ b/lib/src/upload.dart
@@ -313,7 +313,7 @@ class IoSignedUploadTransport implements SignedUploadTransport {
throw ApiException(
'signed upload failed',
statusCode: response.statusCode,
- body: utf8.decode(bytes, allowMalformed: true),
+ body: strRedactServerPaths(utf8.decode(bytes, allowMalformed: true)),
);
}
await response.drain<void>();
diff --git a/lib/src/utils.dart b/lib/src/utils.dart
index 74f2935..1988062 100644
--- a/lib/src/utils.dart
+++ b/lib/src/utils.dart
@@ -7,6 +7,40 @@ const int errorResponseLimitBytes = 1024 * 1024;
const int binaryResponseLimitBytes = 64 * 1024 * 1024;
const int checkpointJsonLimitBytes = 1024 * 1024;
+final List<RegExp> _serverPathPatterns = <RegExp>[
+ RegExp(r'file:(?:/{2,3}|\\{2})[^\r\n"<>|,;)}\]]+', caseSensitive: false),
+ RegExp(r'(^|[\s"(\[{:=>])([A-Za-z]:[\\/][^\r\n"<>|,;)}\]]+)'),
+ RegExp(r'(^|[\s"(\[{:=>])(\\{2}[^\r\n"<>|,;)}\]]+)'),
+ RegExp(r'(^|[\s"(\[{:=>])(/(?!/)[^\r\n"<>|,;)}\]]+)'),
+];
+
+String strRedactServerPaths(String value) {
+ var out = value;
+ for (final pattern in _serverPathPatterns) {
+ out = out.replaceAllMapped(
+ pattern,
+ (Match match) =>
+ '${match.groupCount > 1 ? match.group(1) ?? '' : ''}****',
+ );
+ }
+ return out;
+}
+
+Object? objRedactServerDetails(Object? value) {
+ if (value is String) return strRedactServerPaths(value);
+ if (value is List) {
+ return List<Object?>.unmodifiable(value.map(objRedactServerDetails));
+ }
+ if (value is Map) {
+ final out = <String, Object?>{};
+ value.forEach((Object? key, Object? item) {
+ out[strRedactServerPaths('$key')] = objRedactServerDetails(item);
+ });
+ return Map<String, Object?>.unmodifiable(out);
+ }
+ return value;
+}
+
String strRequired(String value, String fieldName) {
final clean = value.trim();
if (clean.isEmpty) {
diff --git a/test/errors_leak_test.dart b/test/errors_leak_test.dart
index 4618c3b..c8d1c43 100644
--- a/test/errors_leak_test.dart
+++ b/test/errors_leak_test.dart
@@ -1,8 +1,13 @@
+import 'dart:io';
+
import 'package:flutter_test/flutter_test.dart';
import 'package:vmodal_sdk_flutter/vmodal_sdk_flutter.dart';
+import 'fakes.dart';
+
void main() {
test('exception strings do not expose decoded endpoint values', () {
+ stdout.writeln('[errors] checking safe exception strings');
final route = Routes.full(Routes.searchClient);
final errors = <SdkException>[
const ValidationException('invalid request'),
@@ -28,4 +33,79 @@ void main() {
);
}
});
+
+ test('server response details redact nested filesystem paths', () async {
+ stdout.writeln(
+ '[errors] checking application-visible server response details',
+ );
+ const unixPath = '/srv/private folder/lancedb/user/table';
+ const windowsPath = r'C:\private folder\lancedb\user\table';
+ const uncPath = r'\\server\private\lancedb\table';
+ const fileUri = 'file:///opt/private/lancedb/table';
+ final fake = FakeTransport()
+ ..addJson(<String, Object?>{
+ 'detail': 'Missing LanceDB table: $unixPath',
+ 'debug': <String, Object?>{
+ 'trace': 'failed at $windowsPath',
+ 'checkpoint': uncPath,
+ 'source': fileUri,
+ },
+ }, status: 422);
+ final client = VmodalClient(
+ config: SdkConfig(baseUrl: 'https://gateway.test', token: 'key'),
+ transport: fake,
+ signedUploadTransport: FakeSignedUploadTransport(),
+ );
+
+ await expectLater(
+ client.searches.searchVideo(const SearchRequest(queryText: 'one')),
+ throwsA(
+ isA<ValidationException>()
+ .having(
+ (ValidationException error) => '${error.body}',
+ 'body',
+ allOf(
+ contains('****'),
+ isNot(contains(unixPath)),
+ isNot(contains(windowsPath)),
+ isNot(contains(uncPath)),
+ isNot(contains(fileUri)),
+ ),
+ )
+ .having(
+ (ValidationException error) => '${error.details}',
+ 'details',
+ allOf(contains('****'), isNot(contains(unixPath))),
+ ),
+ ),
+ );
+ await client.close();
+
+ const textBody = 'backend trace at $unixPath';
+ final textFake = FakeTransport()
+ ..addResponse(
+ VmodalResponse(
+ statusCode: 500,
+ headers: const <String, String>{'content-type': 'text/plain'},
+ contentLength: textBody.length,
+ body: Stream<List<int>>.value(textBody.codeUnits),
+ ),
+ );
+ final textClient = VmodalClient(
+ config: SdkConfig(baseUrl: 'https://gateway.test', token: 'key'),
+ transport: textFake,
+ signedUploadTransport: FakeSignedUploadTransport(),
+ );
+ await expectLater(
+ textClient.searches.searchVideo(const SearchRequest(queryText: 'one')),
+ throwsA(
+ isA<ApiException>().having(
+ (ApiException error) => error.body,
+ 'plain-text body',
+ allOf(contains('****'), isNot(contains(unixPath))),
+ ),
+ ),
+ );
+ await textClient.close();
+ });
}