Commit Graph

112 Commits

Author SHA1 Message Date
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 Bown cef3b92964 feat(docs): agent-task issue template, labels, and runner protocol (#3021)
Adds the distributed intelligence infrastructure so remote agents
can autonomously execute v0.8.58 milestone issues:

- .github/ISSUE_TEMPLATE/agent-task.yml — GitHub issue form with six
  required sections (Goal, Scope, Key files, Acceptance criteria,
  Verification, Out of scope).  Auto-labels as agent-ready.

- docs/AGENT_RUNNER.md — pick → claim → worktree → exec → verify → PR
  loop with safety rules, label semantics, and the issue body format.

Labels agent-ready, agent-in-progress, needs-human already exist
(created during milestone setup).
2026-06-10 16:19:07 -07:00
Hunter B c58ef8ddff feat(release): generate the GitHub Release body from the CHANGELOG entry
The workflow hardcoded install boilerplate plus a contributor list that
had already drifted (v0.8.56's release thanked people 'for shaping
v0.9.0'). The body now comes from scripts/release/generate-release-body.sh:
static install/verify sections plus the tagged version's changelog section,
which already carries the per-release credits.
2026-06-09 23:44:57 -07:00
Hunter B 4a4ea63820 chore: add CODEOWNERS and dependabot config 2026-06-09 23:23:50 -07:00
Hunter B 9463266cb1 ci(web): make Cloudflare deploy manual 2026-06-08 08:33:26 -07:00
Hunter B 0854425dc6 ci(web): deploy public site from main 2026-06-08 08:30:00 -07:00
Hunter B 7344b88eac fix(web): sync frontend lockfile for CI 2026-06-08 08:28:10 -07:00
Hunter B c4ff9e5345 fix(release): allow asset publication despite docker failure 2026-06-08 07:47:48 -07:00
Hunter B fde931ee89 chore(release): allow trusted v0.9 contributors 2026-06-06 19:56:11 -07:00
Hunter B f2159b7827 docs(release): honor v0.9 contributor credits 2026-06-06 19:45:28 -07:00
Hunter B 9b500a7b91 Prepare v0.9.0 release build 2026-06-06 19:39:02 -07:00
Hunter B 6b1de930af chore(release): credit direct v0.9 community merges 2026-06-06 10:49:25 -07:00
Hunter Bown 2561a54df0 docs(release): close v0.9 credit rollback gates (#2856) 2026-06-06 02:24:16 -07:00
Hunter Bown 7dfc81b4bb chore: allowlist AdityaVG13 for v0.9 stewardship
Adds @AdityaVG13 to the contribution-gate allowlist now that WhaleFlow #2482/#2486 have been harvested into the maintained v0.9 IR/TraceStore foundation with public credit.
2026-06-05 20:12:04 -07:00
Hunter B 54cbcd0d8e chore: map AdityaVG13 for harvested credit
Adds the GitHub noreply and source commit email aliases needed for the WhaleFlow harvest co-author trail to pass the contributor-credit gate.
2026-06-05 19:21:17 -07:00
Hunter B ddaaa4dea8 docs: credit recurring v0.9 contributors 2026-06-05 18:57:57 -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 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
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 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 6a7063c912 ci(ohos): guard unsupported target dependencies 2026-06-03 23:41:21 -07:00
Hunter B 002f8f0ba1 ci: enforce mappable co-author credit
Add AUTHOR_MAP plus a lightweight co-author trailer checker so harvested commits use numeric GitHub noreply identities, reject bot/tool trailers, and require machine-readable credit when a commit says it was harvested from a PR.

Also normalize the local unpushed v0.9 harvest range so existing contributor authors/trailers for HUQIANTAO, Implementist, jrcjrcc, xyuai, cyq1017, idling11, and shenjackyuanjie use GitHub-mappable identities before the branch is published.

Validation: python3 scripts/check-coauthor-trailers.py --author-map .github/AUTHOR_MAP --range origin/main..HEAD --check-authors; python3 -m py_compile scripts/check-coauthor-trailers.py; ruby -e 'require "yaml"; YAML.load_file(".github/workflows/ci.yml")'; git diff --check; negative in-process validation for raw email, missing harvested credit, and bot author cases.
2026-06-03 21:07:33 -07:00
Hunter B 5f51f89c76 chore: seed APPROVED_CONTRIBUTORS with recurring contributors (>=2 merged PRs) 2026-06-03 21:02:46 -07:00
Hunter B 445a7c8171 ci: avoid duplicate PR gate comments 2026-06-03 21:02:45 -07:00
Hunter B 42d27c0095 ci: soften contribution intake gates 2026-06-03 21:02:45 -07:00
Nightt ea7fc474a9 fix: paginate pending allowlist PR lookup 2026-06-01 21:27:39 -07:00
Nightt dfe1884702 fix: add contribution gate dry run mode 2026-06-01 21:27:39 -07:00
Nightt c8c20e0931 fix: remove dead issue gate guard 2026-06-01 21:27:39 -07:00
Nightt 50590761ac fix: read contribution allowlist from default branch 2026-06-01 21:27:39 -07:00
Nightt dcf8350ff8 fix: harden contribution gate bypasses 2026-06-01 21:27:39 -07:00
Nightt 97c615ca9c chore: add contribution gate workflows 2026-06-01 21:27:39 -07:00
Hunter B 63b7c189b8 fix(release): ship NSIS installer artifact 2026-06-01 19:34:25 -07:00
Hunter B 998af56d6a chore(release): harden deepseek-tui deprecation path 2026-06-01 06:01:03 -07:00
Hunter B 31f34c5df2 ci(release): attach windows npm launcher asset 2026-06-01 03:58:42 -07:00
Hunter B 2698b848b3 ci(release): use ubuntu ports for linux arm64 packages 2026-06-01 03:17:36 -07:00
Hunter B 7d67654737 ci(release): cross-compile linux arm64 assets 2026-06-01 03:02:58 -07:00
HUQIANTAO 7519914e15 ci: add clippy and docs checks to PR CI workflow (#2443)
* ci: add clippy and docs checks to PR CI workflow

- Add 'cargo clippy --workspace --all-features --locked -- -D warnings' step
  to the lint job (previously only ran in release.yml)
- Enable docs job on all triggers (push/PR), not just weekly schedule
  to catch broken doc links before merge
- Add clippy component to rust-toolchain setup

* ci: revert docs job to schedule-only (pre-existing broken links in tui crate)

* ci: install Linux deps before clippy

---------

Co-authored-by: Hu Qiantao <huqiantao@HudeMacBook-Air.local>
Co-authored-by: Hunter B <hmbown@gmail.com>
2026-05-31 11:01:11 -07:00
HUQIANTAO 61e1023b3a ci: add web frontend lint and type check workflow (#2444)
Add a dedicated GitHub Actions workflow for the Next.js web frontend
that runs on changes to the web/ directory:

- ESLint checks via 'npm run lint'
- TypeScript type checking via 'tsc --noEmit'
- Runs on push to main and PRs targeting main
- Uses npm cache for faster dependency installation

Co-authored-by: Hu Qiantao <huqiantao@HudeMacBook-Air.local>
2026-05-31 10:51:44 -07:00
HUQIANTAO 72e8ca45de feat: add mobile smoke tests and QR code for mobile URL (#2403)
* feat: add mobile smoke tests and QR code for mobile URL

#2396: Add scripts/mobile-smoke.sh that launches the compiled binary on
loopback ports and verifies the mobile surface through real HTTP requests:
- Token auth (401/200, Bearer, query param, approval 404)
- Insecure mode (no token required)
- Binding warnings (0.0.0.0, LAN URL hint)

Add mobile-smoke job to CI workflow.

#2397: Add --qr flag to 'codewhale serve --mobile' that renders a
terminal QR code for the mobile URL. Uses the LAN IP when available,
falls back to 127.0.0.1. Adds qrcode crate (pure Rust, no C deps).

* fix: address review feedback on mobile smoke tests

- Fix Test Group 3 subprocess capture: use temp file instead of command
  substitution to avoid hanging and subshell variable isolation
- Allow BINARY path to be overridden via BINARY env var
- Add libdbus-1-dev system dependency to CI job for ubuntu build

* fix: pass auth header in mobile smoke status helper

* fix: send approval JSON in mobile smoke

---------

Co-authored-by: Hu Qiantao <huqiantao@HudeMacBook-Air.local>
Co-authored-by: Hunter B <hmbown@gmail.com>
2026-05-31 02:04:32 -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 bace2523e1 fix(release): pin riscv64 dispatch source ref 2026-05-30 22:13:20 -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
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
PMX b4d1bce58b fix: Homebrew formula downloads legacy shim instead of codewhale dispatcher (#2105)
The formula downloaded deepseek-macos-arm64 (the deprecation shim) as the
main binary.  After the rebranding, deepseek is just a wrapper that spawns
codewhale, but codewhale was never installed — causing "codewhale not
found on PATH" for every Homebrew user.

Now the formula downloads codewhale-* as the primary binary and installs
all four artifacts: codewhale, codewhale-tui, deepseek (legacy shim), and
deepseek-tui (legacy TUI shim).

Closes #2104

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 10:30:25 -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 e1218e3f0a docs: clarify sponsor links 2026-05-24 03:17:19 -05:00
Hunter Bown 41590edfd8 feat(tools): github_close_pr, handle_read redirection, shell/sidebar polish
- New github_close_pr tool distinct from github_close_issue; proper PR wording
  in tool output, audit records, and gh pr close (not issue close)
- handle_read detects art_/call_/SHA refs and points to retrieve_tool_result
  with copy-pasteable hints; error messages show correct tool for each ref type
- Shell delta tool results include the command field so the UI can resolve
  task_id-only exec cells when the completion metadata arrives
- Sidebar background shell tasks show the actual command on the primary row
  instead of just the task ID; task ID stays available as dim detail
- Tool routing falls back to task_id when exec_shell_wait has no command,
  then updates when the completion carries command metadata
- Plan mode prompt explains update_plan as the handoff signal; model waits
  for user action instead of continuing to tool around
- Base prompt clarifies handle_read scope (var_handles only) vs
  retrieve_tool_result (artifacts/tool-result refs)
- New tests: close_pr_schema, close distinction wording, handle_read artifact
  detection, shell_wait task_id fallback, sidebar background task labels
2026-05-23 16:49:06 -05:00
Hunter Bown 668c700192 ci(release): suppress docker build record artifact 2026-05-23 14:53:11 -05:00
Hunter Bown 5fa24733e9 chore(rebrand): update repository links for CodeWhale 2026-05-23 14:07:36 -05:00