peachsim 0.1.2422 → 0.1.2423

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 (105) hide show
  1. package/cli/command-agent.ts +14 -15
  2. package/cli/commands/box.ts +33 -28
  3. package/cli/commands/canvas.ts +54 -0
  4. package/cli/commands/platform.ts +28 -27
  5. package/cli/commands/preview.ts +2 -1
  6. package/cli/outbound-endpoints.ts +3 -0
  7. package/dist-lib/agent-daemon-client.cjs +1 -1
  8. package/dist-lib/agent-events.cjs +1 -1
  9. package/dist-lib/attached-projects.cjs +1 -1
  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 +6 -7
  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 +22 -1
  23. package/dist-lib/cloud-contract.mjs +20 -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 +27 -13
  31. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  32. package/dist-lib/expo-swift-bundle.cjs +4 -5
  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 +6 -7
  37. package/dist-lib/host/fetch-proxy-handler.cjs +4 -4
  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 +67 -53
  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 +1 -1
  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 -1
  51. package/dist-lib/metro-production-bundle.mjs +1 -1
  52. package/dist-lib/metro.cjs +4 -4
  53. package/dist-lib/native-app-identity-project.cjs +2 -2
  54. package/dist-lib/native-app-identity-project.mjs +2 -2
  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 +24 -24
  66. package/dist-lib/public-origins-lib.json +54 -53
  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 -1
  71. package/dist-lib/sdk.cjs +1 -1
  72. package/dist-lib/sdk.mjs +1 -1
  73. package/dist-lib/skills.cjs +148 -127
  74. package/dist-lib/swift-compile.cjs +2 -3
  75. package/dist-lib/swift-compile.mjs +2 -3
  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 +3 -4
  83. package/dist-lib/vite.cjs +4 -4
  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/ios/apps/canvas-map-data.d.ts +83 -2
  87. package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +2 -2
  88. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +9 -0
  89. package/dist-types/packages/peach-globals/src/canvasAgentContract.d.ts +8 -0
  90. package/dist-types/packages/peach-globals/src/index.d.ts +4 -2
  91. package/dist-types/packages/peach-globals/src/replayBridgeContract.d.ts +12 -0
  92. package/dist-types/packages/peach-globals/src/sceneStreamBridgeContract.d.ts +5 -1
  93. package/kotlin/sdk.tar.gz +0 -0
  94. package/package.json +1 -1
  95. package/runtime-companion.json +1 -1
  96. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes +2 -0
  97. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStore.h +2 -0
  98. package/sdk/ios/wasm/include/errno.h +10 -0
  99. package/src/agent-daemon-client.ts +1 -1
  100. package/src/agent-prompt.ts +1 -8
  101. package/src/canvas-agent-note-delivery.ts +2 -5
  102. package/src/canvas-groups.ts +11 -3
  103. package/src/cloud-contract.ts +31 -1
  104. package/src/swift-compile.ts +0 -1
  105. package/src/vite-plugin.ts +4 -1
@@ -5,10 +5,10 @@
5
5
 
6
6
  import { hostname } from 'os'
7
7
  import { formatLockOwner } from '../../peach-kit/src/agent-identity'
8
- import { AGENT_IDENTITY_MAX_CHARS } from '../src/cloud-contract'
8
+ import { AGENT_IDENTITY_MAX_CHARS, agentActionTargetName } from '../src/cloud-contract'
9
9
  import { getCliIdentity, readAgentId } from './current-sim'
10
10
  import type { PerformStep, WsBridgeCommand } from '../src/bridge-contract'
11
- import type { SootSimAgentIdentity, SootSimReplayTarget } from '@peach/globals'
11
+ import type { SootSimAgentIdentity } from '@peach/globals'
12
12
 
