Commit Graph

2288 Commits

Author SHA1 Message Date
Hunter Bown 6d27bcaf2c Merge pull request #2795 from Hmbown/codex/harvest-2792-auth-context
fix(tui): enrich auth errors with request context
2026-06-05 08:17:20 -07:00
Matt Van Horn 0b0d815fab fix(tui): enrich auth errors with request context
Harvested from PR #2792 by @mvanhorn.

Reported by @Hmbown in #2665.
2026-06-05 08:16:16 -07:00
Hunter Bown 8dbe0357d0 Merge pull request #2794 from Hmbown/codex/harvest-2789-open-external-url-cfg
fix(tui): expose external URL opener on unsupported targets
2026-06-05 08:07:54 -07:00
Hunter B 5d9f93af4d fix(tui): expose external URL opener on unsupported targets
Harvested from PR #2789 by @ci4ic4.

Found while packaging CodeWhale 0.8.53 for pkgsrc on NetBSD.

Co-authored-by: ci4ic4 <6495973+ci4ic4@users.noreply.github.com>
2026-06-05 08:07:01 -07:00
Hunter Bown 786e5fe01e Merge pull request #2793 from Hmbown/codex/fix-provider-chain-env-test
test(config): isolate provider chain runtime resolution
2026-06-05 08:03:15 -07:00
Hunter B 2e49b14655 test(config): isolate provider chain runtime resolution 2026-06-05 08:02:41 -07:00
Hunter Bown 1d50ed9796 Merge pull request #2779 from Hmbown/codex/harvest-2777-fallback-chain-data
feat(config): add dormant provider fallback chain
2026-06-04 21:33:24 -07:00
Hunter B 93d08a8f61 feat(config): add dormant provider fallback chain
Harvested from PR #2777 by @idling11.

Reported by @hsdbeebou in #2574.

Co-authored-by: idling11 <8055620+idling11@users.noreply.github.com>
2026-06-04 21:32:25 -07:00
Hunter Bown 3ca89255f1 Merge pull request #2778 from Hmbown/codex/harvest-2507-stream-timeout
feat(tui): expose stream chunk timeout config
2026-06-04 21:23:29 -07:00
Hunter B e5fe46db4f feat(tui): expose stream chunk timeout config
Harvested from PR #2507 by @cyq1017.

Reported by @mserrano11 in #2365.

Co-authored-by: cyq1017 <61975706+cyq1017@users.noreply.github.com>
2026-06-04 21:22:15 -07:00
Hunter Bown 0b07b8189c Merge pull request #2776 from Hmbown/codex/harden-path-suffix-project-config
fix(config): keep path suffix out of project overrides
2026-06-04 21:04:23 -07:00
Hunter Bown bf0a3bc462 Merge pull request #2775 from Hmbown/codex/remove-v090-execution-map
docs: drop internal v0.9 execution map
2026-06-04 21:04:07 -07:00
Hunter B cba5537b84 fix(config): keep path suffix out of project overrides 2026-06-04 21:03:41 -07:00
Hunter B b000096cd0 docs: drop internal v0.9 execution map 2026-06-04 21:01:49 -07:00
Hunter Bown b1d4d74a10 Merge pull request #2774 from Hmbown/codex/harvest-2744-mcp-display
fix(mcp): #2744 preserve underscored names in displays
2026-06-04 20:56:37 -07:00
Hunter B 8869f6a722 fix(mcp): #2744 preserve underscored names in displays
Follow up the #2744 MCP routing harvest by reusing the registered-server parser in the runtime API tool listing path and by making approval summaries show the full MCP target route instead of a guessed first underscore segment.

This keeps tool-call routing, runtime metadata, and approval copy aligned for servers such as my_db while avoiding an impossible server-only guess in approval cards that do not have the live MCP registry.

Refs #2744

Verification: cargo fmt --all -- --check; git diff --check; ./scripts/release/check-versions.sh; cargo test -p codewhale-tui --bin codewhale-tui --locked underscored -- --nocapture; cargo test -p codewhale-tui --bin codewhale-tui --locked mcp_pool_call_tool -- --nocapture; cargo clippy -p codewhale-tui --bin codewhale-tui --locked -- -D warnings.

