sootsim 0.1.232 → 0.1.233
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/dist-cli/bin.js +4 -4
- package/dist-cli/chunks/{agent-ZYXBVBKV.js → agent-FSAU46RP.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-T674ITPJ.js → agent-wrapper-C7OIZCDK.js} +2 -2
- package/dist-cli/chunks/{app-fonts-K7SXZISI.js → app-fonts-DXMHWUJT.js} +2 -2
- package/dist-cli/chunks/{assert-VLBPPU53.js → assert-WNFJZX3A.js} +2 -2
- package/dist-cli/chunks/{auth-N2YSIJWG.js → auth-3VWWSVDJ.js} +2 -2
- package/dist-cli/chunks/beta-FYKGC4H6.js +2 -0
- package/dist-cli/chunks/{camera-2HISM2VC.js → camera-2AXW72BD.js} +2 -2
- package/dist-cli/chunks/{chunk-K26I444J.js → chunk-3654N4EX.js} +2 -2
- package/dist-cli/chunks/{chunk-Z3VIVTZS.js → chunk-36ROSEUV.js} +1 -1
- package/dist-cli/chunks/{chunk-JLFLM25R.js → chunk-3DRMNDJ7.js} +1 -1
- package/dist-cli/chunks/{chunk-TA3JNI7A.js → chunk-3RIGVY4O.js} +1 -1
- package/dist-cli/chunks/{chunk-GR3HSBBW.js → chunk-3ZNQP22M.js} +2 -2
- package/dist-cli/chunks/{chunk-JSNKI3AX.js → chunk-46QQ23PF.js} +2 -2
- package/dist-cli/chunks/{chunk-7VV57LAC.js → chunk-5SAISMRK.js} +1 -1
- package/dist-cli/chunks/{chunk-NGTUX4OS.js → chunk-5W3SERZ3.js} +2 -2
- package/dist-cli/chunks/{chunk-LZK6NZLU.js → chunk-63LYNRZC.js} +2 -2
- package/dist-cli/chunks/{chunk-NQJ6EHGW.js → chunk-6GADJWCT.js} +2 -2
- package/dist-cli/chunks/{chunk-RMVUXVHN.js → chunk-7LEIOQSX.js} +1 -1
- package/dist-cli/chunks/{chunk-LUDBC2J3.js → chunk-AHNX3XFL.js} +1 -1
- package/dist-cli/chunks/{chunk-3LAVER6S.js → chunk-BOYWUXVQ.js} +3 -3
- package/dist-cli/chunks/{chunk-DEPM3RAJ.js → chunk-CBDZY232.js} +2 -2
- package/dist-cli/chunks/{chunk-E5KVZJLZ.js → chunk-DU2XIAOZ.js} +2 -2
- package/dist-cli/chunks/{chunk-IQ4GXAZH.js → chunk-FMZCSQXP.js} +3 -3
- package/dist-cli/chunks/{chunk-N37Q2X3Z.js → chunk-FQ5ISCZF.js} +2 -2
- package/dist-cli/chunks/{chunk-XHHT4CMD.js → chunk-G7DEABX5.js} +2 -2
- package/dist-cli/chunks/{chunk-I6PFJTSC.js → chunk-GQQZNMLJ.js} +1 -1
- package/dist-cli/chunks/{chunk-SJCQEGF4.js → chunk-HBD6YSQT.js} +1 -1
- package/dist-cli/chunks/{chunk-AJCLM5JM.js → chunk-IDGS2QTY.js} +1 -1
- package/dist-cli/chunks/{chunk-LL2KRCXL.js → chunk-K2MMUVAS.js} +1 -1
- package/dist-cli/chunks/{chunk-M6UUHHFL.js → chunk-KNGJ7VHE.js} +2 -2
- package/dist-cli/chunks/{chunk-2QLL7ZTJ.js → chunk-KR5WHNHB.js} +2 -2
- package/dist-cli/chunks/{chunk-4URI2MGG.js → chunk-KUHSSHBI.js} +1 -1
- package/dist-cli/chunks/{chunk-H4U7AD3S.js → chunk-LU5U5HEI.js} +2 -2
- package/dist-cli/chunks/{chunk-3BQN6WRJ.js → chunk-MGECBBZI.js} +2 -2
- package/dist-cli/chunks/{chunk-SBDYAXSF.js → chunk-OMQVA6X5.js} +2 -2
- package/dist-cli/chunks/chunk-PSEFQYVM.js +1 -0
- package/dist-cli/chunks/{chunk-ZEFNMBSK.js → chunk-Q3KYEB42.js} +1 -1
- package/dist-cli/chunks/{chunk-APDLWZH7.js → chunk-Q5SCJQUL.js} +2 -2
- package/dist-cli/chunks/{chunk-MXKSDA7J.js → chunk-QE7FDUJN.js} +3 -3
- package/dist-cli/chunks/{chunk-W7BAZFHN.js → chunk-RTLMLUPQ.js} +2 -2
- package/dist-cli/chunks/{chunk-GSM3KOU7.js → chunk-S7S2TXMP.js} +1 -1
- package/dist-cli/chunks/{chunk-UQWDGKY7.js → chunk-TB775GFN.js} +1 -1
- package/dist-cli/chunks/{chunk-QCVNJSEN.js → chunk-TQF5LD6Y.js} +1 -1
- package/dist-cli/chunks/chunk-UJZ337EP.js +1 -0
- package/dist-cli/chunks/{chunk-HORIFBHS.js → chunk-ULBICLEG.js} +2 -2
- package/dist-cli/chunks/{chunk-576MFPKR.js → chunk-WAVNZQ5B.js} +2 -2
- package/dist-cli/chunks/{chunk-2M62WMJ4.js → chunk-WBWRABBM.js} +2 -2
- package/dist-cli/chunks/{chunk-7BCDBZOP.js → chunk-WHSY2B3U.js} +2 -2
- package/dist-cli/chunks/{chunk-ITX76FQB.js → chunk-ZQBKE54L.js} +1 -1
- package/dist-cli/chunks/{chunk-K3QNZFXE.js → chunk-ZRQEHAES.js} +1 -1
- package/dist-cli/chunks/{chunk-UPVCNKFF.js → chunk-ZRRTM6WY.js} +2 -2
- package/dist-cli/chunks/{chunk-FVAYMAX3.js → chunk-ZXTPXUAL.js} +3 -3
- package/dist-cli/chunks/cli-version-CS57HE3I.js +2 -0
- package/dist-cli/chunks/{compat-2K4KZ6YB.js → compat-QFJSNZ7F.js} +3 -3
- package/dist-cli/chunks/{config-QXPCZYU7.js → config-FYNAEPT6.js} +2 -2
- package/dist-cli/chunks/{control-JFUKBGDB.js → control-AYMN3IBC.js} +2 -2
- package/dist-cli/chunks/daemon-UOJGRIKE.js +2 -0
- package/dist-cli/chunks/{debug-6CCPBFAD.js → debug-IGWPYQVC.js} +3 -3
- package/dist-cli/chunks/{desktop-3N7MIW4A.js → desktop-EKR2GZ6P.js} +3 -3
- package/dist-cli/chunks/{detox-QWVPGFZB.js → detox-JSFPSPI4.js} +2 -2
- package/dist-cli/chunks/{device-KIB4TN52.js → device-TOVWFBQJ.js} +2 -2
- package/dist-cli/chunks/{diagnose-M6MNCYNQ.js → diagnose-SKCJE2OJ.js} +2 -2
- package/dist-cli/chunks/drivers-VJLWPIKJ.js +2 -0
- package/dist-cli/chunks/{film-SEJDGF7B.js → film-7ZRUTIPW.js} +3 -3
- package/dist-cli/chunks/flow-4J2JB726.js +2 -0
- package/dist-cli/chunks/help-IZWZPAUI.js +2 -0
- package/dist-cli/chunks/{hidden-runtime-alias-X3ZNKKZX.js → hidden-runtime-alias-CNJPGHH3.js} +2 -2
- package/dist-cli/chunks/{home-paths-HEIXYMSP.js → home-paths-MUFDNXAD.js} +2 -2
- package/dist-cli/chunks/inspect-AELXHN3R.js +2 -0
- package/dist-cli/chunks/install-desktop-L4ZD5MNA.js +2 -0
- package/dist-cli/chunks/{login-PM66V7R2.js → login-575DYIFV.js} +4 -4
- package/dist-cli/chunks/{logout-F5QZ4ZGB.js → logout-FWSC6I62.js} +2 -2
- package/dist-cli/chunks/{maestro-FD7BPFRS.js → maestro-XVRDDQPC.js} +3 -3
- package/dist-cli/chunks/{maestro-generate-DBQRAIL5.js → maestro-generate-D2BWU3QI.js} +3 -3
- package/dist-cli/chunks/{mode-6P7F24QX.js → mode-5NB4ZSW7.js} +2 -2
- package/dist-cli/chunks/optional-demo-registry-4EYB4RJG.js +2 -0
- package/dist-cli/chunks/{perf-WJH3CUPE.js → perf-FHR37YVM.js} +2 -2
- package/dist-cli/chunks/{record-5LYWSKDK.js → record-ZKVEEOM3.js} +3 -3
- package/dist-cli/chunks/runtime-PFL2DHOG.js +2 -0
- package/dist-cli/chunks/{screenshot-command-7KLNMCZY.js → screenshot-command-ZZGUTSXV.js} +3 -3
- package/dist-cli/chunks/{screenshots-capture-7L4TFISK.js → screenshots-capture-BOUIB3JS.js} +2 -2
- package/dist-cli/chunks/{serve-HTFVXDL2.js → serve-YC7L66XG.js} +2 -2
- package/dist-cli/chunks/{setup-NZNQPY6O.js → setup-LUDPDJK4.js} +3 -3
- package/dist-cli/chunks/{skills-6BNHSBOU.js → skills-FQ55TVJQ.js} +2 -2
- package/dist-cli/chunks/{storage-L2RXZZFJ.js → storage-3KQFUZXP.js} +2 -2
- package/dist-cli/chunks/store-KVEMIG7O.js +2 -0
- package/dist-cli/chunks/telemetry-LZQKUZ6S.js +2 -0
- package/dist-cli/chunks/{timeline-KQS4WCD2.js → timeline-SUHWK7B7.js} +2 -2
- package/dist-cli/chunks/{upgrade-RSSNHKBP.js → upgrade-U5BIIO7Z.js} +2 -2
- package/dist-cli/chunks/upload-KRWZEVFY.js +2 -0
- package/dist-cli/chunks/{version-KIRBZT2R.js → version-JKCTZB5N.js} +2 -2
- package/dist-cli/chunks/web-O6GVKSMI.js +2 -0
- package/dist-cli/chunks/{what-happened-RGVPA3IL.js → what-happened-ZQV5XPQM.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 +1 -1
- 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 +5 -5
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/dist-cli/chunks/beta-BNWNKZVD.js +0 -2
- package/dist-cli/chunks/chunk-A7RXUZTR.js +0 -1
- package/dist-cli/chunks/chunk-DQ3UVIWC.js +0 -1
- package/dist-cli/chunks/cli-version-7VDEZHWX.js +0 -2
- package/dist-cli/chunks/daemon-5HXDKPKX.js +0 -2
- package/dist-cli/chunks/drivers-W2PMIOIX.js +0 -2
- package/dist-cli/chunks/flow-M2S2LX67.js +0 -2
- package/dist-cli/chunks/help-YH2Q2TSP.js +0 -2
- package/dist-cli/chunks/inspect-H3PXV6CS.js +0 -2
- package/dist-cli/chunks/install-desktop-QVUU3MYS.js +0 -2
- package/dist-cli/chunks/optional-demo-registry-3R4ERASC.js +0 -2
- package/dist-cli/chunks/runtime-7NRBQTTI.js +0 -2
- package/dist-cli/chunks/store-GUBFOLLP.js +0 -2
- package/dist-cli/chunks/telemetry-KUIS2R6S.js +0 -2
- package/dist-cli/chunks/upload-BGBBPPQA.js +0 -2
- package/dist-cli/chunks/web-7L2S4STL.js +0 -2
package/dist-cli/bin.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
/*! sootsim v0.1.
|
|
3
|
-
import{a as w,b as u}from"./chunks/chunk-
|
|
2
|
+
/*! sootsim v0.1.233 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
3
|
+
import{a as w,b as u}from"./chunks/chunk-IDGS2QTY.js";import"./chunks/chunk-Q3KYEB42.js";function f(t){let a=t instanceof Error?t.message:String(t);(/^command timed out after \d+s$/.test(a)||a.startsWith("sim disconnected:")||a.startsWith("bridge never reconnected")||a.startsWith("no sim connected with id ")||a.startsWith("could not connect to ws://")||a.startsWith("sootsim bridge daemon is not running")||a.startsWith("sootsim bridge lockfile is fresh")||a.startsWith("sootsim bridge exited before becoming ready")||a.startsWith("background daemon setup is unavailable")||a.startsWith("sootsim bridge did not start within"))&&!process.env.SOOTSIM_VERBOSE&&(process.stderr.write(` ${a}
|
|
4
4
|
`),process.exit(1)),t instanceof Error&&t.stack?process.stderr.write(`${t.stack}
|
|
5
5
|
`):process.stderr.write(`${a}
|
|
6
6
|
`),process.exit(1)}process.on("unhandledRejection",f);process.on("uncaughtException",f);var h=typeof __SOOTSIM_STANDALONE__<"u"&&__SOOTSIM_STANDALONE__,A=new Set(["desktop"]);function k(t){!h||!A.has(t)||(process.stderr.write(` sootsim ${t} isn't available in the standalone binary \u2014
|
|
7
7
|
it needs vite / electron / playwright from a project's node_modules.
|
|
8
8
|
run the npm package instead:
|
|
9
9
|
sootsim ${t}
|
|
10
|
-
`),process.exit(1))}var e=u(process.argv);if(!e.command&&e.commandArgs.length>0){let{resolveHiddenRuntimeAlias:t}=await import("./chunks/hidden-runtime-alias-
|
|
11
|
-
`)}async function c(t){let{flushCliTelemetry:a}=await import("./chunks/telemetry-
|
|
10
|
+
`),process.exit(1))}var e=u(process.argv);if(!e.command&&e.commandArgs.length>0){let{resolveHiddenRuntimeAlias:t}=await import("./chunks/hidden-runtime-alias-CNJPGHH3.js");e=t(e)}{let{trackCliEvent:t}=await import("./chunks/telemetry-LZQKUZ6S.js");t({event:"cli_command_invoked",properties:{command:e.command||(e.version?"version":e.help?"help":"none"),arg_count:e.commandArgs.length,platform:process.platform,arch:process.arch,node_version:process.versions.node}})}if(e.command!=="serve"&&e.command!=="daemon"){let{consumeRuntimeUpgradeNotice:t}=await import("./chunks/home-paths-MUFDNXAD.js"),a=t();a&&process.stderr.write(` SootSim engine upgraded to v${a.to}`+(a.from?` (from v${a.from})`:"")+` \xB7 what's new: https://sootsim.com/changelog
|
|
11
|
+
`)}async function c(t){let{flushCliTelemetry:a}=await import("./chunks/telemetry-LZQKUZ6S.js");await a(),process.exit(t)}if(e.version){let{getCliVersion:t}=await import("./chunks/cli-version-CS57HE3I.js"),{IS_BETA:a,BETA_LABEL:i}=await import("./chunks/beta-FYKGC4H6.js"),p=a?` \xB7 ${i}`:"";console.log(`sootsim v${t()}${p}`);let{readActiveRuntime:b}=await import("./chunks/home-paths-MUFDNXAD.js"),l=b();console.log(l?`runtime v${l}`:"runtime not installed"),await c(0)}if(e.help&&!e.command){let{printHelp:t}=await import("./chunks/help-IZWZPAUI.js");t(),await c(0)}var o=e.globalFlags.port,r=e.verbose,m=e.globalFlags.device,d=e.globalFlags.theme,v=e.globalFlags.driver,_=e.globalFlags.headless===!0,g=e.globalFlags.sim??e.globalFlags.session??e.globalFlags.tab,s=g?["--sim",g,...e.commandArgs]:e.commandArgs;if(m||d){let{settingsStore:t}=await import("./chunks/store-KVEMIG7O.js"),a={};m&&(a.deviceModel=m),d&&(a.colorScheme=d),t.apply(a)}if(!e.command&&e.commandArgs.length===0){let{runSetup:t,shouldRunSetupForBareCommand:a}=await import("./chunks/setup-LUDPDJK4.js");a()&&(await t(["--from-welcome"]),await c(0));let{printHelp:i}=await import("./chunks/help-IZWZPAUI.js");i(),await c(0)}var n=e.command??"";if(!n){if(e.commandArgs.length>0){let a=e.commandArgs.find(i=>!i.startsWith("-"))??e.commandArgs[0];console.error(` unknown command: ${a}`),console.error(" run `sootsim --help` to see the full surface."),await c(1)}let{printHelp:t}=await import("./chunks/help-IZWZPAUI.js");t(),await c(0)}if(e.help||e.commandArgs.includes("--help")||e.commandArgs.includes("-h")){if(n==="skill"){let{runSkill:i}=await import("./chunks/skills-FQ55TVJQ.js");await i(e.commandArgs),await c(0)}let t=n==="do"||n==="get"||n==="debug"||n==="shell"||n==="wait",a=e.commandArgs.find(i=>!i.startsWith("-"));if(n!=="shell")if(t&&!a){let{printGroupHelp:i}=await import("./chunks/help-IZWZPAUI.js");i(n)&&await c(0)}else{let{printCommandHelp:i}=await import("./chunks/help-IZWZPAUI.js");i(t&&a?a:n,{prefer:t&&a?"verb":"command",group:t&&a?n:void 0}),await c(0)}}k(n);if(w.has(n)){let{runInspect:t}=await import("./chunks/inspect-AELXHN3R.js");await t([n,...s],{port:o,verbose:r})}else switch(n){case"assert":{let{runAssert:t}=await import("./chunks/assert-WNFJZX3A.js");await t(e.commandArgs);break}case"detox":{let{runDetox:t}=await import("./chunks/detox-JSFPSPI4.js");await t(e.commandArgs,{port:o,verbose:r});break}case"maestro":{let{runMaestro:t}=await import("./chunks/maestro-XVRDDQPC.js"),a=await t(s,{port:o,verbose:r});process.exit(typeof a=="number"?a:0)}case"record":{let{runRecord:t}=await import("./chunks/record-ZKVEEOM3.js");await t(s,{port:o,verbose:r});break}case"film":{let{runFilm:t}=await import("./chunks/film-7ZRUTIPW.js"),a=await t(s,{port:o,verbose:r});process.exit(typeof a=="number"?a:0)}case"storage":{let{runStorage:t}=await import("./chunks/storage-3KQFUZXP.js"),a=await t(s,{port:o,verbose:r});process.exit(typeof a=="number"?a:0)}case"perf":{let{runPerf:t}=await import("./chunks/perf-FHR37YVM.js"),a=await t(s,{port:o,verbose:r});process.exit(typeof a=="number"?a:0)}case"screenshot":{let{runScreenshotCommand:t}=await import("./chunks/screenshot-command-ZZGUTSXV.js"),a=await t(s,{port:o,verbose:r});process.exit(typeof a=="number"?a:0)}case"mode":{let{runMode:t}=await import("./chunks/mode-5NB4ZSW7.js");await t(s,{port:o,verbose:r});break}case"inspect":{let{runInspect:t}=await import("./chunks/inspect-AELXHN3R.js");await t(s,{port:o,verbose:r});break}case"debug":{let{runDebug:t}=await import("./chunks/debug-IGWPYQVC.js");await t(s,{port:o,verbose:r});break}case"timeline":{let{runTimeline:t}=await import("./chunks/timeline-SUHWK7B7.js");await t(s,{port:o,verbose:r});break}case"what-happened":{let{runWhatHappened:t}=await import("./chunks/what-happened-ZQV5XPQM.js");await t(s,{port:o,verbose:r});break}case"open":{let{runOpenCommand:t}=await import("./chunks/control-AYMN3IBC.js");await t(s,{port:o});break}case"use":{let{runUseCommand:t}=await import("./chunks/control-AYMN3IBC.js");await t(s,{port:o});break}case"claim":{let{runClaimCommand:t}=await import("./chunks/control-AYMN3IBC.js");await t(s,{port:o});break}case"close":{let{runCloseCommand:t}=await import("./chunks/control-AYMN3IBC.js");await t(s,{port:o});break}case"device":{let{runDeviceCommand:t}=await import("./chunks/device-TOVWFBQJ.js");await t(s,{port:o});break}case"compat":{let{runCompat:t}=await import("./chunks/compat-QFJSNZ7F.js");await t(e.commandArgs);break}case"desktop":{let{runDesktop:t}=await import("./chunks/desktop-EKR2GZ6P.js");await t(e.commandArgs,{port:o,device:m,driver:v});break}case"login":{let{runLogin:t}=await import("./chunks/login-575DYIFV.js");await t(e.commandArgs);break}case"logout":{let{runLogout:t}=await import("./chunks/logout-FWSC6I62.js");await t();break}case"auth":{let{runAuth:t}=await import("./chunks/auth-3VWWSVDJ.js");await t(e.commandArgs);break}case"setup":{let{runSetup:t}=await import("./chunks/setup-LUDPDJK4.js");await t(e.commandArgs);break}case"serve":{let{runServe:t}=await import("./chunks/serve-YC7L66XG.js");await t(e.commandArgs,{port:o});break}case"daemon":{let{runDaemon:t}=await import("./chunks/daemon-UOJGRIKE.js");await t(e.commandArgs,{port:o});break}case"runtime":{let{runRuntime:t}=await import("./chunks/runtime-PFL2DHOG.js");await t(e.commandArgs);break}case"upgrade":{let{runUpgrade:t}=await import("./chunks/upgrade-U5BIIO7Z.js");await t(e.commandArgs);break}case"version":{let{runVersion:t}=await import("./chunks/version-JKCTZB5N.js");await t(e.commandArgs);break}case"agent":{let{runAgentCommand:t}=await import("./chunks/agent-FSAU46RP.js"),a=await t(e.commandArgs);process.exit(a)}case"agent-wrapper":{let{runAgentWrapper:t}=await import("./chunks/agent-wrapper-C7OIZCDK.js"),a=await t(e.commandArgs);process.exit(a)}case"skill":{let{runSkill:t}=await import("./chunks/skills-FQ55TVJQ.js");await t(e.commandArgs);break}case"app-fonts":{let{runAppFonts:t}=await import("./chunks/app-fonts-DXMHWUJT.js");await t(e.commandArgs);break}case"config":{let{runConfig:t}=await import("./chunks/config-FYNAEPT6.js");await t(e.commandArgs);break}default:console.error(` unknown command: ${n}`),console.error(" run `sootsim --help` to see the full surface."),process.exit(1)}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as b,b as E,c as A,d as l,e as S,g as j,h as T,j as I,m as k,n as D,o as x,p as g,q as O,r as C}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.233 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as b,b as E,c as A,d as l,e as S,g as j,h as T,j as I,m as k,n as D,o as x,p as g,q as O,r as C}from"./chunk-OMQVA6X5.js";import"./chunk-K2MMUVAS.js";import{c as $}from"./chunk-ZRRTM6WY.js";import"./chunk-G7DEABX5.js";import"./chunk-63LYNRZC.js";import"./chunk-FQ5ISCZF.js";import"./chunk-TQF5LD6Y.js";import"./chunk-TB775GFN.js";import"./chunk-7LEIOQSX.js";import{j as y}from"./chunk-GQQZNMLJ.js";import"./chunk-5SAISMRK.js";import"./chunk-ZQBKE54L.js";import"./chunk-46QQ23PF.js";import"./chunk-Q3KYEB42.js";import w from"node:fs";import d from"node:path";import{spawn as _}from"node:child_process";import F from"node:net";import{WebSocket as R}from"ws";var c=class extends Error{code;constructor(e,t){super(e),this.name="AgentDaemonError",this.code=t}},f=class{ws;port;commandTimeoutMs;ready;closed=!1;nextId=1;pending=new Map;eventListeners=new Set;statusListeners=new Set;disconnectListeners=new Set;constructor(e={}){this.port=e.port??7668,this.commandTimeoutMs=e.commandTimeoutMs??15e3,this.ws=new R(`ws://localhost:${this.port}`),this.ready=new Promise((t,r)=>{let s=()=>{this.ws.off("error",o),t()},o=i=>{this.ws.off("open",s),r(new c(`could not connect to sootsim daemon on port ${this.port}: ${i.message}`,"NO_DAEMON"))};this.ws.once("open",s),this.ws.once("error",o)}),this.ws.on("message",t=>this.handleMessage(t)),this.ws.on("close",()=>this.handleClose()),this.ws.on("error",()=>{})}async waitReady(){return this.ready}async listProjects(){return this.send("agent:list-projects")}async upsertProject(e){return this.send("agent:upsert-project",{input:e})}async deleteProject(e){return this.send("agent:delete-project",{projectId:e})}async autoAttachForUrl(e){return this.send("agent:auto-attach-for-url",{input:e})}async listSessions(e){return this.send("agent:list-sessions",{projectId:e})}async startSession(e){return this.send("agent:start-session",{input:e})}async sendPrompt(e,t){return this.send("agent:send-prompt",{sessionId:e,prompt:t})}async sendClaimedPrompt(e,t){return this.send("agent:send-claimed-prompt",{simId:e,prompt:t})}async endSession(e){return this.send("agent:end-session",{sessionId:e})}async getTranscript(e){return this.send("agent:get-transcript",{sessionId:e})}async getPaths(){return this.send("agent:get-paths")}async subscribeEvents(e){return this.send("agent:subscribe-events",{sessionId:e})}async unsubscribeEvents(e){return this.send("agent:unsubscribe-events",{sessionId:e})}onAgentEvent(e){return this.eventListeners.add(e),()=>this.eventListeners.delete(e)}onSessionStatusChange(e){return this.statusListeners.add(e),()=>this.statusListeners.delete(e)}onDisconnect(e){return this.disconnectListeners.add(e),()=>this.disconnectListeners.delete(e)}close(){if(!this.closed){this.closed=!0;try{this.ws.close()}catch{}}}async send(e,t={}){if(await this.ready,this.closed||this.ws.readyState!==R.OPEN)throw new c("daemon connection is closed","NO_DAEMON");let r=this.nextId++;return new Promise((s,o)=>{let i=setTimeout(()=>{this.pending.delete(r),o(new c(`${e} timed out after ${Math.round(this.commandTimeoutMs/1e3)}s`,"TIMEOUT"))},this.commandTimeoutMs);this.pending.set(r,{resolve:s,reject:o,timer:i});try{this.ws.send(JSON.stringify({id:r,type:e,...t}))}catch(a){clearTimeout(i),this.pending.delete(r),o(a instanceof Error?a:new Error(String(a)))}})}handleMessage(e){let t;try{t=JSON.parse(String(e))}catch{return}if(!t||typeof t!="object")return;if(t.type==="agent:event"){for(let s of this.eventListeners)try{s({sessionId:t.sessionId,event:t.event})}catch{}return}if(t.type==="agent:session-status"){for(let s of this.statusListeners)try{s(t.session)}catch{}return}if(typeof t.id!="number")return;let r=this.pending.get(t.id);r&&(this.pending.delete(t.id),clearTimeout(r.timer),t.error?r.reject(new c(t.error,t.code)):r.resolve(t.result))}handleClose(){if(!this.closed){this.closed=!0;for(let[,e]of this.pending)clearTimeout(e.timer),e.reject(new c("daemon disconnected","DISCONNECT"));this.pending.clear();for(let e of this.disconnectListeners)try{e()}catch{}}}};function M(n=7668,e=400){return new Promise(t=>{let r=new F.Socket,s=!1,o=i=>{s||(s=!0,r.destroy(),t(i))};r.setTimeout(e),r.once("connect",()=>o(!0)),r.once("timeout",()=>o(!1)),r.once("error",()=>o(!1)),r.connect(n,"127.0.0.1")})}async function B(n={}){let e=n.port??7668;if(await M(e))return{alreadyRunning:!0};if(y())throw new c(`no sootsim bridge on port ${e}. run \`sootsim setup\` to install the background daemon, or \`sootsim serve\` in another shell.`,"DEV_HOST_REFUSED");let{cmd:t,prefixArgs:r}=C(),s=[...r,"serve","--quiet"];e!==7668&&s.push("--port",String(e));let o=_(t,s,{detached:!0,stdio:"ignore",env:process.env,cwd:process.cwd()});o.unref();let i=Date.now()+(n.startupTimeoutMs??5e3);for(;Date.now()<i;){if(await M(e))return{alreadyRunning:!1,pid:o.pid};await new Promise(a=>setTimeout(a,100))}throw new c(`spawned sootsim daemon on port ${e} but it did not come up in time. run \`sootsim serve\` manually to diagnose.`,"SPAWN_TIMEOUT")}async function h(n={}){await B({port:n.port,startupTimeoutMs:n.startupTimeoutMs});let e=new f(n);try{await e.waitReady()}catch(t){throw e.close(),t}return e}async function ge(n){let[e,...t]=n;try{switch(e){case void 0:case"--help":case"-h":case"help":return L(),0;case"attach":return await W(t);case"projects":return await J();case"project":return await V(t);case"sessions":return await H(t);case"start":return await G(t);case"prompt":return await q(t);case"watch":return await K(t);case"transcript":return await z(t);case"end":return await Q(t);case"paths":return await Y();default:return process.stderr.write(`unknown agent subcommand: ${e}
|
|
3
3
|
`),L(),2}}catch(r){if(r instanceof c)return process.stderr.write(`${r.message}
|
|
4
4
|
`),1;throw r}}async function v(n){let e=await h({clientLabel:"sootsim-agent-cli"});try{return await n(e)}finally{e.close()}}function L(){$("agent")}function P(n,e){let t={},r=[];for(let s=0;s<n.length;s++){let o=n[s],i=e[o];i==="value"?(t[o]=n[s+1]??"",s++):i==="bool"?t[o]=!0:r.push(o)}return{flags:t,positional:r}}function U(n,e="codex"){return n==="codex"||n==="claude"?n:e}async function W(n){let{flags:e,positional:t}=P(n,{"--name":"value","--provider":"value"}),r=t[0];if(!r)return process.stderr.write(`usage: sootsim agent attach <dir> [--name X] [--provider codex|claude]
|
|
5
5
|
`),2;let s=d.resolve(r);if(!w.existsSync(s))return process.stderr.write(`directory does not exist: ${s}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as M}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.233 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as M}from"./chunk-K2MMUVAS.js";import"./chunk-Q3KYEB42.js";import{execFile as G,spawn as q}from"node:child_process";import{randomUUID as X}from"node:crypto";import{constants as R,createReadStream as Y,createWriteStream as j,existsSync as I,openSync as J}from"node:fs";import V from"node:fs/promises";import z from"node:path";import K from"node:readline";import{promisify as Q}from"node:util";import{spawn as H}from"node:child_process";import L from"node:readline";var b=class extends Error{code;data;constructor(t,r,m){super(t),this.name="CodexRpcError",this.code=r,this.data=m}};function W(d){let t=H(d.bin,["app-server"],{cwd:d.cwd,env:{...process.env,...d.env},stdio:["pipe","pipe","pipe"]}),r=new Map,m=new Map,u=1,g=!1,a=new Promise(s=>{t.on("exit",(i,e)=>{g=!0;let p=new Error(`codex app-server exited (code=${i}, signal=${e??""})`);for(let{reject:f}of r.values())f(p);r.clear(),s({code:i,signal:e})})});L.createInterface({input:t.stdout,crlfDelay:1/0}).on("line",s=>{let i=s.trim();if(!i)return;let e;try{e=JSON.parse(i)}catch{return}if(e.id!=null&&(e.result!==void 0||e.error!==void 0)){let p=typeof e.id=="string"?Number(e.id):e.id,f=p!=null?r.get(p):void 0;if(!f)return;r.delete(p),e.error?f.reject(new b(e.error.message,e.error.code,e.error.data)):f.resolve(e.result);return}if(e.method){let p=m.get(e.method);if(!p)return;for(let f of p)try{f(e.params)}catch(l){console.error(`[codex-client] handler for "${e.method}" threw:`,l instanceof Error?l.stack??l.message:l)}}}),t.stderr.setEncoding("utf8"),t.stderr.on("data",s=>{let i=m.get("__stderr__");if(i)for(let e of i)try{e({text:s})}catch{}});function n(s){if(!g)try{t.stdin.write(JSON.stringify(s)+`
|
|
3
3
|
`)}catch{}}return{exited:a,on(s,i){let e=m.get(s);return e||(e=new Set,m.set(s,e)),e.add(i),()=>{e?.delete(i)}},request(s,i){if(g)return Promise.reject(new Error(`codex app-server closed; cannot call ${s}`));let e=u++;return new Promise((p,f)=>{r.set(e,{resolve:l=>p(l),reject:f,method:s}),n({jsonrpc:"2.0",id:e,method:s,params:i})})},notify(s,i){n({jsonrpc:"2.0",method:s,params:i})},async shutdown(s=1500){if(g)return;try{t.stdin.end()}catch{}let i=setTimeout(()=>{if(!g)try{t.kill("SIGTERM")}catch{}},s);try{await a}finally{clearTimeout(i)}},kill(s="SIGTERM"){if(!g)try{t.kill(s)}catch{}}}}var O="never",F="danger-full-access",Z={type:"dangerFullAccess"},D="fast",ee="medium",te=Q(G);async function ne(d,t){let r=t||d;if(r.includes("/")||r.includes("\\"))return I(r)?{ok:!0,path:r}:{ok:!1,message:`agent binary not found at path: ${r}`};try{let{stdout:m}=await te("which",[r],{timeout:1500}),u=m.trim();return u?{ok:!0,path:u}:{ok:!1,message:`${r} not found on PATH`}}catch{return{ok:!1,message:`${r} not found on PATH. install the ${d} CLI and retry, or pass --${d}-bin /path/to/${d} to agent start.`}}}function re(d){let t={"--session-id":"sessionId","--project-id":"projectId","--provider":"provider","--cwd":"cwd","--prompt-in":"promptIn","--events-out":"eventsOut","--transcript":"transcript","--codex-bin":"codexBin","--claude-bin":"claudeBin","--claude-session-uuid":"claudeSessionUuid"},r={};for(let m=0;m<d.length;m++){let u=d[m];if(u==="--fresh-thread"){r.freshThread=!0;continue}let g=t[u];g&&(r[g]=d[m+1],m++)}return r}async function Ie(d){let t=re(d);if(!t.sessionId||!t.projectId||!t.provider||!t.cwd||!t.promptIn||!t.eventsOut)return process.stderr.write(`usage: sootsim agent-wrapper --session-id <id> --project-id <id>
|
|
4
4
|
--provider codex|claude --cwd <path>
|
|
5
5
|
--prompt-in <fifo> --events-out <fifo>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{d as p}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.233 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{d as p}from"./chunk-ZRQEHAES.js";import"./chunk-Q3KYEB42.js";import{existsSync as h,mkdirSync as d,readFileSync as y,writeFileSync as g}from"node:fs";import{join as m}from"node:path";import{gzipSync as w}from"node:zlib";function f(t,e){let o=t.indexOf(`--${e}`);if(o!==-1&&o+1<t.length)return t[o+1];let i=t.find(r=>r.startsWith(`--${e}=`));return i?i.slice(e.length+3):void 0}async function S(t){let e=f(t,"wire")||"",o=f(t,"out-dir"),i=f(t,"manifest");if((!o||!i)&&(console.error(" usage: sootsim app-fonts stage --wire <wire> --out-dir <dir> --manifest <path>"),process.exit(1)),!e.trim()){console.log("no app fonts declared \u2014 nothing to stage");return}d(o,{recursive:!0});let r=await p(e,{onStaged:({url:n,byteLength:s})=>console.log(` staged app font: ${n} (${(s/1024).toFixed(1)} KiB)`),onError:(n,s)=>console.error(` warning: failed to fetch app font ${n}: ${s instanceof Error?s.message:s}`)}),a=[];for(let n of r){let s=w(n.bytes);g(m(o,n.urlhash),s),a.push({url:n.url,urlhash:n.urlhash,contentType:n.contentType,encoding:"gzip",sizeBytes:s.length,rawBytes:n.bytes.byteLength})}let c=[];if(h(i))try{let n=JSON.parse(y(i,"utf8"));Array.isArray(n)&&(c=n)}catch{}let u=new Set(c.map(n=>n.urlhash)),l=[...c,...a.filter(n=>!u.has(n.urlhash))];g(i,JSON.stringify(l)),console.log(`staged ${a.length} app font(s); manifest now has ${l.length} file(s)`)}async function E(t){let e=t[0];if(e==="stage"){await S(t.slice(1));return}console.error(` unknown app-fonts subcommand: ${e??"(none)"}`),console.error(" available: stage"),process.exit(1)}export{E as runAppFonts};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.233 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-Q3KYEB42.js";import{spawn as x}from"child_process";var w=new Set(["describe","find","list","network","logs","count","tree","url","a11y","node","layout","keyboard","errors","warnings","requests","animations","animation","state","sample-color"]),S=new Set(["--exists","--empty","--negate","--quiet","--allow-timeout","!"]),q=new Set(["--count","--count-at-least","--count-at-most","--contains","--not-contains","--matches","--not-matches","--equals","--jq","--has-path","--within"]),P=new Set(["--path-equals"]);function j(s){let r=[],u=[],n=0,e=!1,t=!1,i=!1;for(let o=0;o<s.length;o++){let a=s[o];if(a==="--within"){let c=Number(s[o+1]);if(!Number.isFinite(c)||c<0)return{error:`--within requires a non-negative number, got: ${s[o+1]}`};n=c,o++;continue}if(a==="--negate"||a==="!"){e=!0;continue}if(a==="--quiet"){t=!0;continue}if(a==="--allow-timeout"){i=!0;continue}if(S.has(a)){u.push({kind:a,args:[]});continue}if(q.has(a)){let c=s[o+1];if(c==null)return{error:`${a} requires a value`};u.push({kind:a,args:[c]}),o++;continue}if(P.has(a)){let c=s[o+1],f=s[o+2];if(c==null||f==null)return{error:`${a} requires <path> <value>`};u.push({kind:a,args:[c,f]}),o+=2;continue}r.push(a)}return r.length===0?{error:"assert requires a verb (e.g. find, describe, get errors)"}:{verbArgs:r,predicates:u,withinMs:n,negate:e,quiet:t,allowTimeout:i}}function N(s){return s[0]==="get"||s[0]==="debug"?w.has(s[1])?s[1]:null:s[0]==="do"||s[0]==="wait"?null:w.has(s[0])?s[0]:null}async function R(s){let u=[process.argv[1],...s,"--json"];return new Promise(n=>{let e=x(process.execPath,u,{stdio:["ignore","pipe","pipe"],env:process.env}),t="",i="";e.stdout.on("data",o=>t+=o.toString()),e.stderr.on("data",o=>i+=o.toString()),e.on("error",o=>{n({ok:!1,payload:null,reason:`spawn failed: ${o.message}`})}),e.on("close",o=>{if(o!==0){let a=i.trim().split(`
|
|
3
3
|
`).slice(-2).join(" | ").slice(0,200);n({ok:!1,payload:null,reason:`verb exited ${o}${a?`: ${a}`:""}`});return}if(!t.trim()){n({ok:!1,payload:null,reason:"verb produced no output"});return}try{let a=JSON.parse(t);n({ok:!0,payload:a})}catch{n({ok:!1,payload:null,reason:`verb output was not valid json: ${t.slice(0,120)}`})}})})}function y(s,r){let u=r.split(".").filter(e=>e.length>0),n=s;for(let e of u){if(n==null)return{found:!1};if(Array.isArray(n)){let t=Number(e);if(!Number.isInteger(t)||t<0||t>=n.length)return{found:!1};n=n[t];continue}if(typeof n=="object"){let t=n;if(!(e in t))return{found:!1};n=t[e];continue}return{found:!1}}return{found:!0,value:n}}function d(s){return Array.isArray(s)?s.length:s&&typeof s=="object"?Object.keys(s).length:null}async function A(s,r){let{kind:u,args:n}=s;switch(u){case"--exists":return r==null?{ok:!1,reason:"payload is null"}:d(r)===0?{ok:!1,reason:"payload is empty"}:{ok:!0,reason:"exists"};case"--empty":{if(r==null)return{ok:!0,reason:"payload is null"};let e=d(r);return e===0?{ok:!0,reason:"payload is empty"}:{ok:!1,reason:`payload has ${e} item(s)`}}case"--count":{let e=Number(n[0]),t=d(r);return t==null?{ok:!1,reason:`payload not countable (${typeof r})`}:{ok:t===e,reason:`count=${t}, want=${e}`}}case"--count-at-least":{let e=Number(n[0]),t=d(r);return t==null?{ok:!1,reason:"payload not countable"}:{ok:t>=e,reason:`count=${t}, want>=${e}`}}case"--count-at-most":{let e=Number(n[0]),t=d(r);return t==null?{ok:!1,reason:"payload not countable"}:{ok:t<=e,reason:`count=${t}, want<=${e}`}}case"--contains":{let e=n[0],t=JSON.stringify(r);return{ok:t.includes(e),reason:t.includes(e)?`contains "${e}"`:`missing "${e}"`}}case"--not-contains":{let e=n[0],t=JSON.stringify(r);return{ok:!t.includes(e),reason:t.includes(e)?`unexpected "${e}"`:`not contains "${e}"`}}case"--matches":{let e=new RegExp(n[0]),t=JSON.stringify(r),i=e.test(t);return{ok:i,reason:i?`matches /${n[0]}/`:`no match for /${n[0]}/`}}case"--not-matches":{let e=new RegExp(n[0]),t=JSON.stringify(r),i=!e.test(t);return{ok:i,reason:i?`not matches /${n[0]}/`:`unexpected /${n[0]}/`}}case"--equals":{let e=n[0],t=typeof r=="string"?r:typeof r=="number"||typeof r=="boolean"?String(r):JSON.stringify(r);return{ok:t===e,reason:`got=${JSON.stringify(t)}, want=${JSON.stringify(e)}`}}case"--has-path":{let e=y(r,n[0]);return{ok:e.found,reason:e.found?`path ${n[0]} present`:`path ${n[0]} missing`}}case"--path-equals":{let[e,t]=n,i=y(r,e);if(!i.found)return{ok:!1,reason:`path ${e} missing`};let o=typeof i.value=="string"||typeof i.value=="number"||typeof i.value=="boolean"?String(i.value):JSON.stringify(i.value);return{ok:o===t,reason:`${e}=${o}, want=${t}`}}case"--jq":{let e=n[0];try{let i=(await O(e,r)).trim();return{ok:i.length>0&&i!=="null"&&i!=="false"&&i!=='""',reason:`jq: ${i.slice(0,120)}`}}catch(t){throw new Error(`jq evaluation failed: ${t.message}`)}}default:return{ok:!1,reason:`unknown predicate ${u}`}}}function O(s,r){return new Promise((u,n)=>{let e=x("jq",[s],{stdio:["pipe","pipe","pipe"]}),t="",i="";e.stdout.on("data",o=>t+=o.toString()),e.stderr.on("data",o=>i+=o.toString()),e.on("error",n),e.on("close",o=>{if(o!==0){n(new Error(i.trim()||`jq exited ${o}`));return}u(t)}),e.stdin.end(JSON.stringify(r))})}async function T(s){(s[0]==="--help"||s[0]==="-h"||s.length===0)&&(J(),process.exit(s.length===0?2:0));let r=j(s);"error"in r&&(process.stderr.write(` assert: ${r.error}
|
|
4
4
|
`),process.exit(2));let{verbArgs:u,predicates:n,withinMs:e,negate:t,quiet:i,allowTimeout:o}=r;N(u)||(process.stderr.write(` assert: unknown or non-read verb: ${u.join(" ")}
|
|
5
5
|
supported: ${Array.from(w).sort().join(", ")}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as t}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.233 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as t}from"./chunk-MGECBBZI.js";import{d as s}from"./chunk-KNGJ7VHE.js";import"./chunk-GQQZNMLJ.js";import"./chunk-Q3KYEB42.js";function i(){console.log(`
|
|
3
3
|
sootsim auth \u2014 inspect CLI auth
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{m as d}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.233 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{m as d}from"./chunk-6GADJWCT.js";import"./chunk-3RIGVY4O.js";import{g as l,i as m,k as p}from"./chunk-LU5U5HEI.js";import"./chunk-TQF5LD6Y.js";import"./chunk-TB775GFN.js";import"./chunk-GQQZNMLJ.js";import"./chunk-Q3KYEB42.js";function f(){console.log(`
|
|
3
3
|
sootsim do scan \u2014 inject a barcode scan
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as R,b as U}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.233 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as R,b as U}from"./chunk-DU2XIAOZ.js";import{c as F}from"./chunk-ZRRTM6WY.js";import{g as N,j as E,r as _,s as v,t as B}from"./chunk-GQQZNMLJ.js";import{a as O}from"./chunk-5SAISMRK.js";import{execFileSync as W,spawnSync as s}from"child_process";import{existsSync as a,mkdirSync as x,readFileSync as nt,realpathSync as ot,rmSync as $,writeFileSync as H}from"fs";import{homedir as P}from"os";import{basename as st,dirname as T,resolve as f,sep as Y}from"path";import{execFileSync as X}from"child_process";import{chmodSync as Q,mkdirSync as I,rmSync as z,writeFileSync as A}from"fs";import{dirname as L}from"path";var J="dev.sootsim.daemon",j="SootSim Daemon",M="0.1.36";function V(t,e,r){let n=v(),o=B(),c=L(L(o)),l=L(o),u=`${c}/Resources`;z(n,{recursive:!0,force:!0}),I(_(),{recursive:!0}),I(l,{recursive:!0}),I(u,{recursive:!0}),A(`${c}/Info.plist`,Z()),A(`${c}/PkgInfo`,"APPL????"),A(o,tt(t,e,r)),Q(o,493);try{X("codesign",["--force","--sign","-","--deep",n],{stdio:"pipe"})}catch(i){let p=i instanceof Error?i.message:String(i);console.warn(` warning: ad-hoc codesign of ${n} failed: ${p}
|
|
3
3
|
the daemon will still run, but Login Items may show a generic name.`)}return{bundlePath:n,launcherPath:o}}function Z(){return`<?xml version="1.0" encoding="UTF-8"?>
|
|
4
4
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
5
5
|
<plist version="1.0">
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.233 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
var t="./demo-app-registry.ts",o=null;async function n(){if(o)return o;try{let r=await import(t);o=Array.isArray(r.APPS)?r.APPS:[]}catch{o=[]}return o}function e(){return o??[]}export{n as a,e as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.233 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import{execFileSync as d,spawn as g}from"child_process";import{existsSync as m}from"fs";import{homedir as h}from"os";import{join as C}from"path";var f=["/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","~/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","/Applications/Chromium.app/Contents/MacOS/Chromium","~/Applications/Chromium.app/Contents/MacOS/Chromium","/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge","~/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge","/Applications/Brave Browser.app/Contents/MacOS/Brave Browser","~/Applications/Brave Browser.app/Contents/MacOS/Brave Browser","/Applications/Arc.app/Contents/MacOS/Arc","~/Applications/Arc.app/Contents/MacOS/Arc"],O=["/usr/bin/google-chrome","/usr/bin/chromium","/usr/bin/chromium-browser","/usr/bin/microsoft-edge","/usr/bin/brave-browser","/snap/bin/chromium"],w=["C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe","C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe","C:\\Program Files\\Microsoft\\Edge\\Application\\msedge.exe","C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe","C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe","C:\\Program Files (x86)\\BraveSoftware\\Brave-Browser\\Application\\brave.exe"],U=["google-chrome","chromium","chromium-browser","microsoft-edge","brave-browser"],M=["chrome","msedge","brave"];function A(r){return r.startsWith("~/")?C(h(),r.slice(2)):r}function a(r){for(let n of r){let o=A(n);if(m(o))return o}return null}function x(r,n){try{let e=d(n==="win32"?"where":"which",[r],{encoding:"utf8",timeout:1500,stdio:["ignore","pipe","ignore"]}).trim();return e?e.split(/\r?\n/)[0]:null}catch{return null}}function c(r=process.platform){let n=process.env.CHROME_PATH||process.env.CHROMIUM_PATH;if(n&&m(n))return n;let o=a(r==="darwin"?f:r==="win32"?w:O);if(o)return o;let e=r==="win32"?M:U;for(let t of e){let i=x(t,r);if(i)return i}return null}function p(r,n={}){if(!r)throw new Error("openUrl requires a url");let o=n.platform??process.platform;return n.newWindow?s(r,{...n,platform:o,newWindow:!0}):o==="darwin"?{command:"open",args:n.background===!1?[r]:["-g",r],via:"system"}:o==="win32"?{command:"cmd",args:["/c","start","",r],via:"system"}:{command:"xdg-open",args:[r],via:"system"}}function s(r,n={}){if(!r)throw new Error("openUrl requires a url");let o=n.platform??process.platform,e="chromiumBinary"in n?n.chromiumBinary:c(o);if(!e)throw new Error("browser launch requires Chrome, Chromium, Edge, Brave, or Arc");let t=[];return n.newWindow!==!1&&t.push("--new-window"),t.push(r),{command:e,args:t,via:"chromium",target:e}}async function l(r,n,o){return new Promise((e,t)=>{let i=g(r,n,{detached:o,stdio:"ignore"});i.once("error",t),i.once("spawn",()=>{o&&i.unref(),e(i.pid)})})}async function u(r,n={}){let o=p(r,n),e=await l(o.command,o.args,n.detached??!0);return{...o,pid:e,attachUrl:r}}async function b(r,n={}){let o=s(r,n),e=await l(o.command,o.args,n.detached??!0);return{...o,pid:e,attachUrl:r}}async function v(r,n={}){await u(r,n)}export{c as a,u as b,b as c,v as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.233 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
function H(t,e){let r=["--max-ms","--maxMs","--maxms","--max_ms"];for(let n of r){let s=t.indexOf(n);if(s>=0&&t[s+1]){let o=Number(t[s+1]);if(Number.isFinite(o))return Math.max(100,o)}}return e}var S=new Set(["tap","double-tap","tap-text","tap-id","long-press","touch"]);function v(t){return typeof t=="string"&&S.has(t)}async function T(t){return await t.send({type:"evaluate",code:"window.__sootsimEngineState?.inspectActive === true"})===!0}async function W(t,e){if(!v(e))return!1;try{return await T(t)}catch{return!1}}async function B(t){let e=await t.send({type:"evaluate",code:"(async () => await window.__sootsimTest.getNodeCount())()"});return{nodes:typeof e=="number"?e:0}}async function F(t,e=5,r){let n=r?.format?`, ${JSON.stringify(r)}`:"",s=await t.send({type:"evaluate",code:`(async () => await window.__sootsimTest.dumpTree(${e}${n}))()`});if(r?.format==="boxes"&&typeof s=="string")try{return{depth:e,tree:JSON.parse(s)}}catch{return{depth:e,tree:s}}return{depth:e,tree:s}}async function j(t){let e=await t.send({type:"evaluate",code:"window.location.href"});return{url:typeof e=="string"?e:""}}async function z(t,e){let r=`(async () => {
|
|
3
3
|
const t = window.__sootsimTest
|
|
4
4
|
const mainShell = window.SootSim?.bridges?.mainShell
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as Ue,b as _e,c as Pe}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.233 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as Ue,b as _e,c as Pe}from"./chunk-MGECBBZI.js";import{c as Be}from"./chunk-AHNX3XFL.js";import{d as Ee}from"./chunk-ZRQEHAES.js";import{d as Ae}from"./chunk-3DRMNDJ7.js";import{g as Re,i as Ie,k as B}from"./chunk-LU5U5HEI.js";import{a as ke,b as E}from"./chunk-DU2XIAOZ.js";import{a as xe}from"./chunk-KNGJ7VHE.js";import{createHash as ht}from"crypto";import{readFileSync as w}from"fs";import Ne from"path";import{gzipSync as ue,gunzipSync as yt}from"zlib";function Le(e){let t=(e||"").toLowerCase().split(";")[0].trim();return t?!(t.startsWith("image/")||t.startsWith("video/")||t.startsWith("audio/")||t==="font/woff2"||t==="application/font-woff2"||t==="application/zip"||t==="application/gzip"):!0}import{brotliCompressSync as ot,constants as it}from"node:zlib";var at=9;function $e(e){return ot(e,{params:{[it.BROTLI_PARAM_QUALITY]:at}})}function ae(e,t){let r=new AbortController,s=setTimeout(()=>r.abort(new Error(`${t} timed out after ${e/1e3}s`)),e);return{signal:r.signal,cancel:()=>clearTimeout(s)}}async function lt(e){let t=ae(12e4,`PUT ${e.url}`),r;try{r=await fetch(e.url,{method:"PUT",headers:{"content-type":e.contentType},body:e.bytes,signal:t.signal})}finally{t.cancel()}if(!r.ok){let s=await r.text().catch(()=>"");throw new Error(`PUT ${e.url} failed ${r.status}: ${s.slice(0,200)}`)}}async function ut(e,t=8,r){let s=0,i=0,a=e.length;await Promise.all(Array.from({length:Math.min(t,a)},async()=>{for(;s<a;){let u=e[s++];await lt(u),i++,r?.(i,a)}}))}function ct(e,t,r,s){let i=[];i.push({url:e.bundle.putUrl,contentType:e.bundle.contentType,bytes:t});for(let a of e.files){let u=r.get(a.urlhash);u&&i.push({url:a.putUrl,contentType:a.contentType,bytes:u})}e.events&&s?.eventsBytes&&i.push({url:e.events.putUrl,contentType:e.events.contentType,bytes:s.eventsBytes}),e.timeline&&s?.timelineBytes&&i.push({url:e.timeline.putUrl,contentType:e.timeline.contentType,bytes:s.timelineBytes}),e.flowVideo&&s?.videoBytes&&i.push({url:e.flowVideo.putUrl,contentType:e.flowVideo.contentType,bytes:s.videoBytes}),e.storage&&s?.storageBytes&&i.push({url:e.storage.putUrl,contentType:e.storage.contentType,bytes:s.storageBytes}),e.failureBundle&&s?.failureBundleBytes&&i.push({url:e.failureBundle.putUrl,contentType:e.failureBundle.contentType,bytes:s.failureBundleBytes});for(let a of e.snapshots??[]){let u=s?.snapshotBytes?.get(a.id);u&&i.push({url:a.putUrl,contentType:a.contentType,bytes:u})}return i}function dt(e){return e.replace(/\/+$/,"")}var K=class extends Error{constructor(r,s,i,a=""){super(r);this.status=s;this.phase=i;this.responseText=a;this.name="PresignedUploadError"}};async function Fe(e){let t=dt(e.originBase),r={"content-type":"application/json"};e.authHeader&&(r.authorization=e.authHeader),e.adminBypassToken&&(r["x-contrast-admin-upload-bypass"]=e.adminBypassToken);let s=ae(3e4,"init"),i;try{i=await fetch(`${t}/api/preview/upload/init`,{method:"POST",headers:r,body:JSON.stringify(e.initBody),signal:s.signal})}finally{s.cancel()}if(!i.ok){let M=await i.text().catch(()=>"");throw new K(`init failed: ${i.status} ${M.slice(0,200)}`,i.status,"init",M)}let a=await i.json(),u=ct(a,e.bundleBytes,e.filesByHash,e.extras);await ut(u,e.concurrency??8,e.onPutProgress);let g=ae(3e4,"finalize"),d;try{d=await fetch(`${t}/api/preview/upload/finalize`,{method:"POST",headers:r,body:JSON.stringify({token:a.token}),signal:g.signal})}finally{g.cancel()}if(!d.ok){let M=await d.text().catch(()=>"");throw new K(`finalize failed: ${d.status} ${M.slice(0,200)}`,d.status,"finalize",M)}let R=await d.json();return{init:a,finalize:R}}function pt(e){return e!==null&&typeof e=="object"?e:null}function Oe(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function le(e){let t=pt(e);return t?t.schemaVersion===1&&Oe(t.t)!==void 0&&Oe(t.seq)!==void 0&&typeof t.context=="string"&&typeof t.kind=="string"&&"data"in t:!1}function ft(e,t){let r=[];for(let s of e.split(`
|
|
3
3
|
`)){let i=s.trim();if(i)try{let a=JSON.parse(i);t(a)&&r.push(a)}catch{}}return r}function Ce(e){return ft(e,le)}function bt(e){if(!e)return null;try{let t=JSON.parse(e);return typeof t.message=="string"&&t.message?t.message:null}catch{return null}}function wt(e){let t=JSON.parse(w(e,"utf8"));if(!Array.isArray(t))throw new Error("snapshot manifest must be an array");let r=new Set;return t.map((s,i)=>{if(s===null||typeof s!="object")throw new Error(`snapshot manifest entry ${i} must be an object`);let a=Reflect.get(s,"id"),u=Reflect.get(s,"label"),g=Reflect.get(s,"path"),d=Reflect.get(s,"t");if(typeof a!="string"||!a||r.has(a))throw new Error(`snapshot manifest entry ${i} has an invalid or duplicate id`);if(typeof g!="string"||!g)throw new Error(`snapshot manifest entry ${i} has no PNG path`);if(typeof d!="number"||!Number.isFinite(d)||d<0)throw new Error(`snapshot manifest entry ${i} has an invalid capture time`);r.add(a);let R=w(g);return{meta:{id:a,label:typeof u=="string"&&u?u:a,kind:"interaction",t:Math.round(d),contentType:"image/png",sizeBytes:R.byteLength},bytes:R}})}var Je=process.env.SOOTSIM_UPLOAD_ORIGIN||"https://contrast.dev",qe=process.env.SOOTSIM_PREVIEW_ORIGIN||"https://sootsim.com",de="http://localhost:3000",Mt=2e3;async function Tt(e){if(e)return e;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{let t=await fetch(`${de}/api/preview/upload/init`,{method:"OPTIONS",signal:AbortSignal.timeout(Mt)});if(t.ok||t.status===204||t.status===405)return de}catch{}return Je}function F(e){return e.replace(/\/$/,"")}function St(e){try{let r=new URL(e).hostname.replace(/^\[|\]$/g,"").toLowerCase();return r==="localhost"||r.endsWith(".localhost")||r==="0.0.0.0"||r==="::1"||/^127(?:\.\d{1,3}){3}$/.test(r)}catch{return!1}}function vt(e){try{let t=new URL(e).hostname.toLowerCase();return t==="contrast.dev"||t.endsWith(".contrast.dev")}catch{return!1}}function xt(e,t){return t?F(t):process.env.SOOTSIM_PREVIEW_ORIGIN?F(process.env.SOOTSIM_PREVIEW_ORIGIN):St(e)?F(e):vt(e)?F(qe):F(e)}function kt(){console.log(`
|
|
4
4
|
sootsim record upload \u2014 publish the current recorded bundle as a /preview/<id> link
|
|
5
5
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
function o(e,n,r,a){return{width:3,ringToggle:{top:e[0],height:e[1]},volumeUp:{top:n[0],height:n[1]},volumeDown:{top:r[0],height:r[1]},lock:{top:a[0],height:a[1]}}}var b={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}},d={width:3,lock:{top:238,height:78},ringToggle:{top:-1e3,height:0},volumeUp:{top:336,height:62},volumeDown:{top:408,height:62}},g={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 t(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 u={"canvas-workspace":t({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:o([185.8,41.7],[258.2,67.6],[344,67.6],[281.5,106.9]),experimental:!0}),"iphone-se":t({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:b}),"iphone-14":t({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:o([141.7,29.7],[205.9,69.6],[289.5,69.6],[228.9,114.5])}),"iphone-15":t({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:o([171.7,32],[235.8,65.3],[320.5,65.3],[280.6,105.2])}),"iphone-15-plus":t({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:o([172.1,33],[236.1,66.6],[321.2,66.6],[281,106.8])}),"iphone-15-pro":t({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:o([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-15-pro-max":t({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:o([173.3,32.2],[253.4,61.7],[343.3,61.7],[268.5,98.5])}),"iphone-16":t({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:o([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-16-plus":t({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:o([173.3,32.2],[253.4,61.7],[343.3,61.7],[268.5,98.5])}),"iphone-16-pro":t({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:o([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-16-pro-max":t({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:o([178.8,32.2],[266.8,61.8],[352.7,61.8],[292.2,98.3])}),"iphone-17":t({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:o([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-17-air":t({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:o([178.8,32.2],[266.8,61.8],[352.7,61.8],[292.2,98.3])}),"iphone-17-pro":t({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:o([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-17-pro-max":t({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:o([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:d},"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:d},"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:d},"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:g},"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:g}},m="iphone-17-pro";function P(e){return u[e]}function p(){return Object.keys(u)}function x(){return p().filter(e=>!u[e].experimental)}var l={"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"}},c={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},B="iphone-17-pro";var y=[{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"}],f=Object.fromEntries(y.map(e=>[e.name,e.value]));function C(e){return f[e]??f.gray}function I(e){return Object.prototype.hasOwnProperty.call(l,e)?l[e]:null}function S(e){return{type:e.type,color:e.color,direction:e.direction,glow:e.glow,stops:e.stops?.map(n=>({...n}))}}function T(e){return Object.prototype.hasOwnProperty.call(c,e)?S(c[e]):null}var h={deviceModel:{type:"enum",default:m,description:"device model to simulate",cliFlag:"device",cliFlagShort:"d",options:p(),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"},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"},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(l),group:"simulator"},screenshotBackground:{type:"enum",default:"dark",description:"background preset rendered inside the screenshot canvas",options:Object.keys(c),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 w(){if(typeof window>"u")return{};let e={};try{let n=new URLSearchParams(window.location.search),r=n.get("device");r&&h.deviceModel.options?.includes(r)&&(e.deviceModel=r),n.get("ssMode")==="1"&&(e.screenshotMode=!0);let a=n.get("colorScheme")??n.get("theme");a&&h.colorScheme.options?.includes(a)&&(e.colorScheme=a);let s=n.get("alwaysShowLiveWebViews");s==="1"||s==="true"?e.alwaysShowLiveWebViews=!0:(s==="0"||s==="false")&&(e.alwaysShowLiveWebViews=!1)}catch{}return e}function H(){let e={};for(let[n,r]of Object.entries(h))e[n]=r.default;return Object.assign(e,w()),e}export{R as a,B as b,C as c,I as d,S as e,T as f,u as g,P as h,x as i,h as j,w as k,H as l};
|
|
1
|
+
/*! sootsim v0.1.233 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
function o(e,n,r,a){return{width:3,ringToggle:{top:e[0],height:e[1]},volumeUp:{top:n[0],height:n[1]},volumeDown:{top:r[0],height:r[1]},lock:{top:a[0],height:a[1]}}}var b={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}},d={width:3,lock:{top:238,height:78},ringToggle:{top:-1e3,height:0},volumeUp:{top:336,height:62},volumeDown:{top:408,height:62}},g={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 t(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 u={"canvas-workspace":t({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:o([185.8,41.7],[258.2,67.6],[344,67.6],[281.5,106.9]),experimental:!0}),"iphone-se":t({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:b}),"iphone-14":t({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:o([141.7,29.7],[205.9,69.6],[289.5,69.6],[228.9,114.5])}),"iphone-15":t({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:o([171.7,32],[235.8,65.3],[320.5,65.3],[280.6,105.2])}),"iphone-15-plus":t({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:o([172.1,33],[236.1,66.6],[321.2,66.6],[281,106.8])}),"iphone-15-pro":t({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:o([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-15-pro-max":t({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:o([173.3,32.2],[253.4,61.7],[343.3,61.7],[268.5,98.5])}),"iphone-16":t({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:o([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-16-plus":t({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:o([173.3,32.2],[253.4,61.7],[343.3,61.7],[268.5,98.5])}),"iphone-16-pro":t({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:o([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-16-pro-max":t({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:o([178.8,32.2],[266.8,61.8],[352.7,61.8],[292.2,98.3])}),"iphone-17":t({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:o([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-17-air":t({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:o([178.8,32.2],[266.8,61.8],[352.7,61.8],[292.2,98.3])}),"iphone-17-pro":t({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:o([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-17-pro-max":t({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:o([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:d},"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:d},"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:d},"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:g},"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:g}},m="iphone-17-pro";function P(e){return u[e]}function p(){return Object.keys(u)}function v(){return p().filter(e=>!u[e].experimental)}var l={"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"}},c={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"}]}},B={color:"#25c3ec",blur:120,spread:52,opacity:.34},R="iphone-17-pro";var y=[{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"}],f=Object.fromEntries(y.map(e=>[e.name,e.value]));function C(e){return f[e]??f.gray}function I(e){return Object.prototype.hasOwnProperty.call(l,e)?l[e]:null}function S(e){return{type:e.type,color:e.color,direction:e.direction,glow:e.glow,stops:e.stops?.map(n=>({...n}))}}function T(e){return Object.prototype.hasOwnProperty.call(c,e)?S(c[e]):null}var h={deviceModel:{type:"enum",default:m,description:"device model to simulate",cliFlag:"device",cliFlagShort:"d",options:p(),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"},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"},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(l),group:"simulator"},screenshotBackground:{type:"enum",default:"dark",description:"background preset rendered inside the screenshot canvas",options:Object.keys(c),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 w(){if(typeof window>"u")return{};let e={};try{let n=new URLSearchParams(window.location.search),r=n.get("device");r&&h.deviceModel.options?.includes(r)&&(e.deviceModel=r),n.get("ssMode")==="1"&&(e.screenshotMode=!0);let a=n.get("colorScheme")??n.get("theme");a&&h.colorScheme.options?.includes(a)&&(e.colorScheme=a);let s=n.get("alwaysShowLiveWebViews");s==="1"||s==="true"?e.alwaysShowLiveWebViews=!0:(s==="0"||s==="false")&&(e.alwaysShowLiveWebViews=!1)}catch{}return e}function H(){let e={};for(let[n,r]of Object.entries(h))e[n]=r.default;return Object.assign(e,w()),e}export{B as a,R as b,C as c,I as d,S as e,T as f,u as g,P as h,v as i,h as j,w as k,H as l};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.233 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import{readFileSync as i}from"node:fs";import{fileURLToPath as e}from"node:url";var r=null;function l(){if(r!=null)return r;let o=[()=>e(import.meta.resolve("sootsim/package.json")),()=>e(new URL("../package.json",import.meta.url))];for(let n of o)try{let t=JSON.parse(i(n(),"utf8")).version;if(typeof t=="string"&&t)return r=t,r}catch{}return r="0.0.0",r}export{l as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{G as R,H as d,I as x,K as w,l as g,u as $,x as b}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.233 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{G as R,H as d,I as x,K as w,l as g,u as $,x as b}from"./chunk-GQQZNMLJ.js";import{spawn as E}from"child_process";import k from"crypto";import o from"fs";import u from"path";import{Readable as C}from"stream";import{pipeline as T}from"stream/promises";var _="https://contrast.dev",U="SOOTSIM_CDN_ORIGIN",D="SOOTSIM_RUNTIME_CHANNEL",P="SOOTSIM_RUNTIME_VERSION",X="https://sootsim.com/changelog";function y(){try{let t=JSON.parse(o.readFileSync(b(),"utf8"));return t&&typeof t=="object"?t:{}}catch{return{}}}function f(t){let n=y();return(t||process.env[U]||n.cdnOrigin||_).replace(/\/+$/,"")}function S(t){let n=y();return t||process.env[D]||n.runtimeChannel||"stable"}function O(){let t=process.env[P];if(t&&t.trim())return t.trim();let n=y();return typeof n.runtimeVersion=="string"&&n.runtimeVersion.trim()?n.runtimeVersion.trim():null}function A(t){let n=new URL(`${f(t)}/runtimes/manifest.json`);return n.searchParams.set("t",String(Date.now())),n.toString()}function j(t,n){return`${f(n)}/runtimes/sootsim-runtime-${t}.tar.gz`}async function I(t){let n=A(t),r=await fetch(n,{headers:{Accept:"application/json"}});if(!r.ok)throw new Error(`manifest fetch failed: ${r.status} ${r.statusText} (${n})`);return await r.json()}function L(t,n={}){let r=S(n.channel),e=n.version||O()||t.channels[r]?.latest;if(!e)throw new Error(`no version specified and channel '${r}' has no latest entry in the manifest`);let s=t.versions[e];if(!s)throw new Error(`version ${e} not found in manifest; available: ${Object.keys(t.versions).slice(-10).join(", ")||"(none)"}`);return{version:e,channel:r,entry:s}}async function N(t={}){R();let n=f(t.cdnOrigin),r=await I(n),{version:e,channel:s,entry:i}=L(r,t),c=g(e),a=t.setActive!==!1;if(!t.force&&o.existsSync(u.join(c,"index.html")))return a&&x(e),{version:e,channel:s,cdnOrigin:n,runtimeDir:c,installed:!1,activated:a,manifest:r};let h=i.tarball||j(e,n),m=u.join($(),`sootsim-runtime-${e}.tar.gz`);process.stderr.write(`sootsim: downloading runtime ${e}\u2026
|
|
3
3
|
`),await F(h,m),process.stderr.write(`sootsim: extracting runtime ${e}\u2026
|
|
4
4
|
`);let v=await G(m);if(v!==i.sha256)throw o.rmSync(m,{force:!0}),new Error(`sha256 mismatch for runtime ${e}: expected ${i.sha256}, actual ${v}`);let l=u.join(u.dirname(c),`.installing-${e}-${process.pid}`);o.rmSync(l,{recursive:!0,force:!0}),o.mkdirSync(l,{recursive:!0});try{if(await H(m,l),!o.existsSync(u.join(l,"index.html")))throw new Error(`extracted tarball for runtime ${e} is missing index.html`);o.rmSync(c,{recursive:!0,force:!0}),o.renameSync(l,c)}catch(p){throw o.rmSync(l,{recursive:!0,force:!0}),p}return a&&x(e),{version:e,channel:s,cdnOrigin:n,runtimeDir:c,installed:!0,activated:a,manifest:r}}async function Y(t={}){R();let n=f(t.cdnOrigin),r=S(t.channel),e=O();if(e){let p=d(),V=o.existsSync(u.join(g(e),"index.html"));if(p===e&&V)return{checked:!0,updated:!1,reason:`runtime is pinned to ${e}`,activeVersion:p,latestVersion:e};let M=await N({version:e,channel:r,cdnOrigin:n,setActive:!1});return{checked:!0,updated:!0,reason:`runtime is pinned to ${e}`,activeVersion:e,latestVersion:e,install:M}}let s=await I(n),i=s.channels[r]?.latest;if(!i)return{checked:!0,updated:!1,reason:`channel '${r}' has no latest runtime`,activeVersion:d()};if(!s.versions[i])return{checked:!0,updated:!1,reason:`manifest is missing version ${i}`,activeVersion:d(),latestVersion:i};let a=d(),h=a?g(a):null,m=h?o.existsSync(u.join(h,"index.html")):!1;if(!(!a||!m||w(i,a)>0))return{checked:!0,updated:!1,reason:"active runtime is current",activeVersion:a,latestVersion:i};let l=await N({version:i,channel:r,cdnOrigin:n,setActive:!1});return{checked:!0,updated:!0,activeVersion:i,latestVersion:i,install:l}}async function Z(t={}){let n=d(),r=O();if(r)return{active:n,latest:r,pinned:r,outdated:n!==r};try{let e=await I(f(t.cdnOrigin)),s=S(t.channel),i=e.channels[s]?.latest??null,c=!!(i&&(!n||w(i,n)>0));return{active:n,latest:i,pinned:null,outdated:c}}catch{return{active:n,latest:null,pinned:null,outdated:!1}}}async function F(t,n){let r=await fetch(t);if(!r.ok||!r.body)throw new Error(`download failed: ${r.status} ${r.statusText} (${t})`);o.mkdirSync(u.dirname(n),{recursive:!0});let e=`${n}.partial`;try{await T(C.fromWeb(r.body),o.createWriteStream(e)),o.renameSync(e,n)}catch(s){try{o.unlinkSync(e)}catch{}throw s}}function G(t){return new Promise((n,r)=>{let e=k.createHash("sha256"),s=o.createReadStream(t);s.on("data",i=>e.update(i)),s.on("error",r),s.on("end",()=>n(e.digest("hex")))})}function H(t,n){return new Promise((r,e)=>{let s=E("tar",["-xzf",t,"-C",n],{stdio:["ignore","inherit","inherit"]});s.on("error",e),s.on("exit",i=>{i===0?r():e(new Error(`tar exited with code ${i}`))})})}export{_ as a,X as b,f as c,S as d,O as e,I as f,N as g,Y as h,Z as i};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{c as f}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.233 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as f}from"./chunk-TB775GFN.js";import{existsSync as g,mkdirSync as h,readFileSync as S,writeFileSync as b,rmSync as x}from"fs";import{tmpdir as y}from"os";import{dirname as v,join as m}from"path";var p=new Map;function s(e,t){p.set(e,t)}var i=1;function a(){return m(y(),`sootsim-cli-hints-${f()}.json`)}function d(){return m(y(),"sootsim-cli-hints-global.json")}function u(e){if(!g(e))return{version:i,shown:{}};try{let t=JSON.parse(S(e,"utf8"));return t?.version!==i||!t?.shown?{version:i,shown:{}}:t}catch{return{version:i,shown:{}}}}function l(e,t){try{h(v(e),{recursive:!0}),b(e,JSON.stringify(t)+`
|
|
3
3
|
`)}catch{}}function H(){let e=(process.env.SOOTSIM_HINTS||"").toLowerCase();return e==="off"||e==="0"||e==="false"?"off":e==="always"||e==="verbose"?"always":"normal"}function F(e,t){let o=H();if(o==="off")return!1;if(o==="always"||t==="always")return!0;let n=Date.now();if(t==="once-per-identity"){let r=u(a());return r.shown[e]?!1:(r.shown[e]=n,l(a(),r),!0)}if(t==="once-ever"){let r=u(d());return r.shown[e]?!1:(r.shown[e]=n,l(d(),r),!0)}if(typeof t=="object"&&"cooldownMs"in t){let r=u(a()),c=r.shown[e]??0;return n-c<t.cooldownMs?!1:(r.shown[e]=n,l(a(),r),!0)}return!0}function $(e,...t){let o=p.get(e);if(!o)return process.env.SOOTSIM_HINTS_DEBUG&&console.error(` [hints] no hint registered for id "${e}"`),!1;if(!F(e,o.frequency))return!1;let n=o.render(...t);if(n==null)return!1;let r=Array.isArray(n)?n:[n],c=o.stream==="error"?console.error:console.log;for(let w of r)c(` hint: ${w}`);return!0}s("app-still-loading",{frequency:{cooldownMs:6e4},render:e=>`app may still be loading (${e} nodes). run \`sootsim wait ready\` first.`});s("wait-selector-for-missing-testid",{frequency:"once-per-identity",render:e=>`sootsim wait selector ${e}`,stream:"error"});s("prefer-cli-over-eval",{frequency:"once-per-identity",render:e=>e.length?["try the CLI shortcut instead:",...e.map(t=>` ${t}`)]:null,stream:"error"});s("describe-use-filters",{frequency:"once-per-identity",render:()=>["describe output is long. narrow it with:"," sootsim describe --only '*Bottom Sheet*'"," sootsim describe --testid-like 'swap-*'"," sootsim describe --subtree <testID>"]});s("describe-filter-context",{frequency:"once-per-identity",render:()=>["filtered describe is search output, not current-route proof.","run `sootsim describe` without filters after navigation; clipped nodes are marked `(clipped:...)`."]});s("subtree-root-not-found",{frequency:"always",render:e=>`no node with testID/id "${e}" \u2014 try \`sootsim find --testid ${e}\` to discover available ids.`,stream:"error"});s("clean-uninstall",{frequency:"once-ever",render:()=>["to uninstall sootsim completely, run `sootsim daemon uninstall`.","it removes the launchd / systemd agent and the ~/.sootsim cache (~80MB)."]});export{$ as a};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{H as I,m as B,n as E,o as y,t as v,v as A}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.233 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{H as I,m as B,n as E,o as y,t as v,v as A}from"./chunk-3RIGVY4O.js";import{h,l as N,m as P}from"./chunk-LU5U5HEI.js";var q={timeoutMs:1800,settleMs:48,startWindowMs:64};function w(e){return new Promise(t=>setTimeout(t,e))}function U(e){return e.includes("--json")}function Y(e){process.stdout.write(`${JSON.stringify(e??null,null,2)}
|
|
3
3
|
`)}function V(e){process.stderr.write(`${e}
|
|
4
4
|
`)}function b(e,t=Date.now()){let r=new Date(e),n=`${S(r.getHours())}:${S(r.getMinutes())}:${S(r.getSeconds())}`,s=t-e;if(s<0)return n;let o=Math.round(s/1e3);return o<60?`${n} +${o}s`:o<3600?`${n} +${Math.round(o/60)}m`:o<86400?`${n} +${Math.round(o/3600)}h`:`${n} +${Math.round(o/86400)}d`}function S(e){return e<10?`0${e}`:String(e)}async function D(e,t,...r){return N(e,`__sootsimTest.${t}`,...r)}async function k(e,t,...r){return P(e,`SootSim.bridges.mainShell.${t}`,...r)}async function z(e,t={}){try{let r=await D(e,"waitForScreenTransitions",q);if(!t.verbose||!r?.started)return;if(r.timedOut){console.log(` screen transition still active after ${r.waitedMs}ms; continuing`);return}r.waitedMs>0&&console.log(` waited ${r.waitedMs}ms for screen transition settle`)}catch{}}async function K(e,t,r,...n){let s=Date.now()+Math.max(0,r);for(;;)try{return await k(e,t,...n)}catch(o){if(!I(o)||Date.now()>=s)throw o;await w(50)}}async function Q(e,t,r,n={}){let s=n.attempts??30,o=n.intervalMs??500,l=n.minNodeCount??10;for(let a=0;a<s;a++){let u=h(e,{commandTimeoutMs:t,simId:r,simIdSource:n.simIdSource});try{let c=await u.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof c=="number"&&c>l)return{bridge:u,count:c}}catch{}u.close(),await w(o)}return null}async function X(e,t,r,n={}){let s=n.timeoutMs??8e3,o=n.intervalMs??250,l=Date.now()+s;for(;Date.now()<l;){let a=h(e,{commandTimeoutMs:t,simId:r,simIdSource:n.simIdSource});try{return await a.send({type:"evaluate",code:"1"}),a}catch{a.close()}await w(o)}return null}async function Z(e,t={}){let r=t.timeoutMs??1e4,n=t.errorGraceMs??3e3,s=t.pollIntervalMs??200,o=Date.now(),l=o+r,a=-1,u=o,c=null,d=!1,m={ready:!1,source:"timeout",elapsedMs:0,nodes:0,targets:0,flag:void 0,loadingText:"",externalReady:null,externalStatus:"",externalError:"",errors:0};for(;Date.now()<l;){try{let i=await e.send({type:"evaluate",code:B}),g=Date.now()-o,f=Number(i?.nodes)||0,$=Number(i?.targets)||0,x=Number(i?.errors)||0,C=i?.flag===!0,p=i?.externalReady,T=typeof i?.loadingText=="string"?i.loadingText.trim():"",W=typeof i?.externalStatus=="string"?i.externalStatus.trim():"",M=typeof i?.externalError=="string"?i.externalError.trim():"",R=typeof i?.externalError=="string"&&M.length>0;if(c=p,d=R,f!==a&&(a=f,u=g),m={ready:!1,source:"timeout",elapsedMs:g,nodes:f,targets:$,flag:i?.flag,loadingText:T,externalReady:typeof p=="boolean"?p:null,externalStatus:W,externalError:M,errors:x},C&&p!==!1&&!R&&!T&&y({nodes:f,targets:$})&&g-u>=E)return{...m,ready:!0,source:"flag"};if(g>=n&&x>0&&!C)return{...m,ready:!1,source:"error-bail"}}catch{}await w(s)}return c!==!1&&!d&&!m.loadingText&&y(m)?{...m,ready:!0,source:"nodes-fallback"}:{...m,ready:!1,source:"timeout",elapsedMs:Date.now()-o}}function O(e){let t=e.displayUrl||e.url;return e.status!=null?`${e.method} ${t} -> ${e.status}${e.statusText?` ${e.statusText}`:""}`:e.error?`${e.method} ${t} -> ${e.error}`:`${e.method} ${t}`}async function _(e,t,...r){return e.send({type:"call",path:`__sootsimTest.${t}`,args:r})}async function F(e,t={}){let r=await e.send({type:"evaluate",code:A});if(!r||typeof r!="object")return;let n=Math.max(0,Number(r.errors)||0),s=Math.max(0,Number(r.warnings)||0);if(n===0&&s===0)return;let o=[];if(n>0&&o.push(`${n} console error${n===1?"":"s"}`),s>0&&o.push(`${s} console warning${s===1?"":"s"}`),console.log(`
|
|
5
5
|
console: ${o.join(", ")}`),t.errorsCommand&&console.log(` inspect: ${t.errorsCommand}`),s>0&&t.warningsCommand&&console.log(` inspect: ${t.warningsCommand}`),!t.includeTail||n===0)return;let l=await v(e,5);if(!(!Array.isArray(l)||l.length===0)){console.log(`
|