Commit Graph

100 Commits

Author SHA1 Message Date
Hunter B ccc0315831 chore(release): prepare v0.8.59
Cut the 0.8.59 changelog section, bump workspace/npm/README versions, refresh Cargo.lock and generated web facts, and sync the embedded TUI changelog slice.

Also fixes the short codew shim to prefer its sibling codewhale dispatcher before PATH so fresh installs do not delegate to an older global binary.
2026-06-12 07:05:05 -07:00
cyq1017 42de833d80 feat(config): add concise verbosity mode
Harvests #3052 onto the v0.8.59 release branch. Noninteractive CLI launches default to concise output discipline unless config, env, or --verbosity overrides it; interactive TUI launches remain normal by default.

Also forwards CODEWHALE_VERBOSITY as the primary env bridge while keeping DEEPSEEK_VERBOSITY for compatibility, documents the setting, and records @cyq1017 credit in both changelogs.
2026-06-12 06:41:01 -07:00
Hunter B efcf299712 feat(models): add Kimi K2.7 Code defaults 2026-06-12 05:43:38 -07:00
Hunter B 8c690cb7bf fix(update): guide legacy deepseek users to codewhale
Harvests PR #3013 by @cyq1017 and PR #3053 by @angus-guo. Legacy deepseek/deepseek-tui binaries now return migration steps instead of trying to self-update through a missing codewhale binary, and the README/rebrand docs carry the same upgrade path.

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

Co-authored-by: gus <217034332+angus-guo@users.noreply.github.com>
2026-06-12 02:22:10 -07:00
Hunter B a46d9c012e fix(cli): track provider source for TUI fallback
Adapt PR #3011 so unsupported interactive providers report their actual source and config-sourced unsupported providers fall back to DeepSeek without forwarding a stale keyring secret.

Co-authored-by: cyq1017 <61975706+cyq1017@users.noreply.github.com>
2026-06-12 01:30:23 -07:00
New2Niu bfdd26879e fix(cli): bound self-update HTTP waits
Harvest #3006 for the v0.8.59 release lane. The self-update HTTP client now uses a five-minute timeout so blocked or very slow GitHub release downloads fail instead of hanging indefinitely.
2026-06-12 01:22:26 -07:00
Claude d940b7821c Merge origin/main into v0.8.58-3014-anthropic-adapter — keep #3024 Moonshot/Ollama dialect arms plus the #3014 Anthropic native-shaping arms in all three reasoning tiers; keep the #3014 Anthropic capability early-return while honoring the #3023 removal of the Openai/Atlascloud/Moonshot one; union claude + bare-id max_output rows 2026-06-11 05:45:51 +00:00
Claude 279ad5af90 feat(client): native Anthropic Messages API adapter — /v1/messages dialect with x-api-key + anthropic-version auth, adaptive thinking + output_config.effort shaping, cache_control breakpoints (prefix zones, capped at 4), signed-thinking replay via new signature field + signature_delta, #2961 usage normalization, SSE pass-through with error envelopes; registry/docs sync (#3014)
Co-Authored-By: Claude <noreply@anthropic.com>
https://claude.ai/code/session_018zaP8vUfTAsrE38L6h6fw5
2026-06-11 03:54:46 +00:00
Claude 2bbe25b7e4 fix: #3034 audit residuals — correct the constitution renderer doc-comment (renderer NOT reconciled with committed MD, do not regenerate); pin the collapsed-thinking header assertion; align auth list's openai-codex credential source with auth status
Co-Authored-By: Claude <noreply@anthropic.com>
https://claude.ai/code/session_018zaP8vUfTAsrE38L6h6fw5
2026-06-11 02:45:25 +00:00
Hunter Bown 4d4cbd36a2 v0.8.58: constitution refactor + rebrand fixes + provider error improvement
- Constitution: new preamble (A / Rule Number 6), personality tier removed
  (8 tiers instead of 9), elevated constitutional prose with shall/shall-not
- YAML constitution (constitution.yaml) as structured source of truth with
  indentation encoding tier precedence
- Python renderer (render_constitution.py) for YAML -> markdown conversion
- prompts.rs: load constitution.md instead of base.md + calm.md overlay
- #2664: state.db default path prefers .codewhale/ over .deepseek/ with
  legacy fallback so existing installs keep session history
- #2644/#2664: update stale doc comments referencing deepseek paths
- #3007: provider rejection error now shows source (CLI flag vs config),
  lists supported providers, and gives specific fix instructions
2026-06-10 10:02:49 -07:00
Hunter B fad04a016f polish: finish the rebrand in agent-facing surfaces
- system prompt environment key deepseek_version -> codewhale_version
- drop legacy .deepseek/instructions.md from the Local Law prompt tier
  (the engine still reads it for back-compat)
- instructions-file truncation marker now states how many bytes were
  omitted so the model knows what it is missing
