peachsim 0.1.2207 → 0.1.2209
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/cli/bridge-diagnostics.ts +4 -4
- package/cli/bridge-flow-runner.ts +33 -33
- package/cli/browser-evals.ts +2 -2
- package/cli/commands/control.ts +1 -1
- package/cli/commands/cpu-profile.ts +5 -4
- package/cli/commands/debug.ts +3 -3
- package/cli/commands/diagnose.ts +2 -2
- package/cli/commands/flow.ts +7 -7
- package/cli/commands/inspect/core.ts +22 -22
- package/cli/commands/inspect/get-node.ts +2 -2
- package/cli/commands/inspect/shared.ts +2 -2
- package/cli/commands/inspect/wait-event.ts +1 -1
- package/cli/commands/inspect.ts +33 -33
- package/cli/commands/record-three.ts +17 -17
- package/cli/commands/record.ts +44 -40
- package/cli/commands/shell-boolean-mode.ts +1 -1
- package/cli/commands/slides.ts +5 -3
- package/cli/commands/three-mode.ts +3 -3
- package/cli/commands/upload.ts +8 -8
- package/cli/drivers/types.ts +1 -1
- package/cli/runtime-diagnostics.ts +2 -2
- package/cli/scene-video.ts +5 -3
- package/cli/send-to-box.ts +1 -1
- package/cli/ws-bridge.ts +3 -3
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.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/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +448 -22
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +4 -4
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +436 -16
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +449 -23
- package/dist-lib/host/fetch-proxy-handler.cjs +4 -4
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +10 -10
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +7 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +4 -4
- package/dist-lib/native-app-identity-project.cjs +2 -2
- package/dist-lib/native-app-identity-project.mjs +2 -2
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +24 -24
- package/dist-lib/public-origins-lib.json +59 -53
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +23 -23
- package/dist-lib/sdk.mjs +23 -23
- package/dist-lib/skills.cjs +5176 -75
- package/dist-lib/swift-compile.cjs +98 -6
- package/dist-lib/swift-compile.mjs +98 -6
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +351 -13
- package/dist-lib/vite.cjs +4 -4
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/animated.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/engine/animation-graph.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/canvaskit-webgpu.d.ts +8 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +14 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-runtime/render-tree.d.ts +18 -0
- package/dist-types/packages/peach-engine/src/settings/store.d.ts +1 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSCompoundPredicate.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSExpression.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSISO8601DateFormatter.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSMeasurementFormatter.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Intents.framework/Headers/INObjectCollection.h +27 -0
- package/sdk/ios/System/Library/Frameworks/Intents.framework/Headers/INObjectSection.h +24 -0
- package/sdk/ios/System/Library/Frameworks/Intents.framework/Headers/Intents.h +9 -0
- package/sdk/ios/System/Library/Frameworks/Intents.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIFeedbackGenerator.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIImpactFeedbackGenerator.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UINibLoading.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UINotificationFeedbackGenerator.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UISelectionFeedbackGenerator.h +1 -1
- package/sdk/ios/usr/include/ObjectiveC.apinotes +7 -0
- package/src/android-theme.ts +136 -2
- package/src/expo-swift-host.ts +90 -1
- package/src/generated/android-framework-text.json +4566 -0
- package/src/generated/android-framework-themes.json +11 -0
- package/src/kotlin-app.ts +24 -4
- package/src/kotlin-host.ts +9 -0
- package/src/nitro-adapter.lock.json +246 -246
- package/src/nitro-superset.lock.json +4 -4
- package/src/swift-compile.ts +120 -2
- package/src/swift-distribution.lock.json +8 -8
- package/src/swift-objc-standin.ts +9 -2
- package/src/swift-shared-sdk.ts +2 -1
- package/src/swift-standin-builtin-behavior.ts +248 -0
- package/src/swift-standin-emit.ts +2 -0
- package/src/swift-standins.ts +17 -5
- package/src/turbo-runtime.lock.json +17 -17
package/dist-lib/sdk.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2209 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -192,7 +192,7 @@ function isInspectPickCommand(subcommand) {
|
|
|
192
192
|
async function isInspectModeActive(bridge) {
|
|
193
193
|
const active = await bridge.send({
|
|
194
194
|
type: "evaluate",
|
|
195
|
-
code: "
|
|
195
|
+
code: "globalThis.__sootsimEngineState?.inspectActive === true"
|
|
196
196
|
});
|
|
197
197
|
return active === true;
|
|
198
198
|
}
|
|
@@ -441,7 +441,7 @@ function layoutGetNativeEval(opts = {}) {
|
|
|
441
441
|
const includeStyle = opts.styling === true;
|
|
442
442
|
const filter = opts.filter?.trim().toLowerCase() ?? "";
|
|
443
443
|
return `(async () => {
|
|
444
|
-
const t =
|
|
444
|
+
const t = globalThis.__sootsimTest
|
|
445
445
|
if (!t || typeof t.listInspectable !== 'function') return []
|
|
446
446
|
const list = await t.listInspectable({})
|
|
447
447
|
if (!Array.isArray(list)) return []
|
|
@@ -605,7 +605,7 @@ function layoutGetNativeEval(opts = {}) {
|
|
|
605
605
|
const textElements = elements.filter((element) => element.text && element.fontSize > 0)
|
|
606
606
|
if (!includeStyle || textElements.length === 0) return elements
|
|
607
607
|
|
|
608
|
-
const screenshot =
|
|
608
|
+
const screenshot = globalThis.SootSim && globalThis.SootSim.bridges && globalThis.SootSim.bridges.screenshot
|
|
609
609
|
if (typeof screenshot !== 'function') {
|
|
610
610
|
throw new Error('styled native layout requires the peach capture bridge')
|
|
611
611
|
}
|
|
@@ -1183,10 +1183,10 @@ function consoleEntriesEval(level, limit) {
|
|
|
1183
1183
|
out.push({ timestamp: ts, args: Array.isArray(e.args) ? e.args : [e.args], stack: e.stack || undefined, source: e.source || undefined })
|
|
1184
1184
|
}
|
|
1185
1185
|
// page-realm ws-bridge buffer first (richest stacks for page-origin errors)
|
|
1186
|
-
try { for (const e of (
|
|
1186
|
+
try { for (const e of (globalThis.__sootsimConsole?.${getter}(${limit}) || [])) push(e) } catch {}
|
|
1187
1187
|
// engine observability store \u2014 the always-on render-worker / forwarded path
|
|
1188
1188
|
try {
|
|
1189
|
-
const obs =
|
|
1189
|
+
const obs = globalThis.__sootsimObservability
|
|
1190
1190
|
const snap = obs && obs.logs && typeof obs.logs.getSnapshot === 'function' ? obs.logs.getSnapshot() : []
|
|
1191
1191
|
for (const e of snap) if (e && e.level === ${JSON.stringify(level)}) push(e)
|
|
1192
1192
|
} catch {}
|
|
@@ -1222,12 +1222,12 @@ var MERGED_CONSOLE_COUNT_EVAL = `(() => {
|
|
|
1222
1222
|
else warnings++
|
|
1223
1223
|
}
|
|
1224
1224
|
try {
|
|
1225
|
-
const c =
|
|
1225
|
+
const c = globalThis.__sootsimConsole
|
|
1226
1226
|
for (const e of (c?.getErrors?.(200) || [])) add('error', e?.timestamp ?? e?.ts, e?.args)
|
|
1227
1227
|
for (const e of (c?.getWarnings?.(200) || [])) add('warn', e?.timestamp ?? e?.ts, e?.args)
|
|
1228
1228
|
} catch {}
|
|
1229
1229
|
try {
|
|
1230
|
-
const obs =
|
|
1230
|
+
const obs = globalThis.__sootsimObservability
|
|
1231
1231
|
const snap = obs && obs.logs && typeof obs.logs.getSnapshot === 'function' ? obs.logs.getSnapshot() : []
|
|
1232
1232
|
for (const e of snap) if (e) add(e.level, e.ts, e.args)
|
|
1233
1233
|
} catch {}
|
|
@@ -1236,7 +1236,7 @@ var MERGED_CONSOLE_COUNT_EVAL = `(() => {
|
|
|
1236
1236
|
async function clearConsole(bridge) {
|
|
1237
1237
|
await bridge.send({
|
|
1238
1238
|
type: "evaluate",
|
|
1239
|
-
code: '
|
|
1239
|
+
code: 'globalThis.__sootsimConsole?.clear(); globalThis.__sootsimObservability?.logs?.clear?.(); "cleared"'
|
|
1240
1240
|
});
|
|
1241
1241
|
}
|
|
1242
1242
|
async function inspectRequests(bridge, opts = {}) {
|
|
@@ -1303,7 +1303,7 @@ async function inspectLogs(bridge) {
|
|
|
1303
1303
|
const res = await bridge.send({
|
|
1304
1304
|
type: "evaluate",
|
|
1305
1305
|
code: `(() => {
|
|
1306
|
-
const obs =
|
|
1306
|
+
const obs = globalThis.__sootsimObservability;
|
|
1307
1307
|
if (!obs) return { ok: false };
|
|
1308
1308
|
return { ok: true, entries: obs.logs.getSnapshot() };
|
|
1309
1309
|
})()`
|
|
@@ -1314,7 +1314,7 @@ async function inspectLogs(bridge) {
|
|
|
1314
1314
|
async function clearLogs(bridge) {
|
|
1315
1315
|
await bridge.send({
|
|
1316
1316
|
type: "evaluate",
|
|
1317
|
-
code: '
|
|
1317
|
+
code: 'globalThis.__sootsimObservability?.logs.clear(); "cleared"'
|
|
1318
1318
|
});
|
|
1319
1319
|
}
|
|
1320
1320
|
function isForwardedWorkerLogTwin(a, b) {
|
|
@@ -1400,7 +1400,7 @@ async function inspectKeyboard(bridge) {
|
|
|
1400
1400
|
const result = await bridge.send({
|
|
1401
1401
|
type: "evaluate",
|
|
1402
1402
|
code: `(() => {
|
|
1403
|
-
const kb =
|
|
1403
|
+
const kb = globalThis.__sootsimKeyboard
|
|
1404
1404
|
if (!kb || typeof kb.getLayout !== 'function') {
|
|
1405
1405
|
return { error: 'keyboard bridge getLayout() not available' }
|
|
1406
1406
|
}
|
|
@@ -1432,8 +1432,8 @@ async function inspectScreens(bridge) {
|
|
|
1432
1432
|
const payload = await bridge.send({
|
|
1433
1433
|
type: "evaluate",
|
|
1434
1434
|
code: `(async () => {
|
|
1435
|
-
const test =
|
|
1436
|
-
const kb =
|
|
1435
|
+
const test = globalThis.__sootsimTest
|
|
1436
|
+
const kb = globalThis.__sootsimKeyboard
|
|
1437
1437
|
const navSnap =
|
|
1438
1438
|
test && typeof test.getNavigationSnapshot === 'function'
|
|
1439
1439
|
? await test.getNavigationSnapshot()
|
|
@@ -1476,7 +1476,7 @@ async function inspectDebugStatus(bridge, host = false) {
|
|
|
1476
1476
|
if (bridge.plane === "cloud" && !host) {
|
|
1477
1477
|
return (await inspectCloudDiagnostics(bridge)).channels;
|
|
1478
1478
|
}
|
|
1479
|
-
return bridge.send({ type: "evaluate", code: "
|
|
1479
|
+
return bridge.send({ type: "evaluate", code: "globalThis.__sootsimDebug.status()" });
|
|
1480
1480
|
}
|
|
1481
1481
|
async function inspectDebugFlags(bridge, host = false) {
|
|
1482
1482
|
if (bridge.plane === "cloud" && !host) {
|
|
@@ -1485,13 +1485,13 @@ async function inspectDebugFlags(bridge, host = false) {
|
|
|
1485
1485
|
availableChannels.map((channel) => [channel, channels.includes(channel)])
|
|
1486
1486
|
);
|
|
1487
1487
|
}
|
|
1488
|
-
return bridge.send({ type: "evaluate", code: "
|
|
1488
|
+
return bridge.send({ type: "evaluate", code: "globalThis.__sootsimDebug.flags()" });
|
|
1489
1489
|
}
|
|
1490
1490
|
async function inspectDebugChannels(bridge, host = false) {
|
|
1491
1491
|
if (bridge.plane === "cloud" && !host) {
|
|
1492
1492
|
return (await inspectCloudDiagnostics(bridge)).availableChannels;
|
|
1493
1493
|
}
|
|
1494
|
-
return bridge.send({ type: "evaluate", code: "
|
|
1494
|
+
return bridge.send({ type: "evaluate", code: "globalThis.__sootsimDebug.channels()" });
|
|
1495
1495
|
}
|
|
1496
1496
|
async function inspectDebugFind(bridge, target, host = false) {
|
|
1497
1497
|
if (bridge.plane === "cloud" && !host) {
|
|
@@ -1499,7 +1499,7 @@ async function inspectDebugFind(bridge, target, host = false) {
|
|
|
1499
1499
|
}
|
|
1500
1500
|
return bridge.send({
|
|
1501
1501
|
type: "evaluate",
|
|
1502
|
-
code: `
|
|
1502
|
+
code: `globalThis.__sootsimTest.debugFind(${JSON.stringify(target)})`
|
|
1503
1503
|
});
|
|
1504
1504
|
}
|
|
1505
1505
|
async function callDebugBridge(bridge, expression, host = false, project) {
|
|
@@ -1509,7 +1509,7 @@ async function callDebugBridge(bridge, expression, host = false, project) {
|
|
|
1509
1509
|
return bridge.send({
|
|
1510
1510
|
type: "evaluate",
|
|
1511
1511
|
code: `(async () => {
|
|
1512
|
-
const result = await
|
|
1512
|
+
const result = await globalThis.__sootsimTest.evalInTenant(${JSON.stringify(code)})
|
|
1513
1513
|
if (!result.ok) throw new Error(result.error)
|
|
1514
1514
|
return result.value
|
|
1515
1515
|
})()`
|
|
@@ -1582,17 +1582,17 @@ async function inspectMemory(bridge) {
|
|
|
1582
1582
|
const result = await bridge.send({
|
|
1583
1583
|
type: "evaluate",
|
|
1584
1584
|
code: `(async () => {
|
|
1585
|
-
const host =
|
|
1585
|
+
const host = globalThis.__sootsimRenderHost
|
|
1586
1586
|
const stats = host?.queryStats ? await host.queryStats() : null
|
|
1587
|
-
const shellRaw =
|
|
1588
|
-
? await
|
|
1587
|
+
const shellRaw = globalThis.__sootsimShellMemory
|
|
1588
|
+
? await globalThis.__sootsimShellMemory()
|
|
1589
1589
|
: null
|
|
1590
1590
|
const shell = shellRaw && !shellRaw.error ? shellRaw : null
|
|
1591
1591
|
// the compositor paints home + app:one + app:two, so every app-surface
|
|
1592
1592
|
// picture and raster image is counted here and nowhere else.
|
|
1593
1593
|
let compositor = null
|
|
1594
1594
|
try {
|
|
1595
|
-
const cs = await
|
|
1595
|
+
const cs = await globalThis.__sootsimCompositor?.getStats?.(false, true)
|
|
1596
1596
|
compositor = cs?.memory ?? null
|
|
1597
1597
|
} catch {}
|
|
1598
1598
|
const normalize = (m) =>
|
package/dist-lib/sdk.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2209 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
@@ -79,7 +79,7 @@ function isInspectPickCommand(subcommand) {
|
|
|
79
79
|
async function isInspectModeActive(bridge) {
|
|
80
80
|
const active = await bridge.send({
|
|
81
81
|
type: "evaluate",
|
|
82
|
-
code: "
|
|
82
|
+
code: "globalThis.__sootsimEngineState?.inspectActive === true"
|
|
83
83
|
});
|
|
84
84
|
return active === true;
|
|
85
85
|
}
|
|
@@ -328,7 +328,7 @@ function layoutGetNativeEval(opts = {}) {
|
|
|
328
328
|
const includeStyle = opts.styling === true;
|
|
329
329
|
const filter = opts.filter?.trim().toLowerCase() ?? "";
|
|
330
330
|
return `(async () => {
|
|
331
|
-
const t =
|
|
331
|
+
const t = globalThis.__sootsimTest
|
|
332
332
|
if (!t || typeof t.listInspectable !== 'function') return []
|
|
333
333
|
const list = await t.listInspectable({})
|
|
334
334
|
if (!Array.isArray(list)) return []
|
|
@@ -492,7 +492,7 @@ function layoutGetNativeEval(opts = {}) {
|
|
|
492
492
|
const textElements = elements.filter((element) => element.text && element.fontSize > 0)
|
|
493
493
|
if (!includeStyle || textElements.length === 0) return elements
|
|
494
494
|
|
|
495
|
-
const screenshot =
|
|
495
|
+
const screenshot = globalThis.SootSim && globalThis.SootSim.bridges && globalThis.SootSim.bridges.screenshot
|
|
496
496
|
if (typeof screenshot !== 'function') {
|
|
497
497
|
throw new Error('styled native layout requires the peach capture bridge')
|
|
498
498
|
}
|
|
@@ -1070,10 +1070,10 @@ function consoleEntriesEval(level, limit) {
|
|
|
1070
1070
|
out.push({ timestamp: ts, args: Array.isArray(e.args) ? e.args : [e.args], stack: e.stack || undefined, source: e.source || undefined })
|
|
1071
1071
|
}
|
|
1072
1072
|
// page-realm ws-bridge buffer first (richest stacks for page-origin errors)
|
|
1073
|
-
try { for (const e of (
|
|
1073
|
+
try { for (const e of (globalThis.__sootsimConsole?.${getter}(${limit}) || [])) push(e) } catch {}
|
|
1074
1074
|
// engine observability store \u2014 the always-on render-worker / forwarded path
|
|
1075
1075
|
try {
|
|
1076
|
-
const obs =
|
|
1076
|
+
const obs = globalThis.__sootsimObservability
|
|
1077
1077
|
const snap = obs && obs.logs && typeof obs.logs.getSnapshot === 'function' ? obs.logs.getSnapshot() : []
|
|
1078
1078
|
for (const e of snap) if (e && e.level === ${JSON.stringify(level)}) push(e)
|
|
1079
1079
|
} catch {}
|
|
@@ -1109,12 +1109,12 @@ var MERGED_CONSOLE_COUNT_EVAL = `(() => {
|
|
|
1109
1109
|
else warnings++
|
|
1110
1110
|
}
|
|
1111
1111
|
try {
|
|
1112
|
-
const c =
|
|
1112
|
+
const c = globalThis.__sootsimConsole
|
|
1113
1113
|
for (const e of (c?.getErrors?.(200) || [])) add('error', e?.timestamp ?? e?.ts, e?.args)
|
|
1114
1114
|
for (const e of (c?.getWarnings?.(200) || [])) add('warn', e?.timestamp ?? e?.ts, e?.args)
|
|
1115
1115
|
} catch {}
|
|
1116
1116
|
try {
|
|
1117
|
-
const obs =
|
|
1117
|
+
const obs = globalThis.__sootsimObservability
|
|
1118
1118
|
const snap = obs && obs.logs && typeof obs.logs.getSnapshot === 'function' ? obs.logs.getSnapshot() : []
|
|
1119
1119
|
for (const e of snap) if (e) add(e.level, e.ts, e.args)
|
|
1120
1120
|
} catch {}
|
|
@@ -1123,7 +1123,7 @@ var MERGED_CONSOLE_COUNT_EVAL = `(() => {
|
|
|
1123
1123
|
async function clearConsole(bridge) {
|
|
1124
1124
|
await bridge.send({
|
|
1125
1125
|
type: "evaluate",
|
|
1126
|
-
code: '
|
|
1126
|
+
code: 'globalThis.__sootsimConsole?.clear(); globalThis.__sootsimObservability?.logs?.clear?.(); "cleared"'
|
|
1127
1127
|
});
|
|
1128
1128
|
}
|
|
1129
1129
|
async function inspectRequests(bridge, opts = {}) {
|
|
@@ -1190,7 +1190,7 @@ async function inspectLogs(bridge) {
|
|
|
1190
1190
|
const res = await bridge.send({
|
|
1191
1191
|
type: "evaluate",
|
|
1192
1192
|
code: `(() => {
|
|
1193
|
-
const obs =
|
|
1193
|
+
const obs = globalThis.__sootsimObservability;
|
|
1194
1194
|
if (!obs) return { ok: false };
|
|
1195
1195
|
return { ok: true, entries: obs.logs.getSnapshot() };
|
|
1196
1196
|
})()`
|
|
@@ -1201,7 +1201,7 @@ async function inspectLogs(bridge) {
|
|
|
1201
1201
|
async function clearLogs(bridge) {
|
|
1202
1202
|
await bridge.send({
|
|
1203
1203
|
type: "evaluate",
|
|
1204
|
-
code: '
|
|
1204
|
+
code: 'globalThis.__sootsimObservability?.logs.clear(); "cleared"'
|
|
1205
1205
|
});
|
|
1206
1206
|
}
|
|
1207
1207
|
function isForwardedWorkerLogTwin(a, b) {
|
|
@@ -1287,7 +1287,7 @@ async function inspectKeyboard(bridge) {
|
|
|
1287
1287
|
const result = await bridge.send({
|
|
1288
1288
|
type: "evaluate",
|
|
1289
1289
|
code: `(() => {
|
|
1290
|
-
const kb =
|
|
1290
|
+
const kb = globalThis.__sootsimKeyboard
|
|
1291
1291
|
if (!kb || typeof kb.getLayout !== 'function') {
|
|
1292
1292
|
return { error: 'keyboard bridge getLayout() not available' }
|
|
1293
1293
|
}
|
|
@@ -1319,8 +1319,8 @@ async function inspectScreens(bridge) {
|
|
|
1319
1319
|
const payload = await bridge.send({
|
|
1320
1320
|
type: "evaluate",
|
|
1321
1321
|
code: `(async () => {
|
|
1322
|
-
const test =
|
|
1323
|
-
const kb =
|
|
1322
|
+
const test = globalThis.__sootsimTest
|
|
1323
|
+
const kb = globalThis.__sootsimKeyboard
|
|
1324
1324
|
const navSnap =
|
|
1325
1325
|
test && typeof test.getNavigationSnapshot === 'function'
|
|
1326
1326
|
? await test.getNavigationSnapshot()
|
|
@@ -1363,7 +1363,7 @@ async function inspectDebugStatus(bridge, host = false) {
|
|
|
1363
1363
|
if (bridge.plane === "cloud" && !host) {
|
|
1364
1364
|
return (await inspectCloudDiagnostics(bridge)).channels;
|
|
1365
1365
|
}
|
|
1366
|
-
return bridge.send({ type: "evaluate", code: "
|
|
1366
|
+
return bridge.send({ type: "evaluate", code: "globalThis.__sootsimDebug.status()" });
|
|
1367
1367
|
}
|
|
1368
1368
|
async function inspectDebugFlags(bridge, host = false) {
|
|
1369
1369
|
if (bridge.plane === "cloud" && !host) {
|
|
@@ -1372,13 +1372,13 @@ async function inspectDebugFlags(bridge, host = false) {
|
|
|
1372
1372
|
availableChannels.map((channel) => [channel, channels.includes(channel)])
|
|
1373
1373
|
);
|
|
1374
1374
|
}
|
|
1375
|
-
return bridge.send({ type: "evaluate", code: "
|
|
1375
|
+
return bridge.send({ type: "evaluate", code: "globalThis.__sootsimDebug.flags()" });
|
|
1376
1376
|
}
|
|
1377
1377
|
async function inspectDebugChannels(bridge, host = false) {
|
|
1378
1378
|
if (bridge.plane === "cloud" && !host) {
|
|
1379
1379
|
return (await inspectCloudDiagnostics(bridge)).availableChannels;
|
|
1380
1380
|
}
|
|
1381
|
-
return bridge.send({ type: "evaluate", code: "
|
|
1381
|
+
return bridge.send({ type: "evaluate", code: "globalThis.__sootsimDebug.channels()" });
|
|
1382
1382
|
}
|
|
1383
1383
|
async function inspectDebugFind(bridge, target, host = false) {
|
|
1384
1384
|
if (bridge.plane === "cloud" && !host) {
|
|
@@ -1386,7 +1386,7 @@ async function inspectDebugFind(bridge, target, host = false) {
|
|
|
1386
1386
|
}
|
|
1387
1387
|
return bridge.send({
|
|
1388
1388
|
type: "evaluate",
|
|
1389
|
-
code: `
|
|
1389
|
+
code: `globalThis.__sootsimTest.debugFind(${JSON.stringify(target)})`
|
|
1390
1390
|
});
|
|
1391
1391
|
}
|
|
1392
1392
|
async function callDebugBridge(bridge, expression, host = false, project) {
|
|
@@ -1396,7 +1396,7 @@ async function callDebugBridge(bridge, expression, host = false, project) {
|
|
|
1396
1396
|
return bridge.send({
|
|
1397
1397
|
type: "evaluate",
|
|
1398
1398
|
code: `(async () => {
|
|
1399
|
-
const result = await
|
|
1399
|
+
const result = await globalThis.__sootsimTest.evalInTenant(${JSON.stringify(code)})
|
|
1400
1400
|
if (!result.ok) throw new Error(result.error)
|
|
1401
1401
|
return result.value
|
|
1402
1402
|
})()`
|
|
@@ -1469,17 +1469,17 @@ async function inspectMemory(bridge) {
|
|
|
1469
1469
|
const result = await bridge.send({
|
|
1470
1470
|
type: "evaluate",
|
|
1471
1471
|
code: `(async () => {
|
|
1472
|
-
const host =
|
|
1472
|
+
const host = globalThis.__sootsimRenderHost
|
|
1473
1473
|
const stats = host?.queryStats ? await host.queryStats() : null
|
|
1474
|
-
const shellRaw =
|
|
1475
|
-
? await
|
|
1474
|
+
const shellRaw = globalThis.__sootsimShellMemory
|
|
1475
|
+
? await globalThis.__sootsimShellMemory()
|
|
1476
1476
|
: null
|
|
1477
1477
|
const shell = shellRaw && !shellRaw.error ? shellRaw : null
|
|
1478
1478
|
// the compositor paints home + app:one + app:two, so every app-surface
|
|
1479
1479
|
// picture and raster image is counted here and nowhere else.
|
|
1480
1480
|
let compositor = null
|
|
1481
1481
|
try {
|
|
1482
|
-
const cs = await
|
|
1482
|
+
const cs = await globalThis.__sootsimCompositor?.getStats?.(false, true)
|
|
1483
1483
|
compositor = cs?.memory ?? null
|
|
1484
1484
|
} catch {}
|
|
1485
1485
|
const normalize = (m) =>
|