jeo-code 0.8.17 → 0.8.18
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 +20 -0
- package/README.ja.md +2 -2
- package/README.ko.md +2 -2
- package/README.md +3 -3
- package/README.zh.md +2 -2
- package/package.json +1 -1
- package/src/commands/launch/route-slash.ts +41 -13
- package/src/commands/launch.ts +22 -2
- package/src/tui/app.ts +18 -0
- package/src/tui/components/slash.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
6
|
|
|
7
7
|
The README mirrors the latest 5 entries — regenerate with `bun run changelog:sync`.
|
|
8
8
|
|
|
9
|
+
## [0.8.18] - 2026-07-09
|
|
10
|
+
_"라우팅 매 프롬프트마다 변경되는지, route why 의도대로 동작하는지 검증하고 배포할게있는지 확인해줘" — 2 parallel subagents live-verified per-prompt routing + `/route why` (including the previously-only-unit-tested post-call equivalent-model fallback path, now reproduced against a real mock 500-error server) and audited a disconnected `RouteHistory` class shipped as incomplete scaffolding in 0.8.16/0.8.17 (class + 11 tests existed, but nothing ever called it — no `/route history` subcommand, no wiring into the turn loop). Live testing also surfaced one real bug: the TUI footer's model/provider label never updated after a mid-turn fallback, staying on the pre-fallback model for the rest of that turn's render even though the backend decision (`lastRouteDecision`) was already correct._
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **TUI footer no longer shows a stale model after a mid-turn equivalent-pool fallback** (`src/tui/app.ts`, `src/commands/launch.ts`) — the footer's `model`/`provider` fields were set once at `LaunchTui` construction and never updated when `launch.ts`'s post-call fallback loop (routed model hit a persistent server-side error, rate limit, etc.) switched `activeModel` mid-turn; the status bar kept showing the ORIGINAL pre-fallback model for the remainder of that turn even though the reply actually came from the fallback model. Added an `onModelSwitch(model, provider)` event, fired from the fallback loop right alongside the existing `[route] … switching to equivalent …` notice, that updates the live footer in place.
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- **`/route history [n]`** (`src/agent/route-history.ts`, `src/commands/launch/route-slash.ts`, registered in `src/tui/components/slash.ts`) — wires the `RouteHistory` class (shipped disconnected in the prior commit) into the live turn loop: a session-scoped bounded FIFO (never persisted) records every real routing decision — both the pre-call routed pick and any mid-turn equivalent-model fallback that actually served the turn — so history reflects reality, not a since-superseded pre-call guess. `/route history [n]` prints the last n (default 10, non-positive/non-numeric args fall back to the default) as `turn N: tier -> model (source, confidence X.XX)`.
|
|
17
|
+
|
|
18
|
+
### Removed
|
|
19
|
+
- **`IMPROVEMENT_SUMMARY.md`, `REVIEW.md`** — stray AI-session working notes from the prior commit, never referenced by `README.md`, `CHANGELOG.md`, or `package.json`'s `files` allowlist.
|
|
20
|
+
|
|
21
|
+
### Verified
|
|
22
|
+
- Live PTY re-verification (`bun src/cli.ts`, isolated `JEO_CONFIG_DIR`, real Anthropic credentials): 5 prompts of varying complexity in one session routed to 5 distinct tier/model pairs (trivial→claude-haiku-4-5, complex→claude-fable-5, trivial→claude-haiku-4-5, high→claude-sonnet-5, trivial→claude-haiku-4-5); `/route why` and `/route status` matched the actual serving model on every turn.
|
|
23
|
+
- Live post-call-fallback reproduction: a real `Bun.serve` mock returning HTTP 500 on every call forced `launch.ts`'s equivalent-pool fallback to fire mid-turn; `/route why` immediately after correctly reported the POST-fallback model and a `warning: … switched to equivalent …` field, not the original pre-call pick.
|
|
24
|
+
- `bun test test/route-history.test.ts test/route-slash.test.ts test/launch-prompt-routing.test.ts` — 69 pass / 0 fail.
|
|
25
|
+
- `bun test test/tui-app.test.ts` — 51 pass / 0 fail (50 pre-existing + 1 new, covering the footer live-update fix).
|
|
26
|
+
- Full `bun test` — 2885 pass / 0 fail across 290 files.
|
|
27
|
+
- `bun run typecheck` — no errors.
|
|
28
|
+
|
|
9
29
|
## [0.8.17] - 2026-07-09
|
|
10
30
|
_"서브에이전트 이용해. 병렬루 부가 나머지모두 개선하고 검증후 배포까지하자" — a prior 4-way parallel subagent cross-verification pass found the README `[!CAUTION]` routing-lock block (added this session for "프롬프트 라우팅이 한번 정해지면 안바뀌는데?") was directionally correct but had 2 real inaccuracies, plus a concrete test-coverage gap: every existing pin/override regression test drove the lock via the `--model` CLI startup flag, never via typing `/model <name>` as an interactive slash command mid-session, and none proved persistence across 3+ consecutive turns._
|
|
11
31
|
|
package/README.ja.md
CHANGED
|
@@ -79,7 +79,7 @@ jeo --tmux # 独立した tmux セッションで実行
|
|
|
79
79
|
| `/provider login <name>` · `/logout` | 入力欄から OAuth ログイン/ログアウト |
|
|
80
80
|
| `/agents [role]` · `/subagent` | ロール別(executor/planner/architect/critic)モデル・thinking・ステップ設定 |
|
|
81
81
|
| `/thinking [level]` | デフォルト推論予算(low…xhigh)の表示/設定 |
|
|
82
|
-
| `/route [status\|on\|off\|why]` | セッション単位のプロンプトベース・モデルルーティングの切替 · 直近のルーティング判断の説明(設定済み資格情報 — OAuth または API キー — が実際に提供するモデルの中でのみ自動ルーティング) |
|
|
82
|
+
| `/route [status\|on\|off\|why\|history [n]]` | セッション単位のプロンプトベース・モデルルーティングの切替 · 直近のルーティング判断の説明 · `history [n]` はこのセッションの直近 n 件(デフォルト 10 件)のルーティング判断を表示(設定済み資格情報 — OAuth または API キー — が実際に提供するモデルの中でのみ自動ルーティング) |
|
|
83
83
|
| `/fast [on\|off\|status]` | 現在のモデルが low 推論をサポートする場合に fast thinking モードを切替 |
|
|
84
84
|
| `/skill` · `$<skill> [intent]` | ワークフロースキルの一覧/実行(`$team "task"` 形式) |
|
|
85
85
|
| `/view` · `/diff` · `/find` · `/search` | コード表示、git diff、ファイル/パターン検索 |
|
|
@@ -265,11 +265,11 @@ CI は `.github/workflows/npm-publish.yml` で公開します — GitHub リリ
|
|
|
265
265
|
## 変更履歴 (Changelog)
|
|
266
266
|
|
|
267
267
|
<!-- CHANGELOG:START (auto-generated from CHANGELOG.md — run `bun run changelog:sync`) -->
|
|
268
|
+
- **[0.8.18]** (2026-07-09) — "라우팅 매 프롬프트마다 변경되는지, route why 의도대로 동작하는지 검증하고 배포할게있는지 확인해줘" — 2 parallel subagents live-verified per-prompt routing + `/route why` (including the previously-only-unit-tested post-call equivalent-model fallback path, now reproduced against a real mock 500-error server) and audited a disconnected `RouteHistory` class shipped as incomplete scaffolding in 0.8.16/0.8.17 (class + 11 tests existed, but nothing ever called it — no `/route history` subcommand, no wiring into the turn loop). Live testing also surfaced one real bug: the TUI footer's model/provider label never updated after a mid-turn fallback, staying on the pre-fallback model for the rest of that turn's render even though the backend decision (`lastRouteDecision`) was already correct.
|
|
268
269
|
- **[0.8.17]** (2026-07-09) — "서브에이전트 이용해. 병렬루 부가 나머지모두 개선하고 검증후 배포까지하자" — a prior 4-way parallel subagent cross-verification pass found the README `[!CAUTION]` routing-lock block (added this session for "프롬프트 라우팅이 한번 정해지면 안바뀌는데?") was directionally correct but had 2 real inaccuracies, plus a concrete test-coverage gap: every existing pin/override regression test drove the lock via the `--model` CLI startup flag, never via typing `/model <name>` as an interactive slash command mid-session, and none proved persistence across 3+ consecutive turns.
|
|
269
270
|
- **[0.8.16]** (2026-07-09) — "jeo code의 computer use 기능은 / 명령어로 설정할수있도록하고, 실동작검증까지진행해줘" — the desktop-automation `computer` tool was only togglable by hand-editing `computer.enabled` in `~/.jeo/config.json`; there was no in-session way to enable it for a single run without leaving a permanent config change behind.
|
|
270
271
|
- **[0.8.15]** (2026-07-09) — "api 인증 모델도 사용가능하도록 딥리서치하고 개선해줘" — traced the API-authenticated GPT path to a routing catalog gap: `GET /models` with an OpenAI API key or an OpenAI-compatible provider returned real account-scoped model ids, and `/model` could show/pin them, but prompt routing still built its auto-select pools from static `MODEL_CATALOG` rows only. A custom `openaiBaseUrl` made this worse by treating every public OpenAI row as servable, so routing could choose `gpt-*`/`o*` ids that the configured local/Azure/proxy endpoint never listed.
|
|
271
272
|
- **[0.8.14]** (2026-07-09) — "GPT 연결 실패가 여전히 무응답으로 끝나는 케이스를 잡아줘" — traced the remaining GPT/routing failure path to post-call continuity: the route target could be credentialed and servable, but still end a turn with a recoverable terminal result such as plain `OpenAI returned no content`, rate/quota pressure, model unavailable/not found, or an invalid agent-tool response. jeo already knew the prompt tier and equivalent credentialed fallbacks, but it only applied that fallback before the model call. After the call failed, the turn stopped instead of trying another model in the same tier.
|
|
272
|
-
- **[0.8.13]** (2026-07-09) — "테스트검증 jeo --tmux 로 진행해줘" — traced a routing recovery weakness that survived the earlier credential, servability, and local reachability vetoes: once a configured route target was rejected, jeo threw away the whole routing decision and dropped to the session/default model even when the same prompt tier had another credentialed, servable model available. That kept turns working, but it also silently undid routing's cost/latency goal and made `/route why` less useful because the recorded decision was a fallback note instead of the actual model used.
|
|
273
273
|
|
|
274
274
|
See [CHANGELOG.md](CHANGELOG.md) for the full history.
|
|
275
275
|
<!-- CHANGELOG:END -->
|
package/README.ko.md
CHANGED
|
@@ -80,7 +80,7 @@ jeo --tmux # 독립 tmux 세션에서 실행
|
|
|
80
80
|
| `/provider login <name>` · `/logout` | 입력창에서 OAuth 로그인/로그아웃 |
|
|
81
81
|
| `/agents [role]` · `/subagent` | 역할별(executor/planner/architect/critic) 모델·thinking·스텝 구성 |
|
|
82
82
|
| `/thinking [level]` | 기본 추론 예산(low…xhigh) 조회/설정 |
|
|
83
|
-
| `/route [status\|on\|off\|why]` | 세션별 프롬프트 기반 모델 라우팅 켜기/끄기 · 마지막 라우팅 결정 설명(설정된 자격증명 — OAuth 또는 API 키 — 이 실제로 서비스하는 모델 안에서만 자동 라우팅) |
|
|
83
|
+
| `/route [status\|on\|off\|why\|history [n]]` | 세션별 프롬프트 기반 모델 라우팅 켜기/끄기 · 마지막 라우팅 결정 설명 · `history [n]`은 이번 세션의 최근 n개(기본 10개) 라우팅 결정 표시(설정된 자격증명 — OAuth 또는 API 키 — 이 실제로 서비스하는 모델 안에서만 자동 라우팅) |
|
|
84
84
|
| `/fast [on\|off\|status]` | 현재 모델이 low 추론을 지원하면 fast thinking 모드를 켜고 끔 |
|
|
85
85
|
| `/skill` · `$<skill> [intent]` | 워크플로 스킬 목록/실행(`$team "작업"` 스타일) |
|
|
86
86
|
| `/view` · `/diff` · `/find` · `/search` | 코드 보기, git diff, 파일/패턴 검색 |
|
|
@@ -266,11 +266,11 @@ CI는 `.github/workflows/npm-publish.yml`로 배포합니다 — GitHub 릴리
|
|
|
266
266
|
## 변경 이력 (Changelog)
|
|
267
267
|
|
|
268
268
|
<!-- CHANGELOG:START (auto-generated from CHANGELOG.md — run `bun run changelog:sync`) -->
|
|
269
|
+
- **[0.8.18]** (2026-07-09) — "라우팅 매 프롬프트마다 변경되는지, route why 의도대로 동작하는지 검증하고 배포할게있는지 확인해줘" — 2 parallel subagents live-verified per-prompt routing + `/route why` (including the previously-only-unit-tested post-call equivalent-model fallback path, now reproduced against a real mock 500-error server) and audited a disconnected `RouteHistory` class shipped as incomplete scaffolding in 0.8.16/0.8.17 (class + 11 tests existed, but nothing ever called it — no `/route history` subcommand, no wiring into the turn loop). Live testing also surfaced one real bug: the TUI footer's model/provider label never updated after a mid-turn fallback, staying on the pre-fallback model for the rest of that turn's render even though the backend decision (`lastRouteDecision`) was already correct.
|
|
269
270
|
- **[0.8.17]** (2026-07-09) — "서브에이전트 이용해. 병렬루 부가 나머지모두 개선하고 검증후 배포까지하자" — a prior 4-way parallel subagent cross-verification pass found the README `[!CAUTION]` routing-lock block (added this session for "프롬프트 라우팅이 한번 정해지면 안바뀌는데?") was directionally correct but had 2 real inaccuracies, plus a concrete test-coverage gap: every existing pin/override regression test drove the lock via the `--model` CLI startup flag, never via typing `/model <name>` as an interactive slash command mid-session, and none proved persistence across 3+ consecutive turns.
|
|
270
271
|
- **[0.8.16]** (2026-07-09) — "jeo code의 computer use 기능은 / 명령어로 설정할수있도록하고, 실동작검증까지진행해줘" — the desktop-automation `computer` tool was only togglable by hand-editing `computer.enabled` in `~/.jeo/config.json`; there was no in-session way to enable it for a single run without leaving a permanent config change behind.
|
|
271
272
|
- **[0.8.15]** (2026-07-09) — "api 인증 모델도 사용가능하도록 딥리서치하고 개선해줘" — traced the API-authenticated GPT path to a routing catalog gap: `GET /models` with an OpenAI API key or an OpenAI-compatible provider returned real account-scoped model ids, and `/model` could show/pin them, but prompt routing still built its auto-select pools from static `MODEL_CATALOG` rows only. A custom `openaiBaseUrl` made this worse by treating every public OpenAI row as servable, so routing could choose `gpt-*`/`o*` ids that the configured local/Azure/proxy endpoint never listed.
|
|
272
273
|
- **[0.8.14]** (2026-07-09) — "GPT 연결 실패가 여전히 무응답으로 끝나는 케이스를 잡아줘" — traced the remaining GPT/routing failure path to post-call continuity: the route target could be credentialed and servable, but still end a turn with a recoverable terminal result such as plain `OpenAI returned no content`, rate/quota pressure, model unavailable/not found, or an invalid agent-tool response. jeo already knew the prompt tier and equivalent credentialed fallbacks, but it only applied that fallback before the model call. After the call failed, the turn stopped instead of trying another model in the same tier.
|
|
273
|
-
- **[0.8.13]** (2026-07-09) — "테스트검증 jeo --tmux 로 진행해줘" — traced a routing recovery weakness that survived the earlier credential, servability, and local reachability vetoes: once a configured route target was rejected, jeo threw away the whole routing decision and dropped to the session/default model even when the same prompt tier had another credentialed, servable model available. That kept turns working, but it also silently undid routing's cost/latency goal and made `/route why` less useful because the recorded decision was a fallback note instead of the actual model used.
|
|
274
274
|
|
|
275
275
|
See [CHANGELOG.md](CHANGELOG.md) for the full history.
|
|
276
276
|
<!-- CHANGELOG:END -->
|
package/README.md
CHANGED
|
@@ -40,7 +40,7 @@ Run `jeo` inside a repository and it reads files, edits them, runs commands, and
|
|
|
40
40
|
|
|
41
41
|
## Highlights
|
|
42
42
|
|
|
43
|
-
- **Prompt routing (cost-aware, credential-aware)** — every turn can auto-route to a tier-appropriate model among only the providers your configured credentials actually serve (`/route [status|on|off|why]`), with a live equivalent-model fallback whenever a routed provider is rate-limited, unauthenticated, unreachable, or silently times out — see `/route why` for the last decision.
|
|
43
|
+
- **Prompt routing (cost-aware, credential-aware)** — every turn can auto-route to a tier-appropriate model among only the providers your configured credentials actually serve (`/route [status|on|off|why|history]`), with a live equivalent-model fallback whenever a routed provider is rate-limited, unauthenticated, unreachable, or silently times out — see `/route why` for the last decision, `/route history` for the recent ones.
|
|
44
44
|
- **Computer use (desktop automation)** — a fail-closed `computer` tool (screenshot/click/type/scroll/drag/batch) gated by both a config flag and an independent kill-switch/heartbeat supervisor; toggle it for the current session with `/computer [status|on|off]` without touching `~/.jeo/config.json`.
|
|
45
45
|
- **Multi-provider, one loop** — Anthropic / OpenAI (+Codex) / Gemini / Antigravity / Ollama / LM Studio, plus 20+ OpenAI- and Anthropic-compatible clouds (Groq, DeepSeek, Mistral, OpenRouter, xAI, Kimi, z.ai, …), all behind one uniform JSON tool loop. OAuth login happens from the input box (`/provider login`), every model pick persists as the new default, and prompt routing only auto-selects usable credentialed paths: Gemini OAuth goes through the provider-qualified `antigravity/*` agent set (Gemini 3.5 Flash tiers, Gemini 3.1 Pro, Claude Sonnet/Opus 4.6), never public `google/gemini-*` rows that require `GEMINI_API_KEY`; if a configured route points at an unready provider, jeo switches to an equivalent credentialed tier model before falling back to the default.
|
|
46
46
|
|
|
@@ -85,7 +85,7 @@ Inside the `jeo` REPL (Tab autocompletes; `/` opens the palette).
|
|
|
85
85
|
| `/provider login <name>` · `/logout` | OAuth login/logout from the input box |
|
|
86
86
|
| `/agents [role]` · `/subagent` | Per-role (executor/planner/architect/critic) model · thinking · step config |
|
|
87
87
|
| `/thinking [level]` | Show/set default reasoning budget (low…xhigh) |
|
|
88
|
-
| `/route [status\|on\|off\|why]` | Toggle prompt-based model routing for this session · explain the last routing decision (auto-routes each turn to a tier-appropriate model among the models your configured credentials — OAuth or API key — actually serve, and switches to an equivalent tier model when a configured route is unready) |
|
|
88
|
+
| `/route [status\|on\|off\|why\|history [n]]` | Toggle prompt-based model routing for this session · explain the last routing decision · `history [n]` lists the last n (default 10) routing decisions this session (auto-routes each turn to a tier-appropriate model among the models your configured credentials — OAuth or API key — actually serve, and switches to an equivalent tier model when a configured route is unready) |
|
|
89
89
|
| `/fast [on\|off\|status]` | Toggle fast thinking mode when the active model advertises low reasoning |
|
|
90
90
|
| `/skill` · `$<skill> [intent]` | List/run workflow skills (`$team "task"` style) |
|
|
91
91
|
| `/view` · `/diff` · `/find` · `/search` | Code view, git diff, file/pattern search |
|
|
@@ -273,11 +273,11 @@ Huge thanks to [gajae-code](https://github.com/Yeachan-Heo/gajae-code) for the i
|
|
|
273
273
|
## Changelog
|
|
274
274
|
|
|
275
275
|
<!-- CHANGELOG:START (auto-generated from CHANGELOG.md — run `bun run changelog:sync`) -->
|
|
276
|
+
- **[0.8.18]** (2026-07-09) — "라우팅 매 프롬프트마다 변경되는지, route why 의도대로 동작하는지 검증하고 배포할게있는지 확인해줘" — 2 parallel subagents live-verified per-prompt routing + `/route why` (including the previously-only-unit-tested post-call equivalent-model fallback path, now reproduced against a real mock 500-error server) and audited a disconnected `RouteHistory` class shipped as incomplete scaffolding in 0.8.16/0.8.17 (class + 11 tests existed, but nothing ever called it — no `/route history` subcommand, no wiring into the turn loop). Live testing also surfaced one real bug: the TUI footer's model/provider label never updated after a mid-turn fallback, staying on the pre-fallback model for the rest of that turn's render even though the backend decision (`lastRouteDecision`) was already correct.
|
|
276
277
|
- **[0.8.17]** (2026-07-09) — "서브에이전트 이용해. 병렬루 부가 나머지모두 개선하고 검증후 배포까지하자" — a prior 4-way parallel subagent cross-verification pass found the README `[!CAUTION]` routing-lock block (added this session for "프롬프트 라우팅이 한번 정해지면 안바뀌는데?") was directionally correct but had 2 real inaccuracies, plus a concrete test-coverage gap: every existing pin/override regression test drove the lock via the `--model` CLI startup flag, never via typing `/model <name>` as an interactive slash command mid-session, and none proved persistence across 3+ consecutive turns.
|
|
277
278
|
- **[0.8.16]** (2026-07-09) — "jeo code의 computer use 기능은 / 명령어로 설정할수있도록하고, 실동작검증까지진행해줘" — the desktop-automation `computer` tool was only togglable by hand-editing `computer.enabled` in `~/.jeo/config.json`; there was no in-session way to enable it for a single run without leaving a permanent config change behind.
|
|
278
279
|
- **[0.8.15]** (2026-07-09) — "api 인증 모델도 사용가능하도록 딥리서치하고 개선해줘" — traced the API-authenticated GPT path to a routing catalog gap: `GET /models` with an OpenAI API key or an OpenAI-compatible provider returned real account-scoped model ids, and `/model` could show/pin them, but prompt routing still built its auto-select pools from static `MODEL_CATALOG` rows only. A custom `openaiBaseUrl` made this worse by treating every public OpenAI row as servable, so routing could choose `gpt-*`/`o*` ids that the configured local/Azure/proxy endpoint never listed.
|
|
279
280
|
- **[0.8.14]** (2026-07-09) — "GPT 연결 실패가 여전히 무응답으로 끝나는 케이스를 잡아줘" — traced the remaining GPT/routing failure path to post-call continuity: the route target could be credentialed and servable, but still end a turn with a recoverable terminal result such as plain `OpenAI returned no content`, rate/quota pressure, model unavailable/not found, or an invalid agent-tool response. jeo already knew the prompt tier and equivalent credentialed fallbacks, but it only applied that fallback before the model call. After the call failed, the turn stopped instead of trying another model in the same tier.
|
|
280
|
-
- **[0.8.13]** (2026-07-09) — "테스트검증 jeo --tmux 로 진행해줘" — traced a routing recovery weakness that survived the earlier credential, servability, and local reachability vetoes: once a configured route target was rejected, jeo threw away the whole routing decision and dropped to the session/default model even when the same prompt tier had another credentialed, servable model available. That kept turns working, but it also silently undid routing's cost/latency goal and made `/route why` less useful because the recorded decision was a fallback note instead of the actual model used.
|
|
281
281
|
|
|
282
282
|
See [CHANGELOG.md](CHANGELOG.md) for the full history.
|
|
283
283
|
<!-- CHANGELOG:END -->
|
package/README.zh.md
CHANGED
|
@@ -79,7 +79,7 @@ jeo --tmux # 在独立 tmux 会话中运行
|
|
|
79
79
|
| `/provider login <name>` · `/logout` | 在输入框内 OAuth 登录/登出 |
|
|
80
80
|
| `/agents [role]` · `/subagent` | 按角色(executor/planner/architect/critic)配置模型·thinking·步数 |
|
|
81
81
|
| `/thinking [level]` | 查看/设置默认推理预算(low…xhigh) |
|
|
82
|
-
| `/route [status\|on\|off\|why]` | 切换本会话的基于提示词的模型路由 · 解释最近一次路由决策(仅在已配置凭证 — OAuth 或 API 密钥 — 实际可用的模型内自动路由) |
|
|
82
|
+
| `/route [status\|on\|off\|why\|history [n]]` | 切换本会话的基于提示词的模型路由 · 解释最近一次路由决策 · `history [n]` 列出本会话最近 n 条(默认 10 条)路由决策(仅在已配置凭证 — OAuth 或 API 密钥 — 实际可用的模型内自动路由) |
|
|
83
83
|
| `/fast [on\|off\|status]` | 当前模型支持 low 推理时切换 fast thinking 模式 |
|
|
84
84
|
| `/skill` · `$<skill> [intent]` | 列出/运行工作流技能(`$team "任务"` 风格) |
|
|
85
85
|
| `/view` · `/diff` · `/find` · `/search` | 代码查看、git diff、文件/模式搜索 |
|
|
@@ -265,11 +265,11 @@ CI 通过 `.github/workflows/npm-publish.yml` 发布 — GitHub 发布 release
|
|
|
265
265
|
## 更新日志 (Changelog)
|
|
266
266
|
|
|
267
267
|
<!-- CHANGELOG:START (auto-generated from CHANGELOG.md — run `bun run changelog:sync`) -->
|
|
268
|
+
- **[0.8.18]** (2026-07-09) — "라우팅 매 프롬프트마다 변경되는지, route why 의도대로 동작하는지 검증하고 배포할게있는지 확인해줘" — 2 parallel subagents live-verified per-prompt routing + `/route why` (including the previously-only-unit-tested post-call equivalent-model fallback path, now reproduced against a real mock 500-error server) and audited a disconnected `RouteHistory` class shipped as incomplete scaffolding in 0.8.16/0.8.17 (class + 11 tests existed, but nothing ever called it — no `/route history` subcommand, no wiring into the turn loop). Live testing also surfaced one real bug: the TUI footer's model/provider label never updated after a mid-turn fallback, staying on the pre-fallback model for the rest of that turn's render even though the backend decision (`lastRouteDecision`) was already correct.
|
|
268
269
|
- **[0.8.17]** (2026-07-09) — "서브에이전트 이용해. 병렬루 부가 나머지모두 개선하고 검증후 배포까지하자" — a prior 4-way parallel subagent cross-verification pass found the README `[!CAUTION]` routing-lock block (added this session for "프롬프트 라우팅이 한번 정해지면 안바뀌는데?") was directionally correct but had 2 real inaccuracies, plus a concrete test-coverage gap: every existing pin/override regression test drove the lock via the `--model` CLI startup flag, never via typing `/model <name>` as an interactive slash command mid-session, and none proved persistence across 3+ consecutive turns.
|
|
269
270
|
- **[0.8.16]** (2026-07-09) — "jeo code의 computer use 기능은 / 명령어로 설정할수있도록하고, 실동작검증까지진행해줘" — the desktop-automation `computer` tool was only togglable by hand-editing `computer.enabled` in `~/.jeo/config.json`; there was no in-session way to enable it for a single run without leaving a permanent config change behind.
|
|
270
271
|
- **[0.8.15]** (2026-07-09) — "api 인증 모델도 사용가능하도록 딥리서치하고 개선해줘" — traced the API-authenticated GPT path to a routing catalog gap: `GET /models` with an OpenAI API key or an OpenAI-compatible provider returned real account-scoped model ids, and `/model` could show/pin them, but prompt routing still built its auto-select pools from static `MODEL_CATALOG` rows only. A custom `openaiBaseUrl` made this worse by treating every public OpenAI row as servable, so routing could choose `gpt-*`/`o*` ids that the configured local/Azure/proxy endpoint never listed.
|
|
271
272
|
- **[0.8.14]** (2026-07-09) — "GPT 연결 실패가 여전히 무응답으로 끝나는 케이스를 잡아줘" — traced the remaining GPT/routing failure path to post-call continuity: the route target could be credentialed and servable, but still end a turn with a recoverable terminal result such as plain `OpenAI returned no content`, rate/quota pressure, model unavailable/not found, or an invalid agent-tool response. jeo already knew the prompt tier and equivalent credentialed fallbacks, but it only applied that fallback before the model call. After the call failed, the turn stopped instead of trying another model in the same tier.
|
|
272
|
-
- **[0.8.13]** (2026-07-09) — "테스트검증 jeo --tmux 로 진행해줘" — traced a routing recovery weakness that survived the earlier credential, servability, and local reachability vetoes: once a configured route target was rejected, jeo threw away the whole routing decision and dropped to the session/default model even when the same prompt tier had another credentialed, servable model available. That kept turns working, but it also silently undid routing's cost/latency goal and made `/route why` less useful because the recorded decision was a fallback note instead of the actual model used.
|
|
273
273
|
|
|
274
274
|
See [CHANGELOG.md](CHANGELOG.md) for the full history.
|
|
275
275
|
<!-- CHANGELOG:END -->
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `/route` slash-command handler extracted from launch.ts.
|
|
3
3
|
*
|
|
4
|
-
* Handles `/route [status|on|off|why]` (default/`status`: report the
|
|
5
|
-
* session routing state + the last decision, if any; `on`/`off`:
|
|
6
|
-
* SESSION-LOCAL override of `config.routing.enabled`; `why`: explain
|
|
7
|
-
* routing decision in detail
|
|
8
|
-
* (
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
4
|
+
* Handles `/route [status|on|off|why|history]` (default/`status`: report the
|
|
5
|
+
* effective session routing state + the last decision, if any; `on`/`off`:
|
|
6
|
+
* toggle a SESSION-LOCAL override of `config.routing.enabled`; `why`: explain
|
|
7
|
+
* the last routing decision in detail; `history [n]`: print the last `n`
|
|
8
|
+
* (default 10) recorded decisions, one per line). This block shares mutable
|
|
9
|
+
* REPL state (`sessionRouteOverride`, `lastRouteDecision`, `routeHistory`)
|
|
10
|
+
* with `runTurn`'s own routing insertion, so the caller passes the current
|
|
11
|
+
* values in via an explicit context object and reads back a result object
|
|
12
|
+
* instead of this function closing over REPL state directly.
|
|
12
13
|
*
|
|
13
14
|
* Session-level toggle only — `sessionRouteOverride` is never persisted to
|
|
14
15
|
* `~/.jeo/config.json` (mirrors `/thinking` being session-only vs. `/model
|
|
@@ -17,6 +18,7 @@
|
|
|
17
18
|
*/
|
|
18
19
|
|
|
19
20
|
import type { RouteDecision } from "../../agent/prompt-router";
|
|
21
|
+
import type { RouteHistoryEntry } from "../../agent/route-history";
|
|
20
22
|
|
|
21
23
|
export interface RouteSlashCtx {
|
|
22
24
|
sessionRouteOverride: boolean | undefined;
|
|
@@ -28,9 +30,13 @@ export interface RouteSlashCtx {
|
|
|
28
30
|
* never changes routing's actual gating logic (`!sessionModel` in launch.ts's
|
|
29
31
|
* `runTurn` stays the single source of truth for whether routing engages). */
|
|
30
32
|
pinnedModel?: string;
|
|
33
|
+
/** Chronological (oldest-first) snapshot of this session's `RouteHistory`
|
|
34
|
+
* (`routeHistory.getAll()`), read fresh by the caller for `/route history`. */
|
|
35
|
+
routeHistory: RouteHistoryEntry[];
|
|
31
36
|
}
|
|
32
37
|
|
|
33
38
|
|
|
39
|
+
|
|
34
40
|
export interface RouteSlashResult {
|
|
35
41
|
/** Present only when changed by "on"/"off". */
|
|
36
42
|
sessionRouteOverride?: boolean | undefined;
|
|
@@ -38,7 +44,7 @@ export interface RouteSlashResult {
|
|
|
38
44
|
lines: string[];
|
|
39
45
|
}
|
|
40
46
|
|
|
41
|
-
const USAGE = "Usage: /route [status|on|off|why]";
|
|
47
|
+
const USAGE = "Usage: /route [status|on|off|why|history [n]]";
|
|
42
48
|
|
|
43
49
|
function isRealDecision(decision: RouteDecision | { note: string } | null): decision is RouteDecision {
|
|
44
50
|
return !!decision && "model" in decision;
|
|
@@ -61,13 +67,25 @@ function explainDecision(decision: RouteDecision | { note: string } | null): str
|
|
|
61
67
|
}
|
|
62
68
|
|
|
63
69
|
/**
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
70
|
+
* Format the last `n` history entries (default 10) as one line each:
|
|
71
|
+
* `turn N: tier -> model (source, confidence X.XX)`, oldest of the selected
|
|
72
|
+
* window first — matches `getAll()`'s chronological ordering.
|
|
73
|
+
*/
|
|
74
|
+
function formatHistory(entries: RouteHistoryEntry[], n: number): string[] {
|
|
75
|
+
if (entries.length === 0) return ["No routing decisions recorded yet this session."];
|
|
76
|
+
const selected = n > 0 ? entries.slice(Math.max(0, entries.length - n)) : [];
|
|
77
|
+
if (selected.length === 0) return ["No routing decisions recorded yet this session."];
|
|
78
|
+
return selected.map((e) => `turn ${e.turnNumber}: ${e.tier} -> ${e.model} (${e.source}, confidence ${e.confidence.toFixed(2)})`);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Handle `/route [status|on|off|why|history]`. Extracted for the same reason
|
|
83
|
+
* as `/model`: shares REPL-local routing state with `runTurn` via an
|
|
84
|
+
* explicit ctx/result object rather than closing over it.
|
|
67
85
|
*/
|
|
68
86
|
export function runRouteSlash(input: string, ctx: RouteSlashCtx): RouteSlashResult {
|
|
69
87
|
const rest = input.slice("/route".length).trim();
|
|
70
|
-
const [sub] = rest.split(/\s+/).filter(Boolean);
|
|
88
|
+
const [sub, arg] = rest.split(/\s+/).filter(Boolean);
|
|
71
89
|
const effective = ctx.sessionRouteOverride ?? ctx.routingConfigEnabled;
|
|
72
90
|
|
|
73
91
|
if (!sub || sub === "status") {
|
|
@@ -102,5 +120,15 @@ export function runRouteSlash(input: string, ctx: RouteSlashCtx): RouteSlashResu
|
|
|
102
120
|
return { lines: explainDecision(ctx.lastRouteDecision) };
|
|
103
121
|
}
|
|
104
122
|
|
|
123
|
+
if (sub === "history") {
|
|
124
|
+
// Only a finite POSITIVE count selects a window; 0, negatives, and
|
|
125
|
+
// non-numeric args (`bogus`) all fall back to the default 10 rather than
|
|
126
|
+
// silently printing the empty-history message when decisions actually
|
|
127
|
+
// exist (that message must mean "nothing recorded", never "you asked for 0").
|
|
128
|
+
const parsed = arg !== undefined ? Number.parseInt(arg, 10) : 10;
|
|
129
|
+
const n = Number.isFinite(parsed) && parsed > 0 ? parsed : 10;
|
|
130
|
+
return { lines: formatHistory(ctx.routeHistory, n) };
|
|
131
|
+
}
|
|
132
|
+
|
|
105
133
|
return { lines: [`Unknown /route subcommand: ${sub}`, USAGE] };
|
|
106
134
|
}
|
package/src/commands/launch.ts
CHANGED
|
@@ -52,6 +52,7 @@ import { describeModel, describeAllProviders, describeProvider, resolveProvider,
|
|
|
52
52
|
import type { ProviderModelsResult, PickEntry, ProviderName, ModelRole, ThinkLevel } from "../ai";
|
|
53
53
|
import { readGoalState, writeGoalState, clearGoalState, verifyGoal } from "../agent/goal-verifier";
|
|
54
54
|
import { routePrompt, deriveCacheSessionKey, warnOnce, tierModelPool, selectFromPool, PROMPT_TIERS, withRoutingTierSetting, inferTierForModel, type PromptTier, type RouteDecision } from "../agent/prompt-router";
|
|
55
|
+
import { RouteHistory } from "../agent/route-history";
|
|
55
56
|
|
|
56
57
|
import { isRateLimitError, isUsageLimitError, isConnectionError } from "../util/retry";
|
|
57
58
|
|
|
@@ -659,6 +660,10 @@ export async function runLaunchCommand(args: string[]): Promise<void> {
|
|
|
659
660
|
let sessionRouteOverride: boolean | undefined;
|
|
660
661
|
// Last routing decision (or the reason none applied) — /route why reads this.
|
|
661
662
|
let lastRouteDecision: RouteDecision | { note: string } | null = null;
|
|
663
|
+
// Bounded FIFO of this session's routing decisions — /route history reads this.
|
|
664
|
+
// Same lifecycle scope as `lastRouteDecision`: one instance per REPL session,
|
|
665
|
+
// never persisted to config.
|
|
666
|
+
const routeHistory = new RouteHistory();
|
|
662
667
|
// Computer-use session override: undefined = follow config.computer.enabled, true/false = /computer on|off wins this session.
|
|
663
668
|
let sessionComputerOverride: boolean | undefined;
|
|
664
669
|
|
|
@@ -1025,6 +1030,10 @@ export async function runLaunchCommand(args: string[]): Promise<void> {
|
|
|
1025
1030
|
}
|
|
1026
1031
|
}
|
|
1027
1032
|
lastRouteDecision = routed ?? (routeVetoNote ? { note: routeVetoNote } : routingEnabled && (routeOverridesPin || !sessionModel) ? { note: "routing produced no decision (fail-open)" } : { note: "routing not active this turn" });
|
|
1033
|
+
// Only a REAL decision (not a `{note}` placeholder) is worth recording —
|
|
1034
|
+
// `/route history` exists to show what actually routed, not every turn's
|
|
1035
|
+
// gating outcome.
|
|
1036
|
+
if (routed) routeHistory.add(routed);
|
|
1028
1037
|
// Explicit /model always wins UNLESS an explicit `/route on` this session opted
|
|
1029
1038
|
// back into per-prompt routing (`routeOverridesPin`); otherwise `routed` is only
|
|
1030
1039
|
// ever computed when `!sessionModel`.
|
|
@@ -1465,9 +1474,19 @@ export async function runLaunchCommand(args: string[]): Promise<void> {
|
|
|
1465
1474
|
contextTokens = catalogMetadata(activeModel)?.contextTokens;
|
|
1466
1475
|
fallbackBaseDecision = { ...fallbackBaseDecision, model: activeModel };
|
|
1467
1476
|
lastRouteDecision = { ...fallbackBaseDecision, warning: `model '${previousModel}' ${routedFailureReason}; switched to equivalent '${activeModel}'` };
|
|
1477
|
+
// Post-call fallback: the pre-call `routed` pick (already recorded above,
|
|
1478
|
+
// if any) got superseded mid-turn — record the decision that ACTUALLY
|
|
1479
|
+
// served the turn so `/route history`/`why` reflect reality, not a
|
|
1480
|
+
// since-abandoned pre-call guess.
|
|
1481
|
+
routeHistory.add(lastRouteDecision);
|
|
1468
1482
|
const notice = `[route] model '${previousModel}' ${routedFailureReason}; switching to equivalent '${activeModel}' for this turn.`;
|
|
1469
|
-
if (tui)
|
|
1470
|
-
|
|
1483
|
+
if (tui) {
|
|
1484
|
+
const { provider: fallbackProvider } = await describeModel(activeModel, turnConfig);
|
|
1485
|
+
tui.events().onModelSwitch?.(activeModel, fallbackProvider);
|
|
1486
|
+
tui.events().onNotice?.(notice);
|
|
1487
|
+
} else {
|
|
1488
|
+
console.log(notice);
|
|
1489
|
+
}
|
|
1471
1490
|
result = await runLoopWithModel(activeModel, activeThinking, turnSessionKey);
|
|
1472
1491
|
}
|
|
1473
1492
|
|
|
@@ -4435,6 +4454,7 @@ export async function runLaunchCommand(args: string[]): Promise<void> {
|
|
|
4435
4454
|
routingConfigEnabled: !!cfgNow.routing?.enabled,
|
|
4436
4455
|
lastRouteDecision,
|
|
4437
4456
|
pinnedModel: sessionModel,
|
|
4457
|
+
routeHistory: routeHistory.getAll(),
|
|
4438
4458
|
});
|
|
4439
4459
|
if (routeResult.sessionRouteOverride !== undefined) sessionRouteOverride = routeResult.sessionRouteOverride;
|
|
4440
4460
|
for (const line of routeResult.lines) console.log(line);
|
package/src/tui/app.ts
CHANGED
|
@@ -92,6 +92,13 @@ export interface AgentEventsLike {
|
|
|
92
92
|
* item). The TUI ignores these; launch.ts uses them to persist the final reply's artifacts. */
|
|
93
93
|
onReasoningArtifactStream?(artifact: import("../ai/types").ReasoningArtifact): void;
|
|
94
94
|
onBudget?(limit: number, reason: string): void;
|
|
95
|
+
/** Fired when the active model changes mid-turn (post-call equivalent-pool fallback,
|
|
96
|
+
* launch.ts's `routeFallbackAttempt` loop) — updates the footer's model/provider
|
|
97
|
+
* label so the status bar reflects the model that actually serves the REST of the
|
|
98
|
+
* turn, instead of staying stuck on the pre-fallback model for the remainder of the
|
|
99
|
+
* render (the backend `lastRouteDecision`/`routeHistory` were already correct; only
|
|
100
|
+
* this footer label lagged). */
|
|
101
|
+
onModelSwitch?(model: string, provider?: string): void;
|
|
95
102
|
|
|
96
103
|
}
|
|
97
104
|
|
|
@@ -696,6 +703,17 @@ export class LaunchTui {
|
|
|
696
703
|
this.appendLedger(dim(`${mark} ${reason}`) + "\n", "notice");
|
|
697
704
|
this.draw();
|
|
698
705
|
},
|
|
706
|
+
onModelSwitch: (model: string, provider?: string) => {
|
|
707
|
+
// Mid-turn equivalent-pool fallback: the footer's model/provider label was
|
|
708
|
+
// frozen at construction time otherwise, so a post-call reroute (the model
|
|
709
|
+
// that ACTUALLY produces the rest of the reply) never showed in the status
|
|
710
|
+
// bar for the remainder of the turn — even though lastRouteDecision/
|
|
711
|
+
// routeHistory were already correct. Mutate the SAME footer object the
|
|
712
|
+
// render loop reads every frame; no separate re-render path needed.
|
|
713
|
+
this.footer.model = model;
|
|
714
|
+
this.footer.provider = provider;
|
|
715
|
+
this.draw();
|
|
716
|
+
},
|
|
699
717
|
onUsage: (u: { inputTokens: number; outputTokens: number }) => {
|
|
700
718
|
// Live cumulative token usage for the turn — shown in the final summary
|
|
701
719
|
// (and available to the footer meter).
|
|
@@ -43,7 +43,7 @@ export const SLASH_COMMAND_DETAILS: readonly SlashCommandInfo[] = [
|
|
|
43
43
|
{ command: "/logout", usage: "/logout <anthropic|openai|gemini|antigravity>", description: "Remove the stored OAuth token for a provider", group: "models" },
|
|
44
44
|
{ command: "/roles", usage: "/roles [tier model]", description: "Show or set model role tiers (smol/slow/plan)", group: "models" },
|
|
45
45
|
{ command: "/thinking", usage: "/thinking [level]", description: "Show or set thinking budget (low/medium/high/xhigh)", group: "models" },
|
|
46
|
-
{ command: "/route", usage: "/route [on|off|why]", description: "Show/toggle prompt-based model routing for this session,
|
|
46
|
+
{ command: "/route", usage: "/route [on|off|why|history [n]]", description: "Show/toggle prompt-based model routing for this session, explain the last routing decision, or list recent routing history", group: "models" },
|
|
47
47
|
{ command: "/agents", usage: "/agents [edit|role] [model|#N|thinking L|maxSteps N|reset]", description: "List subagent roles; use /agents edit for the interactive picker or pin role model/settings", group: "subagents" },
|
|
48
48
|
{ command: "/subagent", usage: "/subagent [role]", description: "Show the current subagent composition (per-role model · thinking · steps); alias of /agents", group: "subagents" },
|
|
49
49
|
{ command: "/view", usage: "/view <file> [a-b]", description: "Render a file with line numbers + light highlight", group: "code" },
|