sootsim 0.1.238 → 0.1.240
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cli/bin.js +4 -4
- package/dist-cli/chunks/{agent-VQVLJBBZ.js → agent-YS355M7O.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-ABFE7KJQ.js → agent-wrapper-DJJH2DE5.js} +2 -2
- package/dist-cli/chunks/{app-fonts-ODI2DJ7C.js → app-fonts-2KURCNO7.js} +2 -2
- package/dist-cli/chunks/{assert-ZXNN3U2C.js → assert-Y7SV6LAY.js} +2 -2
- package/dist-cli/chunks/{auth-LMHWH6T3.js → auth-5VMBSD6F.js} +2 -2
- package/dist-cli/chunks/beta-KMI4GCCN.js +2 -0
- package/dist-cli/chunks/{camera-VWTIE3VW.js → camera-WCQNMZRH.js} +2 -2
- package/dist-cli/chunks/{chunk-EGRRMDLA.js → chunk-2QILUPQJ.js} +1 -1
- package/dist-cli/chunks/{chunk-D5LYVGSE.js → chunk-2ZEVD46I.js} +3 -3
- package/dist-cli/chunks/{chunk-XUOCSWW4.js → chunk-3RYTIG4Y.js} +1 -1
- package/dist-cli/chunks/{chunk-XWGGIFDB.js → chunk-3ULI43M6.js} +16 -8
- package/dist-cli/chunks/{chunk-CDAMSEOW.js → chunk-4F63QBYN.js} +3 -3
- package/dist-cli/chunks/{chunk-6UMCNLKY.js → chunk-4FUKKXDQ.js} +2 -2
- package/dist-cli/chunks/{chunk-SCLKEUCN.js → chunk-5LCZXDDX.js} +1 -1
- package/dist-cli/chunks/{chunk-2PFG3UHP.js → chunk-6XHVSTMH.js} +2 -2
- package/dist-cli/chunks/{chunk-MT2HMCDI.js → chunk-7ZTOWAQF.js} +2 -2
- package/dist-cli/chunks/{chunk-6PYVHZVH.js → chunk-AX56F2Z5.js} +1 -1
- package/dist-cli/chunks/{chunk-IHEPAACR.js → chunk-BWR3AJZ3.js} +1 -1
- package/dist-cli/chunks/{chunk-2FFZXFDY.js → chunk-C4MSUAGM.js} +1 -1
- package/dist-cli/chunks/{chunk-LYSW5PTM.js → chunk-DEO54ZY3.js} +2 -2
- package/dist-cli/chunks/{chunk-HTTHCQQS.js → chunk-DQEI7LOC.js} +3 -3
- package/dist-cli/chunks/{chunk-HC6JXVIP.js → chunk-EJ6ULQFO.js} +2 -2
- package/dist-cli/chunks/{chunk-MD5GBDM4.js → chunk-GI36DI2I.js} +1 -1
- package/dist-cli/chunks/{chunk-6KMMJDSE.js → chunk-GW7REFUB.js} +1 -1
- package/dist-cli/chunks/{chunk-XOKMWX3P.js → chunk-GYWIGJB7.js} +2 -2
- package/dist-cli/chunks/{chunk-CXV3CSSF.js → chunk-H6GS5C4F.js} +2 -2
- package/dist-cli/chunks/{chunk-UYFE2VRP.js → chunk-HIFBYPJK.js} +2 -2
- package/dist-cli/chunks/{chunk-CU7M5IBW.js → chunk-ILU6JNUJ.js} +1 -1
- package/dist-cli/chunks/{chunk-5MQZW32V.js → chunk-JDRG4T3G.js} +2 -2
- package/dist-cli/chunks/{chunk-ECCUSCHO.js → chunk-KENWUOKC.js} +2 -2
- package/dist-cli/chunks/{chunk-7OQU5M3J.js → chunk-KY2HHVDG.js} +2 -2
- package/dist-cli/chunks/{chunk-OHLPCYOM.js → chunk-LBOSTYWQ.js} +1 -1
- package/dist-cli/chunks/{chunk-4DN5YMPS.js → chunk-M2MJXMTO.js} +1 -1
- package/dist-cli/chunks/{chunk-QGCNRLCM.js → chunk-M2OTE66X.js} +2 -2
- package/dist-cli/chunks/{chunk-5MFTB3S4.js → chunk-M3VY5LEN.js} +1 -1
- package/dist-cli/chunks/{chunk-NCJGR7VZ.js → chunk-NJYDI627.js} +1 -1
- package/dist-cli/chunks/{chunk-YK4NG4BL.js → chunk-OBQJXFV3.js} +1 -1
- package/dist-cli/chunks/{chunk-GI4YPHU6.js → chunk-OKHNWLZ7.js} +2 -2
- package/dist-cli/chunks/{chunk-CGQTOBHQ.js → chunk-OUW757HM.js} +128 -87
- package/dist-cli/chunks/chunk-R54EGANH.js +1 -0
- package/dist-cli/chunks/{chunk-54XALXOI.js → chunk-SFNTUDIP.js} +2 -2
- package/dist-cli/chunks/{chunk-KGAN3JXK.js → chunk-SW5HPJC7.js} +2 -2
- package/dist-cli/chunks/{chunk-YNSDDYLM.js → chunk-T7BLBFPG.js} +2 -2
- package/dist-cli/chunks/{chunk-3KVQ35TN.js → chunk-TFXCEOCW.js} +1 -1
- package/dist-cli/chunks/chunk-U3VMQUN6.js +1 -0
- package/dist-cli/chunks/{chunk-RTMLR7KA.js → chunk-VU5WTUZJ.js} +2 -2
- package/dist-cli/chunks/{chunk-DMSG7ESJ.js → chunk-WYT6JDAV.js} +1 -1
- package/dist-cli/chunks/{chunk-A46S76WN.js → chunk-XSSTKHK7.js} +2 -2
- package/dist-cli/chunks/{chunk-4DPHH2DS.js → chunk-XV4VXQDA.js} +2 -2
- package/dist-cli/chunks/{chunk-VTY35NKD.js → chunk-XVE2O2IR.js} +2 -2
- package/dist-cli/chunks/{chunk-QGFPGXNJ.js → chunk-ZYMOUSJC.js} +1 -1
- package/dist-cli/chunks/cli-version-2BXTYTLJ.js +2 -0
- package/dist-cli/chunks/{compat-JZPFXICF.js → compat-LUERFKMW.js} +3 -3
- package/dist-cli/chunks/{config-UL7HLQDC.js → config-U4Z6TYT6.js} +2 -2
- package/dist-cli/chunks/{control-QKU5C5S2.js → control-I5YB63IZ.js} +2 -2
- package/dist-cli/chunks/daemon-VTG3XKWA.js +2 -0
- package/dist-cli/chunks/{debug-H5DH3AQF.js → debug-HXECWDLV.js} +3 -3
- package/dist-cli/chunks/{desktop-6KNJHXC3.js → desktop-NZJLDJIO.js} +3 -3
- package/dist-cli/chunks/{detox-GGHGQ4ZT.js → detox-LUOT4TIA.js} +2 -2
- package/dist-cli/chunks/{device-BRDNCJVC.js → device-7TZ7BD36.js} +2 -2
- package/dist-cli/chunks/{diagnose-YYUH2HKW.js → diagnose-DW2ANEGF.js} +2 -2
- package/dist-cli/chunks/drivers-RDXY5SDO.js +2 -0
- package/dist-cli/chunks/{film-ZCOJKWH3.js → film-6MYMKZ3N.js} +3 -3
- package/dist-cli/chunks/flow-KS77CBEA.js +2 -0
- package/dist-cli/chunks/help-H3ZD3LVG.js +2 -0
- package/dist-cli/chunks/{hidden-runtime-alias-FKPQZHNW.js → hidden-runtime-alias-FUDVEMFB.js} +2 -2
- package/dist-cli/chunks/{home-paths-XVONOHWM.js → home-paths-KU4MY22X.js} +2 -2
- package/dist-cli/chunks/inspect-ACDDO276.js +2 -0
- package/dist-cli/chunks/install-desktop-UQVXJAXS.js +2 -0
- package/dist-cli/chunks/{login-4DXNKRVF.js → login-EVS4SZQN.js} +4 -4
- package/dist-cli/chunks/{logout-ARENLQQ5.js → logout-K5MLSAWM.js} +2 -2
- package/dist-cli/chunks/{maestro-G7VNKI32.js → maestro-OEDT2T7V.js} +3 -3
- package/dist-cli/chunks/{maestro-generate-U3YRKKPN.js → maestro-generate-T4RZSVSM.js} +3 -3
- package/dist-cli/chunks/{mode-FNLKDZKM.js → mode-TZU7JML2.js} +2 -2
- package/dist-cli/chunks/optional-demo-registry-NIJ3MA5N.js +2 -0
- package/dist-cli/chunks/{perf-C3O4QGRB.js → perf-YNBU57WH.js} +2 -2
- package/dist-cli/chunks/{record-YEOZEOTK.js → record-V6T2INPF.js} +3 -3
- package/dist-cli/chunks/runtime-7XBSKGNO.js +2 -0
- package/dist-cli/chunks/{screenshot-command-CCVMBNZ7.js → screenshot-command-CZZ6IXSD.js} +3 -3
- package/dist-cli/chunks/{screenshots-capture-GIVPWSQG.js → screenshots-capture-WVR5FCHX.js} +2 -2
- package/dist-cli/chunks/serve-6I35UUFI.js +41 -0
- package/dist-cli/chunks/{setup-OQ7EMGIY.js → setup-O7GD6GME.js} +3 -3
- package/dist-cli/chunks/{skills-Z25AHTRM.js → skills-GBTBS2OK.js} +2 -2
- package/dist-cli/chunks/{storage-EDYGSOMU.js → storage-FI2YOPQE.js} +2 -2
- package/dist-cli/chunks/store-FU7T5NPV.js +2 -0
- package/dist-cli/chunks/telemetry-REPVX6LA.js +2 -0
- package/dist-cli/chunks/{timeline-FTAZATIZ.js → timeline-E5DVVATK.js} +2 -2
- package/dist-cli/chunks/{upgrade-JBRL4AHX.js → upgrade-QKOI3Q4U.js} +2 -2
- package/dist-cli/chunks/upload-IFQM3FG4.js +2 -0
- package/dist-cli/chunks/{version-H6PRWWUE.js → version-UANAPNZM.js} +2 -2
- package/dist-cli/chunks/web-4LZ7DUUS.js +2 -0
- package/dist-cli/chunks/{what-happened-A7IDSBXP.js → what-happened-JOLNICMX.js} +2 -2
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +77 -33
- package/dist-lib/host/fetch-proxy-handler.cjs +77 -33
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +91 -4
- package/dist-lib/sdk.mjs +91 -4
- package/dist-lib/skills.cjs +105 -40
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/src/host/fetch-proxy-handler.ts +104 -52
- package/dist-cli/chunks/beta-TN34R6YC.js +0 -2
- package/dist-cli/chunks/chunk-QAKSIRZO.js +0 -1
- package/dist-cli/chunks/chunk-UV4NF53M.js +0 -1
- package/dist-cli/chunks/cli-version-JMIF5EGD.js +0 -2
- package/dist-cli/chunks/daemon-IREYS2N7.js +0 -2
- package/dist-cli/chunks/drivers-IHDBZZUB.js +0 -2
- package/dist-cli/chunks/flow-TXWXTHAY.js +0 -2
- package/dist-cli/chunks/help-TAORLP73.js +0 -2
- package/dist-cli/chunks/inspect-ALJUDST3.js +0 -2
- package/dist-cli/chunks/install-desktop-W5JGGPCV.js +0 -2
- package/dist-cli/chunks/optional-demo-registry-Y5KQWQ6V.js +0 -2
- package/dist-cli/chunks/runtime-VCWHZCYU.js +0 -2
- package/dist-cli/chunks/serve-KYU7THWX.js +0 -41
- package/dist-cli/chunks/store-BP3EICTQ.js +0 -2
- package/dist-cli/chunks/telemetry-K2S6RLSW.js +0 -2
- package/dist-cli/chunks/upload-JVFQZS5Z.js +0 -2
- package/dist-cli/chunks/web-D45A6FKK.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.240 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import{createInterface as i}from"readline";var c=()=>i({input:process.stdin,output:process.stdout});function s(o){return new Promise(n=>{let r=c();r.question(o,t=>{r.close(),n(t.trim())})})}async function u(o,n=!0){let r=n?"[Y/n]":"[y/N]";if(!process.stdin.isTTY)return console.log(` ${o} ${r} ${n?"y":"n"} (non-interactive)`),n;let t=await s(` ${o} ${r} `);return t===""?n:t.toLowerCase().startsWith("y")}async function a(o,n){console.log(`
|
|
3
3
|
${o}
|
|
4
4
|
`);for(let e=0;e<n.length;e++)console.log(` ${e+1}. ${n[e]}`);if(console.log(),!process.stdin.isTTY)return console.log(` choose [1-${n.length}]: 1 (non-interactive)`),0;let r=await s(` choose [1-${n.length}]: `),t=parseInt(r,10);return t>=1&&t<=n.length?t-1:0}export{u as a,a as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{h as w,j as u,k as m,l}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.240 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{h as w,j as u,k as m,l}from"./chunk-C4MSUAGM.js";var p="sootsim:settings",v=["errorReporting","colorScheme","reduceMotion","a11yMode","a11yDepth","screenshotCanvas","screenshotBackground","screenshotText","screenshotPose","screenshotDynamicSize","alwaysShowLiveWebViews","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 b(){if(typeof window>"u")return null;let e=window.__sootsimSharedConfig;return e&&typeof e=="object"?e:null}function j(){let e=b()?.settings;return!e||typeof e!="object"?{}:g(e)}function D(e){if(!b())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 k(){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=k();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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.240 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import{createHash as b}from"node:crypto";import g from"node:fs";import{createRequire as R}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=R(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 S=["app.config.js","app.config.ts","app.config.cjs","app.config.mjs","app.json"];function w(t){for(let n of S)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 A(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)||A(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.CONTRAST_REPO_DIR,o=r?u.resolve(r):process.cwd();if(!r&&!_(o))return[];let e=[];if(r)A(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.CONTRAST_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 F=f.exp.plugins;if(Array.isArray(F)){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 N(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,N as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.240 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import{existsSync as A,mkdirSync as M,readFileSync as v,rmSync as f,writeFileSync as h}from"fs";import{tmpdir as w}from"os";import{dirname as B,join as U,resolve as V}from"path";import{execFileSync as b}from"child_process";import{readFileSync as _}from"fs";import{createRequire as y}from"module";var c=null,p=null;function m(r){c||(c=T());try{return c(r)}catch{return null}}function C(r){p||(p=O());try{return p(r)}catch{return null}}function O(){if(process.platform==="linux")return r=>{try{return _(`/proc/${r}/comm`,"utf8").trim()||null}catch{return null}};if(process.platform==="darwin"){let r=x();return r||F()}return()=>null}function T(){let r=Number(process.env.PPID);if(Number.isFinite(r)&&r>1&&r!==process.ppid)return()=>r;if(process.platform==="linux")return D();if(process.platform==="darwin"){let n=R();return n||k()}return()=>null}function D(){return r=>{try{let n=_(`/proc/${r}/stat`,"utf8"),t=n.lastIndexOf(")");if(t<0)return null;let e=n.slice(t+1).trim().split(/\s+/),i=Number(e[1]);return Number.isFinite(i)&&i>0?i:null}catch{return null}}}var g=3,l=216,P=16,S=48,L=16;function R(){if(!process.versions?.bun)return null;try{let r=y(import.meta.url),{dlopen:n,FFIType:t}=r("bun:ffi"),e=n("/usr/lib/libproc.dylib",{proc_pidinfo:{args:[t.i32,t.i32,t.u64,t.ptr,t.i32],returns:t.i32}}),i=Buffer.alloc(l);return o=>{if(Number(e.symbols.proc_pidinfo(o,g,0n,i,l))<=0)return null;let u=i.readUInt32LE(P);return u>0?u:null}}catch{return null}}function x(){if(!process.versions?.bun)return null;try{let r=y(import.meta.url),{dlopen:n,FFIType:t}=r("bun:ffi"),e=n("/usr/lib/libproc.dylib",{proc_pidinfo:{args:[t.i32,t.i32,t.u64,t.ptr,t.i32],returns:t.i32}}),i=Buffer.alloc(l);return o=>{if(Number(e.symbols.proc_pidinfo(o,g,0n,i,l))<=0)return null;let u=i.subarray(S,S+L),I=u.indexOf(0);return u.subarray(0,I<0?u.length:I).toString("utf8")||null}}catch{return null}}function F(){return r=>{try{let t=b("lsof",["-R","-p",String(r),"-d","cwd","-a"],{encoding:"utf8",timeout:2e3,stdio:["ignore","pipe","ignore"]}).split(`
|
|
3
3
|
`)[1];return t&&t.trim().split(/\s+/)[0]||null}catch{return null}}}function k(){return r=>{try{let t=b("lsof",["-R","-p",String(r),"-d","cwd","-a"],{encoding:"utf8",timeout:2e3,stdio:["ignore","pipe","ignore"]}).split(`
|
|
4
4
|
`)[1];if(!t)return null;let e=t.trim().split(/\s+/),i=Number(e[2]);return Number.isFinite(i)&&i>1?i:null}catch{return null}}}var d=1,N="SOOTSIM_CLI_CURRENT_SIM_PATH",W=["SOOTSIM_CLI_IDENTITY","AGENTBUS_SESSION","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"],$=/^(tmux|screen|agentbus)/i;function E(r,n=20){let t=r,e=m(r);if(!e||e<=1)return null;for(let i=0;i<n;i++){let o=C(e);if(o&&$.test(o))return t;let s=m(e);if(!s||s<=1)return e;t=e,e=s}return e}function Y(){for(let n of W){let t=process.env[n];if(t&&t.trim())return{key:`${n}:${t.trim()}`,source:n,stable:!0}}let r=E(process.ppid);return r&&r>1?{key:`gppid-${r}`,source:"grand-ppid",stable:!0}:{key:`pid-${process.ppid}`,source:"ppid",stable:!1}}function H(){return Y().key}function tr(){return E(process.ppid)}function a(){if(process.env[N])return V(process.env[N]);let r=H();return U(w(),`sootsim-current-sim-${r}.json`)}function J(){let r=a();if(!A(r))return null;try{let n=JSON.parse(v(r,"utf8"));return n.version!==d||typeof n.simId!="string"||!n.simId.trim()||typeof n.updatedAt!="string"?(f(r,{force:!0}),null):{version:d,simId:n.simId.trim(),updatedAt:n.updatedAt}}catch{return f(r,{force:!0}),null}}function nr(){return J()?.simId||null}function er(r){let n=r.trim();if(!n)return;let t=a();M(B(t),{recursive:!0}),h(t,JSON.stringify({version:d,simId:n,updatedAt:new Date().toISOString()},null,2)+`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.240 | (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,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{G as R,H as d,I as x,K as w,l as g,u as $,x as b}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.240 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{G as R,H as d,I as x,K as w,l as g,u as $,x as b}from"./chunk-WYT6JDAV.js";import{spawn as E}from"child_process";import k from"crypto";import o from"fs";import u from"path";import{Readable as C}from"stream";import{pipeline as T}from"stream/promises";var _="https://contrast.dev",U="SOOTSIM_CDN_ORIGIN",D="SOOTSIM_RUNTIME_CHANNEL",P="SOOTSIM_RUNTIME_VERSION",X="https://sootsim.com/changelog";function y(){try{let t=JSON.parse(o.readFileSync(b(),"utf8"));return t&&typeof t=="object"?t:{}}catch{return{}}}function f(t){let n=y();return(t||process.env[U]||n.cdnOrigin||_).replace(/\/+$/,"")}function S(t){let n=y();return t||process.env[D]||n.runtimeChannel||"stable"}function O(){let t=process.env[P];if(t&&t.trim())return t.trim();let n=y();return typeof n.runtimeVersion=="string"&&n.runtimeVersion.trim()?n.runtimeVersion.trim():null}function A(t){let n=new URL(`${f(t)}/runtimes/manifest.json`);return n.searchParams.set("t",String(Date.now())),n.toString()}function j(t,n){return`${f(n)}/runtimes/sootsim-runtime-${t}.tar.gz`}async function I(t){let n=A(t),r=await fetch(n,{headers:{Accept:"application/json"}});if(!r.ok)throw new Error(`manifest fetch failed: ${r.status} ${r.statusText} (${n})`);return await r.json()}function L(t,n={}){let r=S(n.channel),e=n.version||O()||t.channels[r]?.latest;if(!e)throw new Error(`no version specified and channel '${r}' has no latest entry in the manifest`);let s=t.versions[e];if(!s)throw new Error(`version ${e} not found in manifest; available: ${Object.keys(t.versions).slice(-10).join(", ")||"(none)"}`);return{version:e,channel:r,entry:s}}async function N(t={}){R();let n=f(t.cdnOrigin),r=await I(n),{version:e,channel:s,entry:i}=L(r,t),c=g(e),a=t.setActive!==!1;if(!t.force&&o.existsSync(u.join(c,"index.html")))return a&&x(e),{version:e,channel:s,cdnOrigin:n,runtimeDir:c,installed:!1,activated:a,manifest:r};let h=i.tarball||j(e,n),m=u.join($(),`sootsim-runtime-${e}.tar.gz`);process.stderr.write(`sootsim: downloading runtime ${e}\u2026
|
|
3
3
|
`),await F(h,m),process.stderr.write(`sootsim: extracting runtime ${e}\u2026
|
|
4
4
|
`);let v=await G(m);if(v!==i.sha256)throw o.rmSync(m,{force:!0}),new Error(`sha256 mismatch for runtime ${e}: expected ${i.sha256}, actual ${v}`);let l=u.join(u.dirname(c),`.installing-${e}-${process.pid}`);o.rmSync(l,{recursive:!0,force:!0}),o.mkdirSync(l,{recursive:!0});try{if(await H(m,l),!o.existsSync(u.join(l,"index.html")))throw new Error(`extracted tarball for runtime ${e} is missing index.html`);o.rmSync(c,{recursive:!0,force:!0}),o.renameSync(l,c)}catch(p){throw o.rmSync(l,{recursive:!0,force:!0}),p}return a&&x(e),{version:e,channel:s,cdnOrigin:n,runtimeDir:c,installed:!0,activated:a,manifest:r}}async function Y(t={}){R();let n=f(t.cdnOrigin),r=S(t.channel),e=O();if(e){let p=d(),V=o.existsSync(u.join(g(e),"index.html"));if(p===e&&V)return{checked:!0,updated:!1,reason:`runtime is pinned to ${e}`,activeVersion:p,latestVersion:e};let M=await N({version:e,channel:r,cdnOrigin:n,setActive:!1});return{checked:!0,updated:!0,reason:`runtime is pinned to ${e}`,activeVersion:e,latestVersion:e,install:M}}let s=await I(n),i=s.channels[r]?.latest;if(!i)return{checked:!0,updated:!1,reason:`channel '${r}' has no latest runtime`,activeVersion:d()};if(!s.versions[i])return{checked:!0,updated:!1,reason:`manifest is missing version ${i}`,activeVersion:d(),latestVersion:i};let a=d(),h=a?g(a):null,m=h?o.existsSync(u.join(h,"index.html")):!1;if(!(!a||!m||w(i,a)>0))return{checked:!0,updated:!1,reason:"active runtime is current",activeVersion:a,latestVersion:i};let l=await N({version:i,channel:r,cdnOrigin:n,setActive:!1});return{checked:!0,updated:!0,activeVersion:i,latestVersion:i,install:l}}async function Z(t={}){let n=d(),r=O();if(r)return{active:n,latest:r,pinned:r,outdated:n!==r};try{let e=await I(f(t.cdnOrigin)),s=S(t.channel),i=e.channels[s]?.latest??null,c=!!(i&&(!n||w(i,n)>0));return{active:n,latest:i,pinned:null,outdated:c}}catch{return{active:n,latest:null,pinned:null,outdated:!1}}}async function F(t,n){let r=await fetch(t);if(!r.ok||!r.body)throw new Error(`download failed: ${r.status} ${r.statusText} (${t})`);o.mkdirSync(u.dirname(n),{recursive:!0});let e=`${n}.partial`;try{await T(C.fromWeb(r.body),o.createWriteStream(e)),o.renameSync(e,n)}catch(s){try{o.unlinkSync(e)}catch{}throw s}}function G(t){return new Promise((n,r)=>{let e=k.createHash("sha256"),s=o.createReadStream(t);s.on("data",i=>e.update(i)),s.on("error",r),s.on("end",()=>n(e.digest("hex")))})}function H(t,n){return new Promise((r,e)=>{let s=E("tar",["-xzf",t,"-C",n],{stdio:["ignore","inherit","inherit"]});s.on("error",e),s.on("exit",i=>{i===0?r():e(new Error(`tar exited with code ${i}`))})})}export{_ as a,X as b,f as c,S as d,O as e,I as f,N as g,Y as h,Z as i};
|