Commit Graph

212 Commits

Author SHA1 Message Date
Hunter Bown 42b25a2cb5 docs: add macos python FAQ (#2409)
Harvested from #2407 with thanks to @axobase001.

Adds a first-time macOS Python FAQ and completes the virtualenv flow with the final run command.

Fixes #2351.
2026-05-31 02:27:32 -07: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
Hunter B f51214d379 Merge remote-tracking branch 'origin/main' into codex/pr-2252-runtime-sse-envelope
# Conflicts:
#	Cargo.lock
#	crates/tui/Cargo.toml
2026-05-31 00:43:47 -07:00
Hunter B 678484ae1d docs(provider): clarify SiliconFlow provider entries 2026-05-31 00:24:10 -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 2f7161d12c Merge remote-tracking branch 'origin/main' into HEAD 2026-05-30 23:31:01 -07:00
Hunter B 0572aff79d fix: refresh Volcengine provider registry 2026-05-30 23:30:57 -07:00
Hunter Bown c9d6a977ff Merge pull request #2387 from mo-vic/dev
feat: add /purge slash command for agent-driven context pruning
2026-05-30 23:30:17 -07:00
Hunter B a1b30c6e72 fix: cover purge command in Vietnamese locale 2026-05-30 23:23:39 -07:00
Hunter B e8bcf9ffb6 Merge remote-tracking branch 'origin/main' into HEAD 2026-05-30 22:55:55 -07:00
Hunter Bown 42576a7129 Merge pull request #2371 from jimmyzhuu/feat/baidu-search-provider
feat: add Baidu AI Search backend for web_search
2026-05-30 22:54:47 -07:00
movic a21e9e5c83 feat: add /purge slash command for agent-driven context pruning
New `/purge` command lets the agent surgically remove or rewrite
conversation history via a purge_context tool call. The engine
validates and applies the operations, cascading tool-result removal
to the paired tool-use call.
2026-05-31 13:53:03 +08:00
Hunter B 332e2d6421 Merge main into mobile control page 2026-05-30 22:48:28 -07:00
Hunter Bown 1aa5659685 Merge pull request #2383 from rockyzhang/main
Add RISC-V (riscv64gc-unknown-linux-gnu) prebuilt binary support
2026-05-30 22:44:03 -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
Hunter B bace2523e1 fix(release): pin riscv64 dispatch source ref 2026-05-30 22:13:20 -07:00
Hu Qiantao c6cec29f63 fix: remove double-registration of shell tools in engine builder
The second feature-flag gate in tool_setup.rs was calling
with_shell_tools() again when allow_shell was already true, causing
duplicate tool registration. Remove the redundant gate since
with_agent_tools() already handles the allow_shell check.

Also add task_shell_wait to MODES.md alongside task_shell_start.
2026-05-30 21:49:38 -07:00
Hu Qiantao ed81d13782 fix: gate task_shell_start behind allow_shell like exec_shell
task_shell_start delegates to ExecShellTool, providing the same shell
execution capability as exec_shell. Previously, task_shell_start was
registered unconditionally in with_runtime_task_tools while exec_shell
was gated behind allow_shell, creating an inconsistent security gate.

This caused the model to try exec_shell first, fail, then fall back to
task_shell_start — wasting tokens and bypassing the intended security
boundary.

Split TaskShellStartTool and TaskShellWaitTool out of
with_runtime_task_tools into a new with_runtime_task_shell_tools method,
and gate both behind the allow_shell check in with_agent_tools.

Closes #2303
2026-05-30 21:49:38 -07:00
LeHaiDang 88000c0481 feat: add Vietnamese (vi) localization support 2026-05-30 21:38:11 -07:00
Rocky Zhang c0dd43993c Add RISC-V (riscv64gc-unknown-linux-gnu) prebuilt binary support
Adds riscv64 to build pipelines so CodeWhale ships prebuilt binaries
and npm wrappers for 64-bit RISC-V Linux (glibc) systems.

Changes:

**CI / build**
- release.yml: +2 build matrix entries (codewhale + codewhale-tui for
  riscv64gc-unknown-linux-gnu), cross-compilation toolchain step using
  a dedicated DEB822-format apt source for ports.ubuntu.com, bundle
  step, and release-notes table row.
- nightly.yml: +2 matrix entries, matching cross-compilation setup.
- resolve job: handle workflow_dispatch when the target tag does not
  yet exist (fall back to HEAD SHA).

**Packaging**
- npm/codewhale/scripts/artifacts.js: add riscv64 to ASSET_MATRIX
  under linux so npm install -g codewhale resolves on RISC-V.

**Docs**
- docs/INSTALL.md: add riscv64 row to supported platforms table;
  replace with clearer 'other architectures' wording.

Build strategy: cross-compile from ubuntu-latest (x86_64) using
gcc-riscv64-linux-gnu. The dbus runtime dependency (from the keyring
crate's secret-service backend) is satisfied via ports.ubuntu.com.
PKG_CONFIG_ALLOW_CROSS and a cross-target libdir are set so the
keyring crate finds dbus-1 during cross-compilation.

Docker support for linux/riscv64 is intentionally not added here:
GitHub Actions does not yet provide the infrastructure to build or
emulate riscv64 containers. The Dockerfile changes will follow when
the hosted CI surface supports it.
2026-05-31 03:35:13 +00:00
Fann Hoo efb63df66e feat(lsp): add Java and Vue language server defaults 2026-05-30 19:26:42 -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
Zhuoran Deng 57625af4f8 docs(docker): tighten toolbox compose defaults 2026-05-30 19:17:55 -07:00
Zhuoran Deng 127f0565dd docs(docker): add toolbox compose template 2026-05-30 19:17:55 -07:00
ningjingkun dc6dcdfda2 docs: add first-run user guide 2026-05-30 19:15:34 -07:00
LING71671 02d1145add docs: clarify custom provider configuration 2026-05-30 19:15:31 -07:00
Nightt 402b186aec test: check tui provider enum drift 2026-05-30 19:15:28 -07:00
Hunter Bown e2099dd691 fix: harden provider registry drift check 2026-05-30 19:15:28 -07:00
Nightt 9edd2008c4 docs: add provider registry drift check 2026-05-30 19:15:28 -07:00
jimmyzhuu e227efbd80 docs: document baidu search backend 2026-05-30 10:52:27 +08:00
Zhuoran Deng c8c5e52168 fix(runtime): tighten mobile control security 2026-05-28 06:42:22 +08:00
Zhuoran Deng a964d86b4b feat(runtime): restore mobile control page 2026-05-28 06:23:28 +08:00
cyq ac6db90333 test(protocol): tighten runtime envelope assertions 2026-05-27 22:32:28 +08:00
cyq d102cbd0f9 feat(protocol): add runtime event envelope 2026-05-27 12:42:20 +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 86652f3a4b Merge branch 'docs/2217-container-toolbox-contract' into integration/v0.8.47-unified 2026-05-26 16:40:36 -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 671aa4810e docs: add Docker toolbox/custom-image contract and examples (#2217)
- Document default image contract (non-root, no sudo, conservative)
- Add opt-in toolbox image pattern with passwordless sudo
- Include Dockerfile.toolbox example
- Document multi-project volume pattern
- Add bootstrap script, custom CA certificate, and proxy workflows
- Clarify that bootstrap/CA workflows require the opt-in toolbox image
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
Hunter Bown e59925f8f1 chore: finalize v0.8.46 release — docs refresh, web branding, redirect worker
- Update all three READMEs with binary-pair install instructions
- Update INSTALL.md for platform archive + binary pair language
- Regenerate facts.generated.ts for v0.8.46 (14 crates, 70 tools)
- Rename CF worker project to codewhale-web, add codewhale.net routes
- Add web/redirect worker for deepseek-tui.com → codewhale.net
2026-05-26 12:06:31 -05:00
Hunter Bown e2eff3956c docs(install): add macOS Gatekeeper quarantine workaround (#2139)
Harvested from PR #2139 (copilot-swe-agent). README changes skipped
to preserve the narrative harness section.

Co-authored-by: copilot-swe-agent[bot]
2026-05-26 10:32:07 -05:00
Saieswar d3adc6a0f1 docs: add review pipeline documentation closes #2177 (#2178)
* docs: add review pipeline documentation closes #2177

* docs: remove escape characters and update cargo fmt command

* docs: remove locked and warning flags from clippy command based on bot review
2026-05-26 10:31:37 -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
Hunter Bown 2a41102e0c feat: defer low-value native tools by default, reduce catalog tokens 73% (#2076) 2026-05-26 10:08:09 -05:00
Hunter Bown 1763261503 v0.8.46: release archives, sandbox depth, quick fixes, web install, docs
* docs: v0.8.46 CHANGELOG — platform archives, palette, sub-agents, sandbox, web install, search fixes

Closes #2188

* feat(v0.8.46): quick fixes — palette, model picker Esc, sub-agent sidebar, shell chip, model name casing, CVE bump (#2212)

* fix: bump qs to >=6.15.2 for CVE-2026-8723

Add qs override in feishu-bridge package.json to force transitive
dependency resolution to >=6.15.2, addressing CVE-2026-8723.

Refs: #2198

* fix: Esc in model picker applies last-highlighted choice

Previously Esc reverted to the initial model when the user hadn't
moved the selection. Now Esc always applies the currently highlighted
model and thinking-effort tier, making Esc consistent with Enter.

Also updates the picker footer hint from 'Esc cancel' to 'Esc apply'.

Refs: #2196

* feat: show ' shell running' chip in TUI footer

Adds a footer_shell_chip function that displays a ' shell running'
status chip in the footer's right cluster whenever a foreground shell
command is active via exec_shell. The chip is always visible regardless
of user-configured status items.

Refs: #2194

* feat: auto-collapse finished sub-agents in sidebar

When a sub-agent completes (status = 'done'), its detail lines
(id, steps, duration, progress) are now hidden in the sidebar agents
panel. Only the summary label line is shown, keeping the sidebar
compact. Running agents still show full detail.

Refs: #2195

* feat: refresh Whale dark palette for better contrast

Improve contrast and layer separation in the Whale dark theme:
- Deepen base background for more depth (10,17,32)
- Lighten panel (22,34,56) for clearer distinction from bg
- Lighten elevated surface (36,52,78) for better elevation
- Lighten selection (48,68,100) for clearer selected state
- Boost text hint (138,150,174) and dim (118,130,156) readability
- Brighter border (52,88,145) for better edge definition
- Update tool surface colors for consistency

Refs: #2197

* fix: preserve model name casing in normalize_model_name_for_provider

When the user enters a model name like 'DeepSeek-V4-Flash', the
normalizer was lowercasing it to 'deepseek-v4-flash' via the
canonical_official_deepseek_model_id function. Now the normalizer
preserves the caller's casing when the input already matches a known
model id case-insensitively. Compact aliases like 'deepseek-v4pro'
are still rewritten to 'deepseek-v4-pro'.

Refs: #2109

* feat(web): install download tile with arch detection, SHA256, China mirrors + companion binary fix (#2213)

* fix(web): download both codewhale and codewhale-tui binaries in install snippets

The SNIPPETS map only fetched one binary per platform, causing the
dispatcher to fail with MISSING_COMPANION_BINARY. Every arch now
downloads both codewhale AND codewhale-tui side-by-side.

- macOS/Linux: added second curl + combined chmod/xattr/mv for tui
- Windows: added second Invoke-WebRequest for codewhale-tui.exe
- VERIFY: PowerShell now hashes both binaries; Unix --ignore-missing
  covers all present binaries in a single sha256sum pass

* feat(web): add install download tile with arch detection, SHA256, and China mirrors (#2192)

* feat(sandbox/linux): process hardening — PR_SET_DUMPABLE, NO_NEW_PRIVS, RLIMIT_CORE (#2214)

* feat(sandbox/linux): add process hardening module — PR_SET_DUMPABLE, NO_NEW_PRIVS, RLIMIT_CORE (#2183)

* feat(sandbox/linux): seccomp filter + bwrap passthrough

- seccomp: BPF filter whitelisting safe syscalls, denying ptrace/mount/kexec
  and other dangerous syscalls. Uses raw BPF instructions via libc prctl to
  avoid external dependencies (#2182).
- bwrap: optional bubblewrap passthrough when /usr/bin/bwrap is present
  and [sandbox] prefer_bwrap=true in config. Creates read-only rootfs with
  write access limited to the working directory (#2184).
- landlock detect_denial extended to recognize seccomp SIGSYS/"Bad system
  call" patterns alongside existing Landlock EACCES/EPERM detection.
- SandboxManager gains prefer_bwrap field; set_prefer_bwrap on ShellManager.
- EngineConfig gains prefer_bwrap field, wired through main/ui/runtime_threads.
- Diagnostics now reports bwrap_available and cgroup_version.
- config.example.toml documents the prefer_bwrap key.

Pre-existing clippy fixes picked up in the same build:
- collapsible_if in ui.rs version-check
- cmp_owned in goal.rs test
- consecutive str::replace in normalize_auth_mode

Closes #2182, closes #2184

* docs: add cross-links to issue and PR templates in CONTRIBUTING.md (#2215)

- Link .github/ISSUE_TEMPLATE/bug_report.md and feature_request.md from
  the Reporting Issues section
- Link .github/PULL_REQUEST_TEMPLATE.md from the Pull Request Guidelines
  section

* feat(release): bundle platform archives with install scripts (#2216)

- Add bundle job to release workflow that creates per-platform archives
  (tar.gz for Linux/macOS, .zip for Windows) containing both codewhale
  and codewhale-tui binaries plus install scripts
- Create install.bat (Windows) — copies binaries to %USERPROFILE%\bin
- Create install.sh (Unix) — copies binaries to ~/.local/bin
- Windows gets a portable .zip variant without install script
- Release notes updated to promote archives as primary download method
- Individual binaries retained for npm wrapper and scripting

Closes #2193

* fix(web_search): fall back to DuckDuckGo when Bing returns zero results (#2130)

When the configured search provider is Bing and the query returns zero
results (common for technical/compound queries), fall through to the
DuckDuckGo path instead of reporting empty. A provenance message is
surfaced: "Bing returned no results; used DuckDuckGo fallback".

Also adds Security and Code of Conduct cross-links to CONTRIBUTING.md
per the sub-agent renovation (#2203).

* docs: SANDBOX.md threat model + RFCs for persistence and MCP + SandboxExecutor trait

- docs/SANDBOX.md: complete threat model describing each platform's sandbox
  (Seatbelt, Landlock, seccomp, process hardening, bwrap, Windows v1).
  Covers defense-in-depth layering, config keys, denial detection, limitations.
- docs/rfcs/2189-persistence-sqlite.md: RFC for SQLite migration (drafted by sub-agent)
- docs/rfcs/2190-mcp-modularization.md: RFC for MCP crate split into
  protocol/client/server with OAuth support
- crates/tui/src/sandbox/policy.rs: SandboxExecutor trait definition and
  SafetyLevel→SandboxPolicyBehavior mapping function with tests

Closes #2180, closes #2186, closes #2189, closes #2190

* feat: sandbox parity tests + remove sub-agent 100-turn cap

- Add sandbox parity tests covering platform detection, denial patterns,
  bwrap preference, and policy consistency across modes (#2187)
- Remove arbitrary 100-turn sub-agent cap: DEFAULT_MAX_STEPS changed
  from 100 to u32::MAX. Sub-agents now run until they produce a final
  text response, are cancelled by the parent, or hit a configured
  explicit budget (#2034)

Closes #2187, closes #2034
2026-05-26 09:52:22 -05:00
Hunter Bown c47ed896dc fix: DeepSeek-first v0.8.45 — CODEWHALE_* env aliases, remove public Kimi/Moonshot promotion
Closes #2164 (superseded).
2026-05-26 06:03:10 -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