Commit Graph

133 Commits

Author SHA1 Message Date
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
Hunter B 6551106e79 docs: move internal design docs into docs/rfcs/ 2026-06-09 23:23:25 -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
greyfreedom 17dbed13c7 feat(execpolicy): wire permissions.toml ask-rules into runtime
Harvested from PR #2885 by @greyfreedom. Wires ask-rules into the
app-server and core ExecPolicyEngine (previously inert). Removes the
original PR's NeedsApproval arm that incorrectly allow-listed the
working directory as a network host.

Co-Authored-By: greyfreedom <11493871+greyfreedom@users.noreply.github.com>
2026-06-07 10:49:36 -07:00
Hunter B 3d676c2509 chore(tui): harden exec harness signals 2026-06-06 22:55:23 -07:00
Hunter Bown efbcc681ae docs(harness): define profile cutline (#2844) 2026-06-05 23:23:49 -07:00
Hunter Bown 190e9f35e4 feat(config): add provider TLS skip verify
Harvests provider-scoped TLS skip-verify from #1893 by @wavezhang. Disabled by default, active-provider-only, doctor-reported, and keeps SSL_CERT_FILE as the preferred custom CA path.
2026-06-05 22:37:14 -07:00
xyuai be37dbd34e feat(config): add Xiaomi MiMo token plan mode
Harvested from PR #2627 by @xyuai.

Refs #2621 reported by @springeye.
2026-06-05 09:04:45 -07:00
hongqitai 5926bf38a6 feat(tui): add Hugging Face env aliases
Harvested from PR #2780 by @hongqitai.
2026-06-05 08:44:29 -07:00
yusufgurdogan af8ff03618 feat(web_search): add Sofya search provider
Harvested from PR #2790 by @yusufgurdogan.
2026-06-05 08:29:02 -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 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 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 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 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
Hunter Bown fc8ad7b3a8 feat(project): enrich repo constitution (invariants, branch policy, escalation)
Per the layered-authority clarification (base myth → global Constitution → repo
constitution = local law → task packet → runtime policy), extend
.codewhale/constitution.json beyond authority+verification with optional:

- protected_invariants — repo invariants the agent must not break
- branch_policy — branch/release policy in effect
- escalate_when — conditions to stop and escalate to the user

All optional; rendered as concise model-facing prose. The global Brother Whale
identity anchor and Constitution in prompts/base.md are unchanged (verified
untouched on this branch). Dogfood constitution.json filled with CodeWhale's
real invariants (prefix-cache byte-stability, transcript replay, stable Rust,
cli/tui parity), branch policy (codex/v0.8.53), and escalation rules. Docs note
the layered hierarchy.

cargo test -p codewhale-tui --bins → 3946 passed; clippy clean.
2026-06-03 12:16:06 -07:00
Hunter Bown 9d9616e898 feat(project): deprecate WHALE.md; add .codewhale/constitution.json authority layer
Splits repo-level guidance into two clear artifacts and deprecates the
confusing WHALE.md concept (overlapped with AGENTS.md):

- AGENTS.md is the canonical cross-agent project-instructions file.
- .codewhale/constitution.json is the CodeWhale-specific repo authority /
  prioritization policy (when local sources conflict, which to trust first; what
  to verify before claiming done). Rendered into the system prompt as a
  higher-authority <codewhale_repo_constitution> block; takes precedence over a
  legacy WHALE.md.

WHALE.md migration (compat-preserving):
- AGENTS.md now ranks above WHALE.md in both project and global discovery; with
  both present, AGENTS.md wins.
- WHALE.md is still read as a legacy fallback, but now emits a deprecation
  warning and is never created or recommended (init.rs no longer suggests it).
- Discovery/docs updated; the global CodeWhale Constitution in prompts/base.md
  is unaffected (different thing).

constitution.json:
- New RepoConstitution (serde, all fields optional, unknown fields ignored,
  schema_version checked). Discovered at .codewhale/constitution.json in the
  workspace or any parent up to the git root. Malformed JSON warns, never panics.
- Loaded after the auto-generate fallback so it can't be clobbered.

.gitignore: ignore .codewhale/ contents at any depth EXCEPT the committed
constitution.json (a directory exclude can't be negated, so **/.codewhale/* +
negation). init.rs writes the same pattern for new repos. Dogfood: this repo's
.codewhale/constitution.json added.

find_git_root made pub(crate) and reused (no duplicate loader).

Tests: AGENTS-over-WHALE precedence, WHALE legacy-read-with-warning,
constitution render + system-block surfacing, malformed-constitution warning,
gitignore-keeps-constitution. cargo test -p codewhale-tui --bins → 3946 passed;
clippy clean.

Targets codex/v0.8.53.
2026-06-03 12:12:34 -07:00
Hunter B 14c882be53 fix(provider): expose siliconflow-cn registry coverage 2026-06-03 02:51:42 -07:00
Hunter B 54446e6c07 fix(release): stabilize v0.8.52 2026-06-03 02:39:45 -07:00
AresNing 8981d5c5fd feat: add subagent lifecycle hooks
Add subagent lifecycle hooks for better control over subagent initialization and teardown.
2026-06-02 20:48:09 -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 e54a0a500b feat(provider): add direct arcee support 2026-06-02 08:51:39 -07:00
cyq 73cd721665 feat(tui): add mention browser completions 2026-06-01 17:33:41 -07:00
cyq 3b5727f283 fix(tui): prefer codewhale settings path 2026-06-01 16:17:43 -07:00
Hunter Bown 3d5edfee80 test(config): cover legacy workspace shell opt-in
Refs #2523
2026-06-01 15:30:47 -07:00
cyq 7dfec0ed4a fix(config): honor workspace shell opt-in 2026-06-01 15:30:14 -07:00
Hunter Bown bb64018a15 feat(tui): add configurable auto-compact threshold
Refs #1722

Preserves auto_compact as opt-in, adds the saved threshold setting, keeps the 500K hard floor, and wires Ctrl+L as a manual compaction shortcut for context-pressure recovery.

Harvested from PR #1723 by @aboimpinto

Co-authored-by: Paulo Aboim Pinto <aboimpinto@gmail.com>
2026-06-01 14:09:49 -07:00
greyfreedom 3df018994f feat(config): load typed ask permissions file
(cherry picked from commit fb77cf1e0946a061376e5e9a8fc9422dddd98419)
2026-06-01 05:43:26 -07:00
Hunter B e9eea70445 release: v0.8.48 — liveness watchdog fix, Qwen 3.7 removal, provider/docs sync
- Fix false 'Turn stalled' during long active turns with running tools.
  Add turn_last_activity_at tracking and active-tool awareness to
  reconcile_turn_liveness(). Three new tests cover the fix.

- Remove Qwen 3.7 Max OpenRouter preset from registry, picker, docs,
  and tests. Qwen 3.7 Max is a hosted model; the preset will return
  when an open-weight Qwen 3.7 release ships. MiniMax M3 remains as
  a full 1M-context multimodal route.

- Sync root CHANGELOG to crates/tui/CHANGELOG for crates.io packaging.
  Update docs/CONFIGURATION.md, docs/PROVIDERS.md, and README to
  reflect the Qwen 3.7 removal. Regenerate web facts timestamp.
2026-05-31 21:45:31 -07:00
Hunter B 2bd77edc15 Fix provider model selection and stream completion 2026-05-31 21:15:40 -07:00
Hunter B 2b69f4e041 chore: polish codewhale home defaults 2026-05-31 19:22:12 -07:00
Hunter B a9a4213d39 fix(tui): make startup update checks configurable 2026-05-31 17:06:20 -07:00
Hunter B d6baf20721 Migrate file secrets to codewhale home 2026-05-31 15:30:35 -07:00
Hunter B f72f609293 feat: make file mention completion tunable 2026-05-31 13:29:28 -07:00
Hunter Bown 5a80556eb2 feat(models): add recent large OpenRouter models (#2461) 2026-05-31 11:26:25 -07:00
ningjingkun 4146ec617e fix(hooks): harden message_submit review cases 2026-05-31 04:39:51 -07:00
ningjingkun 467e2cbfff feat(hooks): allow message_submit to transform submitted text 2026-05-31 04:39:51 -07:00
Hunter Bown 26e2de86f0 docs: align configuration paths with codewhale home (#2413)
Harvested from #2400 with thanks to @axobase001.\n\nAligns the configuration docs around CODEWHALE_HOME while preserving the DEEPSEEK_HOME legacy alias and spelling out how legacy checkpoints can still be scanned during cleanup.\n\nCloses #2322.
2026-05-31 02:39:53 -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 12c9cd4193 Merge main into Baidu search provider 2026-05-30 22:39:13 -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
jimmyzhuu e227efbd80 docs: document baidu search backend 2026-05-30 10:52:27 +08:00
Hunter Bown cdec3e8192 Merge branch 'build/v0.8.47' into integration/v0.8.47-unified 2026-05-26 16:41:10 -05:00
Hunter Bown 7cbeb3d809 Merge branch 'work/issue-2132-ddg-default' into integration/v0.8.47-unified 2026-05-26 16:40:53 -05:00
Hunter Bown aeaf91d589 feat(web_search): switch default backend from Bing to DuckDuckGo (#2132)
- Make DuckDuckGo the default search provider with Bing fallback
- Update tool description, config docs, TOOL_SURFACE, doctor output
- Update all search default tests and references
- Bing remains selectable via [search] provider = "bing"
2026-05-26 16:37:53 -05:00
Hunter Bown 2b8f3bf3dd docs: add provider registry reference and refresh provider lists (#2201)
- Add docs/PROVIDERS.md placeholder reference in README and CONFIGURATION.md
- Update provider lists to include moonshot, openrouter, novita
- Add MOONSHOT_API_KEY/KIMI_API_KEY env var docs
- Update default_text_model entries for all providers
- Change legacy deepseek-cn alias to deepseek
- Add CODEWHALE_PROVIDER as preferred env var name
2026-05-26 16:37:33 -05:00
Hunter Bown 236ad4137d feat: harvest 6 community PRs for v0.8.47
Harvested and vetted — no malware, no external deps, no injection:
- #1859 (@harvey2011888): loop guard now reports Failed on halt
- #1870 (@victorcheng2333): honour DEEPSEEK_YOLO env on startup
- #1935 (@IIzzaya): replace [x] with [✓] completion markers
- #1837 (@PurplePulse): fix macOS title centering (pin to top)
- #1967 (@cyq1017): show base_url in /config view
- #1906 (@knqiufan): copy transcript without visual-wrap newlines

Also fix cycle_manager archive_dir_for to use resolve_state_dir
so recall_archive tests pass with the migrated sessions path.

Co-authored-by: victorcheng2333 <victorcheng2333@users.noreply.github.com>
Co-authored-by: IIzzaya <IIzzaya@users.noreply.github.com>
Co-authored-by: PurplePulse <PurplePulse@users.noreply.github.com>
Co-authored-by: cyq1017 <cyq1017@users.noreply.github.com>
Co-authored-by: knqiufan <knqiufan@users.noreply.github.com>
2026-05-26 14:34:21 -05:00
Zhao Xiaohong ee03d1fd80 feat(web): add Metaso as a web search provider (metaso.cn) (#2059)
Adds Metaso AI Search as a new SearchProvider option alongside Bing,
DuckDuckGo, Tavily, and Bocha.

Co-authored-by: Zhao Xiaohong <zhaoxiaohong@metasota.ai>
2026-05-26 10:31:09 -05:00