sootsim 0.1.202 → 0.1.203
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-SP6EE5XV.js → agent-PWM4XT5H.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-PWZVJ3OK.js → agent-wrapper-V2BSTANB.js} +2 -2
- package/dist-cli/chunks/{app-fonts-EMJB6QLM.js → app-fonts-7M4PTF6W.js} +2 -2
- package/dist-cli/chunks/{assert-H2B6TDXT.js → assert-SEW5OJL3.js} +2 -2
- package/dist-cli/chunks/{auth-SOHXBYLQ.js → auth-3YY55NBL.js} +2 -2
- package/dist-cli/chunks/beta-Y4ZJUKAM.js +2 -0
- package/dist-cli/chunks/{camera-ULLCBM5H.js → camera-CYXCASB3.js} +2 -2
- package/dist-cli/chunks/{chunk-4NM6JBYH.js → chunk-4NHPXU3X.js} +1 -1
- package/dist-cli/chunks/{chunk-2V43M57C.js → chunk-62AKBZTO.js} +1 -1
- package/dist-cli/chunks/{chunk-WILIVPUU.js → chunk-6DN4BD7O.js} +24 -24
- package/dist-cli/chunks/{chunk-RWXCSRNE.js → chunk-6M56UHEY.js} +2 -2
- package/dist-cli/chunks/{chunk-F2LLN4U7.js → chunk-A3FIOG7U.js} +2 -2
- package/dist-cli/chunks/{chunk-Z5VMWFCY.js → chunk-B7VBDZ3U.js} +1 -1
- package/dist-cli/chunks/{chunk-WVDWIXPH.js → chunk-BBOFH45Q.js} +2 -2
- package/dist-cli/chunks/{chunk-RS7QLHEH.js → chunk-BJJXNQHO.js} +2 -2
- package/dist-cli/chunks/{chunk-HZYHSLNH.js → chunk-BL67OSVN.js} +2 -2
- package/dist-cli/chunks/{chunk-CB7LDZKJ.js → chunk-EBH65V62.js} +3 -3
- package/dist-cli/chunks/{chunk-OG6TFGYF.js → chunk-FF3C57T5.js} +2 -2
- package/dist-cli/chunks/{chunk-JP7J325R.js → chunk-FUC7C5HS.js} +2 -2
- package/dist-cli/chunks/{chunk-AAQVPSIV.js → chunk-G5GRLVYA.js} +2 -2
- package/dist-cli/chunks/chunk-G5VOIXM7.js +1 -0
- package/dist-cli/chunks/{chunk-CGJ2U6ST.js → chunk-GMVAXDHH.js} +1 -1
- package/dist-cli/chunks/{chunk-RJVIUQK4.js → chunk-GTBF3M2H.js} +1 -1
- package/dist-cli/chunks/{chunk-LNDRRZP3.js → chunk-GYTATFQA.js} +2 -2
- package/dist-cli/chunks/{chunk-PL4GXELT.js → chunk-JLOAWSX6.js} +1 -1
- package/dist-cli/chunks/{chunk-B6JB4THC.js → chunk-K3CRSIGS.js} +2 -2
- package/dist-cli/chunks/{chunk-SQBX2HS7.js → chunk-LKJ5LA6K.js} +2 -2
- package/dist-cli/chunks/{chunk-6QFVYLX6.js → chunk-LTRNOX6N.js} +2 -2
- package/dist-cli/chunks/{chunk-K3UBHPVP.js → chunk-MQHSWXDS.js} +1 -1
- package/dist-cli/chunks/{chunk-3ZENZOIX.js → chunk-NHSO4473.js} +2 -2
- package/dist-cli/chunks/chunk-ODW7RHSD.js +97 -0
- package/dist-cli/chunks/{chunk-TANTCV45.js → chunk-OK7QEDHD.js} +2 -2
- package/dist-cli/chunks/{chunk-RZQO4Q7E.js → chunk-OXQOPTTB.js} +1 -1
- package/dist-cli/chunks/{chunk-EMOZJ773.js → chunk-P4GJL7OH.js} +2 -2
- package/dist-cli/chunks/{chunk-6FZ6SNVP.js → chunk-PELEQURX.js} +2 -2
- package/dist-cli/chunks/chunk-QKDII5UB.js +1 -0
- package/dist-cli/chunks/{chunk-DKBKU55D.js → chunk-R7GIVBTY.js} +2 -2
- package/dist-cli/chunks/{chunk-4KVSVFRF.js → chunk-RVOF6RIE.js} +1 -1
- package/dist-cli/chunks/{chunk-W4Y3JJX6.js → chunk-RZU5TDPJ.js} +3 -3
- package/dist-cli/chunks/{chunk-KRGHRSKY.js → chunk-U6OCMLMU.js} +2 -2
- package/dist-cli/chunks/{chunk-5SKKMM7E.js → chunk-UJ64GJSZ.js} +1 -1
- package/dist-cli/chunks/{chunk-DRJ4YWUG.js → chunk-UZGLGCLM.js} +1 -1
- package/dist-cli/chunks/{chunk-KYGUR727.js → chunk-WSOZGPIX.js} +2 -2
- package/dist-cli/chunks/{chunk-ENXHZGSL.js → chunk-WVF2EDZF.js} +1 -1
- package/dist-cli/chunks/{chunk-ROYBEBG2.js → chunk-XYMOH3HP.js} +1 -1
- package/dist-cli/chunks/{chunk-2CID4LNK.js → chunk-YJNJ5GVC.js} +3 -3
- package/dist-cli/chunks/{chunk-GUYKLSTX.js → chunk-YP3NIRTK.js} +1 -1
- package/dist-cli/chunks/{chunk-GZKT53SA.js → chunk-ZGM7N2AV.js} +1 -1
- package/dist-cli/chunks/{chunk-4KT2BGQE.js → chunk-ZRWVLKFL.js} +1 -1
- package/dist-cli/chunks/cli-version-N2RKZ2CU.js +2 -0
- package/dist-cli/chunks/{compat-YW3OJ7RX.js → compat-FK5MP535.js} +3 -3
- package/dist-cli/chunks/{config-ZGOXFEX4.js → config-T3W2HI67.js} +2 -2
- package/dist-cli/chunks/{control-75JRFOYV.js → control-ONFLGDEC.js} +2 -2
- package/dist-cli/chunks/daemon-FDI5YYZN.js +2 -0
- package/dist-cli/chunks/{debug-4APEP64L.js → debug-Z6NG4KY2.js} +3 -3
- package/dist-cli/chunks/{desktop-CS7S4CXK.js → desktop-BIWB2UYC.js} +3 -3
- package/dist-cli/chunks/{detox-7R7DOKQM.js → detox-6K7WFLQO.js} +2 -2
- package/dist-cli/chunks/{device-EIDKLBEK.js → device-TPD5WAP2.js} +2 -2
- package/dist-cli/chunks/{diagnose-J2F7MJAJ.js → diagnose-NACPOTYX.js} +2 -2
- package/dist-cli/chunks/drivers-G2YZR6G6.js +2 -0
- package/dist-cli/chunks/flow-OAW2MZCD.js +2 -0
- package/dist-cli/chunks/help-MY2CBECX.js +2 -0
- package/dist-cli/chunks/{home-paths-WVCREWI7.js → home-paths-WWFDX6YU.js} +2 -2
- package/dist-cli/chunks/inspect-ZPVPUSAK.js +2 -0
- package/dist-cli/chunks/install-desktop-QZWSSGJV.js +2 -0
- package/dist-cli/chunks/{login-EOBJ7CZ4.js → login-WGCO2V4S.js} +4 -4
- package/dist-cli/chunks/{logout-RL7D66VQ.js → logout-VWSSNYF5.js} +2 -2
- package/dist-cli/chunks/{maestro-F66ZIJKA.js → maestro-YED424Y6.js} +2 -2
- package/dist-cli/chunks/{mode-R2VIW66U.js → mode-QCOM4UM4.js} +2 -2
- package/dist-cli/chunks/optional-demo-registry-3KZFUZZD.js +2 -0
- package/dist-cli/chunks/{perf-PGYO5BBR.js → perf-FZHCFAID.js} +2 -2
- package/dist-cli/chunks/{record-IGDVHC67.js → record-NF3PKBSW.js} +3 -3
- package/dist-cli/chunks/runtime-ETELTKFT.js +2 -0
- package/dist-cli/chunks/screenshot-command-KLPOA5TW.js +151 -0
- package/dist-cli/chunks/screenshots-capture-MCTZSXLE.js +41 -0
- package/dist-cli/chunks/{serve-3TFVHYLY.js → serve-XBWYWHMC.js} +2 -2
- package/dist-cli/chunks/{setup-JSPPRVET.js → setup-W7EROACZ.js} +3 -3
- package/dist-cli/chunks/{skills-LK3B76W7.js → skills-RBGNF7GS.js} +2 -2
- package/dist-cli/chunks/{storage-NC5RNBUA.js → storage-3SFE2DUE.js} +2 -2
- package/dist-cli/chunks/store-Z3CHVRR3.js +2 -0
- package/dist-cli/chunks/telemetry-SWFOAVWP.js +2 -0
- package/dist-cli/chunks/{test-2CXPLH5N.js → test-UP6VTFKE.js} +5 -5
- package/dist-cli/chunks/{timeline-WDTEVELN.js → timeline-A54JB74A.js} +2 -2
- package/dist-cli/chunks/{upgrade-TT2IJSNJ.js → upgrade-H7XE3N76.js} +2 -2
- package/dist-cli/chunks/upload-X2BRKPBJ.js +2 -0
- package/dist-cli/chunks/{version-JUNH4FOR.js → version-4JV7HX23.js} +2 -2
- package/dist-cli/chunks/{web-BWCW26ZA.js → web-5OLZXKVF.js} +2 -2
- package/dist-cli/chunks/{what-happened-L6EEB6MB.js → what-happened-Q4L6SI4I.js} +2 -2
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +1 -1
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +1 -1
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/dist-cli/chunks/beta-CCNQQ73A.js +0 -2
- package/dist-cli/chunks/chunk-5J63S2NM.js +0 -1
- package/dist-cli/chunks/chunk-BZ7AW7ZB.js +0 -92
- package/dist-cli/chunks/chunk-I6O7NBPZ.js +0 -1
- package/dist-cli/chunks/cli-version-Z4NGLJLH.js +0 -2
- package/dist-cli/chunks/daemon-SHFBQRHD.js +0 -2
- package/dist-cli/chunks/drivers-55L7BHDF.js +0 -2
- package/dist-cli/chunks/flow-AHWVTHJP.js +0 -2
- package/dist-cli/chunks/help-C4BTMPEE.js +0 -2
- package/dist-cli/chunks/inspect-M4Z4SSSB.js +0 -2
- package/dist-cli/chunks/install-desktop-PVRUAEMA.js +0 -2
- package/dist-cli/chunks/optional-demo-registry-ILX5YV34.js +0 -2
- package/dist-cli/chunks/runtime-43RJGUGS.js +0 -2
- package/dist-cli/chunks/screenshot-command-HX4GVUJM.js +0 -190
- package/dist-cli/chunks/store-3XMEKA6H.js +0 -2
- package/dist-cli/chunks/telemetry-CVJ5YZNS.js +0 -2
- package/dist-cli/chunks/upload-4HMNB4HA.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-ZRWVLKFL.js";import*as i from"fs";import*as I from"os";import*as a from"path";import{fileURLToPath as h}from"url";function $(){try{let t=h(import.meta.resolve("sootsim/package.json"));return a.join(a.dirname(t),"skills")}catch{let t=a.dirname(h(import.meta.url));return a.resolve(t,"../../skills")}}var d=$(),w=new Set(["all","codex","claude"]);function S(){console.log(`sootsim skill
|
|
3
3
|
|
|
4
4
|
install and inspect bundled SootSim agent skills.
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{k as f}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{k as f}from"./chunk-YJNJ5GVC.js";import"./chunk-G5GRLVYA.js";import"./chunk-K3CRSIGS.js";import"./chunk-BBOFH45Q.js";import"./chunk-QKDII5UB.js";import"./chunk-GMVAXDHH.js";import"./chunk-GTBF3M2H.js";import"./chunk-4NHPXU3X.js";import"./chunk-P4GJL7OH.js";import"./chunk-XYMOH3HP.js";import"./chunk-U6OCMLMU.js";import{a as t,b as n,c as l,d as c,e as a}from"./chunk-BL67OSVN.js";import"./chunk-WVF2EDZF.js";import"./chunk-UZGLGCLM.js";import"./chunk-RVOF6RIE.js";import"./chunk-FF3C57T5.js";import"./chunk-LKJ5LA6K.js";import"./chunk-A3FIOG7U.js";import"./chunk-JLOAWSX6.js";import"./chunk-OXQOPTTB.js";import"./chunk-ZGM7N2AV.js";import"./chunk-62AKBZTO.js";import"./chunk-ZRWVLKFL.js";function p(){console.log(`
|
|
3
3
|
sootsim storage profile \u2014 manage isolated storage profiles
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as P,b as N,c as A}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as P,b as N,c as A}from"./chunk-R7GIVBTY.js";import{a as L}from"./chunk-G5GRLVYA.js";import{a as k}from"./chunk-ODW7RHSD.js";import{a as O,b as M}from"./chunk-OK7QEDHD.js";import"./chunk-GMVAXDHH.js";import"./chunk-GTBF3M2H.js";import{f as F}from"./chunk-XYMOH3HP.js";import{g as D,i as E}from"./chunk-U6OCMLMU.js";import"./chunk-UZGLGCLM.js";import"./chunk-WSOZGPIX.js";import"./chunk-6M56UHEY.js";import"./chunk-JLOAWSX6.js";import"./chunk-OXQOPTTB.js";import"./chunk-ZGM7N2AV.js";import"./chunk-ZRWVLKFL.js";import{spawn as Y}from"child_process";import{existsSync as _,mkdtempSync as H,readdirSync as I,writeFileSync as G}from"fs";import{tmpdir as K}from"os";import{resolve as S,dirname as z,join as R,relative as X}from"path";import{fileURLToPath as q}from"url";var $=z(q(import.meta.resolve("sootsim-engine/package.json"))),Q=process.env.SOOTSIM_TEST_MODEL||"deepseek-v4-flash",j=18e3,Z=18e4;async function Te(e,t){let n=e.includes("--flows"),u=e.includes("--detox"),l=e.includes("--parallel"),s=e.includes("--watch"),a=e.find((i,c)=>e[c-1]==="--reporter")||"console",o=ee(e);if((e.includes("--help")||e.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim test \u2014 run tests against sootsim
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -32,7 +32,7 @@ examples:
|
|
|
32
32
|
notes:
|
|
33
33
|
playwright is best for smoke and package-local debugging
|
|
34
34
|
--detox is the preferred parity lane for behavior that should match real RN
|
|
35
|
-
`),process.exit(0)),o&&!n&&!u)await ce(o.prompt,o.index,e,t);else if(n)await pe(e,t,l,a);else if(u){let{runDetox:i}=await import("./detox-
|
|
35
|
+
`),process.exit(0)),o&&!n&&!u)await ce(o.prompt,o.index,e,t);else if(n)await pe(e,t,l,a);else if(u){let{runDetox:i}=await import("./detox-6K7WFLQO.js");await i(e.filter(c=>c!=="--detox"),t)}else await ue(e,t)}function h(e,t){let n=e.indexOf(t);return n>=0?e[n+1]:void 0}function C(e,t){for(let n of t){let u=h(e,n);if(u)return u}}var J=new Set(["--reporter","-t","--testNamePattern","--grep","--origin","--preview-origin","--public-origin","--preview-public-origin","--owner","--repo","--url","--driver","--sim","--device","--slow","--tail-wait","--remap","--replace"]);function ee(e){for(let t=0;t<e.length;t++){let n=e[t];if(n){if(J.has(n)){t+=1;continue}if(!n.startsWith("-"))return _(n)||/\.(?:[cm]?[jt]sx?|ya?ml|json)$/i.test(n)||!/\s/.test(n)&&n.length<16?null:{prompt:n,index:t}}}return null}function te(e,t){return e.filter((n,u)=>u!==t)}async function ne(e,t){let n=te(e,t),u=D(n,{stripBooleanFlags:["--parallel","--watch","--flows","--detox","--new","--headless","--headed","--electron","--preview-open"],stripValueFlags:[...J]}),l=E(u);try{let s=await F(l,{describe:!0,verbose:!1,filter:"",compact:!0,hideXy:!0}),o=[s.shell?`shell: ${JSON.stringify(s.shell)}`:"",s.keyboard?`keyboard: ${JSON.stringify(s.keyboard)}`:"",typeof s.nodeCount=="number"?`nodes: ${s.nodeCount}`:"",s.tree||""].filter(Boolean).join(`
|
|
36
36
|
`);return o.length>j?o.slice(0,j)+`
|
|
37
37
|
[tree truncated]`:o}finally{l.close()}}var oe=`
|
|
38
38
|
You write SootSim YAML flows from a user's natural-language test goal.
|
|
@@ -63,7 +63,7 @@ ${t||"[no tree available]"}
|
|
|
63
63
|
|
|
64
64
|
Generate the shortest replayable flow that verifies the goal from this current state.
|
|
65
65
|
`.trim()}function U(e){return typeof e=="string"?e:Array.isArray(e)?e.map(t=>t&&typeof t=="object"&&t.type==="text"?String(t.text??""):"").join(""):""}async function se(e){let t=await fetch(`${e.origin.replace(/\/$/,"")}/api/llm`,{method:"POST",headers:{"content-type":"application/json",authorization:e.authHeader},body:JSON.stringify({modelId:Q,context:{systemPrompt:oe,messages:[{role:"user",content:re(e.prompt,e.describe),timestamp:Date.now()}]},options:{maxTokens:1800,temperature:.2},threadId:null}),signal:AbortSignal.timeout(Z)});if(!t.ok||!t.body){let c=await t.text().catch(()=>"");throw new Error(`/api/llm ${t.status}${c?`: ${c}`:""}`)}let n=t.body.getReader(),u=new TextDecoder,l=[],s="",a="",o=c=>{let p=c.trim();if(!p)return;let r=JSON.parse(p);if(r.type==="text_delta"&&r.delta)l.push(r.delta);else if(r.type==="text_end"&&r.content)s=r.content;else if(r.type==="done")s=U(r.message?.content);else if(r.type==="error")throw new Error(r.error?.errorMessage||U(r.error?.content)||"llm error")};for(;;){let{value:c,done:p}=await n.read();if(p)break;a+=u.decode(c,{stream:!0});let r;for(;(r=a.indexOf(`
|
|
66
|
-
`))>=0;)o(a.slice(0,r)),a=a.slice(r+1)}a+=u.decode(),a.trim()&&o(a);let i=(s||l.join("")).trim();if(!i)throw new Error("llm returned an empty test flow");return i}function ie(e){let t=e.match(/```(?:json)?\s*([\s\S]*?)```/i),n=t?t[1]:e.slice(e.indexOf("{"),e.lastIndexOf("}")+1);return JSON.parse(n)}function B(e){return!!(e&&typeof e=="object"&&!Array.isArray(e))}function le(e){let t=ie(e);if(!B(t))throw new Error("llm did not return a JSON object");let n=typeof t.summary=="string"&&t.summary.trim()?t.summary.trim().slice(0,500):"SootSim generated test",u=t.steps;if(!Array.isArray(u)||u.length===0)throw new Error("llm returned no flow steps");let l=u.map((s,a)=>{if(!B(s))throw new Error(`flow step ${a+1} is not an object`);return s});return{summary:n,steps:l,yamlText:L.stringify(l)}}function ae(e,t,n,u){let l=[n,"--preview","--preview-origin",u,"--billing-kind","test_run"],s=new Set(["--public-origin","--preview-public-origin","--owner","--repo","--url","--driver","--sim","--device","--slow","--tail-wait","--remap","--replace"]),a=new Set(["--new","--headless","--headed","--electron","--preview-open","--no-shell","--shell-only"]);for(let o=0;o<e.length;o++){if(o===t)continue;let i=e[o];if(i==="--origin"||i==="--preview-origin"){o+=1;continue}if(i==="--public-origin"){let c=e[o+1];c&&l.push("--preview-public-origin",c),o+=1;continue}if(s.has(i)){let c=e[o+1];c&&l.push(i,c),o+=1;continue}a.has(i)&&l.push(i)}return l}async function ce(e,t,n,u){let l=O();(!l||l.kind==="github")&&(console.error(' sootsim test "<prompt>" needs a login or SOOTSIM_API_KEY.'),console.error(" API keys must include preview_upload and llm scopes."),process.exit(1));let s=M(l),a=await k(C(n,["--origin","--preview-origin"]));console.log(" inspecting current sim\u2026");let o=await ne(n,t);console.log(" generating flow\u2026");let i=await se({prompt:e,describe:o,origin:a,authHeader:s}),c=le(i),p=H(R(K(),"sootsim-test-")),r=R(p,"flow.yaml");G(r,c.yamlText),console.log(` flow: ${r}`);let m=Date.now(),{runFlowPlayback:d,getLastFlowPreviewUploadResult:v,getLastFlowTraceSteps:y}=await import("./flow-
|
|
67
|
-
result: ${T}`),x&&console.log(` run: ${x.id}`),f?.previewUrl&&console.log(` preview: ${f.previewUrl}`),x?.traceUrl&&console.log(` replay: ${x.traceUrl}`),process.exit(g)}async function ue(e,t){let n=["playwright","test"],u=e.find((o,i)=>e[i-1]==="-t")||e.find((o,i)=>e[i-1]==="--testNamePattern")||e.find((o,i)=>e[i-1]==="--grep");u&&n.push("-g",u),e.includes("--watch")&&n.push("--ui");let l=new Set(["--flows","--detox","--parallel","--watch","--reporter","-t","--testNamePattern","--grep"]);for(let o=0;o<e.length;o++){if(l.has(e[o])){(e[o]==="-t"||e[o]==="--testNamePattern"||e[o]==="--grep"||e[o]==="--reporter")&&o++;continue}n.push(e[o])}console.log(` running: npx ${n.join(" ")}`);let s=Y("npx",n,{cwd:$,stdio:"inherit",env:{...process.env}}),a=await new Promise(o=>{s.on("exit",i=>o(i||0))});process.exit(a)}async function pe(e,t,n,u){let l=["flows","test/flows","e2e/flows",".maestro","maestro"],s=[];for(let p of l){let r=S($,p);if(_(r)){let m=I(r).filter(d=>d.endsWith(".yaml")||d.endsWith(".yml"));for(let d of m)s.push(S(r,d))}}for(let p of l){let r=S(process.cwd(),p);if(!r.startsWith($)&&_(r)){let m=I(r).filter(d=>d.endsWith(".yaml")||d.endsWith(".yml"));for(let d of m)s.push(S(r,d))}}s.length===0&&(console.log(" no flow files found in flows/, test/flows/, or e2e/flows/"),process.exit(0)),console.log(` found ${s.length} flow(s)`);let a=O(),o=await k(C(e,["--origin","--preview-origin"])),i=0,c=0;for(let p of s){let r=1,m=Date.now();try{let{runFlowPlayback:w}=await import("./flow-
|
|
66
|
+
`))>=0;)o(a.slice(0,r)),a=a.slice(r+1)}a+=u.decode(),a.trim()&&o(a);let i=(s||l.join("")).trim();if(!i)throw new Error("llm returned an empty test flow");return i}function ie(e){let t=e.match(/```(?:json)?\s*([\s\S]*?)```/i),n=t?t[1]:e.slice(e.indexOf("{"),e.lastIndexOf("}")+1);return JSON.parse(n)}function B(e){return!!(e&&typeof e=="object"&&!Array.isArray(e))}function le(e){let t=ie(e);if(!B(t))throw new Error("llm did not return a JSON object");let n=typeof t.summary=="string"&&t.summary.trim()?t.summary.trim().slice(0,500):"SootSim generated test",u=t.steps;if(!Array.isArray(u)||u.length===0)throw new Error("llm returned no flow steps");let l=u.map((s,a)=>{if(!B(s))throw new Error(`flow step ${a+1} is not an object`);return s});return{summary:n,steps:l,yamlText:L.stringify(l)}}function ae(e,t,n,u){let l=[n,"--preview","--preview-origin",u,"--billing-kind","test_run"],s=new Set(["--public-origin","--preview-public-origin","--owner","--repo","--url","--driver","--sim","--device","--slow","--tail-wait","--remap","--replace"]),a=new Set(["--new","--headless","--headed","--electron","--preview-open","--no-shell","--shell-only"]);for(let o=0;o<e.length;o++){if(o===t)continue;let i=e[o];if(i==="--origin"||i==="--preview-origin"){o+=1;continue}if(i==="--public-origin"){let c=e[o+1];c&&l.push("--preview-public-origin",c),o+=1;continue}if(s.has(i)){let c=e[o+1];c&&l.push(i,c),o+=1;continue}a.has(i)&&l.push(i)}return l}async function ce(e,t,n,u){let l=O();(!l||l.kind==="github")&&(console.error(' sootsim test "<prompt>" needs a login or SOOTSIM_API_KEY.'),console.error(" API keys must include preview_upload and llm scopes."),process.exit(1));let s=M(l),a=await k(C(n,["--origin","--preview-origin"]));console.log(" inspecting current sim\u2026");let o=await ne(n,t);console.log(" generating flow\u2026");let i=await se({prompt:e,describe:o,origin:a,authHeader:s}),c=le(i),p=H(R(K(),"sootsim-test-")),r=R(p,"flow.yaml");G(r,c.yamlText),console.log(` flow: ${r}`);let m=Date.now(),{runFlowPlayback:d,getLastFlowPreviewUploadResult:v,getLastFlowTraceSteps:y}=await import("./flow-OAW2MZCD.js"),w=ae(n,t,r,a),g=await d(w),f=v(),b=y(),V=b.find(W=>W.status==="failure"),T=g===0?"passed":"failed",x=await A({origin:a,kind:"nl",prompt:e,summary:c.summary,status:T,failureMessage:T==="failed"?V?.error??"flow playback failed":null,previewShareId:f?.shareId??null,owner:h(n,"--owner")??null,repo:h(n,"--repo")??null,durationMs:Date.now()-m,flowYamlSizeBytes:Buffer.byteLength(c.yamlText,"utf8"),...P(b),auth:l});console.log(`
|
|
67
|
+
result: ${T}`),x&&console.log(` run: ${x.id}`),f?.previewUrl&&console.log(` preview: ${f.previewUrl}`),x?.traceUrl&&console.log(` replay: ${x.traceUrl}`),process.exit(g)}async function ue(e,t){let n=["playwright","test"],u=e.find((o,i)=>e[i-1]==="-t")||e.find((o,i)=>e[i-1]==="--testNamePattern")||e.find((o,i)=>e[i-1]==="--grep");u&&n.push("-g",u),e.includes("--watch")&&n.push("--ui");let l=new Set(["--flows","--detox","--parallel","--watch","--reporter","-t","--testNamePattern","--grep"]);for(let o=0;o<e.length;o++){if(l.has(e[o])){(e[o]==="-t"||e[o]==="--testNamePattern"||e[o]==="--grep"||e[o]==="--reporter")&&o++;continue}n.push(e[o])}console.log(` running: npx ${n.join(" ")}`);let s=Y("npx",n,{cwd:$,stdio:"inherit",env:{...process.env}}),a=await new Promise(o=>{s.on("exit",i=>o(i||0))});process.exit(a)}async function pe(e,t,n,u){let l=["flows","test/flows","e2e/flows",".maestro","maestro"],s=[];for(let p of l){let r=S($,p);if(_(r)){let m=I(r).filter(d=>d.endsWith(".yaml")||d.endsWith(".yml"));for(let d of m)s.push(S(r,d))}}for(let p of l){let r=S(process.cwd(),p);if(!r.startsWith($)&&_(r)){let m=I(r).filter(d=>d.endsWith(".yaml")||d.endsWith(".yml"));for(let d of m)s.push(S(r,d))}}s.length===0&&(console.log(" no flow files found in flows/, test/flows/, or e2e/flows/"),process.exit(0)),console.log(` found ${s.length} flow(s)`);let a=O(),o=await k(C(e,["--origin","--preview-origin"])),i=0,c=0;for(let p of s){let r=1,m=Date.now();try{let{runFlowPlayback:w}=await import("./flow-OAW2MZCD.js"),g=t.port?`http://localhost:${t.port}`:"http://localhost:5173";r=await w([p,"--url",g,"--new"])}catch{r=1}r===0?i++:c++;let{getLastFlowPreviewUploadResult:d,getLastFlowTraceSteps:v}=await import("./flow-OAW2MZCD.js"),y=d();if(N({uploadedShare:!!y,auth:a})){let w=v(),g=w.find(b=>b.status==="failure"),f=await A({origin:o,kind:"flow",name:X(process.cwd(),p),status:r===0?"passed":"failed",failureMessage:r===0?null:g?.error??"flow playback failed",previewShareId:y?.shareId??null,owner:h(e,"--owner")??null,repo:h(e,"--repo")??null,durationMs:Date.now()-m,...P(w),auth:a});f&&console.log(` run: ${f.id}${f.traceUrl?` \xB7 replay: ${f.traceUrl}`:""}`)}}console.log(`
|
|
68
68
|
results: ${i} passed, ${c} failed (${s.length} total)
|
|
69
69
|
`),process.exit(c>0?1:0)}export{Te as runTest};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{g as m,i as d,l as s}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{g as m,i as d,l as s}from"./chunk-U6OCMLMU.js";import"./chunk-JLOAWSX6.js";import"./chunk-OXQOPTTB.js";import"./chunk-ZGM7N2AV.js";import"./chunk-ZRWVLKFL.js";import{writeFileSync as g}from"fs";function u(){console.log(`
|
|
3
3
|
sootsim timeline \u2014 control the semantic event timeline
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as c}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as c}from"./chunk-RZU5TDPJ.js";import{e as a}from"./chunk-PELEQURX.js";import"./chunk-U6OCMLMU.js";import"./chunk-JLOAWSX6.js";import"./chunk-OXQOPTTB.js";import{K as l,h as s}from"./chunk-ZGM7N2AV.js";import{a as r}from"./chunk-MQHSWXDS.js";import"./chunk-ZRWVLKFL.js";import{spawn as u}from"node:child_process";import d from"node:fs";import m from"node:path";var g="https://registry.npmjs.org/sootsim/latest";async function I(o){let n=o.indexOf("--channel"),t=n>=0&&o[n+1]?o[n+1]:void 0;console.log(`sootsim upgrade
|
|
3
3
|
`),console.log("runtime:");let e=a();e&&(console.log(` pinned to ${e} \u2014 installing the pin, not channel latest`),console.log(" (run `sootsim runtime unpin` to follow latest again)")),await c(["install",...t?["--channel",t]:[]],{}),console.log(`
|
|
4
4
|
cli:`),await f()}function p(){if(s())return{kind:"dev"};let o=process.argv[1]??"";try{o=d.realpathSync(o)}catch{}let n=m.sep;return o.includes(`${n}_npx${n}`)||o.includes(`${n}.bunx${n}`)?{kind:"npx"}:o.includes(`${n}.bun${n}`)?{kind:"global",command:"bun",args:["add","-g","sootsim@latest"]}:o.includes(`${n}pnpm${n}`)?{kind:"global",command:"pnpm",args:["add","-g","sootsim@latest"]}:{kind:"global",command:"npm",args:["i","-g","sootsim@latest"]}}async function f(){let o=r(),n=await v();if(!n){console.log(` v${o} \u2014 couldn't reach the npm registry, skipped`);return}if(l(n,o)<=0){console.log(` v${o} (latest)`);return}let t=p();if(console.log(` v${o} \u2192 v${n}`),t.kind==="dev"){console.log(" running from the soot dev checkout \u2014 pull instead of upgrading");return}if(t.kind==="npx"){console.log(" running from the npx cache \u2014 get the latest with:"),console.log(" npx sootsim@latest");return}let e=`${t.command} ${t.args.join(" ")}`;console.log(` updating global install (${e})\u2026`),await h(t.command,t.args)?console.log(` updated to v${n}`):(console.log(" update failed \u2014 run it yourself:"),console.log(` ${e}`))}function h(o,n){return new Promise(t=>{let e=u(o,n,{stdio:"inherit"});e.on("error",()=>t(!1)),e.on("exit",i=>t(i===0))})}async function v(){try{let o=await fetch(g,{headers:{accept:"application/json"},signal:AbortSignal.timeout(8e3)});if(!o.ok)return null;let n=await o.json();return typeof n.version=="string"&&n.version?n.version:null}catch{return null}}export{I as runUpgrade};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a,b,c}from"./chunk-ODW7RHSD.js";import"./chunk-OK7QEDHD.js";import"./chunk-GMVAXDHH.js";import"./chunk-GTBF3M2H.js";import"./chunk-U6OCMLMU.js";import"./chunk-UZGLGCLM.js";import"./chunk-WSOZGPIX.js";import"./chunk-6M56UHEY.js";import"./chunk-JLOAWSX6.js";import"./chunk-OXQOPTTB.js";import"./chunk-ZGM7N2AV.js";import"./chunk-ZRWVLKFL.js";export{a as resolveDefaultUploadOrigin,b as resolvePublicPreviewOrigin,c as runUpload};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as s,d as l,i as r}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.203 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as s,d as l,i as r}from"./chunk-PELEQURX.js";import{a as i}from"./chunk-GYTATFQA.js";import"./chunk-ZGM7N2AV.js";import{a as t}from"./chunk-MQHSWXDS.js";import"./chunk-ZRWVLKFL.js";async function f(c){let{IS_BETA:m,BETA_LABEL:a}=await import("./beta-Y4ZJUKAM.js"),u=m?` \xB7 ${a}`:"";console.log(`sootsim v${t()}${u}`);let o=i(),e=l();o.isDevBridge?(console.log(o.primary),o.installedRuntime&&console.log(`${o.installedRuntime} \xB7 ${e}`)):o.primary==="runtime not installed"?console.log("runtime not installed \u2014 run `sootsim runtime install`"):console.log(`${o.primary} \xB7 ${e}`);let n=await r({channel:e});n.pinned&&console.log(` runtime pinned to v${n.pinned} (\`sootsim runtime unpin\` to follow latest)`),n.outdated&&n.latest&&console.log(`
|
|
3
3
|
\u2191 runtime v${n.latest} available \u2014 run \`sootsim upgrade\``),console.log(`
|
|
4
4
|
what's new: ${s}`)}export{f as runVersion};
|