@kenkaiiii/gg-agent 5.28.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 +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -1
- package/dist/index.d.ts +23 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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;
|
|
@@ -978,6 +979,7 @@ async function* agentLoop(messages, options) {
|
|
|
978
979
|
);
|
|
979
980
|
const executionResult = hasSequentialToolCall ? yield* executeToolCallsMixed(toolCalls, toolResults, executionOptions) : yield* executeToolCallsParallel(toolCalls, toolResults, executionOptions);
|
|
980
981
|
messages.push({ role: "tool", content: executionResult.toolResults });
|
|
982
|
+
yield { type: "checkpoint", turn };
|
|
981
983
|
const toolsAborted = executionResult.aborted;
|
|
982
984
|
if (fatalToolArgumentError) {
|
|
983
985
|
if (fatalToolArgumentRecoverable && !toolArgumentAutoContinueUsed) {
|
|
@@ -1108,7 +1110,7 @@ async function executeSingleToolCall(toolCall, options, pushEvent) {
|
|
|
1108
1110
|
try {
|
|
1109
1111
|
const parsed = tool.parameters.parse(toolCall.args);
|
|
1110
1112
|
const callerSignal = options.signal;
|
|
1111
|
-
const toolTimeout = AbortSignal.timeout(
|
|
1113
|
+
const toolTimeout = AbortSignal.timeout(tool.timeoutMs ?? DEFAULT_TOOL_TIMEOUT_MS);
|
|
1112
1114
|
const ctx = {
|
|
1113
1115
|
signal: callerSignal ? AbortSignal.any([callerSignal, toolTimeout]) : toolTimeout,
|
|
1114
1116
|
toolCallId: toolCall.id,
|