Co-authored-by: cyq1017 <61975706+cyq1017@users.noreply.github.com>

Co-authored-by: puneetdixit200 <236133619+puneetdixit200@users.noreply.github.com>
2026-06-04 20:55:53 -07:00
Hunter Bown 68fb6e3b9d Merge pull request #2772 from Hmbown/codex/harvest-2742-ollama-completions
fix(tui): #2742 avoid static Ollama model suggestions
2026-06-04 20:50:37 -07:00
Hunter B 912d6aed2c fix(tui): #2742 avoid static Ollama model suggestions
Harvested from PR #2742 by @reidliu41

Ollama model IDs are local passthrough tags, so /model static completions should not suggest hosted DeepSeek API models or entrench the stale default local tag. Keep the picker on auto/current/saved local models while the existing /models path fetches installed tags from the configured endpoint.

Verification: cargo fmt --all -- --check; git diff --check; ./scripts/release/check-versions.sh; cargo test -p codewhale-tui --bin codewhale-tui --locked ollama -- --nocapture; cargo clippy -p codewhale-tui --bin codewhale-tui --locked -- -D warnings.

Co-authored-by: reidliu41 <61492567+reidliu41@users.noreply.github.com>
2026-06-04 20:49:54 -07:00
Hunter Bown f483544e6f Merge pull request #2771 from Hmbown/codex/harvest-2759-init-polish
feat(init): harvest LLM-guided AGENTS.md init
2026-06-04 20:40:36 -07:00
HUQIANTAO b527bd507a feat(init): harvest LLM-guided AGENTS.md init
Replace the static AGENTS.md template with a context-gathering /init flow that delegates customized project-guide generation to the agent. Keep the successor PR polish for credential-safe git remotes, devDependency framework detection, workspace Cargo context, and dead untracked-counter cleanup.

This harvest also finishes the maintainer review items by preserving SSH remotes, handling nested git workspaces, sorting collected context deterministically, and detecting SvelteKit via @sveltejs/kit.

Harvested from PR #2759 by @HUQIANTAO

Includes original /init implementation from PR #2745 by @punkcanyang

Co-authored-by: HUQIANTAO <58421104+HUQIANTAO@users.noreply.github.com>

Co-authored-by: Punkcan Yang <36871858+punkcanyang@users.noreply.github.com>
2026-06-04 20:39:48 -07:00
Hunter Bown 95e24194ee Merge pull request #2770 from Hmbown/codex/harvest-2751-workspace-mcp-config
fix(mcp): harvest trusted workspace MCP config
2026-06-04 20:32:13 -07:00
cyq1017 c36e4d7d20 fix(mcp): harvest trusted workspace MCP config
Merge global MCP config with trusted workspace .codewhale/mcp.json files so project MCP servers appear in TUI, CLI, doctor, and runtime API flows. Project stdio servers default cwd to the workspace, project cwd escapes are rejected, and project MCP is ignored until workspace trust is recorded in user-owned config.

Fixes #2749

Reported by @yekern

Harvested from PR #2751 by @cyq1017
2026-06-04 20:31:26 -07:00
Hunter Bown 499ec42c5d Merge pull request #2769 from Hmbown/codex/harvest-2755-provider-auth-rollback
fix(tui): harvest provider auth rollback
2026-06-04 20:16:17 -07:00
cyq1017 54f7556359 fix(tui): harvest provider auth rollback
Fixes #2754

Reported by @Dr3259.

Harvested from PR #2755 by @cyq1017.

Adds maintainer verification for persisted provider/model settings after rollback.

Co-authored-by: cyq1017 <61975706+cyq1017@users.noreply.github.com>
2026-06-04 20:15:25 -07:00
Hunter Bown 4b61462eda Merge pull request #2768 from Hmbown/codex/harvest-2512-completion-sound-file
feat(tui): harvest custom completion sound files
2026-06-04 19:57:58 -07:00
Hunter B 91215d5f4f feat(tui): harvest custom completion sound files
Add completion_sound = "file" with [notifications].sound_file for Windows custom WAV completion sounds without changing the global Windows sound scheme.

