peachsim 0.1.748 → 0.1.750

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 (74) hide show
  1. package/README.md +4 -0
  2. package/cli/bridge-flow-runner.ts +1 -5
  3. package/cli/flow-file.ts +17 -3
  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 +1 -1
  15. package/dist-lib/bridge-contract-input.mjs +1 -1
  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 +362 -5
  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 +1 -1
  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 +1 -1
  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/native-firebase-metadata.cjs +1 -1
  51. package/dist-lib/native-firebase-metadata.mjs +1 -1
  52. package/dist-lib/plist.cjs +1 -1
  53. package/dist-lib/plist.mjs +1 -1
  54. package/dist-lib/profiles.cjs +1 -1
  55. package/dist-lib/public-brand.cjs +1 -1
  56. package/dist-lib/react-native-host-modules.cjs +1 -1
  57. package/dist-lib/react-native-host-modules.mjs +1 -1
  58. package/dist-lib/render-mode.cjs +1 -1
  59. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  60. package/dist-lib/sdk.cjs +1 -1
  61. package/dist-lib/sdk.mjs +1 -1
  62. package/dist-lib/skills.cjs +13 -12
  63. package/dist-lib/swift-compile.cjs +1 -1
  64. package/dist-lib/swift-compile.mjs +1 -1
  65. package/dist-lib/swift-package.cjs +1 -1
  66. package/dist-lib/swift-package.mjs +1 -1
  67. package/dist-lib/swift-submit.cjs +1 -1
  68. package/dist-lib/swift-submit.mjs +1 -1
  69. package/dist-lib/swift-toolchain.cjs +1 -1
  70. package/dist-lib/swift.cjs +1 -1
  71. package/dist-lib/vite-swift.cjs +1 -1
  72. package/dist-lib/vite.cjs +1 -1
  73. package/package.json +1 -1
  74. package/src/vite-plugin.ts +4 -1
package/README.md CHANGED
@@ -216,6 +216,10 @@ bridge always addresses the **shell worker**, never an undifferentiated sim.
216
216
  | inspect / SDK command surface | Runtime inspection + interaction verbs (describe, find, do tap, get errors, wait, layout, settle). Re-exported as `peachsim/sdk` so programmatic callers drive a sim the same way the CLI does. | `cli/commands/inspect/core.ts`, `cli/commands/inspect/actions.ts`, `cli/commands/inspect.ts`, `src/sdk.ts` |
217
217
  | bridge-contract input parsers | Turn untrusted JSON into typed bridge-contract arguments, so a transport in front of a sim validates request bodies once instead of writing a second reader. | `src/bridge-contract-input.ts`, `src/bridge-contract.ts` |
218
218
  | Maestro / Detox runners | Drop-in test compatibility. `bridge-flow-runner.ts` runs Maestro YAML and recorded flows over the bridge; `detox/` provides a `by`/`element`/`expect`/`device` driver + jest preset so existing Detox suites run unchanged. | `cli/bridge-flow-runner.ts`, `cli/commands/maestro.ts`, `cli/commands/detox.ts`, `detox/index.ts`, `detox/jest-preset.cjs` |
219
+
220
+ Maestro YAML header `onFlowStart` and `onFlowComplete` hooks reach the same
221
+ runner as body hooks, including nested `runFlow` files. A header reset flow
222
+ therefore runs before assertions in each flow.
219
223
  | sim drivers | Launch or attach the actual sim page. Playwright owns isolated browser profiles; Electron owns the native desktop surface. The current sim is reused unless `--new`, `--profile`, or `--ephemeral` requests a separate one. | `cli/drivers/index.ts`, `cli/drivers/registry.ts`, `cli/drivers/electron.ts`, `cli/drivers/playwright.ts` |
220
224
  | SootSimBridgeHost (serve/daemon) | The bridge process (`peach serve`, or autostarted as the daemon via launchd/systemd). HTTP+WS hub on `:7668`: relays commands between CLI clients and registered sims; also serves runtime HTTP, `/__server-scan`, and fetch/WS proxies. | `src/host/bridge-host.ts`, `cli/commands/serve.ts`, `cli/commands/daemon.ts`, `src/home-paths.ts` |
221
225
  | AgentHost + sessions | Agent-routing extension of the host: owns the single FIFO reader per agent session and fans `agent:event`/`session-status` pushes to every WS subscriber. Backed by agent-sessions + attached-projects stores. | `src/host/agent-host.ts`, `src/agent-sessions.ts`, `src/attached-projects.ts`, `src/agent-daemon-client.ts` |
@@ -1,7 +1,6 @@
1
1
  import * as fs from 'fs'
2
2
  import * as path from 'path'
3
3
  import { devices, type DeviceModel } from 'peach-engine/settings/devices'
4
- import yaml from 'yaml'
5
4
  import { REQUIRED_IDENTICAL_FLOW_FRAMES, framesIdentical } from '../detox/proof-frame.cjs'
6
5
  import { flowTimeoutScale } from '../src/flow-timeout-scale'
