@rallycry/conveyor-agent 8.3.2 → 8.3.3

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.
@@ -6660,6 +6660,28 @@ async function* notifyOnFirstEvent(inner, onFirst) {
6660
6660
  yield event;
6661
6661
  }
6662
6662
  }
6663
+ var PARKED_TUI_GRACE_MS = 45e3;
6664
+ async function* watchForParkedTui(inner, host) {
6665
+ let parked = false;
6666
+ const timer = setTimeout(() => {
6667
+ parked = true;
6668
+ host.connection.emitStatus("waiting_for_input");
6669
+ void host.callbacks.onStatusChange("waiting_for_input");
6670
+ }, PARKED_TUI_GRACE_MS);
6671
+ try {
6672
+ for await (const event of inner) {
6673
+ clearTimeout(timer);
6674
+ if (parked) {
6675
+ parked = false;
6676
+ host.connection.emitStatus("running");
6677
+ await host.callbacks.onStatusChange("running");
6678
+ }
6679
+ yield event;
6680
+ }
6681
+ } finally {
6682
+ clearTimeout(timer);
6683
+ }
6684
+ }
6663
6685
  async function runSdkQuery(host, context, followUpContent, promptDeliveryOverride) {
6664
6686
  if (host.isStopped()) return;
6665
6687
  const mode = host.agentMode;
@@ -6707,6 +6729,9 @@ async function runSdkQuery(host, context, followUpContent, promptDeliveryOverrid
6707
6729
  }
6708
6730
  }
6709
6731
  async function trackAndRun(host, context, options, agentQuery) {
6732
+ if (host.harnessKind === "pty" && options.promptDelivery !== "prefill") {
6733
+ agentQuery = watchForParkedTui(agentQuery, host);
6734
+ }
6710
6735
  host.activeQuery = agentQuery;
6711
6736
  try {
6712
6737
  await runWithRetry(agentQuery, context, host, options);
@@ -10238,4 +10263,4 @@ export {
10238
10263
  loadConveyorConfig,
10239
10264
  unshallowRepo
10240
10265
  };
10241
- //# sourceMappingURL=chunk-5YZY3J62.js.map
10266
+ //# sourceMappingURL=chunk-TELYL5WO.js.map