Commit Graph

1517 Commits

Author SHA1 Message Date
Hunter Bown ea0a129f15 fix: add missing rename_mode/rename_input in test constructors 2026-05-24 15:28:37 -05:00
Hunter Bown b626bd7b47 docs: finalize CHANGELOG v0.8.44 2026-05-24 15:28:02 -05:00
Hunter Bown 1364ebb7ca feat(v0.8.44): session picker inline rename + checklist sidebar refresh
#1600: 'r' keybinding in session picker for inline rename.
Enter inline rename mode, type new title, Enter to confirm, Esc to cancel.
Updates the saved session metadata and refreshes the picker list.

#1787: checklist_write, checklist_update, update_plan now trigger
immediate Work sidebar refresh (previously only todo_write did).
2026-05-24 15:19:54 -05:00
Hunter Bown b9d04547ed docs(v0.8.44): README codew mention + CHANGELOG for #2011/#2010/#2013 2026-05-24 15:10:20 -05:00
Hunter Bown 95356714c8 feat(v0.8.44): npm codew alias binary wrapper
npm install -g codewhale now also provides the codew command.
Calls run('codewhale') — same download-and-forward pattern as
the existing codewhale.js and codewhale-tui.js wrappers.
2026-05-24 15:09:49 -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 425dadfd0f feat(v0.8.44): doctor output + remaining hardcoded path fixes
- Doctor: add 'State Root' section showing active root, legacy status,
  and dual-root detection
- Doctor (text + JSON): use codewhale_config resolver for config path
- deepseek_home_dir(): now resolves to CodeWhale home
- composer_stash: writes to ~/.codewhale/composer_stash.jsonl
- merge_project_config: checks .codewhale/ before .deepseek/
- Text/config paths default to .codewhale/ not .deepseek/
2026-05-24 15:07:41 -05:00
Hunter Bown a3f50fe851 feat(v0.8.44): P0 state root migration to ~/.codewhale with legacy compat
#2011: migrate app state to ~/.codewhale
- Add CodeWhalePaths: codewhale_home(), legacy_deepseek_home(),
  resolve_state_dir(), ensure_state_dir() in codewhale-config
- Config: resolve_config_path supports CODEWHALE_CONFIG_PATH env,
  default_config_path prefers ~/.codewhale/config.toml
- Project overlay: checks .codewhale/config.toml before .deepseek/
- Sessions: default_sessions_dir uses resolve_state_dir with fallback
- Workspace trust: writes to CodeWhale home via ensure_state_dir
- Init: ensure_deepseek_gitignored adds both .codewhale/ and .deepseek/
- .gitignore: adds .codewhale/

#2010: session artifact hygiene
- /save without path now writes to managed sessions dir instead of cwd
- Boot-time session prune via cleanup_old_sessions (MAX_SESSIONS=50)
- sessions_dir() public accessor for checkpoint path resolution

