nexrall-code 0.5.101 → 0.5.102

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 +35 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -153717,6 +153717,41 @@ async function runTurnHeadless(messages, modelAlias, workDir, _abortSignal, env4
153717
153717
  resultText += text;
153718
153718
  emit({ type: "text", text });
153719
153719
  },
153720
+ // ── Reasoning-phase liveness ──────────────────────────────────────
153721
+ // These used to be UNWIRED here while runTurn() (interactive) wired all
153722
+ // three, and the asymmetry was not cosmetic: on a reasoning model at high
153723
+ // effort the thinking phase emits no text and no tool calls, so a headless
153724
+ // consumer saw ZERO events for the entire phase and could not distinguish
153725
+ // "actively reasoning" from "process wedged".
153726
+ //
153727
+ // Measured on a Terminal-Bench 4.0 trial (2026-08-30, deepseek-v4-pro
153728
+ // --effort max): nex-output.jsonl sat at 4 lines for 65 MINUTES while
153729
+ // tcpdump inside the container's netns showed ~25 packets/s still flowing
153730
+ // and the turn ultimately reported 310,872 output tokens. Nothing was
153731
+ // actually wrong — but every signal available to the harness (log line
153732
+ // count, file mtime) said "hung", and the socket/CPU forensics needed to
153733
+ // prove otherwise are not something a CI wrapper can do.
153734
+ //
153735
+ // `thinking_progress` is the load-bearing one: it carries the backend's
153736
+ // cumulative output-token count (routes/code.js's sendProgress, already
153737
+ // throttled to <=5/s server-side, so this cannot flood the log) and fires
153738
+ // DURING the phase. That makes it a real heartbeat.
153739
+ onThinkingProgress: (tokens) => {
153740
+ emit({ type: "thinking_progress", tokens });
153741
+ },
153742
+ // Fires once per turn at message_complete with the full reasoning text.
153743
+ // Typed `thinking` deliberately: the bench's ATIF converter (atif.py)
153744
+ // already routes exactly this event type into the trajectory's reasoning
153745
+ // buffer, so wiring it here also fills in reasoning that was previously
153746
+ // dropped on the floor for every headless run.
153747
+ onThinking: (text) => {
153748
+ emit({ type: "thinking", text });
153749
+ },
153750
+ // onThinkingDelta is intentionally NOT wired. Its chunks concatenate to the
153751
+ // same string `onThinking` emits in full above, so emitting both would
153752
+ // duplicate the entire reasoning trace — on the 310k-token turn measured
153753
+ // above that is megabytes of redundant NDJSON — while adding no liveness
153754
+ // signal `thinking_progress` does not already provide.
153720
153755
  // System notice (mid-run auto-prune/auto-compact) — emit as its own event
153721
153756
  // type instead of falling through to onText, so a stream-json consumer
153722
153757
  // doesn't see compaction housekeeping text mixed into the model's `text`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexrall-code",
3
- "version": "0.5.101",
3
+ "version": "0.5.102",
4
4
  "description": "Nexrall Code — AI coding assistant for your terminal (headless agent for scripts, CI and automation)",
5
5
  "keywords": [
6
6
  "ai",