@kodax-ai/kodax 0.7.44 → 0.7.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.
- package/CHANGELOG.md +49 -0
- package/README.md +6 -5
- package/README_CN.md +6 -5
- package/dist/chunks/chunk-CZHIUJQS.js +535 -0
- package/dist/chunks/{chunk-RUDYNAK7.js → chunk-FKB7BWQT.js} +1 -1
- package/dist/chunks/chunk-FT2XFFNP.js +2 -0
- package/dist/chunks/{chunk-HHQ7YTGM.js → chunk-IJUB7QXG.js} +57 -57
- package/dist/chunks/{chunk-DI2G3YWL.js → chunk-PGF5EZ7C.js} +12 -12
- package/dist/chunks/{chunk-4YPL2UVZ.js → chunk-X6EHEQWP.js} +253 -252
- package/dist/chunks/{compaction-config-NAPRF7XR.js → compaction-config-WCNGYWT3.js} +1 -1
- package/dist/chunks/{construction-bootstrap-PHTGBRNU.js → construction-bootstrap-OB5SDNBD.js} +1 -1
- package/dist/chunks/dist-C2VOGY5Z.js +2 -0
- package/dist/chunks/{dist-RHIHZAYX.js → dist-Q2PQM7U7.js} +1 -1
- package/dist/chunks/{utils-TV3UYCHQ.js → utils-CHXCBR3Q.js} +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +2 -2
- package/dist/kodax_cli.js +746 -726
- package/dist/provider-capabilities.json +18 -4
- package/dist/sdk-agent.d.ts +47 -2
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +23 -5
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-llm.d.ts +1 -1
- package/dist/sdk-llm.js +1 -1
- package/dist/sdk-mcp.js +1 -1
- package/dist/sdk-repl.d.ts +6 -5
- package/dist/sdk-repl.js +1 -1
- package/dist/sdk-session.d.ts +1 -1
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.js +1 -1
- package/dist/types-chunks/{bash-prefix-extractor.d-DdoSeghD.d.ts → bash-prefix-extractor.d-HrTUwtV7.d.ts} +181 -138
- package/dist/types-chunks/{resolver.d-B7ZnVuuf.d.ts → resolver.d-OMwxURit.d.ts} +1 -1
- package/dist/types-chunks/{storage.d-DFD9ln5c.d.ts → storage.d-BvTdjYQF.d.ts} +12 -0
- package/dist/types-chunks/{utils.d-C5fzCE9W.d.ts → utils.d-DSEX6Rq1.d.ts} +14 -2
- package/package.json +1 -1
- package/dist/chunks/chunk-35BDEEC5.js +0 -2
- package/dist/chunks/chunk-QHILHQBB.js +0 -519
- package/dist/chunks/dist-CCYBJJZY.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,55 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
> Full history for versions prior to v0.7.0: [CHANGELOG_ARCHIVE.md](docs/CHANGELOG_ARCHIVE.md)
|
|
6
6
|
|
|
7
|
+
## [0.7.45] - 2026-06-01
|
|
8
|
+
|
|
9
|
+
### ⚠️ BREAKING — coding-plan providers now use dedicated API-key env vars
|
|
10
|
+
|
|
11
|
+
The coding-plan providers used to read the **same** env var as their regular-API
|
|
12
|
+
sibling (e.g. both `zhipu` and `zhipu-coding` read `ZHIPU_API_KEY`), which meant
|
|
13
|
+
you couldn't enable the two providers independently — and the regular key could
|
|
14
|
+
get handed to a coding-plan provider you hadn't actually subscribed to. Each
|
|
15
|
+
coding-plan provider now reads its **own** key, so setting both keys lets you use
|
|
16
|
+
both providers' models at once.
|
|
17
|
+
|
|
18
|
+
| Provider | Old env var | **New env var** |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| `zhipu-coding` | `ZHIPU_API_KEY` | `ZHIPU_CODING_API_KEY` |
|
|
21
|
+
| `kimi-code` | `KIMI_API_KEY` | `KIMI_CODE_API_KEY` |
|
|
22
|
+
| `minimax-coding` | `MINIMAX_API_KEY` | `MINIMAX_CODING_API_KEY` |
|
|
23
|
+
| `mimo-coding` | `MIMO_API_KEY` | `MIMO_CODING_API_KEY` |
|
|
24
|
+
| `ark-coding` | `ARK_API_KEY` | `ARK_CODING_API_KEY` |
|
|
25
|
+
|
|
26
|
+
**Migration**: set the new env var(s) for whichever coding plans you use. Regular
|
|
27
|
+
providers (`zhipu`, `kimi`, …) are unchanged. There is no fallback to the old
|
|
28
|
+
shared names — the new name is required for the coding-plan provider to start.
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
|
|
32
|
+
- **FEATURE_207 — `@` picker: recent files**: typing `@` now surfaces your current git working set (modified + untracked files) at the top of the completion list, before the plain directory listing — these are the files you're actively changing, which is overwhelmingly what you'll reference next. Cross-directory (nested files appear without navigating into them), filtered by basename prefix as you type, and suppressed once you navigate into a specific path (`@src/` keeps the normal listing). Non-git workspaces degrade gracefully to the directory listing. Directories were already completable; skill (`/skill:`) / MCP / plugin entries are untouched. (The recency source is the git working set rather than the originally-planned session-lineage tool events — chosen for cold-start usefulness + layer independence; see docs/features/v0.7.45.md#feature_207.)
|
|
33
|
+
- **FEATURE_102 — Adaptive Multi-Provider Orchestration (P1-auto + P2 + P3)**: the main agent can now run a child task on a *different* provider/model than its own. Three layers ship; P4's adaptive-scoring *mechanism* (bandit/bayesian auto-selection) is intentionally **not** built — its only actionable output, the gating eval below, shipped, and the mechanism itself is speculative with no current consumer (YAGNI per `CLAUDE.md`), so it is **deferred to 0.9.x as an independent feature** if a real auto-selection need arises. Static tier routing (P1-auto) already covers the concrete need, and is **off by default** — it activates only when you point a tier env var at a model.
|
|
34
|
+
- **P2 — explicit per-dispatch override.** `dispatch_child_task` gains optional `provider` / `model` params, so the agent can deliberately send a child to another model family — e.g. a second independent review of the same change by a different family, to catch blind spots a single family would share. Resolution priority in `child-executor`: `bundle.provider/model` > specialist's declared model (FEATURE_191) > parent default. Omitting both is byte-identical to the prior behavior. Tolerant parse (empty/whitespace → undefined) so a misuse never fails the dispatch.
|
|
35
|
+
- **P3 — cross-provider fallback + `doctor --ping`.** When a child's primary provider is *exhausted or down* (the LLM layer's same-provider `withRateLimit` retries gave up, a 5xx, or a network error), KodaX re-runs the child once on the next provider in an operator-configured chain instead of failing the whole child. Configured via `/fallback ark-coding,kimi-code` (persists to `~/.kodax/config.json` + mirrors to `KODAX_FALLBACK_PROVIDERS`; `/fallback off` to clear, `/fallback status` to inspect). Empty chain = OFF. Scope is deliberately minimal (per user direction): only hard availability errors trigger fallback — a returned `success:false` is a task outcome (not retried elsewhere) and aborts are never faked over; the speculative tool-call-fidelity / context-overflow / quality-anomaly triggers are unbuilt (YAGNI). `kodax doctor --ping` completes the health check: it sends one minimal request per configured provider (10s timeout, concurrent) to prove the key actually works and the subscription is active — opt-in, small token cost, never on the default `doctor`. 16 tests (11 fallback core + 5 `/fallback` command).
|
|
36
|
+
- **P1-auto — `model_hint` → tier routing.** The previously dormant `model_hint` field (`fast`/`balanced`/`deep`, FEATURE_120) now selects an operator-configured tier: `fast` → `KODAX_FAST_PROVIDER`/`KODAX_FAST_MODEL` (**read-only children only** — the gating eval validated cheap-model quality on read-only investigation but not write/codegen, so write children stay on the parent tier), `deep` → `KODAX_DEEP_PROVIDER`/`KODAX_DEEP_MODEL` (read or write). `balanced`/unset, or any unconfigured tier, falls back to the parent — **routing is OFF by default** and turns on only when you point a tier env var at a model (no separate toggle). Specialist and explicit-P2 overrides both win over the hint. Per KodaX minimalism the original 5-name capability-alias layer (`vision`/`long-context`/…) was descoped to this env-tier form — no consumer exists for the rest yet (YAGNI). Pure routing wiring; the Worker prompt is unchanged (an eval non-trigger per `CLAUDE.md`), so $0 / no panel. Gating eval (`tests/feature-102-model-tier-quality.eval.ts`, canonical 5-alias × 3 read-only investigation × 5 run) kept as permanent regression: cheap floor `ark/v4flash` = 15/15, ≥ strong-mean 92% → cheap PRESERVES read-only quality. New unit + integration tests (7 `model-hint-routing` + 5 child-executor P2/P1-auto priority); also de-flaked the pre-existing `merges findings` child-executor test (parallel children made `mergeChildResults` emit in completion order — now deterministic dispatch order). Design: [docs/features/v0.7.45.md](docs/features/v0.7.45.md#phase-1--model_hint--真实跨-provider-子派发mvp).
|
|
37
|
+
|
|
38
|
+
### Performance
|
|
39
|
+
|
|
40
|
+
- **FEATURE_212 — fullscreen render no longer lags as history grows.** In the fullscreen (alt-screen) UI, every render previously rewrote the whole viewport (~6 KB of ANSI) on each frame; on Windows/ConPTY each synchronous write blocks the event loop, so typing, streaming output, scrolling, and the spinner all got progressively choppier the longer a session ran. The renderer now takes a **cell-diff fast path** in fullscreen — it writes only the cells that actually changed (default ON; escape hatch `KODAX_FULLSCREEN_CELLDIFF=0`). Typing stays smooth regardless of transcript length.
|
|
41
|
+
- **FEATURE_212 — DECSTBM hardware-scroll fast path.** When the transcript scrolls, the renderer now emits a single terminal scroll-region command and repaints only the rows that scrolled *in*, instead of repainting every shifted row. Reduces per-scroll-frame write volume by an order of magnitude on full screens (default ON; escape hatch `KODAX_SCROLL_DECSTBM=0`). Proven correct by a calibrated cursor+grid terminal-model differential gate.
|
|
42
|
+
|
|
43
|
+
### Fixed
|
|
44
|
+
|
|
45
|
+
- **FEATURE_212 — fullscreen viewport drifted up one row.** The cell-diff fast path above shifted the entire managed viewport up by one row (the banner's top line was clipped and a blank line appeared under the status bar). Root cause was two scroll-inducing trailing newlines that fire when the frame fills the viewport: the per-row line-feed `renderFrameSlice` emits after the *last* row, and the `restoreCursor` line-feed that moves the cursor one row past the last content row. Both are now suppressed for a viewport-filling frame (the resting cursor is clamped to the last visible row), so nothing scrolls. The cell-diff perf win is fully preserved. Reproduced and verified by an offline terminal-model gate that faithfully scrolls on a bottom-row line-feed.
|
|
46
|
+
- **FEATURE_213 — a follow-up typed while waiting for a sub-agent was answered but never shown.** When you queued a message while the agent was idle-yielding (waiting for a `dispatch_child_task` child), the agent received and answered it, but it never appeared in the transcript. There are two mid-turn drain paths and only one notified the UI: the `beforeNextTurn` mid-turn drain routes through `onMidTurnUserMessages` (recorded), but the idle-yield **wake** drain (`composeIdleYieldUserMessage`) spliced the prompt straight into the agent transcript with no UI signal. Fixed by giving the wake path the same UI sink: `composeIdleYieldUserMessage` reports the drained prompt(s) via a new `onUserPrompts` callback, surfaced through `runWithIdleYield`'s `onResumedUserPrompts` option (both new, optional, non-breaking SDK additions on `@kodax-ai/agent`), which coding wires to `onMidTurnUserMessages`. A message is dequeued exactly once, so no duplication. Also hardened the recorded path: `clearManagedForegroundTurnHistory` now rescues any not-yet-committed mid-turn user message before wiping the foreground ledger (id-deduped against the round-end / fresh-submit / interrupt commits), so a premature clear can't drop it either.
|
|
47
|
+
- **FEATURE_173 — `kodax -r` only restored the first round of a resumed session.** After FEATURE_173 consolidated session ids, the runner's snapshot writer (`saveSessionSnapshot`, a flat full-rewrite) and the REPL's incremental writer raced on the same `<id>.jsonl`: a stale runner save whose messages were a *prefix* of what the REPL had already written rebuilt the lineage and reset `activeEntryId` back to round 1 — so resume walked the active path only as far as the first round (entries were never lost, just the active pointer regressed). Fixed in two layers: (1) a new `KodaXSessionOptions.persistedByHost?: boolean` SDK option marks host-owned sessions so the runner skips routine snapshot writes and stops racing the REPL — error/crash-recovery saves (which carry `errorMetadata`) still bypass the gate and persist, so recovery is unchanged; headless print/SDK/ACP callers leave the flag unset and remain the sole writer. (2) `resolveSnapshotLineage` now reuses the existing lineage verbatim when a lineage-less snapshot's messages are a prefix of (or empty vs) the persisted active path, so `activeEntryId` can never regress structurally. New tests cover 5 writer interleavings including the exact repro and the empty-message error save.
|
|
48
|
+
- **archived sessions no longer appear in the session picker.** `session/public-api.ts` documents an `archived-` filename-prefix archive mechanism, and the public-api *slow* path already filtered it out, but `FileSessionStorage.list()` — used by the interactive picker and the public-api fast path — did not, so archived sessions still showed up there. Added the `!startsWith('archived-')` filter so the archive mechanism is consistent end-to-end.
|
|
49
|
+
- **repo-intelligence atomic writes no longer leak `.tmp` files.** `writeJsonFileAtomic` wrote to a uniquely-named `<file>.<pid>.<ts>.tmp` and renamed it into place, but had no cleanup path: any failed `rename` (common on Windows as `EPERM` when the target is briefly locked by a concurrent reader) or a hard kill between write and rename left the temp behind, and the unique naming meant each failure accumulated a fresh orphan — over a thousand could pile up in `.agent/repo-intelligence/` (hundreds of MB) over weeks. The write now removes its own temp on failure (try/catch) and best-effort sweeps stale sibling orphans (older than 1h, same base file — never a concurrent writer's in-flight temp) on each successful write, so any existing backlog self-heals on normal use.
|
|
50
|
+
- **empty provider completions now retry instead of silently ending the task.** A `finish_reason`-complete turn with no text, no tool calls, and no thinking is a degraded response — common on budget OpenAI-compatible providers (e.g. zhipu-coding) under load or right after a 429. The runner's no-tool terminal branch misread it as a clean text-only completion and exited the task silently (the user saw the task stop right after a `[Rate Limit] Retrying…` line, with no error). The managed-task LLM adapter now re-streams such a turn up to `KODAX_MAX_EMPTY_COMPLETION_RETRIES` times (short linear backoff) on an independent counter before falling through to the existing terminal behavior, so it does not consume the resilience error budget. Canonical text-only termination (text present, no tool) is untouched.
|
|
51
|
+
|
|
52
|
+
### Known issues
|
|
53
|
+
|
|
54
|
+
- **Issue 136 (open) — spinner stutter during streaming/scroll.** The spinner animation can still stutter while output is streaming or while scrolling a long transcript. This is **not** terminal-write volume (the two fixes above ruled that out) — the bottleneck is CPU-side per-frame work (React reconciliation + full screen-grid rebuild). Cosmetic only; tracked for a dedicated fix. See `docs/KNOWN_ISSUES.md` #136.
|
|
55
|
+
|
|
7
56
|
## [0.7.44] - 2026-05-28
|
|
8
57
|
|
|
9
58
|
### Theme
|
package/README.md
CHANGED
|
@@ -909,13 +909,14 @@ import { InkREPL } from '@kodax-ai/kodax/repl';
|
|
|
909
909
|
| anthropic | `ANTHROPIC_API_KEY` | Native | claude-sonnet-4-6 |
|
|
910
910
|
| openai | `OPENAI_API_KEY` | Native | gpt-5.3-codex |
|
|
911
911
|
| kimi | `KIMI_API_KEY` | Native | kimi-k2.6 |
|
|
912
|
-
| kimi-code | `
|
|
912
|
+
| kimi-code | `KIMI_CODE_API_KEY` | Native | kimi-for-coding |
|
|
913
913
|
| qwen | `QWEN_API_KEY` | Native | qwen3.5-plus |
|
|
914
914
|
| zhipu | `ZHIPU_API_KEY` | Native | glm-5 |
|
|
915
|
-
| zhipu-coding | `
|
|
916
|
-
| minimax-coding | `
|
|
917
|
-
| mimo
|
|
918
|
-
|
|
|
915
|
+
| zhipu-coding | `ZHIPU_CODING_API_KEY` | Native | glm-5 |
|
|
916
|
+
| minimax-coding | `MINIMAX_CODING_API_KEY` | Native | MiniMax-M2.7 |
|
|
917
|
+
| mimo | `MIMO_API_KEY` | Native | mimo-v2.5-pro (Xiaomi MiMo pay-per-token, Anthropic-compat) |
|
|
918
|
+
| mimo-coding | `MIMO_CODING_API_KEY` | Native | mimo-v2.5-pro (Xiaomi Token Plan, Anthropic-compat) |
|
|
919
|
+
| ark-coding | `ARK_CODING_API_KEY` | Native | glm-5.1 (Volcengine Ark Coding Plan, multi-model gateway, Anthropic-compat) |
|
|
919
920
|
| deepseek | `DEEPSEEK_API_KEY` | Native | deepseek-v4-flash |
|
|
920
921
|
| gemini-cli | `GEMINI_API_KEY` | Prompt-only / CLI bridge | (via gemini CLI) |
|
|
921
922
|
| codex-cli | `OPENAI_API_KEY` | Prompt-only / CLI bridge | (via codex CLI) |
|
package/README_CN.md
CHANGED
|
@@ -327,13 +327,14 @@ dist/binary/linux-x64/
|
|
|
327
327
|
| anthropic | `ANTHROPIC_API_KEY` | Native | claude-sonnet-4-6 |
|
|
328
328
|
| openai | `OPENAI_API_KEY` | Native | gpt-5.3-codex |
|
|
329
329
|
| kimi | `KIMI_API_KEY` | Native | kimi-k2.6 |
|
|
330
|
-
| kimi-code | `
|
|
330
|
+
| kimi-code | `KIMI_CODE_API_KEY` | Native | kimi-for-coding |
|
|
331
331
|
| qwen | `QWEN_API_KEY` | Native | qwen3.5-plus |
|
|
332
332
|
| zhipu | `ZHIPU_API_KEY` | Native | glm-5 |
|
|
333
|
-
| zhipu-coding | `
|
|
334
|
-
| minimax-coding | `
|
|
335
|
-
| mimo
|
|
336
|
-
|
|
|
333
|
+
| zhipu-coding | `ZHIPU_CODING_API_KEY` | Native | glm-5(GLM Coding Plan 端点) |
|
|
334
|
+
| minimax-coding | `MINIMAX_CODING_API_KEY` | Native | MiniMax-M2.7 |
|
|
335
|
+
| mimo | `MIMO_API_KEY` | Native | mimo-v2.5-pro(小米 MiMo 按量计费,Anthropic 协议) |
|
|
336
|
+
| mimo-coding | `MIMO_CODING_API_KEY` | Native | mimo-v2.5-pro(小米 MiMo Token Plan,Anthropic 协议) |
|
|
337
|
+
| ark-coding | `ARK_CODING_API_KEY` | Native | glm-5.1(火山方舟 Coding Plan,多模型网关,Anthropic 协议) |
|
|
337
338
|
| deepseek | `DEEPSEEK_API_KEY` | Native | deepseek-v4-flash |
|
|
338
339
|
| gemini-cli | `GEMINI_API_KEY` | Prompt-only / CLI bridge | (通过 gemini CLI) |
|
|
339
340
|
| codex-cli | `OPENAI_API_KEY` | Prompt-only / CLI bridge | (通过 codex CLI) |
|