Fix: load_recent_checkpoint now uses manager.sessions_dir() instead
of hardcoding ~/.deepseek/sessions/checkpoints/
2026-05-24 15:04:06 -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
Hunter Bown 494988118c feat(prompts): Constitution of CodeWhale — tiered prompt architecture
- Replace flat base.md with Constitutional hierarchy: Preamble + 7 Articles
- We begin with Brother Whale — founding intelligence, not personality
- Dynamic model identity: {model_id} template injected at runtime
- Article VII: Hierarchy of Law — 9-tier conflict resolution
- Goal mode: remove read-only claim, add Goal Loop + Wakeup Check
- Personality (calm.md): Tier 8 subordination, cannot override constitution
- Memory: Tier 7 enforcement, imperatives treated as preferences
- Handoff: Tier 9 staleability, subordinate to evidence and user
- Approval prompts: Tier 2 Statute markers
- Authority recap appended at end of system prompt
- model_id threaded through PromptSessionContext → engine + UI
- 9 new tests: constitutional order, model injection, goal correctness
2026-05-24 12:07:30 -05:00
Hunter Bown 37a1d284a6 refactor(web): restrain homepage + tighten contribute around the 100-to-1 spine
Restructured the homepage so "What it actually is" sits directly before
"100-to-1", putting the spine back-to-back. Cut the redundant "Open
model platform" section (duplicated the provider chip list), the
fabricated "34k+ Stars / 98+ Contributors" cells in the Join block
(now uses real version / providers / license from facts.generated),
defensive "DeepSeek is not deprecated" copy, the speculative Unsloth
roadmap line, the stale hardcoded 2026-05-24 eyebrow, the margin
glyph, and a couple of hero pills. Today's Dispatch moves below the
diagram as a single editorial column (the live ticker already covers
recent activity). Contribute page drops the arbitrary "Section 05"
eyebrow and the double-language h1; recursive-harness intro mirrors
the homepage spine. EN/ZH parity preserved (6 sections home, 5
contribute, identical CTA structure).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 11:31:40 -05:00
Hunter Bown f592d7085a fix(tui): add file_tree_visible field to App for CI compile 2026-05-24 10:36:52 -05:00
Hunter Bown c86c8f4174 fix(tui): collapse collapsible if into match guard for Rust 1.95 clippy 2026-05-24 10:26:26 -05:00
Hunter Bown 8ba573e7e8 fix(tui): remove unused WLCOPY_BIN constant causing dead-code warning on Linux parity check 2026-05-24 09:08:45 -05:00
Hunter Bown 8e4d5b4ac9 Merge pull request #1988 — v0.8.43 release
release: prepare v0.8.43
2026-05-24 09:00:22 -05:00
Hunter Bown 22c2c4b818 fix(tui): drop thinking from cell_has_detail_target; credit README contributors
Fixes the macOS test failure on PR #1988 and the contributor-credit
gate from scripts/release/check-versions.sh.

cell_has_detail_target() was matching HistoryCell::Thinking, which
caused the activity footer to append " · ⌥+V raw" to thinking cells
that have no separate raw detail target. The detail-card flow only
exists for tool / sub-agent cells; thinking renders its own raw text
inline. Removing Thinking from the match arm restores the behavior the
existing
activity_footer_hint_surfaces_visible_thinking_without_raw_tool_hint
test asserts.

The CHANGELOG.md 0.8.43 section now credits the 30 contributors added
to README acknowledgements in this cycle, satisfying the README-vs-
CHANGELOG cross-check in check-versions.sh. crates/tui/CHANGELOG.md is
re-synced so the matching guard passes.

