@nexus-cortex/cli 4.124.43 → 4.124.45

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/.env.defaults +184 -0
  2. package/package.json +2 -2
package/.env.defaults CHANGED
@@ -147,6 +147,18 @@ DEFAULT_MODEL_ID=deepseek-flash
147
147
  # [LEDGER 2026-09-10 @4.102.0] deepseek-flash — DeepSeek catalog collapse: `deepseek-flash` IS V4.1 Flash (vision native, same
148
148
  # price as the retired v4-flash / vision-exp names, which now route here anyway). One helper card, no alias risk.
149
149
  HELPER_MODEL_ID=deepseek-flash
150
+ # CORTEX_HELPER_MATCH_PROVIDER — R217 (4.124.44, 2026-10-02). HELPER_MODEL_ID and MENTORSHIP_HELPER_MODEL both default to deepseek-flash, so
151
+ # every action model got DeepSeek as its judge / planner / mentor / wall-summarizer / title writer. on = when a role model is NOT explicitly
152
+ # set, it resolves from the ACTION model's provider via the selectHelperModel map (anthropic→claude-haiku-4-5, openai→gpt-4.1-mini,
153
+ # google→gemini-2.5-flash-lite, xai→grok-4.3, deepseek→deepseek-flash; unmapped providers keep deepseek-flash). Explicit settings always
154
+ # win. "Explicit" is decided by VALUE (.env.defaults loads into process.env, so presence cannot tell): a value equal to the shipped
155
+ # default (deepseek-flash) counts as defaulted — to pin deepseek-flash for a non-DeepSeek action model, leave this off. Routed: every
156
+ # HelperModelMiddleware helper/mentor call (generateGuidance = all mentor surfaces + web summary + wall summary + error guidance; doctrine
157
+ # curation; session title; turn summary/prediction; frame-candidate author). Not routed: compaction / context rejection (already
158
+ # provider-mapped), vision hand-off (VISION_HELPER_MODEL), sub-agent model, orchestrator-side labels. off/unset (default) = byte-identical.
159
+ # [LEDGER 2026-10-02 @4.124.44] DARK — BUILT + unit-tested (helperProviderMatch.test.ts: explicit wins, provider matrix, live model switch,
160
+ # off unchanged). NO bench arm yet. evidence: transport map 10-02 (R217).
161
+ #CORTEX_HELPER_MATCH_PROVIDER=
150
162
 
151
163
  # Model that backs WebSearch / WebFetch tools. Provider auto-detected from ID prefix.
152
164
  # When unset, auto-picks based on available API keys (Gemini > Anthropic > XAI),
@@ -601,6 +613,31 @@ CORTEX_LIFT_PLAN=true
601
613
  #CORTEX_LIFT_PLAN_TIMEOUT_MS=90000
602
614
  #CORTEX_LIFT_PLAN_INTERACTIVE=false
603
615
  #CORTEX_LIFT_PLAN_RECON_TIMEOUT_MS=8000