The Windows path uses PlaySoundW asynchronously with no default fallback. Non-Windows file mode warns and no-ops, missing paths warn once, and setting a valid path resets the missing-path warning latch so later misconfiguration is visible again.

Fixes #2484

Reported by @LHqweasd

Harvested from PR #2512 by @cyq1017

Co-authored-by: cyq1017 <61975706+cyq1017@users.noreply.github.com>
2026-06-04 19:56:51 -07:00
Hunter Bown 8cbdf95af9 Merge pull request #2767 from Hmbown/codex/harvest-2510-search-base-url
feat(search): harvest custom DuckDuckGo endpoint
2026-06-04 19:49:33 -07:00
Hunter B 933637bb1c feat(search): harvest custom duckduckgo endpoint
Add optional [search].base_url support for DuckDuckGo-compatible private search endpoints, including a preferred CODEWHALE_SEARCH_BASE_URL env override and the legacy DEEPSEEK_SEARCH_BASE_URL alias.

Network policy now gates the configured endpoint host, custom endpoints do not fall back to public Bing, non-DuckDuckGo provider/base_url combinations and challenge pages return explicit errors, and custom endpoint results report the configured host as their source.

Fixes #2436

Reported by @Artenx

Harvested from PR #2510 by @cyq1017

Co-authored-by: cyq1017 <61975706+cyq1017@users.noreply.github.com>
2026-06-04 19:48:45 -07:00
Hunter Bown 7919338a04 Merge pull request #2765 from Hmbown/codex/harvest-2528-shell-test-wait
test(shell): #2528 widen background completion wait
2026-06-04 19:35:38 -07:00
Hunter B cbb1142497 test(shell): #2528 widen background completion wait
Widen the focused background-shell completion wait used by shell tests so slow Windows runners do not leave lightweight background commands reported as Running before assertions fire.

Refs #2525

Refs #2526

Harvested from PR #2528 by @cyq1017

Co-authored-by: cyq1017 <61975706+cyq1017@users.noreply.github.com>
2026-06-04 19:34:52 -07:00
Hunter Bown c00d5aa526 Merge pull request #2764 from Hmbown/codex/fix-windows-shellchild-kill-dead-code
fix(tui): gate shell child kill helper off Windows
2026-06-04 19:31:22 -07:00
Hunter B 494c8a5351 fix(tui): gate shell child kill helper off Windows 2026-06-04 19:30:38 -07:00
Hunter Bown b3bdd6ecfc Merge pull request #2763 from Hmbown/codex/fix-live-branch-status-refresh
fix(tui): refresh branch status after shell changes
2026-06-04 19:27:16 -07:00
Hunter B 1e54be0620 fix(tui): refresh branch status after shell changes 2026-06-04 19:26:26 -07:00
Hunter B 28d6b10769 docs(v0.9): record runtime and legacy harvest closures
Update the execution map after closing harvested or superseded PRs #2476, #2498, #2502, #2513, #2530, #2576, #2581, #2636, #2639, #2640, #2708, and #2730, and refresh the live PR count.
2026-06-04 19:08:20 -07:00
Hunter B 01e5c42bd8 docs(v0.9): record plan and tool harvest closures
Update the execution map after closing harvested or superseded PRs #2733, #2734, #2736, #2737, #2740, and #2741, and refresh the live PR count.
2026-06-04 19:04:26 -07:00
Hunter B 1f703bafb3 docs(v0.9): record recent harvest closures
Update the execution map after closing harvested/superseded PRs #2746, #2747, #2750, #2756, #2757, and #2760, and refresh the live PR count.
2026-06-04 19:01:37 -07:00
Hunter Bown 32be8a3310 Merge pull request #2761 from Hmbown/codex/harvest-2760-session-resume-footer
fix(tui): #2760 correct sessions resume footer
2026-06-04 18:58:38 -07:00
Hunter B 47577d59e9 fix(tui): #2760 correct sessions resume footer
Harvested from PR #2760 by @sximelon

Fixes #2758

Show the canonical 'codewhale resume <session-id>' subcommand in the sessions footer instead of the invalid dispatcher form, and add a parser/footer regression test tying the hint to the actual Resume command.

