peachsim 0.1.662 → 0.1.663

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 (77) hide show
  1. package/cli/commands/inspect/core.ts +9 -1
  2. package/cli/commands/inspect/settling.ts +44 -1
  3. package/cli/commands/inspect/wait-ready.ts +40 -70
  4. package/dist-lib/agent-daemon-client.cjs +1 -1
  5. package/dist-lib/agent-events.cjs +1 -1
  6. package/dist-lib/agent-identity.cjs +1 -1
  7. package/dist-lib/agent-sessions.cjs +1 -1
  8. package/dist-lib/attached-projects.cjs +1 -1
  9. package/dist-lib/auth/shared-session.cjs +1 -1
  10. package/dist-lib/backend-origin.cjs +1 -1
  11. package/dist-lib/beta.cjs +1 -1
  12. package/dist-lib/beta.mjs +1 -1
  13. package/dist-lib/bridge-constants.cjs +1 -1
  14. package/dist-lib/bridge-contract-input.cjs +6 -2
  15. package/dist-lib/bridge-contract-input.mjs +6 -2
  16. package/dist-lib/bridge-contract.cjs +1 -1
  17. package/dist-lib/bridge-contract.mjs +1 -1
  18. package/dist-lib/capture-contract.cjs +1 -1
  19. package/dist-lib/capture-contract.mjs +1 -1
  20. package/dist-lib/cli-constants.cjs +1 -1
  21. package/dist-lib/cloud-contract.cjs +1 -1
  22. package/dist-lib/cloud-contract.mjs +1 -1
  23. package/dist-lib/cloud-test-args.cjs +1 -1
  24. package/dist-lib/cloud-test-args.mjs +1 -1
  25. package/dist-lib/cloud.cjs +1 -1
  26. package/dist-lib/cloud.mjs +1 -1
  27. package/dist-lib/config.cjs +1 -1
  28. package/dist-lib/detox/index.cjs +1 -1
  29. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  30. package/dist-lib/home-paths.cjs +1 -1
  31. package/dist-lib/host/bridge-host.cjs +1 -1
  32. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  33. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  34. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  35. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  36. package/dist-lib/host/websocket-proxy.cjs +1 -1
  37. package/dist-lib/index.cjs +8 -2
  38. package/dist-lib/jump-to-source-babel.cjs +1 -1
  39. package/dist-lib/jump-to-source-native.cjs +1 -1
  40. package/dist-lib/kotlin-host.cjs +13 -7
  41. package/dist-lib/menu.cjs +1 -1
  42. package/dist-lib/menu.mjs +1 -1
  43. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  44. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  45. package/dist-lib/metro-production-bundle.cjs +1 -1
  46. package/dist-lib/metro-production-bundle.mjs +1 -1
  47. package/dist-lib/metro.cjs +1 -1
  48. package/dist-lib/native-app-identity.cjs +1 -1
  49. package/dist-lib/native-app-identity.mjs +1 -1
  50. package/dist-lib/plist.cjs +1 -1
  51. package/dist-lib/plist.mjs +1 -1
  52. package/dist-lib/profiles.cjs +1 -1
  53. package/dist-lib/public-brand.cjs +1 -1
  54. package/dist-lib/react-native-host-modules.cjs +1 -1
  55. package/dist-lib/react-native-host-modules.mjs +1 -1
  56. package/dist-lib/render-mode.cjs +1 -1
  57. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  58. package/dist-lib/sdk.cjs +29 -2
  59. package/dist-lib/sdk.mjs +28 -2
  60. package/dist-lib/skills.cjs +9 -2
  61. package/dist-lib/swift-compile.cjs +1 -1
  62. package/dist-lib/swift-compile.mjs +1 -1
  63. package/dist-lib/swift-package.cjs +1 -1
  64. package/dist-lib/swift-package.mjs +1 -1
  65. package/dist-lib/swift-submit.cjs +1 -1
  66. package/dist-lib/swift-submit.mjs +1 -1
  67. package/dist-lib/swift.cjs +1 -1
  68. package/dist-lib/vite-swift.cjs +1 -1
  69. package/dist-lib/vite.cjs +1 -1
  70. package/kotlin/AppSources/dev/peach/app/PeachApp.kt +8 -2
  71. package/package.json +1 -1
  72. package/src/bridge-contract-input.ts +5 -1
  73. package/src/bridge-contract.ts +4 -1
  74. package/src/generated/android-framework-themes.json +341 -0
  75. package/src/kotlin-app.ts +47 -26
  76. package/src/kotlin-host.ts +14 -7
  77. package/src/sdk.ts +2 -1
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.662 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.662 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.662 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.662 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/react-native-host-modules.ts
4
4
  var REACT_NATIVE_PASSTHROUGH_SPECIFIERS = [
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.662 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.662 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
package/dist-lib/sdk.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.662 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -99,6 +99,7 @@ __export(sdk_exports, {
99
99
  tapResolvedTarget: () => tapResolvedTarget,
100
100
  tapTargetFromPayload: () => tapTargetFromPayload,
101
101
  waitForSootsimIdle: () => waitForSootsimIdle,
102
+ waitReadyAndSettle: () => waitReadyAndSettle,
102
103
  waitReadyReason: () => waitReadyReason
103
104
  });
104
105
  module.exports = __toCommonJS(sdk_exports);
@@ -860,7 +861,13 @@ async function inspectWaitReady(bridge, timeoutMs = 2e4, options = {}) {
860
861
  {
861
862
  type: "waitFor",
862
863
  ...options.simId ? { simId: options.simId } : {},
863
- waitForOptions: { condition: { type: "ready" }, timeoutMs }
864
+ waitForOptions: {
865
+ condition: {
866
+ type: "ready",
867
+ ...options.stableMs === void 0 ? {} : { stableMs: options.stableMs }
868
+ },
869
+ timeoutMs
870
+ }
864
871
  },
865
872
  { timeoutMs: timeoutMs + 1e3 }
866
873
  );
@@ -1683,6 +1690,25 @@ async function waitForSootsimIdle({
1683
1690
  blockedBy: typeof blockedBy === "string" ? blockedBy : "unknown"
1684
1691
  };
1685
1692
  }
1693
+ async function waitReadyAndSettle(bridge, timeoutMs, options = {}) {
1694
+ const start = Date.now();
1695
+ const ready = await inspectWaitReady(bridge, timeoutMs, options);
1696
+ if (!ready.ready) return { status: ready, idle: null, elapsedMs: Date.now() - start };
1697
+ const idle = await waitForSootsimIdle({
1698
+ bridge,
1699
+ simId: options.simId,
1700
+ maxMs: Math.max(100, Math.min(1e4, timeoutMs - (Date.now() - start))),
1701
+ pollMs: 32,
1702
+ stablePolls: 2
1703
+ });
1704
+ if (!idle.settled) return { status: ready, idle, elapsedMs: Date.now() - start };
1705
+ const settled = await inspectWaitReady(
1706
+ bridge,
1707
+ Math.max(1e3, timeoutMs - (Date.now() - start)),
1708
+ { ...options.simId ? { simId: options.simId } : {}, stableMs: 0 }
1709
+ );
1710
+ return { status: settled, idle, elapsedMs: Date.now() - start };
1711
+ }
1686
1712
 
1687
1713
  // cli/commands/inspect/actions.ts
1688
1714
  var DEFAULT_AGENT_TIMING = {
@@ -2619,5 +2645,6 @@ var SimClient = class {
2619
2645
  tapResolvedTarget,
2620
2646
  tapTargetFromPayload,
2621
2647
  waitForSootsimIdle,
2648
+ waitReadyAndSettle,
2622
2649
  waitReadyReason
2623
2650
  });
package/dist-lib/sdk.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.662 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -760,7 +760,13 @@ async function inspectWaitReady(bridge, timeoutMs = 2e4, options = {}) {
760
760
  {
761
761
  type: "waitFor",
762
762
  ...options.simId ? { simId: options.simId } : {},
763
- waitForOptions: { condition: { type: "ready" }, timeoutMs }
763
+ waitForOptions: {
764
+ condition: {
765
+ type: "ready",
766
+ ...options.stableMs === void 0 ? {} : { stableMs: options.stableMs }
767
+ },
768
+ timeoutMs
769
+ }
764
770
  },
765
771
  { timeoutMs: timeoutMs + 1e3 }
766
772
  );
@@ -1583,6 +1589,25 @@ async function waitForSootsimIdle({
1583
1589
  blockedBy: typeof blockedBy === "string" ? blockedBy : "unknown"
1584
1590
  };
1585
1591
  }
1592
+ async function waitReadyAndSettle(bridge, timeoutMs, options = {}) {
1593
+ const start = Date.now();
1594
+ const ready = await inspectWaitReady(bridge, timeoutMs, options);
1595
+ if (!ready.ready) return { status: ready, idle: null, elapsedMs: Date.now() - start };
1596
+ const idle = await waitForSootsimIdle({
1597
+ bridge,
1598
+ simId: options.simId,
1599
+ maxMs: Math.max(100, Math.min(1e4, timeoutMs - (Date.now() - start))),
1600
+ pollMs: 32,
1601
+ stablePolls: 2
1602
+ });
1603
+ if (!idle.settled) return { status: ready, idle, elapsedMs: Date.now() - start };
1604
+ const settled = await inspectWaitReady(
1605
+ bridge,
1606
+ Math.max(1e3, timeoutMs - (Date.now() - start)),
1607
+ { ...options.simId ? { simId: options.simId } : {}, stableMs: 0 }
1608
+ );
1609
+ return { status: settled, idle, elapsedMs: Date.now() - start };
1610
+ }
1586
1611
 
1587
1612
  // cli/commands/inspect/actions.ts
1588
1613
  var DEFAULT_AGENT_TIMING = {
@@ -2518,5 +2543,6 @@ export {
2518
2543
  tapResolvedTarget,
2519
2544
  tapTargetFromPayload,
2520
2545
  waitForSootsimIdle,
2546
+ waitReadyAndSettle,
2521
2547
  waitReadyReason
2522
2548
  };
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.662 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -33769,7 +33769,13 @@ async function inspectWaitReady(bridge, timeoutMs = 2e4, options = {}) {
33769
33769
  {
33770
33770
  type: "waitFor",
33771
33771
  ...options.simId ? { simId: options.simId } : {},
33772
- waitForOptions: { condition: { type: "ready" }, timeoutMs }
33772
+ waitForOptions: {
33773
+ condition: {
33774
+ type: "ready",
33775
+ ...options.stableMs === void 0 ? {} : { stableMs: options.stableMs }
33776
+ },
33777
+ timeoutMs
33778
+ }
33773
33779
  },
33774
33780
  { timeoutMs: timeoutMs + 1e3 }
33775
33781
  );
@@ -38965,6 +38971,7 @@ async function waitForSootsimIdle({
38965
38971
  var init_settling = __esm({
38966
38972
  "cli/commands/inspect/settling.ts"() {
38967
38973
  "use strict";
38974
+ init_core();
38968
38975
  }
38969
38976
  });
38970
38977
 
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.662 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.662 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-compile.ts
4
4
  import { execFile as execFile2 } from "node:child_process";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.662 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.662 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-package.ts
4
4
  function isSwiftManifestFile(file) {
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.662 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.662 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-submit.ts
4
4
  var SWIFT_COMPILE_PATH = "/api/swift-compile";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.662 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.662 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.662 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -46,7 +46,10 @@ import org.json.JSONObject
46
46
  internal class PeachAppSpec(
47
47
  val launcher: ComponentName,
48
48
  val component: ComponentName,
49
- val window: WindowTheme,
49
+ // the launcher activity's window theme in a day and a night configuration,
50
+ // values-night over values
51
+ val dayWindow: WindowTheme,
52
+ val nightWindow: WindowTheme,
50
53
  val createApplication: () -> Application,
51
54
  val createActivity: () -> Activity,
52
55
  // the activity's configChanges includes uiMode: it takes a night mode
@@ -200,7 +203,10 @@ private fun launchActivity(app: AppProcess, lastNonConfigurationInstance: Any?):
200
203
  mount.emitAtFrame("window") { window.describe().toString() }
201
204
  }
202
205
  }
203
- window = Window(activity, spec.window, host)
206
+ // the theme the activity is created under: a relaunch after a night
207
+ // change takes the other one
208
+ val theme = if (isNight(processResources.configuration)) spec.nightWindow else spec.dayWindow
209
+ window = Window(activity, theme, host)
204
210
  activity.attach(
205
211
  app.application,
206
212
  spec.component,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.662",
3
+ "version": "0.1.663",
4
4
  "description": "Vite and Metro plugins, testing drivers, and SDK exports for peach.",
5
5
  "author": "Tamagui LLC",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -415,8 +415,12 @@ export function parseSemanticWaitOptions(value: unknown): SemanticWaitOptions {
415
415
  const type = stringValue(condition.type, 'waitFor.condition.type')
416
416
  const timeoutMs = semanticWaitTimeout(input, 'waitFor')
417
417
  if (type === 'ready') {
418
+ const stableMs = optionalNumber(condition, 'stableMs', 'waitFor.condition')
419
+ if (stableMs !== undefined && stableMs < 0) {
420
+ validationFailure('waitFor.condition.stableMs', 'must be at least 0')
421
+ }
418
422
  return {
419
- condition: { type },
423
+ condition: { type, ...(stableMs === undefined ? {} : { stableMs }) },
420
424
  ...(timeoutMs === undefined ? {} : { timeoutMs }),
421
425
  }
422
426
  }
@@ -332,7 +332,10 @@ export interface PerformResult {
332
332
  // something to look at — those are 1x1 and painted under the whole app, so they
333
333
  // are permanently occluded and `present` can never match one.
334
334
  export type SemanticWaitCondition =
335
- | { type: 'ready' }
335
+ // stableMs: how long the node count must hold before ready matches
336
+ // (SEMANTIC_READY_NODE_STABLE_MS by default). a caller that already waited
337
+ // for the app to settle passes 0 to read the settled tree at once.
338
+ | { type: 'ready'; stableMs?: number }
336
339
  | { type: 'present'; selector: SimSemanticResolveSelector }
337
340
  | { type: 'mounted'; selector: SimSemanticResolveSelector }
338
341
  | { type: 'absent'; selector: SimSemanticResolveSelector }