sootsim 0.1.308 → 0.1.310
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 +5 -5
- package/dist-cli/chunks/{agent-FDZTBSVV.js → agent-CPD4GIXP.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-7QJ2JHCB.js → agent-wrapper-JZTNUUZE.js} +2 -2
- package/dist-cli/chunks/{app-fonts-LTJSQALL.js → app-fonts-CFIBFEVF.js} +2 -2
- package/dist-cli/chunks/{assert-CIGJGFYB.js → assert-C5WAWJ6I.js} +2 -2
- package/dist-cli/chunks/{auth-4W5KWNEG.js → auth-UY7RPLPH.js} +2 -2
- package/dist-cli/chunks/{beta-27VDK37K.js → beta-NM7T7MDN.js} +2 -2
- package/dist-cli/chunks/{camera-4KHMJE6X.js → camera-4YUYYYJI.js} +2 -2
- package/dist-cli/chunks/{chunk-FKQAZWL7.js → chunk-2KSLGBIU.js} +2 -2
- package/dist-cli/chunks/{chunk-QX3AFGNB.js → chunk-2TRPGEZE.js} +2 -2
- package/dist-cli/chunks/{chunk-E7BETJML.js → chunk-3EO5JEG7.js} +2 -2
- package/dist-cli/chunks/{chunk-IIUOBQNT.js → chunk-3S7UEXZW.js} +1 -1
- package/dist-cli/chunks/{chunk-F2VITCHS.js → chunk-4XMPRQGE.js} +7 -7
- package/dist-cli/chunks/{chunk-3VPI27RB.js → chunk-63EKEKDF.js} +1 -1
- package/dist-cli/chunks/{chunk-RSXS465H.js → chunk-63JWRDM6.js} +2 -2
- package/dist-cli/chunks/{chunk-BSLGLHO5.js → chunk-66Z2ADUQ.js} +2 -2
- package/dist-cli/chunks/{chunk-3MUKJOKU.js → chunk-6UXXOG6P.js} +2 -2
- package/dist-cli/chunks/{chunk-257DT745.js → chunk-7RJEULWN.js} +2 -2
- package/dist-cli/chunks/{chunk-OU4JVY3B.js → chunk-BFNAFH27.js} +1 -1
- package/dist-cli/chunks/{chunk-OJKCJMUA.js → chunk-BMIIHY6K.js} +3 -3
- package/dist-cli/chunks/{chunk-QEBKGRKU.js → chunk-C3GMSIRT.js} +2 -2
- package/dist-cli/chunks/{chunk-RJBH7TUF.js → chunk-C3O6UUPY.js} +3 -3
- package/dist-cli/chunks/{chunk-OKZVIP5U.js → chunk-C4O4VRN5.js} +2 -2
- package/dist-cli/chunks/{chunk-J35YPP4T.js → chunk-CORSX7M5.js} +1 -1
- package/dist-cli/chunks/{chunk-YYQZKZ4Z.js → chunk-EPMLSKSB.js} +2 -2
- package/dist-cli/chunks/{chunk-UGHQIRZU.js → chunk-EPZUFQMX.js} +2 -2
- package/dist-cli/chunks/{chunk-FGJ76ALE.js → chunk-EWRPLFYI.js} +1 -1
- package/dist-cli/chunks/{chunk-XU3K3MM4.js → chunk-FT2XATWO.js} +1 -1
- package/dist-cli/chunks/{chunk-VEHRW2TN.js → chunk-GH2OE6F6.js} +2 -2
- package/dist-cli/chunks/{chunk-ZDNKCQ3P.js → chunk-GQVBLBUJ.js} +2 -2
- package/dist-cli/chunks/{chunk-QGVLNNVI.js → chunk-IS5OOCN5.js} +1 -1
- package/dist-cli/chunks/{chunk-DQQTNI4F.js → chunk-LKAAQBT6.js} +1 -1
- package/dist-cli/chunks/{chunk-I4AWOWHZ.js → chunk-M2LP2VYQ.js} +2 -2
- package/dist-cli/chunks/{chunk-BJZDSMUX.js → chunk-MUQDPJUP.js} +1 -1
- package/dist-cli/chunks/{chunk-6VE43HZK.js → chunk-NLTJE335.js} +2 -2
- package/dist-cli/chunks/{chunk-ACQ77JLG.js → chunk-OQO3HU4Y.js} +1 -1
- package/dist-cli/chunks/{chunk-CZJ7EYZZ.js → chunk-PJKCYUT3.js} +2 -2
- package/dist-cli/chunks/{chunk-2NOXORGK.js → chunk-QPZVGHRV.js} +1 -1
- package/dist-cli/chunks/{chunk-RY4GVRWJ.js → chunk-R7AS52NA.js} +2 -2
- package/dist-cli/chunks/{chunk-TWDK7ZW6.js → chunk-RMIKUUCO.js} +1 -1
- package/dist-cli/chunks/{chunk-77OOHSF3.js → chunk-RX4CFOVV.js} +1 -1
- package/dist-cli/chunks/{chunk-UA7FUHD7.js → chunk-RYPPRVBM.js} +2 -2
- package/dist-cli/chunks/{chunk-QNPI3JQT.js → chunk-S7WXPIOY.js} +2 -2
- package/dist-cli/chunks/{chunk-ZBJJNMOY.js → chunk-STWCCIBA.js} +2 -2
- package/dist-cli/chunks/{chunk-MFAD2V3C.js → chunk-SY7E43UY.js} +3 -3
- package/dist-cli/chunks/{chunk-IPL6MCSI.js → chunk-TAQV44LZ.js} +3 -3
- package/dist-cli/chunks/{chunk-WMRLZLFL.js → chunk-VAGUPECL.js} +2 -2
- package/dist-cli/chunks/{chunk-WX747PJK.js → chunk-WWIQEYHT.js} +1 -1
- package/dist-cli/chunks/{chunk-BMFU7YRS.js → chunk-XBBNRESY.js} +1 -1
- package/dist-cli/chunks/{chunk-RAHHXSBC.js → chunk-XKAXZ4DS.js} +1 -1
- package/dist-cli/chunks/{chunk-FACSJFMR.js → chunk-XMOULANJ.js} +2 -2
- package/dist-cli/chunks/{chunk-6A7PEIVI.js → chunk-YIJFCR5T.js} +1 -1
- package/dist-cli/chunks/{chunk-JSXTQEQJ.js → chunk-YMD6WWI7.js} +2 -2
- package/dist-cli/chunks/{chunk-6NT4NEC5.js → chunk-YRRUK3EK.js} +1 -1
- package/dist-cli/chunks/{chunk-JYHLGI32.js → chunk-YZPSUNTO.js} +2 -2
- package/dist-cli/chunks/{chunk-3GLUIZ7Y.js → chunk-Z6H5FR3U.js} +2 -2
- package/dist-cli/chunks/{chunk-RDRMZVZN.js → chunk-ZNK3ZAA5.js} +2 -2
- package/dist-cli/chunks/{chunk-TAPL2B2Q.js → chunk-ZS7OXPHR.js} +1 -1
- package/dist-cli/chunks/{cleanup-ATMBX4WB.js → cleanup-2ZM4QSDV.js} +2 -2
- package/dist-cli/chunks/{cli-version-X4NT4YIH.js → cli-version-WXOEWZDA.js} +2 -2
- package/dist-cli/chunks/{compat-MEW4UO3U.js → compat-MGY3FZSI.js} +2 -2
- package/dist-cli/chunks/{config-XTNLWH4K.js → config-3W5VNME6.js} +2 -2
- package/dist-cli/chunks/{control-I3UZ6KF5.js → control-7LNRM2BK.js} +2 -2
- package/dist-cli/chunks/daemon-ZNCVHOWJ.js +4 -0
- package/dist-cli/chunks/{debug-HT6IURQN.js → debug-4CMFC2CO.js} +3 -3
- package/dist-cli/chunks/{desktop-JGCOHBSW.js → desktop-Q6CZSS4R.js} +3 -3
- package/dist-cli/chunks/{detox-KZUDVA3M.js → detox-2AF4MXXN.js} +2 -2
- package/dist-cli/chunks/{device-OVMSVSTA.js → device-E2WCI2N2.js} +2 -2
- package/dist-cli/chunks/{diagnose-RYNQ42UX.js → diagnose-CZGCKNVY.js} +2 -2
- package/dist-cli/chunks/disk-cleanup-4T6MDZBA.js +4 -0
- package/dist-cli/chunks/drivers-NEB27ZKQ.js +4 -0
- package/dist-cli/chunks/{film-Y5BRFAN6.js → film-UDSAJZXL.js} +3 -3
- package/dist-cli/chunks/flow-GXXVEHEW.js +4 -0
- package/dist-cli/chunks/help-3RVUJUAN.js +4 -0
- package/dist-cli/chunks/{hidden-runtime-alias-2XGWMRWQ.js → hidden-runtime-alias-CHAB56GM.js} +2 -2
- package/dist-cli/chunks/{home-paths-3W2XI22W.js → home-paths-WFCI5ORX.js} +2 -2
- package/dist-cli/chunks/inspect-4H4VNQJ4.js +4 -0
- package/dist-cli/chunks/install-desktop-RGCBPM4J.js +4 -0
- package/dist-cli/chunks/{login-RAGF6V6I.js → login-57UP2EKB.js} +4 -4
- package/dist-cli/chunks/{logout-JJ4H76TY.js → logout-UYNCJTOC.js} +2 -2
- package/dist-cli/chunks/{maestro-VQGVMRFD.js → maestro-QMAPXPZ7.js} +3 -3
- package/dist-cli/chunks/{maestro-generate-5WM5DEX6.js → maestro-generate-N2BJXJDH.js} +3 -3
- package/dist-cli/chunks/{mode-LJBWSKXM.js → mode-SY5G7WQD.js} +2 -2
- package/dist-cli/chunks/{optional-demo-registry-QPNNLHR5.js → optional-demo-registry-DH3L6FFX.js} +2 -2
- package/dist-cli/chunks/{perf-SLPWARJ7.js → perf-NZ6VEDLA.js} +2 -2
- package/dist-cli/chunks/{permissions-VSSQI7TS.js → permissions-EMH2K5LX.js} +2 -2
- package/dist-cli/chunks/{record-WQXXQZON.js → record-44PMWGYY.js} +3 -3
- package/dist-cli/chunks/{report-issue-XE2Y7FM2.js → report-issue-PLGMRWXG.js} +2 -2
- package/dist-cli/chunks/runtime-CUSKTS2J.js +4 -0
- package/dist-cli/chunks/{screenshot-command-LELP3QH7.js → screenshot-command-GJT5XS7P.js} +3 -3
- package/dist-cli/chunks/{screenshot-layers-G3DBXZJM.js → screenshot-layers-4JSTS5VY.js} +2 -2
- package/dist-cli/chunks/{screenshots-capture-BRY4ZN7N.js → screenshots-capture-AQQISSQD.js} +2 -2
- package/dist-cli/chunks/{serve-I6T264VY.js → serve-TJMO4KGX.js} +2 -2
- package/dist-cli/chunks/{setup-WHHD5GUT.js → setup-7ZSYCUX6.js} +2 -2
- package/dist-cli/chunks/{skills-RBBS5D6Q.js → skills-GRQPAAD5.js} +2 -2
- package/dist-cli/chunks/{storage-ZZTD3U7X.js → storage-GWRZNBAU.js} +2 -2
- package/dist-cli/chunks/store-MLODFZBM.js +4 -0
- package/dist-cli/chunks/telemetry-XL3UDJSE.js +4 -0
- package/dist-cli/chunks/{timeline-S3CVUS4X.js → timeline-2FXM7HEU.js} +2 -2
- package/dist-cli/chunks/{upgrade-CA5P67YG.js → upgrade-AV7UOK2X.js} +2 -2
- package/dist-cli/chunks/upload-6DXF4DAQ.js +4 -0
- package/dist-cli/chunks/{version-FTPPCAWP.js → version-C72O2LMS.js} +2 -2
- package/dist-cli/chunks/{web-XGYSJA6B.js → web-4V3YGWNC.js} +2 -2
- package/dist-cli/chunks/{what-happened-SRB7UKET.js → what-happened-RGD2DOQI.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 +10 -6
- package/dist-lib/sdk.mjs +10 -6
- package/dist-lib/skills.cjs +1 -1
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/dist-cli/chunks/daemon-GGTZI5IH.js +0 -4
- package/dist-cli/chunks/disk-cleanup-SD6A5U55.js +0 -4
- package/dist-cli/chunks/drivers-GWLETUZ7.js +0 -4
- package/dist-cli/chunks/flow-F6MLTGTC.js +0 -4
- package/dist-cli/chunks/help-DUQVA4XQ.js +0 -4
- package/dist-cli/chunks/inspect-PKY4K7KI.js +0 -4
- package/dist-cli/chunks/install-desktop-667OGRUB.js +0 -4
- package/dist-cli/chunks/runtime-DIVVXWXI.js +0 -4
- package/dist-cli/chunks/store-KVLTCAC5.js +0 -4
- package/dist-cli/chunks/telemetry-QEXFRYZM.js +0 -4
- package/dist-cli/chunks/upload-AADA5IQ3.js +0 -4
package/dist-cli/bin.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
/*! sootsim v0.1.
|
|
2
|
+
/*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
3
3
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
4
4
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
5
|
-
import{a as w,b as g}from"./chunks/chunk-
|
|
5
|
+
import{a as w,b as g}from"./chunks/chunk-ZS7OXPHR.js";import"./chunks/chunk-XKAXZ4DS.js";function b(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("multiple sims are connected:")||a.startsWith("saved sim ")||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}
|
|
6
6
|
`),process.exit(1)),t instanceof Error&&t.stack?process.stderr.write(`${t.stack}
|
|
7
7
|
`):process.stderr.write(`${a}
|
|
8
8
|
`),process.exit(1)}process.on("unhandledRejection",b);process.on("uncaughtException",b);var A=typeof __SOOTSIM_STANDALONE__<"u"&&__SOOTSIM_STANDALONE__,k=new Set(["desktop"]);function S(t){!A||!k.has(t)||(process.stderr.write(` sootsim ${t} isn't available in the standalone binary \u2014
|
|
9
9
|
it needs vite / electron / playwright from a project's node_modules.
|
|
10
10
|
run the npm package instead:
|
|
11
11
|
sootsim ${t}
|
|
12
|
-
`),process.exit(1))}var e=g(process.argv);if(!e.command&&e.commandArgs.length>0){let{resolveHiddenRuntimeAlias:t}=await import("./chunks/hidden-runtime-alias-
|
|
13
|
-
`)}var f=!1;async function v(){if(!f&&(f=!0,!(e.command==="cleanup"||e.command==="serve"||e.command==="agent-wrapper"||e.command==="daemon"&&e.commandArgs[0]==="uninstall")))try{let{isAutomaticSootsimCleanupComplete:t}=await import("./chunks/disk-cleanup-
|
|
12
|
+
`),process.exit(1))}var e=g(process.argv);if(!e.command&&e.commandArgs.length>0){let{resolveHiddenRuntimeAlias:t}=await import("./chunks/hidden-runtime-alias-CHAB56GM.js");e=t(e)}var _=e.command==="cleanup"&&e.commandArgs.length===1&&e.commandArgs[0]==="--automatic-worker";if(!_){let{trackCliEvent:t}=await import("./chunks/telemetry-XL3UDJSE.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-WFCI5ORX.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
|
|
13
|
+
`)}var f=!1;async function v(){if(!f&&(f=!0,!(e.command==="cleanup"||e.command==="serve"||e.command==="agent-wrapper"||e.command==="daemon"&&e.commandArgs[0]==="uninstall")))try{let{isAutomaticSootsimCleanupComplete:t}=await import("./chunks/disk-cleanup-4T6MDZBA.js");if(t())return;let{spawn:a}=await import("node:child_process"),s=["cleanup","--automatic-worker"],m=process.argv[1],d=A?a(process.execPath,s,{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env}):m?a(process.execPath,[m,...s],{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env}):a("sootsim",s,{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env});d.once("error",p=>{process.stderr.write(` SootSim automatic cleanup will retry on the next run: ${p.message}
|
|
14
14
|
`)}),d.unref()}catch(t){process.stderr.write(` SootSim automatic cleanup will retry on the next run: ${t instanceof Error?t.message:String(t)}
|
|
15
|
-
`)}}async function n(t){let{flushCliTelemetry:a}=await import("./chunks/telemetry-
|
|
15
|
+
`)}}async function n(t){let{flushCliTelemetry:a}=await import("./chunks/telemetry-XL3UDJSE.js");await a(),await v(),process.exit(t)}if(e.version){let{getCliVersion:t}=await import("./chunks/cli-version-WXOEWZDA.js"),{IS_BETA:a,BETA_LABEL:s}=await import("./chunks/beta-NM7T7MDN.js"),m=a?` \xB7 ${s}`:"";console.log(`sootsim v${t()}${m}`);let{readActiveRuntime:d}=await import("./chunks/home-paths-WFCI5ORX.js"),p=d();console.log(p?`runtime v${p}`:"runtime not installed"),await n(0)}if(e.help&&!e.command){let{printHelp:t}=await import("./chunks/help-3RVUJUAN.js");t(),await n(0)}var o=e.globalFlags.port,c=e.verbose,u=e.globalFlags.device,l=e.globalFlags.theme,E=e.globalFlags.driver,O=e.globalFlags.headless===!0,h=e.globalFlags.sim??e.globalFlags.session??e.globalFlags.tab,i=h?["--sim",h,...e.commandArgs]:e.commandArgs;if(u||l){let{settingsStore:t}=await import("./chunks/store-MLODFZBM.js"),a={};u&&(a.deviceModel=u),l&&(a.colorScheme=l),t.apply(a)}if(!e.command&&e.commandArgs.length===0){let{runSetup:t,shouldRunSetupForBareCommand:a}=await import("./chunks/setup-7ZSYCUX6.js");a()&&(await t(["--from-welcome"]),await n(0));let{printHelp:s}=await import("./chunks/help-3RVUJUAN.js");s(),await n(0)}var r=e.command??"";if(!r){if(e.commandArgs.length>0){let a=e.commandArgs.find(s=>!s.startsWith("-"))??e.commandArgs[0];console.error(` unknown command: ${a}`),console.error(" run `sootsim --help` to see the full surface."),await n(1)}let{printHelp:t}=await import("./chunks/help-3RVUJUAN.js");t(),await n(0)}if(e.help||e.commandArgs.includes("--help")||e.commandArgs.includes("-h")){if(r==="skill"){let{runSkill:s}=await import("./chunks/skills-GRQPAAD5.js");await s(e.commandArgs),await n(0)}let t=r==="do"||r==="get"||r==="debug"||r==="shell"||r==="perf"||r==="wait",a=e.commandArgs.find(s=>!s.startsWith("-"));if(!(r==="shell"||r==="perf"))if(t&&!a){let{printGroupHelp:s}=await import("./chunks/help-3RVUJUAN.js");s(r)&&await n(0)}else{let{printCommandHelp:s}=await import("./chunks/help-3RVUJUAN.js");s(t&&a?a:r,{prefer:t&&a?"verb":"command",group:t&&a?r:void 0}),await n(0)}}S(r);if(w.has(r)){let{runInspect:t}=await import("./chunks/inspect-4H4VNQJ4.js");await t([r,...i],{port:o,verbose:c})}else switch(r){case"assert":{let{runAssert:t}=await import("./chunks/assert-C5WAWJ6I.js");await t(e.commandArgs);break}case"detox":{let{runDetox:t}=await import("./chunks/detox-2AF4MXXN.js");await t(e.commandArgs,{port:o,verbose:c});break}case"maestro":{let{runMaestro:t}=await import("./chunks/maestro-QMAPXPZ7.js"),a=await t(i,{port:o,verbose:c});await n(typeof a=="number"?a:0)}case"record":{let{runRecord:t}=await import("./chunks/record-44PMWGYY.js");await t(i,{port:o,verbose:c});break}case"film":{let{runFilm:t}=await import("./chunks/film-UDSAJZXL.js"),a=await t(i,{port:o,verbose:c});await n(typeof a=="number"?a:0)}case"storage":{let{runStorage:t}=await import("./chunks/storage-GWRZNBAU.js"),a=await t(i,{port:o,verbose:c});await n(typeof a=="number"?a:0)}case"perf":{let{runPerf:t}=await import("./chunks/perf-NZ6VEDLA.js"),a=await t(i,{port:o,verbose:c});await n(typeof a=="number"?a:0)}case"screenshot":{let{runScreenshotCommand:t}=await import("./chunks/screenshot-command-GJT5XS7P.js"),a=await t(i,{port:o,verbose:c});await n(typeof a=="number"?a:0)}case"mode":{let{runMode:t}=await import("./chunks/mode-SY5G7WQD.js");await t(i,{port:o,verbose:c});break}case"permissions":{let{runPermissions:t}=await import("./chunks/permissions-EMH2K5LX.js"),a=await t(i,{port:o,verbose:c});await n(a)}case"inspect":{let{runInspect:t}=await import("./chunks/inspect-4H4VNQJ4.js");await t(i,{port:o,verbose:c});break}case"debug":{let{runDebug:t}=await import("./chunks/debug-4CMFC2CO.js");await t(i,{port:o,verbose:c});break}case"timeline":{let{runTimeline:t}=await import("./chunks/timeline-2FXM7HEU.js");await t(i,{port:o,verbose:c});break}case"what-happened":{let{runWhatHappened:t}=await import("./chunks/what-happened-RGD2DOQI.js");await t(i,{port:o,verbose:c});break}case"open":{let{runOpenCommand:t}=await import("./chunks/control-7LNRM2BK.js");await t(i,{port:o});break}case"use":{let{runUseCommand:t}=await import("./chunks/control-7LNRM2BK.js");await t(i,{port:o});break}case"claim":{let{runClaimCommand:t}=await import("./chunks/control-7LNRM2BK.js");await t(i,{port:o});break}case"close":{let{runCloseCommand:t}=await import("./chunks/control-7LNRM2BK.js");await t(i,{port:o});break}case"device":{let{runDeviceCommand:t}=await import("./chunks/device-E2WCI2N2.js");await t(i,{port:o});break}case"compat":{let{runCompat:t}=await import("./chunks/compat-MGY3FZSI.js");await t(e.commandArgs);break}case"report-issue":{let{runReportIssue:t}=await import("./chunks/report-issue-PLGMRWXG.js"),a=await t(e.commandArgs);await n(a)}case"desktop":{let{runDesktop:t}=await import("./chunks/desktop-Q6CZSS4R.js");await t(e.commandArgs,{port:o,device:u});break}case"login":{let{runLogin:t}=await import("./chunks/login-57UP2EKB.js");await t(e.commandArgs);break}case"logout":{let{runLogout:t}=await import("./chunks/logout-UYNCJTOC.js");await t();break}case"auth":{let{runAuth:t}=await import("./chunks/auth-UY7RPLPH.js");await t(e.commandArgs);break}case"setup":{let{runSetup:t}=await import("./chunks/setup-7ZSYCUX6.js");await t(e.commandArgs);break}case"serve":{let{runServe:t}=await import("./chunks/serve-TJMO4KGX.js");await t(e.commandArgs,{port:o});break}case"daemon":{let{runDaemon:t}=await import("./chunks/daemon-ZNCVHOWJ.js");await t(e.commandArgs,{port:o});break}case"runtime":{let{runRuntime:t}=await import("./chunks/runtime-CUSKTS2J.js");await t(e.commandArgs);break}case"upgrade":case"update":{let{runUpgrade:t}=await import("./chunks/upgrade-AV7UOK2X.js");await t(e.commandArgs);break}case"version":{let{runVersion:t}=await import("./chunks/version-C72O2LMS.js");await t(e.commandArgs);break}case"agent":{let{runAgentCommand:t}=await import("./chunks/agent-CPD4GIXP.js"),a=await t(e.commandArgs);await n(a)}case"agent-wrapper":{let{runAgentWrapper:t}=await import("./chunks/agent-wrapper-JZTNUUZE.js"),a=await t(e.commandArgs);await n(a)}case"skill":{let{runSkill:t}=await import("./chunks/skills-GRQPAAD5.js");await t(e.commandArgs);break}case"app-fonts":{let{runAppFonts:t}=await import("./chunks/app-fonts-CFIBFEVF.js");await t(e.commandArgs);break}case"config":{let{runConfig:t}=await import("./chunks/config-3W5VNME6.js");await t(e.commandArgs);break}case"cleanup":{let{runCleanup:t}=await import("./chunks/cleanup-2ZM4QSDV.js"),a=await t(e.commandArgs);await n(a)}default:console.error(` unknown command: ${r}`),console.error(" run `sootsim --help` to see the full surface."),await n(1)}await v();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
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,n as k,o as D,p as x,q as g,r as O,s as C}from"./chunk-
|
|
4
|
+
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,n as k,o as D,p as x,q as g,r as O,s as C}from"./chunk-PJKCYUT3.js";import"./chunk-WWIQEYHT.js";import{c as $}from"./chunk-2TRPGEZE.js";import"./chunk-ZNK3ZAA5.js";import"./chunk-M2LP2VYQ.js";import"./chunk-EPZUFQMX.js";import"./chunk-GH2OE6F6.js";import"./chunk-NLTJE335.js";import"./chunk-IS5OOCN5.js";import"./chunk-LKAAQBT6.js";import{j as y}from"./chunk-XBBNRESY.js";import"./chunk-3S7UEXZW.js";import"./chunk-EWRPLFYI.js";import"./chunk-XKAXZ4DS.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}
|
|
5
5
|
`),L(),2}}catch(r){if(r instanceof c)return process.stderr.write(`${r.message}
|
|
6
6
|
`),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]
|
|
7
7
|
`),2;let s=d.resolve(r);if(!w.existsSync(s))return process.stderr.write(`directory does not exist: ${s}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{b as M}from"./chunk-
|
|
4
|
+
import{b as M}from"./chunk-WWIQEYHT.js";import"./chunk-XKAXZ4DS.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 C,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,f=!1,a=new Promise(s=>{t.on("exit",(o,e)=>{f=!0;let p=new Error(`codex app-server exited (code=${o}, signal=${e??""})`);for(let{reject:y}of r.values())y(p);r.clear(),s({code:o,signal:e})})});L.createInterface({input:t.stdout,crlfDelay:1/0}).on("line",s=>{let o=s.trim();if(!o)return;let e;try{e=JSON.parse(o)}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,y=p!=null?r.get(p):void 0;if(!y)return;r.delete(p),e.error?y.reject(new b(e.error.message,e.error.code,e.error.data)):y.resolve(e.result);return}if(e.method){let p=m.get(e.method);if(!p)return;for(let y of p)try{y(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 o=m.get("__stderr__");if(o)for(let e of o)try{e({text:s})}catch{}});function n(s){if(!f)try{t.stdin.write(JSON.stringify(s)+`
|
|
5
5
|
`)}catch{}}return{exited:a,on(s,o){let e=m.get(s);return e||(e=new Set,m.set(s,e)),e.add(o),()=>{e?.delete(o)}},request(s,o){if(f)return Promise.reject(new Error(`codex app-server closed; cannot call ${s}`));let e=u++;return new Promise((p,y)=>{r.set(e,{resolve:l=>p(l),reject:y,method:s}),n({jsonrpc:"2.0",id:e,method:s,params:o})})},notify(s,o){n({jsonrpc:"2.0",method:s,params:o})},async shutdown(s=1500){if(f)return;try{t.stdin.end()}catch{}let o=setTimeout(()=>{if(!f)try{t.kill("SIGTERM")}catch{}},s);try{await a}finally{clearTimeout(o)}},kill(s="SIGTERM"){if(!f)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 C(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 f=t[u];f&&(r[f]=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>
|
|
6
6
|
--provider codex|claude --cwd <path>
|
|
7
7
|
--prompt-in <fifo> --events-out <fifo>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{k as p}from"./chunk-
|
|
4
|
+
import{k as p}from"./chunk-STWCCIBA.js";import"./chunk-BFNAFH27.js";import"./chunk-YIJFCR5T.js";import"./chunk-XKAXZ4DS.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,7 +1,7 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import"./chunk-
|
|
4
|
+
import"./chunk-XKAXZ4DS.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(`
|
|
5
5
|
`).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}
|
|
6
6
|
`),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(" ")}
|
|
7
7
|
supported: ${Array.from(w).sort().join(", ")}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{a as t}from"./chunk-
|
|
4
|
+
import{a as t}from"./chunk-C4O4VRN5.js";import{d as s}from"./chunk-2KSLGBIU.js";import"./chunk-XBBNRESY.js";import"./chunk-XKAXZ4DS.js";function i(){console.log(`
|
|
5
5
|
sootsim auth \u2014 inspect CLI auth
|
|
6
6
|
|
|
7
7
|
usage:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{a,b,c,d}from"./chunk-
|
|
4
|
+
import{a,b,c,d}from"./chunk-EWRPLFYI.js";import"./chunk-XKAXZ4DS.js";export{d as BETA_ASK_HEADLINE,b as BETA_LABEL,c as BETA_TAGLINE,a as IS_BETA};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{m as d}from"./chunk-
|
|
4
|
+
import{m as d}from"./chunk-YZPSUNTO.js";import"./chunk-4XMPRQGE.js";import{h as l,j as m,l as p}from"./chunk-7RJEULWN.js";import"./chunk-NLTJE335.js";import"./chunk-IS5OOCN5.js";import"./chunk-XBBNRESY.js";import"./chunk-XKAXZ4DS.js";function f(){console.log(`
|
|
5
5
|
sootsim do scan \u2014 inject a barcode scan
|
|
6
6
|
|
|
7
7
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{o as d}from"./chunk-
|
|
4
|
+
import{o as d}from"./chunk-XBBNRESY.js";import{chmodSync as S,existsSync as f,mkdirSync as k,readFileSync as A,rmSync as i,writeFileSync as y}from"node:fs";import{dirname as c,join as D,resolve as m}from"node:path";var s=1,p="SOOTSIM_SHARED_AUTH_FILE",u="https://contrast.dev";function w(){let t=process.env[p];return t?.trim()?c(m(t)):d()}function a(){let t=process.env[p];return t?.trim()?m(t):D(w(),"desktop-auth.json")}function g(t){if(!t||typeof t!="object")return null;let e=t;return typeof e.id!="string"||!e.id.trim()?null:{id:e.id.trim(),name:typeof e.name=="string"?e.name:void 0,email:typeof e.email=="string"?e.email:void 0,image:typeof e.image=="string"?e.image:void 0,githubUsername:typeof e.githubUsername=="string"?e.githubUsername:void 0,teams:Array.isArray(e.teams)?e.teams.map(r=>{if(!r||typeof r!="object")return null;let n=r;return typeof n.id!="string"||typeof n.name!="string"?null:{id:n.id,name:n.name,role:n.role==="owner"?"owner":"member",githubOrg:typeof n.githubOrg=="string"?n.githubOrg:null}}).filter(r=>!!r):void 0}}function v(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==s||typeof e.token!="string"||!e.token.trim())return null;let r=typeof e.origin=="string"&&e.origin.trim()?e.origin.trim():u,n=e.source==="cli"||e.source==="electron"||e.source==="browser"||e.source==="unknown"?e.source:"unknown",o=typeof e.updatedAt=="string"&&e.updatedAt?e.updatedAt:new Date().toISOString(),h=typeof e.validatedAt=="string"&&e.validatedAt?e.validatedAt:void 0;return{version:s,token:e.token.trim(),user:g(e.user),origin:r,source:n,updatedAt:o,validatedAt:h}}function O(){let t=a();if(!f(t))return null;try{let e=JSON.parse(A(t,"utf8")),r=v(e);return r||(i(t,{force:!0}),null)}catch{return i(t,{force:!0}),null}}function b(t){let e=a();k(c(e),{recursive:!0});let r={version:s,token:t.token.trim(),user:t.user?g(t.user):null,origin:t.origin?.trim()||u,source:t.source,updatedAt:t.updatedAt||new Date().toISOString(),validatedAt:t.validatedAt};y(e,JSON.stringify(r,null,2)+`
|
|
5
5
|
`);try{S(e,384)}catch{}return r}function l(){i(a(),{force:!0})}async function E(t){let e=O();if(!e?.token)return null;let r=t||e.origin||u;try{let n=await fetch(`${r.replace(/\/$/,"")}/api/auth/me`,{headers:{authorization:`Bearer ${e.token}`}});if(n.status===401)return l(),null;if(!n.ok)return e;let o=await n.json();return o.user?.id?b({token:e.token,user:o.user,origin:r,source:e.source,validatedAt:new Date().toISOString()}):(l(),null)}catch{return e}}export{O as a,b,l as c,E as d};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{a as c}from"./chunk-
|
|
4
|
+
import{a as c}from"./chunk-ZNK3ZAA5.js";import{a}from"./chunk-M2LP2VYQ.js";import{a as e}from"./chunk-EPZUFQMX.js";import{a as n}from"./chunk-NLTJE335.js";import{c as i,d as m,e as p}from"./chunk-LKAAQBT6.js";import{a as u}from"./chunk-3S7UEXZW.js";import{a as f,c as s}from"./chunk-EWRPLFYI.js";function g(){return`sootsim CLI v${u()} \xB7 ${c().primary}`}function _(){let r=m({bridgePort:7668,defaultShellUrl:n},e()),o=`
|
|
5
5
|
${s}
|
|
6
6
|
`;console.log(`${g()}
|
|
7
7
|
${o}${r}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{a as c}from"./chunk-
|
|
4
|
+
import{a as c}from"./chunk-R7AS52NA.js";import{H as a,l as u}from"./chunk-XBBNRESY.js";function f(t){return t.replace(/^\[|\]$/g,"").toLowerCase()}function p(t){let n=f(t);return n==="localhost"||n.endsWith(".localhost")||n==="0.0.0.0"||n==="::1"||/^127(?:\.\d{1,3}){3}$/.test(n)}import o from"fs";import e from"path";import{fileURLToPath as m}from"url";var l;function d(){if(l!==void 0)return l;let t=e.dirname(m(import.meta.url));for(let n=0;n<12&&t!==e.dirname(t);n++){if(o.existsSync(e.join(t,"packages/sootsim-engine/package.json"))&&o.existsSync(e.join(t,"public/sootsim")))return l=t,t;t=e.dirname(t)}return l=null,null}function w(){if(process.env.SOOTSIM_HOME&&a())return null;let t=d();if(!t)return null;let n=e.join(t,"public/sootsim");return o.existsSync(e.join(n,"index.html"))&&o.existsSync(e.join(n,"engine/index.html"))&&o.existsSync(e.join(n,"engine-tenant/worker.js"))?n:null}function R(t){let n=t.trim();if(!c(n))throw new Error(`invalid SootSim runtime version: ${t}`);let i=Buffer.from(n,"utf8").toString("hex").match(/.{1,60}/g);if(!i)throw new Error(`invalid SootSim runtime version: ${t}`);return`${i.join(".")}.runtime.localhost`}function y(t){let n=".runtime.localhost";if(!t.toLowerCase().endsWith(n))return null;let r=t.slice(0,-n.length).split(".");if(r.length===0||r.some(s=>!/^[0-9a-f]{1,60}$/i.test(s)))return null;let i=r.join("");if(i.length%2!==0)return null;try{let s=Buffer.from(i,"hex").toString("utf8");return c(s)?s:null}catch{return null}}function b(t){let n=u(t);return o.existsSync(e.join(n,"index.html"))?n:null}export{p as a,w as b,R as c,y as d,b as e};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
4
|
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,7 +1,7 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
function Q(t,e){let r=["--max-ms","--maxMs","--maxms","--max_ms"];for(let n of r){let o=t.indexOf(n);if(o>=0&&t[o+1]){let s=Number(t[o+1]);if(Number.isFinite(s))return Math.max(100,s)}}return e}var
|
|
4
|
+
function Q(t,e){let r=["--max-ms","--maxMs","--maxms","--max_ms"];for(let n of r){let o=t.indexOf(n);if(o>=0&&t[o+1]){let s=Number(t[o+1]);if(Number.isFinite(s))return Math.max(100,s)}}return e}var P=new Set(["tap","double-tap","tap-text","tap-id","long-press","touch"]);function N(t){return typeof t=="string"&&P.has(t)}async function M(t){return await t.send({type:"evaluate",code:"window.__sootsimEngineState?.inspectActive === true"})===!0}async function X(t,e){if(!N(e))return!1;try{return await M(t)}catch{return!1}}async function Z(t){let e=await t.send({type:"evaluate",code:"(async () => await window.__sootsimTest.getNodeCount())()"});return{nodes:typeof e=="number"?e:0}}async function ee(t,e=5,r){let n=r?.format?`, ${JSON.stringify(r)}`:"",o=await t.send({type:"evaluate",code:`(async () => await window.__sootsimTest.dumpTree(${e}${n}))()`});if(r?.format==="boxes"&&typeof o=="string")try{return{depth:e,tree:JSON.parse(o)}}catch{return{depth:e,tree:o}}return{depth:e,tree:o}}async function te(t){let e=await t.send({type:"evaluate",code:"window.location.href"});return{url:typeof e=="string"?e:""}}async function ne(t,e){let r=`(async () => {
|
|
5
5
|
const t = window.__sootsimTest
|
|
6
6
|
const mainShell = window.SootSim?.bridges?.mainShell
|
|
7
7
|
const kb = window.__sootsimKeyboard
|
|
@@ -85,7 +85,7 @@ function Q(t,e){let r=["--max-ms","--maxMs","--maxms","--max_ms"];for(let n of r
|
|
|
85
85
|
const nodeCount = (await t.getNodeCount?.()) || 0
|
|
86
86
|
const keyboard = kb && typeof kb.getLayout === 'function' ? kb.getLayout() : null
|
|
87
87
|
return { tree, shell, nodeCount, keyboard }
|
|
88
|
-
})()`;return await t.send({type:"evaluate",code:r})??{}}function D(t){let e=t.fontSize>=18||t.fontSize>=14&&(t.fontWeight??400)>=700?3:4.5,{normal:r,background:n}=t;if(r.width<=0||r.height<=0||r.width!==n.width||r.height!==n.height)return{ratio:null,required:e,reason:"capture dimensions do not match"};let o=Math.max(0,Math.floor(t.box.x)),s=Math.max(0,Math.floor(t.box.y)),i=Math.min(r.width,Math.ceil(t.box.x+t.box.w)),d=Math.min(r.height,Math.ceil(t.box.y+t.box.h));if(i<=o||d<=s)return{ratio:null,required:e,reason:"text is outside the captured frame"};let p=l=>{let
|
|
88
|
+
})()`;return await t.send({type:"evaluate",code:r})??{}}function D(t){let e=t.fontSize>=18||t.fontSize>=14&&(t.fontWeight??400)>=700?3:4.5,{normal:r,background:n}=t;if(r.width<=0||r.height<=0||r.width!==n.width||r.height!==n.height)return{ratio:null,required:e,reason:"capture dimensions do not match"};let o=Math.max(0,Math.floor(t.box.x)),s=Math.max(0,Math.floor(t.box.y)),i=Math.min(r.width,Math.ceil(t.box.x+t.box.w)),d=Math.min(r.height,Math.ceil(t.box.y+t.box.h));if(i<=o||d<=s)return{ratio:null,required:e,reason:"text is outside the captured frame"};let p=l=>{let u=l/255;return u<=.04045?u/12.92:Math.pow((u+.055)/1.055,2.4)},g=(l,u)=>{let c=.2126*p(l[0])+.7152*p(l[1])+.0722*p(l[2]),v=.2126*p(u[0])+.7152*p(u[1])+.0722*p(u[2]);return(Math.max(c,v)+.05)/(Math.min(c,v)+.05)},a=l=>`#${l.slice(0,3).map(u=>Math.round(u).toString(16).padStart(2,"0")).join("")}`,h=(i-o)*(d-s),y=Math.max(1,Math.floor(Math.sqrt(h/12e3))),b=(l,u)=>(u*r.width+l)*4,w=l=>Math.max(Math.abs(r.data[l]-n.data[l]),Math.abs(r.data[l+1]-n.data[l+1]),Math.abs(r.data[l+2]-n.data[l+2])),f=0,m=null,x=null;for(let l=s;l<d;l+=y)for(let u=o;u<i;u+=y){let c=b(u,l);if(n.data[c+3]<250)continue;let v=[n.data[c],n.data[c+1],n.data[c+2]];x??=v;let E=w(c);E<=f||(f=E,m=[r.data[c],r.data[c+1],r.data[c+2]])}let S=1/0,I=null,T=null,k=(l,u)=>{let c=g(l,u);c>=S||(S=c,I=l,T=u)};if(f>=2&&m)for(let l=s;l<d;l+=y)for(let u=o;u<i;u+=y){let c=b(u,l);n.data[c+3]<250||w(c)<2||k(m,[n.data[c],n.data[c+1],n.data[c+2]])}else x&&k(x,x);return!I||!T||!Number.isFinite(S)?{ratio:null,required:e,reason:"could not isolate opaque rendered text pixels"}:{ratio:Math.round(S*100)/100,required:e,foreground:a(I),background:a(T)}}function A(t={}){let e=t.styling===!0,r=t.filter?.trim().toLowerCase()??"";return`(async () => {
|
|
89
89
|
const t = window.__sootsimTest
|
|
90
90
|
if (!t || typeof t.listInspectable !== 'function') return []
|
|
91
91
|
const list = await t.listInspectable({})
|
|
@@ -454,7 +454,7 @@ ${R}
|
|
|
454
454
|
const t = window.__sootsimTest
|
|
455
455
|
if (!t) return null
|
|
456
456
|
return await t.findByText(${JSON.stringify(t.text)})
|
|
457
|
-
})()`}:null}async function ie(t,e){let r=C(e);if(!r)return null;let n=await t.send({type:"evaluate",code:r.code});return{mode:r.mode,result:n}}function le(t){return[...t].sort((e,r)=>$(r)-$(e))}function $(t){let e=0;t.testID&&(e+=100),typeof t.text=="string"&&t.text.trim().length>0&&(e+=60),typeof t.accessibilityLabel=="string"&&t.accessibilityLabel.trim().length>0&&(e+=30),t.accessibilityRole&&(e+=15);let r=t.layout?.width??0,n=t.layout?.height??0,o=r*n;return o>=400&&o<=6e4?e+=25:o>6e4&&(e-=20),(t.absolutePosition?.y??0)<0&&(e-=30),e}function
|
|
457
|
+
})()`}:null}async function ie(t,e){let r=C(e);if(!r)return null;let n=await t.send({type:"evaluate",code:r.code});return{mode:r.mode,result:n}}function le(t){return[...t].sort((e,r)=>$(r)-$(e))}function $(t){let e=0;t.testID&&(e+=100),typeof t.text=="string"&&t.text.trim().length>0&&(e+=60),typeof t.accessibilityLabel=="string"&&t.accessibilityLabel.trim().length>0&&(e+=30),t.accessibilityRole&&(e+=15);let r=t.layout?.width??0,n=t.layout?.height??0,o=r*n;return o>=400&&o<=6e4?e+=25:o>6e4&&(e-=20),(t.absolutePosition?.y??0)<0&&(e-=30),e}function ue(t){if(t.testID)return`sootsim do tap-id ${_(t.testID)}`;let e=typeof t.text=="string"?t.text.trim():"";if(e.length>0&&e.length<=80)return`sootsim do tap-text ${_(e)}`;let r=Math.round(((t.absolutePosition?.x??0)+(t.layout?.width??0)/2)*10)/10,n=Math.round(((t.absolutePosition?.y??0)+(t.layout?.height??0)/2)*10)/10;return`sootsim do tap ${r} ${n}`}function _(t){return/^[A-Za-z0-9_./@:-]+$/.test(t)?t:`'${t.replace(/'/g,"'\\''")}'`}var F=`(async () => {
|
|
458
458
|
const t = window.__sootsimTest
|
|
459
459
|
let nodes = 0
|
|
460
460
|
try { nodes = (await t?.getNodeCount?.()) || 0 } catch {}
|
|
@@ -595,7 +595,7 @@ ${R}
|
|
|
595
595
|
externalError,
|
|
596
596
|
suppressedEntryError,
|
|
597
597
|
}
|
|
598
|
-
})()`,W=100,H=750,B=2e3,z=150;function j(t){return t.liveFrameActive||t.targets>0||t.nodes>=W}function J(t){return t.liveFrameActive||t.targets>0}function
|
|
598
|
+
})()`,W=100,H=750,B=2e3,z=150;function j(t){return t.liveFrameActive||t.targets>0||t.nodes>=W}function J(t){return t.liveFrameActive||t.targets>0}function ce(t){if(t.bridgeError)return`sim unreachable: ${t.bridgeError} \u2014 the target tab is closed or no sim is connected (check \`sootsim list\`, reopen with \`sootsim open\`)`;let e=t.externalError?`guest app errored: ${t.externalError}`:t.loadingText?`still showing "${t.loadingText}"`:t.externalReady===!1?"guest app is still loading":t.flag!==!0&&t.targets>0?"native content is rendered but the ready signal has not settled":t.flag!==!0?"guest app has not emitted sootsim:externalAppReady":t.targets<=0?"ready flag emitted but no visible app content is inspectable yet":"node tree is still changing";return!t.externalError&&t.suppressedEntryError?`${e} (suppressed entry error: ${t.suppressedEntryError})`:e}async function de(t,e=2e4,r={}){let n=Date.now(),o=n+e,s=r.progressIntervalMs??B,i=n+s,d=-1,p=n,g="",a={flag:void 0,at:0,nodes:0,targets:0,liveFrameActive:!1,liveFrameChannels:0,liveFramePublishes:0,errors:0,loadingText:"",externalReady:null,externalStatus:"",externalError:"",suppressedEntryError:""};for(;Date.now()<o;){try{a=await t.send({type:"evaluate",code:F})??a,g=""}catch(m){if(g=m instanceof Error?m.message:String(m),g.startsWith("multiple sims are connected:")||g.startsWith("saved sim "))throw m}let y=Date.now(),b={ready:!1,elapsedMs:y-n,nodes:a.nodes,targets:a.targets,liveFrameActive:a.liveFrameActive,liveFrameChannels:a.liveFrameChannels,liveFramePublishes:a.liveFramePublishes,flag:a.flag,loadingText:a.loadingText,externalReady:a.externalReady,externalStatus:a.externalStatus,externalError:a.externalError,suppressedEntryError:a.suppressedEntryError,errors:a.errors,bridgeError:g};a.nodes!==d&&(d=a.nodes,p=y);let w=a.flag===!0&&j(a),f=a.flag!==!0&&J(a);if((w||f)&&a.externalReady!==!1&&!a.externalError&&!a.loadingText&&y-p>=H)return{...b,ready:!0};if(a.externalError)return b;if(r.onProgress&&s>0&&y>=i){r.onProgress(b);do i+=s;while(y>=i)}await new Promise(m=>setTimeout(m,z))}let h={ready:!1,elapsedMs:Date.now()-n,nodes:a.nodes,targets:a.targets,liveFrameActive:a.liveFrameActive,liveFrameChannels:a.liveFrameChannels,liveFramePublishes:a.liveFramePublishes,flag:a.flag,loadingText:a.loadingText,externalReady:a.externalReady,externalStatus:a.externalStatus,externalError:a.externalError,suppressedEntryError:a.suppressedEntryError,errors:a.errors,bridgeError:g};return r.onProgress&&s>0&&Date.now()>=i&&r.onProgress(h),h}async function pe(t,e,r=5e3,n={}){let o=n.gone===!0;return await t.send({type:"evaluate",code:`(async () => {
|
|
599
599
|
const start = Date.now()
|
|
600
600
|
const deadline = start + ${r}
|
|
601
601
|
const gone = ${o}
|
|
@@ -723,7 +723,7 @@ ${R}
|
|
|
723
723
|
})()
|
|
724
724
|
: null
|
|
725
725
|
return { nav: navSnap, route, keyboard }
|
|
726
|
-
})()`});return{shell:await Y(t,500).catch(()=>null),nav:e?.nav??null,route:e?.route??null,keyboard:e?.keyboard??null}}async function Re(t){return t.send({type:"evaluate",code:"window.__sootsimDebug.status()"})}async function $e(t){return t.send({type:"evaluate",code:"window.__sootsimDebug.flags()"})}async function _e(t,e){return t.send({type:"evaluate",code:`window.__sootsimTest.debugFind(${JSON.stringify(e)})`})}async function Ae(t,e,r=50){let n=e&&e!=="all"?`window.__sootsimDebug.recent(${JSON.stringify(e)}, ${r})`:`window.__sootsimDebug.recent(undefined, ${r})`;return t.send({type:"evaluate",code:n})}async function Le(t,e,r){let n=r.length>0?r.map(o=>JSON.stringify(o)).join(", "):e==="disable"?"'all'":"";return t.send({type:"evaluate",code:`window.__sootsimDebug.${e}(${n})`})}async function
|
|
726
|
+
})()`});return{shell:await Y(t,500).catch(()=>null),nav:e?.nav??null,route:e?.route??null,keyboard:e?.keyboard??null}}async function Re(t){return t.send({type:"evaluate",code:"window.__sootsimDebug.status()"})}async function $e(t){return t.send({type:"evaluate",code:"window.__sootsimDebug.flags()"})}async function _e(t,e){return t.send({type:"evaluate",code:`window.__sootsimTest.debugFind(${JSON.stringify(e)})`})}async function Ae(t,e,r=50){let n=e&&e!=="all"?`window.__sootsimDebug.recent(${JSON.stringify(e)}, ${r})`:`window.__sootsimDebug.recent(undefined, ${r})`;return t.send({type:"evaluate",code:n})}async function Le(t,e,r){let n=r.length>0?r.map(o=>JSON.stringify(o)).join(", "):e==="disable"?"'all'":"";return t.send({type:"evaluate",code:`window.__sootsimDebug.${e}(${n})`})}async function Pe(t){return await t.send({type:"evaluate",code:`(async () => {
|
|
727
727
|
const host = window.__sootsimRenderHost
|
|
728
728
|
const stats = host?.queryStats ? await host.queryStats() : null
|
|
729
729
|
const shellRaw = window.__sootsimShellMemory
|
|
@@ -763,4 +763,4 @@ ${R}
|
|
|
763
763
|
compositor: normalize(compositor),
|
|
764
764
|
hostHeap: hostMem,
|
|
765
765
|
}
|
|
766
|
-
})()`})??{tenant:null,shell:null,compositor:null,hostHeap:null}}function
|
|
766
|
+
})()`})??{tenant:null,shell:null,compositor:null,hostHeap:null}}function Ne(t){if(t.total===0)return"nothing recorded";let e=[],r=["error","warning","console","fetch","toast","alert","actionsheet","picker","notification","screen","route","keyboard","app-launch","shell","scroll","gesture","text-input","react-commit","animation","reanimated"],n=new Set;for(let o of r){let s=t.byKind[o];s&&(e.push(`${s} ${o}${s===1?"":"s"}`),n.add(o))}for(let[o,s]of Object.entries(t.byKind))!n.has(o)&&s&&e.push(`${s} ${o}${s===1?"":"s"}`);return e.join(" \xB7 ")}var Me=new Set(["react-commit","layout","scroll"]);function U(t,e){if(e===null)return new Date(t).toLocaleTimeString();let r=(t-e)/1e3;return`${r>=0?"+":""}${r.toFixed(2)}s`}function G(t,e){switch(t){case"app-launch":return e.phase==="launch"?`launch ${e.appName??e.toAppId??""}`:`dismiss ${e.appName??e.fromAppId??""} \u2192 ${e.toAppId??""}`;case"toast":return`"${e.text??""}"${e.durationMs?` (${e.durationMs}ms)`:""}`;case"keyboard":return`${e.phase??"?"}${e.heightPx?` h=${e.heightPx}`:""}${e.mode?` ${e.mode}`:""}`;case"screen":return`${e.phase??"?"} ${e.name??e.activeName??""}`;case"flow-step":return`${e.status??"?"} ${e.stepName??"step"}${e.durationMs?` ${e.durationMs}ms`:""}`;case"route":return`${e.phase??"?"} ${e.path??e.pathname??""}`;case"alert":case"actionsheet":case"picker":return`${e.phase??"?"} ${e.title??e.message??""}`;case"notification":return`${e.title??""}${e.body?` \u2014 ${e.body}`:""}`;case"fetch":return`${e.method??"GET"} ${e.url??""}${e.status?` -> ${e.status}`:""}`;case"console":case"console-log":return`${e.level??"log"}: ${(e.message??"").toString().slice(0,120)}`;case"shell":return`${e.event??e.type??e.phase??""}`;case"scroll":return`${e.phase??"?"} ${e.target??""}`;case"gesture":return`${e.phase??"?"} ${e.type??""}`;case"text-input":return`${e.phase??"?"}${e.value!==void 0?` "${String(e.value).slice(0,40)}"`:""}`;case"layout":return`${e.kind??"?"} ${e.testID??e.type??""}${e.skipped?` skipped:${e.reason??"unknown"}`:""}`;case"react-commit":{let r=e.slowest;return`${e.fiberCount??"?"} fibers ${e.durationMs??"?"}ms${r?.displayName?` \xB7 ${r.displayName} ${r.durationMs??"?"}ms`:""}`}case"frame":return`${e.totalMs??"?"}ms${e.renderMs?` \xB7 render ${e.renderMs}ms`:""}${e.layoutMs?` \xB7 layout ${e.layoutMs}ms`:""}${e.copyMs?` \xB7 copy ${e.copyMs}ms`:""}`;case"reanimated":case"animation":return`${e.kind??""} ${e.target??""}${e.durationMs?` ${e.durationMs}ms`:""}`}return""}function De(t,e){let r=U(t.t,e).padStart(8),n=t.context.padEnd(6),o=`[${t.kind}]`.padEnd(15),s=t.data,i=s&&typeof s=="object"?G(t.kind,s):"";return` ${r} ${n} ${o} ${i}`}export{Q as a,X as b,Z as c,ee as d,te as e,ne as f,oe as g,se as h,ae as i,ie as j,le as k,ue as l,F as m,H as n,z as o,j as p,J as q,ce as r,de as s,pe as t,ye as u,me as v,ge as w,be as x,fe as y,he as z,we as A,xe as B,Se as C,ve as D,V as E,Ie as F,Te as G,ke as H,q as I,Y as J,Ee as K,Re as L,$e as M,_e as N,Ae as O,Le as P,Pe as Q,Ne as R,Me as S,De as T};
|