@livx.cc/agentx 0.99.30 → 0.99.32
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/{Agent-DC7FEEjF.d.ts → Agent-USp7SIao.d.ts} +4 -3
- package/dist/cli.d.ts +2 -2
- package/dist/cli.js +29 -13
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +27 -12
- package/dist/index.js.map +1 -1
- package/dist/{mcp-Cnq0pS95.d.ts → mcp-Bd19NiCL.d.ts} +1 -1
- package/dist/mcp.client.d.ts +2 -2
- package/dist/{tools-BZVppx-6.d.ts → tools-Byyh_bae.d.ts} +4 -3
- package/dist/tools.shell.d.ts +4 -1
- package/dist/tools.shell.js +7 -4
- package/dist/tools.shell.js.map +1 -1
- package/package.json +1 -1
package/dist/mcp.client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as McpToolSearchOptions, f as McpToolSpec } from './mcp-
|
|
2
|
-
import { A as AgentTool } from './tools-
|
|
1
|
+
import { e as McpToolSearchOptions, f as McpToolSpec } from './mcp-Bd19NiCL.js';
|
|
2
|
+
import { A as AgentTool } from './tools-Byyh_bae.js';
|
|
3
3
|
import '@livx.cc/wcli/core';
|
|
4
4
|
|
|
5
5
|
/** A JSON-RPC 2.0 transport: request (awaits a result), notify (fire-and-forget), close. */
|
|
@@ -161,9 +161,10 @@ interface ChatResponse {
|
|
|
161
161
|
output?: unknown;
|
|
162
162
|
status: 'running' | 'completed' | 'error';
|
|
163
163
|
}[];
|
|
164
|
-
/** A delegated runtime (cursor/claude-code)
|
|
165
|
-
* it went silent post-work
|
|
166
|
-
|
|
164
|
+
/** A delegated runtime (cursor/claude-code) ran tools this turn but never CLOSED it: either no assistant
|
|
165
|
+
* text followed the last tool (it went silent post-work), or the text it did emit ends on an action it
|
|
166
|
+
* announced and never took. Signals the loop's closure reflex (see AgentOptions.closeDelegatedTurns). */
|
|
167
|
+
endedWithoutClosing?: boolean;
|
|
167
168
|
}
|
|
168
169
|
/**
|
|
169
170
|
* One incremental event from a streamed `chat({stream:true})` call — mirrors
|
package/dist/tools.shell.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AgentTool } from './tools-
|
|
1
|
+
import { A as AgentTool } from './tools-Byyh_bae.js';
|
|
2
2
|
import '@livx.cc/wcli/core';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -55,6 +55,9 @@ interface RealShellOptions {
|
|
|
55
55
|
spawn?: SpawnFn;
|
|
56
56
|
/** Per-command wall-clock cap (kill on overrun). Default 120s. */
|
|
57
57
|
timeoutMs?: number;
|
|
58
|
+
/** Ceiling for the model-supplied `timeoutMs` argument (a long build can ask for more than the
|
|
59
|
+
* default, but not for an unbounded turn). Default 10min. */
|
|
60
|
+
maxTimeoutMs?: number;
|
|
58
61
|
/** Extra env merged over the (optionally scrubbed) base env for the child. */
|
|
59
62
|
env?: Record<string, string>;
|
|
60
63
|
/** Strip likely-secret vars (API keys, tokens, cloud creds) from the child's env. Default ON.
|
package/dist/tools.shell.js
CHANGED
|
@@ -446,20 +446,23 @@ var ShellJobRegistry = class {
|
|
|
446
446
|
}
|
|
447
447
|
};
|
|
448
448
|
function makeRealShellTool(options) {
|
|
449
|
-
const
|
|
449
|
+
const defaultTimeoutMs = options.timeoutMs ?? 12e4;
|
|
450
|
+
const maxTimeoutMs = Math.max(options.maxTimeoutMs ?? 6e5, defaultTimeoutMs);
|
|
450
451
|
return {
|
|
451
452
|
name: "Shell",
|
|
452
|
-
description:
|
|
453
|
+
description: `Run a shell command via /bin/sh in the working directory. Executes any installed binary \u2014 ls, cat, grep, git, bun, node, curl, scripts, etc. Returns combined stdout+stderr; non-zero exits are prefixed \`[exit N]\`. Runs non-interactively with no terminal (stdin is /dev/null): commands that prompt for input fail fast rather than hang \u2014 for privileged actions use a non-interactive flag (e.g. \`sudo -n\`), or ask the user to run the command themselves. Each command is killed after ${defaultTimeoutMs}ms (result \`[exit 124]\` with whatever output it produced) \u2014 pass \`timeoutMs\` (max ${maxTimeoutMs}) for a legitimately slower command, and always bound network commands yourself (e.g. \`curl -m 10\`). Set \`background:true\` for long-running processes (servers, watchers) \u2014 returns a job id immediately; poll with ShellOutput, stop with ShellKill.`,
|
|
453
454
|
parameters: {
|
|
454
455
|
type: "object",
|
|
455
456
|
required: ["command"],
|
|
456
457
|
properties: {
|
|
457
458
|
command: { type: "string", description: "the shell command line to execute" },
|
|
458
|
-
background: { type: "boolean", description: "run detached and return a job id immediately (for servers/watchers/long builds)" }
|
|
459
|
+
background: { type: "boolean", description: "run detached and return a job id immediately (for servers/watchers/long builds)" },
|
|
460
|
+
timeoutMs: { type: "number", description: "wall-clock cap for THIS command, overriding the default (clamped to the tool max)" }
|
|
459
461
|
}
|
|
460
462
|
},
|
|
461
|
-
async run({ command, background }, ctx) {
|
|
463
|
+
async run({ command, background, timeoutMs: askedTimeoutMs }, ctx) {
|
|
462
464
|
const cmd = String(command ?? "");
|
|
465
|
+
const timeoutMs = Number.isFinite(askedTimeoutMs) && Number(askedTimeoutMs) > 0 ? Math.min(Number(askedTimeoutMs), maxTimeoutMs) : defaultTimeoutMs;
|
|
463
466
|
if (!cmd.trim()) return "[exit 1] empty command";
|
|
464
467
|
if (background) {
|
|
465
468
|
if (!options.registry) return "Error: background execution is not enabled in this host (no job registry).";
|