@nexus-cortex/cli 4.124.46 → 4.124.47

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 +49 -1
  2. package/package.json +2 -2
package/.env.defaults CHANGED
@@ -557,7 +557,19 @@ CORTEX_ALLOW_CMD_SUBSTITUTION=true
557
557
  # R37/R38 benchmarks: hybrid (true) is 20-26% faster than client-only with equal accuracy.
558
558
  ENABLE_SERVER_SIDE_TOOLS=true
559
559
  # Default API pattern for XAI models at registration time (ENABLE_SERVER_SIDE_TOOLS=true
560
- # overrides at request time). Options: messages | responses
560
+ # overrides at request time). Options: messages | responses | chat
561
+ # chat = https://api.x.ai/v1/chat/completions (Bearer XAI_API_KEY) through the SAME chat/completions builder DeepSeek uses
562
+ # (append-only prefix cache, reasoning_content replay, x-grok-conv-id header). Client tools only: a chat-mode card registers
563
+ # no server-side tools, so ENABLE_SERVER_SIDE_TOOLS never re-routes it to /v1/responses. reasoning_effort is sent only for
564
+ # cards that declare an effort (grok-4.3-class; request/CORTEX_ACTION_EFFORT wins, max→high) — never grok-build-0.1 (400).
565
+ # Applies only to UN-PINNED xAI cards (grok-4.6 / grok-build-0.1 pin messages). Bench arms should select the pinned cards
566
+ # instead: `grok-4.3-chat` / `grok-build-0.1-chat`. Streaming usage needs CORTEX_STREAM_USAGE=on (same as DeepSeek); the
567
+ # system prompt rides CORTEX_DELIVER_SYSTEM_PROMPT (same R63 gate as every chat/completions provider).
568
+ # [LEDGER 2026-10-03 @4.124.47] DARK — BUILT: XAI_API_MODE value `chat` + cards grok-4.3-chat / grok-build-0.1-chat (third xAI
569
+ # transport, additive; /v1/messages path untouched — prefix harness xai-messages rows byte-identical off/on). Unit-tested
570
+ # (xaiChatTransport.test.ts) + prefix rows xai-chat(grok-4.3-chat|grok-build-0.1-chat) append-only. Live 2026-10-03: grok-4.3 (effort high)
571
+ # + grok-build-0.1 (no effort) both finish tool_calls. NOTE: xAI completion_tokens EXCLUDES reasoning_tokens (DeepSeek's include
572
+ # them) — canonical outputTokens under-counts billed output here; use reasoningTokens / costUsd (cost_in_usd_ticks). Never benched.
561
573
  XAI_API_MODE=messages
562
574
  # OpenAI request surface. Options: chat/completions | responses (opt into hosted tools)
563
575
  OPENAI_API_MODE=
@@ -1977,6 +1989,42 @@ MENTORSHIP_ACTIVE_DISCOVERY=false
1977
1989
  # explicit request param still wins). off = unchanged (byte-identical).
1978
1990
  # [LEDGER 2026-10-03 @4.124.46] DARK — BUILT (unit tests; turn it on in every non-DeepSeek cross-provider arm).
1979
1991
  #CORTEX_ACTION_EFFORT_FIRST=
