sootsim 0.1.185 → 0.1.187
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cli/bin.js +3 -3
- package/dist-cli/chunks/{agent-VF756RZU.js → agent-LRKJIWBT.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-IAFL7ROV.js → agent-wrapper-7366QMW3.js} +2 -2
- package/dist-cli/chunks/{app-fonts-VWLEC7ZA.js → app-fonts-WIJGM2Q3.js} +2 -2
- package/dist-cli/chunks/{assert-I55QVGG7.js → assert-XH4UWOXZ.js} +2 -2
- package/dist-cli/chunks/beta-HKL7ZI2G.js +2 -0
- package/dist-cli/chunks/{camera-CYYBJH7W.js → camera-RKBTE4X7.js} +2 -2
- package/dist-cli/chunks/{chunk-4OUQAR34.js → chunk-2YX77KNA.js} +1 -1
- package/dist-cli/chunks/{chunk-TNHF6BON.js → chunk-4MSD5YEY.js} +1 -1
- package/dist-cli/chunks/{chunk-PKZNXDUJ.js → chunk-5MHGK7K5.js} +2 -2
- package/dist-cli/chunks/chunk-6DUOFTWZ.js +118 -0
- package/dist-cli/chunks/chunk-7OSC6Q5I.js +1 -0
- package/dist-cli/chunks/{chunk-TUF6EPCQ.js → chunk-7PXPUUCL.js} +2 -2
- package/dist-cli/chunks/{chunk-FY6DJGOS.js → chunk-7ZCLPWN7.js} +39 -15
- package/dist-cli/chunks/{chunk-LI4RLX6B.js → chunk-A6YGOAVQ.js} +1 -1
- package/dist-cli/chunks/{chunk-LJ3SOZBF.js → chunk-C3TVJ3MM.js} +2 -2
- package/dist-cli/chunks/{chunk-ARNLQPMQ.js → chunk-DVMV4JPO.js} +2 -2
- package/dist-cli/chunks/{chunk-M3P67TBN.js → chunk-ECNEUGXI.js} +1 -1
- package/dist-cli/chunks/{chunk-X4KS33ZC.js → chunk-ED7KWTZI.js} +2 -2
- package/dist-cli/chunks/{chunk-TFZO277G.js → chunk-EUJGZMDY.js} +1 -1
- package/dist-cli/chunks/{chunk-K2THZIVC.js → chunk-EXXEJKHE.js} +1 -1
- package/dist-cli/chunks/{chunk-HQG4DRQ3.js → chunk-FCEZIUSK.js} +1 -1
- package/dist-cli/chunks/{chunk-DZLBZGHN.js → chunk-FCYL4LNR.js} +2 -2
- package/dist-cli/chunks/chunk-FHK4ZNGV.js +5 -0
- package/dist-cli/chunks/{chunk-C3UEINOZ.js → chunk-FN7PINUE.js} +2 -2
- package/dist-cli/chunks/{chunk-NL5IFN4T.js → chunk-FTWRQ4GJ.js} +2 -2
- package/dist-cli/chunks/{chunk-BI56RR3G.js → chunk-FUA7CGJ3.js} +4 -4
- package/dist-cli/chunks/{chunk-EXFB33AZ.js → chunk-FUYTE2KH.js} +2 -2
- package/dist-cli/chunks/{chunk-R4KLD4P4.js → chunk-HCPE77ID.js} +2 -2
- package/dist-cli/chunks/{chunk-2T73IGB2.js → chunk-ILF5TI6Y.js} +2 -2
- package/dist-cli/chunks/{chunk-E5DE33BU.js → chunk-JCVOSH3U.js} +1 -1
- package/dist-cli/chunks/{chunk-WBY4JJ2K.js → chunk-JUAUV4UZ.js} +2 -2
- package/dist-cli/chunks/chunk-L4Z2UJX5.js +2 -0
- package/dist-cli/chunks/{chunk-FUHXL6BW.js → chunk-N64V23HY.js} +1 -1
- package/dist-cli/chunks/{chunk-QQ4NSPAD.js → chunk-NXBBBNH5.js} +2 -2
- package/dist-cli/chunks/{chunk-FHJTTB3W.js → chunk-O67BWHYY.js} +2 -2
- package/dist-cli/chunks/{chunk-C63EVPDN.js → chunk-OXS4KYCN.js} +2 -2
- package/dist-cli/chunks/{chunk-WEJKLJ4B.js → chunk-RFIK5SZF.js} +2 -2
- package/dist-cli/chunks/{chunk-GX6MKIFC.js → chunk-TF6TFVED.js} +1 -1
- package/dist-cli/chunks/chunk-TJMPYMXV.js +382 -0
- package/dist-cli/chunks/{chunk-QTFCJYBF.js → chunk-TXSPFIUO.js} +3 -3
- package/dist-cli/chunks/chunk-UBOHWJ5L.js +987 -0
- package/dist-cli/chunks/chunk-VZ4HTOAC.js +24 -0
- package/dist-cli/chunks/{chunk-BMCBPMTC.js → chunk-WDFDPB4M.js} +1 -1
- package/dist-cli/chunks/{chunk-MADEJDFD.js → chunk-WKGGTXDO.js} +1 -1
- package/dist-cli/chunks/chunk-XFDPG5AN.js +1 -0
- package/dist-cli/chunks/chunk-XJ3ANS4C.js +13 -0
- package/dist-cli/chunks/{chunk-4NUQVW5P.js → chunk-XLAWETKN.js} +17 -6
- package/dist-cli/chunks/{chunk-CYBRFHPU.js → chunk-XVI2A5KE.js} +2 -2
- package/dist-cli/chunks/{chunk-IJP257WP.js → chunk-Y77CNEAC.js} +1 -1
- package/dist-cli/chunks/{chunk-PIUKLO3W.js → chunk-ZR6PIQPZ.js} +1 -1
- package/dist-cli/chunks/cli-version-XGZD3TZF.js +2 -0
- package/dist-cli/chunks/{compat-ZJA3N4ZT.js → compat-XGX4RAXQ.js} +3 -3
- package/dist-cli/chunks/control-M76KO3SL.js +2 -0
- package/dist-cli/chunks/{cpu-profile-ACSQMVXY.js → cpu-profile-YJRYOP7N.js} +2 -2
- package/dist-cli/chunks/daemon-XRE3ZJ3A.js +2 -0
- package/dist-cli/chunks/{debug-W2ZOVTQO.js → debug-W4VWXPA4.js} +9 -6
- package/dist-cli/chunks/{detox-ANJO6T27.js → detox-EGVU4YL6.js} +2 -2
- package/dist-cli/chunks/{device-KPPN4KYD.js → device-XGK2VNF5.js} +2 -2
- package/dist-cli/chunks/{diagnose-5PEJYGES.js → diagnose-DI4BFQBP.js} +2 -2
- package/dist-cli/chunks/drivers-O6BFN76G.js +2 -0
- package/dist-cli/chunks/{electron-U456QLSQ.js → electron-3BE5EPSM.js} +3 -3
- package/dist-cli/chunks/flow-6WB3FX4N.js +2 -0
- package/dist-cli/chunks/help-BXNU6OAS.js +2 -0
- package/dist-cli/chunks/{hints-MBBQLMQU.js → hints-E7NSLFDT.js} +2 -2
- package/dist-cli/chunks/{home-paths-KQKYP2SE.js → home-paths-UASDA6NF.js} +2 -2
- package/dist-cli/chunks/inspect-Z33SVDQJ.js +2 -0
- package/dist-cli/chunks/{install-desktop-OR6ZJ43X.js → install-desktop-KFWZQGHM.js} +3 -3
- package/dist-cli/chunks/{keys-JSQMBUE7.js → keys-C5T4EK3E.js} +2 -2
- package/dist-cli/chunks/{login-DVMWAI3G.js → login-IB6EEROJ.js} +4 -4
- package/dist-cli/chunks/{logout-RIVPFE5N.js → logout-UPNDZL6K.js} +2 -2
- package/dist-cli/chunks/{maestro-TX6FPTVH.js → maestro-IU2V4VZI.js} +2 -2
- package/dist-cli/chunks/optional-demo-registry-P67F7BGJ.js +2 -0
- package/dist-cli/chunks/{preview-3AD7WNA6.js → preview-JBLUMPDD.js} +2 -2
- package/dist-cli/chunks/{profile-HY55VFNR.js → profile-SNBM3CDF.js} +2 -2
- package/dist-cli/chunks/{react-HDRCKCKV.js → react-SDFO4G5R.js} +2 -2
- package/dist-cli/chunks/{record-HW4C7QYN.js → record-ZWXDWCCP.js} +2 -2
- package/dist-cli/chunks/runtime-KQQS4SNR.js +2 -0
- package/dist-cli/chunks/{screenshot-XFR3QN5T.js → screenshot-CVHGCLGS.js} +2 -2
- package/dist-cli/chunks/{screenshot-mode-Y5CVO267.js → screenshot-mode-NDTW64AM.js} +2 -2
- package/dist-cli/chunks/{screenshots-RKUL2ZZT.js → screenshots-V6STBJXN.js} +2 -2
- package/dist-cli/chunks/{screenshots-capture-RVNF75ZD.js → screenshots-capture-6WYQMQ2U.js} +2 -2
- package/dist-cli/chunks/{serve-QMRYLWL5.js → serve-PW4LITPE.js} +16 -16
- package/dist-cli/chunks/{setup-ELNJS7AI.js → setup-CGNDZVXB.js} +3 -3
- package/dist-cli/chunks/{skills-GPSJYS4W.js → skills-KOK2FNL2.js} +2 -2
- package/dist-cli/chunks/{slides-OCFNPIFG.js → slides-3PLFSQMQ.js} +2 -2
- package/dist-cli/chunks/store-FSEOWL7R.js +2 -0
- package/dist-cli/chunks/{telemetry-KFZQUFG5.js → telemetry-B7LYDPT5.js} +2 -2
- package/dist-cli/chunks/telemetry-XACCAQXE.js +2 -0
- package/dist-cli/chunks/{test-Z2HZXCZM.js → test-RE7DJ2VV.js} +3 -3
- package/dist-cli/chunks/{three-mode-NKJFCDYS.js → three-mode-3IDJZUWE.js} +2 -2
- package/dist-cli/chunks/{timeline-PRGQMQRR.js → timeline-VSAVV7SE.js} +2 -2
- package/dist-cli/chunks/{upgrade-3NW7JRRX.js → upgrade-N7F4A22A.js} +2 -2
- package/dist-cli/chunks/upload-5YUE5AXH.js +2 -0
- package/dist-cli/chunks/{version-FDTZRIYT.js → version-NI3AUFKF.js} +2 -2
- package/dist-cli/chunks/{web-4N5QQEQJ.js → web-B4BOB3BY.js} +2 -2
- package/dist-cli/chunks/{what-happened-IX2RRCOS.js → what-happened-J6KHS3NN.js} +2 -2
- package/dist-cli/chunks/{whoami-QZ42FYYF.js → whoami-JX2QC2MC.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 +2 -2
- package/dist-lib/host/bridge-host.cjs +77 -44
- 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 +28 -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 +28 -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 +39 -12
- package/dist-lib/sdk.mjs +39 -12
- package/dist-lib/skills.cjs +283 -254
- package/dist-lib/vite.cjs +28 -1
- package/package.json +1 -1
- package/src/home-paths.ts +8 -1
- package/src/host/bridge-host.ts +15 -1
- package/src/runtime-assets.ts +70 -0
- package/src/vite-plugin.ts +9 -0
- package/dist-cli/chunks/beta-X6YPQVZH.js +0 -2
- package/dist-cli/chunks/chunk-7OAUPGLN.js +0 -23
- package/dist-cli/chunks/chunk-IGJHME3T.js +0 -1
- package/dist-cli/chunks/chunk-JRL7PFNZ.js +0 -463
- package/dist-cli/chunks/chunk-KOKIECMB.js +0 -118
- package/dist-cli/chunks/chunk-OAHGYDJR.js +0 -13
- package/dist-cli/chunks/chunk-PDLQWZN4.js +0 -2
- package/dist-cli/chunks/chunk-SL6565MR.js +0 -1
- package/dist-cli/chunks/chunk-V4M2R6FZ.js +0 -2
- package/dist-cli/chunks/chunk-V5JEPE3P.js +0 -5
- package/dist-cli/chunks/chunk-XU5EMZ4B.js +0 -264
- package/dist-cli/chunks/cli-version-ICHQMND6.js +0 -2
- package/dist-cli/chunks/control-CZFSYSYG.js +0 -2
- package/dist-cli/chunks/daemon-337B4P3B.js +0 -2
- package/dist-cli/chunks/drivers-MSDIFHBD.js +0 -2
- package/dist-cli/chunks/flow-JL3SC6HC.js +0 -2
- package/dist-cli/chunks/help-PA4RTR5X.js +0 -2
- package/dist-cli/chunks/inspect-ZP5SM4EW.js +0 -987
- package/dist-cli/chunks/optional-demo-registry-ONYG6DUI.js +0 -2
- package/dist-cli/chunks/runtime-RHHPW5WO.js +0 -2
- package/dist-cli/chunks/store-MBKDUQEQ.js +0 -2
- package/dist-cli/chunks/telemetry-46XXIUEE.js +0 -2
- package/dist-cli/chunks/upload-QVDVJ6ZK.js +0 -2
package/dist-lib/sdk.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.187 | (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;
|
|
@@ -718,6 +718,7 @@ var WAIT_READY_PROBE = `(async () => {
|
|
|
718
718
|
let externalReady = null
|
|
719
719
|
let externalStatus = ''
|
|
720
720
|
let externalError = ''
|
|
721
|
+
let suppressedEntryError = ''
|
|
721
722
|
try {
|
|
722
723
|
const getExternalAppState = t?.getExternalAppState
|
|
723
724
|
const external = typeof getExternalAppState === 'function'
|
|
@@ -742,10 +743,16 @@ var WAIT_READY_PROBE = `(async () => {
|
|
|
742
743
|
if (typeof state.error === 'string') externalError = state.error
|
|
743
744
|
}
|
|
744
745
|
if (!externalError && Array.isArray(external?.entryErrors)) {
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
746
|
+
// suppressed-and-continued entry errors (bundle-loader's patched __r
|
|
747
|
+
// swallows entry throws and moves on) must NOT gate readiness \u2014 the
|
|
748
|
+
// app frequently runs fine after one (e.g. metro's "Unknown named
|
|
749
|
+
// module" probing noise). they surface separately as a diagnostic
|
|
750
|
+
// for the timeout path.
|
|
751
|
+
const isReal = (item) => item && typeof item.message === 'string' && item.message.trim()
|
|
752
|
+
const fatal = external.entryErrors.find((item) => isReal(item) && item.suppressed !== true)
|
|
753
|
+
if (fatal) externalError = fatal.message
|
|
754
|
+
const suppressed = external.entryErrors.find((item) => isReal(item) && item.suppressed === true)
|
|
755
|
+
if (suppressed) suppressedEntryError = suppressed.message
|
|
749
756
|
}
|
|
750
757
|
if (externalReady === false && externalStatus) loadingText = externalStatus
|
|
751
758
|
} catch {}
|
|
@@ -761,6 +768,7 @@ var WAIT_READY_PROBE = `(async () => {
|
|
|
761
768
|
externalReady,
|
|
762
769
|
externalStatus,
|
|
763
770
|
externalError,
|
|
771
|
+
suppressedEntryError,
|
|
764
772
|
}
|
|
765
773
|
})()`;
|
|
766
774
|
var READY_CONTENT_NODE_FLOOR = 100;
|
|
@@ -773,7 +781,8 @@ function readyProbeHasTargetContent(probe) {
|
|
|
773
781
|
return probe.targets > 0;
|
|
774
782
|
}
|
|
775
783
|
function waitReadyReason(status) {
|
|
776
|
-
|
|
784
|
+
const base = status.externalError ? `guest app errored: ${status.externalError}` : status.loadingText ? `still showing "${status.loadingText}"` : status.externalReady === false ? "guest app is still loading" : status.flag !== true && status.targets > 0 ? "native content is rendered but the ready signal has not settled" : status.flag !== true ? "guest app has not emitted sootsim:externalAppReady" : status.targets <= 0 ? "ready flag emitted but no visible app content is inspectable yet" : "node tree is still changing";
|
|
785
|
+
return !status.externalError && status.suppressedEntryError ? `${base} (suppressed entry error: ${status.suppressedEntryError})` : base;
|
|
777
786
|
}
|
|
778
787
|
async function inspectWaitReady(bridge, timeoutMs = 2e4, options = {}) {
|
|
779
788
|
const start = Date.now();
|
|
@@ -791,7 +800,8 @@ async function inspectWaitReady(bridge, timeoutMs = 2e4, options = {}) {
|
|
|
791
800
|
loadingText: "",
|
|
792
801
|
externalReady: null,
|
|
793
802
|
externalStatus: "",
|
|
794
|
-
externalError: ""
|
|
803
|
+
externalError: "",
|
|
804
|
+
suppressedEntryError: ""
|
|
795
805
|
};
|
|
796
806
|
while (Date.now() < deadline) {
|
|
797
807
|
try {
|
|
@@ -809,6 +819,7 @@ async function inspectWaitReady(bridge, timeoutMs = 2e4, options = {}) {
|
|
|
809
819
|
externalReady: last.externalReady,
|
|
810
820
|
externalStatus: last.externalStatus,
|
|
811
821
|
externalError: last.externalError,
|
|
822
|
+
suppressedEntryError: last.suppressedEntryError,
|
|
812
823
|
errors: last.errors
|
|
813
824
|
};
|
|
814
825
|
if (last.nodes !== lastNodes) {
|
|
@@ -843,6 +854,7 @@ async function inspectWaitReady(bridge, timeoutMs = 2e4, options = {}) {
|
|
|
843
854
|
externalReady: last.externalReady,
|
|
844
855
|
externalStatus: last.externalStatus,
|
|
845
856
|
externalError: last.externalError,
|
|
857
|
+
suppressedEntryError: last.suppressedEntryError,
|
|
846
858
|
errors: last.errors
|
|
847
859
|
};
|
|
848
860
|
}
|
|
@@ -1177,10 +1189,9 @@ async function inspectDebugFlags(bridge) {
|
|
|
1177
1189
|
return bridge.send({ type: "evaluate", code: "window.__sootsimDebug.flags()" });
|
|
1178
1190
|
}
|
|
1179
1191
|
async function inspectDebugFind(bridge, target) {
|
|
1180
|
-
const method = target === "sheets" ? "findSheets" : "findPortals";
|
|
1181
1192
|
return bridge.send({
|
|
1182
1193
|
type: "evaluate",
|
|
1183
|
-
code: `window.
|
|
1194
|
+
code: `window.__sootsimTest.debugFind(${JSON.stringify(target)})`
|
|
1184
1195
|
});
|
|
1185
1196
|
}
|
|
1186
1197
|
async function inspectDebugRecent(bridge, channel, limit = 50) {
|
|
@@ -1200,6 +1211,22 @@ async function inspectMemory(bridge) {
|
|
|
1200
1211
|
code: `(async () => {
|
|
1201
1212
|
const host = window.__sootsimRenderHost
|
|
1202
1213
|
const stats = host?.queryStats ? await host.queryStats() : null
|
|
1214
|
+
const shellRaw = window.__sootsimShellMemory
|
|
1215
|
+
? await window.__sootsimShellMemory()
|
|
1216
|
+
: null
|
|
1217
|
+
const shell = shellRaw && !shellRaw.error ? shellRaw : null
|
|
1218
|
+
const normalize = (m) =>
|
|
1219
|
+
m
|
|
1220
|
+
? {
|
|
1221
|
+
nodesRegistered: m.nodesRegistered ?? null,
|
|
1222
|
+
nodesDetached: m.nodesDetached ?? null,
|
|
1223
|
+
detachedTypes: m.detachedTypes ?? null,
|
|
1224
|
+
objects: m.objects ?? null,
|
|
1225
|
+
activeNativeAnimations: m.activeNativeAnimations ?? null,
|
|
1226
|
+
imageLoader: m.imageLoader ?? null,
|
|
1227
|
+
workerHeap: m.workerHeap ?? null,
|
|
1228
|
+
}
|
|
1229
|
+
: null
|
|
1203
1230
|
const hostMem = performance.memory
|
|
1204
1231
|
? {
|
|
1205
1232
|
usedJSHeapSize: performance.memory.usedJSHeapSize,
|
|
@@ -1208,13 +1235,13 @@ async function inspectMemory(bridge) {
|
|
|
1208
1235
|
}
|
|
1209
1236
|
: null
|
|
1210
1237
|
return {
|
|
1211
|
-
|
|
1212
|
-
|
|
1238
|
+
tenant: normalize(stats?.memory),
|
|
1239
|
+
shell: normalize(shell),
|
|
1213
1240
|
hostHeap: hostMem,
|
|
1214
1241
|
}
|
|
1215
1242
|
})()`
|
|
1216
1243
|
});
|
|
1217
|
-
return result ?? {
|
|
1244
|
+
return result ?? { tenant: null, shell: null, hostHeap: null };
|
|
1218
1245
|
}
|
|
1219
1246
|
function formatTimelineSummary(summary) {
|
|
1220
1247
|
if (summary.total === 0) return "nothing recorded";
|
package/dist-lib/sdk.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.187 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
|
|
3
3
|
// cli/commands/inspect/core.ts
|
|
4
4
|
function resolveMaxMsFlag(args, fallbackMs) {
|
|
@@ -628,6 +628,7 @@ var WAIT_READY_PROBE = `(async () => {
|
|
|
628
628
|
let externalReady = null
|
|
629
629
|
let externalStatus = ''
|
|
630
630
|
let externalError = ''
|
|
631
|
+
let suppressedEntryError = ''
|
|
631
632
|
try {
|
|
632
633
|
const getExternalAppState = t?.getExternalAppState
|
|
633
634
|
const external = typeof getExternalAppState === 'function'
|
|
@@ -652,10 +653,16 @@ var WAIT_READY_PROBE = `(async () => {
|
|
|
652
653
|
if (typeof state.error === 'string') externalError = state.error
|
|
653
654
|
}
|
|
654
655
|
if (!externalError && Array.isArray(external?.entryErrors)) {
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
656
|
+
// suppressed-and-continued entry errors (bundle-loader's patched __r
|
|
657
|
+
// swallows entry throws and moves on) must NOT gate readiness \u2014 the
|
|
658
|
+
// app frequently runs fine after one (e.g. metro's "Unknown named
|
|
659
|
+
// module" probing noise). they surface separately as a diagnostic
|
|
660
|
+
// for the timeout path.
|
|
661
|
+
const isReal = (item) => item && typeof item.message === 'string' && item.message.trim()
|
|
662
|
+
const fatal = external.entryErrors.find((item) => isReal(item) && item.suppressed !== true)
|
|
663
|
+
if (fatal) externalError = fatal.message
|
|
664
|
+
const suppressed = external.entryErrors.find((item) => isReal(item) && item.suppressed === true)
|
|
665
|
+
if (suppressed) suppressedEntryError = suppressed.message
|
|
659
666
|
}
|
|
660
667
|
if (externalReady === false && externalStatus) loadingText = externalStatus
|
|
661
668
|
} catch {}
|
|
@@ -671,6 +678,7 @@ var WAIT_READY_PROBE = `(async () => {
|
|
|
671
678
|
externalReady,
|
|
672
679
|
externalStatus,
|
|
673
680
|
externalError,
|
|
681
|
+
suppressedEntryError,
|
|
674
682
|
}
|
|
675
683
|
})()`;
|
|
676
684
|
var READY_CONTENT_NODE_FLOOR = 100;
|
|
@@ -683,7 +691,8 @@ function readyProbeHasTargetContent(probe) {
|
|
|
683
691
|
return probe.targets > 0;
|
|
684
692
|
}
|
|
685
693
|
function waitReadyReason(status) {
|
|
686
|
-
|
|
694
|
+
const base = status.externalError ? `guest app errored: ${status.externalError}` : status.loadingText ? `still showing "${status.loadingText}"` : status.externalReady === false ? "guest app is still loading" : status.flag !== true && status.targets > 0 ? "native content is rendered but the ready signal has not settled" : status.flag !== true ? "guest app has not emitted sootsim:externalAppReady" : status.targets <= 0 ? "ready flag emitted but no visible app content is inspectable yet" : "node tree is still changing";
|
|
695
|
+
return !status.externalError && status.suppressedEntryError ? `${base} (suppressed entry error: ${status.suppressedEntryError})` : base;
|
|
687
696
|
}
|
|
688
697
|
async function inspectWaitReady(bridge, timeoutMs = 2e4, options = {}) {
|
|
689
698
|
const start = Date.now();
|
|
@@ -701,7 +710,8 @@ async function inspectWaitReady(bridge, timeoutMs = 2e4, options = {}) {
|
|
|
701
710
|
loadingText: "",
|
|
702
711
|
externalReady: null,
|
|
703
712
|
externalStatus: "",
|
|
704
|
-
externalError: ""
|
|
713
|
+
externalError: "",
|
|
714
|
+
suppressedEntryError: ""
|
|
705
715
|
};
|
|
706
716
|
while (Date.now() < deadline) {
|
|
707
717
|
try {
|
|
@@ -719,6 +729,7 @@ async function inspectWaitReady(bridge, timeoutMs = 2e4, options = {}) {
|
|
|
719
729
|
externalReady: last.externalReady,
|
|
720
730
|
externalStatus: last.externalStatus,
|
|
721
731
|
externalError: last.externalError,
|
|
732
|
+
suppressedEntryError: last.suppressedEntryError,
|
|
722
733
|
errors: last.errors
|
|
723
734
|
};
|
|
724
735
|
if (last.nodes !== lastNodes) {
|
|
@@ -753,6 +764,7 @@ async function inspectWaitReady(bridge, timeoutMs = 2e4, options = {}) {
|
|
|
753
764
|
externalReady: last.externalReady,
|
|
754
765
|
externalStatus: last.externalStatus,
|
|
755
766
|
externalError: last.externalError,
|
|
767
|
+
suppressedEntryError: last.suppressedEntryError,
|
|
756
768
|
errors: last.errors
|
|
757
769
|
};
|
|
758
770
|
}
|
|
@@ -1087,10 +1099,9 @@ async function inspectDebugFlags(bridge) {
|
|
|
1087
1099
|
return bridge.send({ type: "evaluate", code: "window.__sootsimDebug.flags()" });
|
|
1088
1100
|
}
|
|
1089
1101
|
async function inspectDebugFind(bridge, target) {
|
|
1090
|
-
const method = target === "sheets" ? "findSheets" : "findPortals";
|
|
1091
1102
|
return bridge.send({
|
|
1092
1103
|
type: "evaluate",
|
|
1093
|
-
code: `window.
|
|
1104
|
+
code: `window.__sootsimTest.debugFind(${JSON.stringify(target)})`
|
|
1094
1105
|
});
|
|
1095
1106
|
}
|
|
1096
1107
|
async function inspectDebugRecent(bridge, channel, limit = 50) {
|
|
@@ -1110,6 +1121,22 @@ async function inspectMemory(bridge) {
|
|
|
1110
1121
|
code: `(async () => {
|
|
1111
1122
|
const host = window.__sootsimRenderHost
|
|
1112
1123
|
const stats = host?.queryStats ? await host.queryStats() : null
|
|
1124
|
+
const shellRaw = window.__sootsimShellMemory
|
|
1125
|
+
? await window.__sootsimShellMemory()
|
|
1126
|
+
: null
|
|
1127
|
+
const shell = shellRaw && !shellRaw.error ? shellRaw : null
|
|
1128
|
+
const normalize = (m) =>
|
|
1129
|
+
m
|
|
1130
|
+
? {
|
|
1131
|
+
nodesRegistered: m.nodesRegistered ?? null,
|
|
1132
|
+
nodesDetached: m.nodesDetached ?? null,
|
|
1133
|
+
detachedTypes: m.detachedTypes ?? null,
|
|
1134
|
+
objects: m.objects ?? null,
|
|
1135
|
+
activeNativeAnimations: m.activeNativeAnimations ?? null,
|
|
1136
|
+
imageLoader: m.imageLoader ?? null,
|
|
1137
|
+
workerHeap: m.workerHeap ?? null,
|
|
1138
|
+
}
|
|
1139
|
+
: null
|
|
1113
1140
|
const hostMem = performance.memory
|
|
1114
1141
|
? {
|
|
1115
1142
|
usedJSHeapSize: performance.memory.usedJSHeapSize,
|
|
@@ -1118,13 +1145,13 @@ async function inspectMemory(bridge) {
|
|
|
1118
1145
|
}
|
|
1119
1146
|
: null
|
|
1120
1147
|
return {
|
|
1121
|
-
|
|
1122
|
-
|
|
1148
|
+
tenant: normalize(stats?.memory),
|
|
1149
|
+
shell: normalize(shell),
|
|
1123
1150
|
hostHeap: hostMem,
|
|
1124
1151
|
}
|
|
1125
1152
|
})()`
|
|
1126
1153
|
});
|
|
1127
|
-
return result ?? {
|
|
1154
|
+
return result ?? { tenant: null, shell: null, hostHeap: null };
|
|
1128
1155
|
}
|
|
1129
1156
|
function formatTimelineSummary(summary) {
|
|
1130
1157
|
if (summary.total === 0) return "nothing recorded";
|