sootsim 0.1.138 → 0.1.140
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 +3 -3
- package/dist-cli/chunks/{agent-TD7SHXRH.js → agent-N767ME6M.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-H6JLLQAZ.js → agent-wrapper-ELHIUFZZ.js} +2 -2
- package/dist-cli/chunks/{app-fonts-JDQFGE3V.js → app-fonts-OZ3OSNAJ.js} +2 -2
- package/dist-cli/chunks/{assert-2XLXLJOD.js → assert-GGFUQBNB.js} +2 -2
- package/dist-cli/chunks/auto-bootstrap-L5E6XMCK.js +2 -0
- package/dist-cli/chunks/beta-D74SDA2L.js +2 -0
- package/dist-cli/chunks/camera-5PYEDLLB.js +20 -0
- package/dist-cli/chunks/chunk-4FBFOWV3.js +4 -0
- package/dist-cli/chunks/{chunk-7ELG4PYE.js → chunk-4FGNOWB6.js} +1 -1
- package/dist-cli/chunks/{chunk-ZSPUTLK7.js → chunk-5EP5RRNS.js} +35 -34
- package/dist-cli/chunks/{chunk-BA3QQ5B3.js → chunk-5VTYMBUK.js} +2 -2
- package/dist-cli/chunks/chunk-6KUVOSFF.js +79 -0
- package/dist-cli/chunks/{chunk-CTXIRBH2.js → chunk-77TL74AM.js} +1 -1
- package/dist-cli/chunks/{chunk-BDOLDROC.js → chunk-7SMEXHWJ.js} +1 -1
- package/dist-cli/chunks/{chunk-JFQVDRBK.js → chunk-AI65UVSN.js} +52 -4
- package/dist-cli/chunks/{chunk-XWHR6IKV.js → chunk-AOICEZCA.js} +2 -2
- package/dist-cli/chunks/chunk-AP2MOP44.js +2 -0
- package/dist-cli/chunks/chunk-BEA3AO36.js +5 -0
- package/dist-cli/chunks/{chunk-PILBWKNB.js → chunk-BGXNYXBC.js} +1 -1
- package/dist-cli/chunks/{chunk-FFVME5EQ.js → chunk-BLQBPN76.js} +2 -2
- package/dist-cli/chunks/{chunk-Q4J2SESV.js → chunk-BM7QWZRI.js} +2 -2
- package/dist-cli/chunks/{chunk-5N5MQQM5.js → chunk-C3FURRBF.js} +1 -1
- package/dist-cli/chunks/{chunk-RHU73TIJ.js → chunk-CQ3LV5VL.js} +2 -2
- package/dist-cli/chunks/chunk-EH6YDCSN.js +119 -0
- package/dist-cli/chunks/{chunk-T3HJHXXN.js → chunk-EMNVJOEL.js} +3 -3
- package/dist-cli/chunks/{chunk-C563J47N.js → chunk-FYUDIUFX.js} +2 -2
- package/dist-cli/chunks/{chunk-WHIZNJLR.js → chunk-GI43DDEI.js} +1 -1
- package/dist-cli/chunks/{chunk-KLFGCFE4.js → chunk-GL74P6NR.js} +1 -1
- package/dist-cli/chunks/{chunk-GYZ5ZZMH.js → chunk-GYZNLDBX.js} +2 -2
- package/dist-cli/chunks/chunk-HPTMLB7V.js +2 -0
- package/dist-cli/chunks/{chunk-NPUHFOSG.js → chunk-MRQRJINW.js} +1 -1
- package/dist-cli/chunks/{chunk-IEGRNKTT.js → chunk-N2XPC4Z7.js} +2 -2
- package/dist-cli/chunks/chunk-NQG4R5K2.js +1 -0
- package/dist-cli/chunks/{chunk-62DPZPFC.js → chunk-O2SQNUDP.js} +1 -1
- package/dist-cli/chunks/{chunk-I7RL227U.js → chunk-PBS47TD5.js} +2 -2
- package/dist-cli/chunks/chunk-Q5Z7P54I.js +2 -0
- package/dist-cli/chunks/{chunk-FBDOREAI.js → chunk-QOZ2Q4FH.js} +1 -1
- package/dist-cli/chunks/{chunk-SX6BVZL5.js → chunk-QRRBQE6M.js} +2 -2
- package/dist-cli/chunks/{chunk-KJOBH5CA.js → chunk-QXOZB7WD.js} +2 -2
- package/dist-cli/chunks/{chunk-3XBLSPSH.js → chunk-R5F7XGAO.js} +3 -3
- package/dist-cli/chunks/{chunk-VIZ5BLM2.js → chunk-RAY2DLSK.js} +1 -1
- package/dist-cli/chunks/{chunk-TP3NTZUM.js → chunk-REIC7HRW.js} +1 -1
- package/dist-cli/chunks/chunk-S7I6ZCT2.js +1 -0
- package/dist-cli/chunks/{chunk-GSGRNYPC.js → chunk-SSZBFWV7.js} +1 -1
- package/dist-cli/chunks/chunk-UHTE6FLK.js +69 -0
- package/dist-cli/chunks/{chunk-MZ7TYYP7.js → chunk-WGDXZMKT.js} +2 -2
- package/dist-cli/chunks/chunk-WN3WZEE5.js +1 -0
- package/dist-cli/chunks/{chunk-JEL7BQG7.js → chunk-X6AWKKL4.js} +2 -2
- package/dist-cli/chunks/{chunk-T6QPOIJN.js → chunk-XGYD25DJ.js} +1 -1
- package/dist-cli/chunks/{chunk-XV6XIC4J.js → chunk-ZGDJ5TFU.js} +2 -2
- package/dist-cli/chunks/{chunk-KBOMW6U3.js → chunk-ZN4Z2W7F.js} +2 -2
- package/dist-cli/chunks/{chunk-MNKYCXHQ.js → chunk-ZVQOEMXS.js} +52 -52
- package/dist-cli/chunks/cli-version-EZRTEUXF.js +2 -0
- package/dist-cli/chunks/{compat-6KRCWKBL.js → compat-U3772TUK.js} +3 -3
- package/dist-cli/chunks/{config-JGTLOWS6.js → config-6CZCIYKJ.js} +2 -2
- package/dist-cli/chunks/{control-3LHOESUK.js → control-NVA25O65.js} +2 -2
- package/dist-cli/chunks/{cpu-profile-KWE5IXBN.js → cpu-profile-WRLTZYO6.js} +2 -2
- package/dist-cli/chunks/{daemon-S5LNAQAU.js → daemon-QQPGLGS6.js} +2 -2
- package/dist-cli/chunks/{debug-KJ3TNXUN.js → debug-RKYLSDZV.js} +3 -3
- package/dist-cli/chunks/{detox-UJIPM47N.js → detox-ZRUQQU22.js} +2 -2
- package/dist-cli/chunks/{device-23SEWSUA.js → device-HXTOLEWY.js} +2 -2
- package/dist-cli/chunks/{diagnose-53JGSJF2.js → diagnose-QN4E4WA6.js} +2 -2
- package/dist-cli/chunks/drivers-EVK22AX5.js +2 -0
- package/dist-cli/chunks/{electron-F43274XT.js → electron-ZHRC4WQ5.js} +3 -3
- package/dist-cli/chunks/flow-ICCRVJVX.js +2 -0
- package/dist-cli/chunks/help-QMZ35MIQ.js +2 -0
- package/dist-cli/chunks/{hints-6EFUPUX6.js → hints-HCHKMDUE.js} +2 -2
- package/dist-cli/chunks/{home-paths-TAGKOEXO.js → home-paths-3OHKRAE4.js} +2 -2
- package/dist-cli/chunks/{inspect-UVBYBYJB.js → inspect-QXUBDKJJ.js} +3 -3
- package/dist-cli/chunks/install-JSDZIE2T.js +2 -0
- package/dist-cli/chunks/{install-desktop-M2QEFAIN.js → install-desktop-QCX44BGL.js} +7 -7
- package/dist-cli/chunks/{keys-IJNQHCGZ.js → keys-VEP2KPUF.js} +2 -2
- package/dist-cli/chunks/{launch-UK4I6UYE.js → launch-K4BPQLTP.js} +3 -3
- package/dist-cli/chunks/{login-OBLKQALN.js → login-UVC5XRKR.js} +4 -4
- package/dist-cli/chunks/{logout-HUOLFAU6.js → logout-3VW34IBA.js} +2 -2
- package/dist-cli/chunks/{maestro-B6JMWFEO.js → maestro-HTFXXMLR.js} +2 -2
- package/dist-cli/chunks/optional-demo-registry-5YYEAL46.js +2 -0
- package/dist-cli/chunks/{preview-TYICI3EN.js → preview-TZYJMLEJ.js} +2 -2
- package/dist-cli/chunks/{profile-NQO5HFFJ.js → profile-HDJRF7YB.js} +2 -2
- package/dist-cli/chunks/{react-WXEGMAH6.js → react-RLJR26M7.js} +2 -2
- package/dist-cli/chunks/{record-3DK7CCXV.js → record-2LDDHHUY.js} +2 -2
- package/dist-cli/chunks/runtime-QPYF2WQX.js +2 -0
- package/dist-cli/chunks/{runtime-delivery-QAHWI6JH.js → runtime-delivery-3F6O57E5.js} +2 -2
- package/dist-cli/chunks/{screenshot-SQ7ETUJY.js → screenshot-QAUSSEPK.js} +2 -2
- package/dist-cli/chunks/{screenshot-mode-YYIBQI6S.js → screenshot-mode-K6HEVK4K.js} +2 -2
- package/dist-cli/chunks/{screenshots-YH5P24GR.js → screenshots-TWMCGUBT.js} +2 -2
- package/dist-cli/chunks/{server-PVYHPTCD.js → server-ZPIZCBW5.js} +3 -3
- package/dist-cli/chunks/setup-repo-VHOZJEIV.js +2 -0
- package/dist-cli/chunks/{skills-2V2A7R4O.js → skills-NI3RH7CW.js} +2 -2
- package/dist-cli/chunks/{start-JKY3T6AY.js → start-G6CQL6HJ.js} +4 -4
- package/dist-cli/chunks/store-F6MJUJYW.js +2 -0
- package/dist-cli/chunks/telemetry-DM2Y7OQJ.js +2 -0
- package/dist-cli/chunks/{test-FVA5WGGM.js → test-V47D6EPK.js} +3 -3
- package/dist-cli/chunks/{three-mode-GVODLLP3.js → three-mode-G7N3LRHM.js} +2 -2
- package/dist-cli/chunks/{timeline-LCJYWJBG.js → timeline-EBUOILTJ.js} +2 -2
- package/dist-cli/chunks/{upgrade-4TVPQJRL.js → upgrade-OQJLTCQP.js} +2 -2
- package/dist-cli/chunks/upload-W3YCA65H.js +2 -0
- package/dist-cli/chunks/{version-2XWRCYTM.js → version-3YJPPUE5.js} +2 -2
- package/dist-cli/chunks/web-ZKUX5ICX.js +2 -0
- package/dist-cli/chunks/{what-happened-R57H6WK6.js → what-happened-HOY3TA42.js} +2 -2
- package/dist-cli/chunks/{whoami-YCVHJHIM.js → whoami-GOCSBVTG.js} +2 -2
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +1 -1
- package/dist-lib/attached-projects.cjs +42 -820
- 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 +179 -956
- 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/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 +29 -797
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +660 -1032
- package/dist-lib/vite.cjs +1 -1
- package/package.json +2 -6
- package/scripts/dev-server-scanner.ts +10 -2
- package/scripts/optional-demo-registry.ts +54 -0
- package/src/attached-projects.ts +6 -27
- package/dist-cli/chunks/auto-bootstrap-Q7Z5522T.js +0 -2
- package/dist-cli/chunks/beta-LW4TRSKL.js +0 -2
- package/dist-cli/chunks/chunk-3AVKOCIL.js +0 -5
- package/dist-cli/chunks/chunk-BXITI3GQ.js +0 -4
- package/dist-cli/chunks/chunk-DBJCMZX7.js +0 -1
- package/dist-cli/chunks/chunk-DV4DKAHB.js +0 -64
- package/dist-cli/chunks/chunk-KYAAYSMS.js +0 -2
- package/dist-cli/chunks/chunk-M6GZUJXH.js +0 -62
- package/dist-cli/chunks/chunk-N4DFR7UX.js +0 -79
- package/dist-cli/chunks/chunk-N7TXV2XT.js +0 -1
- package/dist-cli/chunks/chunk-SIKDBA2E.js +0 -119
- package/dist-cli/chunks/chunk-YB7NANNJ.js +0 -1
- package/dist-cli/chunks/chunk-ZS55UGAA.js +0 -2
- package/dist-cli/chunks/cli-version-ROECZHPK.js +0 -2
- package/dist-cli/chunks/demo-app-registry-SU74KYFQ.js +0 -2
- package/dist-cli/chunks/drivers-LQS4T2IT.js +0 -2
- package/dist-cli/chunks/flow-H4F2X23Y.js +0 -2
- package/dist-cli/chunks/help-BT5NJNJ5.js +0 -2
- package/dist-cli/chunks/install-P5R6747T.js +0 -2
- package/dist-cli/chunks/runtime-IFNZGBPZ.js +0 -2
- package/dist-cli/chunks/setup-repo-Y63FUXRC.js +0 -2
- package/dist-cli/chunks/store-KNRC4EGM.js +0 -2
- package/dist-cli/chunks/telemetry-HDSITSDA.js +0 -2
- package/dist-cli/chunks/upload-3AXP6K6R.js +0 -2
- package/dist-cli/chunks/web-4Z6SFQFV.js +0 -2
- package/dist-lib/scripts/demo-app-registry.cjs +0 -818
- package/scripts/demo-app-registry.ts +0 -1006
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! sootsim v0.1.140 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.140 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
var d=Object.defineProperty;var e=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var f=(a,b)=>{for(var c in b)d(a,c,{get:b[c],enumerable:!0})};export{e as a,f as b};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{i as n}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.140 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{i as n}from"./chunk-C3FURRBF.js";var i=[];for(let[t,e]of Object.entries(n))e.cliFlag&&i.push({name:`--${e.cliFlag}`,short:e.cliFlagShort?`-${e.cliFlagShort}`:void 0,key:t,type:e.type==="enum"?"string":e.type,description:e.description,options:e.options,default:e.default});var a=i;function g(){let t=[];for(let e of a){let s=e.short?`${e.short}, ${e.name}`:` ${e.name}`,o=e.options?` [${e.options.join("|")}]`:"",r=e.default!==void 0?` (default: ${e.default})`:"";t.push(` ${s.padEnd(24)}${e.description}${o}${r}`)}return t.join(`
|
|
3
3
|
`)}export{g as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.140 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
var t=4001,n="sootsim close";export{t as a,n as b};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as s}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.140 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as s}from"./chunk-N2XPC4Z7.js";import{n as o}from"./chunk-GL74P6NR.js";import{chmodSync as p,existsSync as d,mkdirSync as g,readFileSync as I,rmSync as f,writeFileSync as _}from"node:fs";import{dirname as y,join as h,resolve as k}from"node:path";function i(){return h(o(),"credentials.json")}function S(){let n=i();if(!d(n))return null;try{let t=JSON.parse(I(n,"utf8"));return t.version!==1||typeof t.apiKey!="string"||!t.apiKey.startsWith("sk_sootsim_")?null:t.apiKey}catch{return null}}function w(n){if(!n.startsWith("sk_sootsim_"))throw new Error("api key must start with sk_sootsim_");let t=i();g(y(k(t)),{recursive:!0}),_(t,JSON.stringify({version:1,apiKey:n,savedAt:new Date().toISOString()},null,2)+`
|
|
3
3
|
`);try{p(t,384)}catch{}}function E(){f(i(),{force:!0})}var m=["ghs_","ghp_","gho_","ghu_","github_pat_"];function O(n){return!!(n&&n.length>=20&&m.some(t=>n.startsWith(t)))}function A(){let n=process.env.SOOT_INSTALLATION_TOKEN?.trim(),t=process.env.GITHUB_TOKEN?.trim(),r=n||t;if(!O(r))return null;let e=(process.env.SOOT_REPO||process.env.GITHUB_REPOSITORY||"").trim();if(!e)return null;let[l,u]=e.includes("/")?e.split("/",2):[null,null],c=(process.env.SOOT_REPO_ID||process.env.GITHUB_REPOSITORY_ID||"").trim(),a=(process.env.SOOT_INSTALLATION_ID||process.env.GITHUB_APP_INSTALLATION_ID||"").trim();return{kind:"github",token:r,repoId:e,repositoryId:c||null,owner:l||null,repo:u||null,installationId:a||null,source:n?"soot-runner":"github-actions"}}function x(){let n=process.env.SOOTSIM_API_KEY?.trim();if(n&&n.startsWith("sk_sootsim_"))return{kind:"api-key",secret:n,source:"env"};let t=A();if(t)return t;let r=S();if(r)return{kind:"api-key",secret:r,source:"file"};let e=s();return e?.token?{kind:"session",token:e.token,origin:e.origin}:null}function H(n){return n.kind==="api-key"?`Bearer ${n.secret}`:`Bearer ${n.token}`}function N(n){return!n||n.kind!=="github"?null:{repoId:n.repoId,owner:n.owner??void 0,repo:n.repo??void 0,installationId:n.installationId}}export{S as a,w as b,E as c,x as d,H as e,N as f};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as s}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.140 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as s}from"./chunk-N2XPC4Z7.js";import{y as o}from"./chunk-GL74P6NR.js";function u(){let e=process.env.DO_NOT_TRACK;return e==="1"||e==="true"||!o()}function a(){if(u())return null;let e=process.env.VITE_POSTHOG_API_KEY||"";if(!e)return null;let t=process.env.SOOT_POSTHOG_HOST||process.env.VITE_POSTHOG_HOST||"https://us.i.posthog.com";return{apiKey:e,host:t.replace(/\/+$/,"")}}function c(e){return e?e.userId?e.userId:e.installationId!=null?`install:${e.installationId}`:e.repoId?`repo:${e.repoId}`:e.shareId?`share:${e.shareId}`:"anonymous-cli":"anonymous-cli"}function p(e){let t=e.identity??{},n={$lib:"soot-cli",source:t.source??"cli",...e.properties};return t.userId&&(n.userId=t.userId),t.repoId&&(n.repoId=t.repoId),t.installationId!=null&&(n.installationId=String(t.installationId)),t.shareId&&(n.shareId=t.shareId),t.plan&&(n.plan=t.plan),{event:e.event,distinct_id:c(t),properties:n,timestamp:new Date().toISOString()}}var r=[],l=!1;async function i(){if(r.length===0)return;let e=a();if(!e){r.length=0;return}let t=r.splice(0,r.length).map(p);try{await fetch(`${e.host}/batch/`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({api_key:e.apiKey,batch:t}),signal:AbortSignal.timeout(2e3)})}catch{}}function d(){l||(l=!0,process.on("beforeExit",()=>void i()),process.on("exit",()=>void i()))}function h(e){if(u())return;d();let t=null;try{t=s()?.user?.id??null}catch{t=null}r.push({...e,identity:{source:"cli",userId:t,...e.identity}})}async function g(){await i()}export{h as a,g as b};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as u}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.140 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as u}from"./chunk-AOICEZCA.js";import{B as g,G as l,H as m,h as p,i as h,k as w}from"./chunk-GL74P6NR.js";import{closeSync as k,existsSync as f,openSync as P,readSync as S,statSync as b}from"fs";import{homedir as T}from"os";import{resolve as D}from"path";import{WebSocket as $}from"ws";var L=6e4;async function E(){let e=g();if(e&&f(w(e)))return;console.log(" first run \u2014 installing sootsim engine runtime (~6 MB)...");let{runRuntime:t}=await import("./runtime-QPYF2WQX.js");await t(["install"],{})}function W(e,t){return B(e)??t??u()}async function x(e=u(),t=L){if(await c(e,250)||await c(e,1500))return;let n=l();if(n&&m(n)){if(n.bootstrapping===!0&&(await v(t),await c(n.bridgePort,500)))return;throw new Error(`sootsim daemon lockfile is fresh (port ${n.bridgePort}) but the bridge is not reachable. run \`sootsim daemon restart\` or \`sootsim daemon uninstall\`.`)}if(h()){let r=p()?"dev workstations":"dev checkouts";throw new Error(`sootsim bridge daemon is not running on port ${e}.
|
|
3
3
|
${r} don't run a standalone daemon \u2014 the live \`bun dev\` stack hosts the
|
|
4
4
|
bridge in-process on :${e}. start the dev stack (\`bun dev\`) so the CLI can
|
|
5
5
|
reach it, or set SOOTSIM_FORCE_DAEMON_INSTALL=1 to run \`bun sootsim server\`
|
|
6
|
-
standalone here on purpose.`)}console.log(" registering sootsim bridge daemon...");let{daemonInstall:o}=await import("./daemon-
|
|
6
|
+
standalone here on purpose.`)}console.log(" registering sootsim bridge daemon...");let{daemonInstall:o}=await import("./daemon-QQPGLGS6.js");try{await o({port:e,force:!0})}catch(r){let s=r instanceof Error?r.message:String(r);throw new Error(`${s}
|
|
7
7
|
if this keeps failing, run \`sootsim daemon uninstall\` and retry, or run \`sootsim server\` in a persistent shell as a workaround.`)}console.log(" waiting for runtime to come online...");let i=process.platform==="darwin"?O():null;try{await v(t);let r=Date.now()+5e3;for(;Date.now()<r;){if(await c(e,500))return;await new Promise(s=>setTimeout(s,200))}throw new Error(`daemon registered but the bridge never bound on port ${e} \u2014 see ${d()} (mac) or \`journalctl --user -u sootsim-server\` (linux).`)}finally{i?.stop()}}async function C(e=u()){await E(),await x(e)}function B(e){for(let t=0;t<e.length;t++){let n=e[t];if((n==="--port"||n==="-p")&&e[t+1]){let o=Number(e[t+1]);return Number.isFinite(o)?o:void 0}if(n.startsWith("--port=")){let o=Number(n.slice(7));return Number.isFinite(o)?o:void 0}}}function c(e,t){return new Promise(n=>{let o=new $(`ws://127.0.0.1:${e}`,{handshakeTimeout:t}),i=!1,r=s=>{if(!i){i=!0;try{o.close()}catch{}n(s)}};o.once("open",()=>r(!0)),o.once("error",()=>r(!1)),setTimeout(()=>r(!1),t)})}async function v(e){let t=Date.now()+e,n;for(;Date.now()<t;){let o=l();if(o&&m(o)){if(o.bootstrapping!==!0)return;o.bootstrapping!==n&&(n=o.bootstrapping)}await new Promise(i=>setTimeout(i,250))}throw new Error(`daemon did not finish bootstrapping within ${Math.round(e/1e3)}s \u2014 check ${d()} (mac) or \`journalctl --user -u sootsim-server\` (linux).`)}function d(){return D(T(),"Library/Logs/sootsim/server.err.log")}function O(){let e=d(),t=0;try{f(e)&&(t=b(e).size)}catch{}let n=!1,o=()=>{if(!n){try{if(f(e)){let i=b(e).size;if(i>t){let r=Buffer.alloc(i-t),s=P(e,"r");try{S(s,r,0,r.length,t)}finally{k(s)}t=i;for(let y of r.toString("utf8").split(/\r?\n/)){let a=y.trim();a&&(a.startsWith("sootsim:")||a.startsWith("sootsim "))&&console.log(` ${a}`)}}else i<t&&(t=i)}}catch{}setTimeout(o,250)}};return o(),{stop:()=>{n=!0}}}export{E as a,W as b,x as c,C as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.140 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import{existsSync as D,mkdirSync as O,readFileSync as g,rmSync as s,writeFileSync as P}from"fs";import{tmpdir as R}from"os";import{dirname as x,join as A,resolve as v}from"path";import{execFileSync as I}from"child_process";import{readFileSync as S}from"fs";import{createRequire as _}from"module";var o=null;function u(r){o||(o=b());try{return o(r)}catch{return null}}function b(){let r=Number(process.env.PPID);if(Number.isFinite(r)&&r>1&&r!==process.ppid)return()=>r;if(process.platform==="linux")return y();if(process.platform==="darwin"){let n=T();return n||C()}return()=>null}function y(){return r=>{try{let n=S(`/proc/${r}/stat`,"utf8"),t=n.lastIndexOf(")");if(t<0)return null;let i=n.slice(t+1).trim().split(/\s+/),e=Number(i[1]);return Number.isFinite(e)&&e>0?e:null}catch{return null}}}var N=3,d=216,E=16;function T(){if(!process.versions?.bun)return null;try{let r=_(import.meta.url),{dlopen:n,FFIType:t}=r("bun:ffi"),i=n("/usr/lib/libproc.dylib",{proc_pidinfo:{args:[t.i32,t.i32,t.u64,t.ptr,t.i32],returns:t.i32}}),e=Buffer.alloc(d);return a=>{if(Number(i.symbols.proc_pidinfo(a,N,0n,e,d))<=0)return null;let p=e.readUInt32LE(E);return p>0?p:null}}catch{return null}}function C(){return r=>{try{let t=I("lsof",["-R","-p",String(r),"-d","cwd","-a"],{encoding:"utf8",timeout:2e3,stdio:["ignore","pipe","ignore"]}).split(`
|
|
3
3
|
`)[1];if(!t)return null;let i=t.trim().split(/\s+/),e=Number(i[2]);return Number.isFinite(e)&&e>1?e:null}catch{return null}}}var c=1,f="SOOTSIM_CLI_CURRENT_SIM_PATH",F=["SOOTSIM_CLI_IDENTITY","CLAUDE_CODE_SESSION_ID","CODEX_THREAD_ID","TERM_SESSION_ID","ITERM_SESSION_ID","TMUX_PANE","STY","KITTY_WINDOW_ID","WEZTERM_PANE","ALACRITTY_WINDOW_ID","WINDOWID","VSCODE_INJECTION"];function m(r,n=20){let t=u(r);if(!t||t<=1)return null;for(let i=0;i<n;i++){let e=u(t);if(!e||e<=1)return t;t=e}return t}function k(){for(let n of F){let t=process.env[n];if(t&&t.trim())return{key:`${n}:${t.trim()}`,source:n,stable:!0}}let r=m(process.ppid);return r&&r>1?{key:`gppid-${r}`,source:"grand-ppid",stable:!0}:{key:`pid-${process.ppid}`,source:"ppid",stable:!1}}function L(){return k().key}function J(){return m(process.ppid)}function l(){if(process.env[f])return v(process.env[f]);let r=L();return A(R(),`sootsim-current-sim-${r}.json`)}function h(){let r=l();if(!D(r))return null;try{let n=JSON.parse(g(r,"utf8"));return n.version!==c||typeof n.simId!="string"||!n.simId.trim()||typeof n.updatedAt!="string"?(s(r,{force:!0}),null):{version:c,simId:n.simId.trim(),updatedAt:n.updatedAt}}catch{return s(r,{force:!0}),null}}function j(){return h()?.simId||null}function K(r){let n=r.trim();if(!n)return;let t=l();O(x(t),{recursive:!0}),P(t,JSON.stringify({version:c,simId:n,updatedAt:new Date().toISOString()},null,2)+`
|
|
4
4
|
`)}function X(){s(l(),{force:!0})}export{k as a,L as b,J as c,j as d,K as e,X as f};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.140 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import{createHash as b}from"node:crypto";import g from"node:fs";import{createRequire as S}from"node:module";import u from"node:path";var y=/\.(ttf|otf|woff|woff2)$/i;function P(t,n,r){if(!t||typeof t!="object")return;let o=t.fonts;if(Array.isArray(o))for(let i of o)typeof i=="string"&&r.push(i);let e=t[n];if(!e||typeof e!="object")return;let s=e.fonts;if(Array.isArray(s))for(let i of s){if(typeof i=="string"){r.push(i);continue}if(!i||typeof i!="object")continue;let c=i.fontDefinitions;if(Array.isArray(c))for(let a of c){if(!a||typeof a!="object")continue;let p=a.path;typeof p=="string"&&r.push(p)}}}function m(t,n){if(!Array.isArray(t))return[];let r=[];for(let o of t){let e=Array.isArray(o)?o[0]:o;if(typeof e!="string"||!/(^|\/)expo-font$/.test(e))continue;let s=Array.isArray(o)?o[1]??{}:{};P(s,n,r)}return r}function C(t){return t.slice(t.lastIndexOf("/")+1).replace(y,"")}function h(t,n){let r=n.replace(/\/+$/,""),o=new Set,e=[];for(let s of t){let i=s.replace(/^\.\//,"").replace(/^\/+/,"");!i||o.has(i)||(o.add(i),y.test(i)&&e.push({family:C(i),url:`${r}/assets/${i}`}))}return e}var d=S(import.meta.url);function x(t){try{let n=new URL(t),r=n.hostname.replace(/^\[|\]$/g,"").toLowerCase();if(r==="localhost"||r.endsWith(".localhost")||r==="0.0.0.0"||r==="::1"||/^127(?:\.\d{1,3}){3}$/.test(r))return n.origin}catch{}return null}var R=["app.config.js","app.config.ts","app.config.cjs","app.config.mjs","app.json"];function w(t){for(let n of R)try{if(g.statSync(u.join(t,n)).isFile())return!0}catch{}return!1}var j=new Set(["node_modules","artifacts","dist","build","out","coverage","tmp","public","ios","android","macos","windows","__fixtures__","__tests__","examples","example"]);function F(t,n){w(t)&&n.push(t);let r;try{r=g.readdirSync(t,{withFileTypes:!0})}catch{return}for(let o of r)o.isDirectory()&&(o.name.startsWith(".")||j.has(o.name)||F(u.join(t,o.name),n))}function _(t){try{return g.statSync(u.join(t,"package.json")).isFile()}catch{return!1}}function I(t){let n=x(t.bundleUrl);if(!n)return[];let r=t.repoDir||process.env.SOOT_REPO_DIR,o=r?u.resolve(r):process.cwd();if(!r&&!_(o))return[];let e=[];if(r)F(o,e),e.includes(o)||e.push(o);else{if(!w(o))return[];e.push(o)}if(e.length===0)return[];let s=(t.platform||process.env.SOOT_PLATFORM||"ios").toLowerCase(),i=null;try{let l=d.resolve("@expo/config",{paths:[...e,o]}),f=d(l);typeof f.getConfig=="function"&&(i=f.getConfig)}catch{}if(!i)return[];let c;for(let l of e)try{let f=i(l,{skipSDKVersionRequirement:!0});if(f?.exp&&typeof f.exp=="object"){let A=f.exp.plugins;if(Array.isArray(A)){c=f.exp;break}}}catch{}if(!c||typeof c!="object")return[];let a=c.plugins;if(!Array.isArray(a))return[];let p=m(a,s==="android"?"android":"ios");return h(p,n)}async function L(t,n){let r=x(t);if(!r)return null;let o=new AbortController,e=setTimeout(()=>o.abort(),n?.timeoutMs??1500);try{let s=await fetch(`${r}/`,{headers:{"expo-platform":"ios",Accept:"application/json"},signal:o.signal});if(!s.ok)return null;let c=(await s.json())?.extra?.expoClient?._internal?.projectRoot;return typeof c=="string"&&c.length>0?c:null}catch{return null}finally{clearTimeout(e)}}function M(t){return t.map(n=>`${encodeURIComponent(n.url)}::${encodeURIComponent(n.family)}`).join(",")}function k(t){let n=[];for(let r of t.split(",")){let o=r.trim();if(!o)continue;let e=o.indexOf("::"),s=e===-1?o:o.slice(0,e);try{n.push(decodeURIComponent(s))}catch{n.push(s)}}return n.filter(Boolean)}function D(t){let n=(t.split("?")[0].split(".").pop()||"").toLowerCase();return n==="ttf"?"font/ttf":n==="otf"?"font/otf":n==="woff"?"font/woff":n==="woff2"?"font/woff2":"application/octet-stream"}async function G(t,n){let r=[],o=new Set;for(let e of k(t)){let s=b("sha256").update(e).digest("hex");if(!o.has(s)){o.add(s);try{let i=await fetch(e);if(!i.ok){n?.onError?.(e,new Error(`${i.status} ${i.statusText}`));continue}let c=new Uint8Array(await i.arrayBuffer());r.push({url:e,urlhash:s,contentType:D(e),bytes:c}),n?.onStaged?.({url:e,byteLength:c.byteLength})}catch(i){n?.onError?.(e,i)}}}return r}export{I as a,L as b,M as c,G as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! sootsim v0.1.140 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.140 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import{execFileSync as h,spawn as g}from"child_process";import{existsSync as s,readdirSync as k}from"fs";import{dirname as m,join as l,resolve as a}from"path";import{fileURLToPath as v}from"url";var c;function p(){if(c!==void 0)return c;try{c=m(v(import.meta.resolve("sootsim-engine/package.json")))}catch{c=null}return c}var I="dev.sootsim.simulator";function x(){let n=p();if(!n)return null;let e=l(n,"dist-electron/main.cjs");if(!s(e))return null;let i=D(n);return i?{path:i,platform:process.platform,kind:"dev-electron",engineDir:n}:null}function b(){let n=p();return n?s(l(n,"src-electron/main.ts")):!1}function D(n){let e=n;for(let i=0;i<6;i++){let t=l(e,"node_modules/.bin/electron");if(s(t))return t;let r=m(e);if(r===e)break;e=r}return null}function C(){let n=p(),i=["/Applications/sootsim.app",a(process.env.HOME||"","Applications/sootsim.app"),...n?[a(n,"app/sootsim.app")]:[]].find(t=>s(t));if(i)return{path:i,platform:"darwin",kind:"mac-app"};try{let t=h("mdfind",[`kMDItemCFBundleIdentifier == "${I}"`],{encoding:"utf8",timeout:3e3}).trim();if(t)return{path:t.split(`
|
|
3
3
|
`)[0],platform:"darwin",kind:"mac-app"}}catch{}return null}function f(n){if(!s(n))return null;let e=k(n).filter(i=>i.startsWith("sootsim")&&i.endsWith(".AppImage")).sort().reverse()[0];return e?l(n,e):null}function w(){let n=p(),i=[a(process.env.HOME||"","Applications/sootsim.AppImage"),a(process.env.HOME||"",".local/bin/sootsim.AppImage"),"/opt/sootsim/sootsim.AppImage","/opt/sootsim/sootsim",...n?[a(n,"app/sootsim.AppImage"),a(n,"release/linux-unpacked/sootsim")]:[]].find(r=>s(r));if(i)return{path:i,platform:"linux",kind:i.endsWith(".AppImage")?"linux-appimage":"linux-binary"};let t=n?f(a(n,"app"))||f(a(n,"release")):null;return t?{path:t,platform:"linux",kind:"linux-appimage"}:null}function A(){let n=x();if(n)return n;if(b()){let e=p(),i=l(e,"dist-electron/main.cjs");return s(i)?console.error(` no node_modules/.bin/electron found near ${e}. run \`bun install\`.`):console.error(` dist-electron/main.cjs missing in ${e}.
|
|
4
4
|
run: bun run --cwd packages/sootsim-engine build:electron-main
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*! sootsim v0.1.140 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as P,b as S}from"./chunk-GI43DDEI.js";import{d as v}from"./chunk-R5F7XGAO.js";import{a as j}from"./chunk-QXOZB7WD.js";import{execSync as A}from"child_process";import{existsSync as k,readFileSync as E,writeFileSync as b}from"fs";import{relative as B,resolve as g}from"path";import{existsSync as p,readFileSync as h,readdirSync as O,statSync as L}from"fs";import{basename as R,dirname as T,join as a}from"path";function D(e){let o=e;for(;;){if(p(a(o,"turbo.json"))||p(a(o,"nx.json"))||p(a(o,"lerna.json"))||p(a(o,"pnpm-workspace.yaml")))return o;let i=a(o,"package.json");if(p(i))try{if(JSON.parse(h(i,"utf8")).workspaces)return o}catch{}let r=T(o);if(r===o)break;o=r}return e}function W(e){return p(a(e,"bun.lock"))||p(a(e,"bun.lockb"))?"bun":p(a(e,"pnpm-lock.yaml"))?"pnpm":p(a(e,"yarn.lock"))?"yarn":"npm"}function J(e){if(p(a(e,"turbo.json")))return"turbo";if(p(a(e,"nx.json")))return"nx";if(p(a(e,"pnpm-workspace.yaml")))return"pnpm";let o=a(e,"package.json");if(p(o))try{if(JSON.parse(h(o,"utf8")).workspaces)return"npm-workspaces"}catch{}return"single"}function N(e){return e.one?"one":e.expo?"expo":e["react-native"]?"bare":"unknown"}function x(e){let o=a(e,"package.json");if(!p(o))return null;let i;try{i=JSON.parse(h(o,"utf8"))}catch{return null}let r={...i.dependencies,...i.devDependencies},s=N(r);return s==="unknown"?null:{dir:e,name:i.name||R(e),framework:s,hasViteConfig:p(a(e,"vite.config.ts"))||p(a(e,"vite.config.js")),hasMetroConfig:p(a(e,"metro.config.js"))||p(a(e,"metro.config.ts")),hasSootsimDependency:!!r.sootsim,devCommand:i.scripts?.dev||null}}function V(e){let o=[],i=a(e,"pnpm-workspace.yaml");if(p(i)){let t=h(i,"utf8").match(/packages:\s*\n((?:\s+-\s+.+\n?)+)/);if(t){let c=t[1].split(`
|
|
3
|
+
`).filter(Boolean);for(let n of c){let m=n.replace(/^\s*-\s*['"]?/,"").replace(/['"]?\s*$/,"");m&&o.push(...$(e,m))}}return o}let r=a(e,"package.json");if(p(r))try{let s=JSON.parse(h(r,"utf8")),t=Array.isArray(s.workspaces)?s.workspaces:s.workspaces?.packages||[];for(let c of t)o.push(...$(e,c))}catch{}return o}function $(e,o){let i=o.replace(/\/\*\*?$/,"").replace(/\*$/,""),r=a(e,i);if(!p(r))return[];try{return O(r).map(t=>a(r,t)).filter(t=>{try{return L(t).isDirectory()&&p(a(t,"package.json"))}catch{return!1}})}catch{return[]}}function M(e){let o=J(e),i=W(e);if(o==="single"){let c=x(e);return{root:e,type:o,packageManager:i,apps:c?[c]:[]}}let r=V(e),s=[],t=x(e);t&&s.push(t);for(let c of r){if(c===e)continue;let n=x(c);n&&s.push(n)}return{root:e,type:o,packageManager:i,apps:s}}function C(e){switch(e){case"bun":return"bun add -d sootsim";case"pnpm":return"pnpm add -D sootsim";case"yarn":return"yarn add -D sootsim";case"npm":return"npm install -D sootsim"}}async function ce(e){(e.includes("--help")||e.includes("-h"))&&(console.log(`
|
|
4
|
+
sootsim setup-repo \u2014 set up sootsim in your project
|
|
5
|
+
|
|
6
|
+
detects your bundler (one, expo, metro), adds sootsim as a
|
|
7
|
+
dependency, configures the bundler plugin, and adds dev scripts.
|
|
8
|
+
|
|
9
|
+
usage:
|
|
10
|
+
sootsim setup-repo interactive setup (current directory)
|
|
11
|
+
sootsim setup-repo --app <dir> set up the project at <dir> (default: cwd)
|
|
12
|
+
sootsim setup-repo --yes skip confirmations
|
|
13
|
+
sootsim setup-repo --dry-run show what would be done
|
|
14
|
+
|
|
15
|
+
works with monorepos (turbo, pnpm, nx) \u2014 scans for app packages.
|
|
16
|
+
`),process.exit(0));let o=e.includes("--yes")||e.includes("-y"),i=e.includes("--dry-run"),r=e.indexOf("--app"),s=r!==-1&&e[r+1]?g(e[r+1]):process.cwd();k(s)||(console.error(` directory not found: ${s}`),process.exit(1));let t=D(s),c=M(t);if(console.log(`
|
|
17
|
+
sootsim \u2014 project setup
|
|
18
|
+
`),!i)try{await v()}catch(l){console.error(` bootstrap failed: ${l instanceof Error?l.message:String(l)}`),console.error(" continuing with project setup; rerun later if needed.")}c.apps.length===0&&(console.log(" no react native apps found in this project."),console.log(` sootsim works with one, expo, and react-native projects.
|
|
19
|
+
`),process.exit(1));let n;if(c.type!=="single"&&c.apps.length>1){console.log(` monorepo detected (${c.type} + ${c.packageManager})
|
|
20
|
+
`);let l=await S("which app?",c.apps.map(f=>`${(B(t,f.dir)||".").padEnd(30)} (${f.framework})`));n=c.apps[l]}else n=c.apps[0];let m=n.framework==="one"?"metro (via one)":n.framework==="expo"?"metro (via expo)":"metro";console.log(" detected:"),console.log(` framework: ${n.framework}`),console.log(` bundler: ${m}`),console.log(` package: ${n.name}`),console.log(` manager: ${c.packageManager}`),console.log();let u=[];if(!n.hasSootsimDependency){let l=C(c.packageManager);u.push({label:"add sootsim as devDependency",run:()=>{A(l,{cwd:n.dir,stdio:"pipe"})}})}n.framework==="one"&&n.hasViteConfig?u.push({label:"add sootsimPlugin() to vite.config.ts",run:()=>_(n.dir)}):(n.framework==="expo"||n.framework==="bare")&&n.hasMetroConfig?u.push({label:"add withSootsim() to metro.config.js",run:()=>G(n.dir)}):n.framework==="one"?u.push({label:"add sootsimPlugin() to vite.config.ts",run:()=>_(n.dir)}):u.push({label:"create metro.config.js with withSootsim()",run:()=>z(n.dir,n.framework)}),console.log(" will:"),u.forEach((l,f)=>console.log(` ${f+1}. ${l.label}`)),console.log(),i&&(console.log(` (dry run \u2014 no changes made)
|
|
21
|
+
`),process.exit(0)),o||(await P("continue?")||(console.log(`
|
|
22
|
+
cancelled.
|
|
23
|
+
`),process.exit(0)),console.log());let d=0;for(let l=0;l<u.length;l++){let f=u[l];process.stdout.write(` [${l+1}/${u.length}] ${f.label}...`);try{f.run(),console.log(" done")}catch(y){d++,console.log(` failed: ${y.message}`),(f.label.includes("vite.config")||f.label.includes("metro.config"))&&H(n)}}j({event:"cli_setup_repo",properties:{framework:n.framework,package_manager:c.packageManager,workspace_type:c.type,step_count:u.length,step_failures:d}});let w=n.framework==="expo"?"npx expo start":n.framework==="one"?`${c.packageManager} run dev`:"npx react-native start";console.log(`
|
|
24
|
+
done! start your dev server:
|
|
25
|
+
|
|
26
|
+
${w}
|
|
27
|
+
|
|
28
|
+
then open the sootsim panel it serves:
|
|
29
|
+
|
|
30
|
+
http://localhost:<dev server port>/__soot/
|
|
31
|
+
|
|
32
|
+
or attach a sim straight from the CLI:
|
|
33
|
+
|
|
34
|
+
sootsim open <dev server port>
|
|
35
|
+
`)}function _(e){let o=g(e,"vite.config.ts")||g(e,"vite.config.js"),i=g(e,"vite.config.ts"),r=g(e,"vite.config.js"),s=k(i)?i:r;if(!k(s))throw new Error(`no vite config found at ${e}`);let t=E(s,"utf8");if(t.includes("sootsimPlugin")){console.log(" (already configured)");return}let c="import { sootsimPlugin } from 'sootsim/vite'",n=/^(import\s+.+)$/gm,m=0,u;for(;(u=n.exec(t))!==null;)m=u.index+u[0].length;m>0?t=t.slice(0,m)+`
|
|
36
|
+
`+c+t.slice(m):t=c+`
|
|
37
|
+
`+t;let d=t.match(/plugins\s*:\s*\[/);if(d&&d.index!==void 0){let w=d.index+d[0].length,l=1,f=w;for(;f<t.length&&l>0;)t[f]==="["&&l++,t[f]==="]"&&l--,l>0&&f++;let y=t.slice(0,f),I=t.slice(f),q=t.slice(w).match(/\n(\s+)\S/)?.[1]||" ",F=t.slice(t.lastIndexOf(`
|
|
38
|
+
`,f),f+1).match(/\n(\s*)/)?.[1]||" ";t=y.trimEnd()+`
|
|
39
|
+
`+q+`sootsimPlugin(),
|
|
40
|
+
`+F+I}else throw new Error("could not find plugins array in vite config");b(s,t)}function G(e){let o=g(e,"metro.config.js"),i=g(e,"metro.config.ts"),r=k(o)?o:i;if(!k(r))throw new Error(`no metro config found at ${e}`);let s=E(r,"utf8");if(s.includes("withSootsim")){console.log(" (already configured)");return}s="const { withSootsim } = require('sootsim/metro')"+`
|
|
41
|
+
`+s,s=s.replace(/(module\.exports\s*=\s*)([^;]+)/,(c,n,m)=>`${n}withSootsim(${m.trim()})`),b(r,s)}function z(e,o){let i=g(e,"metro.config.js"),r;o==="expo"?r=`const { getDefaultConfig } = require('expo/metro-config')
|
|
42
|
+
const { withSootsim } = require('sootsim/metro')
|
|
43
|
+
|
|
44
|
+
const config = getDefaultConfig(__dirname)
|
|
45
|
+
|
|
46
|
+
module.exports = withSootsim(config)
|
|
47
|
+
`:r=`const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config')
|
|
48
|
+
const { withSootsim } = require('sootsim/metro')
|
|
49
|
+
|
|
50
|
+
const config = {}
|
|
51
|
+
|
|
52
|
+
module.exports = withSootsim(mergeConfig(getDefaultConfig(__dirname), config))
|
|
53
|
+
`,b(i,r)}function H(e){e.framework==="one"?console.log(`
|
|
54
|
+
manual setup \u2014 add to your vite.config.ts:
|
|
55
|
+
|
|
56
|
+
import { sootsimPlugin } from 'sootsim/vite'
|
|
57
|
+
|
|
58
|
+
export default {
|
|
59
|
+
plugins: [
|
|
60
|
+
one({ /* ... */ }),
|
|
61
|
+
sootsimPlugin(),
|
|
62
|
+
],
|
|
63
|
+
}
|
|
64
|
+
`):console.log(`
|
|
65
|
+
manual setup \u2014 add to your metro.config.js:
|
|
66
|
+
|
|
67
|
+
const { withSootsim } = require('sootsim/metro')
|
|
68
|
+
module.exports = withSootsim(config)
|
|
69
|
+
`)}export{ce as a};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{F as P,m as v,n as A,o as h,s as I,u as N}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.140 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{F as P,m as v,n as A,o as h,s as I,u as N}from"./chunk-MRQRJINW.js";import{d as y,h as B,i as E}from"./chunk-AOICEZCA.js";var q={timeoutMs:1800,settleMs:48,startWindowMs:64};function w(e){return new Promise(t=>setTimeout(t,e))}function U(e){return e.includes("--json")}function Y(e){process.stdout.write(`${JSON.stringify(e??null,null,2)}
|
|
3
3
|
`)}function V(e){process.stderr.write(`${e}
|
|
4
4
|
`)}function b(e,t=Date.now()){let r=new Date(e),n=`${S(r.getHours())}:${S(r.getMinutes())}:${S(r.getSeconds())}`,s=t-e;if(s<0)return n;let o=Math.round(s/1e3);return o<60?`${n} +${o}s`:o<3600?`${n} +${Math.round(o/60)}m`:o<86400?`${n} +${Math.round(o/3600)}h`:`${n} +${Math.round(o/86400)}d`}function S(e){return e<10?`0${e}`:String(e)}async function D(e,t,...r){return B(e,`__sootsimTest.${t}`,...r)}async function k(e,t,...r){return E(e,`SootSim.bridges.mainShell.${t}`,...r)}async function z(e,t={}){try{let r=await D(e,"waitForScreenTransitions",q);if(!t.verbose||!r?.started)return;if(r.timedOut){console.log(` screen transition still active after ${r.waitedMs}ms; continuing`);return}r.waitedMs>0&&console.log(` waited ${r.waitedMs}ms for screen transition settle`)}catch{}}async function K(e,t,r,...n){let s=Date.now()+Math.max(0,r);for(;;)try{return await k(e,t,...n)}catch(o){if(!P(o)||Date.now()>=s)throw o;await w(50)}}async function Q(e,t,r,n={}){let s=n.attempts??30,o=n.intervalMs??500,l=n.minNodeCount??10;for(let a=0;a<s;a++){let u=y(e,{commandTimeoutMs:t,simId:r,simIdSource:n.simIdSource});try{let c=await u.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof c=="number"&&c>l)return{bridge:u,count:c}}catch{}u.close(),await w(o)}return null}async function X(e,t,r,n={}){let s=n.timeoutMs??8e3,o=n.intervalMs??250,l=Date.now()+s;for(;Date.now()<l;){let a=y(e,{commandTimeoutMs:t,simId:r,simIdSource:n.simIdSource});try{return await a.send({type:"evaluate",code:"1"}),a}catch{a.close()}await w(o)}return null}async function Z(e,t={}){let r=t.timeoutMs??1e4,n=t.errorGraceMs??3e3,s=t.pollIntervalMs??200,o=Date.now(),l=o+r,a=-1,u=o,c=null,d=!1,m={ready:!1,source:"timeout",elapsedMs:0,nodes:0,targets:0,flag:void 0,loadingText:"",externalReady:null,externalStatus:"",externalError:"",errors:0};for(;Date.now()<l;){try{let i=await e.send({type:"evaluate",code:v}),g=Date.now()-o,f=Number(i?.nodes)||0,$=Number(i?.targets)||0,x=Number(i?.errors)||0,C=i?.flag===!0,p=i?.externalReady,T=typeof i?.loadingText=="string"?i.loadingText.trim():"",W=typeof i?.externalStatus=="string"?i.externalStatus.trim():"",M=typeof i?.externalError=="string"?i.externalError.trim():"",R=typeof i?.externalError=="string"&&M.length>0;if(c=p,d=R,f!==a&&(a=f,u=g),m={ready:!1,source:"timeout",elapsedMs:g,nodes:f,targets:$,flag:i?.flag,loadingText:T,externalReady:typeof p=="boolean"?p:null,externalStatus:W,externalError:M,errors:x},C&&p!==!1&&!R&&!T&&h({nodes:f,targets:$})&&g-u>=A)return{...m,ready:!0,source:"flag"};if(g>=n&&x>0&&!C)return{...m,ready:!1,source:"error-bail"}}catch{}await w(s)}return c!==!1&&!d&&!m.loadingText&&h(m)?{...m,ready:!0,source:"nodes-fallback"}:{...m,ready:!1,source:"timeout",elapsedMs:Date.now()-o}}function O(e){let t=e.displayUrl||e.url;return e.status!=null?`${e.method} ${t} -> ${e.status}${e.statusText?` ${e.statusText}`:""}`:e.error?`${e.method} ${t} -> ${e.error}`:`${e.method} ${t}`}async function _(e,t,...r){return e.send({type:"call",path:`__sootsimTest.${t}`,args:r})}async function F(e,t={}){let r=await e.send({type:"evaluate",code:N});if(!r||typeof r!="object")return;let n=Math.max(0,Number(r.errors)||0),s=Math.max(0,Number(r.warnings)||0);if(n===0&&s===0)return;let o=[];if(n>0&&o.push(`${n} console error${n===1?"":"s"}`),s>0&&o.push(`${s} console warning${s===1?"":"s"}`),console.log(`
|
|
5
5
|
console: ${o.join(", ")}`),t.errorsCommand&&console.log(` inspect: ${t.errorsCommand}`),s>0&&t.warningsCommand&&console.log(` inspect: ${t.warningsCommand}`),!t.includeTail||n===0)return;let l=await I(e,5);if(!(!Array.isArray(l)||l.length===0)){console.log(`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! sootsim v0.1.140 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{c as i,e as d,h as c}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.140 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as i,e as d,h as c}from"./chunk-AOICEZCA.js";function g(r){let e=r[0]?.toLowerCase()??"toggle";return e!=="on"&&e!=="off"&&e!=="toggle"&&(console.error(` unknown argument: "${e}" (expected on | off | toggle)`),process.exit(1)),e}async function u(r,e,t){let l=i(r,{port:e.port}),s=g(l.positional),a=d({...l,commandTimeoutMs:5e3});try{let n=!!(await c(a,"SootSim.bridges.settings.get"))?.[t.modeKey],o=s==="on"?!0:s==="off"?!1:!n;if(n===o)return console.log(` ${t.displayName}: already ${o?"on":"off"}`),{current:n,target:o,changed:!1};if(!await a.send({type:"evaluate",acquireLock:!0,code:`(async () => {
|
|
3
3
|
const modeKey = ${JSON.stringify(t.modeKey)}
|
|
4
4
|
const target = ${JSON.stringify(o)}
|
|
5
5
|
window.dispatchEvent(new CustomEvent('sootsim:shell-command', {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.140 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import{execFileSync as p,spawn as l}from"child_process";import{existsSync as s}from"fs";import{homedir as u}from"os";import{join as d}from"path";var g=["/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","~/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","/Applications/Chromium.app/Contents/MacOS/Chromium","~/Applications/Chromium.app/Contents/MacOS/Chromium","/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge","~/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge","/Applications/Brave Browser.app/Contents/MacOS/Brave Browser","~/Applications/Brave Browser.app/Contents/MacOS/Brave Browser","/Applications/Arc.app/Contents/MacOS/Arc","~/Applications/Arc.app/Contents/MacOS/Arc"],f=["/usr/bin/google-chrome","/usr/bin/chromium","/usr/bin/chromium-browser","/usr/bin/microsoft-edge","/usr/bin/brave-browser","/snap/bin/chromium"],h=["C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe","C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe","C:\\Program Files\\Microsoft\\Edge\\Application\\msedge.exe","C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe","C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe","C:\\Program Files (x86)\\BraveSoftware\\Brave-Browser\\Application\\brave.exe"],C=["google-chrome","chromium","chromium-browser","microsoft-edge","brave-browser"],O=["chrome","msedge","brave"];function w(r){return r.startsWith("~/")?d(u(),r.slice(2)):r}function a(r){for(let n of r){let o=w(n);if(s(o))return o}return null}function U(r,n){try{let e=p(n==="win32"?"where":"which",[r],{encoding:"utf8",timeout:1500,stdio:["ignore","pipe","ignore"]}).trim();return e?e.split(/\r?\n/)[0]:null}catch{return null}}function M(r=process.platform){let n=process.env.CHROME_PATH||process.env.CHROMIUM_PATH;if(n&&s(n))return n;let o=a(r==="darwin"?g:r==="win32"?h:f);if(o)return o;let e=r==="win32"?O:C;for(let t of e){let i=U(t,r);if(i)return i}return null}function A(r,n={}){if(!r)throw new Error("openUrl requires a url");let o=n.platform??process.platform;return n.newWindow?c(r,{...n,platform:o,newWindow:!0}):o==="darwin"?{command:"open",args:n.background===!1?[r]:["-g",r],via:"system"}:o==="win32"?{command:"cmd",args:["/c","start","",r],via:"system"}:{command:"xdg-open",args:[r],via:"system"}}function c(r,n={}){if(!r)throw new Error("openUrl requires a url");let o=n.platform??process.platform,e="chromiumBinary"in n?n.chromiumBinary:M(o);if(!e)throw new Error("browser launch requires Chrome, Chromium, Edge, Brave, or Arc");let t=[];return n.newWindow!==!1&&t.push("--new-window"),t.push(r),{command:e,args:t,via:"chromium",target:e}}async function m(r,n,o){return new Promise((e,t)=>{let i=l(r,n,{detached:o,stdio:"ignore"});i.once("error",t),i.once("spawn",()=>{o&&i.unref(),e(i.pid)})})}async function x(r,n={}){let o=A(r,n),e=await m(o.command,o.args,n.detached??!0);return{...o,pid:e,attachUrl:r}}async function y(r,n={}){let o=c(r,n),e=await m(o.command,o.args,n.detached??!0);return{...o,pid:e,attachUrl:r}}async function E(r,n={}){await x(r,n)}export{M as a,x as b,y as c,E as d};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{g as u}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.140 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{g as u}from"./chunk-C3FURRBF.js";var S=52,l=18,h=42,x=96,g=54,E=1.5,$="inset 0 0 0 0.5px #000, inset 0 0 0 2px #757575, inset 0 0 0 5px #212121",w=1;function y(e){let t=u(e),r=t.scale,o=!t.dynamicIsland&&t.homeIndicatorHeight===0&&t.cornerRadius===0,n=t.width,i=t.height,a=o?t.width+l*2:t.width+28,d=o?t.height+h+x:t.height+28,c=9.5,b=w,p=a+c*2,m=d+w*2,f=c+(o?l:14),B=o?h:14,H=o?S:t.cornerRadius+14,v=[{side:"right",top:t.hardwareButtons.lock.top,height:t.hardwareButtons.lock.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.ringToggle.top,height:t.hardwareButtons.ringToggle.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.volumeUp.top,height:t.hardwareButtons.volumeUp.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.volumeDown.top,height:t.hardwareButtons.volumeDown.height,width:t.hardwareButtons.width}];return{model:e,renderScale:r,outerWidth:Math.round(p*r),outerHeight:Math.round(m*r),logicalOuterWidth:p,logicalOuterHeight:m,logicalFrameWidth:a,logicalFrameHeight:d,logicalFrameLeft:c,logicalFrameTop:b,logicalScreenWidth:n,logicalScreenHeight:i,logicalScreenLeft:f,logicalScreenTop:B,logicalScreenRadius:o?0:t.cornerRadius,logicalFrameRadius:H,frameBackground:o?"linear-gradient(180deg, #1b1c20 0%, #0f1012 42%, #050608 100%)":"#000000",frameOutline:o?"0 0 0 1px #1f2125":"0 0 0 1px #333",metallicRingShadow:o?null:$,buttons:v,legacyHomeButton:o?{top:h+t.height+(x-g)/2,left:t.width/2-g/2+l,size:g,ring:E}:null,showHomeIndicator:t.homeIndicatorHeight>0,logicalHomeIndicatorStripHeight:t.homeIndicatorHeight}}function L(e){let t=e.side==="right",r=t?"inset(-3px -3px -3px 0)":"inset(-3px 0 -3px -3px)";return`
|
|
3
3
|
<div
|
|
4
4
|
aria-hidden="true"
|
|
5
5
|
style="
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{g as w,i as u,j as m,k as l}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.140 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{g as w,i as u,j as m,k as l}from"./chunk-C3FURRBF.js";var p="sootsim:settings",v=["errorReporting","colorScheme","a11yMode","a11yDepth","screenshotCanvas","screenshotBackground","screenshotText","screenshotPose","screenshotDynamicSize","agentProvider","onboardingComplete","betaConsentVersion","detailedTelemetry"];function S(){if(typeof window>"u")return null;let e=window.sootsimElectron;return e&&typeof e=="object"?e:null}function g(e){let t={};for(let n of v){if(!(n in e))continue;let r=e[n],o=u[n];o.validate&&!o.validate(r)||o.options&&!o.options.includes(r)||(t[n]=r)}return t}function h(e){let t={};for(let n of v)t[n]=e[n];return t}function _(){if(typeof localStorage>"u")return{};try{let e=localStorage.getItem(p);return e?g(JSON.parse(e)):{}}catch{return{}}}function V(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(p,JSON.stringify(h(e)))}catch{}}function E(){let t=S()?.sharedConfig?.settings;return!t||typeof t!="object"?{}:g(t)}function K(e){let t=S();if(t?.writeSharedConfig)try{t.writeSharedConfig({settings:h(e)})}catch{}}function k(){if(typeof window>"u")return null;let e=window.__sootsimSharedConfig;return e&&typeof e=="object"?e:null}function j(){let e=k()?.settings;return!e||typeof e!="object"?{}:g(e)}function D(e){if(!k())return;let t={settings:h(e)};try{if(globalThis.__sootsimBridgeRequest?.writeSharedConfig?.(t))return}catch{}if(!(typeof fetch>"u"))try{fetch("/__sootsim/shared-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:!0}).catch(()=>{})}catch{}}function b(){let e=_(),t=j(),n=E();return{...e,...t,...n}}function R(e){V(e),K(e),D(e)}function C(e){if(typeof window>"u")return()=>{};let t=i=>{if(!(i.key!==p||i.newValue==null))try{e(g(JSON.parse(i.newValue)))}catch{}};window.addEventListener("storage",t);let n=S(),r;n?.onSharedConfigChanged&&(r=n.onSharedConfigChanged(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))}));let c=globalThis.__sootsimBridgeRequest?.subscribeSharedConfig?.(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))});return()=>{window.removeEventListener("storage",t),r?.(),c?.()}}var M=l(),P=b();for(let e of Object.keys(m()))delete P[e];var s={...M,...P},f=[],a=null;function y(){for(let e of f)e();R(s)}C(e=>{let t={...s},n=!1;for(let[r,o]of Object.entries(e)){let c=r;t[c]!==o&&(t[c]=o,n=!0)}if(n){s=t,a=null;for(let r of f)r()}});var L={get(e){return s[e]},set(e,t){let n=u[e];n.validate&&!n.validate(t)||n.options&&!n.options.includes(t)||s[e]!==t&&(s={...s,[e]:t},e==="deviceModel"&&(a=null),y())},getAll(){return s},apply(e){let t=!1,n={...s};for(let[r,o]of Object.entries(e)){if(o===void 0)continue;let c=r,i=u[c];i&&(i.validate&&!i.validate(o)||i.options&&!i.options.includes(o)||n[c]!==o&&(n[c]=o,t=!0))}t&&(s=n,a=null,y())},reset(){s=l(),a=null,y()},subscribe(e){return f.push(e),()=>{f=f.filter(t=>t!==e)}},getDeviceSpec(){return a||(a=w(s.deviceModel)),a},getA11yMode(){return s.a11yMode},setA11yMode(e){this.set("a11yMode",e)},getInspectMode(){return s.inspectMode},setInspectMode(e){this.set("inspectMode",e)}};export{L as a};
|