@hearsay-tools/squawk 0.18.0-dev.6967 → 0.18.0-dev.6972

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.
@@ -202,11 +202,22 @@ function* waitReply(prompt, context, opening) {
202
202
  const scenario = (name, steps, options = {}) => ({ name, beforeFailure: false, steps, ...options });
203
203
  const has = (prompt, name) => prompt.includes(`mock:${name}`);
204
204
 
205
+ /** 50 ms apart, past any answer bound a parity cell sets. */
206
+ const AUTONOMOUS_SILENT_HEARTBEATS = 200;
207
+
205
208
  function* autonomous(prompt, context) {
206
209
  let shared;
207
210
  yield effect(async function loadAutonomous() {
208
211
  shared = await import('./mock-autonomous.mjs');
209
212
  });
213
+ if (!shared.answersNudge(prompt)) {
214
+ // Heartbeats only: no turn opens, so the nudge stays unanswered (hearsay-tools/squawk#3741).
215
+ for (let i = 0; i < AUTONOMOUS_SILENT_HEARTBEATS; i++) {
216
+ yield { kind: 'progress' };
217
+ yield { kind: 'sleep', ms: 50 };
218
+ }
219
+ return;
220
+ }
210
221
  yield open();
211
222
  yield text(() => shared.autonomousReply(prompt, context.lifecycle));
212
223
  yield end();