nexrall-code 0.5.66 → 0.5.67

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.
Files changed (2) hide show
  1. package/dist/index.js +29 -16
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -14826,7 +14826,11 @@ var require_agentTypes = __commonJS({
14826
14826
  name: "security-auditor",
14827
14827
  description: "Read-only security auditor \u2014 hunts injection, authz, secrets, and validation flaws in a path or diff. Cannot modify files.",
14828
14828
  tools: READ_ONLY_TOOLS,
14829
- model: "pro",
14829
+ // No `model` override — inherits the session's, same as general-purpose.
14830
+ // A previous version forced 'pro' (Claude Opus 5) here, which silently
14831
+ // billed Anthropic even for a session running entirely on OpenAI/DeepSeek/
14832
+ // Qwen. Consistency with the main conversation's provider matters more
14833
+ // than defaulting every specialist to a fixed tier.
14830
14834
  source: "builtin",
14831
14835
  prompt: [
14832
14836
  "You are a security auditor. You find real, exploitable flaws \u2014 not style issues.",
@@ -14861,7 +14865,10 @@ var require_agentTypes = __commonJS({
14861
14865
  lightPrompt: true,
14862
14866
  description: "Fast read-only codebase explorer \u2014 locates files, symbols, and call sites and reports concise findings. Use to keep bulk searching out of the main context. Cannot modify files.",
14863
14867
  tools: READ_ONLY_TOOLS,
14864
- model: "turbo",
14868
+ // No `model` override — inherits the session's. A previous version forced
14869
+ // 'turbo' (Claude Sonnet 5) on the theory that bulk search doesn't need a
14870
+ // frontier model, but that silently billed Anthropic regardless of which
14871
+ // provider the user actually selected for the conversation.
14865
14872
  source: "builtin",
14866
14873
  prompt: [
14867
14874
  "You map code. You NEVER modify anything.",
@@ -14886,7 +14893,9 @@ var require_agentTypes = __commonJS({
14886
14893
  name: "planner",
14887
14894
  description: "Read-only planning agent \u2014 researches a change and returns a concrete step-by-step implementation plan with risks and affected files. Cannot modify files.",
14888
14895
  tools: RESEARCH_TOOLS,
14889
- model: "pro",
14896
+ // No `model` override — inherits the session's, for the same reason as
14897
+ // explorer/security-auditor above: a fixed alias silently billed Anthropic
14898
+ // regardless of the user's chosen provider.
14890
14899
  source: "builtin",
14891
14900
  prompt: [
14892
14901
  "You produce implementation plans. You NEVER modify files \u2014 planning and doing are separate steps,",
@@ -14948,7 +14957,8 @@ var require_agentTypes = __commonJS({
14948
14957
  name: "devops-advisor",
14949
14958
  description: "Read-only CI/CD, container, and infrastructure advisor \u2014 diagnoses pipelines, Dockerfiles, and k8s manifests and proposes concrete fixes as a diff. Never applies changes.",
14950
14959
  tools: RESEARCH_TOOLS,
14951
- model: "pro",
14960
+ // No `model` override — inherits the session's, for the same reason as the
14961
+ // other specialists above.
14952
14962
  source: "builtin",
14953
14963
  prompt: [
14954
14964
  "You are an infrastructure and delivery advisor. You DIAGNOSE and PROPOSE. You never apply changes.",
@@ -17143,14 +17153,17 @@ ${tail}`;
17143
17153
  let summary = "";
17144
17154
  try {
17145
17155
  const reply = await (0, client_1.streamChat)([{ role: "user", content: [{ type: "text", text: summaryPrompt }] }], {
17146
- // COST: the summariser is a mechanical "bullet-point this transcript" task
17147
- // its quality is indistinguishable across model tiers, so there is no reason
17148
- // to run it on the user's (possibly expensive) tier. Force 'turbo' (Sonnet 5):
17149
- // it is the cheapest 1M-context tier (in $2.0/1M vs Opus $2.5, Fable $3.0;
17150
- // out $15/1M vs $25 / $50), so this is always ≤ the user's cost, and its 1M
17151
- // window comfortably holds the transcript (capped at ~170K tokens by
17152
- // transcriptOf) even on the largest sessions.
17153
- model: "turbo",
17156
+ // Run on the SAME model as the actual conversation. A previous version
17157
+ // forced 'turbo' (Claude Sonnet 5) here on the theory that a mechanical
17158
+ // "bullet-point this transcript" task doesn't need the user's tier but
17159
+ // that silently billed Anthropic (and made a real network call to a
17160
+ // provider the user may not have configured/paid for) even when the
17161
+ // whole session was running on OpenAI/DeepSeek/Qwen. Whatever the user
17162
+ // is already paying for is used for compaction too, so there is never a
17163
+ // surprise charge on a different provider. Falls back to the same
17164
+ // default as the main loop (see `runAgentLoop`) only when no model was
17165
+ // set at all.
17166
+ model: options.model ?? "turbo",
17154
17167
  mode: "ask",
17155
17168
  // summariser must not call tools; ask-mode discourages action
17156
17169
  env: options.env,
@@ -17190,10 +17203,10 @@ Continue the work from here.` }] });
17190
17203
  try {
17191
17204
  await (0, memory_1.compactMemoryIfNeeded)(scope, options.workDir, async (prompt2) => {
17192
17205
  const reply = await (0, client_1.streamChat)([{ role: "user", content: [{ type: "text", text: prompt2 }] }], {
17193
- // Same reasoning as autoCompactMessages' summariser: a mechanical
17194
- // consolidation task, always run on the cheapest 1M-context tier
17195
- // regardless of the user's chosen model for the actual conversation.
17196
- model: "turbo",
17206
+ // Same reasoning as autoCompactMessages' summariser: run on the same
17207
+ // model as the actual conversation rather than forcing a fixed tier
17208
+ // (which silently billed Anthropic regardless of the user's provider).
17209
+ model: options.model ?? "turbo",
17197
17210
  mode: "ask",
17198
17211
  env: options.env,
17199
17212
  clientType: options.clientType,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexrall-code",
3
- "version": "0.5.66",
3
+ "version": "0.5.67",
4
4
  "description": "Nexrall Code — AI coding assistant for your terminal (headless agent for scripts, CI and automation)",
5
5
  "keywords": [
6
6
  "ai",
@@ -39,7 +39,7 @@
39
39
  "release": "node build.js && node scripts/upload-release.cjs"
40
40
  },
41
41
  "dependencies": {
42
- "@nexrall/code-core": "^1.4.38",
42
+ "@nexrall/code-core": "^1.4.39",
43
43
  "chalk": "^5.3.0",
44
44
  "commander": "^12.0.0",
45
45
  "diff": "^5.2.0",