@livx.cc/agentx 0.99.122 → 0.99.124
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 +218 -110
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +42 -12
- package/dist/index.js +210 -105
- 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-GFT69ax4.d.ts} +47 -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/README.md
CHANGED
|
@@ -87,7 +87,7 @@ Beyond file tools, the runtime ships the higher-altitude pieces too — each an
|
|
|
87
87
|
- **Skills + memory** — VFS-backed (`skillsDir`/`memoryDir`); persistence is just the backend choice.
|
|
88
88
|
- **Subagents** (`subagents`; **typed agents** via `agentsDir` — `<dir>/<name>.md` defines a persona + model + scoped tools, selected with the `Task` `agentType`), **hooks** (`hooks`: preToolUse/postToolUse/onStop — block or audit any tool call), **slash-commands** (`commandsDir`), **TodoWrite**, **MCP** (`mcpToolsToAgentTools`).
|
|
89
89
|
- **A delegated child is a full agent**: it inherits the parent's **tools** (incl. host-injected/MCP ones), **system prompt**, and **providerOptions** (only when it stays on the same provider — cursor's `cwd`/`cursorSession` never leak onto an anthropic child; override with `providerOptionsFor(model)`). `Task({ model })` (and a `TaskBatch` task's `model`) runs one sub-task on another model — alias or full id, precedence **explicit `model` > `agentType` def's `model` > parent's**. A def's frontmatter `tools:` allowlist narrows the inherited set and may name a host-injected tool by name; its body still overrides the persona. The host's `preToolUse` gate is inherited too, so delegation is not a way around it (the observer/lifecycle hooks stay parent-only). Inherited tools that escape the VFS are re-bound per child (`AgentTool.withCwd`): a `isolation:"worktree"` child's real `Shell` runs in the WORKTREE, keeping any host rename (`Shell` -> `Bash`) (background shell jobs are off there, and the parent-bound `ShellOutput`/`ShellStatus`/`ShellKill` are dropped rather than pointed at the parent's jobs); an overlay child's shell writes straight to the working tree — an overlay isolates the VFS, not a process.
|
|
90
|
-
- **Two-model modes** (`src/modes.ts`) — **delegate** (`delegate: { worker }`): the agent's model PLANS and may not write (Write/Edit/MultiEdit/ApplyEdits/bash/Shell are refused at execution, keyed on `ToolContext.model`), `Task`/`TaskBatch` go on (depth 1, children default to the worker, and get the host's `postToolUse` so their writes are observed). **advisor** (`advisor: { model, limit?, snapshot? }`): the agent's model does the work and an `Advise` tool asks the stronger model (≤3 calls; it sees only the request, the host's optional `snapshot()` and the question); the first write waits for one consult. Both are off when the models are equal or either is `cursor/*`; the second model's usage comes back as `RunResult.workerUsage` / `workerModel` (not in `usage`). Prompt directives switch them: `[opus->haiku] task` (delegate), `[haiku<-opus] task` (advisor), `[off]`; keyed forms `delegate:x`, `advisor:x`, `mode:off`. A host passing its own `keys` to `parseDirectives` must list `delegate` / `advisor` / `mode`.
|
|
90
|
+
- **Two-model modes** (`src/modes.ts`) — **delegate** (`delegate: { worker }`): the agent's model PLANS and may not write (Write/Edit/MultiEdit/ApplyEdits/bash/Shell are refused at execution, keyed on `ToolContext.model`), `Task`/`TaskBatch` go on (depth 1, children default to the worker, and get the host's `postToolUse` so their writes are observed). **advisor** (`advisor: { model, limit?, snapshot? }`): the agent's model does the work and an `Advise` tool asks the stronger model (≤3 calls; it sees only the request, the host's optional `snapshot()` and the question); the first write waits for one consult. A `claude-code/*` agent gets the same modes as SDK options (`ccModeOptions`): a planner's native Write/Edit/MultiEdit/NotebookEdit/Bash/Task/Agent are `disallowedTools` and agentx's Task/TaskBatch reach it over the in-process bridge; an advised worker gets `Advise` bridged and a PreToolUse hook that denies native writes until one consult. Mixed pairs (anthropic ↔ claude-code) work. Both are off when the models are equal or either is `cursor/*`; the second model's usage comes back as `RunResult.workerUsage` / `workerModel` (not in `usage`). Prompt directives switch them: `[opus->haiku] task` (delegate), `[haiku<-opus] task` (advisor), `[off]`; keyed forms `delegate:x`, `advisor:x`, `mode:off`. A host passing its own `keys` to `parseDirectives` must list `delegate` / `advisor` / `mode`.
|
|
91
91
|
- **Streaming** (`stream: true` → `text_delta` via `HostBridge.notify`) and **context compaction** (`compaction: { maxMessages }` → edge-safe summarize-and-boundary). Defaults preserve the original non-stream, drop-oldest behavior.
|
|
92
92
|
- **Multi-turn + project context** — `Agent.send()` continues a conversation across turns (vs `run()`, which starts fresh); **project instructions** (`instructionFiles`: `AGENTS.md`/`CLAUDE.md` at the FS root) inject into the system prompt.
|
|
93
93
|
- **DuplexAgent** (`src/duplex.ts`) — voice-optimized three-tier engine (reflex/act/think): a fast reflex agent streams instant replies and self-selects escalation — `Act` for standard tool work (Sonnet-class), `Think` for deep reasoning (Opus-class, configurable, default on). Results are pushed back and re-voiced by the reflex (turn mutex, coalesced completions, `TaskStatus`/`CancelTask`). See [`mind/10`](./mind/10-duplex.md).
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
import {
|
|
2
|
+
import { w as RouterState, H as Hooks, c as AgentOptions, x as RunResult, f as ChatUsage, R as ReasoningEffort, d as ChannelMode, b as Agent } from './secondChannel-GFT69ax4.js';
|
|
3
3
|
import { IFilesystem } from '@livx.cc/wcli/core';
|
|
4
|
-
import { M as Message, U as UserQuestion, H as HostBridge, c as ContentPart, o as MessageContent } from './tools-
|
|
4
|
+
import { M as Message, U as UserQuestion, H as HostBridge, c as ContentPart, o as MessageContent } from './tools-DwfeF8VQ.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* On-disk session store for the CLI: each conversation is one JSON file at
|