sootsim 0.1.182 → 0.1.184
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 +23 -18
- package/dist-cli/bin.js +6 -6
- package/dist-cli/chunks/{agent-JVF4KRD5.js → agent-KSX5D27X.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-4ZCPWILQ.js → agent-wrapper-MS6TJF5Y.js} +2 -2
- package/dist-cli/chunks/{app-fonts-7MTZNQJN.js → app-fonts-HHN6X2VJ.js} +2 -2
- package/dist-cli/chunks/{assert-QUII5KZD.js → assert-XHVSQZOE.js} +2 -2
- package/dist-cli/chunks/beta-JS4JTDFC.js +2 -0
- package/dist-cli/chunks/{camera-6OPDZY3P.js → camera-7L7D4XUO.js} +2 -2
- package/dist-cli/chunks/chunk-3KK3YZQ3.js +62 -0
- package/dist-cli/chunks/{chunk-6UEE5SGS.js → chunk-3S5BOWO5.js} +1 -1
- package/dist-cli/chunks/{chunk-NAZ6A4UL.js → chunk-53KKDNCU.js} +1 -1
- package/dist-cli/chunks/{chunk-PP7PACYK.js → chunk-6GC57KRY.js} +2 -2
- package/dist-cli/chunks/{chunk-UPXGNI3W.js → chunk-6MPD3QXA.js} +1 -1
- package/dist-cli/chunks/{chunk-TM22UZS6.js → chunk-7C6RC3BU.js} +2 -2
- package/dist-cli/chunks/{chunk-RYITW4MR.js → chunk-7DHLNDOA.js} +1 -1
- package/dist-cli/chunks/{chunk-RQO5HYDO.js → chunk-7DKGX746.js} +2 -2
- package/dist-cli/chunks/{chunk-E7COXON3.js → chunk-AKQWG57K.js} +2 -2
- package/dist-cli/chunks/chunk-BB432MX4.js +1 -0
- package/dist-cli/chunks/{chunk-KTBP6IDE.js → chunk-C3WRMMUM.js} +2 -2
- package/dist-cli/chunks/{chunk-S2RJCI3F.js → chunk-FAB5CDE7.js} +3 -3
- package/dist-cli/chunks/{chunk-7VU3YG3I.js → chunk-FD4BKULK.js} +2 -2
- package/dist-cli/chunks/{chunk-6BSBIS6H.js → chunk-ID25RWPE.js} +1 -1
- package/dist-cli/chunks/{chunk-QOOBQ6HM.js → chunk-IG7F7DTQ.js} +1 -1
- package/dist-cli/chunks/{chunk-UNQ4TTPS.js → chunk-IHH3JCV5.js} +1 -1
- package/dist-cli/chunks/{chunk-K5XREVFN.js → chunk-IZMNFZXZ.js} +1 -1
- package/dist-cli/chunks/{chunk-4J2BNSK5.js → chunk-JFCJIRX6.js} +1 -1
- package/dist-cli/chunks/{chunk-DHALDKJR.js → chunk-M6RZYHFK.js} +2 -2
- package/dist-cli/chunks/chunk-MFL73VJG.js +2 -0
- package/dist-cli/chunks/{chunk-KNMWUV5H.js → chunk-MXXD5U6B.js} +2 -2
- package/dist-cli/chunks/{chunk-Q75UTFKH.js → chunk-N5LA5G7V.js} +2 -2
- package/dist-cli/chunks/{chunk-Q663VZYT.js → chunk-NBF2SXAH.js} +4 -4
- package/dist-cli/chunks/{chunk-2CLPGOAC.js → chunk-NWNFGZSI.js} +2 -2
- package/dist-cli/chunks/{chunk-U3O67O6Z.js → chunk-OGLOOKK6.js} +1 -1
- package/dist-cli/chunks/{chunk-RCRWF4N5.js → chunk-Q2S6VBXK.js} +1 -1
- package/dist-cli/chunks/{chunk-GGIATYOM.js → chunk-Q6EHTP4Q.js} +1 -1
- package/dist-cli/chunks/{chunk-NIWZJV5W.js → chunk-QQ4JDVR6.js} +2 -2
- package/dist-cli/chunks/{chunk-XHHL3CXD.js → chunk-QZW44BMW.js} +1 -1
- package/dist-cli/chunks/{chunk-ZOPFNFMP.js → chunk-S5XWFD5C.js} +2 -2
- package/dist-cli/chunks/{chunk-LSVJ3NND.js → chunk-T4XAQ7VQ.js} +2 -2
- package/dist-cli/chunks/{chunk-YOV2FYD5.js → chunk-T5YWTSGG.js} +2 -2
- package/dist-cli/chunks/{chunk-ENBC2CBL.js → chunk-U636Z2JZ.js} +2 -2
- package/dist-cli/chunks/{chunk-BI3LQWFJ.js → chunk-V36X7TNR.js} +1 -1
- package/dist-cli/chunks/chunk-VGTPGXKM.js +1 -0
- package/dist-cli/chunks/chunk-VVACMCCE.js +118 -0
- package/dist-cli/chunks/{chunk-5NWXOIKZ.js → chunk-WAZCQ5UO.js} +3 -3
- package/dist-cli/chunks/{chunk-QE5SNIDX.js → chunk-WDMIABUY.js} +30 -30
- package/dist-cli/chunks/chunk-WLDAMCQK.js +13 -0
- package/dist-cli/chunks/{chunk-LMP3GS2H.js → chunk-WMLFWLD7.js} +1 -1
- package/dist-cli/chunks/{chunk-USRV336W.js → chunk-WNUF6LJX.js} +2 -2
- package/dist-cli/chunks/{chunk-HVCUXVTL.js → chunk-WSN7MF4E.js} +2 -2
- package/dist-cli/chunks/{chunk-MWREISAE.js → chunk-XSWATK6S.js} +2 -2
- package/dist-cli/chunks/{chunk-J4G763OR.js → chunk-YQNX7JK6.js} +2 -2
- package/dist-cli/chunks/{chunk-YBJAGDCL.js → chunk-YYS2ITHH.js} +1 -1
- package/dist-cli/chunks/cli-version-L6NDSEVW.js +2 -0
- package/dist-cli/chunks/{compat-X3LHC4W2.js → compat-EGXOXW5F.js} +3 -3
- package/dist-cli/chunks/control-LUH3EQQG.js +2 -0
- package/dist-cli/chunks/{cpu-profile-LIQOLCAT.js → cpu-profile-7LF5VVWE.js} +2 -2
- package/dist-cli/chunks/daemon-NGDXMG6R.js +2 -0
- package/dist-cli/chunks/{debug-QHYRAXS7.js → debug-3J74TASS.js} +3 -3
- package/dist-cli/chunks/{detox-46I6X6WF.js → detox-PHLGST7G.js} +2 -2
- package/dist-cli/chunks/{device-OBGFMETI.js → device-CBGLBSS6.js} +2 -2
- package/dist-cli/chunks/{diagnose-2LVRWQTE.js → diagnose-BXUHKEVI.js} +2 -2
- package/dist-cli/chunks/drivers-QX77DPCG.js +2 -0
- package/dist-cli/chunks/{electron-6XS5Z44T.js → electron-UYJPUPAG.js} +4 -3
- package/dist-cli/chunks/flow-KDVDRUEN.js +2 -0
- package/dist-cli/chunks/help-4L6UVSAZ.js +2 -0
- package/dist-cli/chunks/{hints-JPD3DTKW.js → hints-7A4UIZZL.js} +2 -2
- package/dist-cli/chunks/{home-paths-64XGV6LX.js → home-paths-THYEF54Y.js} +2 -2
- package/dist-cli/chunks/{inspect-AFCVLO3G.js → inspect-QULPTQ5V.js} +13 -13
- package/dist-cli/chunks/{install-desktop-PVTWRZ2P.js → install-desktop-X7G7VTBV.js} +4 -4
- package/dist-cli/chunks/{keys-LHFQNKA4.js → keys-JLP4YC4T.js} +2 -2
- package/dist-cli/chunks/{login-442SXS7W.js → login-VB4HG5WR.js} +4 -4
- package/dist-cli/chunks/{logout-QRS2CU5B.js → logout-TIVYUTTD.js} +2 -2
- package/dist-cli/chunks/{maestro-33I2FVO2.js → maestro-C2WVLDFM.js} +2 -2
- package/dist-cli/chunks/optional-demo-registry-WV2BZJ5T.js +2 -0
- package/dist-cli/chunks/{preview-Y4NIE6DT.js → preview-YBV54B2S.js} +2 -2
- package/dist-cli/chunks/{profile-6B63XSO4.js → profile-67C256LQ.js} +2 -2
- package/dist-cli/chunks/{react-CTZDC5J4.js → react-HJ3WPDNO.js} +2 -2
- package/dist-cli/chunks/{record-FCX5NSPY.js → record-FD4QYCBW.js} +2 -2
- package/dist-cli/chunks/runtime-BY3EB4G7.js +2 -0
- package/dist-cli/chunks/{screenshot-MZU3WMZX.js → screenshot-UTVYF7F4.js} +2 -2
- package/dist-cli/chunks/{screenshot-mode-IFIJCGY4.js → screenshot-mode-WPSK6REL.js} +2 -2
- package/dist-cli/chunks/{screenshots-DLBGZB3H.js → screenshots-OXRAQXWN.js} +2 -2
- package/dist-cli/chunks/{screenshots-capture-XDIENEIZ.js → screenshots-capture-KDNNRKDL.js} +2 -2
- package/dist-cli/chunks/{serve-EQROWG7B.js → serve-ZKEXM2U5.js} +2 -2
- package/dist-cli/chunks/setup-A5RLMR3I.js +97 -0
- package/dist-cli/chunks/{skills-HIYKCNT5.js → skills-FSJFEKNP.js} +2 -2
- package/dist-cli/chunks/{slides-YCSSVMRF.js → slides-UU3DFZDY.js} +2 -2
- package/dist-cli/chunks/store-TZH6LKFH.js +2 -0
- package/dist-cli/chunks/telemetry-AHIQ3SS5.js +2 -0
- package/dist-cli/chunks/{telemetry-QYQZR3XG.js → telemetry-TOTJDY6O.js} +2 -2
- package/dist-cli/chunks/{test-EA5OUQZJ.js → test-D6T7Z4XS.js} +3 -3
- package/dist-cli/chunks/{three-mode-PNIMEW5B.js → three-mode-CAKEPRJQ.js} +2 -2
- package/dist-cli/chunks/{timeline-FJRCFCJG.js → timeline-D6NKNKNS.js} +2 -2
- package/dist-cli/chunks/upgrade-DBT6E6DD.js +4 -0
- package/dist-cli/chunks/upload-JR2B3YT7.js +2 -0
- package/dist-cli/chunks/{version-UIBJN43T.js → version-4PLJ73Q3.js} +2 -2
- package/dist-cli/chunks/{web-5QNTEXZD.js → web-O6QWIX3V.js} +2 -2
- package/dist-cli/chunks/{what-happened-XNHLVLK2.js → what-happened-67DBMM4S.js} +2 -2
- package/dist-cli/chunks/{whoami-YSWN3MZU.js → whoami-PSQRCMUL.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 +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +1 -1
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +29 -7
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/scripts/postinstall.cjs +1 -1
- package/skills/soot.md +3 -2
- package/skills/sootsim-setup.md +7 -6
- package/dist-cli/chunks/beta-DSVWVBUT.js +0 -2
- package/dist-cli/chunks/chunk-5TEBVNSH.js +0 -62
- package/dist-cli/chunks/chunk-CWUQZGDS.js +0 -118
- package/dist-cli/chunks/chunk-EPYUJWRX.js +0 -13
- package/dist-cli/chunks/chunk-GOXGNGTF.js +0 -1
- package/dist-cli/chunks/chunk-IKIHQ4RB.js +0 -1
- package/dist-cli/chunks/chunk-WTKLDWWH.js +0 -2
- package/dist-cli/chunks/cli-version-IHTGZWXG.js +0 -2
- package/dist-cli/chunks/control-JO3KISFJ.js +0 -2
- package/dist-cli/chunks/daemon-72F26UYR.js +0 -2
- package/dist-cli/chunks/drivers-2SW6KTMT.js +0 -2
- package/dist-cli/chunks/flow-DYLR2KXX.js +0 -2
- package/dist-cli/chunks/help-KHTYNHBI.js +0 -2
- package/dist-cli/chunks/optional-demo-registry-674KCCRU.js +0 -2
- package/dist-cli/chunks/runtime-OQSESXYD.js +0 -2
- package/dist-cli/chunks/setup-4VOKFGMB.js +0 -77
- package/dist-cli/chunks/store-MVQYU3TC.js +0 -2
- package/dist-cli/chunks/telemetry-RUW7S4RI.js +0 -2
- package/dist-cli/chunks/upgrade-52W5H3YL.js +0 -4
- package/dist-cli/chunks/upload-BWIBZC7S.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{C as N,D as F,F as y,Q as T,R as b,S}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{C as N,D as F,F as y,Q as T,R as b,S}from"./chunk-7DHLNDOA.js";import{c as A,e as _}from"./chunk-7C6RC3BU.js";import"./chunk-Q2S6VBXK.js";import{b as k}from"./chunk-V36X7TNR.js";import"./chunk-53KKDNCU.js";import"./chunk-IHH3JCV5.js";function O(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--since"&&e+1<n.length){t.push(e,e+1);let s=n[e+1].trim(),l=/^(\d+(?:\.\d+)?)(ms|s|m)?$/.exec(s);if(l){let r=Number(l[1]),u=l[2]??"ms",v=u==="s"?r*1e3:u==="m"?r*6e4:r;return{since:Date.now()-v,consumed:t}}let i=Number(s);if(Number.isFinite(i)&&i>1e12)return{since:i,consumed:t}}return{consumed:t}}function B(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--kinds"&&e+1<n.length)return t.push(e,e+1),{kinds:n[e+1].split(",").map(s=>s.trim()).filter(Boolean),consumed:t};return{consumed:t}}function D(n){let t=[];for(let e=0;e<n.length;e++)if(n[e]==="--limit"&&e+1<n.length){t.push(e,e+1);let s=Number(n[e+1]);if(Number.isFinite(s)&&s>0)return{limit:s,consumed:t}}return{consumed:t}}function x(n){let t=[],e={label:"initial state",events:[],startedAt:n[0]?.t??null};t.push(e);for(let s of n)if(e.events.push(s),s.kind==="screen"||s.kind==="route"){let l=s.data,i=l?.phase;if(!i||i==="enter"||i==="appear"||i==="active"){let r=l?.name||l?.activeName||l?.path||l?.pathname||s.kind;t.length===1&&e.events.length===1?e.label=`${s.kind}: ${r}`:(e={label:`${s.kind}: ${r}`,events:[],startedAt:s.t},t.push(e))}}return t}async function J(n,t){let e=A(n,{port:t.port,stripBooleanFlags:["--summary","--all","--json","--no-advance","--help","-h","--flow","--noisy"],stripValueFlags:["--since","--kinds","--limit"]});(n.includes("--help")||n.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim what-happened \u2014 show recent events from the semantic timeline
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{d as i}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{d as i}from"./chunk-6GC57KRY.js";import{d as n}from"./chunk-N5LA5G7V.js";import"./chunk-53KKDNCU.js";import"./chunk-IHH3JCV5.js";async function u(){let o=i();if(o||(console.log(" not signed in"),console.log(" set SOOTSIM_API_KEY=sk_sootsim_\u2026 or run `sootsim login`"),process.exit(1)),o.kind==="api-key"){let r=`${o.secret.slice(0,14)}\u2026`,t=o.source==="env"?"SOOTSIM_API_KEY env var":"saved key (~/.config/sootsim/credentials.json)";console.log(` api key ${r}`),console.log(` source: ${t}`);return}if(o.kind==="github"){console.log(` github token (${o.source})`),console.log(` repo: ${o.repoId}`);return}let e=await n(),s=e?.user;console.log(` ${s?.email||s?.name||s?.id||"signed in"}`),console.log(` origin: ${e?.origin??o.origin}`),e?.updatedAt&&console.log(` updated: ${e.updatedAt}`)}export{u as runWhoami};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/beta.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/beta.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/config.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/detox/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/home-paths.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/host/fetch-proxy-overrides.ts
|
|
4
4
|
var FETCH_PROXY_BROWSER_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/menu.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/menu.mjs
CHANGED
package/dist-lib/metro.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/dist-lib/profiles.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/dist-lib/render-mode.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/dist-lib/sdk.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/sdk.mjs
CHANGED
package/dist-lib/skills.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -16786,6 +16786,7 @@ var init_bridge_flow_runner = __esm({
|
|
|
16786
16786
|
recordingAccessChecked = false;
|
|
16787
16787
|
recordingStartedAtMs = null;
|
|
16788
16788
|
lastRecordingDurationMs = null;
|
|
16789
|
+
lastVisualSettledAtMs = 0;
|
|
16789
16790
|
simRouteHint = null;
|
|
16790
16791
|
// set by runStep when a step throws — lets the outer flow command
|
|
16791
16792
|
// dump a rich per-step failure bundle (screenshot + describe.json +
|
|
@@ -17382,11 +17383,13 @@ var init_bridge_flow_runner = __esm({
|
|
|
17382
17383
|
);
|
|
17383
17384
|
}
|
|
17384
17385
|
async takeScreenshot(step) {
|
|
17385
|
-
|
|
17386
|
-
|
|
17387
|
-
|
|
17386
|
+
if (!this.hasFreshVisualSettle()) {
|
|
17387
|
+
try {
|
|
17388
|
+
await this.waitForVisualSettle();
|
|
17389
|
+
await sleep(250);
|
|
17390
|
+
} catch {
|
|
17391
|
+
}
|
|
17388
17392
|
}
|
|
17389
|
-
await sleep(250);
|
|
17390
17393
|
const spec = normalizeFlowScreenshotSpec(step);
|
|
17391
17394
|
const outputPath = resolveFlowScreenshotPathWithMode(
|
|
17392
17395
|
this.opts.screenshotDir,
|
|
@@ -17662,7 +17665,17 @@ var init_bridge_flow_runner = __esm({
|
|
|
17662
17665
|
}
|
|
17663
17666
|
}
|
|
17664
17667
|
async waitForAnimationToEnd(timeoutMs = 2e3) {
|
|
17665
|
-
|
|
17668
|
+
const maxMs = Math.max(0, Math.round(timeoutMs));
|
|
17669
|
+
if (maxMs <= 0) return;
|
|
17670
|
+
const result = await waitForSootsimIdle({
|
|
17671
|
+
bridge: this.bridge,
|
|
17672
|
+
simId: this.opts.simId,
|
|
17673
|
+
maxMs,
|
|
17674
|
+
pollMs: 32,
|
|
17675
|
+
stablePolls: 2,
|
|
17676
|
+
strict: true
|
|
17677
|
+
});
|
|
17678
|
+
if (result.settled) this.markVisualSettled();
|
|
17666
17679
|
}
|
|
17667
17680
|
async back() {
|
|
17668
17681
|
try {
|
|
@@ -17787,10 +17800,18 @@ var init_bridge_flow_runner = __esm({
|
|
|
17787
17800
|
})
|
|
17788
17801
|
})
|
|
17789
17802
|
})`);
|
|
17803
|
+
this.markVisualSettled();
|
|
17790
17804
|
} catch {
|
|
17791
17805
|
await sleep(180);
|
|
17806
|
+
this.markVisualSettled();
|
|
17792
17807
|
}
|
|
17793
17808
|
}
|
|
17809
|
+
markVisualSettled() {
|
|
17810
|
+
this.lastVisualSettledAtMs = Date.now();
|
|
17811
|
+
}
|
|
17812
|
+
hasFreshVisualSettle() {
|
|
17813
|
+
return Date.now() - this.lastVisualSettledAtMs < 750;
|
|
17814
|
+
}
|
|
17794
17815
|
async startProfile() {
|
|
17795
17816
|
await this.evaluate(`((sessionKey) => {
|
|
17796
17817
|
const perf = window.__sootsimPerf
|
|
@@ -18099,8 +18120,9 @@ var init_bridge_flow_runner = __esm({
|
|
|
18099
18120
|
} else if (step.pinch) {
|
|
18100
18121
|
await this.pinch(step.pinch);
|
|
18101
18122
|
} else if (step.waitForAnimationToEnd) {
|
|
18123
|
+
const waitSpec = step.waitForAnimationToEnd;
|
|
18102
18124
|
await this.waitForAnimationToEnd(
|
|
18103
|
-
typeof
|
|
18125
|
+
typeof waitSpec === "number" ? waitSpec : typeof waitSpec === "object" && typeof waitSpec.timeout === "number" ? waitSpec.timeout : 2e3
|
|
18104
18126
|
);
|
|
18105
18127
|
} else if (step.back) {
|
|
18106
18128
|
await this.back();
|
package/dist-lib/vite.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.184 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/package.json
CHANGED
package/scripts/postinstall.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// postinstall — best-effort runtime install after
|
|
2
|
+
// postinstall — best-effort runtime install after npm/npx fetches sootsim.
|
|
3
3
|
//
|
|
4
4
|
// runs as a child of npm. failures here are non-fatal; setup/open/runtime
|
|
5
5
|
// commands can install the runtime later.
|
package/skills/soot.md
CHANGED
|
@@ -53,13 +53,14 @@ automation, inspecting the render tree, and managing sims.
|
|
|
53
53
|
| `sootsim diagnose` | composed read commands for "what just went wrong?" |
|
|
54
54
|
| `sootsim timeline` | control the semantic event timeline (enable opt-in kinds, clear, dump) |
|
|
55
55
|
| `sootsim open` | load a target into the current sim or open a new one |
|
|
56
|
+
| `sootsim link` | dispatch a React Native deep link into the current app |
|
|
56
57
|
| `sootsim list` | list connected sims or available launch drivers |
|
|
57
58
|
| `sootsim use` | select a connected sim |
|
|
58
59
|
| `sootsim skill` | install and inspect bundled SootSim agent skills |
|
|
59
60
|
| `sootsim claim` | take an exclusive lease on a sim |
|
|
60
61
|
| `sootsim agent` | attached projects + local agent sessions (codex/claude) |
|
|
61
62
|
| `sootsim close` | close a connected sim |
|
|
62
|
-
| `sootsim setup` |
|
|
63
|
+
| `sootsim setup` | bootstrap SootSim, then install the global CLI |
|
|
63
64
|
| `sootsim compat` | check package compatibility (alias: scan) |
|
|
64
65
|
| `sootsim electron` | launch the desktop companion |
|
|
65
66
|
| `sootsim daemon` | manage the sootsim bridge as a login agent |
|
|
@@ -103,7 +104,7 @@ skills for working with the SootSim native preview engine:
|
|
|
103
104
|
| skill | description |
|
|
104
105
|
| --- | --- |
|
|
105
106
|
| `/sootsim-debug` | Debug rendering, animation, gesture, performance, and accessibility issues in a React Native app running under sootsim. Reach for this whenever an animation looks wrong (janky, stutters, snaps, only updates once, or doesn't move at all), a swipe/transition/gesture misbehaves or feels broken, scrolling drops frames or feels slow, the UI renders the wrong tree/props, or a screen reader can't reach something — and drive the sootsim CLI debug tooling first, not screenshots or ad-hoc logging. |
|
|
106
|
-
| `/sootsim-setup` | Get sootsim connected to your React Native app — from `
|
|
107
|
+
| `/sootsim-setup` | Get sootsim connected to your React Native app — from `sootsim setup` to a driveable sim |
|
|
107
108
|
| `/sootsim-test` | Run automated tests against your React Native app under sootsim — native YAML flows, Maestro drop-in, or Detox drop-in |
|
|
108
109
|
| `/sootsim-visual` | Pixel-level rendering comparison between sootsim and native iOS — fonts, gradients, shadows, image fidelity |
|
|
109
110
|
|
package/skills/sootsim-setup.md
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sootsim-setup
|
|
3
|
-
description: Get sootsim connected to your React Native app — from `
|
|
3
|
+
description: Get sootsim connected to your React Native app — from `sootsim setup` to a driveable sim
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# sootsim setup
|
|
7
7
|
|
|
8
|
-
you
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
you want to drive a React Native app with SootSim from the CLI. this skill
|
|
9
|
+
takes you from `sootsim setup` to a connected, pinned sim that every other
|
|
10
|
+
sootsim skill assumes exists. no per-app SootSim install is required. if
|
|
11
|
+
`sootsim describe` already
|
|
11
12
|
returns a tree, you're past this skill — load `/sootsim-debug` for
|
|
12
13
|
debugging or `/sootsim-test` for writing tests.
|
|
13
14
|
|
|
@@ -26,7 +27,7 @@ debugging or `/sootsim-test` for writing tests.
|
|
|
26
27
|
## first move
|
|
27
28
|
|
|
28
29
|
```sh
|
|
29
|
-
sootsim setup # one-time
|
|
30
|
+
sootsim setup # one-time guided setup; installs daemon
|
|
30
31
|
sootsim open 8081 # load a metro/expo dev server
|
|
31
32
|
sootsim list # confirm exactly one sim is reachable
|
|
32
33
|
sootsim use <id> # pin it for the rest of the workflow
|
|
@@ -38,7 +39,7 @@ the detected dev servers. for hosted or unusual targets, pass the URL
|
|
|
38
39
|
explicitly:
|
|
39
40
|
|
|
40
41
|
```sh
|
|
41
|
-
sootsim open 8081
|
|
42
|
+
sootsim open 8081 # load a metro dev server
|
|
42
43
|
sootsim open https://my-app.local # load a hosted bundle
|
|
43
44
|
```
|
|
44
45
|
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.182 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import{a as C,b as _}from"./chunk-J4G763OR.js";import{c as R}from"./chunk-2CLPGOAC.js";import{g as T,j as E,r as N,s as b,t as B}from"./chunk-NAZ6A4UL.js";import{a as Y}from"./chunk-UNQ4TTPS.js";import{execFileSync as tt,spawnSync as s}from"child_process";import{existsSync as c,mkdirSync as x,readFileSync as et,rmSync as $,writeFileSync as M}from"fs";import{homedir as D}from"os";import{dirname as j,resolve as f}from"path";import{execFileSync as G}from"child_process";import{chmodSync as W,mkdirSync as P,rmSync as K,writeFileSync as L}from"fs";import{dirname as A}from"path";var X="dev.sootsim.daemon",U="SootSim Daemon",O="0.1.36";function F(t,e,r){let o=b(),n=B(),a=A(A(n)),l=A(n),u=`${a}/Resources`;K(o,{recursive:!0,force:!0}),P(N(),{recursive:!0}),P(l,{recursive:!0}),P(u,{recursive:!0}),L(`${a}/Info.plist`,Q()),L(`${a}/PkgInfo`,"APPL????"),L(n,z(t,e,r)),W(n,493);try{G("codesign",["--force","--sign","-","--deep",o],{stdio:"pipe"})}catch(i){let p=i instanceof Error?i.message:String(i);console.warn(` warning: ad-hoc codesign of ${o} failed: ${p}
|
|
3
|
-
the daemon will still run, but Login Items may show a generic name.`)}return{bundlePath:o,launcherPath:n}}function Q(){return`<?xml version="1.0" encoding="UTF-8"?>
|
|
4
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
5
|
-
<plist version="1.0">
|
|
6
|
-
<dict>
|
|
7
|
-
<key>CFBundleDevelopmentRegion</key><string>en</string>
|
|
8
|
-
<key>CFBundleDisplayName</key><string>${U}</string>
|
|
9
|
-
<key>CFBundleExecutable</key><string>sootsim-daemon</string>
|
|
10
|
-
<key>CFBundleIdentifier</key><string>${X}</string>
|
|
11
|
-
<key>CFBundleInfoDictionaryVersion</key><string>6.0</string>
|
|
12
|
-
<key>CFBundleName</key><string>${U}</string>
|
|
13
|
-
<key>CFBundlePackageType</key><string>APPL</string>
|
|
14
|
-
<key>CFBundleShortVersionString</key><string>${O}</string>
|
|
15
|
-
<key>CFBundleSignature</key><string>????</string>
|
|
16
|
-
<key>CFBundleVersion</key><string>${O}</string>
|
|
17
|
-
<key>LSBackgroundOnly</key><true/>
|
|
18
|
-
<key>LSUIElement</key><true/>
|
|
19
|
-
<key>LSMinimumSystemVersion</key><string>13.0</string>
|
|
20
|
-
<key>NSHumanReadableCopyright</key><string>Tamagui LLC</string>
|
|
21
|
-
</dict>
|
|
22
|
-
</plist>
|
|
23
|
-
`}function z(t,e,r){let n=[t.executable,...t.prefixArgs,"serve","--quiet","--port",String(e)].map(J).join(" ");return`#!/bin/sh
|
|
24
|
-
# SootSim Daemon launcher \u2014 auto-generated by 'sootsim setup'.
|
|
25
|
-
# launchd spawns this; we exec the real sootsim invocation in place so
|
|
26
|
-
# launchd tracks the daemon process, not the shell wrapper.
|
|
27
|
-
#
|
|
28
|
-
# stdout: ${r.stdout}
|
|
29
|
-
# stderr: ${r.stderr}
|
|
30
|
-
exec ${n}
|
|
31
|
-
`}function J(t){return`'${t.replace(/'/g,"'\\''")}'`}var q=60,y="dev.sootsim.daemon",m="sootsim-daemon",g=f(D(),"Library/Logs/sootsim"),v=f(D(),".local/state/sootsim");async function Tt(t,e={}){let[r,...o]=t,n=e.port??7668;if(!r||r==="--help"||r==="-h"){V();return}new Set(["uninstall","restart","start","stop","logs"]).has(r)&&C({event:`daemon_${r}`,properties:{platform:process.platform,subsource:"daemon"}});try{switch(r){case"uninstall":return await ut();case"status":return await pt();case"restart":return await dt();case"start":return await mt();case"stop":return await gt();case"logs":return await ft(o);default:console.error(` unknown daemon subcommand: ${r}`),V(),process.exit(1)}}finally{await _()}}function V(){R("daemon")}function rt(){let t=ot();return{executable:process.execPath,prefixArgs:[t]}}function ot(){try{let e=tt("which",["sootsim"],{encoding:"utf8"}).trim();if(e&&c(e))return H(e)}catch{}let t=process.argv[1];if(t&&c(t))return H(t);throw new Error("could not locate the sootsim binary")}function H(t){try{return Y("fs").realpathSync(t)}catch{return t}}function nt(t,e){x(g,{recursive:!0});let r=f(g,"bridge.out.log"),o=f(g,"bridge.err.log"),{launcherPath:n}=F(t,e,{stdout:r,stderr:o}),a=` <string>${it(n)}</string>`;return`<?xml version="1.0" encoding="UTF-8"?>
|
|
32
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
33
|
-
<plist version="1.0">
|
|
34
|
-
<dict>
|
|
35
|
-
<key>Label</key><string>${y}</string>
|
|
36
|
-
<key>ProgramArguments</key>
|
|
37
|
-
<array>
|
|
38
|
-
${a}
|
|
39
|
-
</array>
|
|
40
|
-
<key>RunAtLoad</key><true/>
|
|
41
|
-
<key>KeepAlive</key><true/>
|
|
42
|
-
<key>ThrottleInterval</key><integer>${q}</integer>
|
|
43
|
-
<key>ProcessType</key><string>Background</string>
|
|
44
|
-
<key>StandardOutPath</key><string>${r}</string>
|
|
45
|
-
<key>StandardErrorPath</key><string>${o}</string>
|
|
46
|
-
</dict>
|
|
47
|
-
</plist>
|
|
48
|
-
`}function st(t,e){return x(v,{recursive:!0}),`[Unit]
|
|
49
|
-
Description=sootsim bridge daemon
|
|
50
|
-
After=default.target
|
|
51
|
-
|
|
52
|
-
[Service]
|
|
53
|
-
Type=simple
|
|
54
|
-
ExecStart=${[t.executable,...t.prefixArgs].map(at).join(" ")} serve --quiet --port ${e}
|
|
55
|
-
Restart=always
|
|
56
|
-
RestartSec=${q}
|
|
57
|
-
|
|
58
|
-
[Install]
|
|
59
|
-
WantedBy=default.target
|
|
60
|
-
`}function it(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function at(t){return/[^\w@%+=:,./-]/.test(t)?`'${t.replace(/'/g,"'\\''")}'`:t}function S(){return f(D(),"Library/LaunchAgents",`${y}.plist`)}function w(){return f(D(),".config/systemd/user",`${m}.service`)}function Nt(){if(E())return{supported:!1,installed:!1};if(process.platform==="darwin"){let t=S();return{supported:!0,installed:c(t),path:t}}if(process.platform==="linux"){let t=w();return{supported:!0,installed:c(t),path:t}}return{supported:!1,installed:!1}}async function Bt({port:t,force:e}){if(E())throw new Error("background daemon setup is unavailable in this environment");let r=rt();if(console.log(` binary: ${[r.executable,...r.prefixArgs].join(" ")}`),console.log(` port: ${t}`),process.platform==="darwin"){let o=S();if(c(o)&&!e){console.log(` already installed at ${o}`),console.log(" pass --force to overwrite, or use 'sootsim daemon restart' to reload");return}x(j(o),{recursive:!0}),M(o,nt(r,t)),console.log(` wrote ${o}`);let n=`gui/${process.getuid()}`,a=`${n}/${y}`,l=()=>{let d=s("launchctl",["bootstrap",n,o],{stdio:"pipe",encoding:"utf8"}),k=(d.stderr||d.stdout||"").trim();if(d.status!==0)return{ok:!1,reason:`bootstrap exit ${d.status}${k?`: ${k}`:""}`};let I=s("launchctl",["print",a],{encoding:"utf8"});return I.status!==0?{ok:!1,reason:`bootstrap returned 0 but service not registered (print exit ${I.status})`}:{ok:!0}},u=l();if(!u.ok){let d=u.reason;if(s("launchctl",["bootout",a],{stdio:"ignore"}),u=l(),!u.ok)throw new Error(`launchctl bootstrap failed: ${u.reason}`+(d!==u.reason?` (initial: ${d})`:"")+" \u2014 try `sootsim daemon uninstall` then retry, or reboot if launchd state is stuck.")}let i=Date.now()+4e3,p,h;for(;Date.now()<i;){let d=s("launchctl",["print",a],{encoding:"utf8"});if(d.status===0&&(p=d.stdout?.match(/state\s*=\s*(\w+)/)?.[1],h=d.stdout?.match(/pid\s*=\s*(\d+)/)?.[1],p==="running"||h))break;await new Promise(k=>setTimeout(k,150))}if(p!=="running"&&!h)throw new Error(`daemon registered but did not reach running state within 4s (last state: ${p||"unknown"}). check ${f(g,"bridge.err.log")} \u2014 typically a stale runtime or a port already bound by another process.`);console.log(` registered (state: ${p||"unknown"}${h?`, pid ${h}`:""}, log: ${f(g,"bridge.err.log")})`);return}if(process.platform==="linux"){let o=w();if(c(o)&&!e){console.log(` already installed at ${o}`),console.log(" pass --force to overwrite, or use 'sootsim daemon restart' to reload");return}x(j(o),{recursive:!0}),M(o,st(r,t)),console.log(` wrote ${o}`);let n=s("systemctl",["--user","daemon-reload"],{stdio:"pipe",encoding:"utf8"});if(n.status!==0){let i=(n.stderr||n.stdout||"").trim();throw new Error(`systemctl daemon-reload failed${i?`: ${i}`:""}`)}let a=s("systemctl",["--user","enable","--now",m],{stdio:"pipe",encoding:"utf8"});if(a.status!==0){let i=(a.stderr||a.stdout||"").trim();throw new Error(`systemctl enable --now failed${i?`: ${i}`:""} \u2014 try \`sootsim daemon uninstall\` then retry.`)}let u=(s("systemctl",["--user","is-active",m],{encoding:"utf8"}).stdout||"").trim()||"unknown";console.log(` registered (state: ${u}, journalctl --user -u ${m} to tail logs)`);try{let i=process.env.USER||process.env.LOGNAME||"";if(i){let p=s("loginctl",["show-user",i,"--property=Linger","--value"],{encoding:"utf8"});!((p.stdout||"").trim().toLowerCase()==="yes")&&p.status===0&&console.log(` note: linger is not enabled for "${i}". the daemon will exit at logout.
|
|
61
|
-
enable persistence with: sudo loginctl enable-linger ${i}`)}}catch{}return}console.error(` background daemon is not supported on ${process.platform}`),console.error(" run 'sootsim serve' in a persistent shell instead"),process.exit(1)}function ct(){let t=[];if(process.platform==="darwin"){let e=S();c(e)&&(s("launchctl",["bootout",`gui/${process.getuid()}/${y}`],{stdio:"ignore"}),$(e,{force:!0}),t.push(e));let r=b();return c(r)&&($(r,{recursive:!0,force:!0}),t.push(r)),c(g)&&($(g,{recursive:!0,force:!0}),t.push(g)),{removed:t,missing:t.length===0}}if(process.platform==="linux"){let e=w();return c(e)&&(s("systemctl",["--user","disable","--now",m],{stdio:"ignore"}),$(e,{force:!0}),s("systemctl",["--user","daemon-reload"],{stdio:"ignore"}),s("systemctl",["--user","reset-failed",m],{stdio:"ignore"}),t.push(e)),c(v)&&($(v,{recursive:!0,force:!0}),t.push(v)),{removed:t,missing:t.length===0}}return{removed:t,missing:!0}}function lt(){let t=[],e=T();return c(e)&&($(e,{recursive:!0,force:!0}),t.push(e)),{removed:t,missing:t.length===0}}async function ut(){let t=ct();for(let r of t.removed)console.log(` removed ${r}`);let e=lt();for(let r of e.removed)console.log(` removed ${r}`);t.missing&&e.missing&&console.log(" not installed")}async function pt(){if(process.platform==="darwin"){let t=S();if(!c(t)){console.log(" installed: no");return}console.log(` installed: yes (${t})`);let e=yt(t);e&&console.log(` binary: ${e}`);let r=s("launchctl",["print",`gui/${process.getuid()}/${y}`],{encoding:"utf8"});if(r.status===0){let o=r.stdout.match(/state\s*=\s*(\w+)/)?.[1],n=r.stdout.match(/pid\s*=\s*(\d+)/)?.[1];console.log(` state: ${o||"unknown"}${n?` (pid ${n})`:""}`)}else console.log(" state: not running");return}if(process.platform==="linux"){let t=w();if(!c(t)){console.log(" installed: no");return}console.log(` installed: yes (${t})`);let e=s("systemctl",["--user","is-active",m],{encoding:"utf8"});console.log(` state: ${e.stdout.trim()||"unknown"}`);return}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}async function dt(){if(process.platform==="darwin"){let t=S();c(t)||(console.error(" daemon not registered \u2014 run `sootsim setup`"),process.exit(1));let e=s("launchctl",["kickstart","-k",`gui/${process.getuid()}/${y}`],{stdio:"pipe",encoding:"utf8"});e.status!==0&&(console.error(` kickstart failed: ${e.stderr?.trim()}`),process.exit(1)),console.log(" restarted");return}if(process.platform==="linux"){let t=w();c(t)||(console.error(" daemon not registered \u2014 run `sootsim setup`"),process.exit(1));let e=s("systemctl",["--user","restart",m],{stdio:"pipe",encoding:"utf8"});e.status!==0&&(console.error(` restart failed: ${e.stderr?.trim()}`),process.exit(1)),console.log(" restarted");return}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}async function mt(){if(process.platform==="darwin"){s("launchctl",["kickstart",`gui/${process.getuid()}/${y}`],{stdio:"inherit"});return}if(process.platform==="linux"){s("systemctl",["--user","start",m],{stdio:"inherit"});return}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}async function gt(){if(process.platform==="darwin"){s("launchctl",["bootout",`gui/${process.getuid()}/${y}`],{stdio:"inherit"});return}if(process.platform==="linux"){s("systemctl",["--user","stop",m],{stdio:"inherit"});return}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}async function ft(t){let e=t.find(n=>/^-n\d+$|^--lines=\d+$|^\d+$/.test(n)),r=e?Number(e.replace(/\D/g,"")):200,o=t.includes("-f")||t.includes("--follow");if(process.platform==="darwin"){let n=f(g,"bridge.out.log"),a=f(g,"bridge.err.log"),l=[n,a].filter(i=>c(i));l.length===0&&(console.error(` no daemon logs yet at ${g} \u2014 run \`sootsim setup\` to install the daemon`),process.exit(1));let u=o?["-n",String(r),"-F",...l]:["-n",String(r),...l];s("tail",u,{stdio:"inherit"});return}if(process.platform==="linux"){let n=`${m}.service`,a=["--user","-u",n,"-n",String(r),"--no-pager"],l=s("journalctl",o?[...a,"-f"]:a,{encoding:"utf8",stdio:o?"inherit":"pipe"});if(o)return;let u=`${l.stdout||""}${l.stderr||""}`,i=/insufficient permissions|No journal files were opened/i.test(u);if(l.status===0&&!i){process.stdout.write(l.stdout||"");return}let p=s("journalctl",[`_SYSTEMD_USER_UNIT=${n}`,"-n",String(r),"--no-pager"],{encoding:"utf8"});if(p.status===0&&(p.stdout||"").trim()){process.stdout.write(p.stdout);return}console.error(` could not read --user journal for ${n} (this user isn't in the systemd-journal group yet).
|
|
62
|
-
run: sudo journalctl _SYSTEMD_USER_UNIT=${n} -n ${r} --no-pager`),process.exit(1)}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}function yt(t){try{return et(t,"utf8").match(/<array>\s*<string>([^<]+)<\/string>/)?.[1]||null}catch{return null}}export{Tt as a,Nt as b,Bt as c,ct as d,lt as e};
|