sootsim 0.0.1

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.
Files changed (62) hide show
  1. package/README.md +197 -0
  2. package/dist-cli/bin.js +29 -0
  3. package/dist-cli/chunks/bridge-host-2EY7Z4AO.js +2 -0
  4. package/dist-cli/chunks/chunk-3C3ZH7PP.js +4 -0
  5. package/dist-cli/chunks/chunk-3R4ZZESY.js +119 -0
  6. package/dist-cli/chunks/chunk-64TOMNZX.js +37 -0
  7. package/dist-cli/chunks/chunk-74XPLOV4.js +2 -0
  8. package/dist-cli/chunks/chunk-7LMDCMSI.js +8 -0
  9. package/dist-cli/chunks/chunk-7X6OPSRD.js +2 -0
  10. package/dist-cli/chunks/chunk-A2CZQIWO.js +1 -0
  11. package/dist-cli/chunks/chunk-CKZ376AY.js +322 -0
  12. package/dist-cli/chunks/chunk-E522F5JW.js +2 -0
  13. package/dist-cli/chunks/chunk-E5UBZEYR.js +2 -0
  14. package/dist-cli/chunks/chunk-G5MR66EB.js +180 -0
  15. package/dist-cli/chunks/chunk-GPVPHE2B.js +3 -0
  16. package/dist-cli/chunks/chunk-HOIHCO7S.js +3 -0
  17. package/dist-cli/chunks/chunk-J2S3OCWA.js +69 -0
  18. package/dist-cli/chunks/chunk-JSF5LPNT.js +176 -0
  19. package/dist-cli/chunks/chunk-KQWZZ56P.js +2 -0
  20. package/dist-cli/chunks/chunk-KSACMDXK.js +3 -0
  21. package/dist-cli/chunks/chunk-KSB6MSZ4.js +34 -0
  22. package/dist-cli/chunks/chunk-KXYKAYYB.js +51 -0
  23. package/dist-cli/chunks/chunk-MBFP2LVH.js +3 -0
  24. package/dist-cli/chunks/chunk-MPSZ5EWF.js +16 -0
  25. package/dist-cli/chunks/chunk-OROM7DZI.js +2 -0
  26. package/dist-cli/chunks/chunk-PWXPA745.js +3 -0
  27. package/dist-cli/chunks/chunk-QOBRRY5X.js +4 -0
  28. package/dist-cli/chunks/chunk-X2U72K7X.js +1 -0
  29. package/dist-cli/chunks/chunk-YCETS3B3.js +2 -0
  30. package/dist-cli/chunks/compat-MRN2ORY5.js +33 -0
  31. package/dist-cli/chunks/config-CO5IYWUY.js +45 -0
  32. package/dist-cli/chunks/control-Y7TKKB6D.js +2 -0
  33. package/dist-cli/chunks/daemon-G4XVRFHM.js +49 -0
  34. package/dist-cli/chunks/debug-ZNSZTWT6.js +182 -0
  35. package/dist-cli/chunks/detox-JEGYNTYV.js +49 -0
  36. package/dist-cli/chunks/dev-ZUKCZQEX.js +25 -0
  37. package/dist-cli/chunks/dev-checkout-IEZVVTCN.js +2 -0
  38. package/dist-cli/chunks/device-BS34FAFM.js +16 -0
  39. package/dist-cli/chunks/drivers-46PFFIDF.js +2 -0
  40. package/dist-cli/chunks/electron-P2KOPX2S.js +15 -0
  41. package/dist-cli/chunks/flow-VVOF6UNC.js +2 -0
  42. package/dist-cli/chunks/hints-7Z656W4H.js +2 -0
  43. package/dist-cli/chunks/inspect-NAHXP2M5.js +1042 -0
  44. package/dist-cli/chunks/install-EPUJX4AT.js +67 -0
  45. package/dist-cli/chunks/install-desktop-PYIZIH67.js +19 -0
  46. package/dist-cli/chunks/login-Z5Z54HUJ.js +26 -0
  47. package/dist-cli/chunks/logout-T2QDYGCB.js +2 -0
  48. package/dist-cli/chunks/maestro-4AXTS7OE.js +75 -0
  49. package/dist-cli/chunks/preview-NMGWHWMX.js +17 -0
  50. package/dist-cli/chunks/profile-6RGJA4FR.js +22 -0
  51. package/dist-cli/chunks/record-IE27Z2GA.js +37 -0
  52. package/dist-cli/chunks/screenshot-R3GCCSCI.js +26 -0
  53. package/dist-cli/chunks/screenshot-mode-SZQDNGYE.js +17 -0
  54. package/dist-cli/chunks/screenshots-4UQJE4NC.js +70 -0
  55. package/dist-cli/chunks/server-AN2G5KO4.js +21 -0
  56. package/dist-cli/chunks/skills-2PPKPL4B.js +10 -0
  57. package/dist-cli/chunks/store-PU5ES4YQ.js +2 -0
  58. package/dist-cli/chunks/test-5LFKOQ4M.js +31 -0
  59. package/dist-cli/chunks/upload-BYNPC54C.js +2 -0
  60. package/dist-cli/chunks/vite-plugin-5AEUUBKP.js +9 -0
  61. package/dist-cli/chunks/whoami-H6FW34JS.js +2 -0
  62. package/package.json +56 -0