- CODEWHALE_CHANGELOG const + user-facing /change strings
- codewhale metrics doc headers
2026-06-09 23:36:32 -07:00
Hunter Bown ddae5cfe36 Merge PR #2923 from hongchen1993: allow Volcengine provider in TUI dispatcher
Adds Volcengine to the TUI-supported provider gate and verifies Ark key forwarding.
2026-06-09 20:08:02 -07:00
hongchen1993 24b8912e82 fix(cli): allow Volcengine provider in TUI dispatcher 2026-06-09 10:38:48 +08:00
Hunter Bown b46f607d91 feat(providers): finish OpenAI Codex (ChatGPT OAuth) provider and cut v0.8.55
Completes the in-progress OpenAI Codex provider and bumps the workspace to
0.8.55. Builds on the committed Together AI provider + model catalog work.

OpenAI Codex (ChatGPT) provider — experimental:
- Wire the previously-dead OAuth module into credential resolution. The TUI
  config now resolves the access token via the Codex CLI login in
  ~/.codex/auth.json (env overrides OPENAI_CODEX_ACCESS_TOKEN/CODEX_ACCESS_TOKEN),
  refreshing expired tokens synchronously via the OpenAI token endpoint —
  mirroring the existing Kimi OAuth flow rather than introducing a new pattern.
- Send the ChatGPT backend's required headers from the Responses client
  (chatgpt-account-id, OpenAI-Beta: responses=experimental, originator) and
  stop duplicating the Authorization header already installed on the client.
- Fix the cli crate's non-exhaustive ProviderKind matches (compile blocker).

Consistency / de-slop pass (so the provider fits the whole app, not one path):
- has_api_key_for / active_provider_has_config_api_key now detect the Codex
  OAuth login on disk, the same way they detect Kimi OAuth — a `codex login`
  user is no longer reported as unauthenticated.
- Replace the bogus OPENAI_CODEX_API_KEY hint (which exists nowhere else) with
  the real OPENAI_CODEX_ACCESS_TOKEN/CODEX_ACCESS_TOKEN in the auth-error and
  picker surfaces.
- Drop dead state in the Responses stream parser (unused ToolCallState fields /
  imports); tool-call data is streamed live.
- Update docs/PROVIDERS.md, config.example.toml, and the provider-metadata wire
  test for the Responses wire format.

Release:
- Bump workspace + crates + npm package to 0.8.55; update CHANGELOG.md and
  crates/tui/CHANGELOG.md.

Note: the live Responses round-trip has not been exercised against the
production ChatGPT backend in this environment; the provider ships as preview.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 16:17:30 -07:00
Hunter Bown c13bc24805 feat(models): add Together AI provider and update model catalog for v0.8.55
- Add Together AI as a first-class provider (ProviderKind::Together)
  - Config block [providers.together], env TOGETHER_API_KEY/TOGETHER_BASE_URL/TOGETHER_MODEL
  - Default models: deepseek-ai/DeepSeek-V4-Pro, deepseek-ai/DeepSeek-V4-Flash
  - Base URL: https://api.together.xyz/v1
  - TUI ApiProvider::Together with picker, auth, and capability support
  - CLI auth list/status support

- Add model catalog entries:
  - Qwen 3.7 Max (qwen/qwen3.7-max on OpenRouter)
  - MiniMax 2.7 (minimax/minimax-2.7 on OpenRouter)
  - NVIDIA Nemotron 3 Ultra (nvidia/nemotron-3-ultra on OpenRouter)

- Update docs/PROVIDERS.md, docs/CONFIGURATION.md, config.example.toml
- Update check-provider-registry.py compatible surfaces
- Fix provider picker tests for new provider count

Closes #2906, #2907, #2910, #2912, #2913
2026-06-08 15:12:42 -07:00
Hunter B 9b500a7b91 Prepare v0.9.0 release build 2026-06-06 19:39:02 -07:00
Hunter B 6269cb91f1 fix(cli): include TLS skip flag in runtime option tests 2026-06-05 22:42:48 -07:00
Hunter B 23c9481af1 feat: add HarmonyOS OpenHarmony support
Harvest the HarmonyOS/OpenHarmony port from PR #2634 and make it publish-safe by target-gating unsupported host dependencies out of the OHOS TUI graph. Self-update is disabled on OHOS, PTY shell mode reports unsupported, and Starlark execpolicy parsing returns an explicit unsupported-platform error until upstream starlark/rustyline/nix support catches up.

Add OHOS SDK setup docs and launcher scripts, install the rustls ring provider for rustls-no-provider entrypoints, and keep the packaged codewhale-tui OHOS graph free of starlark, rustyline, nix@0.28, portable-pty, and arboard.

