Commit Graph

2560 Commits

Author SHA1 Message Date
Hunter Bown 6b01cccc65 Merge PR #3038 from Hmbown: make Ctrl+B directly background the active foreground shell
fix(tui): make Ctrl+B directly background the active foreground shell
2026-06-10 22:20:27 -07:00
Hunter Bown d9c5dac55b Merge PR #3037 from Hmbown: compact tool-call transcript rendering — suppress boilerplate cells
fix(tui): compact tool-call transcript rendering — suppress boilerplate
2026-06-10 22:20:18 -07:00
Hunter Bown 49890d1244 Merge PR #3036 from Hmbown: hide internal IDs from normal UI — stable labels for turns and agents
fix(tui): hide internal IDs from normal UI — stable labels for turns and agents
2026-06-10 22:20:06 -07:00
Claude 418ad5b744 Merge origin/main into v0.8.58-3030-hide-internal-ids — combine #3030 stable agent labels with #3033 AgentProgress redraw throttle (both kept in App state and the AgentProgress arm) 2026-06-11 05:19:57 +00:00
Hunter Bown eb610c83ee Merge PR #3035 from Hmbown: throttle AgentProgress redraws to prevent freeze under subagent load
fix(tui): throttle AgentProgress redraws to prevent freeze under subagent load
2026-06-10 22:11:17 -07:00
Hunter Bown 8fadd764d2 Merge PR #3042 from Hmbown: exec --allowed-tools, --disallowed-tools, --max-turns, --append-system-prompt
feat(exec): add --allowed-tools, --disallowed-tools, --max-turns, --append-system-prompt
2026-06-10 22:11:07 -07:00
Hunter Bown 20fa626fb8 Merge PR #3041 from Hmbown: harvest error-message fixes — better tool denial and provider errors
fix: harvest error-message fixes from PR #2933 — better tool denial + subagent conflict messages
2026-06-10 22:11:00 -07:00
Hunter Bown b11d8d55c5 Merge PR #3044 from Hmbown: remote-smoke droplet loop — gh CLI, swapfile, agent-session bumps
feat(remote-smoke): bump to v0.8.57, add gh CLI, swapfile, agent-session.sh, autonomous loop docs
2026-06-10 22:10:51 -07:00
Hunter Bown f68059b9b3 Merge PR #3043 from Hmbown: agent-task issue template, labels, and runner protocol
feat(docs): agent-task issue template, labels, and runner protocol
2026-06-10 22:10:42 -07:00
Claude f55c54c487 ci: re-run after known Windows test flake (no code changes)
Co-Authored-By: Claude <noreply@anthropic.com>
https://claude.ai/code/session_018zaP8vUfTAsrE38L6h6fw5
2026-06-11 04:46:55 +00:00
Hunter Bown 81b060928b Merge PR #2579 from encyc: Phase 4 — replace Session.messages Vec with AppendLog
refs(#2264): Phase 4 — replace Session.messages: Vec<Message> with AppendLog
2026-06-10 20:10:20 -07:00
Hunter Bown 544b44bd98 Merge PR #2892 from gordonlu: localize sandbox elevation dialog across 7 locales
feat(i18n): localize sandbox elevation dialog across 7 locales
2026-06-10 20:10:05 -07:00
Claude 033132a735 fix(tui): #3032 residuals — running-exec hint now says Ctrl+B backgrounds the command; Ctrl+B documented in KEYBINDINGS.md and runbook updated for menu removal; Cannot-background message names the reason (interactive / non-shell tool / nothing running)
Co-Authored-By: Claude <noreply@anthropic.com>
https://claude.ai/code/session_018zaP8vUfTAsrE38L6h6fw5
2026-06-11 02:40:07 +00:00
Claude 9de6c9d125 docs(remote-smoke): add gh auth setup-git + git identity to the autonomous-loop setup; qualify the AGENT_RUNNER.md cross-reference (file lands in #3043) with an on-branch fallback (#3022)
Co-Authored-By: Claude <noreply@anthropic.com>
https://claude.ai/code/session_018zaP8vUfTAsrE38L6h6fw5
2026-06-11 02:31:34 +00:00
Claude e4ea208d53 docs(runner): fix resume example — exec has no 'latest' session alias; use --continue (#3021)
Co-Authored-By: Claude <noreply@anthropic.com>
https://claude.ai/code/session_018zaP8vUfTAsrE38L6h6fw5
2026-06-11 02:31:00 +00:00
Claude 5fb41cc209 test(errors): add #3020 test extensions — Plan-mode denial passes through verbatim, bare/model denials get the suffix; Model-Not-Exist + OpenAI-style rejections annotated; conflict error includes elapsed time; tighten mode-word predicate so 'model' no longer matches
Co-Authored-By: Claude <noreply@anthropic.com>
https://claude.ai/code/session_018zaP8vUfTAsrE38L6h6fw5
2026-06-11 02:30:30 +00:00
Claude b6e88d2d34 fix(tui): #3031 audit fix — map the literal '(no output)' ToolResult placeholder to None at the routing layer (exec + generic cells) so compact-mode suppression actually fires; add helper + render-mode tests
Co-Authored-By: Claude <noreply@anthropic.com>
https://claude.ai/code/session_018zaP8vUfTAsrE38L6h6fw5
2026-06-11 02:18:46 +00:00
Claude 5a71d644f5 fix(tui): #3030 audit fixes — nickname beats generated Agent-N label; status bar uses stable labels (with raw-id fallback) for spawn/progress/complete; drop truncated raw id from compact detail line; add label/turn/step-counter tests
Co-Authored-By: Claude <noreply@anthropic.com>
https://claude.ai/code/session_018zaP8vUfTAsrE38L6h6fw5
2026-06-11 02:13:30 +00:00
Claude df1b35ba0f fix(tui): #3033 audit fix — throttled AgentProgress no longer cancels redraws owed to other events in the same drain batch; restore pre-event accumulator value; extract agent_progress_redraw_permitted + unit tests
Co-Authored-By: Claude <noreply@anthropic.com>
https://claude.ai/code/session_018zaP8vUfTAsrE38L6h6fw5
2026-06-11 02:03:17 +00:00
Claude c15e937096 fix(exec): wire --disallowed-tools into the gate chain (deny wins over allow), filter the advertised tool catalog, honor --append-system-prompt in needs_engine, surface max-steps notice in text mode; add clap/gate/catalog tests (#3027)
Co-Authored-By: Claude <noreply@anthropic.com>
https://claude.ai/code/session_018zaP8vUfTAsrE38L6h6fw5
2026-06-11 00:31:05 +00:00
Hunter Bown e1a61f445e fix(tui): remove ShellControlView menu now unreachable after direct Ctrl+B
Ctrl+B backgrounds the foreground shell directly (#3032), leaving the
two-step shell-control modal dead code that fails clippy -Dwarnings.
Delete ShellControlView/ShellControlChoice, the ModalKind and ViewEvent
variants, and open_shell_control; repoint the default-paste regression
test at HelpView; update the Ctrl+B keybinding description in all
locales to describe the new direct-background behavior.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 16:49:30 -07:00
Hunter Bown c98b7ea42c fix: harvest error-message fixes from PR #2933 — better tool denial + subagent conflict messages (#3020)
Three targeted error-message improvements extracted from community
PR #2933 (author cy2311), with additional model-not-found annotation:

1. dispatch.rs format_tool_error: pass through self-explanatory messages
   that already name the cause (mode switch, allow_shell, feature flag,
   denied by user) instead of appending a conflicting generic suffix.
   Fixes the Plan-mode double-message (#2657).

2. subagent/mod.rs session-name conflict: include elapsed time
   (started Ns ago / NmNs ago) so the parent can distinguish a live
   worker from a stale/failed earlier spawn (#2656).

3. subagent/mod.rs annotate_child_model_error: catch model-not-found
   patterns (Model Not Exist, does not exist, no such model, etc.) in
   the raw error text even when the taxonomy classifies them as
   Internal rather than Authorization/State (#2653).

Closes #2653, #2656, #2657.
Credit: cy2311 for the dispatch.rs and subagent conflict hunks from #2933.

Co-authored-by: cy2311 <29836092+cy2311@users.noreply.github.com>
2026-06-10 16:41:55 -07:00
Hunter Bown b433989cc3 style: cargo fmt
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 16:40:27 -07:00
Hunter Bown 710ddf45eb style: cargo fmt
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 16:40:20 -07:00
Hunter Bown 06d680240c style: cargo fmt
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 16:40:17 -07:00
Hunter Bown 5483e1553d feat(remote-smoke): bump to v0.8.57, add gh CLI, swapfile, agent-session.sh, autonomous loop docs (#3022)
- setup-vm.sh: bump RELEASE_TAG default to v0.8.57, add gh CLI install
  step (official APT repo) and 4G swapfile creation (idempotent)
- agent-session.sh: new sourceable helper that exports the provider key
  from /etc/codewhale/runtime.env for interactive agent sessions
- README.md: update version refs, add agent-session.sh to layout, add
  Autonomous agent loop section with full pick->PR commands

The droplet ops (binary upgrade, PAT setup, first end-to-end issue run)
are documented as the next steps for the operator.
2026-06-10 16:20:57 -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 Bown dbd9b9670d feat(exec): add --allowed-tools, --disallowed-tools, --max-turns, --append-system-prompt (#3027)
Headless exec hardening for benchmark/CI/droplet use:
- New CLI flags: --allowed-tools, --disallowed-tools, --max-turns, --append-system-prompt
- Add disallowed_tools to EngineConfig + command_denies_tool() helper
- run_exec_agent threads all four flags into EngineConfig and Op::SendMessage
- needs_engine now includes flag presence for standalone exec use
2026-06-10 16:17:33 -07:00
Hunter Bown 502fb04c23 fix(tui): make Ctrl+B directly background the active foreground shell (#3032)
Previously Ctrl+B opened a two-step ShellControlView menu (Background /
Cancel).  Now it directly calls request_foreground_shell_background(),
backgrounding the running foreground shell in one keystroke.

When no foreground shell is running, the existing status message
("No foreground shell command to background") provides the hint.

The ShellControlView and open_shell_control() remain available as a
programmatic entry point for views/tests.
2026-06-10 15:59:40 -07:00
Hunter Bown 7fef919765 fix(tui): compact tool-call transcript rendering — suppress boilerplate (#3031)
Three targeted changes to reduce low-value detail in the default
compact/Live transcript view:

1. ExecCell: suppress "(no output)" line in Live mode.  The success
   header already conveys the outcome; Transcript mode keeps it for
   exports/clipboard/pager.

2. ExecCell: suppress sub-second timing in Live mode.  Calls under 1s
   show no timing line; Transcript mode always shows exact timing.

3. render_preserved_output_mode: suppress "(no output)" for empty output
   in Live mode.  Same rationale — the header carries the signal.

Full command text, complete output, and exact timing remain available
in Transcript mode (pager, clipboard export, Alt+V detail view).
2026-06-10 15:57:08 -07:00
Hunter Bown ec0789daf4 fix(tui): hide internal IDs from normal UI — stable labels for turns and agents (#3030)
Three changes to replace raw UUIDs/hex-ids with stable user-facing labels:

1. Turn label: Add turn_counter to App, display "Turn N" instead of the
   raw runtime_turn_id UUID prefix.  Full UUID preserved in hover text.

2. Agent labels: Add agent_counter + agent_label_map to App.  Populated
   on AgentSpawned; sidebar rows use "Agent 1", "Agent 2" etc. instead
   of agent_<hex>.  Nicknames and user-assigned names still take priority.

3. Step counter: Add format_step_counter() helper.  When max_steps is
   u32::MAX (the unbounded sentinel), renders "step 16" instead of the
   meaningless "step 16/4294967295".  Concrete step budgets still show
   the denominator.
2026-06-10 15:52:34 -07:00
Hunter Bown 7b1446f7b0 fix(tui): throttle AgentProgress redraws to prevent freeze under subagent load (#3033)
When 4+ sub-agents run concurrently, each AgentProgress event triggers
a full terminal redraw via received_engine_event → needs_redraw.  The
render loop saturates, sidebar recomputation dominates the frame budget,
and terminal input events (including Ctrl+C) are starved.

Limit progress-driven redraws to at most one per 100ms per agent.  The
status-animation timer (80ms cadence) still guarantees sidebar updates.
Agent state is recorded immediately; the sidebar picks it up on the next
permitted redraw.

Adds last_agent_progress_redraw field to App to track throttle state.
2026-06-10 15:47:35 -07:00
Justin Gao ebe828af27 fix: remove useless .into() on SavedSession.messages clone (#2579)
SavedSession.messages is Vec<Message>, not AppendLog — .clone() already
returns Vec<Message>, so .into() was a no-op conversion that triggered
clippy::useless_conversion in CI lint.
2026-06-10 17:19:43 +08:00
Justin Gao 08904fde47 refs(#2264): Phase 4 — replace Session.messages: Vec<Message> with AppendLog (#2579)
- Wire AppendLog as the backing store for Session.messages
- Add Deref, From impls, and explicit mutation methods to AppendLog
- Narrow API: remove DerefMut, add push_batch/truncate_to/trim_front/clear/last_mut
- Update all direct message assignments to use .into() conversions
- Update tests to deref through AppendLog for comparisons

Rebased onto upstream/main (v0.8.57) to resolve merge conflicts.
2026-06-10 16:55:11 +08:00
Hunter B b23067bacd release: v0.8.57 — sleep-resume turns, docker fix, one-command release prep, changelog diet 2026-06-10 00:02:51 -07:00
Hunter B f9c9764265 fix(tests): deflake prompt cache and MCP SSE mock-server tests
- prompt_persist tests wrote through the developer's real
  ~/.codewhale/prompt_cache and raced each other (the eviction test could
  delete another test's entry). cache_dir() now honors
  CODEWHALE_PROMPT_CACHE_DIR and the tests run serialized against private
  tempdirs.
- The raw TCP mock servers in mcp tests answered one request per socket
  but never advertised 'Connection: close', so reqwest pooled dead
  keep-alive connections and retried POSTs failed under parallel-suite
  load with 'connection closed before message completed' (~50% failure
  rate on the full suite).
2026-06-10 00:00:54 -07:00
Hunter B ddd5df4b9b chore: drop stale allow(dead_code) on AgentOpenTool (registered since v0.8.33) 2026-06-09 23:45:58 -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 4465459b69 feat(release): one-command version bump via prepare-release.sh; close version-drift gaps
- scripts/release/prepare-release.sh bumps workspace + crate pins + npm
  wrapper + README install tags, refreshes Cargo.lock, regenerates the
  TUI changelog slice and web facts, then runs check-versions.sh
- check-versions.sh now also gates web/lib/facts.generated.ts and the
  README install-tag examples (both drifted silently before)
- .cnb.yml validates the pushed tag against Cargo.toml before generating
  mirror release notes
- RELEASE_CHECKLIST/RUNBOOK updated accordingly (v0.8.56 needed 9 fix
  commits for exactly these sync points)
2026-06-09 23:43:15 -07:00
Hunter B 717d728163 feat: survive system sleep mid-turn — detect the suspend gap and retry the request (#2990)
When the host sleeps while a model response is streaming, the connection
dies on wake with 'Stream read error: error decoding response body' and
the turn was lost. The engine now stamps every stream chunk with both
monotonic and wall-clock time; Instant pauses across a suspend while
SystemTime does not, so a >10s divergence on a stream error identifies a
sleep/wake cycle. In that case the partial output is discarded and the
identical request is re-issued (sharing the existing MAX_STREAM_RETRIES=3
budget) instead of failing the turn. Ordinary network flakes keep the
deliberate no-retry-after-content policy from #103.
2026-06-09 23:40:42 -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 B 6dcdc19077 chore: drop unused deps (tracing-appender, zeroize, rustls in release), orphaned vendor lockfile and one-off verify_task.sh 2026-06-09 23:33:47 -07:00
Hunter B 44c13eb63f fix(release): check-versions validates the generated TUI changelog slice, not byte equality
The packaged changelog is now a recent-releases slice produced by
scripts/sync-changelog.sh (which gains a --check mode); also restore the
SECURITY.md contact line the version gate guards, and finish the stale
binary-name sweep (--bin codewhale examples, qa harness doc).
2026-06-09 23:32:40 -07:00
Hunter B 626032ad6b fix(devcontainer): use codewhale user/name/mount instead of pre-rebrand deepseek 2026-06-09 23:30:53 -07:00
Hunter B 26947bd407 fix(docker): stop copying legacy deepseek binaries that no longer exist
The release docker job failed on 'cp: cannot stat .../release/deepseek'.
Legacy entrypoints survive as symlinks to the codewhale binaries.
2026-06-09 23:30:45 -07:00
Hunter B 68aee8409f chore: move HarmonyOS clang wrappers to scripts/ohos/ 2026-06-09 23:24:13 -07:00
Hunter B 4a4ea63820 chore: add CODEOWNERS and dependabot config 2026-06-09 23:23:50 -07:00
Hunter B a2bf9f806a chore: gitignore benchmark results/ and __pycache__ under scripts/ 2026-06-09 23:23:37 -07:00
Hunter B 6551106e79 docs: move internal design docs into docs/rfcs/ 2026-06-09 23:23:25 -07:00
Hunter B 854274de1d docs: remove internal US VM setup notes 2026-06-09 23:23:03 -07:00