peachsim 0.1.2247 → 0.1.2248

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 (94) hide show
  1. package/cli/bin.ts +5 -0
  2. package/cli/cloud-dispatch.ts +2 -0
  3. package/cli/commands/control.ts +2 -2
  4. package/cli/commands/coverage-swift.ts +3 -3
  5. package/cli/commands/shell-url.ts +6 -0
  6. package/cli/commands/skills.ts +6 -3
  7. package/dist-lib/agent-daemon-client.cjs +1 -29
  8. package/dist-lib/agent-events.cjs +1 -1
  9. package/dist-lib/attached-projects.cjs +1 -10
  10. package/dist-lib/auth/shared-session.cjs +1 -1
  11. package/dist-lib/backend-origin.cjs +1 -1
  12. package/dist-lib/beta.cjs +1 -1
  13. package/dist-lib/beta.mjs +1 -1
  14. package/dist-lib/bridge-constants.cjs +1 -1
  15. package/dist-lib/bridge-contract-input.cjs +1 -1
  16. package/dist-lib/bridge-contract-input.mjs +1 -1
  17. package/dist-lib/bridge-contract.cjs +1 -1
  18. package/dist-lib/bridge-contract.mjs +1 -1
  19. package/dist-lib/bundle-channel.cjs +4161 -4502
  20. package/dist-lib/capture-contract.cjs +1 -1
  21. package/dist-lib/capture-contract.mjs +1 -1
  22. package/dist-lib/cloud-contract.cjs +1 -1
  23. package/dist-lib/cloud-contract.mjs +1 -1
  24. package/dist-lib/cloud-test-args.cjs +1 -1
  25. package/dist-lib/cloud-test-args.mjs +1 -1
  26. package/dist-lib/cloud.cjs +1 -1
  27. package/dist-lib/cloud.mjs +1 -1
  28. package/dist-lib/config.cjs +1 -1
  29. package/dist-lib/config.mjs +1 -1
  30. package/dist-lib/detox/index.cjs +2 -309
  31. package/dist-lib/dev-bundle-resolution.cjs +1 -12
  32. package/dist-lib/expo-swift-bundle.cjs +3440 -3835
  33. package/dist-lib/expo-swift-metadata.cjs +1 -1
  34. package/dist-lib/expo-swift-metadata.mjs +1 -1
  35. package/dist-lib/home-paths.cjs +1 -1
  36. package/dist-lib/host/bridge-host.cjs +4237 -4653
  37. package/dist-lib/host/fetch-proxy-handler.cjs +97 -713
  38. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  39. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  40. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  41. package/dist-lib/host/websocket-proxy.cjs +1 -1
  42. package/dist-lib/index.cjs +639 -1110
  43. package/dist-lib/jump-to-source-babel.cjs +1 -1
  44. package/dist-lib/jump-to-source-native.cjs +1 -1
  45. package/dist-lib/kotlin-host.cjs +3 -24
  46. package/dist-lib/menu.cjs +1 -1
  47. package/dist-lib/menu.mjs +1 -1
  48. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  49. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  50. package/dist-lib/metro-production-bundle.cjs +1 -10
  51. package/dist-lib/metro-production-bundle.mjs +1 -12
  52. package/dist-lib/metro.cjs +546 -975
  53. package/dist-lib/native-app-identity-project.cjs +299 -592
  54. package/dist-lib/native-app-identity-project.mjs +11 -232
  55. package/dist-lib/native-app-identity.cjs +1 -1
  56. package/dist-lib/native-app-identity.mjs +1 -1
  57. package/dist-lib/native-firebase-metadata.cjs +1 -1
  58. package/dist-lib/native-firebase-metadata.mjs +1 -1
  59. package/dist-lib/pdfium-raster.cjs +1 -1
  60. package/dist-lib/pdfium-raster.mjs +1 -1
  61. package/dist-lib/plist.cjs +1 -1
  62. package/dist-lib/plist.mjs +1 -1
  63. package/dist-lib/profiles.cjs +1 -1
  64. package/dist-lib/public-brand.cjs +1 -1
  65. package/dist-lib/public-origins-lib-esm.json +28 -96
  66. package/dist-lib/public-origins-lib.json +172 -1058
  67. package/dist-lib/react-native-host-modules.cjs +1 -1
  68. package/dist-lib/react-native-host-modules.mjs +1 -1
  69. package/dist-lib/reap-browser.cjs +1 -1
  70. package/dist-lib/scripts/dev-server-scanner.cjs +1 -34
  71. package/dist-lib/sdk.cjs +1 -1
  72. package/dist-lib/sdk.mjs +1 -1
  73. package/dist-lib/skills.cjs +4777 -5307
  74. package/dist-lib/swift-compile.cjs +1054 -1085
  75. package/dist-lib/swift-compile.mjs +2 -28
  76. package/dist-lib/swift-package.cjs +1 -1
  77. package/dist-lib/swift-package.mjs +1 -1
  78. package/dist-lib/swift-submit.cjs +1 -1
  79. package/dist-lib/swift-submit.mjs +1 -1
  80. package/dist-lib/swift-toolchain.cjs +1 -1
  81. package/dist-lib/swift.cjs +1 -1
  82. package/dist-lib/vite-swift.cjs +1425 -1639
  83. package/dist-lib/vite.cjs +173 -763
  84. package/dist-lib/worklet-executable.cjs +1 -1
  85. package/dist-lib/worklet-executable.mjs +1 -1
  86. package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +3 -0
  87. package/dist-types/packages/peach-engine/src/settings/duo-fold-bus.d.ts +10 -2
  88. package/kotlin/sdk.tar.gz +0 -0
  89. package/package.json +1 -1
  90. package/runtime-companion.json +1 -1
  91. package/src/kotlin-module.ts +3 -3
  92. package/src/swift-coverage/provenance.ts +4 -4
  93. package/src/swift-objc-sdk.ts +34 -21
  94. package/src/swift-objc-standin.ts +7 -7
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2247 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2248 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2247 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2248 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/worklet-executable.ts
4
4
  import { parse } from "acorn";