616
+ # CORTEX_INTERACTIVE_PROFILE — R219 HB-INTERACTIVE-PROFILE (DARK, 2026-10-02). The headless levers behind the TB4.0 gains live only in
617
+ # the bench cell env, so an interactive TUI (neoncortex / fuzzycortex / `cortex` on a terminal) runs without every DARK one. A named
618
+ # profile, resolved in ONE place (packages/core/src/config/interactiveProfile.ts, applied by bootstrapEnv), turns a curated set on for
619
+ # INTERACTIVE sessions only (stdin AND stdout are TTYs — the orchestrator's own test) and only for levers you did not set: it sits
620
+ # ABOVE this shipped file and BELOW the real env, ./.env, <pkg>/.env and ~/.cortex/.env (.env.local still overrides). Filled keys are
621
+ # recorded in CORTEX_INTERACTIVE_PROFILE_APPLIED (harness-set) and show source `profile` in GET /health/config. Applied at launch.
622
+ # off (default; unset = byte-identical) | bench-lite =
623
+ # CORTEX_LOOP_TOOL_BLOCK=true CORTEX_EMPTY_TURN_CONTINUE=true CORTEX_WALL_DROP=on CORTEX_WALL_SUMMARY=on
624
+ # CORTEX_REASONING_EXHAUST_BACKOFF=false CORTEX_STEER_INPUTS=full CORTEX_ORIENT_V2=1
625
+ # (failure-path-only or steering-input levers: no deadline assumption, no task-tree writes, no new pause before the first action).
626
+ # Already ON for every session via this file (not the profile's job): ENDTURN_GATE/REQUIREMENTS/RESOLVER(+ABSTAIN), ORIENT_BOOTSTRAP,
627
+ # SLICE_NUDGE, MENTORSHIP_ENABLED; ENDTURN_TIER=essential and LIFT_PLAN_DOCTRINE=v1 are code defaults.
628
+ # NOT in bench-lite — NEEDS-ADAPTATION (follow-ups): the lift plan in interactive sessions (CORTEX_LIFT_PLAN_INTERACTIVE stays the only
629
+ # opener: silent 30-110 s mentor call after the first tool result with no planning-status event to the TUIs, one-shot per orchestrator
630
+ # so only the first request of a chat is planned, grader-oriented persona); LIFT_PLAN_SCOPE (repair-task edit scope); INVENTORY (whole-tree
631
+ # walk through execSync blocks the TUI event loop); TURN_STATUS (deadline clock; auto is a no-op without a deadline); VERIFY_SCALE and
632
+ # RULE_INPUTS/INTERP/HOLDOUT/INDEP (more EndTurn-judge vetoes against a human who wants to stop); ACTION_EFFORT (the TUIs have their own
633
+ # effort selector). BENCH-ONLY: WORKSPACE_CLEAN (moves project memory out of the project), ORIENT_BASELINE (repair-task revert baseline),
634
+ # PID1_GUARD (container PID 1 assumption), PLATEAU_STOP (optimisation-task measurement).
635
+ # [LEDGER 2026-10-02 @4.124.44] DARK — BUILT + unit-tested (interactiveProfile.test.ts 16/16: name resolution, interactive vs headless,
636
+ # explicit env wins, off byte-identical, bootstrapEnv layering, effective-config `profile` source, lift-plan gate; interactiveLiftPlanGate
637
+ # .integration.test.ts 6/6 both loops: headless plans, interactive + bench-lite does not, explicit CORTEX_LIFT_PLAN_INTERACTIVE=true
638
+ # plans). NO interactive field read yet. evidence: R219.
639
+ #CORTEX_INTERACTIVE_PROFILE=
640
+ #CORTEX_INTERACTIVE_PROFILE_APPLIED=
604
641
  # CORTEX_ENDTURN_RESOLVER — the finish-side twin of the lift planner: AFTER the mechanical EndTurn gate
605
642
  # accepts, a bounded max-reasoning mentor adjudicates "does the work product meet the task's real
606
643
  # requirements?" MEETS finishes; GAP vetoes with a fix plan (the narrow-door model executes it instead of
@@ -1176,6 +1213,16 @@ CORTEX_ENDTURN_GATE=true
1176
1213
  # reasoning counts inside max_tokens and starves the answer) — both harnesses hit the same wall; this lever changes the RECOVERY and the FRAME.
1177
1214
  # [LEDGER 2026-09-17 @4.115.0] BUILT + unit-tested (turnContract.test.ts). Field: PENDING (tb4 pilot-12, channel arm at effort max).
1178
1215
  #CORTEX_TURN_CONTRACT=
