@standardagents/builder 0.25.4 → 0.25.6

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.
@@ -1594,6 +1594,7 @@ var init_LLMRequest = __esm({
1594
1594
  attempts++;
1595
1595
  try {
1596
1596
  logId = await this.logRequest(state, actualModelId, context, modelDef, previousLogId);
1597
+ state.thread.instance.noteExecutionProgress?.();
1597
1598
  state.emitTelemetry?.({
1598
1599
  type: "llm_request",
1599
1600
  model: actualModelId,
@@ -1860,6 +1861,7 @@ var init_LLMRequest = __esm({
1860
1861
  }
1861
1862
  if (next.done) break;
1862
1863
  const chunk = next.value;
1864
+ state.thread.instance.noteExecutionProgress?.();
1863
1865
  if (firstChunkAt === 0) {
1864
1866
  firstChunkAt = Date.now();
1865
1867
  emitLogPatch({ time_to_first_token_ms: firstChunkAt - requestSentAt });
@@ -2395,8 +2397,11 @@ var init_LLMRequest = __esm({
2395
2397
  */
2396
2398
  static async logError(state, error, errorType, modelId, startTime, existingLogId) {
2397
2399
  try {
2398
- const rawErrorMessage = error instanceof Error ? error.message : String(error);
2400
+ let rawErrorMessage = error instanceof Error ? error.message : String(error);
2399
2401
  const errorStack = error instanceof Error ? error.stack : void 0;
2402
+ if (error instanceof Error && error.name === "AbortError" && /operation was aborted/i.test(rawErrorMessage)) {
2403
+ rawErrorMessage = state.abortController?.signal?.aborted ? "Aborted: the execution this request belonged to was cancelled (user stop, watchdog takeover, or a restart) \u2014 retries and fallbacks of a cancelled execution fail immediately." : "Aborted: the request's connection was cancelled mid-flight (provider disconnect or executor restart).";
2404
+ }
2400
2405
  let errorMessage = rawErrorMessage;
2401
2406
  let parsedProviderBody = null;
2402
2407
  const trimmedRaw = rawErrorMessage.trim();