@librechat/agents 4.2.2 → 4.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@librechat/agents",
3
- "version": "4.2.2",
3
+ "version": "4.2.3",
4
4
  "reova": {
5
5
  "enabled": true,
6
6
  "endpoint": "https://telemetry.reo.dev/data"
@@ -316,11 +316,12 @@
316
316
  "ajv": "6.14.0",
317
317
  "@opentelemetry/core": "^2.9.0",
318
318
  "js-yaml": "^4.3.1",
319
- "minimatch": "^10.2.2",
319
+ "glob": "^14.0.6",
320
+ "minimatch": "^11.0.8",
320
321
  "test-exclude": "^8.0.0",
321
322
  "follow-redirects": "^1.16.2",
322
323
  "ip-address": "^10.7.5",
323
- "node-forge": "^1.4.2",
324
+ "node-forge": "^1.4.3",
324
325
  "undici": "^7.30.1"
325
326
  },
326
327
  "dependencies": {
@@ -382,9 +383,9 @@
382
383
  "@types/yargs-parser": "^21.0.3",
383
384
  "@typescript-eslint/eslint-plugin": "^8.65.0",
384
385
  "@typescript-eslint/parser": "^8.65.0",
385
- "eslint": "^10.8.0",
386
+ "eslint": "^10.15.0",
386
387
  "eslint-import-resolver-typescript": "^4.4.5",
387
- "eslint-plugin-import-x": "^4.17.1",
388
+ "eslint-plugin-import-x": "^4.18.1",
388
389
  "globals": "^17.8.0",
389
390
  "husky": "^9.1.7",
390
391
  "jest": "^30.2.0",
package/src/stream.ts CHANGED
@@ -55,7 +55,10 @@ import {
55
55
  calculateMaxToolResultChars,
56
56
  truncateToolResultContent,
57
57
  } from '@/utils/truncation';
58
- import { createToolCallsDispatchedEvent, safeDispatchCustomEvent } from '@/utils/events';
58
+ import {
59
+ createToolCallsDispatchedEvent,
60
+ safeDispatchCustomEvent,
61
+ } from '@/utils/events';
59
62
  import { resolveToolOutcome, outcomeFieldsFromResult } from '@/tools/intentArg';
60
63
  import { snapshotValidatedModelChunk } from '@/graphs/acceptedModelResponse';
61
64
  import { ProviderTextProtectionError } from '@/protection/providerText';
@@ -1366,7 +1369,8 @@ function startPreparedSubagents(
1366
1369
  if ((graph.clientDelegatedToolNames?.size ?? 0) > 0) return;
1367
1370
  // A parsed string call is not executable even if the same event carries
1368
1371
  // sealed raw fragments. Wait for a separately validated complete call.
1369
- if (chunk.tool_calls?.some((call) => typeof call.args === 'string') === true) return;
1372
+ if (chunk.tool_calls?.some((call) => typeof call.args === 'string') === true)
1373
+ return;
1370
1374
  if (
1371
1375
  (graph as Partial<StandardGraph>).canPrestartSubagents?.(agentContext) !==
1372
1376
  true ||
@@ -1688,7 +1692,11 @@ export class ChatModelStreamHandler implements t.EventHandler {
1688
1692
  graph.breakerAbort instanceof AbortController
1689
1693
  ? graph.breakerAbort
1690
1694
  : undefined;
1691
- const entrySignals = [eventBreaker?.signal, graph.signal, graph.config.signal];
1695
+ const entrySignals = [
1696
+ eventBreaker?.signal,
1697
+ graph.signal,
1698
+ graph.config.signal,
1699
+ ];
1692
1700
  /** Immutable scope captured at handler entry. A reset while this
1693
1701
  * handler is suspended in an await replaces the object, so ONE
1694
1702
  * reference comparison proves the event still belongs to the live run
@@ -1698,10 +1706,12 @@ export class ChatModelStreamHandler implements t.EventHandler {
1698
1706
  entryRunScope != null && graph.runScope !== entryRunScope;
1699
1707
  const throwIfRunBreakerTripped = (): void => {
1700
1708
  for (const signal of entrySignals) {
1701
- if (signal?.aborted === true &&
1702
- (signal.reason instanceof StreamLimitExceededError ||
1703
- signal.reason instanceof PreparedSubagentError ||
1704
- signal.reason instanceof ProviderTextProtectionError)) {
1709
+ if (
1710
+ signal?.aborted === true &&
1711
+ (signal.reason instanceof StreamLimitExceededError ||
1712
+ signal.reason instanceof PreparedSubagentError ||
1713
+ signal.reason instanceof ProviderTextProtectionError)
1714
+ ) {
1705
1715
  throw signal.reason;
1706
1716
  }
1707
1717
  if (signal?.aborted === true && graph.providerTextProtection != null) {
@@ -1924,7 +1934,8 @@ export class ChatModelStreamHandler implements t.EventHandler {
1924
1934
  chunk.response_metadata as Record<string, unknown> | undefined
1925
1935
  );
1926
1936
  const canStreamEager =
1927
- chunk.tool_calls?.some((call) => typeof call.args === 'string') !== true &&
1937
+ chunk.tool_calls?.some((call) => typeof call.args === 'string') !==
1938
+ true &&
1928
1939
  (allowSequentialSeal || hasExplicitStreamedToolCallSeals(chunk)) &&
1929
1940
  !hasPotentialDirectToolInStreamContext({ graph, agentContext }) &&
1930
1941
  isEagerToolExecutionEnabledForBatch({ graph, metadata, agentContext });
@@ -2671,6 +2682,9 @@ export function createContentAggregator(): t.ContentAggregatorResult {
2671
2682
  console.warn('No run step found for summarize delta event');
2672
2683
  return;
2673
2684
  }
2685
+ if (deltaData.reset === true) {
2686
+ contentParts[runStep.index] = { type: ContentTypes.SUMMARY };
2687
+ }
2674
2688
  updateContent(runStep.index, deltaData.delta.summary);
2675
2689
  return;
2676
2690
  }