1216
+ # CORTEX_FAMILY_PRESETS — R217 (4.124.44, 2026-10-02). promptPreset 'boot-minimal' is set ONLY on the 5 DeepSeek cards, and it is the only
1217
+ # prompt that points the model at the `.cortex/orient` script — Claude/GPT/Grok/Gemini got the full corpus and never the orient pointer, so
1218
+ # the ORIENT_* / baseline levers were unreachable for them. on = a card WITHOUT its own promptPreset gets its family preset; today ONE
1219
+ # generic preset for every family, 'boot-minimal-generic' = the boot-minimal text minus the DeepSeek-tuned "Prefer acting over
1220
+ # deliberating." clause (tuned at DeepSeek effort low; fought at high effort, R153), same minimal mass, same orient pointer, same
1221
+ # delegation-hint / turn-contract levers. DeepSeek cards unchanged; env CORTEX_PROMPT_MASS / CORTEX_SYSTEM_PROMPT_FILE still win.
1222
+ # off/unset (default) = byte-identical (non-DeepSeek cards keep the full corpus).
1223
+ # [LEDGER 2026-10-02 @4.124.44] DARK — BUILT + unit-tested (familyPresets.test.ts: per-family selection on/off, DeepSeek identical on/off,
1224
+ # off byte-identical). NO bench arm yet. evidence: transport map 10-02 (R217).
1225
+ #CORTEX_FAMILY_PRESETS=
1179
1226
  # CORTEX_FINISH_CONFIRM / CORTEX_FINISH_CONFIRM_MIN_REMAINING / CORTEX_FINISH_CONFIRM_MAX — R167 HB-FINISH-CONFIRM (4.116.0, 2026-09-17,
1180
1227
  # pilot-12 hand-curation). The early-finish class is the whole game on the confident-wrong tail: 8/12 first finish attempts per arm
1181
1228
  # had >= 70% of the wall budget left (Terminus 2 too: 8/12 confident-wrong finishes in 15–105 min, its bare "are you sure" changed
@@ -1753,6 +1800,143 @@ MENTORSHIP_ACTIVE_DISCOVERY=false
1753
1800
  # Set to false to opt out (restores the pre-R63 promptless behavior).
1754
1801
  #CORTEX_DELIVER_SYSTEM_PROMPT=false
1755
1802
 
