@livx.cc/agentx 0.99.59 → 0.99.61

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.
@@ -3,9 +3,9 @@ import { M as Message, o as MessageContent, H as HostBridge, A as AgentTool, C a
3
3
 
4
4
  /**
5
5
  * `--model auto`: per-turn model routing. A classifier (Jev by default — injected, so a regex or
6
- * cheap-model classifier can replace it) picks a capability tier — fast | standard | premium — for each user turn (tiers map to any provider's models).
6
+ * cheap-model classifier can replace it) picks a capability tier — basic | standard | premium — for each user turn (tiers map to any provider's models).
7
7
  *
8
- * The MAIN session only ever runs on fast/standard: switching it to premium throws away the prompt cache.
8
+ * The MAIN session only ever runs on basic/standard: switching it to premium throws away the prompt cache.
9
9
  * A hard turn is instead OFFLOADED to a premium sub-agent (same child machinery as the `Task` tool):
10
10
  * the main model writes a brief, the last 2 turns ride along verbatim, and the premium answer is appended
11
11
  * to the main transcript as that turn's reply. The premium side-conversation is kept in `state` and
@@ -15,13 +15,13 @@ import { M as Message, o as MessageContent, H as HostBridge, A as AgentTool, C a
15
15
  * across processes (the CLI stores it in the session, so `-c`/`--resume` keeps the premium thread).
16
16
  */
17
17
 
18
- type Tier = 'fast' | 'standard' | 'premium';
18
+ type Tier = 'basic' | 'standard' | 'premium';
19
19
  interface Turn {
20
20
  user: string;
21
21
  assistant: string;
22
22
  }
23
23
  interface RouteInput {
24
- previousModel: 'fast' | 'standard';
24
+ previousModel: 'basic' | 'standard';
25
25
  history: Turn[];
26
26
  next: string;
27
27
  lastOffload?: string;
@@ -56,7 +56,7 @@ interface RouterState {
56
56
  type Usage = NonNullable<RunResult['usage']>;
57
57
  declare class ModelRouterOptions {
58
58
  classifier: Classifier;
59
- /** Capability tiers → model id (any provider). fast/standard run the main session; premium is only ever an offload. */
59
+ /** Capability tiers → model id (any provider). basic/standard run the main session; premium is only ever an offload. */
60
60
  models: Record<Tier, string>;
61
61
  /** Escalate to a stronger tier when it holds at least this much probability mass (upward bias). */
62
62
  threshold: number;
@@ -70,7 +70,7 @@ declare class ModelRouterOptions {
70
70
  /** Host-supplied provider options per model (e.g. claude-code's subscription env); applied on every tier switch + the offload child. */
71
71
  providerOptionsFor?: (model: string) => Record<string, unknown> | undefined;
72
72
  }
73
- /** Upward-biased tier pick: premium if P(premium) ≥ th; standard over fast if P(standard)+P(premium) ≥ th. */
73
+ /** Upward-biased tier pick: premium if P(premium) ≥ th; standard over basic if P(standard)+P(premium) ≥ th. */
74
74
  declare function pickTier(c: Classification, th: number): Tier;
75
75
  declare class ModelRouter {
76
76
  options?: Partial<ModelRouterOptions> | undefined;
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-DqFJubs5.js';
2
+ import { m as RouterState, H as Hooks, n as RunResult, R as ReasoningEffort, A as Agent } from './Agent-DbqXQy5q.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-HsbxgqjF.js';
5
5
 
package/dist/cli.js CHANGED
@@ -10669,8 +10669,8 @@ init_logging();
10669
10669
  var log21 = forComponent("ModelRouter");
10670
10670
  var ModelRouterOptions = class {
10671
10671
  classifier = jevClassifier();
10672
- /** Capability tiers → model id (any provider). fast/standard run the main session; premium is only ever an offload. */
10673
- models = { fast: "anthropic/claude-haiku-4-5-20251001", standard: "anthropic/claude-sonnet-4-6", premium: "anthropic/claude-opus-5-5" };
10672
+ /** Capability tiers → model id (any provider). basic/standard run the main session; premium is only ever an offload. */
10673
+ models = { basic: "anthropic/claude-haiku-4-5-20251001", standard: "anthropic/claude-sonnet-4-6", premium: "anthropic/claude-opus-5-5" };
10674
10674
  /** Escalate to a stronger tier when it holds at least this much probability mass (upward bias). */
10675
10675
  threshold = 0.25;
10676
10676
  /** P(same thread) at or above which the previous premium side-conversation is resumed. */
@@ -10687,7 +10687,7 @@ function pickTier(c, th) {
10687
10687
  const o = c.probs.premium ?? 0, s = c.probs.standard ?? 0;
10688
10688
  if (o >= th || c.choice === "premium") return "premium";
10689
10689
  if (c.choice === "standard" || s + o >= th) return "standard";
10690
- return "fast";
10690
+ return "basic";
10691
10691
  }
10692
10692
  function textTurns(msgs) {
10693
10693
  const out = [];
@@ -10728,7 +10728,7 @@ var ModelRouter = class {
10728
10728
  /** Classify one turn. Never throws: classifier failure/timeout ⇒ standard. */
10729
10729
  async decide(transcript, next) {
10730
10730
  const o = this.o;
10731
- const main2 = this.state.main === o.models.fast ? "fast" : "standard";
10731
+ const main2 = this.state.main === o.models.basic ? "basic" : "standard";
10732
10732
  const input = {
10733
10733
  previousModel: main2,
10734
10734
  history: textTurns(transcript).slice(-4).map((t) => ({ user: t.user.slice(0, 1500), assistant: t.assistant.slice(0, 1500) })),
@@ -10886,7 +10886,7 @@ function jevClassifier(opts = {}) {
10886
10886
  type: "choice",
10887
10887
  instructions: "Pick the CHEAPEST model that will handle the NEXT assistant turn correctly for this coding-agent conversation. Staying on previousModel keeps its prompt cache warm; switch only when the next turn clearly needs more (or much less) capability.",
10888
10888
  criteria: {
10889
- fast: "Trivial: commands, lookups, acknowledgements, commits, mechanical single-file edits, short rewrites.",
10889
+ basic: "Trivial: commands, lookups, acknowledgements, commits, mechanical single-file edits, short rewrites.",
10890
10890
  standard: "Standard engineering: features, bounded refactors, reviews, tests, following a clear trace, summarising.",
10891
10891
  premium: "Hard: root-causing subtle/intermittent bugs, concurrency, security semantics, architecture trade-offs, quantitative reasoning."
10892
10892
  }