@livx.cc/agentx 0.99.150 → 0.99.151

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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { c as AgentOptions, H as Hooks, x as RunResult, k as Decider, b as Agent, q as PermissionPolicy, G as Gender, L as LineKind, d as ChannelMode, y as SecondChannelOptions, S as SecondChannel } from './secondChannel-CJ1eYZKA.js';
2
- export { A as ADVISE_LIMIT, a as AdvisorSetup, C as CC_WRITE_TOOLS, e as ChatFragment, f as ChatUsage, g as Classification, h as Classifier, i as CompactResult, j as ContextFileSpec, D as DEFAULT_MUTATING, l as Decision, M as ModelRouter, m as ModelRouterOptions, P as PLANNER_BLOCKED, n as PLANNER_REFUSAL, o as PLAN_FIRST, p as PermissionOptions, r as PermissionRule, s as PreToolUseDecision, R as ReasoningEffort, t as RecordingHooks, u as RecordingLifecycle, v as RouteDecision, w as RouterState, T as Tier, z as ToolUse, B as ToolUseMeta, W as WRITE_TOOLS, E as advisorFor, F as advisorPrompt, I as ccModeOptions, J as claudeCodeDisallowedTools, K as composeHooks, N as delegatePrompt, O as delegateTools, Q as delegateWorkerFor, U as estimateTokens, V as jevAvailable, X as jevClassifier, Y as loadContextFiles, Z as loadInstructions, _ as makeAdvisor, $ as meterWorkers, a0 as pickTier, a1 as planMode, a2 as plannerBlocks, a3 as reasoningToChatFragment } from './secondChannel-CJ1eYZKA.js';
1
+ import { c as AgentOptions, H as Hooks, x as RunResult, k as Decider, b as Agent, q as PermissionPolicy, G as Gender, L as LineKind, d as ChannelMode, y as SecondChannelOptions, S as SecondChannel } from './secondChannel--iqPHPO_.js';
2
+ export { A as ADVISE_LIMIT, a as AdvisorSetup, C as CC_WRITE_TOOLS, e as ChatFragment, f as ChatUsage, g as Classification, h as Classifier, i as CompactResult, j as ContextFileSpec, D as DEFAULT_MUTATING, l as Decision, M as ModelRouter, m as ModelRouterOptions, P as PLANNER_BLOCKED, n as PLANNER_REFUSAL, o as PLAN_FIRST, p as PermissionOptions, r as PermissionRule, s as PreToolUseDecision, R as ReasoningEffort, t as RecordingHooks, u as RecordingLifecycle, v as RouteDecision, w as RouterState, T as Tier, z as ToolUse, B as ToolUseMeta, W as WRITE_TOOLS, E as advisorFor, F as advisorPrompt, I as ccModeOptions, J as claudeCodeDisallowedTools, K as composeHooks, N as delegatePrompt, O as delegateTools, Q as delegateWorkerFor, U as estimateTokens, V as jevAvailable, X as jevClassifier, Y as loadContextFiles, Z as loadInstructions, _ as makeAdvisor, $ as meterWorkers, a0 as pickTier, a1 as planMode, a2 as plannerBlocks, a3 as reasoningToChatFragment } from './secondChannel--iqPHPO_.js';
3
3
  export { MODEL_ALIASES, ModelSwitch, ResolveModelSwitchOpts, latestClaude, modelShortLabel, resolveModelAlias, resolveModelSwitch } from './models.js';
4
4
  import { IFilesystem, FileMetadata } from '@livx.cc/wcli/core';
5
5
  export { CommandExecutor, FileMetadata, IFilesystem, IndexedDbFilesystem, MemFilesystem, registerHeadlessCommands } from '@livx.cc/wcli/core';
package/dist/index.js CHANGED
@@ -14309,6 +14309,8 @@ var SecondChannel = class {
14309
14309
  // live: that draft settled
14310
14310
  askLeaf = null;
14311
14311
  // live: this turn's ask leaf
14312
+ barged = false;
14313
+ // the user cut in since their last turn: that turn is a steer, not a story to react to
14312
14314
  leafReady = Promise.resolve();
14313
14315
  // live: the turn-end leaf pick settled
14314
14316
  recent = [];
@@ -14523,9 +14525,11 @@ var SecondChannel = class {
14523
14525
  this.detect(this.heard);
14524
14526
  this.main = "idle";
14525
14527
  this.onAgentState("queued");
14528
+ const steer = this.barged;
14529
+ this.barged = false;
14526
14530
  if (this.tree) {
14527
14531
  this.noteTalk("them", this.heard);
14528
- this.leafReady = this.turnEndLeaf();
14532
+ this.leafReady = this.turnEndLeaf(steer);
14529
14533
  }
14530
14534
  }
14531
14535
  /** The main answer's streamed text (before its audio): channel-1 is responding — no bridge from here on. */
@@ -14540,6 +14544,7 @@ var SecondChannel = class {
14540
14544
  /** The user barged in: cut the in-flight line now and drop every pending decision. */
14541
14545
  onBargeIn() {
14542
14546
  this.gen++;
14547
+ this.barged = true;
14543
14548
  this.cutLine = this.inflight || this.live ? this.live : null;
14544
14549
  if (this.inflight) {
14545
14550
  this.inflight = null;
@@ -14697,7 +14702,7 @@ var SecondChannel = class {
14697
14702
  }
14698
14703
  /** The user's turn went to MAIN: the armed leaf at once, else the quick model may name one in time. It plays only while
14699
14704
  * MAIN is still silent, as the turn's first sound. */
14700
- async turnEndLeaf() {
14705
+ async turnEndLeaf(steer = false) {
14701
14706
  const tree = this.tree, gen = this.gen, heard = this.heard;
14702
14707
  let hit = tree.turnLeaf();
14703
14708
  if (!hit && this.o.pickLeaf && !tree.empty) {
@@ -14710,6 +14715,7 @@ var SecondChannel = class {
14710
14715
  if (gen === this.gen && echoesHeard(hit.node.line, heard)) this.askLeaf = { gen, text: hit.node.line };
14711
14716
  return;
14712
14717
  }
14718
+ if (hit && steer) return;
14713
14719
  if (hit && gen === this.gen && (this.main === "queued" || this.main === "thinking")) {
14714
14720
  this.playLeaf(hit, "working", "bridge");
14715
14721
  if (this.lastKind === "bridge" && this.bridged) {
@@ -15389,7 +15395,9 @@ var VoiceCall = class {
15389
15395
  log31.warn(`work reply failed \u2014 MAIN only: ${e?.message ?? e}`);
15390
15396
  return "";
15391
15397
  }).finally(() => clearTimeout(late)) : "";
15392
- const ack = workAck(raw, lang ?? "", this.o.gender), line = cleanWorkReply(raw, lang ?? "") || ack, stop = /^\s*stop\s*:/i.test(raw), change = !line || /^\s*work\s*:/i.test(raw);
15398
+ const own = cleanWorkReply(raw, lang ?? ""), answer = own || workAck(raw, lang ?? "", this.o.gender);
15399
+ const line = own || (this.o.mode === "live" ? "" : answer);
15400
+ const stop = /^\s*stop\s*:/i.test(raw), change = !answer || /^\s*work\s*:/i.test(raw);
15393
15401
  const noted = `[The user said this on the call while you worked: "${t.text}".${line ? ` You answered aloud: "${line}".` : ""}${stop ? " That stopped the work." : ""} Take it into account; do not answer it again.]`;
15394
15402
  if (line && !this.ended) {
15395
15403
  for (let i = 0; i < 8 && this.say(line, "aside") === false; i++) {