@@ -0,0 +1,9 @@
1
+ /*! sootsim v0.0.1 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import"./chunk-X2U72K7X.js";import"./chunk-E522F5JW.js";import g from"fs";import a from"path";import{fileURLToPath as E}from"url";import{transformWithEsbuild as j}from"vite";var x=a.resolve(a.dirname(E(import.meta.url)),".."),y=a.resolve(x,"..",".."),W=a.resolve(y,"node_modules"),$=a.resolve(W,"@tamagui"),_=a.resolve(y,"packages/sootsim-engine"),v=a.resolve(_,"src/react-native/index.ts"),R=a.resolve(_,"src/react-bridge.ts"),I=a.resolve(x,"..","compat"),d=a.resolve(I,"src/stubs"),O=a.resolve(d,"native-auto-stub.ts"),w=a.resolve(d,"react-native-internals.ts");function A(){try{return["tamagui",...g.readdirSync($,{withFileTypes:!0}).filter(t=>t.isDirectory()).map(t=>`@tamagui/${t.name}`)].sort()}catch{return["tamagui"]}}var h=A(),P={"react-native/Libraries/Pressability/usePressability":a.resolve(d,"rn-libraries/usePressability.ts"),"react-native/Libraries/Pressability/Pressability":a.resolve(d,"rn-libraries/Pressability.ts"),"react-native/Libraries/Renderer/shims/ReactFabric":a.resolve(d,"rn-libraries/ReactFabric.ts"),"react-native/Libraries/Renderer/shims/ReactNative":a.resolve(d,"rn-libraries/ReactNative.ts")},T={"react-native-safe-area-context":"react-native-safe-area-context.ts","react-native-gesture-handler":"react-native-gesture-handler.ts","react-native-gesture-handler/ReanimatedSwipeable":"reanimated-swipeable.ts","react-native-reanimated":"react-native-reanimated.ts","react-native-screens":"react-native-screens.ts","@react-native-masked-view/masked-view":"masked-view.ts","react-native-svg":"react-native-svg.ts","react-native-keyboard-controller":"react-native-keyboard-controller.ts","react-native-teleport":"react-native-teleport.tsx","react-native-ios-context-menu":"react-native-ios-context-menu.ts","react-native-ios-utilities":"react-native-ios-utilities.ts","@react-native-menu/menu":"react-native-menu.ts","expo-splash-screen":"expo-splash-screen.ts","expo-font":"expo-font.ts","react-native-launch-arguments":"react-native-launch-arguments.ts",expo:"expo.ts","@react-native-async-storage/async-storage":"async-storage.ts","expo-constants":"expo-constants.ts","expo-image":"expo-image.ts","expo-linear-gradient":"expo-linear-gradient.ts","expo-blur":"expo-blur.ts","expo-liquid-glass-view":"expo-liquid-glass-view.ts","expo-glass-effect":"expo-glass-effect.ts","react-native-bottom-tabs":"react-native-bottom-tabs.ts","@callstack/react-native-bottom-tabs":"react-native-bottom-tabs.ts","@expo/ui/swift-ui":"expo-ui.ts","@expo/ui":"expo-ui.ts","react-native-worklets":"react-native-worklets.ts","react-native-webview":"react-native-webview.ts","expo-haptics":"expo-haptics.ts","expo-crypto":"expo-crypto.ts","expo-clipboard":"expo-clipboard.ts","expo-file-system":"expo-file-system.ts","expo-linking":"expo-linking.ts","expo-web-browser":"expo-web-browser.ts","expo-secure-store":"expo-secure-store.ts","expo-status-bar":"expo-status-bar.ts","expo-device":"expo-device.ts","expo-image-picker":"expo-image-picker.ts","expo-document-picker":"expo-document-picker.ts","expo-application":"expo-application.ts","expo-notifications":"expo-notifications.ts","expo-location":"expo-location.ts","@shopify/flash-list":"flash-list.ts","@react-native-community/netinfo":"netinfo.ts","@react-native-community/blur":"react-native-community-blur.ts","@react-native-community/checkbox":"react-native-community-checkbox.ts","@react-native-picker/picker":"react-native-picker.ts","@react-native-community/datetimepicker":"react-native-datetimepicker.ts"},q=["react","react-dom","react-reconciler","react/jsx-runtime","react/jsx-dev-runtime","canvaskit-wasm","canvaskit-wasm/full","yoga-layout"],F=[/^expo-/,/^react-native-/,/^@react-native\//,/^@react-native-community\//,/^@expo\//,/^expo$/];function k(e){return e.startsWith("@")?e.split("/").slice(0,2).join("/"):e.split("/")[0]}function L(e){return F.some(t=>t.test(e))}function b(e,t){try{return g.existsSync(a.join(t,"node_modules",e))}catch{return!1}}function te(e={}){let t=e.app?a.resolve(e.app):"",i=(e.sources||[]).map(r=>a.resolve(r)),n=new Set([...q,...e.ownedPackages||[]]);function s(r){return r.includes("/node_modules/")?!1:t&&r.startsWith(t)?!0:i.some(l=>r.startsWith(l))}return[M(),B(),J(t,i),C(),D(),V(s),G(s),z(t,s,n),U(s),Z(t),H(s)]}function M(){let e=null;return{name:"sootsim-ws-bridge",configureServer(t){e||(import("./bridge-host-2EY7Z4AO.js").then(({SootSimBridgeHost:i})=>{e=new i({port:7668}),e.start?.({silent:!0})}).catch(i=>{let n=i instanceof Error?i.message:String(i);console.warn("[sootsim] ws bridge failed to start:",n)}),t.httpServer?.on("close",()=>{e&&(e.close?.(),e=null)}))}}}function J(e,t){return{name:"sootsim-config",config(i,{mode:n}){let s=["."];for(let o of t)s.push(o);if(e){s.push(e);let o=a.join(e,"node_modules");g.existsSync(o)&&s.push(o)}let r=Object.entries(T).sort((o,c)=>c[0].length-o[0].length).map(([o,c])=>({find:o,replacement:a.resolve(d,c)})),l=["react","react-dom","react/jsx-runtime","react/jsx-dev-runtime"];e||l.push(...h);let m=["@tamagui/config","@tamagui/demos","react-native",...e?[]:h,"react-native-actions-sheet","@gorhom/bottom-sheet","@gorhom/portal"];return{define:{"process.env.NODE_ENV":JSON.stringify(n),"process.env.TEST_NATIVE_PLATFORM":JSON.stringify(""),"process.env.TAMAGUI_TARGET":JSON.stringify("native"),global:"globalThis"},optimizeDeps:{include:["react","react-dom","react-dom/client","react-reconciler","react-reconciler/constants","react/jsx-runtime","react/jsx-dev-runtime","@react-native/normalize-color","invariant","nanoid/non-secure"],exclude:m,rolldownOptions:{resolve:{conditionNames:["react-native","import","require"],mainFields:["react-native","module","jsnext:main","jsnext"],extensions:[".ios.tsx",".ios.ts",".ios.jsx",".ios.js",".native.tsx",".native.ts",".native.jsx",".native.js",".native.mjs",".mjs",".js",".mts",".ts",".jsx",".tsx",".json"]},plugins:[{name:"sootsim-stub-images",resolveId(o,c){if(/\.(jpg|png|gif)$/.test(o)&&c?.includes("node_modules"))return{id:"\0stub-image"}},load(o){if(o==="\0stub-image")return'export default ""'}}]}},build:{target:"esnext"},oxc:{target:"esnext"},server:{fs:{allow:s}},resolve:{dedupe:l,conditions:["react-native","import","require"],mainFields:["react-native","module","jsnext:main","jsnext"],extensions:[".ios.tsx",".ios.ts",".ios.jsx",".ios.js",".native.tsx",".native.ts",".native.jsx",".native.js",".native.mjs",".mjs",".js",".mts",".ts",".jsx",".tsx",".json"],alias:[...Object.entries(P).map(([o,c])=>({find:o,replacement:c})),{find:/^react-native\/Libraries\/.*/,replacement:w},{find:"react-native",replacement:v},{find:"react-native-web",replacement:v},...r]}}}}}function B(){let e=!1,t=0,i=0;return{name:"sootsim-react-bridge",enforce:"pre",configResolved(n){e=n.command==="build",console.log("[react-bridge-plugin] isBuild:",e)},async resolveId(n,s,r){if(n!=="react"||!s)return null;if((s.includes("/compat/")||s.includes("/sootsim/src/")||s.includes("/sootsim-engine/src/"))&&(i++,i<=5)){let m=r?.scan||r?.ssr||e;m||console.log("[react-bridge-plugin] react import from:",s.split("/").slice(-3).join("/"),"skip:",m)}return r?.scan||r?.ssr||e||!(s.includes("/sootsim/src/")||s.includes("/sootsim-engine/src/")||s.includes("/compat/src/")||s.includes("react-reconciler"))||s.includes("react-bridge")||s.includes("stub-registry")?null:(t++,t<=10?console.log("[react-bridge-plugin] REDIRECTING:",s.split("/").slice(-3).join("/")):t===11&&console.log("[react-bridge-plugin] ... more redirects"),{id:R,external:!1})}}}function se(){return{name:"sootsim-worker-react-bridge",enforce:"pre",async resolveId(e,t,i){return e!=="react"||!t||i?.scan||i?.ssr||!(t.includes("/sootsim/src/")||t.includes("/sootsim-engine/src/")||t.includes("/compat/src/")||t.includes("react-reconciler"))||t.includes("react-bridge")||t.includes("stub-registry")?null:{id:R,external:!1}}}}function C(){return{name:"sootsim-fix-jsx-runtime",enforce:"pre",async resolveId(e,t,i){if(e==="react/jsx-runtime"||e==="react/jsx-dev-runtime"){let n=await this.resolve(e,t,{...i,skipSelf:!0});return n?(e==="react/jsx-runtime"?"\0sootsim:jsx-runtime:":"\0sootsim:jsx-dev-runtime:")+n.id:null}return null},load(e){if(e.startsWith("\0sootsim:jsx-runtime:")){let t=e.slice(21);return[`import * as _mod from ${JSON.stringify(t)};`,"const _m = _mod.default || _mod;","export const jsx = _m.jsx || _mod.jsx;","export const jsxs = _m.jsxs || _mod.jsxs;","export const Fragment = _m.Fragment || _mod.Fragment;"].join(`
3
+ `)}if(e.startsWith("\0sootsim:jsx-dev-runtime:")){let t=e.slice(25);return[`import * as _mod from ${JSON.stringify(t)};`,'import * as _runtime from "react/jsx-runtime";',"const _m = _mod.default || _mod;","export const jsxDEV = _m.jsxDEV || _mod.jsxDEV || _m.jsx || _mod.jsx || _runtime.jsx;","export const Fragment = _m.Fragment || _mod.Fragment || _runtime.Fragment;"].join(`
4
+ `)}return null}}}function D(){return{name:"sootsim-node-modules-jsx",enforce:"pre",async transform(e,t){if(!t.includes("/node_modules/")||!t.endsWith(".js")||!e.includes("<")||!/[=(\s,]<[A-Z]/.test(e)&&!/<\/[A-Z]/.test(e))return null;let n=!e.includes("import React")&&!e.includes("import * as React")?`import React from 'react';
5
+ ${e}`:e,s=await j(n,t,{loader:"jsx"});return{code:s.code,map:s.map}}}}function V(e){let t=[".ios.tsx",".ios.ts",".ios.jsx",".ios.js",".native.tsx",".native.ts",".native.jsx",".native.js",".native.mjs"],i=[...t,".tsx",".ts",".jsx",".js",".mjs",".cjs"];function n(s){for(let r of t){let l=s+r;try{if(g.existsSync(l))return l}catch{}}for(let r of t){let l=a.join(s,"index"+r);try{if(g.existsSync(l))return l}catch{}}return null}return{name:"sootsim-metro-native-resolve",enforce:"pre",resolveId(s,r){if(!r||!r.includes("node_modules")&&!e(r)||!s.startsWith(".")||t.some(o=>s.endsWith(o)))return null;let l=i.some(o=>s.endsWith(o)),m=a.dirname(r);if(l){let o=a.resolve(m,s);for(let c of i)if(s.endsWith(c)){let f=n(o.slice(0,-c.length));if(f)return f;break}}else{let o=n(a.resolve(m,s));if(o)return o}return null}}}function G(e){return{name:"sootsim-react-native-require",enforce:"pre",transform(t,i){if(!i.includes("node_modules")&&!e(i)||!t.includes("react-native"))return null;let n=!1,s="",r=t,l=0;(r.includes('require("react-native")')||r.includes("require('react-native')"))&&(s+=`import * as __soot_rn_shim__ from ${JSON.stringify(v)};
6
+ `,r=r.replace(/require\(["']react-native["']\)/g,"__soot_rn_shim__"),n=!0);let m=/require\(["'](react-native\/Libraries\/[^"']+)["']\)/g,o=[],c=new Map,f;for(m.lastIndex=0;(f=m.exec(r))!==null;){let u=f[1];if(!c.has(u)){let p=`__soot_rn_lib_${l++}__`,S=P[u]||w;s+=`import * as ${p} from ${JSON.stringify(S)};
7
+ `,c.set(u,p)}o.push({full:f[0],path:u,varName:c.get(u)})}if(o.length>0){for(let u of o)r=r.replace(u.full,u.varName);n=!0}return n?{code:s+r,map:null}:null}}}function z(e,t,i){if(!e)return{name:"sootsim-external-app-resolve"};let n=a.join(e,"_virtual_.js");return{name:"sootsim-external-app-resolve",enforce:"pre",async resolveId(s,r,l){return!r||s.startsWith(".")||s.startsWith("/")||s.startsWith("\0")||i.has(s)||i.has(k(s))||!t(r)&&!r.includes(a.join(e,"node_modules"))||s==="react-native"||s.startsWith("react-native/")?null:await this.resolve(s,n,{...l,skipSelf:!0})||null}}}function U(e){return{name:"sootsim-external-app-transform",enforce:"pre",async transform(t,i){if(!e(i))return null;let n=t,s="",r=0,l=!1;if(t.includes("require(")){let m=/require\(["']([^"']+)["']\)/g,o=[],c=new Map,f;for(m.lastIndex=0;(f=m.exec(n))!==null;){let u=f[1];if(!(u==="react-native"||u.startsWith("react-native/"))){if(!c.has(u)){let p=`__soot_cjs_${r++}__`;s+=`import * as ${p} from ${JSON.stringify(u)};
8
+ `,c.set(u,p)}o.push({full:f[0],varName:c.get(u)})}}if(o.length>0){for(let u of o)n=n.replace(u.full,u.varName);l=!0}}if(s&&(n=s+n),i.endsWith(".js")&&n.includes("<")){let o=!n.includes("import React")&&!n.includes("import * as React")?`import React from 'react';
9
+ ${n}`:n,c=await j(o,i,{loader:"jsx"});return{code:c.code,map:c.map}}return l?{code:n,map:null}:null}}}function Z(e){let t=new Map;function i(n){let s=t.get(n);if(s!==void 0)return s;let r=b(n,x);return!r&&e&&(r=b(n,e)),t.set(n,r),r}return{name:"sootsim-stub-missing-native-deps",resolveId(n){if(!L(n))return null;let s=k(n);return i(s)?null:(console.log(`[sootsim] auto-stubbing missing native dep: ${n}`),O)}}}function H(e){return{name:"sootsim-stub-images",enforce:"pre",resolveId(t,i){return(t.endsWith(".jpg")||t.endsWith(".png")||t.endsWith(".gif"))&&(i?.includes("node_modules")||i&&e(i))?"\0stub-image":null},load(t){return t==="\0stub-image"?'export default ""':null}}}export{C as fixJsxRuntimeExports,te as sootsim,se as workerReactBridgePlugin,M as wsBridgePlugin};
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.0.1 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{d as n}from"./chunk-PWXPA745.js";import"./chunk-E522F5JW.js";async function s(){let o=await n();o?.token||(console.log(" not signed in"),process.exit(1));let e=o.user;console.log(` ${e?.email||e?.name||e?.id||"signed in"}`),console.log(` origin: ${o.origin}`),console.log(` updated: ${o.updatedAt}`)}export{s as runWhoami};
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "sootsim",
3
+ "version": "0.0.1",
4
+ "description": "sootsim CLI + vite/metro plugins + skills registry. bridge client for driving the proprietary sootsim-engine over WebSocket.",
5
+ "author": "Tamagui LLC",
6
+ "license": "MIT",
7
+ "type": "module",
8
+ "publishConfig": {
9
+ "access": "public"
10
+ },
11
+ "exports": {
12
+ ".": "./src/index.ts",
13
+ "./config": "./src/config.ts",
14
+ "./auth/shared-session": "./src/auth/shared-session.ts",
15
+ "./vite": "./src/vite-plugin-one.ts",
16
+ "./vite-base": "./src/vite-plugin.ts",
17
+ "./metro": "./src/metro-plugin.ts",
18
+ "./skills": "./src/skills/registry.ts",
19
+ "./cli/registry": "./cli/registry.ts",
20
+ "./bridge-constants": "./src/bridge-constants.ts",
21
+ "./cli-constants": "./src/cli-constants.ts",
22
+ "./dev-bundle-resolution": "./src/dev-bundle-resolution.ts",
23
+ "./render-mode": "./src/render-mode.ts",
24
+ "./host/bridge-host": "./src/host/bridge-host.ts",
25
+ "./scripts/dev-server-scanner": "./scripts/dev-server-scanner.ts",
26
+ "./scripts/demo-app-registry": "./scripts/demo-app-registry.ts",
27
+ "./detox": "./detox/index.ts",
28
+ "./detox/jest-preset": "./detox/jest-preset.cjs",
29
+ "./package.json": "./package.json"
30
+ },
31
+ "bin": {
32
+ "sootsim": "./dist-cli/bin.js"
33
+ },
34
+ "files": [
35
+ "dist-cli/",
36
+ "README.md",
37
+ "LICENSE"
38
+ ],
39
+ "scripts": {
40
+ "build": "bun scripts/build-cli.ts",
41
+ "build:cli": "bun scripts/build-cli.ts",
42
+ "build:cli-binary": "bun scripts/build-cli-binary.ts",
43
+ "typecheck": "tsc --noEmit"
44
+ },
45
+ "dependencies": {
46
+ "ws": "^8.18.0"
47
+ },
48
+ "devDependencies": {
49
+ "@soot/sootsim-skills": "workspace:*",
50
+ "@types/ws": "^8.5.13",
51
+ "esbuild": ">=0.20.0",
52
+ "sootsim-engine": "workspace:*",
53
+ "typescript": "^5.7.0",
54
+ "yaml": "^2.8.3"
55
+ }
56
+ }