7
6
  import { composeFramedScreenshot } from '../src/screenshots/frame-compose'
@@ -902,10 +901,7 @@ function normalizeBareStringStep(verb: string): MaestroStep {
902
901
  // values produced mid-flow (runScript output.*, copyTextFrom) resolve
903
902
  // correctly in later steps.
904
903
  export function parseFlowSteps(content: string): MaestroStep[] {
905
- const parts = content.split(/^---$/m)
906
- const candidate = parts.length > 1 ? parts[parts.length - 1] : content
907
- const parsed = yaml.parse(candidate)
908
- return Array.isArray(parsed) ? parsed : []
904
+ return parseFlowFile(content).steps
909
905
  }
910
906
 
911
907
  export class SootSimBridgeFlowRunner {
package/cli/flow-file.ts CHANGED
@@ -23,6 +23,8 @@ export interface FlowFrontmatter {
23
23
  // junitClassname are reserved: they set the testcase attributes and are
24
24
  // not emitted as properties.
25
25
  properties?: Record<string, string>
26
+ onFlowStart?: unknown[]
27
+ onFlowComplete?: unknown[]
26
28
  }
27
29
 
28
30
  // parse flow file. accepts three shapes:
@@ -42,8 +44,20 @@ export function parseFlowFile(content: string): {
42
44
  } {
43
45
  let frontmatter: FlowFrontmatter = {}
44
46
  let body = content
45
- const normalizeSteps = (steps: unknown): any[] => {
46
- return Array.isArray(steps) ? steps : []
47
+ const normalizeSteps = (
48
+ steps: unknown,
49
+ metadata: FlowFrontmatter = frontmatter,
50
+ ): any[] => {
51
+ if (!Array.isArray(steps)) return []
52
+ return [
53
+ ...(Array.isArray(metadata.onFlowStart)
54
+ ? [{ onFlowStart: metadata.onFlowStart }]
55
+ : []),
56
+ ...steps,
57
+ ...(Array.isArray(metadata.onFlowComplete)
58
+ ? [{ onFlowComplete: metadata.onFlowComplete }]
59
+ : []),
60
+ ]
47
61
  }
48
62
 
49
63
  // shape 2: leading ---\n<fm>\n---\n<body>
@@ -69,7 +83,7 @@ export function parseFlowFile(content: string): {
69
83
  const st = docs[docs.length - 1].toJS()
70
84
  return {
71
85
  frontmatter: fm && typeof fm === 'object' ? fm : {},
72
- steps: normalizeSteps(st),
86
+ steps: normalizeSteps(st, fm ?? {}),
73
87
  }
74
88
  }
75
89
  } catch (e) {
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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;
package/dist-lib/beta.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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;
package/dist-lib/beta.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/beta.ts
4
4
  var IS_BETA = true;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/bridge-contract.ts
4
4
  var SIM_LONG_PRESS_MAX_MS = 5e3;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/bridge-contract.ts
4
4
  var REFUSED_PERFORM_STEP_TYPES = [
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/capture-contract.ts
4
4
  var RNX_SCREEN_CAPTURE_VERSION = 1;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/cloud-contract.ts
4
4
  var RNX_CLOUD_MAX_ARTIFACT_BYTES = 20 * 1024 * 1024;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/cloud-test-args.ts
4
4
  var CLOUD_TEST_ARGS_MAX_COUNT = 32;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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);
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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;
@@ -836,6 +836,298 @@ function readBrowserCompositeCaptureRequest(value) {
836
836
  return request;
837
837
  }
838
838
 
839
+ // ../peach-compat/src/stubs/native-seams/react-native-cookies.ts
840
+ var cookieListeners = /* @__PURE__ */ new WeakMap();
841
+ var WebKitCookieJar = class extends Map {
842
+ changed() {
843
+ for (const listener of cookieListeners.get(this) ?? []) listener();
844
+ }
845
+ set(key, value) {
846
+ super.set(key, value);
847
+ this.changed();
848
+ return this;
849
+ }
850
+ delete(key) {
851
+ const changed = super.delete(key);
852
+ if (changed) this.changed();
853
+ return changed;
854
+ }
855
+ clear() {
856
+ if (this.size === 0) return;
857
+ super.clear();
858
+ this.changed();
859
+ }
860
+ };
861
+ var cookieStores = {
862
+ native: /* @__PURE__ */ new Map(),
863
+ webKit: new WebKitCookieJar()
864
+ };
865
+ function createCookieOperations() {
866
+ const INVALID_URL_MISSING_HTTP = "Invalid URL: It may be missing a protocol (ex. http:// or https://).";
867
+ const INVALID_COOKIE_VALUES = "Unable to add cookie - invalid values";
868
+ function parseCookieUrl2(url) {
869
+ try {
870
+ const parsed = new URL(url);
871
+ if (!parsed.hostname || parsed.protocol !== "http:" && parsed.protocol !== "https:") {
872
+ throw new Error(INVALID_URL_MISSING_HTTP);
873
+ }
874
+ return parsed;
875
+ } catch {
876
+ throw new Error(INVALID_URL_MISSING_HTTP);
877
+ }
878
+ }
879
+ function normalizedDomain2(domain) {
880
+ return domain.startsWith(".") ? domain.slice(1).toLowerCase() : domain.toLowerCase();
881
+ }
882
+ function domainMatches2(hostname, domain, hostOnly) {
883
+ const host = hostname.toLowerCase();
884
+ const normalized = normalizedDomain2(domain);
885
+ return hostOnly ? host === normalized : host === normalized || host.endsWith(`.${normalized}`);
886
+ }
887
+ function pathMatches2(requestPath, cookiePath) {
888
+ if (requestPath === cookiePath) return true;
889
+ if (!requestPath.startsWith(cookiePath)) return false;
890
+ return cookiePath.endsWith("/") || requestPath.charAt(cookiePath.length) === "/";
891
+ }
892
+ function cookieKey2(cookie) {
893
+ return `${normalizedDomain2(cookie.domain)}\0${cookie.path}\0${cookie.name}`;
894
+ }
895
+ function purgeExpired2(store) {
896
+ const now = Date.now();
897
+ for (const [key, cookie] of store) {
898
+ if (cookie.expiresAt !== null && cookie.expiresAt <= now) store.delete(key);
899
+ }
900
+ }
901
+ function storeCookie2(store, cookie) {
902
+ const key = cookieKey2(cookie);
903
+ if (cookie.expiresAt !== null && cookie.expiresAt <= Date.now()) store.delete(key);
904
+ else store.set(key, cookie);
905
+ }
906
+ function publicCookie2(cookie) {
907
+ return {
908
+ name: cookie.name,
909
+ value: cookie.value,
910
+ domain: cookie.domain,
911
+ path: cookie.path,
912
+ ...cookie.version === void 0 ? {} : { version: cookie.version },
913
+ ...cookie.expires === void 0 ? {} : { expires: cookie.expires },
914
+ ...cookie.sameSite === void 0 ? {} : { sameSite: cookie.sameSite },
915
+ ...cookie.maxAge === void 0 ? {} : { maxAge: cookie.maxAge },
916
+ secure: cookie.secure === true,
917
+ httpOnly: cookie.httpOnly === true
918
+ };
919
+ }
920
+ function setCookie2(store, url, cookie) {
921
+ const parsed = parseCookieUrl2(url);
922
+ if (!cookie || typeof cookie.name !== "string" || cookie.name.length === 0 || typeof cookie.value !== "string") {
923
+ throw new Error(INVALID_COOKIE_VALUES);
924
+ }
925
+ const suppliedDomain = typeof cookie.domain === "string" && cookie.domain.length > 0 ? cookie.domain : null;
926
+ const domain = suppliedDomain ?? parsed.hostname;
927
+ if (!domainMatches2(parsed.hostname, domain, suppliedDomain === null)) {
928
+ throw new Error(
929
+ `Cookie URL host ${parsed.hostname} and domain ${domain} mismatched. The cookie won't set correctly.`
930
+ );
931
+ }
932
+ const parsedExpiry = cookie.maxAge === void 0 ? cookie.expires === void 0 ? null : Date.parse(cookie.expires) : Date.now() + cookie.maxAge * 1e3;
933
+ const expiresAt = parsedExpiry === null || Number.isNaN(parsedExpiry) ? null : parsedExpiry;
934
+ const stored = {
935
+ name: cookie.name,
936
+ value: cookie.value,
937
+ domain,
938
+ path: cookie.path || "/",
939
+ ...cookie.version === void 0 ? {} : { version: cookie.version },
940
+ ...expiresAt === null ? {} : { expires: new Date(expiresAt).toISOString() },
941
+ ...cookie.sameSite === void 0 ? {} : { sameSite: cookie.sameSite },
942
+ ...cookie.maxAge === void 0 ? {} : { maxAge: cookie.maxAge },
943
+ secure: cookie.secure === true,
944
+ httpOnly: cookie.httpOnly === true,
945
+ hostOnly: suppliedDomain === null,
946
+ expiresAt
947
+ };
948
+ storeCookie2(store, stored);
949
+ return true;
950
+ }
951
+ function getCookies2(store, url) {
952
+ const parsed = parseCookieUrl2(url);
953
+ purgeExpired2(store);
954
+ const cookies = {};
955
+ for (const cookie of store.values()) {
956
+ if (!domainMatches2(parsed.hostname, cookie.domain, cookie.hostOnly)) continue;
957
+ if (!pathMatches2(parsed.pathname || "/", cookie.path)) continue;
958
+ if (cookie.secure && parsed.protocol !== "https:") continue;
959
+ cookies[cookie.name] = publicCookie2(cookie);
960
+ }
961
+ return cookies;
962
+ }
963
+ function getAllCookies2(store) {
964
+ purgeExpired2(store);
965
+ const cookies = {};
966
+ for (const cookie of store.values()) cookies[cookie.name] = publicCookie2(cookie);
967
+ return cookies;
968
+ }
969
+ function cookieFromResponse2(cookieString) {
970
+ if (typeof cookieString !== "string" || cookieString.length === 0) {
971
+ throw new Error(INVALID_COOKIE_VALUES);
972
+ }
973
+ const parts = cookieString.split(";");
974
+ const nameValue = parts.shift()?.trim() ?? "";
975
+ const separator = nameValue.indexOf("=");
976
+ if (separator <= 0) throw new Error(INVALID_COOKIE_VALUES);
977
+ const cookie = {
978
+ name: nameValue.slice(0, separator).trim(),
979
+ value: nameValue.slice(separator + 1).trim()
980
+ };
981
+ for (const part of parts) {
982
+ const trimmed = part.trim();
983
+ if (!trimmed) continue;
984
+ const attributeSeparator = trimmed.indexOf("=");
985
+ const attributeName = (attributeSeparator === -1 ? trimmed : trimmed.slice(0, attributeSeparator)).toLowerCase();
986
+ const attributeValue = attributeSeparator === -1 ? "" : trimmed.slice(attributeSeparator + 1).trim();
987
+ if (attributeName === "domain" && attributeValue) cookie.domain = attributeValue;
988
+ else if (attributeName === "path" && attributeValue) cookie.path = attributeValue;
989
+ else if (attributeName === "expires" && attributeValue)
990
+ cookie.expires = attributeValue;
991
+ else if (attributeName === "max-age" && attributeValue) {
992
+ const seconds = Number(attributeValue);
993
+ if (Number.isFinite(seconds)) {
994
+ cookie.maxAge = seconds;
995
+ cookie.expires = new Date(Date.now() + seconds * 1e3).toISOString();
996
+ }
997
+ } else if (attributeName === "samesite") {
998
+ const sameSite = attributeValue.toLowerCase();
999
+ if (sameSite === "lax" || sameSite === "strict" || sameSite === "none") {
1000
+ cookie.sameSite = sameSite;
1001
+ }
1002
+ } else if (attributeName === "version" && attributeValue) {
1003
+ cookie.version = attributeValue;
1004
+ } else if (attributeName === "secure") {
1005
+ cookie.secure = true;
1006
+ } else if (attributeName === "httponly") {
1007
+ cookie.httpOnly = true;
1008
+ }
1009
+ }
1010
+ return cookie;
1011
+ }
1012
+ function clearCookiesByName2(store, url, name2) {
1013
+ const parsed = parseCookieUrl2(url);
1014
+ let removed = false;
1015
+ for (const [key, cookie] of store) {
1016
+ if (cookie.name !== name2) continue;
1017
+ if (!domainMatches2(parsed.hostname, cookie.domain, cookie.hostOnly)) continue;
1018
+ store.delete(key);
1019
+ removed = true;
1020
+ }
1021
+ return removed;
1022
+ }
1023
+ function removeSessionCookies2(store) {
1024
+ let removed = false;
1025
+ for (const [key, cookie] of store) {
1026
+ if (cookie.expiresAt !== null) continue;
1027
+ store.delete(key);
1028
+ removed = true;
1029
+ }
1030
+ return removed;
1031
+ }
1032
+ function restore(cookies) {
1033
+ if (!Array.isArray(cookies)) throw new Error("WebKit cookie snapshot is malformed");
1034
+ const store = /* @__PURE__ */ new Map();
1035
+ for (const value of cookies) {
1036
+ if (!value || typeof value !== "object" || typeof value.name !== "string" || typeof value.value !== "string" || typeof value.domain !== "string" || typeof value.path !== "string" || typeof value.hostOnly !== "boolean" || value.expiresAt !== null && (typeof value.expiresAt !== "number" || !Number.isFinite(value.expiresAt)))
1037
+ throw new Error("WebKit cookie snapshot has malformed fields");
1038
+ const cookie = {
1039
+ name: value.name,
1040
+ value: value.value,
1041
+ domain: value.domain,
1042
+ path: value.path,
1043
+ hostOnly: value.hostOnly,
1044
+ expiresAt: value.expiresAt,
1045
+ secure: value.secure === true,
1046
+ httpOnly: value.httpOnly === true
1047
+ };
1048
+ store.set(cookieKey2(cookie), cookie);
1049
+ }
1050
+ return store;
1051
+ }
1052
+ return {
1053
+ restore,
1054
+ parseCookieUrl: parseCookieUrl2,
1055
+ normalizedDomain: normalizedDomain2,
1056
+ domainMatches: domainMatches2,
1057
+ pathMatches: pathMatches2,
1058
+ cookieKey: cookieKey2,
1059
+ purgeExpired: purgeExpired2,
1060
+ storeCookie: storeCookie2,
1061
+ publicCookie: publicCookie2,
1062
+ setCookie: setCookie2,
1063
+ getCookies: getCookies2,
1064
+ getAllCookies: getAllCookies2,
1065
+ cookieFromResponse: cookieFromResponse2,
1066
+ clearCookiesByName: clearCookiesByName2,
1067
+ removeSessionCookies: removeSessionCookies2
1068
+ };
1069
+ }
1070
+ var {
1071
+ parseCookieUrl,
1072
+ normalizedDomain,
1073
+ domainMatches,
1074
+ pathMatches,
1075
+ cookieKey,
1076
+ purgeExpired,
1077
+ storeCookie,
1078
+ publicCookie,
1079
+ setCookie,
1080
+ getCookies,
1081
+ getAllCookies,
1082
+ cookieFromResponse,
1083
+ clearCookiesByName,
1084
+ removeSessionCookies
1085
+ } = createCookieOperations();
1086
+ var webKitCookieOperationsSource = `(${createCookieOperations.toString()})()`;
1087
+ var webKitCookieStorage = {
1088
+ default: cookieStores.webKit,
1089
+ isolated: () => new WebKitCookieJar(),
1090
+ observe(store, changed) {
1091
+ let listeners = cookieListeners.get(store);
1092
+ if (!listeners) {
1093
+ listeners = /* @__PURE__ */ new Set();
1094
+ cookieListeners.set(store, listeners);
1095
+ }
1096
+ listeners.add(changed);
1097
+ return () => listeners.delete(changed);
1098
+ },
1099
+ request(store, url, script = false) {
1100
+ return Object.values(getCookies(store, url)).filter((cookie) => !script || !cookie.httpOnly).map((cookie) => `${cookie.name}=${cookie.value}`).join("; ");
1101
+ },
1102
+ script(store, url, line) {
1103
+ const cookie = cookieFromResponse(line);
1104
+ cookie.httpOnly = false;
1105
+ const parsed = parseCookieUrl(url);
1106
+ const key = cookieKey({
1107
+ name: cookie.name,
1108
+ domain: cookie.domain ?? parsed.hostname,
1109
+ path: cookie.path ?? "/"
1110
+ });
1111
+ if (store.get(key)?.httpOnly) return;
1112
+ setCookie(store, url, cookie);
1113
+ },
1114
+ all(store) {
1115
+ purgeExpired(store);
1116
+ return [...store.values()];
1117
+ },
1118
+ set(store, cookie) {
1119
+ const key = cookieKey(cookie);
1120
+ const previous = store.get(key);
1121
+ if (previous?.expiresAt !== null && previous?.expiresAt !== void 0 && previous.expiresAt <= Date.now())
1122
+ store.delete(key);
1123
+ if (store.get(key)?.httpOnly && !cookie.httpOnly) return;
1124
+ storeCookie(store, { ...cookie, version: "1" });
1125
+ },
1126
+ delete(store, cookie) {
1127
+ store.delete(cookieKey(cookie));
1128
+ }
1129
+ };
1130
+
839
1131
  // ../peach-engine/src/webview-automation-host.ts
840
1132
  var WEBVIEW_INSTANCE_ATTRIBUTE = "data-peach-webview";
841
1133
  var WEBVIEW_HOST_BINDING = "__peachWebViewHost";
@@ -857,6 +1149,10 @@ function readWebViewHostRequest(value) {
857
1149
  const allow = field("allow");
858
1150
  return typeof requestId === "number" && typeof allow === "boolean" ? { kind, instanceId, requestId, allow } : null;
859
1151
  }
1152
+ if (kind === "cookies") {
1153
+ const cookies = text("cookies");
1154
+ return cookies === null ? null : { kind, instanceId, cookies };
1155
+ }
860
1156
  if (kind === "detach") return { kind, instanceId };
861
1157
  if (kind === "evaluate") {
862
1158
  const js = text("js");
@@ -1006,6 +1302,7 @@ function isSameDocumentRequest(requested, url) {
1006
1302
  }
1007
1303
  }
1008
1304
  var webViewAutomationHelpers = {
1305
+ cookieOperations: createCookieOperations,
1009
1306
  readRequest: readWebViewHostRequest,
1010
1307
  withoutFramingRefusals,
1011
1308
  withFrameEmbedderHeaders,
@@ -1030,6 +1327,7 @@ async function automateWebViewFrames(context, names, helpers) {
1030
1327
  const browser = context.browser();
1031
1328
  if (!browser) throw new Error("webview automation needs the browser behind its context");
1032
1329
  const browserSession = await browser.newBrowserCDPSession();
1330
+ const cookieOperations = helpers.cookieOperations();
1033
1331
  let nextNetworkDecision = 0;
1034
1332
  const byFrameId = /* @__PURE__ */ new Map();
1035
1333
  const byInstance = /* @__PURE__ */ new Map();
@@ -1210,7 +1508,7 @@ async function automateWebViewFrames(context, names, helpers) {
1210
1508
  return answer;
1211
1509
  };
1212
1510
  await browserSession.send("Fetch.enable", {
1213
- patterns: [{ urlPattern: "*", resourceType: "Document", requestStage: "Request" }]
1511
+ patterns: [{ urlPattern: "*", requestStage: "Request" }]
1214
1512
  });
1215
1513
  browserSession.on("Fetch.requestPaused", (event) => {
1216
1514
  const requestId = event.requestId;
@@ -1220,6 +1518,10 @@ async function automateWebViewFrames(context, names, helpers) {
1220
1518
  });
1221
1519
  const requestStage = event.responseStatusCode === void 0 && event.responseErrorReason === void 0;
1222
1520
  if (!bound) {
1521
+ if (requestStage && event.resourceType !== "Document") {
1522
+ void settle("Fetch.continueRequest", {});
1523
+ return;
1524
+ }
1223
1525
  if (requestStage) {
1224
1526
  void isPageFrame(frameId).catch(() => true).then(
1225
1527
  (pageFrame) => settle("Fetch.continueRequest", { interceptResponse: !pageFrame })
@@ -1238,6 +1540,20 @@ async function automateWebViewFrames(context, names, helpers) {
1238
1540
  void fulfill(requestId, event, helpers.withFrameEmbedderHeaders(received2));
1239
1541
  return;
1240
1542
  }
1543
+ if (requestStage && bound.navigation) {
1544
+ const operations = cookieOperations;
1545
+ const config = JSON.parse(bound.config);
1546
+ const cookies = JSON.parse(config.webKit.cookies || "[]");
1547
+ const store = operations.restore(cookies);
1548
+ const cookie = Object.values(operations.getCookies(store, event.request.url)).map((entry) => `${entry.name}=${entry.value}`).join("; ");
1549
+ const headers = Object.entries(event.request.headers).filter(([name2]) => name2.toLowerCase() !== "cookie").map(([name2, value]) => ({ name: name2, value: String(value) }));
1550
+ if (cookie) headers.push({ name: "Cookie", value: cookie });
1551
+ void settle("Fetch.continueRequest", {
1552
+ headers,
1553
+ interceptResponse: event.resourceType === "Document"
1554
+ });
1555
+ return;
1556
+ }
1241
1557
  if (requestStage) {
1242
1558
  const load = bound.load;
1243
1559
  if (load && helpers.isSameDocument(event.request.url, load.url)) {
@@ -1367,6 +1683,15 @@ async function automateWebViewFrames(context, names, helpers) {
1367
1683
  }
1368
1684
  const request = helpers.readRequest(value);
1369
1685
  if (!request) return;
1686
+ if (request.kind === "cookies") {
1687
+ const bound2 = byInstance.get(request.instanceId);
1688
+ if (bound2?.navigation) {
1689
+ const config2 = JSON.parse(bound2.config);
1690
+ config2.webKit.cookies = request.cookies;
1691
+ bound2.config = JSON.stringify(config2);
1692
+ }
1693
+ return;
1694
+ }
1370
1695
  if (request.kind === "navigationDecision") {
1371
1696
  const bound2 = byInstance.get(request.instanceId);
1372
1697
  const decide = bound2?.decisions.get(request.requestId);
@@ -1551,7 +1876,31 @@ var WEBVIEW_FRAME_BRIDGE_SOURCE = `function (config) {
1551
1876
  crossOriginToSim = window.top.location.href === undefined;
1552
1877
  } catch (_) {}
1553
1878
  var cookieProperty = Object.getOwnPropertyDescriptor(Document.prototype, 'cookie');
1554
- if (crossOriginToSim && window.isSecureContext && cookieProperty) {
1879
+ if (webKit) {
1880
+ var cookieOperations = ${webKitCookieOperationsSource};
1881
+ var pageCookies = cookieOperations.restore(JSON.parse(webKit.cookies || '[]'));
1882
+ window.__peachUpdateWebKitCookies = function(cookies) {
1883
+ pageCookies = cookieOperations.restore(cookies);
1884
+ window.parent.postMessage({ __sootsimWebViewKind: 'webKitCookieSnapshot', cookies: JSON.stringify(cookies) }, '*');
1885
+ };
1886
+ Object.defineProperty(Document.prototype, 'cookie', {
1887
+ configurable: true,
1888
+ get: function() {
1889
+ return Object.values(cookieOperations.getCookies(pageCookies, documentUrl)).filter(function(cookie) { return !cookie.httpOnly; }).map(function(cookie) { return cookie.name + '=' + cookie.value; }).join('; ');
1890
+ },
1891
+ set: function(value) {
1892
+ var line = String(value);
1893
+ var cookie = cookieOperations.cookieFromResponse(line);
1894
+ cookie.httpOnly = false;
1895
+ var key = cookieOperations.cookieKey({ name: cookie.name, domain: cookie.domain || new URL(documentUrl).hostname, path: cookie.path || '/' });
1896
+ if (pageCookies.get(key) && pageCookies.get(key).httpOnly) return;
1897
+ cookieOperations.setCookie(pageCookies, documentUrl, cookie);
1898
+ window.parent.postMessage({ __sootsimWebViewKind: 'webKitCookie', url: documentUrl, value: line }, '*');
1899
+ }
1900
+ });
1901
+ }
1902
+
1903
+ if (!webKit && crossOriginToSim && window.isSecureContext && cookieProperty) {
1555
1904
  Object.defineProperty(Document.prototype, 'cookie', {
1556
1905
  configurable: true,
1557
1906
  enumerable: cookieProperty.enumerable,
@@ -2095,13 +2444,21 @@ var WEBVIEW_FRAME_BRIDGE_SOURCE = `function (config) {
2095
2444
  if (payload.__sootsimWebViewKind === 'evaluateJavaScript') {
2096
2445
  event.stopImmediatePropagation();
2097
2446
  var result;
2447
+ window[Symbol.for('peach.webkitException')] = {};
2098
2448
  try {
2099
2449
  var value = (0, eval)(String(payload.js || ''));
2100
2450
  try { result = value === undefined ? { undefined: true } : { value: nativeValue(value, []) }; }
2101
2451
  catch (_) { result = { errorCode: 5, errorInfo: { NSLocalizedDescription: 'JavaScript execution returned a result of an unsupported type' } }; }
2102
2452
  } catch (error) {
2103
- // DEGRADED(PEACH-SWIFT-WEBKIT-EXCEPTION-METADATA): native exception line/column remain unbuilt.
2104
- result = { errorCode: 4, errorInfo: { NSLocalizedDescription: 'A JavaScript exception occurred', WKJavaScriptExceptionMessage: String(error), WKJavaScriptExceptionSourceURL: String(document.baseURI) } };
2453
+ var metadata = window[Symbol.for('peach.webkitException')] || {};
2454
+ var location = metadata.value === error && metadata.thrown ? metadata.thrown : error instanceof SyntaxError ? metadata.thrown : error instanceof ReferenceError ? metadata.read : metadata.call;
2455
+ var message = String(error);
2456
+ if (error instanceof ReferenceError && metadata.read) message = "ReferenceError: Can't find variable: " + metadata.read.name;
2457
+ if (error instanceof TypeError && metadata.call && metadata.call.property && metadata.receiver != null && !Reflect.has(Object(metadata.receiver), metadata.call.property)) {
2458
+ message = "TypeError: " + metadata.call.callee + " is not a function. (In '" + metadata.call.source + "', '" + metadata.call.callee + "' is undefined)";
2459
+ }
2460
+ result = { errorCode: 4, errorInfo: { NSLocalizedDescription: 'A JavaScript exception occurred', WKJavaScriptExceptionMessage: message, WKJavaScriptExceptionSourceURL: String(document.baseURI) } };
2461
+ if (location) { result.errorInfo.WKJavaScriptExceptionLineNumber = location.line; result.errorInfo.WKJavaScriptExceptionColumnNumber = location.column; }
2105
2462
  }
2106
2463
  result.title = String(document.title || '');
2107
2464
  window.parent.postMessage({ __sootsimWebViewKind: 'webKitEvaluation', requestId: payload.requestId, result: result }, '*');
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/host/fetch-proxy-overrides.ts
4
4
  var FETCH_PROXY_NATIVE_USER_AGENT_HEADER = "x-sootsim-native-user-agent";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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/menu.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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;
package/dist-lib/menu.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/public-brand.ts
4
4
  var name = "Peach";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/is-record.ts
4
4
  function isRecord(value) {
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/metro-production-bundle.ts
4
4
  var RNXSIM_METRO_MODULE_PATHS_PREFIX = "globalThis.__sootsimModulePaths=";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/native-app-identity.ts
4
4
  var NATIVE_APP_IDENTITY_PREFIX = "globalThis.__sootsimNativeAppIdentity=";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/native-firebase-metadata.ts
4
4
  var PREFIX = "globalThis.__peachNativeFirebaseConfig=";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/plist.ts
4
4
  import plist from "plist";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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;
package/dist-lib/sdk.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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);
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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;
@@ -44049,8 +44049,13 @@ var init_permissions = __esm({
44049
44049
  function parseFlowFile(content) {
44050
44050
  let frontmatter = {};
44051
44051
  let body = content;
44052
- const normalizeSteps = (steps2) => {
44053
- return Array.isArray(steps2) ? steps2 : [];
44052
+ const normalizeSteps = (steps2, metadata = frontmatter) => {
44053
+ if (!Array.isArray(steps2)) return [];
44054
+ return [
44055
+ ...Array.isArray(metadata.onFlowStart) ? [{ onFlowStart: metadata.onFlowStart }] : [],
44056
+ ...steps2,
44057
+ ...Array.isArray(metadata.onFlowComplete) ? [{ onFlowComplete: metadata.onFlowComplete }] : []
44058
+ ];
44054
44059
  };
44055
44060
  const fmMatch = content.match(/^---\n([\s\S]*?)\n---\n?/);
44056
44061
  if (fmMatch) {
@@ -44071,7 +44076,7 @@ function parseFlowFile(content) {
44071
44076
  const st = docs[docs.length - 1].toJS();
44072
44077
  return {
44073
44078
  frontmatter: fm && typeof fm === "object" ? fm : {},
44074
- steps: normalizeSteps(st)
44079
+ steps: normalizeSteps(st, fm ?? {})
44075
44080
  };
44076
44081
  }
44077
44082
  } catch (e) {
@@ -44791,19 +44796,15 @@ function normalizeBareStringStep(verb) {
44791
44796
  }
44792
44797
  }
44793
44798
  function parseFlowSteps(content) {
44794
- const parts = content.split(/^---$/m);
44795
- const candidate = parts.length > 1 ? parts[parts.length - 1] : content;
44796
- const parsed2 = import_yaml3.default.parse(candidate);
44797
- return Array.isArray(parsed2) ? parsed2 : [];
44799
+ return parseFlowFile(content).steps;
44798
44800
  }
44799
- var fs28, path31, import_devices4, import_yaml3, import_proof_frame, DEFAULT_TIMEOUT, ASSERTION_LOOKUP_MS, FLOW_TIMEOUT_SCALE, scaledTimeout, MAESTRO_SELECTOR_KEYS, SELECTOR_FILTER_KEYS, UNSUPPORTED_SELECTOR_KEYS, ACCESSIBILITY_SELECTOR_KEYS, ACCESSIBILITY_TRAIT_FILTERS, MAESTRO_PERMISSION_KINDS, MAESTRO_PERMISSION_STATUS, SootSimBridgeFlowRunner;
44801
+ var fs28, path31, import_devices4, import_proof_frame, DEFAULT_TIMEOUT, ASSERTION_LOOKUP_MS, FLOW_TIMEOUT_SCALE, scaledTimeout, MAESTRO_SELECTOR_KEYS, SELECTOR_FILTER_KEYS, UNSUPPORTED_SELECTOR_KEYS, ACCESSIBILITY_SELECTOR_KEYS, ACCESSIBILITY_TRAIT_FILTERS, MAESTRO_PERMISSION_KINDS, MAESTRO_PERMISSION_STATUS, SootSimBridgeFlowRunner;
44800
44802
  var init_bridge_flow_runner = __esm({
44801
44803
  "cli/bridge-flow-runner.ts"() {
44802
44804
  "use strict";
44803
44805
  fs28 = __toESM(require("fs"), 1);
44804
44806
  path31 = __toESM(require("path"), 1);
44805
44807
  import_devices4 = require("peach-engine/settings/devices");
44806
- import_yaml3 = __toESM(require("yaml"), 1);
44807
44808
  import_proof_frame = __toESM(require_proof_frame(), 1);
44808
44809
  init_flow_timeout_scale();
44809
44810
  init_frame_compose();
@@ -47189,7 +47190,7 @@ var skill3 = {
47189
47190
  async execute(params, context) {
47190
47191
  const fs30 = await import("fs");
47191
47192
  const path33 = await import("path");
47192
- const yaml3 = await import("yaml");
47193
+ const yaml2 = await import("yaml");
47193
47194
  const { DEFAULT_SOOTSIM_BRIDGE_PORT: DEFAULT_SOOTSIM_BRIDGE_PORT3 } = await Promise.resolve().then(() => (init_bridge_constants(), bridge_constants_exports));
47194
47195
  const { SootSimBridgeHost: SootSimBridgeHost2 } = await Promise.resolve().then(() => (init_bridge_host(), bridge_host_exports));
47195
47196
  const { createBridge: createBridge2 } = await Promise.resolve().then(() => (init_ws_bridge(), ws_bridge_exports));
@@ -47201,7 +47202,7 @@ var skill3 = {
47201
47202
  const flowContent = fs30.readFileSync(params.flowPath, "utf8");
47202
47203
  const fmMatch = flowContent.match(/^---\n([\s\S]*?)\n---\n?/);
47203
47204
  const stepsBody = fmMatch ? flowContent.slice(fmMatch[0].length) : flowContent;
47204
- const steps = yaml3.parse(stepsBody);
47205
+ const steps = yaml2.parse(stepsBody);
47205
47206
  const beforeIds = new Set(host2.listSims().map((sim) => sim.id));
47206
47207
  await runOpenCommand2([context.url, "--new", "--headless", "--no-describe"], {
47207
47208
  port: DEFAULT_SOOTSIM_BRIDGE_PORT3
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-compile.ts
4
4
  import { execFile as execFile2, execFileSync } from "node:child_process";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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.748 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.750 | (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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.748",
3
+ "version": "0.1.750",
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",
@@ -653,13 +653,16 @@ export function workerBootChunkPlugin(closures: WorkerBootClosure[]): Plugin {
653
653
  define: { 'import.meta.url': 'globalThis.location.href' },
654
654
  sourcemap: true,
655
655
  })
656
+ if (!transformed.map) this.error('worker transform produced no source map')
656
657
  const compact = await minify(transformed.code, {
657
658
  module: true,
658
659
  compress: { passes: 2 },
659
660
  mangle: true,
660
- sourceMap: { content: transformed.map, asObject: true },
661
+ sourceMap: { content: JSON.stringify(transformed.map) },
661
662
  })
662
663
  if (!compact.code) this.error('worker minification produced no code')
664
+ if (typeof compact.map !== 'string')
665
+ this.error('worker minification produced no encoded source map')
663
666
  return { code: compact.code, map: compact.map }
664
667
  },
665
668
  },