Verification: cargo fmt --all -- --check; git diff --check; ./scripts/release/check-versions.sh; cargo test -p codewhale-tui --bin codewhale-tui --locked sessions_footer_points_to_resume_subcommand -- --nocapture; cargo clippy -p codewhale-tui --bin codewhale-tui --locked -- -D warnings.

Co-authored-by: sximelon <15710511+sximelon@users.noreply.github.com>
2026-06-04 18:56:25 -07:00
Hunter B de86cc1860 fix(tui): install rustls provider before HTTP clients
Install the ring rustls provider through a shared TUI helper and route reqwest client construction through it so no-provider TLS builds do not panic in engine, runtime API, tool, MCP, config, and test paths.

Keep the skill-installer integration include compatible with a local helper, and pin prompt byte-stability tests to an isolated home/skills environment under the shared env lock.

Verification: cargo fmt --all -- --check; git diff --check; ./scripts/release/check-versions.sh; cargo clippy --workspace --all-features --locked -- -D warnings; cargo test --workspace --all-features --locked; focused skill_install, finance, goal-tool, and MCP reruns.
2026-06-04 18:50:20 -07:00
Hunter B 70adeeeae6 docs(v0.9): record #2746/#2747, #2750, #2756, #2757 harvests and #2742/#2751/#2755 dispositions
Log the new community-PR harvests in CHANGELOG.md and crates/tui/CHANGELOG.md
(MCP underscore server names, Xiaomi MiMo pricing, hydrated deferred-tool
render, Token Plan region docs) with contributor credit, and update
docs/V0_9_0_EXECUTION_MAP.md with evidence-backed dispositions for the
newly-reviewed PRs, including the deferred #2742 and forwarded #2751/#2755.
2026-06-04 18:28:40 -07:00
Hunter B 74b3268521 fix(tui): render hydrated deferred-tool results as loaded, not run done
When a deferred tool is used for the first time, the engine returns a
schema-hydration result (event tool.schema_hydrated, executed=false,
retry_required=true) instead of executing the tool. The transcript and sidebar
previously rendered this as a completed run ("run done"), which was
indistinguishable from a real successful execution and misled both the user and
the model. Hydrated results now render as "tool loaded - retry required" via a
dedicated ToolStatus::Hydrated, threaded through tool routing, history, sidebar,
and theme. A successful real execution still renders as run done, a failed tool
with hydration metadata stays Failed.

