sootsim 0.1.259 → 0.1.261
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/jest-preset.cjs +1 -0
- package/detox/jest-setup-after-env.cjs +18 -0
- package/dist-cli/bin.js +4 -4
- package/dist-cli/chunks/{agent-Y5XPRQ2D.js → agent-RXKGHJYJ.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-EIGM5MZ5.js → agent-wrapper-A2CMG2BA.js} +2 -2
- package/dist-cli/chunks/{app-fonts-F66DJNOU.js → app-fonts-JMZWYM5K.js} +2 -2
- package/dist-cli/chunks/{assert-4UNH35YI.js → assert-EOJ3EHJQ.js} +2 -2
- package/dist-cli/chunks/{auth-3VXKAWDD.js → auth-SIJSL6ZW.js} +2 -2
- package/dist-cli/chunks/beta-BCHJBPJM.js +2 -0
- package/dist-cli/chunks/{camera-TVRTON3X.js → camera-BKZSMPSA.js} +2 -2
- package/dist-cli/chunks/chunk-2XGPQPBQ.js +1 -0
- package/dist-cli/chunks/{chunk-XVDDOJWS.js → chunk-6ZERINEJ.js} +2 -2
- package/dist-cli/chunks/{chunk-VUXUMQEC.js → chunk-75TC4YBZ.js} +2 -2
- package/dist-cli/chunks/{chunk-UDZJW6SR.js → chunk-7EIZLBLT.js} +1 -1
- package/dist-cli/chunks/chunk-AXJTPAHA.js +2 -0
- package/dist-cli/chunks/{chunk-OVZ4WWJC.js → chunk-BARVOECN.js} +3 -3
- package/dist-cli/chunks/{chunk-4QVZO2IV.js → chunk-BM5GBB56.js} +1 -1
- package/dist-cli/chunks/{chunk-KKKRQKVE.js → chunk-DKDYYXRY.js} +2 -2
- package/dist-cli/chunks/{chunk-55HDNMCI.js → chunk-GIVBLMYH.js} +2 -2
- package/dist-cli/chunks/{chunk-D3T6TPWZ.js → chunk-HK3WEUHS.js} +2 -2
- package/dist-cli/chunks/{chunk-2GC6B6ZJ.js → chunk-HZHQMMJ3.js} +1 -1
- package/dist-cli/chunks/{chunk-YI4ZUUFY.js → chunk-ILTQ4ZPZ.js} +3 -3
- package/dist-cli/chunks/{chunk-46SE2OG4.js → chunk-JHJYM5IX.js} +1 -1
- package/dist-cli/chunks/chunk-JNHCJEUS.js +2 -0
- package/dist-cli/chunks/{chunk-HLI3NHBR.js → chunk-K2DYN4E4.js} +3 -3
- package/dist-cli/chunks/{chunk-OSHPYGDN.js → chunk-KNRPSHXD.js} +1 -1
- package/dist-cli/chunks/{chunk-4SDLMKK5.js → chunk-LFT2G6CS.js} +1 -1
- package/dist-cli/chunks/{chunk-ARUD4K7V.js → chunk-MAKP6XWE.js} +1 -1
- package/dist-cli/chunks/{chunk-EQEZMYYU.js → chunk-MLKQ6UCQ.js} +2 -2
- package/dist-cli/chunks/{chunk-DHF4VP6F.js → chunk-NC3JIEPR.js} +2 -2
- package/dist-cli/chunks/{chunk-JEG2BY3L.js → chunk-NE6RIOHA.js} +2 -2
- package/dist-cli/chunks/{chunk-YSVATVIB.js → chunk-NER5BICF.js} +2 -2
- package/dist-cli/chunks/{chunk-5NNPUZ4U.js → chunk-NIW6FA7Z.js} +1 -1
- package/dist-cli/chunks/{chunk-FOJYE5VS.js → chunk-NPFX6EB3.js} +1 -1
- package/dist-cli/chunks/{chunk-Q7GIZYXH.js → chunk-NRPETN6L.js} +2 -2
- package/dist-cli/chunks/{chunk-Z5OYAYQO.js → chunk-OILZ3XOV.js} +2 -2
- package/dist-cli/chunks/{chunk-3BEO6YPO.js → chunk-PQMCTB2S.js} +2 -2
- package/dist-cli/chunks/{chunk-MGK5XZSP.js → chunk-QHFMMVZS.js} +1 -1
- package/dist-cli/chunks/{chunk-4WWQ4SHW.js → chunk-QKU7E35D.js} +1 -1
- package/dist-cli/chunks/{chunk-BN2FNCSW.js → chunk-QM6C26WM.js} +3 -3
- package/dist-cli/chunks/{chunk-7E5C6Y2O.js → chunk-QP7HQHRB.js} +2 -2
- package/dist-cli/chunks/{chunk-ANBTDAWQ.js → chunk-QS4WA56I.js} +2 -2
- package/dist-cli/chunks/{chunk-BYBAZTMQ.js → chunk-R5AUBYLC.js} +1 -1
- package/dist-cli/chunks/chunk-RLPH773J.js +1 -0
- package/dist-cli/chunks/{chunk-2DDWJAT5.js → chunk-RZYPYVAE.js} +2 -2
- package/dist-cli/chunks/{chunk-V4TOXWP7.js → chunk-SYJEB5TC.js} +2 -2
- package/dist-cli/chunks/{chunk-XJXI5J7N.js → chunk-UH722XMQ.js} +3 -3
- package/dist-cli/chunks/{chunk-5BFCOQAM.js → chunk-UPXPN2SA.js} +2 -2
- package/dist-cli/chunks/{chunk-IAE5QGBW.js → chunk-V5JUP7E5.js} +2 -2
- package/dist-cli/chunks/{chunk-VCTPUENT.js → chunk-WNCRDOVZ.js} +1 -1
- package/dist-cli/chunks/{chunk-QLTUXFJF.js → chunk-WVA7UPF2.js} +1 -1
- package/dist-cli/chunks/{chunk-NI2TLQ7P.js → chunk-XGZRIJRY.js} +25 -25
- package/dist-cli/chunks/{chunk-X4X3S7AO.js → chunk-ZUDTLJQC.js} +1 -1
- package/dist-cli/chunks/{chunk-KUUI2GRK.js → chunk-ZUKJYGD4.js} +2 -2
- package/dist-cli/chunks/cli-version-QSLFZF4X.js +2 -0
- package/dist-cli/chunks/{compat-SH2X4HRP.js → compat-GVAGEQAZ.js} +3 -3
- package/dist-cli/chunks/{config-3SFT2VG7.js → config-GMSFGZWY.js} +2 -2
- package/dist-cli/chunks/{control-UUEOKOW5.js → control-DUUEIJ4L.js} +2 -2
- package/dist-cli/chunks/daemon-7D67LUBQ.js +2 -0
- package/dist-cli/chunks/{debug-SIOQEV3E.js → debug-IIBOAEZB.js} +3 -3
- package/dist-cli/chunks/{desktop-3JRJQ5L5.js → desktop-MEMBM7BZ.js} +3 -3
- package/dist-cli/chunks/detox-J2ZIS7ZG.js +50 -0
- package/dist-cli/chunks/{device-VN7DX635.js → device-NEMPOW5X.js} +2 -2
- package/dist-cli/chunks/{diagnose-2YZUEQER.js → diagnose-XLD6UYAA.js} +2 -2
- package/dist-cli/chunks/drivers-QUSXEJ5B.js +2 -0
- package/dist-cli/chunks/{film-7ANS4KZ2.js → film-PN6U3DXD.js} +3 -3
- package/dist-cli/chunks/flow-MDGQP7KY.js +2 -0
- package/dist-cli/chunks/help-ZBFQ4TRI.js +2 -0
- package/dist-cli/chunks/{hidden-runtime-alias-L4P5JXZI.js → hidden-runtime-alias-ASB2DGU3.js} +2 -2
- package/dist-cli/chunks/{home-paths-Q3NEFW2T.js → home-paths-FLQYZTZC.js} +2 -2
- package/dist-cli/chunks/inspect-GE7F3UD5.js +2 -0
- package/dist-cli/chunks/install-desktop-NJFBRUQK.js +2 -0
- package/dist-cli/chunks/{login-E3LMU5M2.js → login-ELTUXIGJ.js} +4 -4
- package/dist-cli/chunks/{logout-EDU3Q3PN.js → logout-JUHMBKCF.js} +2 -2
- package/dist-cli/chunks/{maestro-YPMQ5T3A.js → maestro-FX22V3QM.js} +3 -3
- package/dist-cli/chunks/maestro-generate-QALAHEDN.js +34 -0
- package/dist-cli/chunks/{mode-FX6JHSIW.js → mode-Z32XIGKC.js} +2 -2
- package/dist-cli/chunks/optional-demo-registry-P5LGBWMR.js +2 -0
- package/dist-cli/chunks/{perf-2FPZ4WM7.js → perf-4W3HMHDG.js} +2 -2
- package/dist-cli/chunks/{record-PVXBQS37.js → record-J23EU2PJ.js} +3 -3
- package/dist-cli/chunks/runtime-NUA23EAD.js +2 -0
- package/dist-cli/chunks/{screenshot-command-FHT46DAS.js → screenshot-command-AVQKBRJD.js} +5 -5
- package/dist-cli/chunks/{screenshots-capture-4JKW4LO5.js → screenshots-capture-LQ4WG4YD.js} +2 -2
- package/dist-cli/chunks/{serve-VOBB5L4R.js → serve-VJW3DHXR.js} +2 -2
- package/dist-cli/chunks/{setup-JRK7OMNF.js → setup-DLZZ5GYH.js} +3 -3
- package/dist-cli/chunks/{skills-G2EGKHAC.js → skills-43K6ZI7K.js} +2 -2
- package/dist-cli/chunks/{storage-WUHC3DDJ.js → storage-6AFPJODY.js} +2 -2
- package/dist-cli/chunks/store-MNIZHXQW.js +2 -0
- package/dist-cli/chunks/telemetry-WK7QRXMO.js +2 -0
- package/dist-cli/chunks/{timeline-HZFFJYRK.js → timeline-4GTSVWUU.js} +2 -2
- package/dist-cli/chunks/{upgrade-CSHTNNFC.js → upgrade-KHV5HMEC.js} +2 -2
- package/dist-cli/chunks/upload-56DF47MA.js +2 -0
- package/dist-cli/chunks/{version-ZQUMDD7H.js → version-DZ3NNQYK.js} +2 -2
- package/dist-cli/chunks/{web-SH74DBQB.js → web-OALK6L2K.js} +2 -2
- package/dist-cli/chunks/{what-happened-LRO7J5BV.js → what-happened-COLALBX2.js} +2 -2
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +1 -1
- package/dist-lib/agent-sessions.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 +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +12 -9
- package/dist-lib/detox/jest-preset.cjs +1 -0
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +1 -1
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/render-mode.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 +1 -1
- package/dist-lib/skills.cjs +20 -14
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/src/screenshots/frame-compose.ts +8 -5
- package/src/vite-plugin.ts +18 -21
- package/detox/jest-environment.ts +0 -86
- package/detox/run-test.ts +0 -113
- package/dist-cli/chunks/beta-3BITBQAB.js +0 -2
- package/dist-cli/chunks/chunk-4TKQWCCG.js +0 -1
- package/dist-cli/chunks/chunk-GWSEPKCY.js +0 -2
- package/dist-cli/chunks/chunk-NXZAVEZK.js +0 -2
- package/dist-cli/chunks/chunk-QVRTNQRH.js +0 -1
- package/dist-cli/chunks/cli-version-DCWEI5UA.js +0 -2
- package/dist-cli/chunks/daemon-CAOFTJEQ.js +0 -2
- package/dist-cli/chunks/detox-IOXKXWRT.js +0 -50
- package/dist-cli/chunks/drivers-DFPU4A4I.js +0 -2
- package/dist-cli/chunks/flow-JV2H54P3.js +0 -2
- package/dist-cli/chunks/help-4KULPPHD.js +0 -2
- package/dist-cli/chunks/inspect-OPDVT6OL.js +0 -2
- package/dist-cli/chunks/install-desktop-FWSKBMOQ.js +0 -2
- package/dist-cli/chunks/maestro-generate-VRJDXEAS.js +0 -34
- package/dist-cli/chunks/optional-demo-registry-AQIAQEP7.js +0 -2
- package/dist-cli/chunks/runtime-GREWVZJS.js +0 -2
- package/dist-cli/chunks/store-RR7SOYWS.js +0 -2
- package/dist-cli/chunks/telemetry-K276VZJW.js +0 -2
- package/dist-cli/chunks/upload-RJ7GSDJT.js +0 -2
package/detox/run-test.ts
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env npx tsx
|
|
2
|
-
// run an external detox test against sootsim
|
|
3
|
-
// usage: EXTERNAL_TEST_ROOT=/path/to/tests npx tsx test/detox-driver/run-test.ts [test-file-path]
|
|
4
|
-
// example: EXTERNAL_TEST_ROOT=/tmp/demo-app npx tsx test/detox-driver/run-test.ts e2e/MyFlow.test.ts
|
|
5
|
-
//
|
|
6
|
-
// the test file path is resolved relative to EXTERNAL_TEST_ROOT when provided
|
|
7
|
-
// the sootsim dev server must be running on port 5173
|
|
8
|
-
|
|
9
|
-
import { execSync } from 'child_process'
|
|
10
|
-
import * as fs from 'fs'
|
|
11
|
-
import * as path from 'path'
|
|
12
|
-
import { fileURLToPath } from 'url'
|
|
13
|
-
|
|
14
|
-
const __filename = fileURLToPath(import.meta.url)
|
|
15
|
-
const __dirname = path.dirname(__filename)
|
|
16
|
-
|
|
17
|
-
const SOOTSIM_ROOT = path.resolve(__dirname, '../..')
|
|
18
|
-
const EXTERNAL_TEST_ROOT = process.env.EXTERNAL_TEST_ROOT || ''
|
|
19
|
-
const DRIVER_DIR = path.resolve(__dirname)
|
|
20
|
-
|
|
21
|
-
// get test file arg
|
|
22
|
-
const testFile = process.argv[2]
|
|
23
|
-
if (!testFile) {
|
|
24
|
-
console.error('usage: npx tsx test/detox-driver/run-test.ts <test-file>')
|
|
25
|
-
console.error(
|
|
26
|
-
' e.g. npx tsx test/detox-driver/run-test.ts e2e/PressStyleNative.test.ts',
|
|
27
|
-
)
|
|
28
|
-
process.exit(1)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// resolve the test file path
|
|
32
|
-
let testPath = testFile
|
|
33
|
-
if (!path.isAbsolute(testPath)) {
|
|
34
|
-
const fromExternal = EXTERNAL_TEST_ROOT
|
|
35
|
-
? path.resolve(EXTERNAL_TEST_ROOT, testPath)
|
|
36
|
-
: ''
|
|
37
|
-
if (fromExternal && fs.existsSync(fromExternal)) {
|
|
38
|
-
testPath = fromExternal
|
|
39
|
-
} else {
|
|
40
|
-
testPath = path.resolve(process.cwd(), testPath)
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
if (!fs.existsSync(testPath)) {
|
|
45
|
-
console.error(`test file not found: ${testPath}`)
|
|
46
|
-
process.exit(1)
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
console.log(`running detox test against sootsim:`)
|
|
50
|
-
console.log(` test: ${testPath}`)
|
|
51
|
-
console.log(` sootsim: ${SOOTSIM_ROOT}`)
|
|
52
|
-
console.log(` external root: ${EXTERNAL_TEST_ROOT || '(none)'}`)
|
|
53
|
-
console.log('')
|
|
54
|
-
|
|
55
|
-
// write a temporary jest config with the right module mappings
|
|
56
|
-
const tmpConfig = path.join(SOOTSIM_ROOT, 'test', '.detox-sootsim-jest.config.cjs')
|
|
57
|
-
const configContent = `
|
|
58
|
-
// auto-generated jest config for running detox tests against sootsim
|
|
59
|
-
const path = require('path');
|
|
60
|
-
|
|
61
|
-
module.exports = {
|
|
62
|
-
rootDir: ${JSON.stringify(EXTERNAL_TEST_ROOT || SOOTSIM_ROOT)},
|
|
63
|
-
testMatch: [${JSON.stringify(testPath)}],
|
|
64
|
-
testTimeout: 180000,
|
|
65
|
-
maxWorkers: 1,
|
|
66
|
-
verbose: true,
|
|
67
|
-
transform: {
|
|
68
|
-
'^.+\\.tsx?$': ['ts-jest', {
|
|
69
|
-
isolatedModules: true,
|
|
70
|
-
tsconfig: {
|
|
71
|
-
module: 'commonjs',
|
|
72
|
-
target: 'es2020',
|
|
73
|
-
esModuleInterop: true,
|
|
74
|
-
jsx: 'react-jsx',
|
|
75
|
-
strict: false,
|
|
76
|
-
skipLibCheck: true,
|
|
77
|
-
moduleResolution: 'node',
|
|
78
|
-
allowJs: true,
|
|
79
|
-
resolveJsonModule: true,
|
|
80
|
-
},
|
|
81
|
-
}],
|
|
82
|
-
},
|
|
83
|
-
moduleNameMapper: {
|
|
84
|
-
'^detox$': ${JSON.stringify(path.join(DRIVER_DIR, 'index.ts'))},
|
|
85
|
-
'^\\\\./utils/navigation$': ${JSON.stringify(path.join(DRIVER_DIR, 'navigation.ts'))},
|
|
86
|
-
'^\\\\./utils/colors$': ${JSON.stringify(path.join(DRIVER_DIR, 'colors.ts'))},
|
|
87
|
-
},
|
|
88
|
-
testEnvironment: 'node',
|
|
89
|
-
};
|
|
90
|
-
`
|
|
91
|
-
|
|
92
|
-
fs.writeFileSync(tmpConfig, configContent)
|
|
93
|
-
|
|
94
|
-
try {
|
|
95
|
-
const cmd = `npx jest --config ${tmpConfig} --no-cache --forceExit`
|
|
96
|
-
console.log(`$ ${cmd}\n`)
|
|
97
|
-
|
|
98
|
-
execSync(cmd, {
|
|
99
|
-
stdio: 'inherit',
|
|
100
|
-
cwd: SOOTSIM_ROOT,
|
|
101
|
-
env: {
|
|
102
|
-
...process.env,
|
|
103
|
-
SOOTSIM_URL: process.env.SOOTSIM_URL || 'http://localhost:5173',
|
|
104
|
-
},
|
|
105
|
-
})
|
|
106
|
-
} catch (e: any) {
|
|
107
|
-
process.exit(e.status || 1)
|
|
108
|
-
} finally {
|
|
109
|
-
// clean up temp config
|
|
110
|
-
try {
|
|
111
|
-
fs.unlinkSync(tmpConfig)
|
|
112
|
-
} catch {}
|
|
113
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.259 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.259 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
function n(e,t,r,a){return{width:3,ringToggle:{top:e[0],height:e[1]},volumeUp:{top:t[0],height:t[1]},volumeDown:{top:r[0],height:r[1]},lock:{top:a[0],height:a[1]}}}var S={width:2.5,lock:{top:188.7,height:68.1},ringToggle:{top:113.2,height:36},volumeUp:{top:188.2,height:68.1},volumeDown:{top:269,height:68.1}},h={width:3,lock:{top:238,height:78},ringToggle:{top:-1e3,height:0},volumeUp:{top:336,height:62},volumeDown:{top:408,height:62}},f={width:3,lock:{top:248,height:72},ringToggle:{top:-1e3,height:0},volumeUp:{top:144,height:62},volumeDown:{top:216,height:62}},i=48;function o(e){return{...e,platform:"ios",navigationBarHeight:0,navigationBarMode:e.homeIndicatorHeight>0?"gesture":"none",displayCutout:{top:e.dynamicIsland?e.statusBarHeight:0,bottom:0,left:0,right:0},cameraCutout:null,osVersion:e.iosVersion,androidApiLevel:null,systemName:"iOS",manufacturer:"Apple",brand:"Apple",modelName:e.name}}var p={"canvas-workspace":o({name:"Canvas Workspace",width:1440,height:900,scale:1,statusBarHeight:0,homeIndicatorHeight:0,cornerRadius:0,continuousCornerRadius:0,bezelWidth:16,dynamicIsland:null,safeAreaInsets:{top:0,bottom:0,left:0,right:0},iosVersion:"26.4",physicalPPI:110,hardwareButtons:n([185.8,41.7],[258.2,67.6],[344,67.6],[281.5,106.9]),experimental:!0}),"iphone-se":o({name:"iPhone SE",width:375,height:667,scale:2,statusBarHeight:20,homeIndicatorHeight:0,cornerRadius:0,continuousCornerRadius:0,bezelWidth:28.7,dynamicIsland:null,safeAreaInsets:{top:20,bottom:0,left:0,right:0},iosVersion:"15.8",physicalPPI:326,hardwareButtons:S}),"iphone-14":o({name:"iPhone 14",width:390,height:844,scale:3,statusBarHeight:47,homeIndicatorHeight:34,cornerRadius:46.2,continuousCornerRadius:67.462,bezelWidth:19.5,dynamicIsland:null,safeAreaInsets:{top:47,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:n([141.7,29.7],[205.9,69.6],[289.5,69.6],[228.9,114.5])}),"iphone-15":o({name:"iPhone 15",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:73.402,bezelWidth:18.2,dynamicIsland:{width:126,height:37.3,top:14.1},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:n([171.7,32],[235.8,65.3],[320.5,65.3],[280.6,105.2])}),"iphone-15-plus":o({name:"iPhone 15 Plus",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:74.654,bezelWidth:17.3,dynamicIsland:{width:126,height:37.3,top:11.4},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:n([172.1,33],[236.1,66.6],[321.2,66.6],[281,106.8])}),"iphone-15-pro":o({name:"iPhone 15 Pro",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:73.402,bezelWidth:15.3,dynamicIsland:{width:126,height:38,top:13.4},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"18.2",physicalPPI:460,hardwareButtons:n([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-15-pro-max":o({name:"iPhone 15 Pro Max",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:74.654,bezelWidth:15.3,dynamicIsland:{width:126,height:38,top:13.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"18.2",physicalPPI:460,hardwareButtons:n([173.3,32.2],[253.4,61.7],[343.3,61.7],[268.5,98.5])}),"iphone-16":o({name:"iPhone 16",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:73.402,bezelWidth:15.3,dynamicIsland:{width:126,height:37.3,top:11},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:n([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-16-plus":o({name:"iPhone 16 Plus",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:74.654,bezelWidth:15.3,dynamicIsland:{width:126,height:37.3,top:11.4},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:n([173.3,32.2],[253.4,61.7],[343.3,61.7],[268.5,98.5])}),"iphone-16-pro":o({name:"iPhone 16 Pro",width:402,height:874,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:61,continuousCornerRadius:84.661,bezelWidth:15.3,dynamicIsland:{width:126,height:38,top:13.5},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:n([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-16-pro-max":o({name:"iPhone 16 Pro Max",width:440,height:956,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:61.3,continuousCornerRadius:85.163,bezelWidth:15.4,dynamicIsland:{width:126,height:38,top:14},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:n([178.8,32.2],[266.8,61.8],[352.7,61.8],[292.2,98.3])}),"iphone-17":o({name:"iPhone 17",width:402,height:874,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:61,continuousCornerRadius:84.661,bezelWidth:15.3,dynamicIsland:{width:126,height:37.3,top:14},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:n([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-17-air":o({name:"iPhone Air",width:420,height:912,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:64.6,continuousCornerRadius:88.313,bezelWidth:15.4,dynamicIsland:{width:126,height:38,top:20},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:n([178.8,32.2],[266.8,61.8],[352.7,61.8],[292.2,98.3])}),"iphone-17-pro":o({name:"iPhone 17 Pro",width:402,height:874,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:61,continuousCornerRadius:84.661,bezelWidth:15.3,dynamicIsland:{width:126,height:38,top:14},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:n([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-17-pro-max":o({name:"iPhone 17 Pro Max",width:440,height:956,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:61.3,continuousCornerRadius:85.163,bezelWidth:15.4,dynamicIsland:{width:126,height:38,top:14},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:n([178.8,32.2],[266.8,61.8],[352.7,61.8],[292.2,98.3])}),"pixel-8":{platform:"android",name:"Pixel 8",width:412,height:915,scale:2.625,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:i,navigationBarMode:"gesture",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:39,continuousCornerRadius:39,bezelWidth:13,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:i,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 8",physicalPPI:428,hardwareButtons:h},"pixel-8-three-button":{platform:"android",name:"Pixel 8 (3-button)",width:412,height:915,scale:2.625,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:48,navigationBarMode:"three-button",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:39,continuousCornerRadius:39,bezelWidth:13,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:48,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 8",physicalPPI:428,hardwareButtons:h},"pixel-9-pro-xl":{platform:"android",name:"Pixel 9 Pro XL",width:448,height:997,scale:3,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:i,navigationBarMode:"gesture",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:41,continuousCornerRadius:41,bezelWidth:12,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:i,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 9 Pro XL",physicalPPI:486,hardwareButtons:h},"galaxy-s24":{platform:"android",name:"Galaxy S24",width:360,height:780,scale:3,statusBarHeight:36,homeIndicatorHeight:0,navigationBarHeight:i,navigationBarMode:"gesture",displayCutout:{top:36,bottom:0,left:0,right:0},cornerRadius:36,continuousCornerRadius:36,bezelWidth:8,dynamicIsland:null,cameraCutout:{diameter:18},safeAreaInsets:{top:36,bottom:i,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Samsung",brand:"samsung",modelName:"SM-S921B",physicalPPI:416,hardwareButtons:f},"galaxy-s24-ultra":{platform:"android",name:"Galaxy S24 Ultra",width:384,height:824,scale:3.75,statusBarHeight:36,homeIndicatorHeight:0,navigationBarHeight:i,navigationBarMode:"gesture",displayCutout:{top:36,bottom:0,left:0,right:0},cornerRadius:24,continuousCornerRadius:24,bezelWidth:9,dynamicIsland:null,cameraCutout:{diameter:18},safeAreaInsets:{top:36,bottom:i,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Samsung",brand:"samsung",modelName:"SM-S928B",physicalPPI:505,hardwareButtons:f}},b="iphone-17-pro";function v(e){return p[e]}function g(){return Object.keys(p)}function B(){return g().filter(e=>!p[e].experimental)}var c={"iphone-6-9":{name:"iphone-6-9",label:'iPhone 6.7"',width:1284,height:2778,store:"apple"},"iphone-6-1":{name:"iphone-6-1",label:'iPhone 6.5"',width:1242,height:2688,store:"apple"},"android-phone":{name:"android-phone",label:"Google Play phone",width:1080,height:1920,store:"google"},"android-tablet-7":{name:"android-tablet-7",label:'Google Play 7" tablet',width:1200,height:1920,store:"google"},"android-tablet-10":{name:"android-tablet-10",label:'Google Play 10" tablet',width:1600,height:2560,store:"google"}},d={dark:{type:"gradient",direction:180,glow:"#4caeff",stops:[{offset:0,color:"#111827"},{offset:40,color:"#101725"},{offset:100,color:"#06080d"}]},cyan:{type:"gradient",direction:180,glow:"#25c3ec",stops:[{offset:0,color:"#1b465c"},{offset:32,color:"#122336"},{offset:100,color:"#05070b"}]},gold:{type:"gradient",direction:180,glow:"#ffc25a",stops:[{offset:0,color:"#3b2f1a"},{offset:34,color:"#18140d"},{offset:100,color:"#050505"}]},red:{type:"gradient",direction:180,glow:"#ff6178",stops:[{offset:0,color:"#3e1018"},{offset:35,color:"#17080c"},{offset:100,color:"#050405"}]}},R={color:"#25c3ec",blur:120,spread:52,opacity:.34},I="iphone-17-pro";var w=[{name:"white",value:"#ffffff"},{name:"gray-light",value:"#d1d5db"},{name:"gray",value:"#6b7280"},{name:"gray-dark",value:"#3b4350"},{name:"slate",value:"#2a3644"},{name:"black",value:"#000000"},{name:"cyan",value:"#25c3ec"},{name:"blue",value:"#3f7cff"},{name:"teal",value:"#1fc7b4"},{name:"green",value:"#42c95d"},{name:"lime",value:"#92d21b"},{name:"gold",value:"#f5c518"},{name:"orange",value:"#ff912e"},{name:"coral",value:"#ff6f5b"},{name:"red",value:"#ff4f6f"},{name:"berry",value:"#d054ff"},{name:"magenta",value:"#ff4eb8"}],y=Object.fromEntries(w.map(e=>[e.name,e.value]));function A(e){return y[e]??y.gray}function T(e){return Object.prototype.hasOwnProperty.call(c,e)?c[e]:null}function x(e){return{type:e.type,color:e.color,direction:e.direction,glow:e.glow,stops:e.stops?.map(t=>({...t}))}}function k(e){return Object.prototype.hasOwnProperty.call(d,e)?x(d[e]):null}var m={deviceModel:{type:"enum",default:b,description:"device model to simulate",cliFlag:"device",cliFlagShort:"d",options:g(),group:"device"},orientation:{type:"enum",default:"portrait",description:"screen orientation",cliFlag:"orientation",options:["portrait","landscape"],group:"device"},colorScheme:{type:"enum",default:"auto",description:"color scheme (auto follows system preference)",cliFlag:"theme",cliFlagShort:"t",options:["light","dark","auto"],group:"appearance"},reduceMotion:{type:"boolean",default:!1,description:"reduce motion",group:"appearance"},boldText:{type:"boolean",default:!1,description:"bold text",group:"appearance"},fontSize:{type:"number",default:1,description:"font size multiplier (1.0 = default)",group:"appearance",validate:e=>e>=.5&&e<=2},networkCondition:{type:"enum",default:"wifi",description:"simulated network condition",cliFlag:"network",options:["wifi","lte","fast-3g","slow-3g","offline"],group:"network"},language:{type:"string",default:"en",description:"language code (ISO 639-1)",cliFlag:"language",group:"locale"},region:{type:"string",default:"US",description:"region code (ISO 3166-1)",cliFlag:"region",group:"locale"},renderDensity:{type:"number",default:0,description:"render density override in device pixels per point for high-resolution capture (0 = device native)",group:"simulator",validate:e=>e===0||e>=1&&e<=9},showTouches:{type:"boolean",default:!1,description:"show touch indicators",group:"simulator"},showFrame:{type:"boolean",default:!0,description:"show device frame",cliFlag:"frame",group:"simulator"},showTopBar:{type:"boolean",default:!0,description:"show simulator top bar",group:"simulator"},screenshotMode:{type:"boolean",default:!1,description:"show screenshot composition mode in the browser shell",group:"simulator"},screenshotCanvasEditing:{type:"boolean",default:!1,description:"experimental figma-style slide editing: draggable copy block, drop-in image layers (owner review pending)",group:"simulator"},threeMode:{type:"boolean",default:!1,description:"show the experimental 3d device stage in the browser shell",group:"simulator"},threeRecordingEditor:{type:"boolean",default:!1,description:"dock the 3d recording editor in the 3d stage (toggled from its rail)",group:"simulator"},screenshotCanvas:{type:"enum",default:"iphone-6-9",description:"target app-store canvas preset for screenshot mode",options:Object.keys(c),group:"simulator"},screenshotBackground:{type:"enum",default:"dark",description:"background preset rendered inside the screenshot canvas",options:Object.keys(d),group:"simulator"},screenshotText:{type:"enum",default:"bold-top",description:"text layout preset for the screenshot canvas",options:["bold-top","editorial-left","minimal-bottom","none"],group:"simulator"},screenshotPose:{type:"enum",default:"straight",description:"device pose preset inside the screenshot canvas",options:["straight","tilted-left","tilted-right","cut-bottom","cut-top"],group:"simulator"},screenshotDynamicSize:{type:"boolean",default:!1,description:"let the screenshot canvas rect fit available space (off = pin to exact preset pixels)",group:"simulator"},showStatusBar:{type:"boolean",default:!0,description:"show status bar",group:"simulator"},showHomeIndicator:{type:"boolean",default:!0,description:"show home indicator",group:"simulator"},alwaysShowLiveWebViews:{type:"boolean",default:!1,description:"always render WebViews as live browser views",group:"simulator"},a11yMode:{type:"enum",default:"delayed",description:"accessibility tree sync mode (off, delayed=100ms, active=30ms)",options:["off","delayed","active"],group:"simulator"},a11yDepth:{type:"enum",default:"deep",description:"accessibility tree structure depth (shallow or deep)",options:["shallow","deep"],group:"simulator"},inspectMode:{type:"boolean",default:!1,description:"inspect mode",group:"simulator"},errorReporting:{type:"boolean",default:!1,description:"send anonymous crash reports",group:"privacy"},agentProvider:{type:"enum",default:"codex",description:"ai agent used by the sootsim agent prompt bar",options:["codex","claude"],group:"agent"},onboardingComplete:{type:"boolean",default:!1,description:"first-run onboarding completed",group:"beta"},betaConsentVersion:{type:"number",default:0,description:"last accepted beta telemetry policy version",group:"beta"},detailedTelemetry:{type:"boolean",default:!0,description:"send detailed usage telemetry (sessions, perf samples)",group:"beta"}};function P(){if(typeof window>"u")return{};let e={};try{let t=new URLSearchParams(window.location.search),r=t.get("device");r&&m.deviceModel.options?.includes(r)&&(e.deviceModel=r),t.get("ssMode")==="1"&&(e.screenshotMode=!0),t.get("filmStage")==="1"&&(e.threeMode=!0);let a=Number(t.get("renderDensity"));Number.isFinite(a)&&a>=1&&a<=9&&(e.renderDensity=a),t.get("ssEdit")==="1"&&(e.screenshotCanvasEditing=!0);let u=t.get("colorScheme")??t.get("theme");u&&m.colorScheme.options?.includes(u)&&(e.colorScheme=u);let s=t.get("reduceMotion");s==="1"||s==="true"?e.reduceMotion=!0:(s==="0"||s==="false")&&(e.reduceMotion=!1);let l=t.get("alwaysShowLiveWebViews");l==="1"||l==="true"?e.alwaysShowLiveWebViews=!0:(l==="0"||l==="false")&&(e.alwaysShowLiveWebViews=!1)}catch{}return e}function M(){let e={};for(let[t,r]of Object.entries(m))e[t]=r.default;return Object.assign(e,P()),e}export{R as a,I as b,A as c,T as d,x as e,k as f,p as g,v as h,B as i,m as j,P as k,M as l};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.259 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import{h as b,j as f,k,l as w}from"./chunk-GWSEPKCY.js";var y="sootsim:settings",g=["errorReporting","colorScheme","reduceMotion","a11yMode","a11yDepth","screenshotCanvas","screenshotBackground","screenshotText","screenshotPose","screenshotDynamicSize","alwaysShowLiveWebViews","agentProvider","onboardingComplete","betaConsentVersion","detailedTelemetry"];function m(){if(typeof window>"u")return null;let e=window.sootsimElectron;return e&&typeof e=="object"?e:null}function u(e){let n={};for(let t of g){if(!(t in e))continue;let i=e[t],o=f[t];o.validate&&!o.validate(i)||o.options&&!o.options.includes(i)||(n[t]=i)}return n}function V(e){let n={};for(let t of g)n[t]=e[t];return n}function D(){if(typeof localStorage>"u")return{};try{let e=localStorage.getItem(y);return e?u(JSON.parse(e)):{}}catch{return{}}}function j(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(y,JSON.stringify(e))}catch{}}function x(){let n=m()?.sharedConfig?.settings;return!n||typeof n!="object"?{}:u(n)}function M(e){let n=m();if(n?.writeSharedConfig)try{n.writeSharedConfig({settings:e})}catch{}}function C(){if(typeof window>"u")return null;let e=window.__sootsimSharedConfig;return e&&typeof e=="object"?e:null}function T(){let e=C()?.settings;return!e||typeof e!="object"?{}:u(e)}function I(e){if(!C())return;let n={settings:e};try{if(globalThis.__sootsimBridgeRequest?.writeSharedConfig?.(n))return}catch{}if(!(typeof fetch>"u"))try{fetch("/__sootsim/shared-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),keepalive:!0}).catch(()=>{})}catch{}}function K(){let e=D(),n=T(),t=x();return{...e,...n,...t}}function P(e,n={}){let t=V(e);for(let i of g)n[i]!==void 0&&(t[i]=n[i]);j(t),M(t),I(t)}function _(e){if(typeof window>"u")return()=>{};let n=r=>{if(!(r.key!==y||r.newValue==null))try{e(u(JSON.parse(r.newValue)))}catch{}};window.addEventListener("storage",n);let t=m(),i;t?.onSharedConfigChanged&&(i=t.onSharedConfigChanged(r=>{let d=r?.settings;!d||typeof d!="object"||e(u(d))}));let c=globalThis.__sootsimBridgeRequest?.subscribeSharedConfig?.(r=>{let d=r?.settings;!d||typeof d!="object"||e(u(d))});return()=>{window.removeEventListener("storage",n),i?.(),c?.()}}var B=k(),L=w(),S=K(),l=new Set,h={};for(let e of g)B[e]!==void 0&&(l.add(e),S[e]!==void 0&&(h[e]=S[e]),delete S[e]);var s={...L,...S},p=[],a=null;function v(){for(let e of p)e()}function R(){v(),P(s,h)}function E(e,n){let t=f[e];return t.validate&&!t.validate(n)||t.options&&!t.options.includes(n)||s[e]===n?!1:(s={...s,[e]:n},e==="deviceModel"&&(a=null),!0)}_(e=>{let n={...s},t=!1;for(let[i,o]of Object.entries(e)){let c=i;if(l.has(c)){h[c]=o;continue}n[c]!==o&&(n[c]=o,t=!0)}t&&(s=n,a=null,v())});var N={get(e){return s[e]},set(e,n){E(e,n)&&R()},setRuntime(e,n){l.has(e)||(l.add(e),g.includes(e)&&(h[e]=s[e])),E(e,n)&&v()},isRuntimeControlled(e){return l.has(e)},getAll(){return s},apply(e){let n=!1,t={...s};for(let[i,o]of Object.entries(e)){if(o===void 0)continue;let c=i,r=f[c];r&&(r.validate&&!r.validate(o)||r.options&&!r.options.includes(o)||t[c]!==o&&(t[c]=o,n=!0))}n&&(s=t,a=null,R())},reset(){s=w(),a=null,R()},subscribe(e){return p.push(e),()=>{p=p.filter(n=>n!==e)}},getDeviceSpec(){return a||(a=b(s.deviceModel)),a},getA11yMode(){return s.a11yMode},setA11yMode(e){this.set("a11yMode",e)},getInspectMode(){return s.inspectMode},setInspectMode(e){this.set("inspectMode",e)}};export{N as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.259 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.259 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import{a,b,c,d,e}from"./chunk-Z5OYAYQO.js";import"./chunk-D3T6TPWZ.js";import"./chunk-KUUI2GRK.js";import"./chunk-ANBTDAWQ.js";import"./chunk-YSVATVIB.js";import"./chunk-7E5C6Y2O.js";import"./chunk-2DDWJAT5.js";import"./chunk-BYBAZTMQ.js";import"./chunk-OVZ4WWJC.js";import"./chunk-UDZJW6SR.js";import"./chunk-2GC6B6ZJ.js";import"./chunk-X4X3S7AO.js";import"./chunk-ARUD4K7V.js";import"./chunk-GWSEPKCY.js";import"./chunk-5NNPUZ4U.js";export{c as daemonInstall,b as getDaemonServiceStatus,a as runDaemon,d as teardownDaemonService,e as teardownSootsimHome};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.259 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import{e as P}from"./chunk-NI2TLQ7P.js";import"./chunk-IAE5QGBW.js";import"./chunk-YI4ZUUFY.js";import"./chunk-HLI3NHBR.js";import"./chunk-EQEZMYYU.js";import{c as _,d as I,e as D}from"./chunk-3BEO6YPO.js";import{a as b}from"./chunk-5BFCOQAM.js";import"./chunk-Q7GIZYXH.js";import"./chunk-KKKRQKVE.js";import"./chunk-QVRTNQRH.js";import"./chunk-V4TOXWP7.js";import"./chunk-46SE2OG4.js";import"./chunk-4SDLMKK5.js";import"./chunk-QLTUXFJF.js";import"./chunk-VCTPUENT.js";import"./chunk-MGK5XZSP.js";import"./chunk-XVDDOJWS.js";import"./chunk-4WWQ4SHW.js";import"./chunk-55HDNMCI.js";import"./chunk-OSHPYGDN.js";import"./chunk-D3T6TPWZ.js";import"./chunk-KUUI2GRK.js";import"./chunk-7E5C6Y2O.js";import"./chunk-2DDWJAT5.js";import"./chunk-BYBAZTMQ.js";import"./chunk-OVZ4WWJC.js";import"./chunk-UDZJW6SR.js";import"./chunk-2GC6B6ZJ.js";import"./chunk-NXZAVEZK.js";import"./chunk-GWSEPKCY.js";import"./chunk-5NNPUZ4U.js";import{spawn as N}from"child_process";import{existsSync as x,mkdirSync as k,readFileSync as A,writeFileSync as w,unlinkSync as M}from"fs";import{tmpdir as F}from"os";import{dirname as L,resolve as l,join as R,relative as C}from"path";function W(){try{let e=import.meta.resolve("sootsim/detox");return L(e.startsWith("file://")?e.slice(7):e)}catch{return l(import.meta.dirname,"..","..","detox")}}var B=`
|
|
3
|
-
sootsim detox \u2014 run detox-style tests against a sootsim shell
|
|
4
|
-
|
|
5
|
-
usage:
|
|
6
|
-
sootsim detox [testFiles...] run all tests under e2e/, test/e2e/, or detox/
|
|
7
|
-
sootsim detox --config <path> use a specific jest config
|
|
8
|
-
sootsim detox init scaffold sootsim-detox.config.cjs + sample test
|
|
9
|
-
sootsim detox --watch jest watch mode
|
|
10
|
-
sootsim detox --headed keep the sootsim shell window visible
|
|
11
|
-
sootsim detox -t <pattern> pass a jest --testNamePattern
|
|
12
|
-
sootsim detox --no-launch skip auto-launching a sootsim shell
|
|
13
|
-
|
|
14
|
-
sootsim detox auto-launches a sootsim shell if none is running on the
|
|
15
|
-
expected port. disable with --no-launch if you're managing the shell yourself.
|
|
16
|
-
`;async function se(e,s={}){if((e.includes("--help")||e.includes("-h"))&&(console.log(B),process.exit(0)),e[0]==="init")return z();let i=t=>{let o=e.indexOf(t);return o>=0?e[o+1]:void 0},n=t=>e.includes(t),u=n("--watch"),f=n("--headed"),d=n("--no-launch"),T=i("--config"),p=s.port||Number(process.env.SOOTSIM_PORT)||5173,$=e.filter((t,o)=>{if(t.startsWith("--")||t==="-t"||t==="-h")return!1;let c=e[o-1];return!(c==="--config"||c==="-t"||c==="--testNamePattern"||c==="--grep")}),E=e.filter(t=>t==="--runInBand"||t.startsWith("--maxWorkers=")),O=["e2e","test/e2e","detox"],a=process.env.SOOTSIM_TEST_DIR?l(process.cwd(),process.env.SOOTSIM_TEST_DIR):null;if(!a)for(let t of O){let o=l(process.cwd(),t);if(x(o)){a=o;break}}a||(console.error(` error: no detox tests found. expected one of: ${O.join(", ")}
|
|
17
|
-
run 'sootsim detox init' to scaffold a starter suite.`),process.exit(1)),d||await V(p);let r=["jest"],h=T||H(["sootsim-detox.config.cjs","jest.config.cjs","jest.config.js"]),m=null;if(h)r.push("--config",l(process.cwd(),h));else{let t=l(W(),"jest-preset.cjs");m=R(F(),`sootsim-detox-${process.pid}.config.cjs`);let o={rootDir:a,roots:["<rootDir>"],testMatch:["<rootDir>/**/*.test.ts","<rootDir>/**/*.test.js"]};w(m,`module.exports = { ...require(${JSON.stringify(t)}), ...${JSON.stringify(o)} }
|
|
18
|
-
`),r.push("--config",m)}u&&r.push("--watch");let y=i("-t")||i("--testNamePattern")||i("--grep");y&&r.push("-t",y);let v=b(),j=!u&&_({uploadedShare:!1,auth:v}),g=process.env.SOOTSIM_JEST_OUTPUT_FILE||null;process.env.SOOTSIM_JEST_JSON==="1"&&r.push("--json"),process.env.SOOTSIM_JEST_OUTPUT_FILE?r.push("--outputFile",process.env.SOOTSIM_JEST_OUTPUT_FILE):j&&(g=R(F(),`sootsim-detox-results-${process.pid}.json`),r.push("--json","--outputFile",g)),r.push(...E),r.push(...$),console.log(" sootsim detox"),console.log(` test dir: ${a}`),console.log(` port: ${p}${f?" (headed)":""}`),h&&console.log(` config: ${h}`);let U=N("npx",r,{cwd:process.cwd(),stdio:"inherit",env:{...process.env,SOOTSIM_TEST_DIR:a,SOOTSIM_PORT:String(p),SOOTSIM_HEADED:f?"1":"",SOOTSIM_URL:process.env.SOOTSIM_URL||`http://localhost:${p}`}}),J=Date.now(),S=await new Promise(t=>U.on("exit",o=>t(o||0)));if(m)try{M(m)}catch{}if(j){let t=g?q(g):null,o=await D(),c=await I({origin:o,kind:"detox",name:C(process.cwd(),a)||"e2e",status:S===0?"passed":"failed",summary:t?`${t.numPassedTests}/${t.numTotalTests} tests passed`:null,failureMessage:S===0?null:t?.firstFailure??null,stepCount:t?.numTotalTests??null,failedStepIndex:t?.firstFailedIndex??null,durationMs:Date.now()-J,auth:v});c&&console.log(` run: ${c.id}`)}process.exit(S)}function q(e){try{let s=JSON.parse(A(e,"utf8")),i=null,n=null,u=0;for(let f of s.testResults??[])for(let d of f.testResults??[]){if(n==null&&d.status==="failed"){n=u;let T=d.failureMessages?.[0]?.split(`
|
|
19
|
-
`)[0];i=[d.fullName,T].filter(Boolean).join(": ")||null}u+=1}return typeof s.numTotalTests!="number"?null:{numTotalTests:s.numTotalTests,numPassedTests:s.numPassedTests??0,firstFailure:i,firstFailedIndex:n}}catch{return null}finally{if(!process.env.SOOTSIM_JEST_OUTPUT_FILE)try{M(e)}catch{}}}function H(e){for(let s of e)if(x(l(process.cwd(),s)))return s;return null}async function V(e){await P()||console.warn(` warn: no sootsim shell reachable on :${e}. start one with \`bun run dev:sootsim:shell\`
|
|
20
|
-
or pass --no-launch if you're managing the shell yourself.`)}function z(){let e=process.cwd(),s=l(e,"sootsim-detox.config.cjs");x(s)?console.log(` skip: ${s} already exists`):(w(s,`// sootsim detox jest config.
|
|
21
|
-
// extends the sootsim preset, which rewrites \`import ... from 'detox'\`
|
|
22
|
-
// to the sootsim driver and keeps your jest transforms intact.
|
|
23
|
-
|
|
24
|
-
/** @type {import('@jest/types').Config.InitialOptions} */
|
|
25
|
-
module.exports = {
|
|
26
|
-
preset: 'sootsim/detox/jest-preset',
|
|
27
|
-
rootDir: __dirname,
|
|
28
|
-
testMatch: ['<rootDir>/e2e/**/*.test.ts', '<rootDir>/e2e/**/*.test.js'],
|
|
29
|
-
}
|
|
30
|
-
`),console.log(` created ${s}`));let i=l(e,"e2e"),n=l(i,"example.test.ts");x(n)?console.log(` skip: ${n} already exists`):(k(i,{recursive:!0}),w(n,`// sample sootsim detox test. resolve \`detox\` via the jest preset in
|
|
31
|
-
// sootsim-detox.config.cjs \u2014 no extra imports required.
|
|
32
|
-
|
|
33
|
-
import { by, device, element, expect, waitFor } from 'detox'
|
|
34
|
-
|
|
35
|
-
describe('example', () => {
|
|
36
|
-
beforeAll(async () => {
|
|
37
|
-
await device.launchApp()
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
it('shows the welcome text', async () => {
|
|
41
|
-
await waitFor(element(by.text('Welcome'))).toBeVisible().withTimeout(5000)
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
it('taps a button by id', async () => {
|
|
45
|
-
await element(by.id('start-button')).tap()
|
|
46
|
-
await expect(element(by.id('home-screen'))).toBeVisible()
|
|
47
|
-
})
|
|
48
|
-
})
|
|
49
|
-
`),console.log(` created ${n}`)),console.log(`
|
|
50
|
-
next:`),console.log(" sootsim detox # run the sample"),console.log(" sootsim detox --watch"),process.exit(0)}export{se as runDetox};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.259 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import"./chunk-4TKQWCCG.js";import{f as a,g as b,h as c,i as d,j as e,k as f,l as g,m as h,n as i}from"./chunk-V4TOXWP7.js";import"./chunk-46SE2OG4.js";import"./chunk-VCTPUENT.js";import"./chunk-OVZ4WWJC.js";import"./chunk-2GC6B6ZJ.js";import"./chunk-5NNPUZ4U.js";export{e as ALL_DRIVERS,i as buildDriverListRows,a as chromiumDriver,b as electronDriver,f as getAllDrivers,g as getDriver,c as playwrightDriver,h as resolveDriver,d as systemDriver};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.259 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import{c,d,e,f,g,h}from"./chunk-NI2TLQ7P.js";import"./chunk-IAE5QGBW.js";import"./chunk-YI4ZUUFY.js";import{c as a,d as b}from"./chunk-HLI3NHBR.js";import"./chunk-EQEZMYYU.js";import"./chunk-3BEO6YPO.js";import"./chunk-5BFCOQAM.js";import"./chunk-Q7GIZYXH.js";import"./chunk-KKKRQKVE.js";import"./chunk-QVRTNQRH.js";import"./chunk-V4TOXWP7.js";import"./chunk-46SE2OG4.js";import"./chunk-4SDLMKK5.js";import"./chunk-QLTUXFJF.js";import"./chunk-VCTPUENT.js";import"./chunk-MGK5XZSP.js";import"./chunk-XVDDOJWS.js";import"./chunk-4WWQ4SHW.js";import"./chunk-55HDNMCI.js";import"./chunk-OSHPYGDN.js";import"./chunk-D3T6TPWZ.js";import"./chunk-KUUI2GRK.js";import"./chunk-7E5C6Y2O.js";import"./chunk-2DDWJAT5.js";import"./chunk-BYBAZTMQ.js";import"./chunk-OVZ4WWJC.js";import"./chunk-UDZJW6SR.js";import"./chunk-2GC6B6ZJ.js";import"./chunk-NXZAVEZK.js";import"./chunk-GWSEPKCY.js";import"./chunk-5NNPUZ4U.js";export{e as discoverSootsimUrl,c as getLastFlowPreviewUploadResult,d as getLastFlowTraceSteps,g as hoistLeadingSimFlag,a as parseFlowFile,f as runFlowPlayback,h as runMaestroAuthoring,b as validateFlowFile};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.259 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import{a,b,c}from"./chunk-ANBTDAWQ.js";import"./chunk-YSVATVIB.js";import"./chunk-7E5C6Y2O.js";import"./chunk-2DDWJAT5.js";import"./chunk-BYBAZTMQ.js";import"./chunk-OVZ4WWJC.js";import"./chunk-UDZJW6SR.js";import"./chunk-2GC6B6ZJ.js";import"./chunk-X4X3S7AO.js";import"./chunk-ARUD4K7V.js";import"./chunk-GWSEPKCY.js";import"./chunk-5NNPUZ4U.js";export{c as printCommandHelp,b as printGroupHelp,a as printHelp};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.259 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import{j as a,k as b}from"./chunk-HLI3NHBR.js";import"./chunk-EQEZMYYU.js";import"./chunk-Q7GIZYXH.js";import"./chunk-KKKRQKVE.js";import"./chunk-QVRTNQRH.js";import"./chunk-V4TOXWP7.js";import"./chunk-46SE2OG4.js";import"./chunk-4SDLMKK5.js";import"./chunk-QLTUXFJF.js";import"./chunk-VCTPUENT.js";import"./chunk-MGK5XZSP.js";import"./chunk-XVDDOJWS.js";import"./chunk-4WWQ4SHW.js";import"./chunk-55HDNMCI.js";import"./chunk-OSHPYGDN.js";import"./chunk-7E5C6Y2O.js";import"./chunk-2DDWJAT5.js";import"./chunk-BYBAZTMQ.js";import"./chunk-OVZ4WWJC.js";import"./chunk-UDZJW6SR.js";import"./chunk-2GC6B6ZJ.js";import"./chunk-NXZAVEZK.js";import"./chunk-GWSEPKCY.js";import"./chunk-5NNPUZ4U.js";export{a as printShellPerfReport,b as runInspect};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.259 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import{a as x}from"./chunk-EQEZMYYU.js";import{b as O,d as k,e as A}from"./chunk-3BEO6YPO.js";import{a as v,b as T}from"./chunk-5BFCOQAM.js";import"./chunk-4SDLMKK5.js";import"./chunk-QLTUXFJF.js";import"./chunk-VCTPUENT.js";import{f as y}from"./chunk-4WWQ4SHW.js";import{g as b,i as S}from"./chunk-55HDNMCI.js";import"./chunk-D3T6TPWZ.js";import"./chunk-KUUI2GRK.js";import"./chunk-BYBAZTMQ.js";import"./chunk-OVZ4WWJC.js";import"./chunk-2GC6B6ZJ.js";import"./chunk-5NNPUZ4U.js";import{mkdtempSync as j,writeFileSync as N}from"fs";import{tmpdir as C}from"os";import{join as E}from"path";var J=process.env.SOOTSIM_TEST_MODEL||"deepseek-v4-flash",_=18e3,V=18e4;function f(e,t){let r=e.indexOf(t);return r>=0?e[r+1]:void 0}function G(e,t){for(let r of t){let o=f(e,r);if(o)return o}}var F=new Set(["--origin","--preview-origin","--public-origin","--preview-public-origin","--owner","--repo","--url","--driver","--sim","--device","--slow","--tail-wait","--remap","--replace"]);function H(e){for(let t=0;t<e.length;t++){let r=e[t];if(r){if(F.has(r)){t+=1;continue}if(!r.startsWith("-"))return{prompt:r,index:t}}}return null}function Y(e,t){return e.filter((r,o)=>o!==t)}async function K(e,t){let r=Y(e,t),o=b(r,{stripBooleanFlags:["--new","--headless","--headed","--electron","--preview-open"],stripValueFlags:[...F]}),i=S(o);try{let s=await y(i,{describe:!0,verbose:!1,filter:"",compact:!0,hideXy:!0}),a=[s.shell?`shell: ${JSON.stringify(s.shell)}`:"",s.keyboard?`keyboard: ${JSON.stringify(s.keyboard)}`:"",typeof s.nodeCount=="number"?`nodes: ${s.nodeCount}`:"",s.tree||""].filter(Boolean).join(`
|
|
3
|
-
`);return a.length>_?a.slice(0,_)+`
|
|
4
|
-
[tree truncated]`:a}finally{i.close()}}var z=`
|
|
5
|
-
You write Maestro-compatible SootSim YAML flows from a user's plain-language test goal.
|
|
6
|
-
Return only JSON, no markdown, with this exact shape:
|
|
7
|
-
{"summary":"short human-readable result goal","steps":[{"waitFor":{"text":"...","timeout":10000}}]}
|
|
8
|
-
|
|
9
|
-
Use only these flow commands:
|
|
10
|
-
- waitFor: { "text"?: string, "id"?: string, "timeout"?: number }
|
|
11
|
-
- assertVisible: string or { "text"?: string, "id"?: string }
|
|
12
|
-
- assertNotVisible: string or { "text"?: string, "id"?: string }
|
|
13
|
-
- tapOn: string or { "text"?: string, "id"?: string, "index"?: number }
|
|
14
|
-
- inputText: string
|
|
15
|
-
- pressKey: string
|
|
16
|
-
- hideKeyboard: true
|
|
17
|
-
- swipe: { "direction": "UP" | "DOWN" | "LEFT" | "RIGHT", "duration"?: number }
|
|
18
|
-
- waitForAnimationToEnd: true
|
|
19
|
-
- takeScreenshot: "label"
|
|
20
|
-
|
|
21
|
-
Prefer ids/testIDs from the tree. Prefer visible text when no id exists.
|
|
22
|
-
Do not invent app-specific data that is not visible. Keep the flow short.
|
|
23
|
-
End with an assertion or wait that proves the user's goal.
|
|
24
|
-
`.trim();function W(e,t){return`
|
|
25
|
-
User goal:
|
|
26
|
-
${e}
|
|
27
|
-
|
|
28
|
-
Current SootSim visible tree:
|
|
29
|
-
${t||"[no tree available]"}
|
|
30
|
-
|
|
31
|
-
Generate the shortest replayable flow that verifies the goal from this current state.
|
|
32
|
-
`.trim()}function M(e){return typeof e=="string"?e:Array.isArray(e)?e.map(t=>t&&typeof t=="object"&&t.type==="text"?String(t.text??""):"").join(""):""}async function X(e){let t=await fetch(`${e.origin.replace(/\/$/,"")}/api/llm`,{method:"POST",headers:{"content-type":"application/json",authorization:e.authHeader},body:JSON.stringify({modelId:J,context:{systemPrompt:z,messages:[{role:"user",content:W(e.prompt,e.describe),timestamp:Date.now()}]},options:{maxTokens:1800,temperature:.2},threadId:null}),signal:AbortSignal.timeout(V)});if(!t.ok||!t.body){let c=await t.text().catch(()=>"");throw new Error(`/api/llm ${t.status}${c?`: ${c}`:""}`)}let r=t.body.getReader(),o=new TextDecoder,i=[],s="",l="",a=c=>{let d=c.trim();if(!d)return;let n=JSON.parse(d);if(n.type==="text_delta"&&n.delta)i.push(n.delta);else if(n.type==="text_end"&&n.content)s=n.content;else if(n.type==="done")s=M(n.message?.content);else if(n.type==="error")throw new Error(n.error?.errorMessage||M(n.error?.content)||"llm error")};for(;;){let{value:c,done:d}=await r.read();if(d)break;l+=o.decode(c,{stream:!0});let n;for(;(n=l.indexOf(`
|
|
33
|
-
`))>=0;)a(l.slice(0,n)),l=l.slice(n+1)}l+=o.decode(),l.trim()&&a(l);let u=(s||i.join("")).trim();if(!u)throw new Error("llm returned an empty test flow");return u}function q(e){let t=e.match(/```(?:json)?\s*([\s\S]*?)```/i),r=t?t[1]:e.slice(e.indexOf("{"),e.lastIndexOf("}")+1);return JSON.parse(r)}function P(e){return!!(e&&typeof e=="object"&&!Array.isArray(e))}function Q(e){let t=q(e);if(!P(t))throw new Error("llm did not return a JSON object");let r=typeof t.summary=="string"&&t.summary.trim()?t.summary.trim().slice(0,500):"SootSim generated test",o=t.steps;if(!Array.isArray(o)||o.length===0)throw new Error("llm returned no flow steps");let i=o.map((s,l)=>{if(!P(s))throw new Error(`flow step ${l+1} is not an object`);return s});return{summary:r,steps:i,yamlText:x.stringify(i)}}function Z(e,t,r,o){let i=[r,"--preview","--preview-origin",o,"--billing-kind","test_run"],s=new Set(["--public-origin","--preview-public-origin","--owner","--repo","--url","--driver","--sim","--device","--slow","--tail-wait","--remap","--replace"]),l=new Set(["--new","--headless","--headed","--electron","--preview-open","--no-shell","--shell-only"]);for(let a=0;a<e.length;a++){if(a===t)continue;let u=e[a];if(u==="--origin"||u==="--preview-origin"){a+=1;continue}if(u==="--public-origin"){let c=e[a+1];c&&i.push("--preview-public-origin",c),a+=1;continue}if(s.has(u)){let c=e[a+1];c&&i.push(u,c),a+=1;continue}l.has(u)&&i.push(u)}return i}async function ce(e){let t=H(e);if(!t)return console.error(' usage: sootsim maestro generate "test goal"'),1;let{prompt:r,index:o}=t,i=v();if(!i||i.kind==="github")return console.error(' sootsim maestro generate "<goal>" needs a login or SOOTSIM_API_KEY.'),console.error(" API keys must include preview_upload and llm scopes."),1;let s=T(i),l=await A(G(e,["--origin","--preview-origin"]));console.log(" inspecting current sim\u2026");let a=await K(e,o);console.log(" generating Maestro flow\u2026");let u=await X({prompt:r,describe:a,origin:l,authHeader:s}),c=Q(u),d=j(E(C(),"sootsim-maestro-generate-")),n=E(d,"flow.yaml");N(n,c.yamlText),console.log(` flow: ${n}`);let I=Date.now(),{runFlowPlayback:$,getLastFlowPreviewUploadResult:D,getLastFlowTraceSteps:L}=await import("./flow-JV2H54P3.js"),U=Z(e,o,n,l),w=await $(U),p=D(),h=L(),B=h.find(R=>R.status==="failure"),g=w===0?"passed":"failed",m=await k({origin:l,kind:"maestro",prompt:r,summary:c.summary,status:g,failureMessage:g==="failed"?B?.error??"flow playback failed":null,previewShareId:p?.shareId??null,owner:f(e,"--owner")??null,repo:f(e,"--repo")??null,durationMs:Date.now()-I,flowYamlSizeBytes:Buffer.byteLength(c.yamlText,"utf8"),...O(h),auth:i});return console.log(`
|
|
34
|
-
result: ${g}`),m&&console.log(` run: ${m.id}`),p?.previewUrl&&console.log(` preview: ${p.previewUrl}`),m?.traceUrl&&console.log(` replay: ${m.traceUrl}`),w}export{ce as runMaestroGenerate};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.259 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import{a}from"./chunk-XJXI5J7N.js";import"./chunk-VUXUMQEC.js";import"./chunk-55HDNMCI.js";import"./chunk-BYBAZTMQ.js";import"./chunk-OVZ4WWJC.js";import"./chunk-2GC6B6ZJ.js";import"./chunk-5NNPUZ4U.js";export{a as runRuntime};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.259 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import{e as a,f as b,g as c}from"./chunk-3BEO6YPO.js";import"./chunk-5BFCOQAM.js";import"./chunk-4SDLMKK5.js";import"./chunk-QLTUXFJF.js";import"./chunk-VCTPUENT.js";import"./chunk-55HDNMCI.js";import"./chunk-D3T6TPWZ.js";import"./chunk-KUUI2GRK.js";import"./chunk-BYBAZTMQ.js";import"./chunk-OVZ4WWJC.js";import"./chunk-2GC6B6ZJ.js";import"./chunk-5NNPUZ4U.js";export{a as resolveDefaultUploadOrigin,b as resolvePublicPreviewOrigin,c as runUpload};
|