13
13
  function clip(text: string): string {
14
14
  return text.length > AGENT_IDENTITY_MAX_CHARS
@@ -16,11 +16,6 @@ function clip(text: string): string {
16
16
  : text
17
17
  }
18
18
 
19
- function targetName(target: SootSimReplayTarget | undefined): string | null {
20
- const name = target?.text?.trim() || target?.testID?.trim() || target?.id?.trim()
21
- return name ? name.replace(/\s+/g, ' ') : null
22
- }
23
-
24
19
  function verb(action: string, target: string | null): string {
25
20
  return target ? `${action} ${target}` : action
26
21
  }
@@ -30,13 +25,13 @@ function verb(action: string, target: string | null): string {
30
25
  function describeStep(step: PerformStep): string | null {
31
26
  switch (step.type) {
32
27
  case 'tap':
33
- return verb('Tapping', targetName(step.target))
28
+ return verb('Tapping', agentActionTargetName(step.target))
34
29
  case 'tapId':
35
30
  return verb('Tapping', step.id)
36
31
  case 'doubleTap':
37
32
  return 'Double tapping'
38
33
  case 'longPress':
39
- return verb('Long pressing', targetName(step.target))
34
+ return verb('Long pressing', agentActionTargetName(step.target))
40
35
  case 'drag':
41
36
  return 'Dragging'
42
37
  case 'pinch':
@@ -80,9 +75,9 @@ function describeStep(step: PerformStep): string | null {
80
75
  function describeCommand(command: WsBridgeCommand): string | null {
81
76
  switch (command.type) {
82
77
  case 'tap':
83
- return verb('Tapping', targetName(command.target))
78
+ return verb('Tapping', agentActionTargetName(command.target))
84
79
  case 'longPress':
85
- return verb('Long pressing', targetName(command.target))
80
+ return verb('Long pressing', agentActionTargetName(command.target))
86
81
  case 'keyboard':
87
82
  return command.action === 'dismiss'
88
83
  ? 'Dismissing the keyboard'
@@ -102,6 +97,13 @@ function describeCommand(command: WsBridgeCommand): string | null {
102
97
  }
103
98
  }
104
99
 
100
+ /** the name an agent shows beside its actions */
101
+ export function cliAgentName(identityKey: string): string {
102
+ return (
103
+ readAgentId() ?? (process.env.PEACH_AGENT_ID?.trim() || formatLockOwner(identityKey))
104
+ )
105
+ }
106
+
105
107
  /** the identity a command carries to the sim, or undefined when it names nobody. */
106
108
  export function commandAgent(command: WsBridgeCommand): SootSimAgentIdentity | undefined {
107
109
  const step = describeCommand(command)
@@ -112,10 +114,7 @@ export function commandAgent(command: WsBridgeCommand): SootSimAgentIdentity | u
112
114
  if (!machine) return undefined
113
115
  return {
114
116
  id: clip(identity.key),
115
- name: clip(
116
- readAgentId() ??
117
- (process.env.PEACH_AGENT_ID?.trim() || formatLockOwner(identity.key)),
118
- ),
117
+ name: clip(cliAgentName(identity.key)),
119
118
  machine: clip(machine),
120
119
  step: clip(step),
121
120
  }
@@ -525,10 +525,10 @@ function cloudBoxClient(options: {
525
525
  */
526
526
  export async function createPrebuiltBundleBox(options: {
527
527
  fresh?: boolean
528
- bundle: Uint8Array
528
+ artifact:
529
+ | { bytes: Uint8Array; nativeAssets: readonly CloudBoxNativeAsset[] }
530
+ | (() => Promise<{ bytes: Uint8Array; nativeAssets: readonly CloudBoxNativeAsset[] }>)
529
531
  nativeProjectDir?: string
530
- // the compiled native module files the bundle's footers name
531
- nativeAssets?: readonly CloudBoxNativeAsset[]
532
532
  bundleUpdate?: PrebuiltBundleUpdate
533
533
  // the simulator's device model, or null for the Box page's default
534
534
  device: string | null
@@ -543,35 +543,41 @@ export async function createPrebuiltBundleBox(options: {
543
543
  repo: string | null
544
544
  secrets?: Readonly<Record<string, string>>
545
545
  }) {
546
- const platform =
547
- options.device && isDeviceModel(options.device)
548
- ? getCliRuntime().settings_devices.getRuntimePlatform(options.device)
549
- : 'ios'
550
- const nativeRenderer = options.nativeProjectDir
551
- ? readNativeProjectRenderer(options.nativeProjectDir, platform)
552
- : undefined
553
- const appFonts = options.nativeProjectDir
554
- ? readNativeLinkedAppFontsWire({
555
- projectDir: options.nativeProjectDir,
556
- platform,
557
- })
558
- : ''
559
- const source = new BundleFilePlane(
560
- options.bundle,
561
- options.device,
562
- options.initialUrl ?? null,
563
- appFonts,
564
- nativeRenderer,
565
- options.nativeAssets,
566
- options.bundleUpdate,
567
- )
546
+ const pending = Promise.withResolvers<{ source: BundleFilePlane; appFonts: string }>()
568
547
  const box = await cloudBoxClient(options).create({
569
548
  name: options.name,
570
549
  stack: prebuiltBundleBoxTemplate.stack,
571
550
  template: BOX_TEMPLATES.resolve({ name: prebuiltBundleBoxTemplate.name }).provenance,
572
- source,
551
+ source: async () => {
552
+ const artifact =
553
+ typeof options.artifact === 'function'
554
+ ? await options.artifact()
555
+ : options.artifact
556
+ const platform =
557
+ options.device && isDeviceModel(options.device)
558
+ ? getCliRuntime().settings_devices.getRuntimePlatform(options.device)
559
+ : 'ios'
560
+ const nativeRenderer = options.nativeProjectDir
561
+ ? readNativeProjectRenderer(options.nativeProjectDir, platform)
562
+ : undefined
563
+ const appFonts = options.nativeProjectDir
564
+ ? readNativeLinkedAppFontsWire({ projectDir: options.nativeProjectDir, platform })
565
+ : ''
566
+ const source = new BundleFilePlane(
567
+ artifact.bytes,
568
+ options.device,
569
+ options.initialUrl ?? null,
570
+ appFonts,
571
+ nativeRenderer,
572
+ artifact.nativeAssets,
573
+ options.bundleUpdate,
574
+ )
575
+ pending.resolve({ source, appFonts })
576
+ return source
577
+ },
573
578
  ...(options.secrets ? { secrets: options.secrets } : {}),
574
579
  })
580
+ const { source, appFonts } = await pending.promise
575
581
  return {
576
582
  box,
577
583
  source,
@@ -738,8 +744,7 @@ async function runCloudBoxCreate(
738
744
  'bundle' in source
739
745
  ? await createPrebuiltBundleBox({
740
746
  ...connection,
741
- bundle: source.bundle,
742
- nativeAssets: source.nativeAssets,
747
+ artifact: { bytes: source.bundle, nativeAssets: source.nativeAssets },
743
748
  nativeProjectDir,
744
749
  device: null,
745
750
  name,
@@ -4,12 +4,16 @@
4
4
  // display.
5
5
 
6
6
  import { existsSync, readFileSync, writeFileSync } from 'node:fs'
7
+ import { hostname } from 'node:os'
7
8
  import { dirname, resolve } from 'node:path'
9
+ import { isCanvasMapAgent } from '@peach/globals'
8
10
  import { groupCanvasItems, type CanvasGrouping } from '../../src/canvas-groups'
9
11
  import { devices, isDeviceModel, type DeviceModel } from '../../src/device-catalog'
10
12
  import { layoutFlowGraph } from '../../src/flow-graph-layout'
11
13
  import { isRecord } from '../../src/is-record'
12
14
  import { LAUNCH_METADATA_QUERY_PARAM } from '../../src/launchMetadataContract'
15
+ import { cliAgentName } from '../command-agent'
16
+ import { getCliIdentity } from '../current-sim'
13
17
  import {
14
18
  createBridgeFromParsed,
15
19
  evalInBridge,
@@ -80,6 +84,9 @@ usage:
80
84
  peach canvas freeze <id>
81
85
  peach canvas camera --at x,y --scale <n>
82
86
  peach canvas camera --path <file>
87
+ peach canvas agent <item> --name <name> --step <step> [--id <agent>] [--machine <name>] [--action <json>]
88
+ peach canvas agent remove --id <agent>
89
+ peach canvas follow <agent|off>
83
90
  peach canvas remove <id>
84
91
  peach canvas list
85
92
  peach canvas push
@@ -100,7 +107,11 @@ verbs:
100
107
  focus select an item, or clear focus without an id
101
108
  live resume an item's app
102
109
  freeze retain an item's last frame and app state
110
+ agent attach the caller to an item, update its step, or report an external driver's action
111
+ follow follow one agent between items, or stop with off
103
112
  camera set the canvas translation and scale, or play a path
113
+ agent attach the caller to an item, update its step, or report an external driver's action
114
+ follow follow one agent between items, or stop with off
104
115
  remove take an item, or a whole map by its name, off the canvas
105
116
  list print the working file's items
106
117
  push post the working file to the canvas sim again, as after a reload
@@ -123,6 +134,10 @@ options:
123
134
  --flow arrange: lay each map out along its links and leave other items in place
124
135
  --path <file> camera: JSON array of {ms,x,y,scale} keyframes, starting at 0 ms
125
136
  --file <path> working file (default: peach-canvas.json)
137
+ --name <name> agent's displayed name
138
+ --machine <name> agent's machine (default: this hostname)
139
+ --step <text> agent's current step
140
+ --action <json> an agent action in item coordinates, reported by an external driver
126
141
  --sim <id> target a specific canvas sim
127
142
 
128
143
  examples:
@@ -665,6 +680,9 @@ async function dispatch(
665
680
  '--agent',
666
681
  '--machine',
667
682
  '--label',
683
+ '--name',
684
+ '--step',
685
+ '--action',
668
686
  ],
669
687
  })
670
688
  const [verb, target] = parsed.positional
@@ -682,6 +700,42 @@ async function dispatch(
682
700
  }
683
701
  const file = resolve(flag(args, '--file') ?? 'peach-canvas.json')
684
702
  const canvas = readCanvas(file)
703
+ if (verb === 'agent' || verb === 'follow') {
704
+ // the same id the cli puts on the actions it drives (command-agent.ts)
705
+ const agentId = flag(args, '--id') ?? getCliIdentity().key
706
+ let command: unknown
707
+ if (verb === 'follow') {
708
+ if (!target) throw new Error('follow takes an agent id or off')
709
+ command = { kind: 'follow-agent', agentId: target === 'off' ? null : target }
710
+ } else if (target === 'remove') {
711
+ if (!agentId) throw new Error('agent remove takes --id <agent>')
712
+ command = { kind: 'remove-agent', agentId }
713
+ } else {
714
+ const item = findItem(canvas, target)
715
+ const rawAction = flag(args, '--action')
716
+ const detail: unknown = rawAction ? JSON.parse(rawAction) : undefined
717
+ const agent = {
718
+ id: agentId,
719
+ name: flag(args, '--name') ?? cliAgentName(agentId),
720
+ machine: flag(args, '--machine') ?? hostname(),
721
+ step: flag(args, '--step'),
722
+ screenId: item.id,
723
+ ...(detail ? { action: { sequence: Date.now(), detail } } : {}),
724
+ }
725
+ if (!isCanvasMapAgent(agent))
726
+ throw new Error(
727
+ 'agent takes --id, --name and --step, with an optional agent action JSON',
728
+ )
729
+ command = { kind: 'agent', agent }
730
+ }
731
+ const bridge = createBridgeFromParsed(parsed)
732
+ try {
733
+ await evalInBridge(bridge, commandCode(command))
734
+ } finally {
735
+ bridge.close()
736
+ }
737
+ return 0
738
+ }
685
739
  if (verb === 'camera') {
686
740
  const path = flag(args, '--path')
687
741
  if (path) {
@@ -537,35 +537,33 @@ async function runRemoteBox(
537
537
  isRecord(body) && typeof body.message === 'string'
538
538
  ? body.message
539
539
  : `Peach Cloud refused the simulator (${covered.status})`
540
- throw new Error(
541
- covered.status === 402
542
- ? `${message}. add credit with \`${rnxPublicBrand.commandName} support fund\` and run it again.`
543
- : message,
544
- )
540
+ throw new Error(message)
545
541
  }
546
- const buildDir = projectDir && mkdtempSync(join(tmpdir(), 'peach-remote-'))
547
- let artifact: Awaited<ReturnType<typeof produceCloudBoxArtifact>>
548
- try {
549
- artifact = await produceCloudBoxArtifact(
550
- projectDir && buildDir ? { projectDir, buildDir } : input.bundlePath,
551
- platform,
552
- {
553
- assetsDirectory: input.assetsDirectory,
554
- nativeProjectDir,
555
- ...(input.watch ? { assetServer: new URL(input.bundlePath) } : {}),
556
- },
557
- )
558
- } finally {
559
- if (buildDir) rmSync(buildDir, { recursive: true, force: true })
542
+ const prepareArtifact = async () => {
543
+ const buildDir = projectDir && mkdtempSync(join(tmpdir(), 'peach-remote-'))
544
+ try {
545
+ const artifact = await produceCloudBoxArtifact(
546
+ projectDir && buildDir ? { projectDir, buildDir } : input.bundlePath,
547
+ platform,
548
+ {
549
+ assetsDirectory: input.assetsDirectory,
550
+ nativeProjectDir,
551
+ ...(input.watch ? { assetServer: new URL(input.bundlePath) } : {}),
552
+ },
553
+ )
554
+ assertBundleBuiltFor(artifact.bytes, platform, `peach ${command}`)
555
+ return artifact
556
+ } finally {
557
+ if (buildDir) rmSync(buildDir, { recursive: true, force: true })
558
+ }
560
559
  }
561
- assertBundleBuiltFor(artifact.bytes, platform, `peach ${command}`)
562
- // the session records which bundle a box already holds, so reattaching can
563
- // tell the same app from a rebuilt one. the box producer returns no digest
564
- // of its own, so take it here over the bytes that actually crossed.
565
- const artifactSha256 = createHash('sha256').update(artifact.bytes).digest('hex')
566
560
  const endpoint = box.cloudBoxEndpoint(args)
567
561
 
568
562
  const existingSession = readCloudSession()
563
+ let preparation: ReturnType<typeof prepareArtifact> | undefined
564
+ const getArtifact = () => (preparation ??= prepareArtifact())
565
+ // a failed build leaves the previous simulator running.
566
+ const existingArtifact = existingSession || input.name ? await getArtifact() : undefined
569
567
  // a launch link only means something to an app that is launching, so a box
570
568
  // already running this bundle is never reattached in its place.
571
569
  if (
@@ -577,7 +575,9 @@ async function runRemoteBox(
577
575
  existingSession.apiOrigin === endpoint &&
578
576
  existingSession.platform === platform &&
579
577
  existingSession.device === selectedDevice &&
580
- existingSession.artifact?.sha256 === artifactSha256
578
+ existingArtifact &&
579
+ existingSession.artifact?.sha256 ===
580
+ createHash('sha256').update(existingArtifact.bytes).digest('hex')
581
581
  ) {
582
582
  // a box deleted since, from here, another machine or the web, answers its
583
583
  // old token like any wrong one, so this folder has nothing to reattach
@@ -631,9 +631,8 @@ async function runRemoteBox(
631
631
  source,
632
632
  appFontsWireSha256,
633
633
  } = await box.createPrebuiltBundleBox({
634
- bundle: new Uint8Array(artifact.bytes),
634
+ artifact: existingArtifact ?? getArtifact,
635
635
  nativeProjectDir,
636
- nativeAssets: artifact.nativeAssets,
637
636
  ...(input.watch ? { bundleUpdate: { sequence: 1 } } : {}),
638
637
  device: selectedDevice,
639
638
  initialUrl: input.initialUrl,
@@ -645,6 +644,8 @@ async function runRemoteBox(
645
644
  accountId,
646
645
  repo: resolveCheckoutRepo(projectDir ?? undefined),
647
646
  })
647
+ const artifact = await getArtifact()
648
+ const artifactSha256 = createHash('sha256').update(artifact.bytes).digest('hex')
648
649
  const session = createCloudBoxSession({
649
650
  boxId: created.id,
650
651
  boxToken: created.accessToken ?? '',
@@ -21,6 +21,7 @@ import {
21
21
  import { getCliRuntime } from '../../src/cli-runtime.ts'
22
22
  import { isRecord } from '../../src/is-record'
23
23
  import { terminateProcessGroup } from '../../src/process-group'
24
+ import { rnxPublicBrand } from '../../src/public-brand'
24
25
  import { authHeaderValue, cloudAccountIdOrExit, resolveCliAuth } from '../auth'
25
26
  import { extractAppBinaryBundle, isAppBinaryPath } from '../binary-sidecar'
26
27
  import { producePreviewArtifact } from '../cloud-client'
@@ -233,7 +234,7 @@ async function publishProjectPreview(
233
234
  })
234
235
  if (preflight.status === 402)
235
236
  throw new Error(
236
- `cloud previews are paid from your account balance (${parseServerMessage(await preflight.text()) ?? 'no credit available'}). add credit at ${origin}/billing and run it again.`,
237
+ `The build needs an available balance (${parseServerMessage(await preflight.text()) ?? 'no credit available'}). Add balance at ${rnxPublicBrand.origin}/billing and try again.`,
237
238
  )
238
239
  if (!preflight.ok) {
239
240
  const text = await preflight.text()
@@ -571,6 +571,9 @@ export const DECLARED_OUTBOUND_CALLS: Record<string, OutboundCallDeclaration> =
571
571
  { category: 'contrast_user_action', count: 1 },
572
572
  'packages/peach-cloud-box/src/box-do.ts :: fetch :: `${origin}/api/v1/rnx/sessions/internal/${encodeURIComponent()}`':
573
573
  { category: 'contrast_user_action', count: 1 },
574
+ // the stopped session's recording goes to the account that ran it, nowhere else.
575
+ 'packages/peach-cloud-box/src/box-do.ts :: fetch :: `${origin}/api/v1/rnx/sessions/internal/${encodeURIComponent()}/recording`':
576
+ { category: 'contrast_user_action', count: 1 },
574
577
  // stop and delete authorize the caller against the account before any
575
578
  // teardown. the account service owns the verdict on a key, its scope and the
576
579
  // account it names; no project content is sent.
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2423 | (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 __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2423 | (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.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2423 | (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 __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2423 | (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 __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2423 | (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;
package/dist-lib/beta.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2423 | (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;
package/dist-lib/beta.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2423 | (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
- /*! peach v0.1.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2423 | (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.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2423 | (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.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2423 | (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
- /*! peach v0.1.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2423 | (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.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2423 | (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
- /*! peach v0.1.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2423 | (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 __create = Object.create;
@@ -36431,7 +36431,7 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
36431
36431
  REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
36432
36432
  MULTI_MANIFEST_VERSION = 72;
36433
36433
  SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
36434
- compilerSourceDigest = true ? "63f37c4a87253305166cb52435207eb3f74394734f1a77e562d79ab7d5d7dfc1" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
36434
+ compilerSourceDigest = true ? "886349932526d72a5a1493acbcd1799ec941afd89998ad0eab64bbe9c48afb95" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
36435
36435
  nativeCxxCompilerFlags = ["-fno-cxx-modules"];
36436
36436
  cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
36437
36437
  cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
@@ -36515,7 +36515,6 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
36515
36515
  "NSSwappedDouble",
36516
36516
  "NSSwappedFloat",
36517
36517
  "NSUbiquitousKeyValueStore",
36518
- "NSValueTransformerName",
36519
36518
  "NSXPCCoder",
36520
36519
  "NSXPCConnection",
36521
36520
  "NSXPCInterface",
@@ -58937,7 +58936,7 @@ var init_swift_standin_digest = __esm({
58937
58936
  STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
58938
58937
  SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
58939
58938
  standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
58940
- STANDIN_SOURCE_DIGEST = true ? "1122424b1e57ea84e0c3c2fbd17ce18dee149a87374de8912d176aec8451bc86" : standinSourceDigest();
58939
+ STANDIN_SOURCE_DIGEST = true ? "2913d6a693b8a1c42193c1962c3468c2f8bc68c78a2f2f52961ca5efe03d1e67" : standinSourceDigest();
58941
58940
  }
58942
58941
  });
58943
58942
 
@@ -73590,7 +73589,7 @@ var init_nitro_superset = __esm({
73590
73589
  init_nitroContract();
73591
73590
  init_swift_standin_digest();
73592
73591
  NITRO_SUPERSET_ENTRY_NAME = "superset";
73593
- NITRO_COMPILER_DIGEST = true ? "63f3c15373db1e732c577919dd37e2c02c61f5829fc6a1b439ec2d8de8dd23f6" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
73592
+ NITRO_COMPILER_DIGEST = true ? "a6905cb4da4fec9b5ef03b34b0b2891e3ed553f5571d77e24e075fa7c483b0a9" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
73594
73593
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
73595
73594
  nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
73596
73595
  published = /* @__PURE__ */ new Map();
@@ -74829,7 +74828,7 @@ var init_expo_native_compiler_digest = __esm({
74829
74828
 
74830
74829
  // src/expo-native-prebuilt.ts
74831
74830
  function expoNativeCompilerDigestValue() {
74832
- return true ? "707065782ce033b69a1af3ade8c72a07c2ee704ce46e59a30081384d07d8ecdc" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
74831
+ return true ? "5a193936cb2c362dd919d9127e9318122bd8e86f9c6e05cbe56c4c6580a4636a" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
74833
74832
  }
74834
74833
  function readSources(value) {
74835
74834
  const sources = isRecord(value) ? value.sources : null;
@@ -81724,7 +81723,7 @@ var import_node_path5 = require("node:path");
81724
81723
  init_src();
81725
81724
 
81726
81725
  // runtime-companion.json
81727
- var runtime_companion_default = { abi: 1, sha256: "9bc75c6ccfa87cb58eff71992a2fafa21b4e7acbb37f0b4bef6f74279c98317a", file: "node/cli-9bc75c6ccfa87cb58eff71992a2fafa21b4e7acbb37f0b4bef6f74279c98317a.cjs" };
81726
+ var runtime_companion_default = { abi: 1, sha256: "50f7ba9b5269b150a6bd2189f202e3cde6ecd829f705d24a70a88f13e6a92474", file: "node/cli-50f7ba9b5269b150a6bd2189f202e3cde6ecd829f705d24a70a88f13e6a92474.cjs" };
81728
81727
 
81729
81728
  // src/cli-runtime.ts
81730
81729
  init_answeredNativePackages();
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2423 | (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.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2423 | (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
- /*! peach v0.1.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2423 | (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;
@@ -39,6 +39,8 @@ __export(cloud_contract_exports, {
39
39
  RNX_CLOUD_TEST_FILES_MAX_BYTES: () => RNX_CLOUD_TEST_FILES_MAX_BYTES,
40
40
  RNX_CLOUD_TEST_FILES_MAX_COUNT: () => RNX_CLOUD_TEST_FILES_MAX_COUNT,
41
41
  RNX_CLOUD_TOKEN_SCOPES: () => RNX_CLOUD_TOKEN_SCOPES,
42
+ agentActionTarget: () => agentActionTarget,
43
+ agentActionTargetName: () => agentActionTargetName,
42
44
  isRnxCloudCommandScope: () => isRnxCloudCommandScope,
43
45
  isRnxCloudCommandType: () => isRnxCloudCommandType,
44
46
  isRnxCloudSimStatus: () => isRnxCloudSimStatus,
@@ -67,6 +69,23 @@ function readAgentIdentity(value) {
67
69
  if (id === null || name === null || machine === null || step === null) return null;
68
70
  return { id, name, machine, step };
69
71
  }
72
+ var TEXT_FIELD_TYPE = /text ?(input|field)/i;
73
+ function agentActionTarget(target) {
74
+ if (!target) return void 0;
75
+ const clean = (value) => {
76
+ const text2 = value?.trim().replace(/\s+/g, " ");
77
+ return text2 ? text2.slice(0, AGENT_IDENTITY_MAX_CHARS) : void 0;
78
+ };
79
+ const id = clean(target.id);
80
+ const testID = clean(target.testID);
81
+ const text = TEXT_FIELD_TYPE.test(target.type ?? "") ? void 0 : clean(target.text);
82
+ if (!id && !testID && !text) return void 0;
83
+ return { ...id && { id }, ...testID && { testID }, ...text && { text } };
84
+ }
85
+ function agentActionTargetName(target) {
86
+ const safe = agentActionTarget(target);
87
+ return safe?.text ?? safe?.testID ?? safe?.id ?? null;
88
+ }
70
89
  var RNX_CLOUD_MAX_ARTIFACT_BYTES = 40761776;
71
90
  var RNX_CLOUD_DESIGN_MAX_STORAGE_ENTRIES = 256;
72
91
  var RNX_CLOUD_DESIGN_MAX_STORAGE_BYTES = 1024 * 1024;
@@ -206,6 +225,8 @@ function isRnxCloudSimStatus(value) {
206
225
  RNX_CLOUD_TEST_FILES_MAX_BYTES,
207
226
  RNX_CLOUD_TEST_FILES_MAX_COUNT,
208
227
  RNX_CLOUD_TOKEN_SCOPES,
228
+ agentActionTarget,
229
+ agentActionTargetName,
209
230
  isRnxCloudCommandScope,
210
231
  isRnxCloudCommandType,
211
232
  isRnxCloudSimStatus,
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/cloud-contract.ts
4
4
  var AGENT_IDENTITY_MAX_CHARS = 200;
@@ -16,6 +16,23 @@ function readAgentIdentity(value) {
16
16
  if (id === null || name === null || machine === null || step === null) return null;
17
17
  return { id, name, machine, step };
18
18
  }
19
+ var TEXT_FIELD_TYPE = /text ?(input|field)/i;
20
+ function agentActionTarget(target) {
21
+ if (!target) return void 0;
22
+ const clean = (value) => {
23
+ const text2 = value?.trim().replace(/\s+/g, " ");
24
+ return text2 ? text2.slice(0, AGENT_IDENTITY_MAX_CHARS) : void 0;
25
+ };
26
+ const id = clean(target.id);
27
+ const testID = clean(target.testID);
28
+ const text = TEXT_FIELD_TYPE.test(target.type ?? "") ? void 0 : clean(target.text);
29
+ if (!id && !testID && !text) return void 0;
30
+ return { ...id && { id }, ...testID && { testID }, ...text && { text } };
31
+ }
32
+ function agentActionTargetName(target) {
33
+ const safe = agentActionTarget(target);
34
+ return safe?.text ?? safe?.testID ?? safe?.id ?? null;
35
+ }
19
36
  var RNX_CLOUD_MAX_ARTIFACT_BYTES = 40761776;
20
37
  var RNX_CLOUD_DESIGN_MAX_STORAGE_ENTRIES = 256;
21
38
  var RNX_CLOUD_DESIGN_MAX_STORAGE_BYTES = 1024 * 1024;
@@ -154,6 +171,8 @@ export {
154
171
  RNX_CLOUD_TEST_FILES_MAX_BYTES,
155
172
  RNX_CLOUD_TEST_FILES_MAX_COUNT,
156
173
  RNX_CLOUD_TOKEN_SCOPES,
174
+ agentActionTarget,
175
+ agentActionTargetName,
157
176
  isRnxCloudCommandScope,
158
177
  isRnxCloudCommandType,
159
178
  isRnxCloudSimStatus,
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2423 | (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.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2423 | (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;