nexrall-code 0.5.198 → 0.5.199
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.js +48 -20
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14912,7 +14912,7 @@ var require_agentTypes = __commonJS({
|
|
|
14912
14912
|
};
|
|
14913
14913
|
}();
|
|
14914
14914
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14915
|
-
exports.MODEL_TIER_ALIASES = exports.VALID_MODELS = void 0;
|
|
14915
|
+
exports.SUGGESTED_MODELS = exports.MODEL_TIER_ALIASES = exports.VALID_MODELS = void 0;
|
|
14916
14916
|
exports.normaliseToolName = normaliseToolName;
|
|
14917
14917
|
exports.parseModel = parseModel;
|
|
14918
14918
|
exports.parseAgentHooks = parseAgentHooks;
|
|
@@ -15183,13 +15183,15 @@ var require_agentTypes = __commonJS({
|
|
|
15183
15183
|
"gpt-5.4",
|
|
15184
15184
|
"gpt-5.4-mini",
|
|
15185
15185
|
"gpt-4.1",
|
|
15186
|
-
// Legacy tier
|
|
15186
|
+
// Legacy tier words — accepted from older files (and still resolved by the
|
|
15187
|
+
// backend), never suggested: they say nothing about which model runs now.
|
|
15187
15188
|
"turbo",
|
|
15188
15189
|
"pro",
|
|
15189
15190
|
"ultra",
|
|
15190
15191
|
"fast"
|
|
15191
15192
|
];
|
|
15192
15193
|
exports.MODEL_TIER_ALIASES = ["turbo", "pro", "ultra", "fast"];
|
|
15194
|
+
exports.SUGGESTED_MODELS = exports.VALID_MODELS.filter((m2) => !exports.MODEL_TIER_ALIASES.includes(m2));
|
|
15193
15195
|
function parseModel(v) {
|
|
15194
15196
|
const raw = (v ?? "").trim();
|
|
15195
15197
|
if (!raw)
|
|
@@ -15284,7 +15286,7 @@ var require_agentTypes = __commonJS({
|
|
|
15284
15286
|
warnings.push({
|
|
15285
15287
|
file: full,
|
|
15286
15288
|
agent: name,
|
|
15287
|
-
message: `has model: "${meta.model}", which this version does not recognise \u2014 expected one of ${exports.
|
|
15289
|
+
message: `has model: "${meta.model}", which this version does not recognise \u2014 expected one of ${exports.SUGGESTED_MODELS.join(", ")}, or omit the line to inherit the current session's model. It will still be sent; the server decides whether it is valid.`
|
|
15288
15290
|
});
|
|
15289
15291
|
}
|
|
15290
15292
|
const unknown = (tools ?? []).filter((t2) => !KNOWN_TOOL_NAMES.has(t2) && !t2.includes("__"));
|
|
@@ -15901,7 +15903,7 @@ var require_skills = __commonJS({
|
|
|
15901
15903
|
warnings.push({
|
|
15902
15904
|
file,
|
|
15903
15905
|
name: effectiveName,
|
|
15904
|
-
message: `has model: "${meta.model}", which this version does not recognise \u2014 expected one of ${agentTypes_1.
|
|
15906
|
+
message: `has model: "${meta.model}", which this version does not recognise \u2014 expected one of ${agentTypes_1.SUGGESTED_MODELS.join(", ")}, or omit the line to inherit the current session's model. It will still be sent; the server decides whether it is valid.`
|
|
15905
15907
|
});
|
|
15906
15908
|
}
|
|
15907
15909
|
const ctx = meta.context?.trim().toLowerCase();
|
|
@@ -24034,7 +24036,7 @@ ${body}`
|
|
|
24034
24036
|
let replyText = "";
|
|
24035
24037
|
for (let round = 0; round < (isAgent ? 6 : 1); round++) {
|
|
24036
24038
|
const msg = await (0, client_1.streamChat)(messages, {
|
|
24037
|
-
model: hook.model ?? opts.model ?? "
|
|
24039
|
+
model: hook.model ?? opts.model ?? "claude-sonnet-5-5",
|
|
24038
24040
|
env: opts.envCtx ?? { cwd: opts.cwd },
|
|
24039
24041
|
abortSignal: ctl,
|
|
24040
24042
|
// Wire the tools by allowlist rather than a separate channel: the backend
|
|
@@ -24092,7 +24094,7 @@ ${out.output}` : `Error: ${out.error}` : out.output ?? "",
|
|
|
24092
24094
|
return ["read_file", "search_files", "list_directory", "glob"];
|
|
24093
24095
|
}
|
|
24094
24096
|
function hookRunOptsFor(options) {
|
|
24095
|
-
return { model: options.model ?? "
|
|
24097
|
+
return { model: options.model ?? "claude-sonnet-5-5", abortSignal: options.abortSignal, hookEnv: options.env };
|
|
24096
24098
|
}
|
|
24097
24099
|
function classifyStopFailure(err) {
|
|
24098
24100
|
const status = err?.status;
|
|
@@ -24582,8 +24584,9 @@ var require_compaction = __commonJS({
|
|
|
24582
24584
|
var safeSlice_1 = require_safeSlice();
|
|
24583
24585
|
var hooks_1 = require_hooks();
|
|
24584
24586
|
exports.MODEL_CONTEXT_TOKENS = {
|
|
24585
|
-
//
|
|
24586
|
-
// frontmatter
|
|
24587
|
+
// Legacy tier words — VALUES from older clients, saved settings and sub-agent
|
|
24588
|
+
// frontmatter must keep resolving (2026-10-05: the words were removed from
|
|
24589
|
+
// every surface; nothing offers them anymore, but saved data still carries them).
|
|
24587
24590
|
turbo: 1e6,
|
|
24588
24591
|
pro: 1e6,
|
|
24589
24592
|
ultra: 1e6,
|
|
@@ -24625,7 +24628,7 @@ var require_compaction = __commonJS({
|
|
|
24625
24628
|
"glm-5.3": 1048576
|
|
24626
24629
|
};
|
|
24627
24630
|
function contextWindowFor2(model) {
|
|
24628
|
-
const fallback = exports.MODEL_CONTEXT_TOKENS[model ?? "
|
|
24631
|
+
const fallback = exports.MODEL_CONTEXT_TOKENS[model ?? "claude-sonnet-5-5"] ?? 128e3;
|
|
24629
24632
|
return (0, modelCatalogue_1.liveContextWindowFor)(model, fallback);
|
|
24630
24633
|
}
|
|
24631
24634
|
function envFraction(name, fallback) {
|
|
@@ -24981,7 +24984,7 @@ Do NOT call any tools and do NOT continue the task. Reply with text only: a conc
|
|
|
24981
24984
|
// summarizeCached above, which must stay on the conversation's own model.
|
|
24982
24985
|
// Never crosses providers; falls back to the session model if the
|
|
24983
24986
|
// catalogue is not loaded.
|
|
24984
|
-
model: (0, modelCatalogue_1.cheapestSameVendorModel)(options.model ?? "
|
|
24987
|
+
model: (0, modelCatalogue_1.cheapestSameVendorModel)(options.model ?? "claude-sonnet-5-5") ?? options.model ?? "claude-sonnet-5-5",
|
|
24985
24988
|
mode: "ask",
|
|
24986
24989
|
// summariser must not call tools; ask-mode discourages action
|
|
24987
24990
|
env: options.env,
|
|
@@ -25035,7 +25038,7 @@ Continue the work from here.`
|
|
|
25035
25038
|
// (which silently billed Anthropic regardless of the user's provider).
|
|
25036
25039
|
// Cheapest SAME-vendor model: a fresh prompt with no shared cache prefix,
|
|
25037
25040
|
// and merging a few memory bullets does not need the session's top tier.
|
|
25038
|
-
model: (0, modelCatalogue_1.cheapestSameVendorModel)(options.model ?? "
|
|
25041
|
+
model: (0, modelCatalogue_1.cheapestSameVendorModel)(options.model ?? "claude-sonnet-5-5") ?? options.model ?? "claude-sonnet-5-5",
|
|
25039
25042
|
mode: "ask",
|
|
25040
25043
|
env: options.env,
|
|
25041
25044
|
clientType: options.clientType,
|
|
@@ -25060,7 +25063,7 @@ Continue the work from here.`
|
|
|
25060
25063
|
const settings = (0, rules_1.loadSettings)(opts.workDir);
|
|
25061
25064
|
if (!resolveAutoCompact(void 0, settings.raw))
|
|
25062
25065
|
return false;
|
|
25063
|
-
const contextWindow = (0, modelCatalogue_1.liveContextWindowFor)(opts.model, exports.MODEL_CONTEXT_TOKENS[opts.model ?? "
|
|
25066
|
+
const contextWindow = (0, modelCatalogue_1.liveContextWindowFor)(opts.model, exports.MODEL_CONTEXT_TOKENS[opts.model ?? "claude-sonnet-5-5"] ?? 1e6);
|
|
25064
25067
|
let bodyBytes = estimateBodyBytes2(messages);
|
|
25065
25068
|
let tokenGuess = estimateTokensRough3(messages);
|
|
25066
25069
|
const limits = compactionLimits(contextWindow, settings.raw);
|
|
@@ -27019,7 +27022,7 @@ var require_loop = __commonJS({
|
|
|
27019
27022
|
}
|
|
27020
27023
|
async function runAgentLoop2(initialMessages, options) {
|
|
27021
27024
|
const messages = [...initialMessages];
|
|
27022
|
-
const model = options.model ?? "
|
|
27025
|
+
const model = options.model ?? "claude-sonnet-5-5";
|
|
27023
27026
|
const hooks = options.disableHooks ? (0, hooks_1.withAgentHooks)({}, options._agentHooks) : (0, hooks_1.withAgentHooks)((0, hooks_1.loadHooks)(options.workDir), options._agentHooks);
|
|
27024
27027
|
const fireStopFailure = async (failure) => {
|
|
27025
27028
|
if (depth !== 0)
|
|
@@ -112011,6 +112014,27 @@ async function setupSessionPlugins(dirs = [], urls = []) {
|
|
|
112011
112014
|
return { roots: roots2, errors, temps };
|
|
112012
112015
|
}
|
|
112013
112016
|
|
|
112017
|
+
// src/removedFlags.ts
|
|
112018
|
+
var REMOVED_MODEL_SHORTCUTS = {
|
|
112019
|
+
"-t": "claude-sonnet-5-5",
|
|
112020
|
+
"--turbo": "claude-sonnet-5-5",
|
|
112021
|
+
"-p": "claude-opus-5-5",
|
|
112022
|
+
"--pro": "claude-opus-5-5",
|
|
112023
|
+
"-u": "claude-fable-5-1",
|
|
112024
|
+
"--ultra": "claude-fable-5-1"
|
|
112025
|
+
};
|
|
112026
|
+
function removedModelShortcutMessage(argv) {
|
|
112027
|
+
for (const token of argv) {
|
|
112028
|
+
if (token === "--" || !token.startsWith("-"))
|
|
112029
|
+
break;
|
|
112030
|
+
const replacement = REMOVED_MODEL_SHORTCUTS[token];
|
|
112031
|
+
if (replacement !== void 0) {
|
|
112032
|
+
return `The ${token} model shorthand was removed \u2014 select the model by name instead: nex -m ${replacement} (or --model <id>). Run \`nex --help\` for the current flags.`;
|
|
112033
|
+
}
|
|
112034
|
+
}
|
|
112035
|
+
return null;
|
|
112036
|
+
}
|
|
112037
|
+
|
|
112014
112038
|
// src/managedVersion.ts
|
|
112015
112039
|
var import_code_core73 = __toESM(require_dist2(), 1);
|
|
112016
112040
|
var VERSION_GATE_EXEMPT = /* @__PURE__ */ new Set(["update", "doctor", "help"]);
|
|
@@ -113406,7 +113430,7 @@ program2.command("sessions").description("List, export, import, or delete saved
|
|
|
113406
113430
|
console.log(paint.dim(" nex sessions --events <id> [--json] to follow its event stream"));
|
|
113407
113431
|
console.log();
|
|
113408
113432
|
});
|
|
113409
|
-
program2.option("-
|
|
113433
|
+
program2.option("-y, --yolo", "Auto-approve all tool calls (no permission prompts)").option("-d, --dir <path>", "Set working directory (default: current directory)").option("-m, --model <name>", "Explicit model, e.g. claude-opus-5-5 | gpt-5.4 | gpt-4.1").option("-r, --resume [id]", "Resume last session, or a specific session id").option("-c, --continue", "Continue the latest conversation in this folder").option("--plan", "Start in plan mode (read-only; /mode or Shift+Tab can leave it)").option("--readonly", "Read-only for the whole session: plan mode that cannot be switched off").option(
|
|
113410
113434
|
"--auto",
|
|
113411
113435
|
"Start in auto mode (the default \u2014 edits and commands run without asking; irreversible actions are still confirmed)"
|
|
113412
113436
|
).option("--mode <mode>", "Starting permission mode: ask | edit | auto | plan").option(
|
|
@@ -113424,10 +113448,7 @@ program2.option("-p, --pro", "Use Claude Opus 5.5 (most capable)").option("-t, -
|
|
|
113424
113448
|
).option(
|
|
113425
113449
|
"-e, --effort <level>",
|
|
113426
113450
|
"Thinking effort \u2014 real levels depend on the model (e.g. DeepSeek: low|high|max, Qwen: low|high); run `nex --model <id>` then `/effort` with no argument to see a model's scale"
|
|
113427
|
-
).option("--no-banner", "Skip the ASCII banner (useful in scripts/pipes)").option(
|
|
113428
|
-
"--print",
|
|
113429
|
-
"One-shot, non-interactive run that prints the answer and exits (same as --output-format text). Claude Code's `-p` is spelled --print here because `-p` already means --pro"
|
|
113430
|
-
).option("--output-format <fmt>", "One-shot output format: text | json | stream-json (implies auto-approve)").option(
|
|
113451
|
+
).option("--no-banner", "Skip the ASCII banner (useful in scripts/pipes)").option("--print", "One-shot, non-interactive run that prints the answer and exits (same as --output-format text)").option("--output-format <fmt>", "One-shot output format: text | json | stream-json (implies auto-approve)").option(
|
|
113431
113452
|
"--audit [path]",
|
|
113432
113453
|
"Log every tool call (and refusal) to a JSONL trail (default: .nexrall/audit/<session>.jsonl)"
|
|
113433
113454
|
).option(
|
|
@@ -113498,7 +113519,7 @@ program2.option("-p, --pro", "Use Claude Opus 5.5 (most capable)").option("-t, -
|
|
|
113498
113519
|
console.error("Not logged in. Run: nex auth");
|
|
113499
113520
|
process.exit(1);
|
|
113500
113521
|
}
|
|
113501
|
-
const model = options.model
|
|
113522
|
+
const model = options.model ?? "deepseek-flash";
|
|
113502
113523
|
const workDir = options.dir ? path35.resolve(options.dir) : process.cwd();
|
|
113503
113524
|
{
|
|
113504
113525
|
const dirs = Array.isArray(options.pluginDir) ? options.pluginDir : [];
|
|
@@ -113865,7 +113886,7 @@ program2.option("-p, --pro", "Use Claude Opus 5.5 (most capable)").option("-t, -
|
|
|
113865
113886
|
}
|
|
113866
113887
|
effort = lvl;
|
|
113867
113888
|
}
|
|
113868
|
-
const modelExplicit = !!(options.model ||
|
|
113889
|
+
const modelExplicit = !!(options.model || selectedAgent?.model);
|
|
113869
113890
|
await startChatSession({
|
|
113870
113891
|
model,
|
|
113871
113892
|
modelExplicit,
|
|
@@ -113921,6 +113942,13 @@ var project = program2.command("project").description("Manage a project's local
|
|
|
113921
113942
|
project.command("purge [dir]").description("Delete this project's local state: sessions, event logs, task board, checkpoints, prompt history").option("--dry-run", "List what would be removed without removing it").option("-y, --yes", "Skip the confirmation prompt (required when stdin is not a TTY)").action(async (dir, opts) => {
|
|
113922
113943
|
await projectPurgeCommand(dir, opts);
|
|
113923
113944
|
});
|
|
113945
|
+
{
|
|
113946
|
+
const removed = removedModelShortcutMessage(process.argv.slice(2));
|
|
113947
|
+
if (removed) {
|
|
113948
|
+
console.error(removed);
|
|
113949
|
+
process.exit(1);
|
|
113950
|
+
}
|
|
113951
|
+
}
|
|
113924
113952
|
{
|
|
113925
113953
|
const block = managedVersionBlock(NEX_VERSION, process.argv.slice(2));
|
|
113926
113954
|
if (block) {
|