@livx.cc/agentx 0.99.128 → 0.99.129

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/dist/index.js CHANGED
@@ -5823,7 +5823,7 @@ var Agent = class _Agent {
5823
5823
  e.code = "stall";
5824
5824
  return e;
5825
5825
  };
5826
- const poke = () => {
5826
+ const poke = (quietMs) => {
5827
5827
  if (!stallMs) return;
5828
5828
  if (timer) clearTimeout(timer);
5829
5829
  timer = setTimeout(() => {
@@ -5838,7 +5838,7 @@ var Agent = class _Agent {
5838
5838
  log9.warn(`stall watchdog: no stream output for ${stallMs}ms and no tool holding the stream \u2014 aborting the request` + (inFlight.length ? ` (${inFlight.length} detached job(s) running, not awaited by the stream: ${inFlight.map((j) => `${j.id}/${j.kind}`).join(", ")})` : ""));
5839
5839
  fired = true;
5840
5840
  ac.abort(stallError());
5841
- }, stallMs);
5841
+ }, Math.max(stallMs, quietMs ?? 0));
5842
5842
  };
5843
5843
  this.stallPoke = poke;
5844
5844
  poke();
@@ -5880,7 +5880,7 @@ var Agent = class _Agent {
5880
5880
  let resolvedModel;
5881
5881
  for await (const chunk of stream) {
5882
5882
  if (chunk.model) resolvedModel = chunk.model;
5883
- poke?.();
5883
+ poke?.(chunk.quietMs);
5884
5884
  if (this.options.signal?.aborted) break;
5885
5885
  if (chunk.reasoningContent) {
5886
5886
  reasoning += chunk.reasoningContent;