@livx.cc/agentx 0.99.97 → 0.99.99

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.
@@ -279,7 +279,8 @@ interface ChatFragment {
279
279
  * Map a normalized effort to a partial `ChatOptions` fragment for `model`'s provider.
280
280
  * Returns `{}` (safe no-op) for `'off'`, undefined, or an unsupported provider.
281
281
  *
282
- * Supported: `anthropic/*` (extended thinking), `openai/*` (reasoning_effort).
282
+ * Supported: `anthropic/*` (extended thinking), `openai/*` (reasoning_effort), `claude-code/*` (its `effort`:
283
+ * low thinks least — a spoken turn's first word comes seconds sooner).
283
284
  * `google/*` is intentionally NOT mapped here — its adapter `Object.assign`s
284
285
  * providerOptions over the built `generationConfig`, clobbering it; pass an
285
286
  * explicit `providerOptions` if you need Gemini thinking.
package/dist/cli.d.ts CHANGED
@@ -1,5 +1,5 @@
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-RHsiEAiP.js';
2
+ import { m as RouterState, H as Hooks, n as RunResult, R as ReasoningEffort, A as Agent } from './Agent--Kxl9DXO.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-lC3jn60o.js';
5
5
 
package/dist/cli.js CHANGED
@@ -4645,6 +4645,8 @@ function reasoningToChatFragment(model, effort) {
4645
4645
  }
4646
4646
  case "openai":
4647
4647
  return { providerOptions: { reasoning_effort: toLabel(effort) } };
4648
+ case "claude-code":
4649
+ return { providerOptions: { effort: toLabel(effort) } };
4648
4650
  default:
4649
4651
  return {};
4650
4652
  }
@@ -14092,8 +14094,12 @@ var SecondChannelOptions = class {
14092
14094
  decisionBudgetMs = 300;
14093
14095
  generateBudgetMs = 500;
14094
14096
  minGapMs = 2500;
14095
- /** Backchannel after backchannel needs this gap (v1 Instinct's cadence, ≤12/min). */
14096
- backchannelGapMs = 5e3;
14097
+ /** Backchannel after backchannel needs this gap (~4-6 cues in a 30s monologue — Para phone call 2026-10-13: 5s left
14098
+ * one cue in a long statement). */
14099
+ backchannelGapMs = 3e3;
14100
+ /** The user resumes within this long of their last words after a line of theirs was dispatched: the same statement goes
14101
+ * on (an STT endpoint mid-monologue) — its words still count toward the backchannel guards, and it is no fresh request. */
14102
+ continueMs = 3e3;
14097
14103
  /** A decision whose partial grew by this many words while in flight is stale → dropped. */
14098
14104
  staleWords = 3;
14099
14105
  microWords = 30;
@@ -14180,6 +14186,11 @@ var SecondChannel = class {
14180
14186
  inflight = null;
14181
14187
  startedAt;
14182
14188
  lang = null;
14189
+ carried = 0;
14190
+ // words of this statement already dispatched (a monologue split by STT endpoints)
14191
+ floorWords = 0;
14192
+ // carried + the last dispatched line's words
14193
+ lastHeardAt = -Infinity;
14183
14194
  pinned = false;
14184
14195
  // anticipate: the plan for the user's current/next turn (turnNo bumps per dispatched turn → a late plan is dropped)
14185
14196
  turnNo = 0;
@@ -14227,6 +14238,8 @@ var SecondChannel = class {
14227
14238
  onInterim(text) {
14228
14239
  const t = text.trim();
14229
14240
  if (!t || t === this.heard) return;
14241
+ if (this.main !== "idle" || !this.heard) this.carried = this.o.now() - this.lastHeardAt < this.o.continueMs ? this.floorWords : 0;
14242
+ this.lastHeardAt = this.o.now();
14230
14243
  if (this.main !== "idle") this.onAgentState("idle");
14231
14244
  this.heard = t;
14232
14245
  this.detect(t);
@@ -14308,6 +14321,7 @@ var SecondChannel = class {
14308
14321
  /** The user's final line was dispatched to the main agent (its words are the bridge's micro-context). */
14309
14322
  onUserTurn(text) {
14310
14323
  this.heard = text.trim();
14324
+ this.floorWords = this.carried + words2(this.heard).length;
14311
14325
  this.lastUser = this.heard;
14312
14326
  this.detect(this.heard);
14313
14327
  this.main = "idle";
@@ -14389,8 +14403,10 @@ var SecondChannel = class {
14389
14403
  * sentence end only deep into a story — a short request's end is the end of their turn (replay: "mm-hm" right after
14390
14404
  * "Check hacker news for recent news.", just before the final). */
14391
14405
  backchannelMoment(n, breath) {
14392
- if (n < this.o.backchannelMinWords || /\?$/.test(this.heard) || pendingQuestion(this.heard)) return false;
14393
- if (n < this.o.requestHoldWords && requestOpener(this.heard)) return false;
14406
+ if (/\?$/.test(this.heard) || pendingQuestion(this.heard)) return false;
14407
+ if (this.carried) n += this.carried;
14408
+ else if (n < this.o.requestHoldWords && requestOpener(this.heard)) return false;
14409
+ if (n < this.o.backchannelMinWords) return false;
14394
14410
  if (/[.!]$/.test(this.heard)) return n >= 2 * this.o.backchannelMinWords;
14395
14411
  return breath || /[,;:…]$/.test(this.heard);
14396
14412
  }