@ai-ecoverse/slicc-browsers 1.28.0 → 1.28.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.
- package/extension-frame.mjs +326 -32
- package/guard-runner.mjs +2 -0
- package/guard-vectors.json +14 -4
- package/package.json +1 -1
package/extension-frame.mjs
CHANGED
|
@@ -916,23 +916,182 @@ async function driveCaptures(client, page, missing) {
|
|
|
916
916
|
return { archive, pdf, cast, begin };
|
|
917
917
|
}
|
|
918
918
|
|
|
919
|
-
|
|
919
|
+
const CAST_STALL = 'cast stalled: no frame after insertion and paint was not confirmed';
|
|
920
|
+
const CAST_ACK_INCOMPLETE = 'cast ack incomplete: frames received but not all acked';
|
|
921
|
+
const CAST_ACK_UNANSWERED = 'cast ack unanswered';
|
|
922
|
+
const CAST_NEVER_STREAMED = 'cast never streamed before the insertion';
|
|
923
|
+
const CAST_NO_OBSERVER = 'no unguarded observer to confirm the paint';
|
|
924
|
+
const CAST_PAINT_MS = 500;
|
|
925
|
+
const CAST_FLOOR_MS = 1500;
|
|
926
|
+
const CAST_LATENCY_FACTOR = 3;
|
|
927
|
+
const CAST_ACK_MS = 1000;
|
|
928
|
+
const CAST_TICK = `(() => {
|
|
929
|
+
const root = document.documentElement;
|
|
930
|
+
const n = Number(root.dataset.sliccCastTick || '0') + 1;
|
|
931
|
+
root.dataset.sliccCastTick = String(n);
|
|
932
|
+
root.style.setProperty('--slicc-cast-tick', String(n));
|
|
933
|
+
root.style.outline = n % 2 === 0 ? '1px solid transparent' : '0 solid transparent';
|
|
934
|
+
return new Promise((resolve) => {
|
|
935
|
+
requestAnimationFrame(() => requestAnimationFrame(() => resolve(n)));
|
|
936
|
+
});
|
|
937
|
+
})()`;
|
|
938
|
+
|
|
939
|
+
function castWaitMs(frameMs, castControls) {
|
|
940
|
+
if (!(frameMs > 0)) return 0;
|
|
941
|
+
const floor = frameMs >= 1000 ? CAST_FLOOR_MS : frameMs;
|
|
942
|
+
const controlMs = castControls?.repaintToFrameMs;
|
|
943
|
+
if (typeof controlMs === 'number' && controlMs >= 0)
|
|
944
|
+
return Math.max(floor, Math.ceil(controlMs * CAST_LATENCY_FACTOR));
|
|
945
|
+
return Math.max(floor, frameMs);
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
function castFrameEvents(client, page, from = 0) {
|
|
949
|
+
return (client.events ?? [])
|
|
950
|
+
.slice(from)
|
|
951
|
+
.filter((event) => event.method === 'Page.screencastFrame' && event.sessionId === page);
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
function castExplicitStop(client, page, state, from = 0) {
|
|
955
|
+
return (
|
|
956
|
+
state.ackRefused ||
|
|
957
|
+
(client.events ?? [])
|
|
958
|
+
.slice(from)
|
|
959
|
+
.some(
|
|
960
|
+
(event) =>
|
|
961
|
+
(event.method === 'Inspector.detached' &&
|
|
962
|
+
event.sessionId === page &&
|
|
963
|
+
event.params?.reason) ||
|
|
964
|
+
(event.method === 'Target.detachedFromTarget' && event.params?.sessionId === page)
|
|
965
|
+
)
|
|
966
|
+
);
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
async function ackCastFrames(client, page, state) {
|
|
970
|
+
for (const event of client.events ?? []) {
|
|
971
|
+
if (event.method !== 'Page.screencastFrame' || event.sessionId !== page) continue;
|
|
972
|
+
const id = event.params?.sessionId;
|
|
973
|
+
if (typeof id !== 'number' || state.ackAttempted.has(id)) continue;
|
|
974
|
+
state.ackAttempted.add(id);
|
|
975
|
+
state.framesReceived += 1;
|
|
976
|
+
let out;
|
|
977
|
+
try {
|
|
978
|
+
out = await Promise.race([
|
|
979
|
+
outcome(client.send('Page.screencastFrameAck', { sessionId: id }, page)),
|
|
980
|
+
pause(CAST_ACK_MS).then(() => null),
|
|
981
|
+
]);
|
|
982
|
+
} catch {
|
|
983
|
+
out = null;
|
|
984
|
+
}
|
|
985
|
+
if (out == null) {
|
|
986
|
+
state.ackUnanswered = true;
|
|
987
|
+
continue;
|
|
988
|
+
}
|
|
989
|
+
if (out.ok) {
|
|
990
|
+
state.acked.add(id);
|
|
991
|
+
state.framesAcked += 1;
|
|
992
|
+
continue;
|
|
993
|
+
}
|
|
994
|
+
if (presentish(out) === PRESENT) {
|
|
995
|
+
state.acked.add(id);
|
|
996
|
+
state.framesAcked += 1;
|
|
997
|
+
state.ackRefused = true;
|
|
998
|
+
continue;
|
|
999
|
+
}
|
|
1000
|
+
state.ackUnanswered = true;
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
async function provokeCastPaint(reader, observer, state) {
|
|
1005
|
+
if (!reader || !observer) {
|
|
1006
|
+
state.paintConfirmed = false;
|
|
1007
|
+
state.paintObserverMissing = true;
|
|
1008
|
+
return;
|
|
1009
|
+
}
|
|
1010
|
+
try {
|
|
1011
|
+
await Promise.race([
|
|
1012
|
+
observe(reader, observer, CAST_TICK),
|
|
1013
|
+
pause(CAST_PAINT_MS).then(() => {
|
|
1014
|
+
throw new Error('cast paint timed out');
|
|
1015
|
+
}),
|
|
1016
|
+
]);
|
|
1017
|
+
state.paintConfirmed = true;
|
|
1018
|
+
state.paintAt ??= Date.now();
|
|
1019
|
+
} catch {
|
|
1020
|
+
return;
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
function noteCastLatency(state, frames) {
|
|
1025
|
+
if (state.paintAt == null || state.repaintToFrameMs != null || frames.length === 0) return;
|
|
1026
|
+
state.repaintToFrameMs = Math.max(0, Date.now() - state.paintAt);
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
async function waitCastWindow(client, page, state, leakFrom, waitMs, frameMs) {
|
|
1030
|
+
const until = Date.now() + waitMs;
|
|
1031
|
+
let frames = [];
|
|
1032
|
+
do {
|
|
1033
|
+
await provokeCastPaint(state.reader, state.observer, state);
|
|
1034
|
+
await ackCastFrames(client, page, state);
|
|
1035
|
+
frames = castFrameEvents(client, page, leakFrom);
|
|
1036
|
+
noteCastLatency(state, frames);
|
|
1037
|
+
if (frames.length > 0 || castExplicitStop(client, page, state, leakFrom)) break;
|
|
1038
|
+
await pause(25);
|
|
1039
|
+
} while (Date.now() < until);
|
|
1040
|
+
await ackCastFrames(client, page, state);
|
|
1041
|
+
frames = castFrameEvents(client, page, leakFrom);
|
|
1042
|
+
noteCastLatency(state, frames);
|
|
1043
|
+
if (
|
|
1044
|
+
frames.length === 0 &&
|
|
1045
|
+
!castExplicitStop(client, page, state, leakFrom) &&
|
|
1046
|
+
state.paintConfirmed
|
|
1047
|
+
) {
|
|
1048
|
+
const drainMs =
|
|
1049
|
+
frameMs >= 1000 ? Math.max(waitMs, CAST_FLOOR_MS) : Math.max(waitMs, frameMs > 0 ? 100 : 50);
|
|
1050
|
+
const drainUntil = Date.now() + drainMs;
|
|
1051
|
+
while (Date.now() < drainUntil) {
|
|
1052
|
+
await provokeCastPaint(state.reader, state.observer, state);
|
|
1053
|
+
await ackCastFrames(client, page, state);
|
|
1054
|
+
frames = castFrameEvents(client, page, leakFrom);
|
|
1055
|
+
if (frames.length > 0) break;
|
|
1056
|
+
await pause(25);
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
await ackCastFrames(client, page, state);
|
|
1060
|
+
frames = castFrameEvents(client, page, leakFrom);
|
|
1061
|
+
noteCastLatency(state, frames);
|
|
1062
|
+
return frames;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
async function driveCast(
|
|
1066
|
+
client,
|
|
1067
|
+
page,
|
|
1068
|
+
frameMs,
|
|
1069
|
+
reader,
|
|
1070
|
+
observer,
|
|
1071
|
+
{ notes, castControls, side } = {}
|
|
1072
|
+
) {
|
|
920
1073
|
const start = await outcome(
|
|
921
1074
|
client.send('Page.startScreencast', { format: 'png', everyNthFrame: 1 }, page)
|
|
922
1075
|
);
|
|
923
|
-
const
|
|
1076
|
+
const state = {
|
|
1077
|
+
acked: new Set(),
|
|
1078
|
+
ackAttempted: new Set(),
|
|
1079
|
+
paintConfirmed: false,
|
|
1080
|
+
paintObserverMissing: false,
|
|
1081
|
+
paintAt: undefined,
|
|
1082
|
+
repaintToFrameMs: undefined,
|
|
1083
|
+
ackRefused: false,
|
|
1084
|
+
ackUnanswered: false,
|
|
1085
|
+
framesReceived: 0,
|
|
1086
|
+
framesAcked: 0,
|
|
1087
|
+
reader,
|
|
1088
|
+
observer,
|
|
1089
|
+
};
|
|
924
1090
|
let leakFrom;
|
|
1091
|
+
let framesBefore = 0;
|
|
925
1092
|
let pumping = start.ok;
|
|
926
1093
|
let stopped = false;
|
|
927
|
-
const
|
|
928
|
-
for (const event of client.events ?? []) {
|
|
929
|
-
if (event.method !== 'Page.screencastFrame' || event.sessionId !== page) continue;
|
|
930
|
-
const id = event.params?.sessionId;
|
|
931
|
-
if (typeof id !== 'number' || acked.has(id)) continue;
|
|
932
|
-
acked.add(id);
|
|
933
|
-
await outcome(client.send('Page.screencastFrameAck', { sessionId: id }, page));
|
|
934
|
-
}
|
|
935
|
-
};
|
|
1094
|
+
const waitMs = castWaitMs(frameMs, castControls);
|
|
936
1095
|
const halt = async () => {
|
|
937
1096
|
pumping = false;
|
|
938
1097
|
await pump;
|
|
@@ -945,7 +1104,7 @@ async function driveCast(client, page, frameMs) {
|
|
|
945
1104
|
start.ok && frameMs > 0
|
|
946
1105
|
? (async () => {
|
|
947
1106
|
while (pumping) {
|
|
948
|
-
await
|
|
1107
|
+
await ackCastFrames(client, page, state);
|
|
949
1108
|
await pause(25);
|
|
950
1109
|
}
|
|
951
1110
|
})()
|
|
@@ -953,41 +1112,94 @@ async function driveCast(client, page, frameMs) {
|
|
|
953
1112
|
return {
|
|
954
1113
|
castBefore: start.ok,
|
|
955
1114
|
castBeforeRefusal: presentish(start),
|
|
1115
|
+
async waitForFrame(ms = waitMs) {
|
|
1116
|
+
if (!start.ok) return false;
|
|
1117
|
+
const until = Date.now() + ms;
|
|
1118
|
+
do {
|
|
1119
|
+
await ackCastFrames(client, page, state);
|
|
1120
|
+
if (castFrameEvents(client, page).length > 0) return true;
|
|
1121
|
+
await provokeCastPaint(reader, observer, state);
|
|
1122
|
+
await pause(25);
|
|
1123
|
+
} while (Date.now() < until);
|
|
1124
|
+
await ackCastFrames(client, page, state);
|
|
1125
|
+
return castFrameEvents(client, page).length > 0;
|
|
1126
|
+
},
|
|
956
1127
|
async markInserted() {
|
|
957
|
-
await
|
|
1128
|
+
await ackCastFrames(client, page, state);
|
|
1129
|
+
framesBefore = castFrameEvents(client, page).length;
|
|
958
1130
|
leakFrom = client.events?.length ?? 0;
|
|
1131
|
+
state.paintConfirmed = false;
|
|
1132
|
+
state.paintAt = undefined;
|
|
1133
|
+
state.repaintToFrameMs = undefined;
|
|
1134
|
+
state.ackRefused = false;
|
|
959
1135
|
},
|
|
960
1136
|
async afterEmbed({ inserted }) {
|
|
961
1137
|
pumping = false;
|
|
962
1138
|
await pump;
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
1139
|
+
const tally = () => ({
|
|
1140
|
+
framesReceived: state.framesReceived,
|
|
1141
|
+
framesAcked: state.framesAcked,
|
|
1142
|
+
ackUnanswered: state.ackUnanswered,
|
|
1143
|
+
paintObserverMissing: state.paintObserverMissing,
|
|
1144
|
+
waitMs,
|
|
1145
|
+
repaintToFrameMs: state.repaintToFrameMs,
|
|
1146
|
+
});
|
|
1147
|
+
if (!start.ok)
|
|
1148
|
+
return {
|
|
1149
|
+
castFramesBefore: 0,
|
|
1150
|
+
castFramesAfter: 0,
|
|
1151
|
+
castInserted: Boolean(inserted),
|
|
1152
|
+
castStopped: false,
|
|
1153
|
+
castStoppedExplicit: false,
|
|
1154
|
+
paintConfirmed: false,
|
|
1155
|
+
...tally(),
|
|
1156
|
+
};
|
|
966
1157
|
if (!inserted) {
|
|
967
1158
|
await halt();
|
|
968
|
-
return {
|
|
1159
|
+
return {
|
|
1160
|
+
castFramesBefore: framesBefore,
|
|
1161
|
+
castFramesAfter: 0,
|
|
1162
|
+
castInserted: false,
|
|
1163
|
+
castStopped: false,
|
|
1164
|
+
castStoppedExplicit: false,
|
|
1165
|
+
paintConfirmed: false,
|
|
1166
|
+
...tally(),
|
|
1167
|
+
};
|
|
969
1168
|
}
|
|
970
1169
|
if (leakFrom == null) {
|
|
971
|
-
await
|
|
1170
|
+
await ackCastFrames(client, page, state);
|
|
1171
|
+
framesBefore = castFrameEvents(client, page).length;
|
|
972
1172
|
leakFrom = client.events?.length ?? 0;
|
|
1173
|
+
state.paintConfirmed = false;
|
|
1174
|
+
state.paintAt = undefined;
|
|
1175
|
+
state.repaintToFrameMs = undefined;
|
|
1176
|
+
state.ackRefused = false;
|
|
973
1177
|
}
|
|
974
|
-
await
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
.
|
|
978
|
-
|
|
1178
|
+
const frames = await waitCastWindow(client, page, state, leakFrom, waitMs, frameMs);
|
|
1179
|
+
const stoppedExplicit = castExplicitStop(client, page, state, leakFrom);
|
|
1180
|
+
if (side === 'control' && typeof state.repaintToFrameMs === 'number' && castControls)
|
|
1181
|
+
castControls.repaintToFrameMs = state.repaintToFrameMs;
|
|
1182
|
+
notes?.push(
|
|
1183
|
+
`cast acked ${state.framesAcked} of ${state.framesReceived} frames; wait ${waitMs}ms` +
|
|
1184
|
+
(state.repaintToFrameMs != null ? `; repaint-to-frame ${state.repaintToFrameMs}ms` : '')
|
|
1185
|
+
);
|
|
979
1186
|
await halt();
|
|
980
1187
|
return {
|
|
981
1188
|
castLeak: frames.length > 0,
|
|
1189
|
+
castFramesBefore: framesBefore,
|
|
982
1190
|
castFramesAfter: frames.length,
|
|
983
1191
|
castInserted: true,
|
|
1192
|
+
castStopped: stoppedExplicit || (frames.length === 0 && state.paintConfirmed),
|
|
1193
|
+
castStoppedExplicit: stoppedExplicit,
|
|
1194
|
+
paintConfirmed: state.paintConfirmed,
|
|
1195
|
+
...tally(),
|
|
984
1196
|
};
|
|
985
1197
|
},
|
|
986
1198
|
stop: halt,
|
|
987
1199
|
};
|
|
988
1200
|
}
|
|
989
1201
|
|
|
990
|
-
async function beginCast(client, session, targetId, frameMs) {
|
|
1202
|
+
async function beginCast(client, session, targetId, frameMs, reader, observer, extras) {
|
|
991
1203
|
const attachEarly = await outcome(
|
|
992
1204
|
client.send('Target.attachToTarget', { targetId, flatten: true })
|
|
993
1205
|
);
|
|
@@ -999,7 +1211,7 @@ async function beginCast(client, session, targetId, frameMs) {
|
|
|
999
1211
|
return {
|
|
1000
1212
|
page,
|
|
1001
1213
|
pageAttached: attachEarly.ok,
|
|
1002
|
-
castDrive: await driveCast(client, page, frameMs),
|
|
1214
|
+
castDrive: await driveCast(client, page, frameMs, reader, observer, extras),
|
|
1003
1215
|
};
|
|
1004
1216
|
}
|
|
1005
1217
|
|
|
@@ -1014,14 +1226,89 @@ function finishCast(castDrive, embedded) {
|
|
|
1014
1226
|
return castDrive.afterEmbed({ inserted: Boolean(embedded) });
|
|
1015
1227
|
}
|
|
1016
1228
|
|
|
1017
|
-
function
|
|
1018
|
-
if (!castDrive) return;
|
|
1229
|
+
function noteCastFields(result, castDrive, castAfter) {
|
|
1019
1230
|
result.castBefore = castDrive.castBefore;
|
|
1020
1231
|
result.castBeforeRefusal = castDrive.castBeforeRefusal;
|
|
1021
|
-
result.
|
|
1022
|
-
result.castFramesAfter = castAfter.castFramesAfter;
|
|
1023
|
-
|
|
1024
|
-
|
|
1232
|
+
result.castFramesBefore = castAfter.castFramesBefore ?? 0;
|
|
1233
|
+
result.castFramesAfter = castAfter.castFramesAfter ?? 0;
|
|
1234
|
+
result.castFramesReceived = castAfter.framesReceived ?? 0;
|
|
1235
|
+
result.castFramesAcked = castAfter.framesAcked ?? 0;
|
|
1236
|
+
result.castWaitMs = castAfter.waitMs ?? 0;
|
|
1237
|
+
if (castAfter.repaintToFrameMs != null) result.castRepaintToFrameMs = castAfter.repaintToFrameMs;
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
function castAckMissing(castAfter, missing) {
|
|
1241
|
+
if (castAfter.ackUnanswered) {
|
|
1242
|
+
missing.push(CAST_ACK_UNANSWERED);
|
|
1243
|
+
return true;
|
|
1244
|
+
}
|
|
1245
|
+
if ((castAfter.framesReceived ?? 0) > (castAfter.framesAcked ?? 0)) {
|
|
1246
|
+
missing.push(CAST_ACK_INCOMPLETE);
|
|
1247
|
+
return true;
|
|
1248
|
+
}
|
|
1249
|
+
return false;
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
function castRefusedStart(result, castDrive) {
|
|
1253
|
+
return Boolean(result.castRefusal) || Boolean(castDrive.castBeforeRefusal);
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
function applyCastResult(result, castDrive, castAfter, side, missing) {
|
|
1257
|
+
if (!castDrive) return;
|
|
1258
|
+
noteCastFields(result, castDrive, castAfter);
|
|
1259
|
+
const inserted = Boolean(castAfter.castInserted);
|
|
1260
|
+
const leaked = Boolean(castAfter.castLeak);
|
|
1261
|
+
const stopped = Boolean(castAfter.castStopped);
|
|
1262
|
+
const stoppedExplicit = Boolean(castAfter.castStoppedExplicit);
|
|
1263
|
+
if (!castDrive.castBefore) {
|
|
1264
|
+
result.castLeak = false;
|
|
1265
|
+
result.castStopped = castRefusedStart(result, castDrive);
|
|
1266
|
+
return;
|
|
1267
|
+
}
|
|
1268
|
+
if (!inserted) {
|
|
1269
|
+
result.castLeak = false;
|
|
1270
|
+
result.castStopped = false;
|
|
1271
|
+
return;
|
|
1272
|
+
}
|
|
1273
|
+
if (side === 'control') {
|
|
1274
|
+
if (!(result.castFramesBefore > 0)) {
|
|
1275
|
+
missing.push('control screencast produced no frames before the extension frame appeared');
|
|
1276
|
+
return;
|
|
1277
|
+
}
|
|
1278
|
+
if (!leaked) {
|
|
1279
|
+
missing.push('control screencast produced no frames after the extension frame appeared');
|
|
1280
|
+
return;
|
|
1281
|
+
}
|
|
1282
|
+
if (castAckMissing(castAfter, missing)) return;
|
|
1283
|
+
result.castLeak = true;
|
|
1284
|
+
result.castStopped = false;
|
|
1285
|
+
return;
|
|
1286
|
+
}
|
|
1287
|
+
if (leaked) {
|
|
1288
|
+
result.castLeak = true;
|
|
1289
|
+
result.castStopped = false;
|
|
1290
|
+
return;
|
|
1291
|
+
}
|
|
1292
|
+
if (castAfter.paintObserverMissing) {
|
|
1293
|
+
missing.push(CAST_NO_OBSERVER);
|
|
1294
|
+
return;
|
|
1295
|
+
}
|
|
1296
|
+
if (castAckMissing(castAfter, missing)) return;
|
|
1297
|
+
if (castRefusedStart(result, castDrive) || stoppedExplicit) {
|
|
1298
|
+
result.castLeak = false;
|
|
1299
|
+
result.castStopped = true;
|
|
1300
|
+
return;
|
|
1301
|
+
}
|
|
1302
|
+
if (stopped) {
|
|
1303
|
+
if (!(result.castFramesBefore > 0)) {
|
|
1304
|
+
missing.push(CAST_NEVER_STREAMED);
|
|
1305
|
+
return;
|
|
1306
|
+
}
|
|
1307
|
+
result.castLeak = false;
|
|
1308
|
+
result.castStopped = true;
|
|
1309
|
+
return;
|
|
1310
|
+
}
|
|
1311
|
+
missing.push(CAST_STALL);
|
|
1025
1312
|
}
|
|
1026
1313
|
|
|
1027
1314
|
function classifyRevealOverlap(
|
|
@@ -1179,6 +1466,8 @@ export async function extensionFrame({
|
|
|
1179
1466
|
inputMethods: inputList = INPUT_METHODS,
|
|
1180
1467
|
side = 'guarded',
|
|
1181
1468
|
capabilities = {},
|
|
1469
|
+
notes,
|
|
1470
|
+
castControls,
|
|
1182
1471
|
}) {
|
|
1183
1472
|
const attached = await reader.send('Target.attachToTarget', { targetId, flatten: true });
|
|
1184
1473
|
const observer = attached.sessionId;
|
|
@@ -1196,10 +1485,15 @@ export async function extensionFrame({
|
|
|
1196
1485
|
await reader.send('DOM.enable', {}, observer);
|
|
1197
1486
|
await reader.send('Accessibility.enable', {}, observer);
|
|
1198
1487
|
if (mode === 'cast') {
|
|
1199
|
-
const started = await beginCast(client, session, targetId, frameMs
|
|
1488
|
+
const started = await beginCast(client, session, targetId, frameMs, reader, observer, {
|
|
1489
|
+
notes,
|
|
1490
|
+
castControls,
|
|
1491
|
+
side,
|
|
1492
|
+
});
|
|
1200
1493
|
page = started.page;
|
|
1201
1494
|
pageAttached = started.pageAttached;
|
|
1202
1495
|
castDrive = started.castDrive;
|
|
1496
|
+
await castDrive.waitForFrame(castWaitMs(frameMs, castControls));
|
|
1203
1497
|
}
|
|
1204
1498
|
const embedded = await embed(reader, observer, mode, frameURL);
|
|
1205
1499
|
await noteCastInsertion(castDrive, embedded, missing);
|
package/guard-runner.mjs
CHANGED
|
@@ -1105,6 +1105,8 @@ class Execution {
|
|
|
1105
1105
|
extensionId: this.options.extensionFrameId ?? DEFAULT_EXTENSION_WORLD_ID,
|
|
1106
1106
|
side: this.side,
|
|
1107
1107
|
capabilities: this.options.capabilities,
|
|
1108
|
+
notes: this.notes,
|
|
1109
|
+
castControls: (this.clients.castControls ??= {}),
|
|
1108
1110
|
})
|
|
1109
1111
|
);
|
|
1110
1112
|
if (step.guess) return this.guess(step.guess, session);
|
package/guard-vectors.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"setVersion": "1.28.
|
|
3
|
+
"setVersion": "1.28.1",
|
|
4
4
|
"sources": [
|
|
5
5
|
{
|
|
6
6
|
"repo": "ai-ecoverse/slicc-cli",
|
|
@@ -9070,9 +9070,18 @@
|
|
|
9070
9070
|
"equals": true,
|
|
9071
9071
|
"observer": "client"
|
|
9072
9072
|
}
|
|
9073
|
+
},
|
|
9074
|
+
"castStopped": {
|
|
9075
|
+
"means": "extension frame cast: after frames before insertion and a confirmed post-insertion paint the guard delivered no further frame (silent stop/drop), or refused an ack / detached",
|
|
9076
|
+
"check": {
|
|
9077
|
+
"result": "frame",
|
|
9078
|
+
"path": "result.castStopped",
|
|
9079
|
+
"equals": true,
|
|
9080
|
+
"observer": "client"
|
|
9081
|
+
}
|
|
9073
9082
|
}
|
|
9074
9083
|
},
|
|
9075
|
-
"live": "the observer confirms a chrome-extension: frame is in the ordinary tab after a screencast was started on the clean tab;
|
|
9084
|
+
"live": "the observer confirms a chrome-extension: frame is in the ordinary tab after a screencast was started on the clean tab; both legs ack every Page.screencastFrame; the control proves frames before and after a forced paint and records repaint-to-frame latency; the guarded wait is at least 3× that latency (floor 1500ms) plus a drain; any post-insertion frame fails; a silent stop needs frames before insertion plus a confirmed post-insertion paint with none after; an explicit startScreencast refusal (castBeforeRefusal or castRefusal), ack refusal, or detach still passes without pre-frames; missing acks, no observer, never-streamed without those, or an unconfirmed paint are incomplete",
|
|
9076
9085
|
"liveCheck": {
|
|
9077
9086
|
"result": "frame",
|
|
9078
9087
|
"path": "result.exists",
|
|
@@ -9201,9 +9210,10 @@
|
|
|
9201
9210
|
"describeNodeLeak": false,
|
|
9202
9211
|
"outerHTMLLeak": false,
|
|
9203
9212
|
"castBefore": "either",
|
|
9204
|
-
"castLeak": false
|
|
9213
|
+
"castLeak": false,
|
|
9214
|
+
"castStopped": "either"
|
|
9205
9215
|
},
|
|
9206
|
-
"designDependent": ["frameTreeLeak", "axLeak", "castBefore"]
|
|
9216
|
+
"designDependent": ["frameTreeLeak", "axLeak", "castBefore", "castStopped"]
|
|
9207
9217
|
},
|
|
9208
9218
|
{
|
|
9209
9219
|
"id": "C1.script-nav",
|