Local correction on top of the PR: a hydrated row ranks with active work
(ToolStatus::Running) in the sidebar rather than alongside completed successes,
matching the "not run done" intent. The contributor's hydration detection and
missing-metadata handling are kept as-is (the sole emitter always sets
executed=false, consistent with the engine's own check).

Harvested from PR #2757 by @mvanhorn. Fixes #2648.

Co-authored-by: mvanhorn <455140+mvanhorn@users.noreply.github.com>
2026-06-04 18:26:37 -07:00
Hunter B 9d13960603 feat(pricing): price Xiaomi MiMo primary models at matching DeepSeek V4 rates
Add cost-estimate pricing for the Xiaomi MiMo chat models that were previously
unpriced: mimo-v2.5-pro / xiaomi/mimo-v2.5-pro reuse the DeepSeek V4-Pro rate
table, and mimo-v2.5 / xiaomi/mimo-v2.5 reuse the DeepSeek V4-Flash rates. The
DeepSeek V4 pro/flash rate tables are extracted into deepseek_v4_pro_pricing()
and deepseek_v4_flash_pricing() helpers so the MiMo aliases stay aligned with
DeepSeek. Existing DeepSeek pricing behavior is unchanged (deepseek + non-v4pro
still maps to Flash), and unrelated models still return None.

Harvested from PR #2750 by @cyq1017. Fixes #2731.

Co-authored-by: cyq1017 <61975706+cyq1017@users.noreply.github.com>
2026-06-04 18:23:49 -07:00
Hunter B 9e29c221b9 fix(mcp): preserve underscored MCP server names in tool routing
parse_prefixed_name now matches the qualified mcp_<server>_<tool> name against
the set of registered server names (connections + configured servers) and
prefers the longest matching server name, instead of naively splitting on the
first underscore. Tools on servers whose names contain underscores (e.g.
"my_db") are now reachable, and an overlapping pair like "my" and "my_db"
routes to the correct server. Falls back to the legacy first-underscore split
when no registered server matches, preserving backward compatibility.

Harvested from PR #2747 by @cyq1017; supersedes the equivalent fix in PR #2746
by @puneetdixit200. Both contributors diagnosed and fixed issue #2744; #2747
landed for its longest-match tie-break test coverage. Fixes #2744.

Co-authored-by: cyq1017 <61975706+cyq1017@users.noreply.github.com>
Co-authored-by: puneetdixit200 <236133619+puneetdixit200@users.noreply.github.com>
2026-06-04 18:23:02 -07:00
Hunter B 960bdc91c7 docs(providers): document Xiaomi MiMo Token Plan region endpoints
Clarify that xiaomi-mimo Token Plan keys (tp-...) default to the Singapore
endpoint https://token-plan-sgp.xiaomimimo.com/v1, that pay-as-you-go keys use
https://api.xiaomimimo.com/v1, and that China-region Token Plan accounts must
set base_url = https://token-plan-cn.xiaomimimo.com/v1 explicitly. Also note
that a generic [vision_model] OpenAI-compatible block does not auto-select MiMo
endpoints. Matches the branch resolve_xiaomi_mimo_base_url behavior.

Harvested from PR #2756 by @xyuai. Fixes #2735.

Co-authored-by: xyuai <281015099+xyuai@users.noreply.github.com>
2026-06-04 18:21:49 -07:00
Hunter B 15b129ca38 docs: clarify v0.9 README release status
Adds a near-top release-status boundary so v0.9 integration work is not mistaken for a published artifact, and expands the v0.9 track table with sub-agent recovery and HarnessProfile limits.

The wording keeps release-channel verification and maintainer approval boundaries explicit while preserving the existing DeepSeek-first and contributor-stewardship framing.
2026-06-04 00:18:38 -07:00
Hunter B 56f8044cf3 feat(tui): show focused approval details
Harvested the narrow approval-detail and shell-preview slice from #1991/#2269 by @tdccccc. Approval cards now show prominent command, dir, file, path, or target rows before falling back to raw params, and shell approvals preserve long command tails while splitting common shell chains for review.

The maintained path keeps the existing #2381 intent-summary block visible and does not take the broader diff-preview/pager rewrite from #2269. Live shell companion tools are classified as shell so their approval cards use the same review posture.

Co-authored-by: tdccccc <79492752+tdccccc@users.noreply.github.com>
2026-06-04 00:17:39 -07:00
Hunter B 0d66ef34d1 feat(hooks): add turn_end observer hook
Harvested the narrow Rust/docs slice of PR #2578 by @AresNing for #1364. The event uses the maintained structured observer path: JSON stdin, stdout ignored, warn-only failures, and no ability to block or mutate the turn.

The hook fires after post-turn app state, usage totals, cost, notification, receipt, and queue-recovery state are updated, before queued follow-up dispatch. Docs, RFC notes, /hooks discovery, and v0.9 tracking now describe the observer-only contract.

Co-authored-by: AresNing <49557311+AresNing@users.noreply.github.com>
2026-06-04 00:09:01 -07:00
Hunter B 586640a437 feat(config): add typed harness posture profiles
Harvested from PR #2741 by @idling11 for #2693, with review fixes folded in: typed compaction/tool/safety enums, no silent unknown-kind fallback, unknown profile keys rejected, and whole-struct equality for future reload/runtime checks.

Co-authored-by: idling11 <8055620+idling11@users.noreply.github.com>
2026-06-04 00:00:22 -07:00
Hunter B 13cabac077 docs(config): clarify provider path suffix support
Records that #2506/#2508 are superseded by the safer #2558 path_suffix implementation, credits the original #1874 report and follow-up PR review trail, and documents that suffix overrides only affect chat completions while model and beta paths keep built-in routing.
2026-06-03 23:56:40 -07:00