mirror of
https://github.com/morluto/rea
synced 2026-10-27 06:33:32 -04:00
9f496ef2d4
* fix(native): preserve unknown accessibility child counts * fix(native): align helper buffer with capture budget * fix(native): align Swift helper JSON wire size * fix(native): bound raw helper output to scenario budget
16 lines
662 B
TypeScript
16 lines
662 B
TypeScript
const HELPER_SUCCESS_WRAPPER = Buffer.from(
|
|
JSON.stringify({ ok: true, result: {} }),
|
|
);
|
|
|
|
/** Scenario output is charged at twice the encoded result size before return. */
|
|
export const NATIVE_UI_OUTPUT_BUDGET_BYTES = 64 * 1024 * 1024;
|
|
export const NATIVE_UI_OUTPUT_WEIGHT = 2;
|
|
|
|
/** Bytes added around a result by the helper's success JSON response. */
|
|
export const NATIVE_UI_HELPER_ENVELOPE_BYTES =
|
|
HELPER_SUCCESS_WRAPPER.byteLength - Buffer.byteLength("{}");
|
|
|
|
/** Raw helper output is bounded by the scenario's existing unweighted byte budget. */
|
|
export const NATIVE_UI_HELPER_MAX_BUFFER =
|
|
NATIVE_UI_OUTPUT_BUDGET_BYTES + NATIVE_UI_HELPER_ENVELOPE_BYTES;
|