@adapt-toolkit/sdk 0.10.11 → 0.10.13

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.
Files changed (39) hide show
  1. package/dist/mufl_files/87D314635BB034A83A212BAED4CB63F31CCFB8AC5F9DCCCA5C7B9DB647252C77.muflo +0 -0
  2. package/dist/utilities/broker/broker_client.d.ts +3 -1
  3. package/dist/utilities/broker/broker_client.d.ts.map +1 -1
  4. package/dist/utilities/broker/broker_client.js +26 -1
  5. package/dist/utilities/broker/broker_client.js.map +1 -1
  6. package/dist/utilities/storage/storage_client.d.ts +6 -1
  7. package/dist/utilities/storage/storage_client.d.ts.map +1 -1
  8. package/dist/utilities/storage/storage_client.js +34 -7
  9. package/dist/utilities/storage/storage_client.js.map +1 -1
  10. package/dist/utilities/wrappers/configurators/packet_wrapper_configurator.d.ts +1 -0
  11. package/dist/utilities/wrappers/configurators/packet_wrapper_configurator.d.ts.map +1 -1
  12. package/dist/utilities/wrappers/configurators/packet_wrapper_configurator.js +6 -0
  13. package/dist/utilities/wrappers/configurators/packet_wrapper_configurator.js.map +1 -1
  14. package/dist/utilities/wrappers/enclave/control_packet.d.ts.map +1 -1
  15. package/dist/utilities/wrappers/enclave/control_packet.js +28 -3
  16. package/dist/utilities/wrappers/enclave/control_packet.js.map +1 -1
  17. package/dist/utilities/wrappers/wrappers/adapt_packet_wrapper.d.ts +1 -0
  18. package/dist/utilities/wrappers/wrappers/adapt_packet_wrapper.d.ts.map +1 -1
  19. package/dist/utilities/wrappers/wrappers/adapt_packet_wrapper.js +9 -0
  20. package/dist/utilities/wrappers/wrappers/adapt_packet_wrapper.js.map +1 -1
  21. package/dist/utilities/wrappers/wrappers/adapt_wrapper.d.ts +3 -1
  22. package/dist/utilities/wrappers/wrappers/adapt_wrapper.d.ts.map +1 -1
  23. package/dist/utilities/wrappers/wrappers/adapt_wrapper.js +35 -5
  24. package/dist/utilities/wrappers/wrappers/adapt_wrapper.js.map +1 -1
  25. package/dist/utilities/wrappers/wrappers/impl/adapt_packet_wrapper_impl.d.ts +2 -0
  26. package/dist/utilities/wrappers/wrappers/impl/adapt_packet_wrapper_impl.d.ts.map +1 -1
  27. package/dist/utilities/wrappers/wrappers/impl/adapt_packet_wrapper_impl.js +143 -65
  28. package/dist/utilities/wrappers/wrappers/impl/adapt_packet_wrapper_impl.js.map +1 -1
  29. package/dist/wasm/backend-node.d.ts +1 -0
  30. package/dist/wasm/backend-node.d.ts.map +1 -1
  31. package/dist/wasm/backend-node.js +16 -1
  32. package/dist/wasm/backend-node.js.map +1 -1
  33. package/dist/wasm/index.d.ts +1 -0
  34. package/dist/wasm/index.d.ts.map +1 -1
  35. package/dist/wasm/index.js +7 -0
  36. package/dist/wasm/index.js.map +1 -1
  37. package/dist/wrapper/protocol/protocol.js +1 -1
  38. package/package.json +2 -2
  39. package/dist/mufl_files/EFC6E105ACCE7001CD92A4D467AD9F373E20D72088EEAE63F8DDA641837FF78A.muflo +0 -0
@@ -8,14 +8,29 @@
8
8
  // consumers see identical bindings either way; static types are sourced from
9
9
  // `./index.d.ts` via the package's `exports.types` field.
10
10
  let _backend;
