neoagent 2.3.1-beta.89 → 2.3.1-beta.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -7
- package/flutter_app/lib/features/location/location_service.dart +2 -4
- package/flutter_app/lib/main.dart +1 -0
- package/flutter_app/lib/main_app_shell.dart +11 -11
- package/flutter_app/lib/main_chat.dart +46 -42
- package/flutter_app/lib/main_controller.dart +1 -1
- package/flutter_app/lib/main_devices.dart +10 -1
- package/flutter_app/lib/main_integrations.dart +3 -3
- package/flutter_app/lib/main_spacing.dart +18 -0
- package/flutter_app/lib/main_theme.dart +9 -0
- package/flutter_app/lib/main_unified.dart +3 -3
- package/lib/manager.js +33 -0
- package/package.json +1 -1
- package/server/db/database.js +74 -16
- package/server/guest_agent.js +1 -0
- package/server/public/.last_build_id +1 -1
- package/server/public/flutter_bootstrap.js +1 -1
- package/server/public/main.dart.js +11977 -11964
- package/server/services/android/android_bootstrap_worker.js +18 -3
- package/server/services/android/controller.js +426 -324
- package/server/services/runtime/backends/local-vm.js +31 -9
|
@@ -9,6 +9,10 @@ const APK_UPLOAD_ROOT = path.resolve(
|
|
|
9
9
|
const MAX_APK_BYTES = Number(process.env.NEOAGENT_ANDROID_APK_MAX_BYTES || 512 * 1024 * 1024);
|
|
10
10
|
const IDLE_TIMEOUT_MS = Number(process.env.NEOAGENT_VM_IDLE_TIMEOUT_MS || 10 * 60 * 1000);
|
|
11
11
|
|
|
12
|
+
function sleep(ms) {
|
|
13
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
14
|
+
}
|
|
15
|
+
|
|
12
16
|
function assertPathInside(baseDir, candidatePath, label) {
|
|
13
17
|
const resolvedBase = path.resolve(baseDir);
|
|
14
18
|
const resolvedCandidate = path.resolve(candidatePath);
|
|
@@ -181,19 +185,37 @@ class VmBrowserProvider {
|
|
|
181
185
|
}
|
|
182
186
|
|
|
183
187
|
let file = null;
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
188
|
+
const maxAttempts = 20;
|
|
189
|
+
for (let attempt = 0; attempt < maxAttempts && !file?.content; attempt += 1) {
|
|
190
|
+
for (const candidate of readablePathCandidates) {
|
|
191
|
+
try {
|
|
192
|
+
file = await this.client.request('POST', '/files/read', {
|
|
193
|
+
path: candidate,
|
|
194
|
+
encoding: 'base64',
|
|
195
|
+
});
|
|
196
|
+
if (file?.content) {
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
} catch (error) {
|
|
200
|
+
if (attempt === maxAttempts - 1) {
|
|
201
|
+
console.warn('[Runtime:browser_vm] screenshot materialization read failed', {
|
|
202
|
+
userId: this.userId,
|
|
203
|
+
candidate,
|
|
204
|
+
error: String(error?.message || error),
|
|
205
|
+
});
|
|
206
|
+
}
|
|
192
207
|
}
|
|
193
|
-
}
|
|
208
|
+
}
|
|
209
|
+
if (!file?.content) {
|
|
210
|
+
await sleep(250);
|
|
211
|
+
}
|
|
194
212
|
}
|
|
195
213
|
if (!file?.content) {
|
|
196
214
|
if (typeof result.screenshotPath === 'string' && result.screenshotPath.startsWith('/screenshots/')) {
|
|
215
|
+
console.warn('[Runtime:browser_vm] unresolved VM screenshot path suppressed', {
|
|
216
|
+
userId: this.userId,
|
|
217
|
+
screenshotPath: result.screenshotPath,
|
|
218
|
+
});
|
|
197
219
|
return {
|
|
198
220
|
...result,
|
|
199
221
|
screenshotPath: null,
|