@ateam-ai-mobile/plugin-runtime 0.1.22 → 0.1.24
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/dist/{chunk-RNA6X65P.mjs → chunk-WT5TBKGA.mjs} +4 -4
- package/dist/chunk-WT5TBKGA.mjs.map +1 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/{loader-GGJ5YO25.mjs → loader-X7KHKZ6Y.mjs} +2 -2
- package/package.json +2 -2
- package/src/bundles/bundleManager.ts +11 -5
- package/src/sdk/aiLive.ts +2 -0
- package/dist/chunk-RNA6X65P.mjs.map +0 -1
- /package/dist/{loader-GGJ5YO25.mjs.map → loader-X7KHKZ6Y.mjs.map} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -100,7 +100,7 @@ import {
|
|
|
100
100
|
useNativeBridge,
|
|
101
101
|
usePluginTheme,
|
|
102
102
|
useSurfaceStore
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-WT5TBKGA.mjs";
|
|
104
104
|
|
|
105
105
|
// src/tools/platformTools.ts
|
|
106
106
|
var PLATFORM_PLUGIN_ID = "platform:device-tools";
|
|
@@ -143,10 +143,10 @@ var REAL_DEPS = {
|
|
|
143
143
|
// `./loader` reaches react-native via the bundle manager; import it only when
|
|
144
144
|
// an effect actually fires (real app), never at module load (tests).
|
|
145
145
|
resetLoader: () => {
|
|
146
|
-
void import("./loader-
|
|
146
|
+
void import("./loader-X7KHKZ6Y.mjs").then((m) => m.resetDeviceToolLoader());
|
|
147
147
|
},
|
|
148
148
|
load: () => {
|
|
149
|
-
void import("./loader-
|
|
149
|
+
void import("./loader-X7KHKZ6Y.mjs").then((m) => {
|
|
150
150
|
m.resetDeviceToolLoader();
|
|
151
151
|
return m.ensureDeviceToolsLoaded({ force: true });
|
|
152
152
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureDeviceToolsLoaded,
|
|
3
3
|
resetDeviceToolLoader
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WT5TBKGA.mjs";
|
|
5
5
|
export {
|
|
6
6
|
ensureDeviceToolsLoaded,
|
|
7
7
|
resetDeviceToolLoader
|
|
8
8
|
};
|
|
9
|
-
//# sourceMappingURL=loader-
|
|
9
|
+
//# sourceMappingURL=loader-X7KHKZ6Y.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ateam-ai-mobile/plugin-runtime",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.24",
|
|
4
4
|
"description": "ADAS plugin runtime for React Native hosts — plugin SDK, bundle pipeline with integrity verification, host bridge, surfaces. No Expo dependencies.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"build": "tsup"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@ateam-ai-mobile/core": "0.1.
|
|
12
|
+
"@ateam-ai-mobile/core": "0.1.24",
|
|
13
13
|
"zustand": "^5.0.0"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
@@ -782,17 +782,23 @@ class BundleManager {
|
|
|
782
782
|
assertBundleIntegrity(content, verifiedHash, bundleUrl);
|
|
783
783
|
|
|
784
784
|
// Strip __toESM wrapping — our shim already provides correct ESM objects.
|
|
785
|
-
// esbuild's __toESM + isNodeMode=1 double-wraps and breaks React 19 hooks
|
|
785
|
+
// esbuild's __toESM + isNodeMode=1 double-wraps and breaks React 19 hooks:
|
|
786
|
+
// its getters close over a `let` loop variable, which Hermes compiles as one
|
|
787
|
+
// shared binding, so EVERY export reads the module's last key. For react that
|
|
788
|
+
// is `version`, and the plugin crashes with "'19.1.0' is not a function".
|
|
789
|
+
// esbuild's cjs format emits `require(...)`; its iife/esm formats emit
|
|
790
|
+
// `__require(...)` — both are the same call into this shim, so both unwrap.
|
|
786
791
|
let cleaned = content.replace(
|
|
787
|
-
/__toESM\(require\(("[^"]+")\)(?:,\s*\d+)?\)/g,
|
|
792
|
+
/__toESM\((?:__)?require\(("[^"]+")\)(?:,\s*\d+)?\)/g,
|
|
788
793
|
'require($1)',
|
|
789
794
|
);
|
|
790
795
|
|
|
791
796
|
// Strip __toCommonJS wrapper — it creates a getter-based Proxy that
|
|
792
|
-
// collapses all named exports to the same object in Hermes/JSC.
|
|
797
|
+
// collapses all named exports to the same object in Hermes/JSC. cjs assigns
|
|
798
|
+
// it to module.exports; iife returns it from the wrapper.
|
|
793
799
|
cleaned = cleaned.replace(
|
|
794
|
-
/module\.exports\s
|
|
795
|
-
'
|
|
800
|
+
/(module\.exports\s*=|return)\s*__toCommonJS\((\w+)\)/g,
|
|
801
|
+
'$1 $2',
|
|
796
802
|
);
|
|
797
803
|
|
|
798
804
|
const mod: { exports: any } = { exports: {} };
|
package/src/sdk/aiLive.ts
CHANGED
|
@@ -63,6 +63,8 @@ export interface AiLiveSnapshot {
|
|
|
63
63
|
sent: number;
|
|
64
64
|
/** Picture slots that sent nothing (no fresh camera frame, or the connection was busy). */
|
|
65
65
|
skipped: number;
|
|
66
|
+
/** Pictures looked at on the phone and held back because nothing changed (the motion gate): not sent, not lost. */
|
|
67
|
+
heldBack?: number;
|
|
66
68
|
lastEpisode: AiLiveEpisode | null;
|
|
67
69
|
lastError: string | null;
|
|
68
70
|
}
|