Validation: cargo fmt --all -- --check; git diff --check; git diff --cached --check; cargo check -p codewhale-cli --locked; cargo check -p codewhale-app-server --locked; cargo check -p codewhale-tui --locked; cargo test -p codewhale-cli --locked update::tests::; cargo test -p codewhale-release --locked; cargo test -p codewhale-tui --locked background_tty_command_has_controlling_terminal; cargo test -p codewhale-tui --locked clipboard; cargo package -p codewhale-tui --allow-dirty --no-verify --locked; packaged OHOS cargo tree checks. OHOS target check still requires a loaded OpenHarmony SDK/sysroot and currently stops in ring with missing assert.h when CC/CFLAGS/linker are unset.

Harvested from PR #2634 by @shenjackyuanjie.

Co-authored-by: shenjackyuanjie <54507071+shenjackyuanjie@users.noreply.github.com>
2026-06-03 21:02:46 -07:00
Hunter Bown 772ec46c98 chore(release): v0.8.53 — Arcee support, telegram bridge, provider fixes
- Fix Rust syntax/clippy fallout in client.rs, cli/src/lib.rs, web_search.rs
- Fix 0.8.53 release metadata: changelog links, TUI changelog, npm wrapper
- Update visible help copy for multi-provider support
- Add telegram-bridge integration with deploy configs
- Add US remote VM quickstart doc
- Update Tencent Cloud deploy scripts and docs
- Bump npm wrapper to 0.8.53
2026-06-03 16:12:38 -07:00
Hunter Bown 260ee737b0 style: cargo fmt 2026-06-03 15:18:19 -07:00
Hunter Bown be7a3e7e69 fix(tui): provider picker r shortcut with modifier guard
- add r/R shortcut to re-enter API key for any provider in picker
- guard against Ctrl/Alt/Meta modifiers (only plain r triggers)
- dynamic footer: 'apply' when key exists, 'set key' otherwise
- add 'R edit key' hint to picker footer
- add route/model to scoped auth status output
- add tests for r shortcut, ctrl-r guard, footer text, and route/model

Ports #2717 with review fix. Fixes #2662.
2026-06-03 15:14:39 -07:00
Hunter Bown 5719301d1e fix(auth): all-provider auth status and scoped logout
- auth status shows every known provider with config/keyring/env status
- auth status --provider <id> shows detailed single-provider info
- auth list now probes keyring for all providers (was only active)
- /logout clears only the active provider's key (was clearing all)
- add clear_active_provider_api_key for scoped TOML key removal
- add Huggingface to ProviderArg enum
- add auth status tests for all-provider and scoped views

Fixes #2716
2026-06-03 15:08:28 -07:00
Hunter Bown 28a0f19c13 fix(provider): polish v0.8.53 routing and shell gating 2026-06-03 14:40:25 -07:00
Hunter B 54446e6c07 fix(release): stabilize v0.8.52 2026-06-03 02:39:45 -07:00
Hunter Bown 06612495fc chore(release): prep v0.8.51 — Arcee provider, cycle removal, UI fixes
Release-preparation checkpoint for v0.8.51 (workspace + npm bumped to 0.8.51).

Added:
- Arcee AI direct provider: [providers.arcee], ARCEE_API_KEY/BASE_URL/MODEL,
  CLI auth, provider + model picker, registry. Default direct-API model is
  trinity-large-thinking (reasoning, 262K ctx/out); preview + mini selectable.
  Cloudflare-WAF-safe opening turn (benign read-only tool surface, system-prompt
  payload splitting) and reasoning_content replay on tool-call turns.
- Expanded model catalog (qwen3.6 flash/plus/max-preview, Xiaomi MiMo v2.5
  chat/ASR/TTS); provider-aware model picker with per-provider saved models.

Changed:
- Auto-compaction is percentage- and model-aware
  (compaction_threshold_for_model_at_percent; default 80%; auto-enable for
  <=256K windows, opt-in for 1M models).
- Provider/gateway HTTP errors sanitized (HTML/WAF interstitials collapsed,
  401/403 split into authentication vs authorization).

Removed:
- The session cycle / checkpoint-restart system: /cycles, /cycle, /recall,
  recall_archive tool, cycle_manager, cycle-handoff prompt, sidebar cycle lines,
  EngineConfig.cycle / Event::CycleAdvanced / seam cycle thresholds.

Fixed:
- Orphaned assistant 'blue dot' role glyph on whitespace-only turns.
- Sidebar mouse-wheel scroll leaking into the transcript.
- Sidebar hover tooltip overlap + warning-orange styling.
- README Constitution description corrected to match prompts/base.md.
- Repaired release-blocking unit/integration tests after the refactors.

Preflight: cargo fmt clean, workspace builds, 3903 tui tests pass (1 known
flaky MCP SSE test under parallel load, passes in isolation).
2026-06-02 17:36:18 -07:00
Hunter B 99da87ca1d fix(cli): wire arcee provider auth 2026-06-02 08:58:01 -07:00
xyuai 8532dcc49e feat: add Xiaomi MiMo speech support 2026-06-01 21:18:28 -07:00
Hunter B d6baf20721 Migrate file secrets to codewhale home 2026-05-31 15:30:35 -07:00
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 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