@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.
- package/dist/{Agent-DqFJubs5.d.ts → Agent-DbqXQy5q.d.ts} +6 -6
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +5 -5
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as AgentOptions, H as Hooks, n as RunResult, A as Agent } from './Agent-
|
|
2
|
-
export { C as ChatFragment, b as Classification, c as Classifier, d as CompactResult, D as DEFAULT_MUTATING, e as Decision, M as ModelRouter, f as ModelRouterOptions, P as PermissionOptions, g as PermissionPolicy, h as PermissionRule, i as PreToolUseDecision, R as ReasoningEffort, j as RecordingHooks, k as RecordingLifecycle, l as RouteDecision, m as RouterState, T as Tier, o as ToolUse, p as ToolUseMeta, q as composeHooks, r as estimateTokens, s as jevAvailable, t as jevClassifier, u as pickTier, v as planMode, w as reasoningToChatFragment } from './Agent-
|
|
1
|
+
import { a as AgentOptions, H as Hooks, n as RunResult, A as Agent } from './Agent-DbqXQy5q.js';
|
|
2
|
+
export { C as ChatFragment, b as Classification, c as Classifier, d as CompactResult, D as DEFAULT_MUTATING, e as Decision, M as ModelRouter, f as ModelRouterOptions, P as PermissionOptions, g as PermissionPolicy, h as PermissionRule, i as PreToolUseDecision, R as ReasoningEffort, j as RecordingHooks, k as RecordingLifecycle, l as RouteDecision, m as RouterState, T as Tier, o as ToolUse, p as ToolUseMeta, q as composeHooks, r as estimateTokens, s as jevAvailable, t as jevClassifier, u as pickTier, v as planMode, w as reasoningToChatFragment } from './Agent-DbqXQy5q.js';
|
|
3
3
|
export { MODEL_ALIASES, ModelSwitch, ResolveModelSwitchOpts, 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
|
@@ -10472,8 +10472,8 @@ init_logging();
|
|
|
10472
10472
|
var log22 = forComponent("ModelRouter");
|
|
10473
10473
|
var ModelRouterOptions = class {
|
|
10474
10474
|
classifier = jevClassifier();
|
|
10475
|
-
/** Capability tiers → model id (any provider).
|
|
10476
|
-
models = {
|
|
10475
|
+
/** Capability tiers → model id (any provider). basic/standard run the main session; premium is only ever an offload. */
|
|
10476
|
+
models = { basic: "anthropic/claude-haiku-4-5-20251001", standard: "anthropic/claude-sonnet-4-6", premium: "anthropic/claude-opus-5-5" };
|
|
10477
10477
|
/** Escalate to a stronger tier when it holds at least this much probability mass (upward bias). */
|
|
10478
10478
|
threshold = 0.25;
|
|
10479
10479
|
/** P(same thread) at or above which the previous premium side-conversation is resumed. */
|
|
@@ -10490,7 +10490,7 @@ function pickTier(c, th) {
|
|
|
10490
10490
|
const o = c.probs.premium ?? 0, s = c.probs.standard ?? 0;
|
|
10491
10491
|
if (o >= th || c.choice === "premium") return "premium";
|
|
10492
10492
|
if (c.choice === "standard" || s + o >= th) return "standard";
|
|
10493
|
-
return "
|
|
10493
|
+
return "basic";
|
|
10494
10494
|
}
|
|
10495
10495
|
function textTurns(msgs) {
|
|
10496
10496
|
const out = [];
|
|
@@ -10531,7 +10531,7 @@ var ModelRouter = class {
|
|
|
10531
10531
|
/** Classify one turn. Never throws: classifier failure/timeout ⇒ standard. */
|
|
10532
10532
|
async decide(transcript, next) {
|
|
10533
10533
|
const o = this.o;
|
|
10534
|
-
const main = this.state.main === o.models.
|
|
10534
|
+
const main = this.state.main === o.models.basic ? "basic" : "standard";
|
|
10535
10535
|
const input = {
|
|
10536
10536
|
previousModel: main,
|
|
10537
10537
|
history: textTurns(transcript).slice(-4).map((t) => ({ user: t.user.slice(0, 1500), assistant: t.assistant.slice(0, 1500) })),
|
|
@@ -10689,7 +10689,7 @@ function jevClassifier(opts = {}) {
|
|
|
10689
10689
|
type: "choice",
|
|
10690
10690
|
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.",
|
|
10691
10691
|
criteria: {
|
|
10692
|
-
|
|
10692
|
+
basic: "Trivial: commands, lookups, acknowledgements, commits, mechanical single-file edits, short rewrites.",
|
|
10693
10693
|
standard: "Standard engineering: features, bounded refactors, reviews, tests, following a clear trace, summarising.",
|
|
10694
10694
|
premium: "Hard: root-causing subtle/intermittent bugs, concurrency, security semantics, architecture trade-offs, quantitative reasoning."
|
|
10695
10695
|
}
|