Commit Graph

139 Commits

Author SHA1 Message Date
hqt 12cba233df style: fix clippy warnings and run fmt 2026-05-31 19:22:21 +08:00
Hunter Bown 8f095b882f feat(execpolicy): add typed ask rule foundation (#2404)
* feat(execpolicy): add typed ask rule foundation

* fix(execpolicy): tighten typed ask diagnostics

---------

Co-authored-by: greyfreedom <greyfreedom@163.com>
2026-05-31 01:37:15 -07:00
Lee-take 4861bb2797 Add SiliconFlow provider support
Add SiliconFlow as an additive OpenAI-compatible hosted provider across config, secrets, CLI, agent registry, TUI runtime, picker, and docs.

Credit: based in part on the SiliconFlow provider direction from #1864 by @qychen2001, extended here with broader registry, documentation, and test coverage on current main.
2026-05-31 00:00:38 -07:00
Hunter B 8bc348801c Merge remote-tracking branch 'origin/main' into pr-2281-rescue
# Conflicts:
#	crates/cli/src/lib.rs
#	crates/cli/src/update.rs
2026-05-30 23:47:09 -07:00
Hunter B 0572aff79d fix: refresh Volcengine provider registry 2026-05-30 23:30:57 -07:00
AdityaG 3f4c4496f2 feat: add Xiaomi MiMo provider
Adds native xiaomi-mimo provider configuration, auth/env aliases, model registry entries, TUI request handling, tests, and docs. Keeps credentials in existing provider-scoped config/env/keyring paths and uses placeholders only in docs.
2026-05-30 22:16:01 -07:00
reidliu41 e32bd1af6d feat(update): add check-only release diagnostics
Add `codewhale update --check` so users can compare the installed version with
  the latest release without downloading or replacing binaries.

  Surface the same release check in `codewhale doctor`, and share release lookup,
  mirror handling, timeout, and version comparison logic between update and doctor.
2026-05-30 19:18:34 -07:00
Nightt fde5959e3d feat: keep startup prompts interactive 2026-05-30 19:17:39 -07:00
Nightt b0e7b67386 style: satisfy current clippy lints 2026-05-30 19:15:28 -07:00
AccMoment 6532a38314 avoid dependency reverse
reimplement validate_and_build_proxy and add test
2026-05-27 21:54:44 +08:00
AccMoment 6dd8394dfe feat(update):Add proxy option to update command
Update docs to introduce update command proxy options
2026-05-27 20:58:48 +08:00
Hunter Bown 60c1b6619c style: rustfmt cleanups and minor formatting fixes
- Line-wrap long function signatures and format arguments
- Fix bracket placement for early returns (consistent style)
- Use [!] instead of [✓] for network-denied skill sync
- Fix copy-selection ordering: clear after success, not always
2026-05-26 16:39:28 -05:00
Hunter Bown 0706285bfe feat(update): add CNB mirror support for China-friendly binary downloads
- Add CODEWHALE_RELEASE_BASE_URL as canonical env override for release
  asset base URL (DEEPSEEK_TUI_RELEASE_BASE_URL and DEEPSEEK_RELEASE_BASE_URL
  remain as legacy fallbacks).
- Add CODEWHALE_USE_CNB_MIRROR env var to auto-select the CNB (cnb.cool)
  mirror for binary downloads, avoiding GitHub Releases timeouts in China.
- Update npm install scripts (artifacts.js) with the same env checks.
- Update Rust self-updater (update.rs) with new constants and env cascade.

Fixes #2222.
2026-05-26 14:19:26 -05:00
Hunter Bown 2ef1c3666f chore: bump release lane to 0.8.46 2026-05-26 11:52:48 -05:00
Hunter Bown 1d9917d3f2 fix: resolve compilation errors and clippy warnings from community PR merges
- config/src/lib.rs: remove undefined has_api_key variable (#2062 conflict)
- ui.rs: clone receipt before move into set_receipt_text
- footer_ui.rs: convert &str to String for if/else type consistency
- rlm.rs: use ref bindings to avoid partial moves of stdout/stderr_preview
- file.rs: prefix unused fuzz variable
- update.rs: remove redundant borrows
- tests.rs: allow print_stderr on catalog metrics test function

All clippy warnings resolved. CI should go green.
2026-05-26 10:50:16 -05:00
Ben Younes 73085e6e69 feat(cli): add thread clear-name to remove a custom thread title (1600) (#1939)
Issue 1600 asks for full rename UX: set a custom title, remove it back
to `(unnamed)`. The set side already shipped as `deepseek thread
set-name <id> <name>`, but there was no inverse — users who wanted to
drop a no-longer-relevant title had to either edit the SQLite store by
hand or set a placeholder string.

Add `deepseek thread clear-name <id>`, mirroring the existing
`SetName` arm in `run_thread_command`: look up the thread, set
`name = None`, refresh `updated_at`, upsert. Printed confirmation is
`cleared name for <id>` so it stays distinguishable from the
`renamed` line emitted by `set-name`.

Snapshot help test and the parser-matrix test both gain the new
subcommand. No state-store changes: `upsert_thread` already accepts
`name: None` and `thread list` already prints `(unnamed)` when the
field is empty, so the round-trip is complete with this CLI-only
change.

Co-authored-by: Claude <noreply@anthropic.com>
2026-05-26 10:38:31 -05:00
庄表伟 bba5617942 Improve update release channels (#2145)
* Improve update release channels

* Address update channel review feedback

* Prevent beta update downgrades
2026-05-26 10:30:58 -05:00
Sskift 2c12371257 fix(cli): avoid default env overrides for profiles (#2119)
* fix(cli): avoid default env overrides for profiles

* test(cli): lock auth mode profile handoff behavior

* test(cli): restore prompt flag coverage

---------

Co-authored-by: liushiao <liushiao@bytedance.com>
2026-05-26 10:30:36 -05:00
Hunter Bown c4e91446af test(cli): format provider env regression cases 2026-05-25 23:07:12 -05:00
Devin AI 0628adab38 test: add table-driven env-forwarding regression test for all providers
Covers Openrouter, Novita, NvidiaNim, Fireworks, Sglang, Vllm, Ollama,
Atlascloud, and WanjieArk — the providers that were silently expanded
by the generic provider_env_vars loop but had no test coverage beyond
the existing Moonshot and OpenAI cases.

Co-Authored-By: bot_apk <apk@cognition.ai>
2026-05-26 03:47:42 +00:00
Hunter Bown 05e4b08335 fix(cli): allow Moonshot Kimi TUI delegation 2026-05-25 22:06:44 -05:00
Hunter Bown 228372935e chore(release): prepare v0.8.45
Harvested from PR #2118 by @Hmbown.

Includes Kimi/Moonshot OAuth, v0.8.45 release prep, the Codex/ChatGPT OAuth removal, open-source-first model defaults, and the safe green PR batch merged into main before the release branch refresh.
2026-05-25 18:45:36 -05:00
Hunter Bown 37dd821f33 Add Kimi OAuth provider support
Adds Moonshot/Kimi provider support with Kimi CLI OAuth reuse and review fixes for secure refresh writes, model completion, CLI auth, and secret-store behavior.
2026-05-25 17:48:05 -05:00
Hunter Bown 1a311c591f chore: bump version to 0.8.44
Workspace version 0.8.43 → 0.8.44. All path dependency pins
and npm package version updated accordingly.
2026-05-24 16:22:44 -05:00
Hunter Bown 698722c946 feat(cli): --continue/-c flag forwards to TUI resume path
Other agent: root_tui_passthrough() builds forwarded args, rejects
--continue + -p combo (directs to codewhale exec --continue).
Tests: parses_top_level_continue, top_level_continue_rejects_one_shot.

Session picker: formatting cleanup on test calls.
2026-05-24 15:36:54 -05:00
Hunter Bown b46e0edebe feat(v0.8.44): add codew convenience alias binary
Permanent short-form shim — forwards silently to codewhale.
Six fewer keystrokes, no deprecation warning. Ships alongside
codewhale and the legacy deepseek alias.
2026-05-24 15:09:10 -05:00
Hunter Bown 25ce4f5970 feat(v0.8.44): SWE-bench adapter, markdown table fix, contributor sync, receipt truncation fix
- SWE-bench: codewhale swebench run/export writes prediction JSONL
  from working-tree diff, with untracked-file inclusion via git add -N
- CLI: --workspace / -C global flag forwards to TUI for file ops
- CLI: codewhale exec --auto semantics clarified in help text
- Markdown: table pipes inside inline code no longer create phantom columns
  (split_table_cells with backtick-awareness)
- Receipt: floor_char_boundary prevents multibyte UTF-8 slice panic
- Contributors: Ling (LING71671 #1839 #1911), Ben Younes (ousamabenyounes #1938),
  jeoor npm fix (#1860) credited across all 3 READMEs
- ja-JP README: 19 contributors synced to parity with EN/zh-CN (80 each)
- Docs: SWEBENCH.md, RECURSIVE_SELF_IMPROVEMENT.md, MODES.md exec clarification
- Sub-agent footer: Alt+V hint now says 'details' not 'raw'
2026-05-24 14:47:42 -05:00
dzyuan8 a96e5e45ca fix: address PR review feedback and enable cache telemetry for Volcengine
- Remove Volcengine from reasoning_effort 'off' no-auth group (HIGH)
- Add Volcengine to proper reasoning_effort handling (like DeepSeek)
- Remove 'deepseek-reasoner' alias from DeepSeek-V4-Flash (MEDIUM)
- Separate WanjieArk and Volcengine env vars in CLI (MEDIUM)
- Group config keys by provider for readability (MEDIUM)
- Use 'codewhale' instead of 'deepseek' in login hints (MEDIUM)
- Enable cache_telemetry_supported for Volcengine provider
2026-05-24 18:15:58 +08:00
dzyuan8 45b04c4444 feat: add Volcengine provider with DeepSeek-V4-Pro/Flash support
Add a new Volcengine (Volcano Engine Ark) provider for accessing
DeepSeek-V4-Pro and DeepSeek-V4-Flash via the Volcengine Coding API.

Changes:
- Add ProviderKind::Volcengine to config crate with default base_url
  pointing to Volcengine Coding API (api/coding/v3)
- Add DeepSeek-V4-Pro and DeepSeek-V4-Flash models to the agent
  model registry under Volcengine provider
- Add ApiProvider::Volcengine to TUI with full picker/dropdown support
- Wire up CLI --provider, config get/set/unset, and secrets resolution
- Add environment variable aliases: VOLCENGINE_API_KEY, ARK_API_KEY
- Ignore local dev scripts (*.cmd, backup/)
2026-05-24 17:40:35 +08:00
Hunter Bown 04d2e4af1f chore(release): sync 0.8.43 version pins
- Workspace version: 0.8.42 → 0.8.43
- All internal codewhale-* deps: 0.8.42 → 0.8.43
- npm codewhale: 0.8.42 → 0.8.43
- npm deepseek-tui shim: 0.8.42 → 0.8.43
- Crate descriptions: open-model-first positioning
- npm descriptions: open-source and open-weight language
- Cargo.lock regenerated
2026-05-24 03:12:18 -05:00
Hunter Bown 2947eff9d1 fix(ci): satisfy Rust 1.88 clippy gate 2026-05-24 01:20:19 -05:00
Hunter Bown 90a9dfbe7a fix(tui): preserve user message formatting 2026-05-23 21:11:26 -05:00
Hunter Bown 825df6a2c4 chore(release): prepare v0.8.42 2026-05-23 20:08:57 -05:00
Hunter Bown 5fa24733e9 chore(rebrand): update repository links for CodeWhale 2026-05-23 14:07:36 -05:00
Hunter Bown ddaabbfed2 chore(rebrand): finish codewhale release surfaces 2026-05-23 13:41:46 -05:00
Hunter Bown 6de8ba363f chore(release): prepare codewhale v0.8.41 test build 2026-05-23 13:19:01 -05:00
Hunter Bown 3efa6aad7d feat(cli): rename binaries to codewhale; keep deepseek aliases
Rename the canonical binaries:
  - `deepseek` → `codewhale` (CLI dispatcher)
  - `deepseek-tui` → `codewhale-tui` (TUI runtime)

Both legacy names continue to ship as tiny deprecation shims that print
a one-line warning to stderr and forward argv to the new binary. The
shims are produced by two new `[[bin]]` entries in `crates/cli/Cargo.toml`
and `crates/tui/Cargo.toml` pointing at small source files under
`src/bin/`. They will be removed in v0.9.0.

Touchpoints:
- Cargo bin entries + new shim source files.
- clap `name`/`bin_name`/usage strings flip to `codewhale`.
- Dispatcher's sibling-binary discovery looks for `codewhale-tui` and
  reports `codewhale` in its error/help prose. `DEEPSEEK_TUI_BIN` env
  var stays — env vars are explicitly anti-scope.
- `update.rs` now downloads `codewhale-*` assets and verifies them
  against `codewhale-artifacts-sha256.txt`. Legacy `deepseek-*` assets
  and `deepseek-artifacts-sha256.txt` are still produced by the release
  matrix so v0.8.40's `deepseek update` keeps working through one
  transition release.
- `ci.yml`, `nightly.yml`, `release.yml` updated to build/upload the new
  canonical binaries; `release.yml`'s matrix doubles to also ship the
  legacy shim binaries so v0.8.40 update clients land on the shim.
- `scripts/release/crates.sh` and `check-versions.sh` updated for the
  renamed crate names from R1.

Local gates green: `cargo check --workspace --all-targets --locked`,
`cargo fmt --all -- --check`, `cargo clippy --workspace --all-targets
--all-features --locked -- -D warnings`, `cargo test --workspace
--all-features --locked` (3226+ pass, 0 fail), and `cargo build
--release` produces all four binaries:
  - target/release/codewhale       (canonical dispatcher)
  - target/release/codewhale-tui   (canonical TUI)
  - target/release/deepseek        (legacy shim, forwards to codewhale)
  - target/release/deepseek-tui    (legacy shim, forwards to codewhale-tui)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 10:48:41 -05:00
Hunter Bown c6d73d98de refactor(crates): rename workspace members to codewhale-*
Rename the 14 workspace member crates from `deepseek-*` (and
`deepseek-tui-*`) to `codewhale-*`. Internal-only — binary names
(`deepseek` and `deepseek-tui`) are intentionally untouched in this
phase; they move in the next phase along with the deprecation shims.

Affects:
- 14 `[package] name = "..."` declarations.
- All inter-crate `[dependencies]` entries that referenced the old
  package names.
- All `use deepseek_*::...` statements rewritten to `use codewhale_*`.
- Cargo.lock regenerated.

CI workflows and release scripts that pass `-p deepseek-*` still
reference the old names; those move with the binary rename phase so
that pair lands together.

Local gates green: `cargo check --workspace --all-targets --locked`,
`cargo fmt --all -- --check`, `cargo clippy --workspace --all-targets
--all-features --locked -- -D warnings`, `cargo test --workspace
--all-features --locked` (3226+ pass, 0 fail).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 10:21:33 -05:00
Hunter Bown 8597afc076 feat(provider): add Wanjie Ark support 2026-05-21 00:02:02 +08:00
Hunter Bown 912da38cca chore(release): prepare v0.8.40 2026-05-18 23:29:20 +08:00
Hunter Bown 373fbd95a0 chore(release): prepare v0.8.39
Bump workspace, inter-crate, and npm package versions 0.8.38 -> 0.8.39.

Roll CHANGELOG [Unreleased] into [0.8.39] with all fixes:
- Revert v0.8.38 /model picker rework (back to instant curated picker)
- Restore approval grouping (lossy v0.8.37 logic for approvals, exact key for denials)
- Thinking-only turn surface fix (#1727)
- ACP server JSON-RPC id stringification (#1696)
- Chat client: reasoning_content for generic providers (#1673)
- Compaction: user text query preservation (#1704)
- Engine: system prompt override survival (#1688)
- Pager: G/End overshoot fix (#1706), mouse scroll (#1716)
- Composer: scroll with text (#1677), multiline arrows (#1721)
- macOS system theme detection (#1670)
- rlm_open blank source fields (#1712)
- Terminal resize paging fix (#1724)
- Docker first-run permission (#1684)
- README Rust 1.88+ requirement note (#1718)

Tests: 3149 passed, 0 failed (deepseek-tui crate)
clippy: clean on --all-targets --all-features
2026-05-17 16:36:21 +08:00
Hunter Bown 5401eaae08 chore(release): prepare v0.8.38 (#1698) 2026-05-15 18:08:58 -05:00
Hunter Bown 4c32a316be chore(release): prepare v0.8.37 2026-05-14 14:37:14 -05:00
Hunter Bown 9483248a9f feat(feishu): carry Lighthouse bridge into v0.8.37
Add the Feishu/Lark long-connection bridge, Tencent Lighthouse runbooks, CNB mirror guidance, CNB tag release pipeline, and China-friendly update fallback documentation for the v0.8.37 line.
2026-05-14 03:56:03 -05:00
Hunter Bown d5c45d962d chore(release): prepare v0.8.36
Squash merge of work/v0.8.36-cache-hygiene into main.

All preflight gates passed: version-drift/check/lint/test (3073 pass, 0 fail) / CodeQL / GitGuardian / npm-smoke. Preparing the v0.8.36 release tag.
2026-05-14 00:31:18 -05:00
Hunter Bown 0ab95aea1c chore(release): start v0.8.35 branch
- Bump workspace, internal crate pins, npm wrapper metadata, generated facts, and docs from 0.8.34 to 0.8.35

- Clarify 60% manual compact guidance vs 80% opt-in automatic guardrail

- Expire completed live-tool rows and collapse stale running shell rows in the Tasks sidebar
2026-05-13 13:36:15 -05:00
Hunter Bown cf45efa07b chore(release): bump workspace to v0.8.34 and clean repo root
- Bump workspace.package.version 0.8.33 -> 0.8.34 across all 14 crates
- Bump npm wrapper version + deepseekBinaryVersion pin
- Update docs/TOOL_SURFACE.md "Current surface" + docs/ARCHITECTURE.md
  current-surface references; historical "removed_in"/"v0.8.33 began
  moving" wording stays as fact
- Update web/lib/facts.generated.ts version pin
- Draft [0.8.34] CHANGELOG section covering the 135 commits since 0.8.33
  (prefix-cache stability, bundled skills, Kitty/Ghostty notifications,
  theme picker, chunked tool dispatch, MCP session-id persistence,
  cost-calc reasoning tokens, and the in-flight internal cleanup)
- Remove stale repo-root development artifacts:
  * TAKEOVER_PROMPT.md (v0.8.6 handoff, 3 minors stale)
  * PROMPT_ANALYSIS.md (v0.8.13-era prompt audit doc)
  * DEPENDENCY_GRAPH.md (claimed monolith layout, predates 14-crate split)
  docs/ARCHITECTURE.md already contains the live crate map.
- Update CONTRIBUTING.md to reference docs/ARCHITECTURE.md for build
  ordering instead of the removed DEPENDENCY_GRAPH.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 01:12:21 -05:00
Hunter Bown 485ba7bbd4 chore(release): finish v0.8.33 polish 2026-05-12 22:03:47 -05:00
Hunter Bown 99c6b22e83 chore(release): v0.8.33 — sub-agent and RLM renovation with persistent sessions
- Persistent RLM sessions (rlm_open/rlm_eval/rlm_close) with bounded REPL helpers
- Fork-aware sub-agent sessions (agent_open/agent_eval/agent_close) with handle_read
- Shared handle_read storage with slice/range/count/JSONPath projections
- Slash-command routing: /rlm, /agent, /relay (/接力) for handoff prompts
- Sidebar renamed to "Work" tab, consistent across Plan/Agent/YOLO modes
- Tool papercuts: file_search excludes, grep_files strings, fetch_url JSON,
  edit_file fuzz, exec_shell merged stdout/stderr, revert_turn no-op reject
- CLI reasoning-effort honoured on non-auto exec routes (#1511 @h3c-hexin)
- Edit-file replacement boundaries clarified (#1516)
- Pandoc output validated before probing (#1523)
- Running turns steerable/repaintable (#1533, #1537)
- Tasks/Activity Detail calmer under load
- npm retry timeout hint (#1538 @reidliu41)
- Issue templates improved (#1525 @reidliu41)
- Shell: kill process group to prevent UI freeze (#828 @CrepuscularIRIS)
- TUI: ignore leaked SGR mouse reports in composer (#1421 @reidliu41)
- Footer: keep chips within available width (#1417 @Wenjunyun123)
- Session picker: scope Ctrl+R to current workspace (#1395 @LinQ)
- Removed stale competitive-analysis doc
- Prompts/docs teach only new tool names
2026-05-12 19:54:08 -05:00
Hunter Bown c0b9bada27 chore(release): bump to 0.8.32
Workspace, all 9 path-pinned crate deps, and the npm wrapper's
package.json all advance from 0.8.31 → 0.8.32. `scripts/release/
check-versions.sh` passes (workspace ↔ npm ↔ Cargo.lock all in
sync).

Auto-tag only fires on push-to-main, so this bump on `work/v0.8.32`
doesn't accidentally cut a release; it just makes the
in-development binary identify itself correctly. When this branch
merges to main, the existing release pipeline takes over from
here.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 02:21:19 -05:00