Verified locally on macOS:
- cargo fmt --all -- --check         : clean
- cargo clippy --workspace --all-targets --all-features --locked -D warnings : clean
- cargo test --workspace --all-features --locked : 41 suites, 0 failed
- ./scripts/release/check-versions.sh : Version state OK
- ./scripts/release/publish-crates.sh dry-run : all 14 crates OK
- cargo build --release --locked : clean

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 07:57:29 -05:00
Hunter Bown b0d48d8d03 style: use clamp() instead of min().max() pattern 2026-05-24 04:37:13 -05:00
Hunter Bown 54698849c8 fix(docs): refresh stale references and wire decision card rendering
- npm/codewhale/README.md: remove DeepSeek-first language
- docs/INSTALL.md: scoop install codewhale (not deepseek-tui)
- Wire decision card overlay rendering in main render loop
- Decision cards now appear centered on transcript when active
2026-05-24 04:31:35 -05:00
Hunter Bown 78d72842c3 docs(release): add thinking block toggle and sub-agent fix to CHANGELOG 2026-05-24 04:21:40 -05:00
Hunter Bown af59f7a732 fix(engine): drain late sub-agent completions before turn break (#1961)
Before the turn breaks at the thinking-only checkpoint, drain
any sub-agent completions that arrived between the last hold
check and now. If a child finished while we were running the
final status check, surface its sentinel immediately rather
than delaying it to the next turn.
2026-05-24 04:21:21 -05:00
Hunter Bown 805ec668f2 feat(tui): add keyboard toggle for thinking block collapse (#1972)
- Thinking cells now qualify as detail targets alongside tools and sub-agents
- Space key on empty composer toggles the focused cell's collapsed state
- Status message confirms expand/collapse action
- Builds on existing collapsed_cells HashSet from mouse context menu
2026-05-24 04:18:22 -05:00
Hunter Bown 078fa4556a docs(release): update v0.8.43 CHANGELOG with Goal mode, receipts, stall reasons, decision cards 2026-05-24 04:07:54 -05:00
Hunter Bown cc7c4a2ea9 feat(tui): add Goal mode and post-turn receipts
Goal mode (v0.8.43 truth-surface):
- New AppMode::Goal variant orthogonal to Plan/Agent/YOLO
- /goal command to set/complete objectives
- Goal status displayed in Work sidebar with elapsed time
- Alt+G keybinding to toggle Goal mode
- Mode parsed from /mode goal|4 command

Receipts (v0.8.43 truth-surface):
- ToolEvidence struct collects per-turn tool summaries
- Post-turn receipt generated on TurnComplete
- Receipt rendered as dimmed line at transcript tail
- Receipt/evidence cleared on new turn dispatch

Also:
- Fix AppMode::Goal exhaustive pattern coverage across 5 files
- Update doctor error message (deepseek → codewhale)
- Fix clippy::useless_format warning
2026-05-24 04:07:30 -05:00
Hunter Bown 243cfe5227 fix(tui): reference codewhale doctor in SSE timeout error message 2026-05-24 03:44:45 -05:00
Hunter Bown cdafc37a2f feat(tui): add decision card widget with keyboard navigation
Implements structured choice cards for the v0.8.43 truth-surface tracker.
When Brother Whale needs user input, it surfaces a bordered card with:
- A question prompt
- Numbered options with (default) marker
- Arrow/j/k navigation and 1-9 number-key shortcuts
- Enter to confirm, Esc to cancel
- Decision results surfaced as status messages

The widget compiles and the keyboard routing is wired into the main
event loop. Rendering overlay wire-up follows in the next commit.
2026-05-24 03:43:41 -05:00
Hunter Bown 94426f0082 feat(tui): classify and display stall reason in footer
When a turn has been running for > 30 seconds, the footer now shows
a classified stall reason suffix:
- 'waiting for model' — API streaming in progress
- 'tools executing' — active tool calls running
- 'sub-agents working' — child sub-agents in flight
- 'compacting context' — context compaction active
- 'background jobs running' — shell tasks executing
- 'waiting — no recent activity' — turn stalled with no classified work
2026-05-24 03:38:50 -05:00
Hunter Bown cf08a1e14b docs(web): track FAQ route and ignore generated artifacts 2026-05-24 03:37:08 -05:00
Hunter Bown 3e89ccf98e style: cargo fmt 2026-05-24 03:34:13 -05:00
Hunter Bown b773690b38 docs(release): add Tasks sidebar feature to v0.8.43 CHANGELOG 2026-05-24 03:33:06 -05:00
Hunter Bown 701257ef81 feat(tui): improve Tasks sidebar inspectability (#1975)
- Show fuller turn ID prefix (16 chars) for disambiguation in task_read/task_cancel
- Replace ambiguous 'X active (Y running)' with clear per-status breakdown
- Add y/Y yank affordances for copying turn ID and full status from Tasks panel
- Add yank hint text in Tasks panel footer
2026-05-24 03:31:53 -05:00
Hunter Bown 6306feb705 fix(build): restore compatible Cargo.lock dependency resolution
The previous  resolved allocative 0.3.6 which
pulls hashbrown 0.16, conflicting with starlark_map's hashbrown 0.14
dependency. Restore the original lockfile and update only workspace
crates to 0.8.43 via .
2026-05-24 03:23:01 -05:00
Hunter Bown e1218e3f0a docs: clarify sponsor links 2026-05-24 03:17:19 -05:00
Hunter Bown 92e48ce0fe docs(release): add v0.8.43 CHANGELOG entry with contributor credits 2026-05-24 03:12:28 -05:00
Hunter Bown 3dfc7fb716 docs(readme): refresh contributor count and acknowledgements
- MIN_KNOWN_CONTRIBUTORS: 91 → 98 (live GitHub count)
- page.tsx fallback: 91 → 98
- README Thanks section: add 30+ previously unlisted contributors
  whose PRs were merged since April 2026
- Sync contributor list across all three translations (en, zh-CN, ja-JP)
2026-05-24 03:12:24 -05: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 b94ccd3897 fix(installer): pause response streams to prevent checksum manifest race (#1860, thanks @jeoor) 2026-05-24 03:12:11 -05:00
Hunter Bown 8878ac07af fix(tui): harvest v0.8.43 candidate fixes
- grep_files now respects cancellation token (#1839, thanks @LING71671)
- Ctrl+Z restores last cleared composer draft (#1911, thanks @LING71671)
- Clipboard works on non-wlroots Wayland via wl-copy (#1938, thanks @ousamabenyounes)
2026-05-24 03:12:04 -05:00
Hunter Bown 77432a218b fix(ci): make CNB shim smoke find release binaries 2026-05-24 01:30:54 -05:00
Hunter Bown 2947eff9d1 fix(ci): satisfy Rust 1.88 clippy gate 2026-05-24 01:20:19 -05:00
Hunter Bown 93c525a200 fix(ci): use POSIX shell prologues in CNB 2026-05-24 00:59:36 -05:00
Hunter Bown 8a0c875d75 docs: clarify Fin and model auto-routing
- Separate model auto-routing from Plan/Agent/YOLO TUI modes across all
  READMEs and docs/MODES.md
- Introduce Fin as the fast thinking-off deepseek-v4-flash seam for
  routing, summaries, RLM child calls, and coordination work
- Document /goal as current session tracking (not a TUI mode), with note
  that a future Goal work surface should stay distinct from --model auto
- Extend deprecation shim timeline from 'one release cycle' to
  through v0.8.x in REBRAND.md and npm READMEs
- Fix selection_to_text test to expect inline thinking preview
  (short completed thinking now renders inline without Ctrl+O
  affordance)
2026-05-24 00:37:53 -05:00
Hunter Bown d757505d9f fix(tui): keep English turns from drifting after localized context 2026-05-24 00:02:19 -05:00
Hunter Bown 3487945620 fix(tui): show reasoning preview inline 2026-05-23 23:39:56 -05:00
Hunter Bown e8eaa5d38e style(tui): format reasoning effort mapping 2026-05-23 23:39:46 -05:00
Hunter Bown c85b6929e2 fix(tui): correct reasoning_effort mapping for OpenRouter and Novita
DeepSeek native accepts reasoning_effort: high | max, with low/medium
compat-mapping to high and xhigh mapping to max. OpenRouter and Novita
use the OpenAI-standard unified scale: none | minimal | low | medium |
high | xhigh.

Mapping (CodeWhale internal → wire):
  off     → DeepSeek: thinking disabled, OpenRouter: thinking disabled
  low     → DeepSeek: high,              OpenRouter: low
  medium  → DeepSeek: high,              OpenRouter: medium
  high    → DeepSeek: high,              OpenRouter: high
  max     → DeepSeek: max,               OpenRouter: xhigh

Previously the low/medium/high arm sent 'high' for all providers,
and the max arm sent 'max' for all providers — both wrong for
OpenRouter. Split each arm to preserve provider-native semantics.

Sources:
- https://api-docs.deepseek.com/guides/thinking_mode
- https://openrouter.ai/docs/guides/best-practices/reasoning-tokens
2026-05-23 23:35:30 -05:00
Hunter Bown 3711517246 fix(tui): send xhigh reasoning_effort for OpenRouter and Novita
OpenRouter and Novita use OpenAI-standard reasoning_effort values
(xhigh|high|medium|low|minimal|none), not DeepSeek-native (max|high).
The xhigh/max/highest arm previously sent 'max' for all providers,
causing HTTP 400 on OpenRouter. Split OpenRouter+Novita into their
own arm that sends 'xhigh' instead.
2026-05-23 23:24:18 -05:00
Hunter Bown 898cf2d1e1 docs(config): add missing openrouter and novita provider sections 2026-05-23 22:37:16 -05:00
Hunter Bown 17569c66ad feat(tui): add Brother Whale agent identity 2026-05-23 22:00:59 -05:00
Hunter Bown d1ecb251ea fix(tui): preserve CR paste line breaks 2026-05-23 21:24:52 -05:00
Hunter Bown 90a9dfbe7a fix(tui): preserve user message formatting 2026-05-23 21:11:26 -05:00