@@ -7,6 +7,7 @@ export declare const SCENE_I32_STRIDE = 8;
7
7
  export declare const SCENE_F64_STRIDE = 100;
8
8
  export declare const SCENE_F32_STRIDE = 20;
9
9
  export declare const SCENE_MAX_TRANSFORM_OPS = 6;
10
+ export declare function transformListBounded(transform: readonly unknown[]): boolean;
10
11
  export declare const AUTO_RETAINED_MAX_LAYOUT_AREA = 400000;
11
12
  export declare const SCENE_I_FIRST_CHILD = 4;
12
13
  export declare const SCENE_I_NEXT_SIBLING = 5;
@@ -259,6 +260,7 @@ export interface SceneNativeBinding {
259
260
  _peach_frame_portals(surface: number, count: number, top: number): number;
260
261
  _peach_frame_local_roots(surface: number, count: number): number;
261
262
  _peach_portal_end(slot: number): void;
263
+ _peach_frame_hoist_host(slot: number, host: number): void;
262
264
  _peach_portal_hosted(host: number, count: number): number;
263
265
  _peach_portal_over_app(root: number, count: number, top: number): number;
264
266
  _peach_frame_classes(entries: number): number;
@@ -337,6 +339,7 @@ export declare class SceneTable {
337
339
  }, shape: number, fillShape: number, topWidth: number, rightWidth: number, bottomWidth: number, leftWidth: number, fill: Float32Array, top: Float32Array, right: Float32Array, bottom: Float32Array, left: Float32Array): void;
338
340
  writePropFlags(slot: number, propFlags: number): void;
339
341
  writeHoistFlag(slot: number, flag: number, on: boolean): void;
342
+ writeHoistHost(slot: number, hostSlot: number): void;
340
343
  presentationStyleBacked(slot: number): boolean;
341
344
  resizePaintsOwnInkOnly(slot: number): boolean;
342
345
  presentsBox(slot: number): boolean;