1992
+ #
1993
+ # CORTEX_GEMINI_EXPLICIT_CACHE — HB-GEMINI-EXPLICIT-CACHE (DARK, 2026-10-03; stack-portability §"GEMINI EXPLICIT cachedContents
1994
+ # FEASIBILITY"). Gemini implicit caching is partial on gemini-3-flash-preview (fixed ~12K head only) and NONE on gemini-3.8-flash;
1995
+ # explicit cachedContents cached 13,405/13,414 on both (live 2026-10-03). on: the Gemini builders (REST send + stream, @google/genai
1996
+ # send + stream) snapshot (model, system, tools) + history up to (not including) the newest turn as a cachedContents once it reaches
1997
+ # the model minimum (3.x 4,096 / 2.5 2,048 tokens, ai.google.dev/gemini-api/docs/caching), then send cachedContent + only the turns
1998
+ # after the snapshot with NO system/tools/toolConfig (Gemini 400s that pair). Re-snapshot when the uncached tail passes
1999
+ # CORTEX_GEMINI_CACHE_RESNAPSHOT_TOKENS, when the history before the snapshot is rewritten (hash check), or near expiry; a
2000
+ # system/tools change (anchor lift) = new snapshot. Superseded snapshots are DELETEd; orchestrator cleanup DELETEs the rest. A forced
2001
+ # tool_choice request bypasses the cache. Any 400/403/404 on a cached request = the full request once + slot dropped; a failed
2002
+ # create = full request + backoff. Logs `[gemini-cache]` lines (CORTEX_GEMINI_CACHE_QUIET=true silences). Cost (pricing page,
2003
+ # 2026-10-03): creation = the prefix at the normal input rate once; cached reads 3 Flash $0.05/M (input $0.50), 3.8 Flash $0.075/M
2004
+ # (input $0.75, through 2026-12-31); storage 3 Flash $1.00, 3.8 Flash $0.50 per M tokens per hour. off: unchanged (byte-identical).
2005
+ # [LEDGER 2026-10-03 @4.124.47] DARK — BUILT (16 unit tests on a fake Gemini API; off = byte-identical send + stream) + one live
2006
+ # 5-turn tool loop on gemini-3-flash-preview + gemini-3.8-flash through the built dist (see the 4.124.47 changeset). No bench arm yet.
2007
+ #CORTEX_GEMINI_EXPLICIT_CACHE=
2008
+ #
2009
+ # CORTEX_GEMINI_CACHE_TTL_S — HB-GEMINI-EXPLICIT-CACHE: snapshot TTL in seconds (min 60). A snapshot used in the second half of its
2010
+ # life is PATCHed back to the full TTL. Storage is billed per token-hour, so the TTL bounds the cost of an orphaned snapshot.
2011
+ # [LEDGER 2026-10-03 @4.124.47] DARK — BUILT (inert unless CORTEX_GEMINI_EXPLICIT_CACHE=on). Default 300.
2012
+ #CORTEX_GEMINI_CACHE_TTL_S=300
2013
+ #
2014
+ # CORTEX_GEMINI_CACHE_RESNAPSHOT_TOKENS — HB-GEMINI-EXPLICIT-CACHE: re-snapshot a longer prefix once the uncached tail (history after
2015
+ # the snapshot, newest turn excluded; chars/4 estimate) exceeds this many tokens (min 1024). Lower = more creations (each billed at
2016
+ # the full input rate), higher = more uncached input per request.
2017
+ # [LEDGER 2026-10-03 @4.124.47] DARK — BUILT (inert unless CORTEX_GEMINI_EXPLICIT_CACHE=on). Default 16000.
2018
+ #CORTEX_GEMINI_CACHE_RESNAPSHOT_TOKENS=16000
2019
+ #
2020
+ # CORTEX_GEMINI_CACHE_MIN_TOKENS — HB-GEMINI-EXPLICIT-CACHE: override the per-model minimum cacheable size (default 4096 for 3.x
2021
+ # incl. gemini-3-flash-preview, which the docs table does not list; 2048 for 2.5).
2022
+ # [LEDGER 2026-10-03 @4.124.47] DARK — BUILT (inert unless CORTEX_GEMINI_EXPLICIT_CACHE=on). Default: per model.
2023
+ #CORTEX_GEMINI_CACHE_MIN_TOKENS=
2024
+ #
2025
+ # CORTEX_GEMINI_CACHE_QUIET — HB-GEMINI-EXPLICIT-CACHE: true silences the `[gemini-cache]` stderr lines.
2026
+ # [LEDGER 2026-10-03 @4.124.47] DARK — BUILT (inert unless CORTEX_GEMINI_EXPLICIT_CACHE=on). Default false.
2027
+ #CORTEX_GEMINI_CACHE_QUIET=
1980
2028
 
1981
2029
  # Prompt-mass composition (BASH_PLUS_SPEC P6): full (default) | minimal (only
1982
2030
  # the core system prompt; guides/CLAUDE.md/memory dropped) | defer (minimal on
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexus-cortex/cli",
3
- "version": "4.124.46",
3
+ "version": "4.124.47",
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.46",
22
+ "@nexus-cortex/core": "4.124.47",
23
23
  "chalk": "^4.1.2",
24
24
  "cli-spinners": "^2.9.0",
25
25
  "commander": "^11.0.0",