peachsim 0.1.2762 → 0.1.2763
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/detox/index.ts +42 -2
- package/detox/proof-observer.ts +4 -0
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +2 -2
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +5 -5
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +3 -3
- package/dist-lib/bundle-channel.cjs +31 -20
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +3 -3
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +3 -3
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +2 -2
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +7 -7
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +5 -5
- package/dist-lib/detox/index.cjs +29 -2
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/esm-chunks/{acorn-4S4QEKUH.mjs → acorn-F5OZH6N2.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-57UDPKKC.mjs → chunk-37G7S5BN.mjs} +6 -6
- package/dist-lib/esm-chunks/{chunk-JLJPYBC6.mjs → chunk-4I7X4Q2J.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-I4C62SOU.mjs → chunk-4NB3ZWPF.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-EDTW6FEK.mjs → chunk-5NWM7OGS.mjs} +32 -23
- package/dist-lib/esm-chunks/{chunk-GHCZN43N.mjs → chunk-6NZYYIE4.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-YS66XSMK.mjs → chunk-7AYY6CRA.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-IZ54ZJUN.mjs → chunk-AJOX5HGX.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-4ZZTNTW6.mjs → chunk-AL7BIGLA.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-HYSM5JUW.mjs → chunk-BGIRP6DM.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-45RVUCLW.mjs → chunk-ELSAYCTZ.mjs} +2 -2
- package/dist-lib/esm-chunks/{chunk-XC7K5JYJ.mjs → chunk-EYQZ5KGJ.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-JKFD7KTP.mjs → chunk-G6MDSHBX.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-AE56UCLG.mjs → chunk-HC4WSOMH.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-T5V72EHF.mjs → chunk-N4KZDMQX.mjs} +6 -6
- package/dist-lib/esm-chunks/{chunk-XHAMWSZP.mjs → chunk-OPZ7RERJ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-HB43KEJO.mjs → chunk-PSNSD7DC.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-LI5BVGTV.mjs → chunk-Q3EPHFRJ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-MALIBFAO.mjs → chunk-R667YWM6.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-EXI2LBO5.mjs → chunk-RP3ICLF6.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-4QOZJQSQ.mjs → chunk-S4UUSEDM.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-QYIAL2FW.mjs → chunk-SQLNV5Z5.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-MLIC3NR6.mjs → chunk-WDF6IPVE.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-TCCCICYM.mjs → chunk-WYO5PEXM.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-JE6KHJMR.mjs → chunk-YRWDESSV.mjs} +1 -1
- package/dist-lib/esm-chunks/{metro-layout-parser-C245BQMH.mjs → metro-layout-parser-64YNWDMX.mjs} +3 -3
- package/dist-lib/esm-chunks/{swift-package-prebuilt-3CYV5L3E.mjs → swift-package-prebuilt-FFPD2HHX.mjs} +12 -12
- package/dist-lib/esm-chunks/{swift-sdk-app-module-EIWWG2YJ.mjs → swift-sdk-app-module-DRJFIHVR.mjs} +25 -23
- package/dist-lib/esm-chunks/{swift-sdk-image-PTMGH6L6.mjs → swift-sdk-image-WZZWIZNS.mjs} +16 -16
- package/dist-lib/esm-chunks/{swift-sdk-image-producer-U5TYUU2Q.mjs → swift-sdk-image-producer-M2ECVU62.mjs} +5 -5
- package/dist-lib/expo-swift-bundle.cjs +31 -20
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +7 -7
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +31 -20
- package/dist-lib/host/fetch-proxy-handler.cjs +3 -3
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +3 -3
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +3 -3
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +4 -4
- package/dist-lib/native-app-identity-project.cjs +1 -1
- package/dist-lib/native-app-identity-project.mjs +15 -15
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +6 -6
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +3 -3
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +2 -2
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +3 -3
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +85 -85
- package/dist-lib/public-origins-lib.json +64 -64
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +2 -2
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +8 -8
- package/dist-lib/skills.cjs +31 -20
- package/dist-lib/swift-compile.cjs +28 -17
- package/dist-lib/swift-compile.mjs +12 -12
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +3 -3
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +6 -6
- package/dist-lib/swift-svg-raster.cjs +1 -1
- package/dist-lib/swift-svg-raster.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
- package/dist-lib/vendor/acorn.cjs +1 -1
- package/dist-lib/vendor/magic-string.cjs +1 -1
- package/dist-lib/vendor/stream-json.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
- package/dist-lib/vendor/sucrase.cjs +1 -1
- package/dist-lib/vendor/terser.cjs +1 -1
- package/dist-lib/vendor/valibot.cjs +1 -1
- package/dist-lib/vendor/ws.cjs +1 -1
- package/dist-lib/vendor/zod.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +3 -3
- package/dist-types/packages/peach-engine/src/engine/native-node-queries.d.ts +2 -2
- package/dist-types/packages/peach-engine/src/engine/native-scene-program.d.ts +1 -2
- package/dist-types/packages/peach-engine/src/engine/scroll-physics-native.d.ts +0 -1
- package/dist-types/packages/peach-engine/src/render-worker/compositor-runtime/presentation-book-host.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/live-frame-mirror.d.ts +2 -4
- package/dist-types/packages/peach-engine/src/render-worker/scene-commit-ring.d.ts +9 -3
- package/package.json +1 -1
- package/src/one-native-controls-package.ts +14 -1
- package/src/swift-compile.ts +11 -1
- package/src/swift-guest-compile.ts +9 -7
- package/src/swift-sdk-app-module.ts +9 -7
- package/src/swiftSdkLinkContract.ts +1 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ImageFrameSource } from './image-pixel-contract.d.ts';
|
|
2
|
+
import { type SceneCommitRing } from './scene-commit-ring.d.ts';
|
|
2
3
|
import type { WebGpuWireFromRenderer, WebGpuWireToRenderer } from './webgpu-wire-protocol.d.ts';
|
|
3
4
|
export interface RemoteLiveFrameIdentity {
|
|
4
5
|
sessionId: string;
|
|
@@ -15,10 +16,7 @@ export type LiveFrameMirrorEnvelope = {
|
|
|
15
16
|
export interface TenantLiveFramePort {
|
|
16
17
|
port: MessagePort;
|
|
17
18
|
presented: SharedArrayBuffer | null;
|
|
18
|
-
sceneRing?:
|
|
19
|
-
memory: WebAssembly.Memory;
|
|
20
|
-
epoch: number;
|
|
21
|
-
};
|
|
19
|
+
sceneRing?: SceneCommitRing;
|
|
22
20
|
}
|
|
23
21
|
export declare function readTenantLiveFramePort(message: object): TenantLiveFramePort | null;
|
|
24
22
|
export type LiveFramePortMessage = WebGpuWireToRenderer | {
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { FrameCopyBoundary } from '../../../peach-globals/src/frameBreakdownContract.d.ts';
|
|
2
|
-
export
|
|
2
|
+
export interface SceneCommitRing {
|
|
3
|
+
memory: WebAssembly.Memory;
|
|
4
|
+
address: number;
|
|
5
|
+
epoch: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function readSceneCommitRing(value: unknown): SceneCommitRing | undefined;
|
|
8
|
+
export declare function allocateSceneCommitRing(epoch: number): SceneCommitRing | undefined;
|
|
3
9
|
export declare class SceneCommitWriter {
|
|
4
10
|
private readonly table;
|
|
5
11
|
private readonly reservePacket;
|
|
@@ -10,7 +16,7 @@ export declare class SceneCommitWriter {
|
|
|
10
16
|
private released;
|
|
11
17
|
private reserved;
|
|
12
18
|
readonly slot: number;
|
|
13
|
-
constructor(
|
|
19
|
+
constructor(ring: SceneCommitRing);
|
|
14
20
|
reserve(): number;
|
|
15
21
|
publish(size: number): number;
|
|
16
22
|
waitForSpace(): Promise<void> | undefined;
|
|
@@ -31,7 +37,7 @@ export declare class SceneCommitReader {
|
|
|
31
37
|
private readonly pull;
|
|
32
38
|
private readonly discard;
|
|
33
39
|
private readonly boundary;
|
|
34
|
-
constructor(
|
|
40
|
+
constructor(ring: SceneCommitRing, realm: 'compositor' | 'shell');
|
|
35
41
|
consume(packet: RingScenePacket, apply: () => void): void;
|
|
36
42
|
}
|
|
37
43
|
export {};
|
package/package.json
CHANGED
|
@@ -2231,6 +2231,11 @@ export async function stageOneNativeControlsRelease(
|
|
|
2231
2231
|
metadata: SwiftEntryModuleArgs
|
|
2232
2232
|
files: Map<string, Blob>
|
|
2233
2233
|
oneSDKModules?: string[]
|
|
2234
|
+
appLink?: {
|
|
2235
|
+
bytes: Buffer
|
|
2236
|
+
sdkSha256: string
|
|
2237
|
+
rawBindingSha256: string
|
|
2238
|
+
}
|
|
2234
2239
|
}> {
|
|
2235
2240
|
const {
|
|
2236
2241
|
packagePath,
|
|
@@ -2258,5 +2263,13 @@ export async function stageOneNativeControlsRelease(
|
|
|
2258
2263
|
ONE_NATIVE_CONTROLS_PACKAGE,
|
|
2259
2264
|
metadata,
|
|
2260
2265
|
)
|
|
2261
|
-
|
|
2266
|
+
const image = projectFor(packagePath).artifacts.find(
|
|
2267
|
+
({ hash }) => hash === metadata.hash,
|
|
2268
|
+
)?.sdk
|
|
2269
|
+
const appLink = image?.binding.appLink && {
|
|
2270
|
+
bytes: image.binding.appLink,
|
|
2271
|
+
sdkSha256: image.sha256,
|
|
2272
|
+
rawBindingSha256: image.binding.sha256,
|
|
2273
|
+
}
|
|
2274
|
+
return { packagePath, metadataPath, metadata, files, oneSDKModules, appLink }
|
|
2262
2275
|
}
|
package/src/swift-compile.ts
CHANGED
|
@@ -5871,10 +5871,16 @@ function readCompiledArtifact(
|
|
|
5871
5871
|
const liveSlots = readFileSync(path.join(directory, 'sdk-live-slots.bin'))
|
|
5872
5872
|
if (createHash('sha256').update(liveSlots).digest('hex') !== image.liveSlots)
|
|
5873
5873
|
return null
|
|
5874
|
+
const appLink =
|
|
5875
|
+
typeof image.appLink === 'string'
|
|
5876
|
+
? readFileSync(path.join(directory, 'app-link.json.gz'))
|
|
5877
|
+
: undefined
|
|
5878
|
+
if (appLink && createHash('sha256').update(appLink).digest('hex') !== image.appLink)
|
|
5879
|
+
return null
|
|
5874
5880
|
const sdk: SwiftSdkModuleAsset = {
|
|
5875
5881
|
key: image.key,
|
|
5876
5882
|
sha256: image.sha256,
|
|
5877
|
-
binding: { bytes: binding, sha256: image.binding, liveSlots },
|
|
5883
|
+
binding: { bytes: binding, sha256: image.binding, liveSlots, appLink },
|
|
5878
5884
|
}
|
|
5879
5885
|
return { hash, bytes, icu: { sha256: receipt.icu, gzip }, sdk }
|
|
5880
5886
|
} catch (error) {
|
|
@@ -5892,6 +5898,8 @@ function saveCompiledArtifact(root: string, artifact: SwiftCompileArtifact): voi
|
|
|
5892
5898
|
mkdirSync(directory, { recursive: true })
|
|
5893
5899
|
const pending = mkdtempSync(path.join(root, '.artifact-'))
|
|
5894
5900
|
try {
|
|
5901
|
+
const appLink = artifact.sdk?.binding.appLink
|
|
5902
|
+
if (appLink) writeFileSync(path.join(pending, 'app-link.json.gz'), appLink)
|
|
5895
5903
|
writeFileSync(path.join(pending, 'app.wasm'), artifact.bytes)
|
|
5896
5904
|
writeFileSync(path.join(pending, 'icu.gz'), artifact.icu.gzip)
|
|
5897
5905
|
if (artifact.sdk) {
|
|
@@ -5911,6 +5919,7 @@ function saveCompiledArtifact(root: string, artifact: SwiftCompileArtifact): voi
|
|
|
5911
5919
|
key: artifact.sdk.key,
|
|
5912
5920
|
sha256: artifact.sdk.sha256,
|
|
5913
5921
|
binding: artifact.sdk.binding.sha256,
|
|
5922
|
+
appLink: appLink && createHash('sha256').update(appLink).digest('hex'),
|
|
5914
5923
|
liveSlots: createHash('sha256')
|
|
5915
5924
|
.update(artifact.sdk.binding.liveSlots)
|
|
5916
5925
|
.digest('hex'),
|
|
@@ -5921,6 +5930,7 @@ function saveCompiledArtifact(root: string, artifact: SwiftCompileArtifact): voi
|
|
|
5921
5930
|
// both content digests unless they contain this exact verified result.
|
|
5922
5931
|
const outputs = ['app.wasm', 'icu.gz']
|
|
5923
5932
|
if (artifact.sdk) outputs.push('sdk-binding.bin', 'sdk-live-slots.bin')
|
|
5933
|
+
if (appLink) outputs.push('app-link.json.gz')
|
|
5924
5934
|
for (const file of [...outputs, 'artifact.json']) {
|
|
5925
5935
|
renameSync(path.join(pending, file), path.join(directory, file))
|
|
5926
5936
|
}
|
|
@@ -717,16 +717,18 @@ export async function compileGuestLink(options: {
|
|
|
717
717
|
swiftAppModuleThunkSection(finalized.wasm),
|
|
718
718
|
]),
|
|
719
719
|
)
|
|
720
|
-
if (
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
720
|
+
if (project) return binding
|
|
721
|
+
const replayDirectory = path.join(options.buildDirectory, '.peach-sdk-module')
|
|
722
|
+
mkdirSync(replayDirectory, { recursive: true })
|
|
723
|
+
const appLink = writeSwiftSdkAppLink(
|
|
724
|
+
path.join(replayDirectory, 'app-link.json.gz'),
|
|
725
|
+
{
|
|
724
726
|
linkage,
|
|
725
727
|
usage,
|
|
726
728
|
scopedLookups: true,
|
|
727
|
-
}
|
|
728
|
-
|
|
729
|
-
return binding
|
|
729
|
+
},
|
|
730
|
+
)
|
|
731
|
+
return { ...binding, appLink }
|
|
730
732
|
}
|
|
731
733
|
} finally {
|
|
732
734
|
if (result.finalLinkDone) await Promise.allSettled([result.finalLinkDone])
|
|
@@ -137,13 +137,13 @@ export async function buildSwiftAppModule(options: {
|
|
|
137
137
|
throw error
|
|
138
138
|
}
|
|
139
139
|
await lowerPromise
|
|
140
|
-
if (!project)
|
|
141
|
-
writeSwiftSdkAppLink(path.join(work, 'app-link.json.gz'), {
|
|
142
|
-
linkage: link.linkage,
|
|
143
|
-
usage,
|
|
144
|
-
})
|
|
145
140
|
finishSwiftAppModuleFile(options.output)
|
|
146
|
-
return binding
|
|
141
|
+
if (project) return binding
|
|
142
|
+
const appLink = writeSwiftSdkAppLink(path.join(work, 'app-link.json.gz'), {
|
|
143
|
+
linkage: link.linkage,
|
|
144
|
+
usage,
|
|
145
|
+
})
|
|
146
|
+
return { ...binding, appLink }
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
export function swiftAppModuleThunkSection(
|
|
@@ -1301,7 +1301,9 @@ const SCANNED = new Set([
|
|
|
1301
1301
|
const RUN_GAP = 64
|
|
1302
1302
|
|
|
1303
1303
|
export function writeSwiftSdkAppLink(file: string, link: SwiftSdkAppLink) {
|
|
1304
|
-
|
|
1304
|
+
const bytes = gzipSync(JSON.stringify(link), { level: 1 })
|
|
1305
|
+
writeFileSync(file, bytes)
|
|
1306
|
+
return bytes
|
|
1305
1307
|
}
|
|
1306
1308
|
|
|
1307
1309
|
export function readSwiftSdkAppLink(file: string): SwiftSdkAppLink {
|