@livx.cc/agentx 0.99.140 → 0.99.142

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/cli.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bun
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-BqUiRI5w.js';
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--Iv3ZQ69.js';
3
3
  import { IFilesystem } from '@livx.cc/wcli/core';
4
4
  import { M as Message, U as UserQuestion, H as HostBridge, c as ContentPart, o as MessageContent } from './tools-DwfeF8VQ.js';
5
5
 
package/dist/cli.js CHANGED
@@ -13455,6 +13455,20 @@ var CHANNEL_MODES = {
13455
13455
  minGapMs: 2500,
13456
13456
  backchannelPauseMs: 500,
13457
13457
  maxPerWindow: 6
13458
+ },
13459
+ live: {
13460
+ kinds: ["backchannel"],
13461
+ anticipate: true,
13462
+ cueOnly: false,
13463
+ generateFor: ["backchannel"],
13464
+ reactionGapMs: 3e3,
13465
+ generateBudgetMs: 400,
13466
+ backchannelMinWords: 3,
13467
+ shortTurnWords: 2,
13468
+ backchannelGapMs: 2e3,
13469
+ minGapMs: 1800,
13470
+ backchannelPauseMs: 350,
13471
+ maxPerWindow: 9
13458
13472
  }
13459
13473
  };
13460
13474
  var CHANNEL_MODE_NAMES = Object.keys(CHANNEL_MODES);
@@ -13466,6 +13480,8 @@ function parseChannelMode(v) {
13466
13480
  var SecondChannelOptions = class {
13467
13481
  /** Preset (CHANNEL_MODES) under the explicit options. */
13468
13482
  mode = "normal";
13483
+ /** A turn of at most this many words gets no line (a greeting / quick turn). */
13484
+ shortTurnWords = 3;
13469
13485
  /** Line kinds this channel may speak. */
13470
13486
  kinds = ["backchannel", "filler", "bridge"];
13471
13487
  /** A generated (content) backchannel needs this long since the last one; in between, canned light cues. 0 = always. */
@@ -13665,7 +13681,7 @@ var SecondChannel = class {
13665
13681
  }
13666
13682
  get o() {
13667
13683
  const o = this.options;
13668
- return o.mode !== "chatty" || o.aec ? o : { ...o, ...this.normalTiming };
13684
+ return o.mode !== "chatty" && o.mode !== "live" || o.aec ? o : { ...o, ...this.normalTiming };
13669
13685
  }
13670
13686
  /** The user's live partial for the current turn (the whole partial, not a delta). */
13671
13687
  onInterim(text) {
@@ -13860,7 +13876,7 @@ var SecondChannel = class {
13860
13876
  const w = words3(this.heard);
13861
13877
  if (!this.lang) return "silence";
13862
13878
  if (trigger === "working") return this.bridgeBlock() ? "silence" : "bridge";
13863
- if (w.length <= 3 || w.length <= 6 && isPhatic(this.heard, this.bank)) return "silence";
13879
+ if (w.length <= this.o.shortTurnWords || w.length <= 6 && isPhatic(this.heard, this.bank)) return "silence";
13864
13880
  const k = trigger === "interim" ? this.backchannelMoment(w.length, breath) && (!this.o.anticipate || !this.plan || !silentTurn(this.plan) && (!!cue || !this.o.cueOnly && this.plan.density !== "low")) ? "backchannel" : null : trigger === "pause" ? pauseMs >= this.o.fillerPauseMs && w.length >= this.o.fillerMinWords ? "filler" : null : null;
13865
13881
  return k && this.allowed(k) ? k : "silence";
13866
13882
  }