@livx.cc/agentx 0.99.2 → 0.99.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/{Agent-B_JD31Zx.d.ts → Agent-BPEXD7n7.d.ts} +1 -1
- package/dist/cli.d.ts +2 -2
- package/dist/cli.js +52 -9
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/{mcp-BZcizHav.d.ts → mcp-DyeLLday.d.ts} +1 -1
- package/dist/mcp.client.d.ts +2 -2
- package/dist/{tools-DmrqMJcI.d.ts → tools-CrsRHvvl.d.ts} +15 -0
- package/dist/tools.shell.d.ts +1 -1
- package/dist/tools.shell.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as AgentOptions, H as Hooks, h as RunResult, A as Agent } from './Agent-
|
|
2
|
-
export { C as ChatFragment, D as DEFAULT_MUTATING, b as Decision, P as PermissionOptions, c as PermissionPolicy, d as PermissionRule, e as PreToolUseDecision, R as ReasoningEffort, f as RecordingHooks, g as RecordingLifecycle, T as ToolUse, i as ToolUseMeta, j as composeHooks, p as planMode, r as reasoningToChatFragment } from './Agent-
|
|
1
|
+
import { a as AgentOptions, H as Hooks, h as RunResult, A as Agent } from './Agent-BPEXD7n7.js';
|
|
2
|
+
export { C as ChatFragment, D as DEFAULT_MUTATING, b as Decision, P as PermissionOptions, c as PermissionPolicy, d as PermissionRule, e as PreToolUseDecision, R as ReasoningEffort, f as RecordingHooks, g as RecordingLifecycle, T as ToolUse, i as ToolUseMeta, j as composeHooks, p as planMode, r as reasoningToChatFragment } from './Agent-BPEXD7n7.js';
|
|
3
3
|
import { IFilesystem, FileMetadata } from '@livx.cc/wcli/core';
|
|
4
4
|
export { CommandExecutor, FileMetadata, IFilesystem, IndexedDbFilesystem, MemFilesystem, registerHeadlessCommands } from '@livx.cc/wcli/core';
|
|
5
5
|
import { BodDB } from '@bod.ee/db';
|
|
6
|
-
import { A as AgentTool, C as ChatLike, a as ChatOptions, b as ChatResponse, h as ToolCall, H as HostBridge, U as UserQuestion, e as MessageContent } from './tools-
|
|
7
|
-
export { c as ContentPart, d as HostEvent, M as Message, R as Role, S as SandboxJobRegistry, f as StreamChunk, T as TodoItem, g as Tool, i as ToolContext, j as bashTool, k as contentText, l as defaultTools, m as editTool, n as exitSessionTool, o as imagePart, p as makeContext, q as makeJobTools, r as readTool, t as toWireTools, s as todoWriteTool, u as toolRegistry, v as toolsByName } from './tools-
|
|
8
|
-
export { M as McpCall, a as McpImage, b as McpRoute, c as McpRouteResolver, d as McpToolResult, e as McpToolSearchOptions, f as McpToolSpec, g as MountedMcpLike, h as buildMcpCatalog, m as makeLazyMcpToolSearch, i as makeMcpToolSearch, j as makeMcpToolSearchFromMounted, k as mcpToolToAgentTool, l as mcpToolsToAgentTools } from './mcp-
|
|
6
|
+
import { A as AgentTool, C as ChatLike, a as ChatOptions, b as ChatResponse, h as ToolCall, H as HostBridge, U as UserQuestion, e as MessageContent } from './tools-CrsRHvvl.js';
|
|
7
|
+
export { c as ContentPart, d as HostEvent, M as Message, R as Role, S as SandboxJobRegistry, f as StreamChunk, T as TodoItem, g as Tool, i as ToolContext, j as bashTool, k as contentText, l as defaultTools, m as editTool, n as exitSessionTool, o as imagePart, p as makeContext, q as makeJobTools, r as readTool, t as toWireTools, s as todoWriteTool, u as toolRegistry, v as toolsByName } from './tools-CrsRHvvl.js';
|
|
8
|
+
export { M as McpCall, a as McpImage, b as McpRoute, c as McpRouteResolver, d as McpToolResult, e as McpToolSearchOptions, f as McpToolSpec, g as MountedMcpLike, h as buildMcpCatalog, m as makeLazyMcpToolSearch, i as makeMcpToolSearch, j as makeMcpToolSearchFromMounted, k as mcpToolToAgentTool, l as mcpToolsToAgentTools } from './mcp-DyeLLday.js';
|
|
9
9
|
import * as libx_js_src_modules_log from 'libx.js/src/modules/log';
|
|
10
10
|
export { log } from 'libx.js/src/modules/log';
|
|
11
11
|
|
package/dist/index.js
CHANGED
|
@@ -3528,6 +3528,7 @@ var Agent = class _Agent {
|
|
|
3528
3528
|
let res;
|
|
3529
3529
|
const sent = this.trimContext();
|
|
3530
3530
|
const frag = reasoningToChatFragment(o.model, o.reasoning);
|
|
3531
|
+
const sentTools = o.model.startsWith("claude-code/") ? [] : wireTools;
|
|
3531
3532
|
const isCursorWithTools = o.model.startsWith("cursor/") && wireTools.length > 0;
|
|
3532
3533
|
const cursorPo = isCursorWithTools ? {
|
|
3533
3534
|
toolExecutor: async (name, args) => {
|
|
@@ -3545,10 +3546,10 @@ var Agent = class _Agent {
|
|
|
3545
3546
|
for (let attempt = 0; ; attempt++) {
|
|
3546
3547
|
try {
|
|
3547
3548
|
if (useStream) {
|
|
3548
|
-
const r = await o.ai.chat({ model: o.model, messages: sent, tools:
|
|
3549
|
+
const r = await o.ai.chat({ model: o.model, messages: sent, tools: sentTools, stream: true, signal: o.signal, ...o.toolChoice ? { toolChoice: o.toolChoice } : {}, ...reasonOpts });
|
|
3549
3550
|
res = await this.consumeStream(r);
|
|
3550
3551
|
} else {
|
|
3551
|
-
const r = await o.ai.chat({ model: o.model, messages: sent, tools:
|
|
3552
|
+
const r = await o.ai.chat({ model: o.model, messages: sent, tools: sentTools, stream: false, signal: o.signal, ...o.toolChoice ? { toolChoice: o.toolChoice } : {}, ...reasonOpts });
|
|
3552
3553
|
res = r;
|
|
3553
3554
|
}
|
|
3554
3555
|
break;
|
|
@@ -3642,6 +3643,11 @@ var Agent = class _Agent {
|
|
|
3642
3643
|
for await (const chunk of stream) {
|
|
3643
3644
|
if (this.options.signal?.aborted) break;
|
|
3644
3645
|
if (chunk.reasoningContent) this.options.host.notify({ kind: "thinking_delta", message: chunk.reasoningContent });
|
|
3646
|
+
if (chunk.toolActivity) {
|
|
3647
|
+
const a = chunk.toolActivity;
|
|
3648
|
+
const verb = a.status === "error" ? "\u2717" : a.status === "completed" ? "\u2713" : "\u2192";
|
|
3649
|
+
this.options.host.notify({ kind: "tool_activity", id: a.id, name: a.name, input: a.input, status: a.status, message: `${verb} ${a.name}` });
|
|
3650
|
+
}
|
|
3645
3651
|
if (chunk.content) {
|
|
3646
3652
|
content += chunk.content;
|
|
3647
3653
|
this.options.host.notify({ kind: "text_delta", message: chunk.content });
|