@saturn-universe/tools 0.1.2-dev.3 → 0.1.2-dev.4
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/executor.d.ts +1 -0
- package/dist/executor.js +4 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/executor.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AgentSessionId, ArtifactReader, LoggerPort, ToolExecutor, ToolExecutionReader, ToolPermissionPolicy, ExecutionEnvironmentReader, ExecutionEnvironment, RuntimeStateReader, RuntimeJournal, RuntimeClock, Hash, ToolCallId, ToolApprovalDecision, ReconciliationDecision, CommandId, RunId, RunConfig, RuntimeHooks } from '@saturn-universe/core';
|
|
2
2
|
import type { Registry } from './registry.js';
|
|
3
|
+
export declare const maxPluginTimeoutMs = 7200000;
|
|
3
4
|
export interface ExecutorDependencies {
|
|
4
5
|
logger: LoggerPort;
|
|
5
6
|
registry: Registry;
|
package/dist/executor.js
CHANGED
|
@@ -2,6 +2,7 @@ import { canonicalJson, earlierDeadline, isLimited, reportDiagnostic, resolveSub
|
|
|
2
2
|
import { createHash } from 'node:crypto';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { outsideWorkspacePrefix, processTimeoutMs } from './workspace.js';
|
|
5
|
+
export const maxPluginTimeoutMs = 7_200_000;
|
|
5
6
|
const artifact = z.unknown().refine((value) => value !== undefined, 'artifact is required');
|
|
6
7
|
const toolContent = z.array(z.discriminatedUnion('type', [
|
|
7
8
|
z.strictObject({ type: z.literal('text'), text: z.string() }),
|
|
@@ -681,6 +682,9 @@ async function invokeObservation(d, env, input, call, value, deadlineAt, handler
|
|
|
681
682
|
const shellLimit = typeof requested === 'number' ? Math.max(requested, processTimeoutMs) : processTimeoutMs;
|
|
682
683
|
invocationLimit = Math.min(shellLimit, shellTimeoutMs ?? toolTimeoutMs);
|
|
683
684
|
}
|
|
685
|
+
else if (definition.source.kind === 'plugin') {
|
|
686
|
+
invocationLimit = maxPluginTimeoutMs;
|
|
687
|
+
}
|
|
684
688
|
const timeout = Math.max(1, Math.min(definition.timeoutMs, invocationLimit, remaining));
|
|
685
689
|
const timeoutController = new AbortController();
|
|
686
690
|
const timer = setTimeout(() => timeoutController.abort(new DOMException('Tool invocation timed out', 'TimeoutError')), timeout);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { Registry } from './registry.js';
|
|
2
|
-
export { createToolExecutor } from './executor.js';
|
|
2
|
+
export { createToolExecutor, maxPluginTimeoutMs } from './executor.js';
|
|
3
3
|
export type { Executor, ExecutorDependencies } from './executor.js';
|
|
4
4
|
export { createCounterTool } from './counter.js';
|
|
5
5
|
export { createPlannerTool, plannerToolName } from './planner.js';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { Registry } from './registry.js';
|
|
2
|
-
export { createToolExecutor } from './executor.js';
|
|
2
|
+
export { createToolExecutor, maxPluginTimeoutMs } from './executor.js';
|
|
3
3
|
export { createCounterTool } from './counter.js';
|
|
4
4
|
export { createPlannerTool, plannerToolName } from './planner.js';
|
|
5
5
|
export { createExploreHypothesesTool, exploreHypothesesToolName } from './search.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saturn-universe/tools",
|
|
3
|
-
"version": "0.1.2-dev.
|
|
3
|
+
"version": "0.1.2-dev.4",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@saturn-universe/core": "0.1.2-dev.
|
|
16
|
+
"@saturn-universe/core": "0.1.2-dev.4",
|
|
17
17
|
"zod": "4.6.0"
|
|
18
18
|
}
|
|
19
19
|
}
|