1803
+ # CORTEX_RESPONSES_INLINE_REMINDERS — R215 HB-RESPONSES-REMINDERS (DARK, 2026-10-02). The Responses path cut every
1804
+ # `<system-reminder>` block out of the conversation and merged it into `instructions`; xAI Responses never receives
1805
+ # `instructions` → those reminders were DROPPED there, and on OpenAI they lost their place after the tool output. Levers
1806
+ # delivered this way: lift plan, requirement ledger, PID1 note, plateau instruction, lift nudge, deferred-corpus header.
1807
+ # on: reminders stay IN PLACE as user input_text items (tags unchanged); a user item the adapter emitted before its
1808
+ # function_call_output items is moved after them (tool output first, then the text). `instructions` then carries only
1809
+ # the R63 static system prompt (xAI: system-role item at chain start, unchanged). OpenAI + xAI Responses. off: unchanged.
1810
+ # [LEDGER 2026-10-02 @4.124.44] DARK — BUILT + unit-tested (transportFixes.test.ts: OpenAI/xAI/streaming request shapes,
1811
+ # off = byte-identical). Live probe: DeepSeek /responses accepted function_call → function_call_output → user reminder
1812
+ # item (200, model obeyed the reminder). NO bench arm. evidence: transport map 10-02 (R215/R216/R218).
1813
+ #CORTEX_RESPONSES_INLINE_REMINDERS=
1814
+ # CORTEX_RESPONSES_STOP_REASON — R216 HB-RESPONSES-STOPREASON (DARK, 2026-10-02). extractStopReason returned undefined for
1815
+ # the responses and hf-space patterns, so a max-output-tokens cutoff was never classified `truncated` and the wall levers
1816
+ # (CORTEX_WALL_DROP / CORTEX_WALL_SUMMARY / CORTEX_REASONING_EXHAUST_BACKOFF) and the truncated-continue nudge never fired
1817
+ # there. on: Responses status 'incomplete' + incomplete_details.reason 'max_output_tokens' → 'max_output_tokens' (other
1818
+ # incomplete reasons passed through; else the status, e.g. 'completed'); the streaming finalMessage carries the terminal
1819
+ # event's status + incomplete_details; hf-space → its finish_reason (synthesized 'stop' / 'tool_calls' — the Space exposes
1820
+ # no truncation signal, so hf-space truncation stays invisible). off: unchanged.
1821
+ # [LEDGER 2026-10-02 @4.124.44] DARK — BUILT + unit-tested (transportFixes.test.ts: live shapes → classifier truncated +
1822
+ # reasoning exhaustion; streaming response.incomplete). Live probe: DeepSeek /responses max_output_tokens 8 → status
1823
+ # incomplete, incomplete_details {reason: max_output_tokens}, same in the streaming response.incomplete event.
1824
+ # evidence: transport map 10-02 (R215/R216/R218).
1825
+ #CORTEX_RESPONSES_STOP_REASON=
1826
+ # CORTEX_ANTHROPIC_HISTORY_CACHE — R218 HB-ANTHROPIC-CACHE (DARK, 2026-10-02). Anthropic Messages requests set cache_control
1827
+ # only on the system prompt and the last tool, so the conversation history was never cached on Claude. on (and
1828
+ # ANTHROPIC_PROMPT_CACHING not false): rolling message breakpoints on the last markable block (not thinking, not empty
1829
+ # text) of the previous user message (stable prefix) and the newest user message, within Anthropic's 4-breakpoint cap
1830
+ # (system + tool + existing markers counted; one free slot → the stable prefix only). Anthropic provider only — the xAI
1831
+ # Messages branch is untouched. off: unchanged.
1832
+ # [LEDGER 2026-10-02 @4.124.44] DARK — BUILT + unit-tested (transportFixes.test.ts: placement, cap <= 4, no mutation,
1833
+ # send + stream, xAI untouched). Live probe: DeepSeek /anthropic accepted message-level cache_control (200, cache
1834
+ # fields 0 — it ignores it). No live Claude probe. evidence: transport map 10-02 (R215/R216/R218).
1835
+ #CORTEX_ANTHROPIC_HISTORY_CACHE=
1836
+ # APPEND-ONLY REQUEST HISTORY (prompt-cache restructure, 2026-10-02; .cortex/research/caching-audit-2026-10-02.md +
1837
+ # caching-rationale-2026-10-02.md). All DARK; unset = byte-identical (harness: every flag-off cell == the committed 220-cell matrix).
1838
+ # Measured with the prefix-stability harness (prefixStability.integration.test.ts, PREFIX_EXTRA_ENV / PREFIX_OUT_TAG A/B; reports
1839
+ # .cortex/research/prefix-stability-2026-10-02.<tag>.partial.md). The anchor lift (one intended tools bust at the first tool_result) is
1840
+ # untouched by all of them.
1841
+ # CORTEX_WALL_CACHE_FIX — R221. The HB-WALL-DROP nudge (+ wall summary) is appended to the newest tool_result AFTER that message's
1842
+ # canonical conversion was cached (noteRequestUsage runs while the walled turn is the tail), so the retry carried the nudge and every
1843
+ # later request silently reverted to the stale copy: a second prefix break + the nudge/summary vanished. on: every in-place mutation of a
1844
+ # history message (wall-drop carrier, lift nudge/plan/corpus/ledger, PID1/plateau notes, budget/ladder signals, TURN_STATUS, compute
1845
+ # nudge, R26 empty-turn repair, R154 image stub) drops that message's cached conversion. The wall drop itself is unchanged.
1846
+ # [LEDGER 2026-10-02 @4.124.45] DARK — BUILT + harness-proven: send c1/c2/c3 on anthropic, xai-messages(server-tools off), chat-deepseek
1847
+ # went `1→2 tail; 2→3 F1` → `1→2 tail` only (the single intended break at the retry remains); nudge-on-wire N..... → NNNNNN, wall
1848
+ # summary persists. Flag off unchanged. Unit: appendOnlyHistory.test.ts, wallGuard.test.ts 11/11, wallGuard.integration 6/6 (+4 skip).
1849
+ #CORTEX_WALL_CACHE_FIX=
1850
+ # CORTEX_PERSIST_INJECTED — R223. The first request of a user turn sends injected content (repo-state note, deferred-tool announcement,
1851
+ # MCP / slash-command notes); history stored the raw text, so every continuation re-rendered that message WITHOUT the notes (one prefix
1852
+ # split per user turn + the notes vanished). on: the exact injected bytes are remembered per message uuid and re-sent on every request;
1853
+ # session storage, display, title and every text reader keep the raw content (no system-reminder/harness-note text persisted).
1854
+ # [LEDGER 2026-10-02 @4.124.45] DARK — BUILT + harness-proven: scenario f (2 user turns) on anthropic, xai-messages(server-tools off),
1855
+ # chat-openai, chat-deepseek, gemini x2, hf-space, send + stream: `0→1 lift+F3; 6→7 F3` → `0→1 lift` (harness-note now on every request
1856
+ # 0-8). Responses rows unchanged (chaining hides it). Flag off unchanged.
1857
+ #CORTEX_PERSIST_INJECTED=
1858
+ # CORTEX_APPEND_ONLY_TOOLS — R222. With deferred loading (R43, kept) the filter re-ran on every continuation in allTools order: a newly
1859
+ # discovered/used tool was inserted mid-array and the 15-slot recent list evicted. on: the tools array only grows — new tools appended in
1860
+ # first-enable order, never evicted or reordered within the orchestrator's lifetime.
1861
+ # [LEDGER 2026-10-02 @4.124.45] DARK — BUILT + harness-measured: scenario b SearchTools discovery `+8 tools (inserted mid-array at 11)`
1862
+ # → `(appended)`, no reorder; eviction not exercised by the harness (unit-tested). NOT a cache win by itself: tools precede system +
1863
+ # messages on every wire, so any growth (17→25) is still a full prefix bust once per discovery (harness still reports `2→3 F2`); the
1864
+ # flag only removes the reorder/eviction churn. A real fix = a static tools array (cost: R43's token win). Flag off unchanged.
1865
+ #CORTEX_APPEND_ONLY_TOOLS=
1866
+ # CORTEX_KEEP_MENTOR_MESSAGES — R227. Mentor/guidance messages (injectGuidance / reactive mentorship) were removed from MID-history at
1867
+ # turn end (cleanupEphemeralMessages), rewriting the next turn's prefix and shifting the Responses slice checkpoint. on: kept (never
1868
+ # persisted to the session file; display strips their system-reminder). Cost: stale guidance stays in context — to be judged in the TUI work.
1869
+ # [LEDGER 2026-10-02 @4.124.45] DARK (default OFF by operator decision) — BUILT + harness-proven: scenario e on all non-Responses rows,
1870
+ # send + stream: `6→7 F9` gone (mentor insight on the wire in requests 2-9 instead of 2-6). Flag off unchanged.
1871
+ #CORTEX_KEEP_MENTOR_MESSAGES=
1872
+ # CORTEX_RESPONSES_SLICE_ALL — R228 (bug fix). The EndTurn gate, wall/empty retries, inaction retries and tools-off synthesis set
1873
+ # previous_response_id but sent the FULL history (contradicting the e85b68834f slicing design), and never moved the slice checkpoint.
1874
+ # on: every chained request sends only the items added since the held response; each of those responses moves the checkpoint (they are
1875
+ # main-chain turns: their reply is pushed into history, so updating lastResponseId is correct — not a branch); a wall on a chained session
1876
+ # is not dropped locally (the server holds it). Fallback: if the provider reports the held response unavailable (not found / expired /
1877
+ # invalid; store off) the chain is dropped and the request is resent ONCE with the full history and NO previous_response_id
1878
+ # (responses_chain_fallback event) — send-loop initial request, continuations, gate, retries, synthesis. Streaming initial/continuation
1879
+ # (streamRequest) have no fallback yet.
1880
+ # [LEDGER 2026-10-02 @4.124.45] DARK — BUILT + harness-proven: scenarios a/c1/c3/h on responses-openai, responses-xai, xai default:
1881
+ # send a `4→5 NEW-R; 5→6 NEW-R` → one flag left, c1 `1→2, 2→3, 5→6, 6→7 NEW-R` → one flag left; the remaining flag is a harness
1882
+ # false positive (two gate attempts push byte-identical reminder text; dump shows each request sends exactly one new item). Fallback
1883
+ # unit-tested via isPreviousResponseUnavailable only — no live provider probe. Flag off unchanged.
1884
+ #CORTEX_RESPONSES_SLICE_ALL=
1885
+ # CORTEX_GEMINI_SYSTEM_FIX — R229 HB-GEMINI-SYSTEM (DARK, 2026-10-02; CORRECTNESS). Gemini never received the system
1886
+ # prompt: the non-streaming REST generateContent body had no `system_instruction`; the non-tool requests went through the
1887
+ # @google/generative-ai SDK (v0.2.1, v1 endpoint — no systemInstruction support); the google-sdk (@google/genai) paths set a
1888
+ # TOP-LEVEL `systemInstruction`, which that SDK drops (GenerateContentParameters = {model, contents, config}). on: REST body
1889
+ # carries system_instruction {parts:[{text}]}; non-tool requests with a system prompt use the v1beta REST builders (send +
1890
+ # stream); google-sdk puts it in config.systemInstruction (send + stream). The streaming REST builder always sent it. off: unchanged.
1891
+ # [LEDGER 2026-10-02 @4.124.45] DARK — BUILT + unit-tested (transportCacheFixes.test.ts: 5 Gemini wire shapes, off =
1892
+ # byte-identical) + prefix harness (send a, gemini-generateContent + google-sdk: system prompt none → present on all 7
1893
+ # requests, byte-stable, pair verdicts unchanged). No live Gemini probe. Default-on candidate (correctness).
1894
+ #CORTEX_GEMINI_SYSTEM_FIX=
1895
+ # CORTEX_STABLE_TOOL_ORDER — R230 HB-STABLE-TOOL-ORDER (DARK, 2026-10-02). xAI cards with ENABLE_SERVER_SIDE_TOOLS=true run
1896
+ # hybrid server+client tools on /v1/responses; the first request of every user turn put the server tools FIRST while the
1897
+ # continuations used the original order → the tools array (prefix head) was reordered twice per user turn. on: the caller's
1898
+ # original order on every request (adapters/ServerSideToolDetection.ts hybrid branch). off: unchanged.
1899
+ # [LEDGER 2026-10-02 @4.124.45] DARK — BUILT + unit-tested + prefix harness (send e/f/h, xai default→responses: the per-turn
1900
+ # "19→19 tools REORDERED" divergences 2 per cell → 0; the anchor-lift 0→1 bust stays, intended). No live xAI probe.
1901
+ #CORTEX_STABLE_TOOL_ORDER=
1902
+ # CORTEX_OPENAI_CACHE_KEY — R225 HB-OPENAI-CACHE-KEY (DARK, 2026-10-02). OpenAI chat/completions + Responses bodies carry
1903
+ # `prompt_cache_key` = the session id (what xAI Responses already gets) so same-session requests route to the same prompt
1904
+ # cache. OpenAI provider only (other chat/completions providers may reject the field). off: unchanged.
1905
+ # [LEDGER 2026-10-02 @4.124.45] DARK — BUILT + unit-tested + prefix harness (send a: key on 7/7 chat-openai and
1906
+ # responses-openai requests, one value per session; chat-deepseek never; pair verdicts unchanged). No live OpenAI probe.
1907
+ #CORTEX_OPENAI_CACHE_KEY=
1908
+ # CORTEX_ANTHROPIC_AUTO_CACHE — R225 HB-ANTHROPIC-AUTO-CACHE (DARK, 2026-10-02). Anthropic Messages adds the top-level
1909
+ # automatic `cache_control` (breakpoint moves with the conversation) beside the explicit system + last-tool markers — only
1910
+ # while a breakpoint slot is free (cap 4; R218 CORTEX_ANTHROPIC_HISTORY_CACHE markers counted, so with R218 on it is
1911
+ # usually skipped). Needs ANTHROPIC_PROMPT_CACHING. Anthropic provider only — never the xAI Messages branch. off: unchanged.
1912
+ # The legacy `prompt-caching-2024-07-31` beta header is still sent (left as is).
1913
+ # [LEDGER 2026-10-02 @4.124.45] DARK — BUILT + unit-tested + prefix harness (send a/b anthropic: 2 → 3 markers incl.
1914
+ # automatic; with R218 on: 4 max, automatic only on request 0). No live Claude probe.
1915
+ #CORTEX_ANTHROPIC_AUTO_CACHE=
1916
+ # CORTEX_ANTHROPIC_CACHE_TTL — R225 (DARK, 2026-10-02). 1h: every cache_control the harness emits on the Anthropic path
1917
+ # (system, last tool, R218 history, automatic) carries ttl "1h" (uniform, so Anthropic's longer-TTL-first and
1918
+ # automatic-vs-last-marker TTL rules hold). Writes cost 2x instead of 1.25x; worth it only when requests sharing the prefix
1919
+ # start more than 5 minutes apart (long tool runs). unset | 5m = default 5-minute TTL (no ttl field). Anthropic only.
1920
+ # [LEDGER 2026-10-02 @4.124.45] DARK — BUILT + unit-tested + prefix harness (all markers ttl 1h, cap <= 4). No live probe.
1921
+ #CORTEX_ANTHROPIC_CACHE_TTL=
1922
+ # CORTEX_FORCED_CHOICE_FULL_TOOLS — R225 HB-FORCED-CHOICE-FULL-TOOLS (DARK, 2026-10-02). A forced named tool_choice (mentor
1923
+ # AskForAdvice, CORTEX_MENTOR_FORCE) narrowed the tools array to the forced tool, rewriting the tools prefix on the forced
1924
+ # request and again after it. on: the full tools array is kept; the provider's tool_choice does the forcing. CAUTION:
1925
+ # DeepSeek was observed (2026-08-29) to ignore a named choice when the full catalog is present (the reason narrowing exists),
1926
+ # and hf-space has no tool_choice on the Gradio wire, so there the force is lost entirely. off: unchanged.
1927
+ # [LEDGER 2026-10-02 @4.124.45] DARK — BUILT + unit-tested + prefix harness (send d, all transports: the forced pair's first
1928
+ # divergence moves from tools (kept 0%) to tool_choice (Anthropic/xAI-messages kept 97%, chat-deepseek 92%, chat-openai 47%,
1929
+ # Gemini 92-95%; Responses chained 0%); hf-space stable = force lost). No live probe of choice obedience.
1930
+ #CORTEX_FORCED_CHOICE_FULL_TOOLS=
1931
+ # CORTEX_STREAM_USAGE — R224a HB-STREAM-USAGE (DARK, 2026-10-02). Streaming chat/completions never asked for usage, so the
1932
+ # reassembled final message reported zero tokens (TUI/SSE accounting and cache hit rates invisible). on: streaming requests
1933
+ # send stream_options {include_usage: true} and the final message carries the provider's usage object (DeepSeek
1934
+ # prompt_cache_hit_tokens, OpenAI prompt_tokens_details). Non-streaming requests unchanged. off: unchanged.
1935
+ # [LEDGER 2026-10-02 @4.124.45] DARK — BUILT + unit-tested (request shape + usage carried). Live probe: DeepSeek streaming
1936
+ # accepted stream_options (200; usage on the final chunk WITH finish_reason, not a separate choices:[] chunk). The prefix
1937
+ # harness cannot reach the streaming builders.
1938
+ #CORTEX_STREAM_USAGE=
1939
+
1756
1940
  # Prompt-mass composition (BASH_PLUS_SPEC P6): full (default) | minimal (only
1757
1941
  # the core system prompt; guides/CLAUDE.md/memory dropped) | defer (minimal on
1758
1942
  # turn 1, full corpus appended once at the first tool-result boundary).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexus-cortex/cli",
3
- "version": "4.124.43",
3
+ "version": "4.124.45",
4
4
  "description": "Nexus Cortex CLI - Terminal interface for multi-provider LLM orchestration",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -19,7 +19,7 @@
19
19
  "prepack": "node ../../scripts/copy-pkg-cortex-scaffold.mjs"
20
20
  },
21
21
  "dependencies": {
22
- "@nexus-cortex/core": "4.124.43",
22
+ "@nexus-cortex/core": "4.124.45",
23
23
  "chalk": "^4.1.2",
24
24
  "cli-spinners": "^2.9.0",
25
25
  "commander": "^11.0.0",