@@ -30,10 +30,11 @@ export declare function duoSweepTiming(sweep: {
30
30
  export declare function duoViewerLeg(leaving: DuoFoldRest, to: DuoFoldRest): boolean;
31
31
  export declare function duoSweepHinge(leaving: DuoFoldRest, to: DuoFoldRest, travel: number): number;
32
32
  export declare function duoRestLandscapeSide(rest: DuoFoldRest): LandscapeSide | undefined;
33
+ export type DuoFoldFace = HTMLCanvasElement | OffscreenCanvas;
33
34
  export type DuoFoldPage = {
34
35
  origin: 'closed' | 'open';
35
- image: HTMLCanvasElement;
36
- back: HTMLCanvasElement | null;
36
+ image: DuoFoldFace;
37
+ back: DuoFoldFace | null;
37
38
  keepsLayout: boolean;
38
39
  side: LandscapeSide;
39
40
  } | null;
@@ -62,6 +63,9 @@ type DuoFoldState = {
62
63
  cloak: DuoFoldCloak;
63
64
  };
64
65
  export type DuoFoldWireState = Pick<DuoFoldState, 'progress' | 'active' | 'ready' | 'rest'>;
66
+ export type DuoFoldMirrorState = Omit<DuoFoldState, 'page' | 'clock'> & {
67
+ now: number;
68
+ };
65
69
  export declare function getDuoFoldProgress(): number;
66
70
  export type DeviceHingeStatus = 'closed' | 'partiallyOpen' | 'fullyOpen';
67
71
  export declare function readDeviceHinge(): {
@@ -90,4 +94,8 @@ export declare function duoFoldPosture(progress?: number): DuoFoldPosture;
90
94
  export declare function duoFrameSampleDifference(first: ArrayLike<number>, second: ArrayLike<number>): number;
91
95
  export declare function duoFrameSampleCovered(sample: ArrayLike<number>): boolean;
92
96
  export declare function snapshotDuoFoldState(): DuoFoldWireState;
97
+ export declare function snapshotDuoFoldMirror(): {
98
+ state: DuoFoldMirrorState;
99
+ page: DuoFoldPage;
100
+ } | null;
93
101
  export {};
package/kotlin/sdk.tar.gz CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.2247",
3
+ "version": "0.1.2248",
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",
@@ -1 +1 @@
1
- {"abi":1,"sha256":"e31bca40962475bce9d44f3218ea76c4537e744dfed9849160b028389774d5ba","file":"node/cli-e31bca40962475bce9d44f3218ea76c4537e744dfed9849160b028389774d5ba.cjs"}
1
+ {"abi":1,"sha256":"0a25deb1065a15100e9bbd938d998d015318b067a7ab5d6e666a7360a2ab446a","file":"node/cli-0a25deb1065a15100e9bbd938d998d015318b067a7ab5d6e666a7360a2ab446a.cjs"}
@@ -7,7 +7,7 @@ import { IS_STANDALONE } from '../cli/standalone'
7
7
  import { rnxHomeDir } from './home-paths'
8
8
  import { isRecord } from './is-record'
9
9
 
10
- declare const __PEACH_BUNDLED_KOTLIN__: Readonly<Record<string, string>>
10
+ declare const __PEACH_BUNDLED_KOTLIN__: string
11
11
 
12
12
  let installedRoot: string | undefined
13
13
 
@@ -16,8 +16,8 @@ export function peachKotlinModuleRoot(): string {
16
16
  return path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', 'kotlin')
17
17
  if (installedRoot) return installedRoot
18
18
 
19
- const files = __PEACH_BUNDLED_KOTLIN__
20
- const digest = createHash('sha256').update(JSON.stringify(files)).digest('hex')
19
+ const files: Record<string, string> = JSON.parse(__PEACH_BUNDLED_KOTLIN__)
20
+ const digest = createHash('sha256').update(__PEACH_BUNDLED_KOTLIN__).digest('hex')
21
21
  const parent = path.join(rnxHomeDir(), 'kotlin', 'modules')
22
22
  const root = path.join(parent, digest)
23
23
  fs.mkdirSync(parent, { recursive: true })
@@ -41,8 +41,8 @@ export function swiftCoverageSourceDigests(srcDir: string): Record<string, strin
41
41
  )
42
42
  }
43
43
 
44
- declare const __SWIFT_COVERAGE_SOURCE_DIGESTS__: Record<string, string> | undefined
45
- export const swiftCoverageProvenance =
46
- typeof __SWIFT_COVERAGE_SOURCE_DIGESTS__ === 'object'
47
- ? __SWIFT_COVERAGE_SOURCE_DIGESTS__
44
+ declare const __SWIFT_COVERAGE_SOURCE_DIGESTS__: string | undefined
45
+ export const swiftCoverageProvenance: Record<string, string> =
46
+ typeof __SWIFT_COVERAGE_SOURCE_DIGESTS__ === 'string'
47
+ ? JSON.parse(__SWIFT_COVERAGE_SOURCE_DIGESTS__)
48
48
  : swiftCoverageSourceDigests(join(import.meta.dirname, '..'))
@@ -11,34 +11,47 @@ import path from 'node:path'
11
11
  import { readIosSdkTree } from './swift-objc-sdk-tree'
12
12
  import { peachsimPackageRoot } from './swift-toolchain'
13
13
 
14
- declare const __PEACH_BUNDLED_IOS_SDK__: Readonly<Record<string, string>>
14
+ declare const __PEACH_BUNDLED_IOS_SDK__: string
15
15
 
16
16
  export const IOS_SDK_TARGET = 'arm64-apple-ios16.0-simulator'
17
17
 
18
18
  const OVERLAY_PATH =
19
19
  /^usr\/lib\/swift\/([^/]+)\.swiftmodule\/arm64-apple-ios-simulator\.swiftinterface$/
20
20
 
21
- // the tree is read from the package's sdk directory, which sits beside src and
22
- // every dist directory; the standalone executable embeds it at build time.
23
- const tree =
24
- typeof __PEACH_BUNDLED_IOS_SDK__ === 'undefined'
25
- ? readIosSdkTree(path.join(peachsimPackageRoot(), 'sdk', 'ios'))
26
- : Object.entries(__PEACH_BUNDLED_IOS_SDK__).sort(([a], [b]) => (a < b ? -1 : 1))
27
-
28
- /** the clang headers and module maps, by path under the sdk root. */
29
- export const IOS_SDK_HEADERS: Record<string, string> = {}
21
+ export interface IosSdk {
22
+ /** the clang headers and module maps, by path under the sdk root. */
23
+ headers: Record<string, string>
24
+ /** the swift overlays of the clang modules above, by module name. */
25
+ overlays: Record<string, string>
26
+ }
30
27
 
31
- /** the swift overlays of the clang modules above, by module name. */
32
- export const IOS_SDK_OVERLAYS: Record<string, string> = {}
28
+ let sdk: IosSdk | undefined
33
29
 
34
- for (const [file, text] of tree) {
35
- const module = OVERLAY_PATH.exec(file)?.[1]
36
- if (module === undefined) {
37
- IOS_SDK_HEADERS[file] = text
38
- continue
30
+ // the tree is read from the package's sdk directory, which sits beside src and
31
+ // every dist directory; the standalone executable embeds it at build time. it is
32
+ // 34 MB, so only a command that compiles against it reads it.
33
+ export function iosSdk(): IosSdk {
34
+ if (sdk) return sdk
35
+ const bundled: Record<string, string> | null =
36
+ typeof __PEACH_BUNDLED_IOS_SDK__ === 'undefined'
37
+ ? null
38
+ : JSON.parse(__PEACH_BUNDLED_IOS_SDK__)
39
+ const tree = bundled
40
+ ? Object.entries(bundled).sort(([a], [b]) => (a < b ? -1 : 1))
41
+ : readIosSdkTree(path.join(peachsimPackageRoot(), 'sdk', 'ios'))
42
+ const headers: Record<string, string> = {}
43
+ const overlays: Record<string, string> = {}
44
+ for (const [file, text] of tree) {
45
+ const module = OVERLAY_PATH.exec(file)?.[1]
46
+ if (module === undefined) {
47
+ headers[file] = text
48
+ continue
49
+ }
50
+ const header = `// swift-interface-format-version: 1.0\n// swift-module-flags: -target ${IOS_SDK_TARGET} -enable-objc-interop -enable-library-evolution -module-name ${module}\n`
51
+ if (!text.startsWith(header))
52
+ throw new Error(`sdk overlay ${file} has the wrong interface header`)
53
+ overlays[module] = text.slice(header.length)
39
54
  }
40
- const header = `// swift-interface-format-version: 1.0\n// swift-module-flags: -target ${IOS_SDK_TARGET} -enable-objc-interop -enable-library-evolution -module-name ${module}\n`
41
- if (!text.startsWith(header))
42
- throw new Error(`sdk overlay ${file} has the wrong interface header`)
43
- IOS_SDK_OVERLAYS[module] = text.slice(header.length)
55
+ sdk = { headers, overlays }
56
+ return sdk
44
57
  }
@@ -21,7 +21,7 @@ import path from 'node:path'
21
21
  import { isRecord } from './is-record'
22
22
  import { swiftInterfaceWithoutBodies } from './swift-interface-bodies'
23
23
  import { swiftObjCPlatformFlags } from './swift-objc-platform'
24
- import { IOS_SDK_HEADERS, IOS_SDK_OVERLAYS, IOS_SDK_TARGET } from './swift-objc-sdk'
24
+ import { IOS_SDK_TARGET, iosSdk } from './swift-objc-sdk'
25
25
  import { clangImportNames, moduleMapTokens } from './swift-package'
26
26
  import {
27
27
  objcProtocolsInSwiftSignatures,
@@ -246,14 +246,14 @@ export function stripExternalSourceMarks(text: string): string {
246
246
  }
247
247
 
248
248
  function iosSdkEntries(): (readonly [string, string])[] {
249
- const overlays = Object.entries(IOS_SDK_OVERLAYS).map(
249
+ const overlays = Object.entries(iosSdk().overlays).map(
250
250
  ([module, text]) =>
251
251
  [
252
252
  `usr/lib/swift/${module}.swiftmodule/arm64-apple-ios-simulator.swiftinterface`,
253
253
  `// swift-interface-format-version: 1.0\n// swift-module-flags: -target ${IOS_SDK_TARGET} -enable-objc-interop -enable-library-evolution -module-name ${module}\n${text}`,
254
254
  ] as const,
255
255
  )
256
- const headers = Object.entries(IOS_SDK_HEADERS).map(
256
+ const headers = Object.entries(iosSdk().headers).map(
257
257
  ([file, text]) => [file, stripExternalSourceMarks(text)] as const,
258
258
  )
259
259
  return [...headers, ...overlays].sort(([a], [b]) => (a < b ? -1 : 1))
@@ -430,7 +430,7 @@ let sdkDeclarations: Map<string, SdkDeclaration> | null = null
430
430
  function sdkDeclaration(name: string): SdkDeclaration | null {
431
431
  if (sdkDeclarations === null) {
432
432
  const umbrellas = new Map<string, string>()
433
- for (const [file, text] of Object.entries(IOS_SDK_HEADERS)) {
433
+ for (const [file, text] of Object.entries(iosSdk().headers)) {
434
434
  const modulemap = FRAMEWORK_MODULEMAP.exec(file)
435
435
  if (!modulemap) continue
436
436
  const header = /umbrella header "([^"]+)"/.exec(text)?.[1]
@@ -441,7 +441,7 @@ function sdkDeclaration(name: string): SdkDeclaration | null {
441
441
  if (!found.has(name))
442
442
  found.set(name, { module, header: umbrellas.get(module) ?? header })
443
443
  }
444
- for (const [file, text] of Object.entries(IOS_SDK_HEADERS)) {
444
+ for (const [file, text] of Object.entries(iosSdk().headers)) {
445
445
  const location = FRAMEWORK_HEADER.exec(file)
446
446
  if (!location) continue
447
447
  const [, module, header] = location
@@ -693,7 +693,7 @@ export function objcView(
693
693
  const umbrella = `${name}/${name}.h`
694
694
  if (
695
695
  Object.hasOwn(
696
- IOS_SDK_HEADERS,
696
+ iosSdk().headers,
697
697
  `System/Library/Frameworks/${name}.framework/Headers/${name}.h`,
698
698
  )
699
699
  ) {
@@ -729,7 +729,7 @@ export function objcView(
729
729
  // standard library names, since `Swift.Duration` also searches it.
730
730
  const stubModule = (name: string, swift: boolean): boolean => {
731
731
  const sdk = Object.hasOwn(
732
- IOS_SDK_HEADERS,
732
+ iosSdk().headers,
733
733
  `System/Library/Frameworks/${name}.framework/Headers/${name}.h`,
734
734
  )
735
735
  if (!sdk && !swift) return stub(`${name}/${name}.h`, true)