11
+ // Authoritative signal of which backend this `./backend` gateway resolved. Set at the
12
+ // resolution point itself (the most authoritative place — no downstream state can confuse it),
13
+ // keyed on WHICH PACKAGE loaded: 'native' covers both the plain native and the nitro build
14
+ // (both ARE @adapt-toolkit/sdk-native), so there is no union/polarity nuance. The --node test
15
+ // leg reads this through this SAME ./backend gateway and asserts === 'native', so a silent
16
+ // WASM fallback under a native leg becomes a loud, correctly-labelled failure (F189).
17
+ export let BACKEND_KIND;
11
18
  try {
12
19
  // Cast the specifier to `string` so TS does not require the optional
13
20
  // `@adapt-toolkit/sdk-native` package to resolve at compile time.
14
21
  _backend = (await import(
15
22
  /* @vite-ignore */ /* webpackIgnore: true */ '@adapt-toolkit/sdk-native'));
23
+ BACKEND_KIND = 'native';
16
24
  }
17
- catch {
25
+ catch (e) {
26
+ // F189 — NEVER swallow the reason. The native addon is optional in prod so the WASM fallback
27
+ // stays (behaviour unchanged), but the failure reason (missing prebuild, ABI/platform
28
+ // mismatch, ASAN link error) is the only diagnostic of a broken native path, and its silence
29
+ // is exactly what lets a broken addon hide in CI (a --node leg silently running WASM mislabels
30
+ // hash divergence and can report green with zero native coverage). Always log it.
31
+ (globalThis.console?.warn ?? (() => { }))('[adapt] native @adapt-toolkit/sdk-native failed to load; falling back to WASM backend (F189):', e instanceof Error ? (e.stack ?? e.message) : e);
18
32
  _backend = await import('./index.js');
33
+ BACKEND_KIND = 'wasm';
19
34
  }
20
35
  export const AdaptObject = _backend.AdaptObject;
21
36
  export const AdaptObjectLifetime = _backend.AdaptObjectLifetime;
@@ -1 +1 @@
1
- {"version":3,"file":"backend-node.js","sourceRoot":"","sources":["../../src/wasm/backend-node.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,4EAA4E;AAC5E,0EAA0E;AAC1E,2EAA2E;AAC3E,EAAE;AACF,0EAA0E;AAC1E,6EAA6E;AAC7E,6EAA6E;AAC7E,0DAA0D;AAI1D,IAAI,QAAqB,CAAC;AAC1B,IAAI,CAAC;IACH,qEAAqE;IACrE,kEAAkE;IAClE,QAAQ,GAAG,CAAC,MAAM,MAAM;IACtB,kBAAkB,CAAC,yBAAyB,CAAC,2BAAqC,CACnF,CAA2B,CAAC;AAC/B,CAAC;AAAC,MAAM,CAAC;IACP,QAAQ,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,WAAW,CAAC;AAChD,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CAAC,mBAAmB,CAAC;AAChE,MAAM,CAAC,MAAM,gBAAgB,GAAG,QAAQ,CAAC,gBAAgB,CAAC;AAC1D,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CAAC,mBAAmB,CAAC;AAChE,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ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,mBAAmB,GAAG,QAAQ,CAAC,mBAAmB,CAAC;AAChE,MAAM,CAAC,MAAM,gBAAgB,GAAG,QAAQ,CAAC,gBAAgB,CAAC;AAC1D,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CAAC,mBAAmB,CAAC;AAChE,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;AAC9C,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAAQ,CAAC,kBAAkB,CAAC;AAC9D,MAAM,CAAC,MAAM,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC"}
@@ -2,6 +2,7 @@ import type { AdaptBackend } from '../loaders/shared.js';
2
2
  import { AdaptEnvironment, AdaptEvaluationUnit, AdaptValue, AdaptPacketContext } from './adapt.js';
3
3
  export * from './adapt.js';
4
4
  export type { AdaptWasmObject } from './wasm_types.js';
5
+ export declare const BACKEND_KIND: 'native' | 'wasm';
5
6
  declare const AddonTypes: {
6
7
  AdaptValue: typeof AdaptValue;
7
8
  AdaptEvaluationUnit: typeof AdaptEvaluationUnit;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/wasm/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEnG,cAAc,YAAY,CAAC;AAC3B,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD,QAAA,MAAM,UAAU;;;;;CAKf,CAAC;AAEF,wBAAgB,aAAa,IAAI,YAAY,CAAC,OAAO,UAAU,CAAC,CAK/D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/wasm/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEnG,cAAc,YAAY,CAAC;AAC3B,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAQvD,eAAO,MAAM,YAAY,EAAE,QAAQ,GAAG,MAAe,CAAC;AAEtD,QAAA,MAAM,UAAU;;;;;CAKf,CAAC;AAEF,wBAAgB,aAAa,IAAI,YAAY,CAAC,OAAO,UAAU,CAAC,CAK/D"}
@@ -1,5 +1,12 @@
1
1
  import { AdaptEnvironment, AdaptEvaluationUnit, AdaptValue, AdaptPacketContext } from './adapt.js';
2
2
  export * from './adapt.js';
3
+ // This IS the WASM backend (the browser/default `./backend` entry, and the node fallback target),
4
+ // so it always resolves to 'wasm'. The node `./backend` gateway (backend-node.ts) overrides this
5
+ // with 'native' when the native addon loads. Declared here too so `BACKEND_KIND` is part of the
6
+ // `./backend` TYPE surface (all conditions' types map to this index) — the --node harness reads it
7
+ // through that gateway to prove it ran native (F189). Typed as the union (not the 'wasm' literal)
8
+ // so a `=== 'native'` assertion type-checks.
9
+ export const BACKEND_KIND = 'wasm';
3
10
  const AddonTypes = {
4
11
  AdaptValue,
5
12
  AdaptEvaluationUnit,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/wasm/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEnG,cAAc,YAAY,CAAC;AAG3B,MAAM,UAAU,GAAG;IACjB,UAAU;IACV,mBAAmB;IACnB,kBAAkB;IAClB,gBAAgB;CACjB,CAAC;AAEF,MAAM,UAAU,aAAa;IAC3B,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,UAAU,EAAE,UAAU;KACvB,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/wasm/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEnG,cAAc,YAAY,CAAC;AAG3B,kGAAkG;AAClG,iGAAiG;AACjG,gGAAgG;AAChG,mGAAmG;AACnG,kGAAkG;AAClG,6CAA6C;AAC7C,MAAM,CAAC,MAAM,YAAY,GAAsB,MAAM,CAAC;AAEtD,MAAM,UAAU,GAAG;IACjB,UAAU;IACV,mBAAmB;IACnB,kBAAkB;IAClB,gBAAgB;CACjB,CAAC;AAEF,MAAM,UAAU,aAAa;IAC3B,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,UAAU,EAAE,UAAU;KACvB,CAAC;AACJ,CAAC"}
@@ -19,7 +19,7 @@ export var Protocol;
19
19
  /** @ignore */
20
20
  const builder = new AdaptObjectBuilder();
21
21
  /** @ignore */
22
- const unit_hash = 'EFC6E105ACCE7001CD92A4D467AD9F373E20D72088EEAE63F8DDA641837FF78A.muflo';
22
+ const unit_hash = '87D314635BB034A83A212BAED4CB63F31CCFB8AC5F9DCCCA5C7B9DB647252C77.muflo';
23
23
  /** @ignore */
24
24
  function is_node() {
25
25
  return (typeof process === 'object' &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adapt-toolkit/sdk",
3
- "version": "0.10.11",
3
+ "version": "0.10.13",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "description": "TypeScript SDK for the ADAPT framework. One install for browser, Node, and React Native; the runtime picks a native, WASM, or platform-native backend automatically.",
@@ -109,7 +109,7 @@
109
109
  "ws": "^8.16.0"
110
110
  },
111
111
  "optionalDependencies": {
112
- "@adapt-toolkit/sdk-native": "0.10.11"
112
+ "@adapt-toolkit/sdk-native": "0.10.13"
113
113
  },
114
114
  "peerDependencies": {
115
115
  "@adapt-toolkit/sdk-react-native": "0.1.0"