@livx.cc/agentx 0.99.122 → 0.99.123
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/README.md +1 -1
- package/dist/cli.d.ts +2 -2
- package/dist/cli.js +42 -9
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +36 -9
- package/dist/index.js.map +1 -1
- package/dist/{mcp-CUo-9LUe.d.ts → mcp-DZhcLur2.d.ts} +1 -1
- package/dist/mcp.client.d.ts +2 -2
- package/dist/{secondChannel-BddfVzTp.d.ts → secondChannel-DES_VIeN.d.ts} +25 -2
- package/dist/{tools-DZHZIyxh.d.ts → tools-DwfeF8VQ.d.ts} +3 -0
- package/dist/tools.shell.d.ts +1 -1
- package/dist/tools.shell.js +1 -0
- 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-DZhcLur2.js';
|
|
2
|
+
import { A as AgentTool } from './tools-DwfeF8VQ.js';
|
|
3
3
|
import '@livx.cc/wcli/core';
|
|
4
4
|
|
|
5
5
|
/** Hard cap for `tools/call`. NOT the 30s protocol timeout: a tool call is real work (an image render, a crawl)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IFilesystem } from '@livx.cc/wcli/core';
|
|
2
|
-
import { M as Message, o as MessageContent, H as HostBridge, A as AgentTool, C as ChatLike, k as JobRegistry, U as UserQuestion } from './tools-
|
|
2
|
+
import { M as Message, o as MessageContent, H as HostBridge, A as AgentTool, C as ChatLike, k as JobRegistry, U as UserQuestion } from './tools-DwfeF8VQ.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* `--model auto`: per-turn model routing. A classifier (Jev by default — injected, so a regex or
|
|
@@ -284,6 +284,12 @@ declare function composeHooks(...list: (Hooks | undefined)[]): Hooks;
|
|
|
284
284
|
declare const WRITE_TOOLS: Set<string>;
|
|
285
285
|
/** The planner also loses the shells: either one can write files. */
|
|
286
286
|
declare const PLANNER_BLOCKED: Set<string>;
|
|
287
|
+
/** Does the planner lose this tool? By the tool's own `writes` flag first — it survives a host rename (shraga-ee's
|
|
288
|
+
* `Shell` → `Bash`) — then by name, case-insensitively (`Bash`, a host's own `write`). */
|
|
289
|
+
declare const plannerBlocks: (t: {
|
|
290
|
+
name: string;
|
|
291
|
+
writes?: boolean;
|
|
292
|
+
}) => boolean;
|
|
287
293
|
declare const PLANNER_REFUSAL = "Refused: you are the planner and do not write files. Delegate the change with Task/TaskBatch (model set to the worker) and give the worker a full spec.";
|
|
288
294
|
declare const PLAN_FIRST = "Refused: check your plan with `Advise` before the first write (files, data shape, the hard parts). Then write.";
|
|
289
295
|
/** A build may consult at most this many times by default: plan + review + one spare. */
|
|
@@ -338,6 +344,21 @@ declare function meterWorkers<T extends ChatLike>(ai: T, main: string): {
|
|
|
338
344
|
model: () => string | undefined;
|
|
339
345
|
reset: () => void;
|
|
340
346
|
};
|
|
347
|
+
/** Claude Code's NATIVE file-changing tools (its own loop runs them; agentx's tool wrappers never see the call). */
|
|
348
|
+
declare const CC_WRITE_TOOLS: string[];
|
|
349
|
+
/**
|
|
350
|
+
* The same two modes for a claude-code/* agent. Claude Code runs its OWN tool loop, so `delegateTools`/`gate`
|
|
351
|
+
* (which wrap agentx tools) never fire there — Opus wrote with its native Write and had no worker tool.
|
|
352
|
+
* - planner: native writes, Bash and native Task/Agent are `disallowedTools` (the SDK strips them); agentx's
|
|
353
|
+
* Task/TaskBatch reach it over the in-process bridge (ccBridge.ts), so it delegates to workers on the worker model.
|
|
354
|
+
* - advised worker: `Advise` goes over the bridge; a PreToolUse hook denies a native write until one consult
|
|
355
|
+
* (`used()` > 0). The host's own `hooks` are kept.
|
|
356
|
+
*/
|
|
357
|
+
declare function ccModeOptions(kind: 'delegate' | 'advisor' | undefined, hostHooks: Record<string, unknown[]> | undefined, used: () => number): {
|
|
358
|
+
bridge: Set<string>;
|
|
359
|
+
disallow: string[];
|
|
360
|
+
hooks?: Record<string, unknown[]>;
|
|
361
|
+
};
|
|
341
362
|
|
|
342
363
|
/**
|
|
343
364
|
* Normalized reasoning/thinking control → provider-specific request fragment.
|
|
@@ -664,6 +685,8 @@ declare class Agent {
|
|
|
664
685
|
private activeTools;
|
|
665
686
|
private meter?;
|
|
666
687
|
private modeModel?;
|
|
688
|
+
private modeKind?;
|
|
689
|
+
private adv?;
|
|
667
690
|
private lastTask;
|
|
668
691
|
/** claude-code bridge for agentx-only tools (ccBridge.ts) + the current step's executor it calls. */
|
|
669
692
|
private ccServer?;
|
|
@@ -1189,4 +1212,4 @@ declare class SecondChannel {
|
|
|
1189
1212
|
private say;
|
|
1190
1213
|
}
|
|
1191
1214
|
|
|
1192
|
-
export { ADVISE_LIMIT as A,
|
|
1215
|
+
export { plannerBlocks as $, ADVISE_LIMIT as A, advisorFor as B, CC_WRITE_TOOLS as C, DEFAULT_MUTATING as D, advisorPrompt as E, ccModeOptions as F, type Gender as G, type Hooks as H, claudeCodeDisallowedTools as I, composeHooks as J, delegatePrompt as K, type LineKind as L, ModelRouter as M, delegateTools as N, delegateWorkerFor as O, PLANNER_BLOCKED as P, estimateTokens as Q, type ReasoningEffort as R, SecondChannel as S, type Tier as T, jevAvailable as U, jevClassifier as V, WRITE_TOOLS as W, makeAdvisor as X, meterWorkers as Y, pickTier as Z, planMode as _, type AdvisorSetup as a, reasoningToChatFragment as a0, Agent as b, AgentOptions as c, type ChannelMode as d, type ChatFragment as e, type ChatUsage as f, type Classification as g, type Classifier as h, type CompactResult as i, type Decider as j, type Decision as k, ModelRouterOptions as l, PLANNER_REFUSAL as m, PLAN_FIRST as n, PermissionOptions as o, PermissionPolicy as p, type PermissionRule as q, type PreToolUseDecision as r, RecordingHooks as s, RecordingLifecycle as t, type RouteDecision as u, type RouterState as v, type RunResult as w, SecondChannelOptions as x, type ToolUse as y, type ToolUseMeta as z };
|
|
@@ -552,6 +552,9 @@ interface AgentTool {
|
|
|
552
552
|
* result. Omit for tools that return promptly.
|
|
553
553
|
*/
|
|
554
554
|
maxDurationMs?: number;
|
|
555
|
+
/** This tool can change files (a file editor or a shell). Survives a host rename (`Shell` → `Bash`), so policy that
|
|
556
|
+
* must hold whatever the tool is called — delegate mode's planner refusal — keys on it, not on the name. */
|
|
557
|
+
writes?: boolean;
|
|
555
558
|
/**
|
|
556
559
|
* Is `maxDurationMs` SELF-ENFORCED — does this tool abort itself at that bound and return?
|
|
557
560
|
* An enforced bound cannot be overrun, so a transport above it needs only modest slack; an ADVISORY
|
package/dist/tools.shell.d.ts
CHANGED
package/dist/tools.shell.js
CHANGED
|
@@ -1221,6 +1221,7 @@ function makeRealShellTool(options) {
|
|
|
1221
1221
|
};
|
|
1222
1222
|
return {
|
|
1223
1223
|
name: "Shell",
|
|
1224
|
+
writes: true,
|
|
1224
1225
|
// Rebind for an isolated child agent (git worktree): same policy/env/timeouts, new cwd. The
|
|
1225
1226
|
// `registry` is deliberately dropped — it is bound to the PARENT's cwd (and, in hosts like
|
|
1226
1227
|
// shraga-ee, to the parent's session), so a background job started from the child would run
|