sootsim 0.1.169 → 0.1.170
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/README.md +66 -63
- package/detox/index.ts +3 -3
- package/dist-cli/bin.js +3 -3
- package/dist-cli/chunks/agent-3C2BKQKX.js +46 -0
- package/dist-cli/chunks/{agent-wrapper-Y5FQA3RL.js → agent-wrapper-OIKCYOXZ.js} +2 -2
- package/dist-cli/chunks/{app-fonts-FYVA4XV6.js → app-fonts-25O32NAP.js} +2 -2
- package/dist-cli/chunks/{assert-U64QBDM2.js → assert-ONEP4NQU.js} +2 -2
- package/dist-cli/chunks/beta-4E5USTEI.js +2 -0
- package/dist-cli/chunks/{camera-3GXBVIAM.js → camera-RORW4MAA.js} +2 -2
- package/dist-cli/chunks/{chunk-5C6BR24W.js → chunk-25RFZ6WP.js} +6 -6
- package/dist-cli/chunks/chunk-35GMFXVJ.js +2 -0
- package/dist-cli/chunks/{chunk-GLRFKYDV.js → chunk-3TM7DHWE.js} +2 -2
- package/dist-cli/chunks/{chunk-4F3BBP7B.js → chunk-4XVY5TUF.js} +2 -2
- package/dist-cli/chunks/{chunk-LZEL2RU3.js → chunk-5ZHUPPS5.js} +1 -1
- package/dist-cli/chunks/{chunk-GC4THE6K.js → chunk-6FAEORJ2.js} +2 -2
- package/dist-cli/chunks/{chunk-G2ZFDIPK.js → chunk-6TSXXN2W.js} +4 -4
- package/dist-cli/chunks/chunk-AJF3QF4K.js +1 -0
- package/dist-cli/chunks/{chunk-FIDPRJYH.js → chunk-AUCNBB6Q.js} +2 -2
- package/dist-cli/chunks/{chunk-SIB6I72P.js → chunk-BP3EGFER.js} +2 -2
- package/dist-cli/chunks/{chunk-OGLWXPVG.js → chunk-DAXME77O.js} +3 -3
- package/dist-cli/chunks/chunk-DGJTEFE7.js +13 -0
- package/dist-cli/chunks/chunk-DIRDEKRW.js +23 -0
- package/dist-cli/chunks/{chunk-3L4NRJ6C.js → chunk-DKTC53HV.js} +1 -1
- package/dist-cli/chunks/{chunk-KUUFY6FC.js → chunk-DWXC25XG.js} +1 -1
- package/dist-cli/chunks/{chunk-CR6DOLUD.js → chunk-E3FKMY5E.js} +1 -1
- package/dist-cli/chunks/chunk-ER4GBJRY.js +2 -0
- package/dist-cli/chunks/chunk-EX6V4ZV6.js +6 -0
- package/dist-cli/chunks/{chunk-VMYMPL6H.js → chunk-GQH3PD3W.js} +5 -5
- package/dist-cli/chunks/{chunk-MVOHANJG.js → chunk-GST4YSBO.js} +4 -4
- package/dist-cli/chunks/{chunk-BIWJE7CB.js → chunk-I4RV5I6V.js} +1 -1
- package/dist-cli/chunks/{chunk-Y6IDAARY.js → chunk-I5WXVKR6.js} +1 -1
- package/dist-cli/chunks/{chunk-HC72ILJK.js → chunk-IO7KAVFK.js} +2 -2
- package/dist-cli/chunks/{chunk-XEH4QGWB.js → chunk-LMX7UB5T.js} +2 -2
- package/dist-cli/chunks/{chunk-YADWU7OZ.js → chunk-N4YCSOCR.js} +2 -2
- package/dist-cli/chunks/{chunk-IODOTOOP.js → chunk-NI3L4A65.js} +2 -2
- package/dist-cli/chunks/{chunk-IACEJQIO.js → chunk-ODGEH6OW.js} +2 -2
- package/dist-cli/chunks/{chunk-DNA6VS6M.js → chunk-Q4NDYO2U.js} +1 -1
- package/dist-cli/chunks/{chunk-PV6MBKKE.js → chunk-QPRF3UYX.js} +2 -2
- package/dist-cli/chunks/{chunk-M2TMFGZH.js → chunk-QXJMXSQP.js} +1 -1
- package/dist-cli/chunks/chunk-RLKSLUNR.js +2 -0
- package/dist-cli/chunks/{chunk-WZG3YVJR.js → chunk-S244IT4W.js} +1 -1
- package/dist-cli/chunks/chunk-SDHOM6ZG.js +62 -0
- package/dist-cli/chunks/{chunk-B7BMSU7H.js → chunk-TXKOJ3P5.js} +1 -1
- package/dist-cli/chunks/{chunk-IBEMMV5E.js → chunk-UDMJSFSH.js} +8 -8
- package/dist-cli/chunks/{chunk-DQZEN256.js → chunk-ULV4PWN4.js} +1 -1
- package/dist-cli/chunks/{chunk-2TYEWVS4.js → chunk-V4HTQPMA.js} +1 -1
- package/dist-cli/chunks/chunk-VATHADSI.js +2 -0
- package/dist-cli/chunks/{chunk-5Q7IHJ7K.js → chunk-VUOCUCJ2.js} +2 -2
- package/dist-cli/chunks/{chunk-JDGLBW64.js → chunk-WN7R4GL4.js} +1 -1
- package/dist-cli/chunks/chunk-XOTJD6PU.js +118 -0
- package/dist-cli/chunks/chunk-XUNPVF5K.js +1 -0
- package/dist-cli/chunks/{chunk-KZIXAYN5.js → chunk-YMFSRCHL.js} +4 -4
- package/dist-cli/chunks/{chunk-X2HNVXNM.js → chunk-YV74D4MG.js} +2 -2
- package/dist-cli/chunks/{chunk-SNX3M4XD.js → chunk-YVTWSC5Y.js} +3 -3
- package/dist-cli/chunks/cli-version-EKKWCHRX.js +2 -0
- package/dist-cli/chunks/{compat-ORRWNXVT.js → compat-ZVZM5TML.js} +3 -3
- package/dist-cli/chunks/control-TWINYHMY.js +2 -0
- package/dist-cli/chunks/{cpu-profile-6PRSBZ2F.js → cpu-profile-RWGQTWLP.js} +2 -2
- package/dist-cli/chunks/daemon-AOSMNBD4.js +2 -0
- package/dist-cli/chunks/{debug-Q3J2X4WW.js → debug-R7PL3MHF.js} +5 -5
- package/dist-cli/chunks/{detox-DN57GMMJ.js → detox-UIJMKIGQ.js} +2 -2
- package/dist-cli/chunks/{device-IL5TPYGU.js → device-7SRVX2PU.js} +2 -2
- package/dist-cli/chunks/{diagnose-BW6QWP4F.js → diagnose-OXAKLLZT.js} +2 -2
- package/dist-cli/chunks/drivers-BPPG22VP.js +2 -0
- package/dist-cli/chunks/{electron-DGMSXQWG.js → electron-CTCH4VOL.js} +3 -3
- package/dist-cli/chunks/flow-KA2WCWDL.js +2 -0
- package/dist-cli/chunks/help-XBQIK2XY.js +2 -0
- package/dist-cli/chunks/{hints-TK3EHB4U.js → hints-P3ZIAP3Z.js} +2 -2
- package/dist-cli/chunks/home-paths-ZSCTLOYE.js +2 -0
- package/dist-cli/chunks/{inspect-NFWFGU4B.js → inspect-2ABU5WET.js} +24 -24
- package/dist-cli/chunks/{install-desktop-GB3JKSNX.js → install-desktop-4NOQ3YY4.js} +3 -3
- package/dist-cli/chunks/{keys-RAAHRIFH.js → keys-RPVEUNUC.js} +2 -2
- package/dist-cli/chunks/{login-KQ37GHDE.js → login-6D6DXBO3.js} +4 -4
- package/dist-cli/chunks/{logout-63SH2Y25.js → logout-T5OSWDTJ.js} +2 -2
- package/dist-cli/chunks/{maestro-24BT3MML.js → maestro-MKCHEOKA.js} +2 -2
- package/dist-cli/chunks/optional-demo-registry-EYD2K3QH.js +2 -0
- package/dist-cli/chunks/{preview-KQAOVN6R.js → preview-S52ZNGN2.js} +2 -2
- package/dist-cli/chunks/{profile-AN2B4NJT.js → profile-IG5F3LTL.js} +2 -2
- package/dist-cli/chunks/{react-ATGV35B4.js → react-275HCOFC.js} +2 -2
- package/dist-cli/chunks/{record-36662T3R.js → record-YT63SUHO.js} +4 -4
- package/dist-cli/chunks/runtime-WYZMDZAK.js +2 -0
- package/dist-cli/chunks/{screenshot-K4N5MPAT.js → screenshot-5AZ4MY3A.js} +4 -4
- package/dist-cli/chunks/{screenshot-mode-4QOJDLSH.js → screenshot-mode-4S4EX2XJ.js} +2 -2
- package/dist-cli/chunks/{screenshots-TB35YMSR.js → screenshots-UUJNZSG7.js} +2 -2
- package/dist-cli/chunks/{screenshots-capture-W6X33BZ4.js → screenshots-capture-I66JD3AD.js} +2 -2
- package/dist-cli/chunks/{server-L2PKDJZ2.js → serve-O46Q4WAD.js} +18 -17
- package/dist-cli/chunks/setup-C44N54O7.js +77 -0
- package/dist-cli/chunks/skills-PPVS4XOQ.js +40 -0
- package/dist-cli/chunks/{slides-TORKO36P.js → slides-ZWSZJZUY.js} +2 -2
- package/dist-cli/chunks/store-3SLGP5O3.js +2 -0
- package/dist-cli/chunks/telemetry-2XLLWARK.js +2 -0
- package/dist-cli/chunks/{test-5VCENVW3.js → test-362G4M5A.js} +3 -3
- package/dist-cli/chunks/{three-mode-ZVS2DSX6.js → three-mode-JNVTM2UT.js} +2 -2
- package/dist-cli/chunks/{timeline-TNC5OWLF.js → timeline-VKC6ULRK.js} +2 -2
- package/dist-cli/chunks/{upgrade-E7IO6A7Z.js → upgrade-SJPX4SPA.js} +2 -2
- package/dist-cli/chunks/upload-MXOBV6RT.js +2 -0
- package/dist-cli/chunks/version-4Z7AFNH3.js +4 -0
- package/dist-cli/chunks/web-WB2I2AWL.js +2 -0
- package/dist-cli/chunks/{what-happened-RMHZ7DGX.js → what-happened-KQCWMQJT.js} +3 -3
- package/dist-cli/chunks/{whoami-D53ANHR5.js → whoami-K76PXAD4.js} +2 -2
- package/dist-lib/agent-daemon-client.cjs +4 -5
- package/dist-lib/agent-events.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 +3 -6
- package/dist-lib/beta.mjs +3 -5
- 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 +4 -4
- package/dist-lib/dev-bundle-resolution.cjs +2 -9
- package/dist-lib/home-paths.cjs +59 -1
- package/dist-lib/host/bridge-host.cjs +67 -5
- 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 +2 -2
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro.cjs +2 -2
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +5 -4
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +124 -8
- package/dist-lib/vite.cjs +2 -2
- package/package.json +2 -1
- package/scripts/dev-server-scanner.ts +3 -4
- package/scripts/postinstall.cjs +2 -2
- package/scripts/preuninstall.cjs +5 -7
- package/skills/soot.md +178 -0
- package/skills/sootsim-debug.md +384 -0
- package/skills/sootsim-setup.md +96 -0
- package/skills/sootsim-test.md +292 -0
- package/skills/sootsim-visual.md +122 -0
- package/src/agent-daemon-client.ts +4 -14
- package/src/beta.ts +3 -5
- package/src/dev-bundle-resolution.ts +1 -14
- package/src/home-paths.ts +77 -2
- package/src/host/agent-host.ts +1 -1
- package/src/host/bridge-host.ts +65 -6
- package/src/metro-plugin.ts +1 -1
- package/src/runtime-assets.ts +1 -1
- package/src/vite-plugin.ts +1 -0
- package/dist-cli/chunks/agent-V3GVCRPL.js +0 -46
- package/dist-cli/chunks/auto-bootstrap-YXDP3WKH.js +0 -2
- package/dist-cli/chunks/beta-FGSMZWLP.js +0 -2
- package/dist-cli/chunks/chunk-2IFWVIKM.js +0 -2
- package/dist-cli/chunks/chunk-3T36XLP3.js +0 -119
- package/dist-cli/chunks/chunk-5KY7TQ42.js +0 -5
- package/dist-cli/chunks/chunk-BQOMDL4K.js +0 -1
- package/dist-cli/chunks/chunk-FHMPJZKM.js +0 -7
- package/dist-cli/chunks/chunk-GQAWFQNN.js +0 -23
- package/dist-cli/chunks/chunk-HJTKKF7M.js +0 -13
- package/dist-cli/chunks/chunk-K4JAWKOY.js +0 -1
- package/dist-cli/chunks/chunk-NXGQS7IR.js +0 -2
- package/dist-cli/chunks/chunk-R2INPDGW.js +0 -1
- package/dist-cli/chunks/chunk-SLL5SZN4.js +0 -2
- package/dist-cli/chunks/chunk-XM66K64H.js +0 -79
- package/dist-cli/chunks/cli-version-3L6FFDIX.js +0 -2
- package/dist-cli/chunks/config-5IB6ONJ2.js +0 -45
- package/dist-cli/chunks/control-BM4V27OB.js +0 -2
- package/dist-cli/chunks/daemon-62MZT4G4.js +0 -67
- package/dist-cli/chunks/drivers-V6QDFZQD.js +0 -2
- package/dist-cli/chunks/flow-VBM6TU32.js +0 -2
- package/dist-cli/chunks/help-XWKNL743.js +0 -2
- package/dist-cli/chunks/home-paths-G23H3RO6.js +0 -2
- package/dist-cli/chunks/install-5YL7FITA.js +0 -2
- package/dist-cli/chunks/launch-DYFE4CAD.js +0 -16
- package/dist-cli/chunks/optional-demo-registry-JJXPB3UD.js +0 -2
- package/dist-cli/chunks/runtime-NRMC3U3D.js +0 -2
- package/dist-cli/chunks/runtime-delivery-RO6CTYPQ.js +0 -2
- package/dist-cli/chunks/setup-repo-AK6QOUE7.js +0 -2
- package/dist-cli/chunks/skills-KDSOWUOE.js +0 -10
- package/dist-cli/chunks/start-GH2AOUX6.js +0 -23
- package/dist-cli/chunks/store-JHW65VGQ.js +0 -2
- package/dist-cli/chunks/telemetry-SZLRXJXW.js +0 -2
- package/dist-cli/chunks/upload-KKEWETA5.js +0 -2
- package/dist-cli/chunks/version-37OD33SE.js +0 -4
- package/dist-cli/chunks/web-4JVMIBTB.js +0 -2
package/README.md
CHANGED
|
@@ -51,7 +51,8 @@ internally splits into a **shell worker** and a **tenant worker**.
|
|
|
51
51
|
graph TD
|
|
52
52
|
subgraph cli["sootsim CLI process (short-lived, cli/)"]
|
|
53
53
|
BIN["bin.ts (dispatcher + telemetry)"]
|
|
54
|
-
|
|
54
|
+
SETUP["commands/setup.ts (daemon + optional repo setup)"]
|
|
55
|
+
RUNTIMECMD["commands/runtime.ts (runtime install/use)"]
|
|
55
56
|
INSPECT["commands/inspect/* (describe/find/do/get/wait)"]
|
|
56
57
|
FLOW["bridge-flow-runner.ts (maestro + flow)"]
|
|
57
58
|
DETOXCMD["commands/detox.ts + detox/ driver"]
|
|
@@ -86,16 +87,17 @@ graph TD
|
|
|
86
87
|
CFG["config.json"]
|
|
87
88
|
end
|
|
88
89
|
CDN["sootbean.com CDN (runtimes/manifest.json + tarballs)"]
|
|
89
|
-
BIN -->
|
|
90
|
+
BIN --> SETUP
|
|
91
|
+
BIN --> RUNTIMECMD
|
|
90
92
|
BIN --> INSPECT
|
|
91
93
|
BIN --> FLOW
|
|
92
94
|
BIN --> DETOXCMD
|
|
93
95
|
BIN --> SHOTS
|
|
94
96
|
BIN --> AGENTCMD
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
SETUP --> LOCK
|
|
98
|
+
SETUP -->|"register launchd/systemd"| HOST
|
|
99
|
+
RUNTIMECMD --> RTDIR
|
|
100
|
+
RUNTIMECMD -->|"fetch runtime"| CDN
|
|
99
101
|
INSPECT --> WSB
|
|
100
102
|
FLOW --> WSB
|
|
101
103
|
SHOTS --> WSB
|
|
@@ -126,20 +128,20 @@ graph TD
|
|
|
126
128
|
```
|
|
127
129
|
|
|
128
130
|
**The CLI process** (`cli/bin.ts`) parses argv, emits invocation telemetry, and
|
|
129
|
-
lazy-imports exactly one command module per run.
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
131
|
+
lazy-imports exactly one command module per run. `sootsim setup` owns guided
|
|
132
|
+
one-time work: install the background daemon, optionally add the Metro/One
|
|
133
|
+
repo plugin, and optionally create the advanced config file. `sootsim open`
|
|
134
|
+
ensures the engine runtime exists and starts a local foreground bridge when no
|
|
135
|
+
daemon is reachable, then opens a `WsBridge` (`cli/ws-bridge.ts`) on **port
|
|
136
|
+
7668** and sends JSON commands. Inspection/interaction verbs live in
|
|
137
|
+
`cli/commands/inspect/*` and are re-exported as the programmatic `sootsim/sdk`;
|
|
138
|
+
the Maestro/flow runner is `cli/bridge-flow-runner.ts`; the Detox compat driver
|
|
139
|
+
is in `detox/`. Test and screenshot paths additionally use `cli/drivers/*`
|
|
140
|
+
(chromium, electron, playwright, system) to launch or attach the sim page before
|
|
141
|
+
driving it.
|
|
140
142
|
|
|
141
143
|
**The daemon is one process** — `SootSimBridgeHost` (`src/host/bridge-host.ts`).
|
|
142
|
-
`sootsim
|
|
144
|
+
`sootsim serve` runs it in the foreground; the background daemon is the *same
|
|
143
145
|
process* wrapped with autostart and the `~/.sootsim/daemon.json` lockfile. It is
|
|
144
146
|
an HTTP+WS hub: sims register over WS, CLI clients connect to drive them, and
|
|
145
147
|
the host forwards each command to the targeted sim and relays the reply back. It
|
|
@@ -173,30 +175,31 @@ distinguish the host page thread, the shell worker, and the tenant worker.)
|
|
|
173
175
|
|
|
174
176
|
| component | role | key files |
|
|
175
177
|
| --- | --- | --- |
|
|
176
|
-
| sootsim CLI (bin + dispatcher) | Short-lived terminal entry point. Parses argv, emits telemetry, lazy-imports one command per run, and
|
|
178
|
+
| sootsim CLI (bin + dispatcher) | Short-lived terminal entry point. Parses argv, emits telemetry, lazy-imports one command per run, and routes setup/open/runtime/inspection flows without a hidden bootstrap path. | `cli/bin.ts`, `cli/parse-args.ts`, `cli/help.ts`, `cli/commands/setup.ts`, `cli/commands/control.ts` |
|
|
177
179
|
| WsBridge client | Client side of the CLI→daemon link. Resolves the daemon port from the lockfile, opens a WS to `:7668`, sends JSON commands and awaits `{id,result}`/`{id,error}`. Used by every interactive command. | `cli/ws-bridge.ts`, `src/bridge-constants.ts`, `cli/current-sim.ts` |
|
|
178
180
|
| inspect / SDK command surface | Runtime inspection + interaction verbs (describe, find, do tap, get errors, wait, layout, settle). Re-exported as `sootsim/sdk` so programmatic callers drive a sim the same way the CLI does. | `cli/commands/inspect/core.ts`, `cli/commands/inspect/actions.ts`, `cli/commands/inspect.ts`, `src/sdk.ts` |
|
|
179
181
|
| flow / maestro / detox runners | Drop-in test compatibility. `bridge-flow-runner.ts` runs maestro-format YAML and recorded flows over the bridge; `detox/` provides a `by`/`element`/`expect`/`device` driver + jest preset so existing Detox suites run unchanged. | `cli/bridge-flow-runner.ts`, `cli/commands/maestro.ts`, `cli/commands/detox.ts`, `detox/index.ts`, `detox/jest-preset.cjs` |
|
|
180
182
|
| sim drivers | Launch/attach the actual sim page. The registry resolves a driver (chromium, electron, playwright, system browser) which opens the shell URL; used by detox/preview/screenshot paths to bring a sim online for the bridge. | `cli/drivers/index.ts`, `cli/drivers/registry.ts`, `cli/drivers/chromium.ts`, `cli/drivers/electron.ts`, `cli/drivers/playwright.ts` |
|
|
181
|
-
| SootSimBridgeHost (
|
|
183
|
+
| SootSimBridgeHost (serve/daemon) | The bridge process (`sootsim serve`, or autostarted as the daemon via launchd/systemd). HTTP+WS hub on `:7668`: relays commands between CLI clients and registered sims; also serves runtime HTTP, `/__server-scan`, and fetch/WS proxies. | `src/host/bridge-host.ts`, `cli/commands/serve.ts`, `cli/commands/daemon.ts`, `src/home-paths.ts` |
|
|
182
184
|
| AgentHost + sessions | Agent-routing extension of the host: owns the single FIFO reader per agent session and fans `agent:event`/`session-status` pushes to every WS subscriber. Backed by agent-sessions + attached-projects stores. | `src/host/agent-host.ts`, `src/agent-sessions.ts`, `src/attached-projects.ts`, `src/agent-daemon-client.ts` |
|
|
183
185
|
| host proxies + dev-server scan | Host-side helpers so a cross-origin tenant worker can reach local dev servers and same-origin APIs: `/__server-scan` discovers running metro/expo/vxrn/one servers; fetch + websocket proxies relay guest-app network through the daemon. | `src/host/fetch-proxy-handler.ts`, `src/host/websocket-proxy.ts`, `scripts/dev-server-scanner.ts`, `src/dev-bundle-resolution.ts` |
|
|
184
186
|
| runtime delivery + sootsim home | Versioned engine runtime management. Resolves the CDN origin (`https://sootbean.com`), fetches `runtimes/manifest.json` + the runtime tarball, verifies sha256, unpacks to `~/.sootsim/runtimes/<version>`, and tracks active version/config/daemon lockfile under the sootsim home. | `src/runtime-delivery.ts`, `src/home-paths.ts`, `src/runtime-assets.ts`, `scripts/postinstall.cjs` |
|
|
185
187
|
| `sootsim/vite` + `sootsim/metro` (runtime serving) | Published bundler plugins. Both serve the installed engine runtime at `/__soot/` from `~/.sootsim/runtimes/<version>` so an app's own dev server can host the sim shell; the vite plugin can also launch the Electron app. | `src/vite-plugin-one.ts`, `src/metro-plugin.ts`, `src/runtime-assets.ts` |
|
|
186
188
|
| `sootsim()` vite resolver plugin (internal) | The large RN-resolution / native-stub vite plugin: aliases `react-native` to the engine shim, native packages to `@soot/compat` stubs, applies worklets/babel transforms, and instantiates `SootSimBridgeHost` in its dev server. Distinct from the published `sootsim/vite` export. | `src/vite-plugin.ts`, `src/worklets-babel.ts`, `packages/compat/src/stub-manifest.ts` |
|
|
187
|
-
| skills registry |
|
|
189
|
+
| skills registry | SootSim agent skills (`sootsim-setup`, `sootsim-debug`, `sootsim-test`, `sootsim-visual`, and the generated `soot` index) installable with `sootsim skill`. | `skills/*.md`, `src/skills/registry.ts`, `src/skills/types.ts` |
|
|
188
190
|
|
|
189
191
|
## Getting started
|
|
190
192
|
|
|
191
193
|
```sh
|
|
192
194
|
npm i -g sootsim
|
|
193
|
-
|
|
195
|
+
sootsim setup # optional but recommended: installs the background daemon
|
|
194
196
|
sootsim open 8081 # load a running metro/expo dev server
|
|
195
197
|
```
|
|
196
198
|
|
|
197
|
-
CLI-first is the canonical path.
|
|
198
|
-
|
|
199
|
-
optional
|
|
199
|
+
CLI-first is the canonical path. `sootsim open` starts a local bridge when no
|
|
200
|
+
daemon is reachable; `sootsim setup` installs the faster background daemon and
|
|
201
|
+
offers optional repo integration. A desktop GUI (Electron) is optional on top,
|
|
202
|
+
via `sootsim install-desktop`. In Electron, `File > New Window`
|
|
200
203
|
duplicates the focused simulator, while `File > New Simulator >` opens a new
|
|
201
204
|
window for a selected device (same device list as the `Window >` menu).
|
|
202
205
|
|
|
@@ -214,24 +217,24 @@ inspection, interaction, animation debugging, shell tracing, screenshots, and
|
|
|
214
217
|
flow capture, not just as a test runner.
|
|
215
218
|
|
|
216
219
|
```sh
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
220
|
+
sootsim list # connected tabs
|
|
221
|
+
sootsim open 8081 # load a running metro/expo dev server
|
|
222
|
+
sootsim describe # dump UI tree
|
|
223
|
+
sootsim get errors 5 # recent runtime failures
|
|
224
|
+
sootsim find --testid cta # inspect one node deeply
|
|
225
|
+
sootsim debug enable animated,layout
|
|
226
|
+
sootsim debug trace shell on 240
|
|
227
|
+
sootsim do tap-text "..." # interact
|
|
228
|
+
sootsim debug snapshot before
|
|
229
|
+
sootsim debug snapshot after
|
|
230
|
+
sootsim debug diff before after
|
|
231
|
+
sootsim flow start # begin a draft
|
|
232
|
+
sootsim flow keep # persist the last action
|
|
233
|
+
sootsim flow end --output flows/login.yaml
|
|
234
|
+
sootsim test --detox # shared Detox-style parity suite against sootsim
|
|
232
235
|
```
|
|
233
236
|
|
|
234
|
-
See the full command reference via `
|
|
237
|
+
See the full command reference via `sootsim --help` or at
|
|
235
238
|
`src/features/site/docs/sootsim/cli/` in the SootBean repo.
|
|
236
239
|
|
|
237
240
|
## Bundler plugins (`sootsim/vite` and `sootsim/metro`)
|
|
@@ -270,8 +273,8 @@ no code changes — just add one line to your jest config:
|
|
|
270
273
|
Or use the CLI directly:
|
|
271
274
|
|
|
272
275
|
```sh
|
|
273
|
-
|
|
274
|
-
|
|
276
|
+
sootsim detox # auto-discovers e2e/ tests and launches a shell
|
|
277
|
+
sootsim detox init # scaffold a config + sample test
|
|
275
278
|
```
|
|
276
279
|
|
|
277
280
|
See `../../docs/migrating-from-detox.md` for details.
|
|
@@ -282,9 +285,9 @@ SootSim's flow runner natively speaks Maestro's YAML. Point it at your existing
|
|
|
282
285
|
`.maestro/` directory:
|
|
283
286
|
|
|
284
287
|
```sh
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
+
sootsim maestro # discover .maestro/ and run all flows
|
|
289
|
+
sootsim maestro test .maestro/ # explicit
|
|
290
|
+
sootsim maestro --list-compat # see the verb support matrix
|
|
288
291
|
```
|
|
289
292
|
|
|
290
293
|
Most Maestro verbs work out of the box (`tapOn`, `assertVisible`, `inputText`,
|
|
@@ -297,14 +300,14 @@ need real device hardware (GPS, radio, photo library) throw a clear error. See
|
|
|
297
300
|
For animation-heavy debugging, the useful path is usually:
|
|
298
301
|
|
|
299
302
|
```sh
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
+
sootsim debug enable animated
|
|
304
|
+
sootsim debug trace shell on 240
|
|
305
|
+
sootsim debug snapshot before
|
|
303
306
|
# reproduce the transition
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
307
|
+
sootsim debug snapshot after
|
|
308
|
+
sootsim debug diff before after
|
|
309
|
+
sootsim screenshot --with-frame --output /tmp/sootsim-framed.png
|
|
310
|
+
sootsim record --duration 5 --output /tmp/sootsim-anim.mp4
|
|
308
311
|
```
|
|
309
312
|
|
|
310
313
|
`sootsim screenshot --with-frame` composes the real SootSim shell device chrome
|
|
@@ -342,7 +345,7 @@ compose:
|
|
|
342
345
|
```
|
|
343
346
|
|
|
344
347
|
```sh
|
|
345
|
-
|
|
348
|
+
sootsim screenshots --plan .sootsim/app-store.yaml
|
|
346
349
|
```
|
|
347
350
|
|
|
348
351
|
The plan runner can reuse a visible sim for capture (`--sim a9`), stop after
|
|
@@ -366,11 +369,11 @@ frame for quick art-direction passes.
|
|
|
366
369
|
|
|
367
370
|
## Skills registry
|
|
368
371
|
|
|
369
|
-
`sootsim
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
from `packages/sootsim-skills/`:
|
|
372
|
+
`sootsim skill install` installs SootSim agent skills in the standard
|
|
373
|
+
`<skill-name>/SKILL.md` layout used by Codex and Claude Code. The bundled
|
|
374
|
+
skills cover setup, debugging/perf/accessibility, testing, visual review, and
|
|
375
|
+
the generated `soot` command index. The published CLI registry and generated
|
|
376
|
+
website docs both come from `packages/sootsim-skills/`:
|
|
374
377
|
|
|
375
378
|
- `packages/sootsim/skills/soot.md` is generated from that registry
|
|
376
379
|
- `src/features/site/docs/sootsim/cli/*` is generated output, not hand-edited
|
|
@@ -383,10 +386,10 @@ bun run generate:sootsim-docs
|
|
|
383
386
|
|
|
384
387
|
## Runtime delivery (the sootsim home and CDN)
|
|
385
388
|
|
|
386
|
-
The engine never ships inside this package. `
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
389
|
+
The engine never ships inside this package. `runtime-delivery.ts` resolves the
|
|
390
|
+
CDN origin (default `https://sootbean.com`, overridable in `config.json`),
|
|
391
|
+
fetches `runtimes/manifest.json` + the runtime tarball, verifies its sha256,
|
|
392
|
+
and unpacks it under `~/.sootsim`:
|
|
390
393
|
|
|
391
394
|
```
|
|
392
395
|
~/.sootsim/
|
package/detox/index.ts
CHANGED
|
@@ -237,7 +237,7 @@ async function waitForSootsimShellReady(page: Page, timeout = 30000): Promise<vo
|
|
|
237
237
|
})
|
|
238
238
|
if (transitionResult?.timedOut === true) {
|
|
239
239
|
throw new Error(
|
|
240
|
-
`sootsim launch transitions timed out: ${JSON.stringify(transitionResult)}`,
|
|
240
|
+
`sootsim app launch transitions timed out: ${JSON.stringify(transitionResult)}`,
|
|
241
241
|
)
|
|
242
242
|
}
|
|
243
243
|
}
|
|
@@ -1183,7 +1183,7 @@ export const device = {
|
|
|
1183
1183
|
|
|
1184
1184
|
// record the SootSim canvas via the engine's headless recorder
|
|
1185
1185
|
// (window.__sootsimRecorder — @sootsim/plugin-recording). this is the
|
|
1186
|
-
// SAME code path `
|
|
1186
|
+
// SAME code path `sootsim record video` drives, NOT the rail-button
|
|
1187
1187
|
// path (SootSim.bridges.startRecording wires the dialog state machine
|
|
1188
1188
|
// and never stashes the resulting blob into __sootsimRecorder.lastBlob,
|
|
1189
1189
|
// which is what getBlobBase64 streams from).
|
|
@@ -1226,7 +1226,7 @@ export const device = {
|
|
|
1226
1226
|
},
|
|
1227
1227
|
|
|
1228
1228
|
// stop the headless recorder, stream the resulting blob in chunks (same
|
|
1229
|
-
// protocol as `
|
|
1229
|
+
// protocol as `sootsim record`), and write the webm to outPath.
|
|
1230
1230
|
async stopAndSaveBridgeRecording(outPath: string): Promise<string> {
|
|
1231
1231
|
const page = getPage()
|
|
1232
1232
|
const stopResult = await page.evaluate(async () => {
|
package/dist-cli/bin.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
/*! sootsim v0.1.
|
|
3
|
-
import{a as u,b as d,c as g}from"./chunks/chunk-
|
|
2
|
+
/*! sootsim v0.1.170 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
3
|
+
import{a as u,b as d,c as g}from"./chunks/chunk-RLKSLUNR.js";import"./chunks/chunk-WN7R4GL4.js";function f(a){let e=a instanceof Error?a.message:String(a);(/^command timed out after \d+s$/.test(e)||e.startsWith("sim disconnected:")||e.startsWith("bridge never reconnected")||e.startsWith("no sim connected with id ")||e.startsWith("could not connect to ws://")||e.startsWith("sootsim bridge daemon is not running")||e.startsWith("sootsim bridge lockfile is fresh")||e.startsWith("sootsim bridge exited before becoming ready")||e.startsWith("background daemon setup is unavailable")||e.startsWith("sootsim bridge did not start within"))&&!process.env.SOOTSIM_VERBOSE&&(process.stderr.write(` ${e}
|
|
4
4
|
`),process.exit(1)),a instanceof Error&&a.stack?process.stderr.write(`${a.stack}
|
|
5
5
|
`):process.stderr.write(`${e}
|
|
6
6
|
`),process.exit(1)}process.on("unhandledRejection",f);process.on("uncaughtException",f);var A=typeof __SOOTSIM_STANDALONE__<"u"&&__SOOTSIM_STANDALONE__,k=new Set(["preview","electron","install-desktop"]);function v(a){!A||!k.has(a)||(process.stderr.write(` sootsim ${a} isn't available in the standalone binary \u2014
|
|
7
7
|
it needs vite / electron / playwright from a project's node_modules.
|
|
8
8
|
install the npm package and run via bun or node instead:
|
|
9
9
|
npm i -g sootsim && sootsim ${a}
|
|
10
|
-
`),process.exit(1))}var t=g(process.argv);{let{trackCliEvent:a}=await import("./chunks/telemetry-
|
|
10
|
+
`),process.exit(1))}var t=g(process.argv);{let{trackCliEvent:a}=await import("./chunks/telemetry-2XLLWARK.js");a({event:"cli_command_invoked",properties:{command:t.command||(t.version?"version":t.help?"help":"none"),arg_count:t.commandArgs.length,platform:process.platform,arch:process.arch,node_version:process.versions.node}})}async function c(a){let{flushCliTelemetry:e}=await import("./chunks/telemetry-2XLLWARK.js");await e(),process.exit(a)}if(t.version){let{getCliVersion:a}=await import("./chunks/cli-version-EKKWCHRX.js"),{IS_BETA:e,BETA_LABEL:i}=await import("./chunks/beta-4E5USTEI.js"),m=e?` \xB7 ${i}`:"";console.log(`sootsim v${a()}${m}`);let{readActiveRuntime:h}=await import("./chunks/home-paths-ZSCTLOYE.js"),w=h();console.log(w?`runtime v${w}`:"runtime not installed"),await c(0)}if(t.help&&!t.command){let{printHelp:a}=await import("./chunks/help-XBQIK2XY.js");a(),await c(0)}var o=t.globalFlags.port,s=t.verbose,p=t.globalFlags.device,l=t.globalFlags.theme,S=t.globalFlags.driver,E=t.globalFlags.headless===!0,b=t.globalFlags.sim??t.globalFlags.session??t.globalFlags.tab,n=b?["--sim",b,...t.commandArgs]:t.commandArgs;if(p||l){let{settingsStore:a}=await import("./chunks/store-3SLGP5O3.js"),e={};p&&(e.deviceModel=p),l&&(e.colorScheme=l),a.apply(e)}if(!t.command&&t.commandArgs.length===0){let{printHelp:a}=await import("./chunks/help-XBQIK2XY.js");a(),await c(0)}var r=t.command??"";if(!r){if(t.commandArgs.length>0){let e=t.commandArgs.find(i=>!i.startsWith("-"))??t.commandArgs[0];console.error(` unknown command: ${e}`),console.error(" run `sootsim --help` to see the full surface."),await c(1)}let{printHelp:a}=await import("./chunks/help-XBQIK2XY.js");a(),await c(0)}if(r in d){let a=d[r],e=t.commandArgs.length>0?` ${t.commandArgs.join(" ")}`:"";console.error(` \`sootsim ${r}\` was removed. use \`${a}\` instead.`),e&&console.error(` \u2192 ${a}${e}`),console.error(" run `sootsim --help` to see the new verb groups."),await c(1)}if(t.help||t.commandArgs.includes("--help")||t.commandArgs.includes("-h")){if(r==="skill"){let{runSkill:i}=await import("./chunks/skills-PPVS4XOQ.js");await i(t.commandArgs),await c(0)}let a=r==="do"||r==="get"||r==="debug"||r==="shell"||r==="wait",e=t.commandArgs.find(i=>!i.startsWith("-"));if(r!=="shell")if(a&&!e){let{printGroupHelp:i}=await import("./chunks/help-XBQIK2XY.js");i(r)&&await c(0)}else{let{printCommandHelp:i}=await import("./chunks/help-XBQIK2XY.js");i(a&&e?e:r,{prefer:a&&e?"verb":"command",group:a&&e?r:void 0}),await c(0)}}v(r);if(u.has(r)){let{runInspect:a}=await import("./chunks/inspect-2ABU5WET.js");await a([r,...n],{port:o,verbose:s})}else switch(r){case"assert":{let{runAssert:a}=await import("./chunks/assert-ONEP4NQU.js");await a(t.commandArgs);break}case"flow":{let{runFlow:a}=await import("./chunks/flow-KA2WCWDL.js"),e=await a(n);process.exit(typeof e=="number"?e:0)}case"test":{let{runTest:a}=await import("./chunks/test-362G4M5A.js");await a(t.commandArgs,{port:o,verbose:s});break}case"detox":{let{runDetox:a}=await import("./chunks/detox-UIJMKIGQ.js");await a(t.commandArgs,{port:o,verbose:s});break}case"maestro":{let{runMaestro:a}=await import("./chunks/maestro-MKCHEOKA.js"),e=await a(n,{port:o,verbose:s});process.exit(typeof e=="number"?e:0)}case"preview":{let{runPreview:a}=await import("./chunks/preview-S52ZNGN2.js");await a(t.commandArgs,{port:o,verbose:s});break}case"record":{let{runRecord:a}=await import("./chunks/record-YT63SUHO.js");await a(n,{port:o,verbose:s});break}case"profile":{let{runProfile:a}=await import("./chunks/profile-IG5F3LTL.js"),e=await a(t.commandArgs,{port:o,verbose:s});process.exit(typeof e=="number"?e:0)}case"cpu-profile":{let{runCpuProfile:a}=await import("./chunks/cpu-profile-RWGQTWLP.js"),e=await a(n,{port:o,verbose:s});process.exit(typeof e=="number"?e:0)}case"react":{let{runReact:a}=await import("./chunks/react-275HCOFC.js"),e=await a(n,{port:o,verbose:s});process.exit(typeof e=="number"?e:0)}case"screenshot":{let{runScreenshot:a}=await import("./chunks/screenshot-5AZ4MY3A.js");await a(n,{port:o,verbose:s});break}case"screenshots":{if(t.commandArgs[0]==="capture"){let{runScreenshotsCapture:i}=await import("./chunks/screenshots-capture-I66JD3AD.js"),m=await i(t.commandArgs.slice(1));process.exit(typeof m=="number"?m:0)}let{runScreenshots:a}=await import("./chunks/screenshots-UUJNZSG7.js"),e=await a(n,{port:o,verbose:s});process.exit(typeof e=="number"?e:0)}case"screenshot-mode":{let{runScreenshotMode:a}=await import("./chunks/screenshot-mode-4S4EX2XJ.js");await a(t.commandArgs,{port:o,verbose:s});break}case"slides":{let{runSlides:a}=await import("./chunks/slides-ZWSZJZUY.js");await a(n,{port:o,verbose:s});break}case"three-mode":case"3d-mode":{let{runThreeMode:a}=await import("./chunks/three-mode-JNVTM2UT.js");await a(t.commandArgs,{port:o,verbose:s});break}case"inspect":{let{runInspect:a}=await import("./chunks/inspect-2ABU5WET.js");await a(n,{port:o,verbose:s});break}case"debug":{let{runDebug:a}=await import("./chunks/debug-R7PL3MHF.js");await a(n,{port:o,verbose:s});break}case"camera":{let{runCamera:a}=await import("./chunks/camera-RORW4MAA.js");await a(n,{port:o});break}case"timeline":{let{runTimeline:a}=await import("./chunks/timeline-VKC6ULRK.js");await a(n,{port:o,verbose:s});break}case"what-happened":{let{runWhatHappened:a}=await import("./chunks/what-happened-KQCWMQJT.js");await a(n,{port:o,verbose:s});break}case"diagnose":{let{runDiagnose:a}=await import("./chunks/diagnose-OXAKLLZT.js"),e=await a(n,{port:o,verbose:s});process.exit(typeof e=="number"?e:0)}case"open":{let{runOpenCommand:a}=await import("./chunks/control-TWINYHMY.js");await a(n,{port:o});break}case"use":case"focus":{let{runUseCommand:a}=await import("./chunks/control-TWINYHMY.js");await a(n,{port:o});break}case"claim":{let{runClaimCommand:a}=await import("./chunks/control-TWINYHMY.js");await a(n,{port:o});break}case"close":{let{runCloseCommand:a}=await import("./chunks/control-TWINYHMY.js");await a(n,{port:o});break}case"device":{let{runDeviceCommand:a}=await import("./chunks/device-7SRVX2PU.js");await a(n,{port:o});break}case"scan":case"compat":{let{runCompat:a}=await import("./chunks/compat-ZVZM5TML.js");await a(t.commandArgs);break}case"electron":{let{runElectron:a}=await import("./chunks/electron-CTCH4VOL.js");await a(t.commandArgs,{port:o,device:p,driver:S});break}case"login":{let{runLogin:a}=await import("./chunks/login-6D6DXBO3.js");await a(t.commandArgs);break}case"logout":{let{runLogout:a}=await import("./chunks/logout-T5OSWDTJ.js");await a();break}case"whoami":{let{runWhoami:a}=await import("./chunks/whoami-K76PXAD4.js");await a();break}case"keys":{let{runKeys:a}=await import("./chunks/keys-RPVEUNUC.js");await a(t.commandArgs);break}case"setup":{let{runSetup:a}=await import("./chunks/setup-C44N54O7.js");await a(t.commandArgs);break}case"install-desktop":{let{runInstallDesktop:a}=await import("./chunks/install-desktop-4NOQ3YY4.js");await a(t.commandArgs);break}case"serve":{let{runServe:a}=await import("./chunks/serve-O46Q4WAD.js");await a(t.commandArgs,{port:o});break}case"daemon":{let{runDaemon:a}=await import("./chunks/daemon-AOSMNBD4.js");await a(t.commandArgs,{port:o});break}case"runtime":{let{runRuntime:a}=await import("./chunks/runtime-WYZMDZAK.js");await a(t.commandArgs);break}case"upgrade":{let{runUpgrade:a}=await import("./chunks/upgrade-SJPX4SPA.js");await a(t.commandArgs);break}case"version":{let{runVersion:a}=await import("./chunks/version-4Z7AFNH3.js");await a(t.commandArgs);break}case"agent":{let{runAgentCommand:a}=await import("./chunks/agent-3C2BKQKX.js"),e=await a(t.commandArgs);process.exit(e)}case"agent-wrapper":{let{runAgentWrapper:a}=await import("./chunks/agent-wrapper-OIKCYOXZ.js"),e=await a(t.commandArgs);process.exit(e)}case"skill":{let{runSkill:a}=await import("./chunks/skills-PPVS4XOQ.js");await a(t.commandArgs);break}case"upload":{let{runUpload:a}=await import("./chunks/upload-MXOBV6RT.js");await a(t.commandArgs,{port:o,verbose:s});break}case"app-fonts":{let{runAppFonts:a}=await import("./chunks/app-fonts-25O32NAP.js");await a(t.commandArgs);break}case"hints":{let{runHints:a}=await import("./chunks/hints-P3ZIAP3Z.js");a(t.commandArgs);break}default:console.error(` unknown command: ${r}`),console.error(" run `sootsim --help` to see the full surface."),process.exit(1)}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*! sootsim v0.1.170 | (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 D,n as k,o as x,p as g,q as O,r as R}from"./chunk-IO7KAVFK.js";import"./chunk-5ZHUPPS5.js";import{c as $}from"./chunk-UDMJSFSH.js";import"./chunk-35GMFXVJ.js";import"./chunk-XOTJD6PU.js";import"./chunk-3TM7DHWE.js";import"./chunk-ODGEH6OW.js";import"./chunk-ER4GBJRY.js";import"./chunk-ULV4PWN4.js";import"./chunk-DWXC25XG.js";import{j as y}from"./chunk-EX6V4ZV6.js";import"./chunk-DKTC53HV.js";import"./chunk-VATHADSI.js";import"./chunk-V4HTQPMA.js";import"./chunk-WN7R4GL4.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 C}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 C(`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 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!==C.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}=R(),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
|
+
`),L(),2}}catch(r){if(r instanceof c)return process.stderr.write(`${r.message}
|
|
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
|
+
`),2;let s=d.resolve(r);if(!w.existsSync(s))return process.stderr.write(`directory does not exist: ${s}
|
|
6
|
+
`),1;let o=A({cwd:s,name:e["--name"]||d.basename(s),preferredProvider:U(e["--provider"]),sourceRoots:[s]});return process.stdout.write(`\u2713 attached "${o.name}" (id: ${o.id})
|
|
7
|
+
cwd: ${o.cwd}
|
|
8
|
+
framework: ${o.framework}
|
|
9
|
+
preferred provider: ${o.preferredProvider}
|
|
10
|
+
`),0}async function J(){let n=[...S()].sort((t,r)=>r.updatedAt-t.updatedAt);if(n.length===0)return process.stdout.write("no attached projects yet. try `sootsim agent attach <dir>`.\n"),0;let e=`${"ID".padEnd(18)} ${"NAME".padEnd(20)} ${"FRAMEWORK".padEnd(10)} ${"PROVIDER".padEnd(8)} ${"7D COST".padEnd(10)} CWD
|
|
11
|
+
`;process.stdout.write(e);for(let t of n){let r=j(t),s=r>0?`$${r.toFixed(2)}`:"\u2014";process.stdout.write(`${t.id.padEnd(18)} ${p(t.name,20).padEnd(20)} ${t.framework.padEnd(10)} ${t.preferredProvider.padEnd(8)} ${s.padEnd(10)} ${t.cwd}
|
|
12
|
+
`)}return 0}async function V(n){let[e,t]=n;if(e==="show"){if(!t)return process.stderr.write(`usage: sootsim agent project show <id>
|
|
13
|
+
`),2;let r=l(t);return r?(process.stdout.write(JSON.stringify(r,null,2)+`
|
|
14
|
+
`),0):(process.stderr.write(`no project with id=${t}
|
|
15
|
+
`),1)}return e==="remove"?t?(T(t),process.stdout.write(`\u2713 removed project ${t}
|
|
16
|
+
`),0):(process.stderr.write(`usage: sootsim agent project remove <id>
|
|
17
|
+
`),2):(process.stderr.write(`usage: sootsim agent project [show|remove] <id>
|
|
18
|
+
`),2)}async function H(n){let{flags:e}=P(n,{"--project":"value","--all":"bool"}),t=e["--project"]||void 0,r=e["--all"]===!0,s=I(t);if(r||(s=s.filter(i=>i.status!=="ended")),s=s.sort((i,a)=>a.lastSeenAt-i.lastSeenAt),s.length===0)return process.stdout.write(r?`no sessions.
|
|
19
|
+
`:`no active sessions. pass --all to include ended.
|
|
20
|
+
`),0;let o=`${"SESSION".padEnd(26)} ${"PROJECT".padEnd(18)} ${"PROVIDER".padEnd(8)} ${"STATUS".padEnd(16)} ${"ALIVE".padEnd(5)} LAST PROMPT
|
|
21
|
+
`;process.stdout.write(o);for(let i of s){let a=O(i.wrapperPid,i.id)?"yes":"no",m=i.lastPrompt?p(i.lastPrompt,40):"";process.stdout.write(`${N(i.id).padEnd(26)} ${N(i.projectId).padEnd(18)} ${i.provider.padEnd(8)} ${i.status.padEnd(16)} ${a.padEnd(5)} ${m}
|
|
22
|
+
`)}return 0}async function G(n){let{flags:e,positional:t}=P(n,{"--provider":"value","--codex-bin":"value","--claude-bin":"value","--fresh-thread":"bool"}),r=t[0];if(!r)return process.stderr.write(`usage: sootsim agent start <projectId> [--provider codex|claude] [--fresh-thread]
|
|
23
|
+
`),2;let s=await v(i=>i.startSession({projectId:r,provider:U(e["--provider"],void 0)||void 0,codexBin:e["--codex-bin"]||void 0,claudeBin:e["--claude-bin"]||void 0,freshThread:e["--fresh-thread"]===!0})),o=l(s.session.projectId);return process.stdout.write(`\u2713 session ${s.session.id} started
|
|
24
|
+
project: ${o.name} (${o.id})
|
|
25
|
+
provider: ${s.session.provider}
|
|
26
|
+
pid: ${s.wrapperPid}
|
|
27
|
+
prompt with: sootsim agent prompt ${s.session.id} "<text>"
|
|
28
|
+
watch events: sootsim agent watch ${s.session.id}
|
|
29
|
+
`),0}async function q(n){let[e,...t]=n,r=t.join(" ");return!e||!r?(process.stderr.write(`usage: sootsim agent prompt <sessionId> "<text>"
|
|
30
|
+
`),2):(await v(s=>s.sendPrompt(e,{text:r})),process.stdout.write(`\u2713 prompt sent to ${e}
|
|
31
|
+
`),0)}async function K(n){let e=n[0];if(!e)return process.stderr.write(`usage: sootsim agent watch <sessionId>
|
|
32
|
+
`),2;process.stdout.write(`watching ${e}
|
|
33
|
+
---
|
|
34
|
+
`);let t=await h({clientLabel:"sootsim-agent-watch"}),r,s=new Promise(a=>{r=a}),o=t.onAgentEvent(({sessionId:a,event:m})=>{a===e&&process.stdout.write(X(m)+`
|
|
35
|
+
`)}),i=t.onDisconnect(()=>{process.stderr.write(`
|
|
36
|
+
[sootsim] daemon disconnected; exiting watch.
|
|
37
|
+
`),r(1)});try{await t.subscribeEvents(e)}catch(a){throw o(),i(),t.close(),a}return process.on("SIGINT",()=>{o(),i(),t.unsubscribeEvents(e).catch(()=>{}),t.close(),r(130)}),s}function X(n){let e=Z(n.ts);switch(n.type){case"ready":return`[${e}] ready ${n.provider} @ ${n.cwd}`;case"prompt-received":return`[${e}] prompt "${p(n.text,120)}"`;case"turn-started":return`[${e}] turn-started ${n.turnId??""}`;case"turn-message":return`[${e}] turn-message ${n.delta.replace(/\s+$/,"")}`;case"turn-reasoning":return`[${e}] turn-reasoning ${p(n.delta,200)}`;case"tool-call":return`[${e}] tool-call ${n.name}`;case"file-edited":return`[${e}] file-edited ${n.kind.padEnd(6)} ${n.path}`;case"turn-completed":return`[${e}] turn-completed ${n.durationMs}ms files=${n.filesTouched.length}`;case"approval-needed":return`[${e}] approval ${n.kind}`;case"error":return`[${e}] error ${n.message}`;case"exited":return`[${e}] exited code=${n.code}`;case"file-diff-delta":return`[${e}] file-diff-delta ${n.path}`;case"turn-plan":return`[${e}] turn-plan steps=${n.steps.length}`;default:return`[${e}] ${n.type}`}}async function z(n){let e=n[0];if(!e)return process.stderr.write(`usage: sootsim agent transcript <sessionId>
|
|
38
|
+
`),2;let t=g(e);return w.existsSync(t)?(process.stdout.write(w.readFileSync(t,"utf8")),0):(process.stderr.write(`transcript not found: ${t}
|
|
39
|
+
`),1)}async function Q(n){let e=n[0];return e?(await v(t=>t.endSession(e)),process.stdout.write(`\u2713 ended session ${e}
|
|
40
|
+
`),0):(process.stderr.write(`usage: sootsim agent end <sessionId>
|
|
41
|
+
`),2)}async function Y(){let n=E();return process.stdout.write(`userData: ${n}
|
|
42
|
+
state: ${d.join(n,"attached-projects.json")}
|
|
43
|
+
sessions: ${d.join(n,"sessions")}
|
|
44
|
+
transcripts: ${d.join(n,"transcripts")}
|
|
45
|
+
locks: ${d.join(n,"locks")}
|
|
46
|
+
`),0}function p(n,e){return n.length<=e?n:n.slice(0,e-1)+"\u2026"}function N(n){return n.length>14?`${n.slice(0,14)}\u2026`:n}function Z(n){return new Date(n).toISOString().replace("T"," ").slice(0,19)}var fe={sessionDir:D,promptFifoPath:k,eventsFifoPath:x,transcriptPath:g,parseAgentEventLine:b};export{fe as __internals,ge as runAgentCommand};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as M}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.170 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as M}from"./chunk-5ZHUPPS5.js";import"./chunk-WN7R4GL4.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.170 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{d as p}from"./chunk-TXKOJ3P5.js";import"./chunk-WN7R4GL4.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.170 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-WN7R4GL4.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{m as f}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.170 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{m as f}from"./chunk-YMFSRCHL.js";import"./chunk-Q4NDYO2U.js";import{c as m,e as l,g as p}from"./chunk-DIRDEKRW.js";import"./chunk-ULV4PWN4.js";import"./chunk-DWXC25XG.js";import"./chunk-EX6V4ZV6.js";import"./chunk-WN7R4GL4.js";function d(){console.log(`
|
|
3
3
|
sootsim camera \u2014 drive the sim camera
|
|
4
4
|
|
|
5
5
|
usage:
|