@livx.cc/agentx 0.99.62 → 0.99.64

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.
@@ -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-HsbxgqjF.js';
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-DV4SkkQs.js';
3
3
 
4
4
  /**
5
5
  * `--model auto`: per-turn model routing. A classifier (Jev by default — injected, so a regex or
package/dist/cli.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env bun
2
- import { m as RouterState, H as Hooks, n as RunResult, R as ReasoningEffort, A as Agent } from './Agent-DbqXQy5q.js';
2
+ import { m as RouterState, H as Hooks, n as RunResult, R as ReasoningEffort, A as Agent } from './Agent-3eJ9N9hh.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-HsbxgqjF.js';
4
+ import { M as Message, U as UserQuestion, H as HostBridge, c as ContentPart, o as MessageContent } from './tools-DV4SkkQs.js';
5
5
 
6
6
  /**
7
7
  * On-disk session store for the CLI: each conversation is one JSON file at
package/dist/cli.js CHANGED
@@ -4891,6 +4891,9 @@ var Agent = class _Agent {
4891
4891
  this.transcript.push({
4892
4892
  role: "assistant",
4893
4893
  content: res.content ?? "",
4894
+ // Record the model the adapter actually ran: aliases (`claude-code/opus`) resolve to a concrete
4895
+ // id (e.g. `claude-opus-5-5`); fall back to the requested model if the adapter didn't report one.
4896
+ model: res.model ?? o.model,
4894
4897
  ...toolCalls.length ? { tool_calls: toolCalls } : {},
4895
4898
  ...res.reasoningContent && passesBackReasoning(o.model) ? { reasoning_content: res.reasoningContent } : {}
4896
4899
  });
@@ -5053,7 +5056,9 @@ var Agent = class _Agent {
5053
5056
  let sawTool = false;
5054
5057
  let trailing = "";
5055
5058
  let reasoning = "";
5059
+ let resolvedModel;
5056
5060
  for await (const chunk of stream) {
5061
+ if (chunk.model) resolvedModel = chunk.model;
5057
5062
  poke?.();
5058
5063
  if (this.options.signal?.aborted) break;
5059
5064
  if (chunk.reasoningContent) {
@@ -5102,7 +5107,7 @@ var Agent = class _Agent {
5102
5107
  }
5103
5108
  const delegatedTools = delegatedOrder.map((k) => delegated.get(k));
5104
5109
  const endedWithoutClosing = sawTool && (!trailing.trim() || endsOnAnnouncedAction(trailing));
5105
- return { content, ...reasoning ? { reasoningContent: reasoning } : {}, ...finishReason ? { finishReason } : {}, ...toolCalls ? { toolCalls } : {}, ...usage ? { usage } : {}, ...delegatedTools.length ? { delegatedTools } : {}, ...endedWithoutClosing ? { endedWithoutClosing: true } : {} };
5110
+ return { content, ...resolvedModel ? { model: resolvedModel } : {}, ...reasoning ? { reasoningContent: reasoning } : {}, ...finishReason ? { finishReason } : {}, ...toolCalls ? { toolCalls } : {}, ...usage ? { usage } : {}, ...delegatedTools.length ? { delegatedTools } : {}, ...endedWithoutClosing ? { endedWithoutClosing: true } : {} };
5106
5111
  }
5107
5112
  /**
5108
5113
  * FABRICATED TOOL USE — the failure no call-reactive layer can see, because there IS no call.
@@ -10658,7 +10663,12 @@ Another agent just implemented the above. Independently check the CURRENT state
10658
10663
  name: "CancelTask",
10659
10664
  description: "Cancel a running background task by id.",
10660
10665
  parameters: { type: "object", required: ["id"], properties: { id: { type: "string" } } },
10661
- run: async ({ id }) => this.cancelTask(String(id))
10666
+ // Cancel-and-redirect ("stop — do Y instead") is ONE user line: live, the reflex cancelled, said "fetching Y now" and
10667
+ // never dispatched (2/5 Bare voice runs). The tool result is where it looks next — tell it the redirect needs Act.
10668
+ run: async ({ id }) => {
10669
+ const r = this.cancelTask(String(id));
10670
+ return this.tasks.get(String(id))?.status === "cancelled" && r.endsWith("cancelled.") ? `${r} If the user's message ALSO asked for different work (a redirect \u2014 "instead\u2026", "actually\u2026", "do Y"), call Act NOW with that new brief: saying you are on it without calling Act does nothing. If they only asked to stop, just acknowledge in a few words.` : r;
10671
+ }
10662
10672
  };
10663
10673
  }
10664
10674
  };