@kenkaiiii/gg-agent 5.29.0 → 5.29.1

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.cjs CHANGED
@@ -63,6 +63,7 @@ function isLocalBackendUrl(baseUrl) {
63
63
 
64
64
  // src/agent-loop.ts
65
65
  var DEFAULT_MAX_TURNS = 300;
66
+ var DEFAULT_TOOL_TIMEOUT_MS = 3e5;
66
67
  var _diagFn = null;
67
68
  function setStreamDiagnostic(fn) {
68
69
  _diagFn = fn;
@@ -1109,7 +1110,7 @@ async function executeSingleToolCall(toolCall, options, pushEvent) {
1109
1110
  try {
1110
1111
  const parsed = tool.parameters.parse(toolCall.args);
1111
1112
  const callerSignal = options.signal;
1112
- const toolTimeout = AbortSignal.timeout(3e5);
1113
+ const toolTimeout = AbortSignal.timeout(tool.timeoutMs ?? DEFAULT_TOOL_TIMEOUT_MS);
1113
1114
  const ctx = {
1114
1115
  signal: callerSignal ? AbortSignal.any([callerSignal, toolTimeout]) : toolTimeout,
1115
1116
  toolCallId: toolCall.id,