Commit Graph

72 Commits

Author SHA1 Message Date
CodeWhale Bot 037aab9cf3 docs: align the v0.9.6 public surface
Document Work and To-do as the two product concepts, synchronize every shipped locale, publish the six-tool and typed-image contracts, and keep static web generation offline while live GitHub chrome refreshes after deployment.
2026-08-11 06:16:30 -07:00
CodeWhale Bot 5798de8b39 build(release): native musl for Linux ARM64, and reconciled copy
Three v0.9.5 benchmark tasks could not launch Codewhale at all:
mteb-leaderboard, mteb-retrieve, and pytorch-model-recovery run older ARM64
images, and the aarch64-unknown-linux-gnu artifact built on ubuntu-24.04-arm
requires GLIBC_2.39.

Release and nightly now build aarch64-unknown-linux-musl on the native ARM
runner, alongside the x64 musl build that has shipped since v0.8.65. Both
gain a static check (no ELF INTERP) plus a launch smoke on the matching
native runner, so a dynamically linked or non-starting binary fails the
build rather than the user's install. docs/INSTALL.md drops the arm64 glibc
floor section and describes the v0.9.6 matrix.

Also reconciles the copy the earlier commits invalidated: setup ratification
text and all 15 locales stop attributing execution doctrine to "mode
prompts", docs/MODES.md states Auto-Review's actual deterministic
allow/deny behavior, and the source-structure, dead-code, and
runtime-contract budgets are re-measured — the last locking down 25
decreased ceilings and the new mode-agnostic prompt-stage digests.
2026-08-09 00:52:42 -07:00
Hmbown c2c414ef73 docs: correct limits, /trust, and the Ollama default that were wrong in the unsafe direction
2026-08-04 model-facing-text audit. Four user-facing claims contradicted the
code, three of them in the direction that costs the user:

- CONFIGURATION.md said max_subagents 'defaults to 20 and is clamped to
  1..=20' in four places. Code: DEFAULT_MAX_SUBAGENTS = 64, MAX_SUBAGENTS =
  128 (config/subagent_limits.rs:13,17). Out-of-box concurrency is 3.2x the
  documented figure, and a user writing max_subagents = 40 to 'raise it to
  the max' was told it would clamp to 20 when it is honored in full. Same
  shape for max_admitted: documented ceiling 200, actual
  MAX_SUBAGENT_ADMISSION = 1024.
- Usage: codewhale [OPTIONS] [PROMPT]
       codewhale [OPTIONS] <COMMAND> [ARGS]

Commands:
  run           Run interactive/non-interactive flows via the TUI binary
  doctor        Run Codewhale diagnostics
  models        List live provider API models via the TUI binary
  speech        Generate speech audio with Xiaomi MiMo TTS models via the TUI binary [aliases: tts]
  sessions      List saved TUI sessions
  resume        Resume a saved TUI session
  rc            Launch an interactive session and hand it to the Codewhale web app
  fork          Fork a saved TUI session
  init          Create a default AGENTS.md in the current directory
  setup         Bootstrap MCP config and/or skills directories
  remote-setup  Generate a remote Codewhale agent deploy bundle (cloud + chat bridge)
  exec          Run a non-interactive prompt through the TUI runtime
  fleet         Manage durable Agent Fleet runs via the TUI runtime
  workflow      Run checked-in Workflows through a Lane Runtime backend
  lane          Manage running workflow instances (Lanes) and Runtime backends (#4176)
  review        Run a Codewhale-powered code review over a git diff
  apply         Apply a patch file or stdin to the working tree
  eval          Run the offline TUI evaluation harness
  mcp           Manage TUI MCP servers
  features      Inspect TUI feature flags
  serve         Run a local TUI server
  web           Open the first-class local browser client over the canonical Runtime API
  completions   Generate shell completions for the TUI binary
  login         Configure provider credentials
  logout        Remove saved authentication state
  auth          Manage authentication credentials and provider mode
  account       Sign in to your Codewhale account and manage account-scoped provider keys [aliases: cloud]
  mcp-server    Run MCP server mode over stdio
  config        Read/write/list config values
  model         Resolve or list available models across providers
  thread        Manage thread/session metadata and resume/fork flows
  sandbox       Evaluate sandbox/approval policy decisions
  app-server    Run the canonical runtime API / control plane (HTTP/SSE, mobile, stdio)
  completion    Generate shell completions
  metrics       Print a usage rollup from the audit log and session store
  update        Check for and apply updates to the `codewhale` binary
  help          Print this message or the help of the given subcommand(s)

Arguments:
  [PROMPT]...

Options:
      --config <CONFIG>

      --profile <PROFILE>

      --provider <PROVIDER>
          Provider selector; exec/fleet also accept configured custom provider identifiers
      --model <MODEL>

      --output-mode <OUTPUT_MODE>

      --verbosity <LEVEL>
          Controls transcript and output verbosity (normal, concise)
      --log-level <LOG_LEVEL>

      --telemetry <BOOL>
          Opt in to anonymous product telemetry for this run (default off; CODEWHALE_TELEMETRY=0 always wins) [possible values: true, false]
      --approval-policy <APPROVAL_POLICY>

      --sandbox-mode <SANDBOX_MODE>

      --api-key <API_KEY>

      --base-url <BASE_URL>

  -C, --workspace <DIR>
          Workspace directory for TUI file tools
      --mouse-capture

      --no-mouse-capture

      --skip-onboarding

      --no-project-config
          Skip loading project-level config, including the workspace-specific `[workspace]`/`[projects]` overlay from user config. Must appear before the subcommand; it is forwarded to the TUI ahead of the subcommand
  -c, --continue
          Continue the most recent interactive session for this workspace
  -p, --prompt <PROMPT>

  -h, --help
          Print help
  -V, --version
          Print version said '(1-20)' while main.rs clamps to 128. Here the doc
  was right and the help was wrong; both now say 1-128, default 64.
- MODES.md gave bare  as the enable command. config.rs:2278 maps
  "" | "status" | "list" to trust_status — bare /trust only REPORTS. A user
  reads the status block, believes trust is on, and escalates to Full Access
  when the next out-of-workspace operation fails. Now documents /trust on
  and says plainly that bare /trust does not enable anything.
- CONFIGURATION.md gave  as the Ollama default; the
  string appears nowhere in crates/. provider_defaults.rs:109 is
  deepseek-v4-flash. Self-hosted is where a bad default bites hardest.

Verified: limits read from config/subagent_limits.rs, /trust dispatch read
from config.rs:2278, Ollama default from provider_defaults.rs:109; tui
builds clean. Authored with agent assistance (Claude).
2026-08-04 11:57:18 -07:00
Hmbown 8869def98a fix(exec): resume headless turns after mid-stream network drops, exit EX_TEMPFAIL on infra failure
Terminal-Bench 2.1 (89 tasks, codewhale 0.9.4, deepseek-v4-flash):
5 of 7 NonZeroAgentExitCodeError forfeits were the identical failure —
the provider stream dropped mid-response ("error decoding response
body" after partial content), the #103 policy surfaced the warning and
failed the turn, and `codewhale exec` exited 1. regex-log passed the
smoke run and crashed in the full run: a nondeterministic transport
drop, not a task failure. Pi retries the same drops (332 retries, 0
crashes).

Engine (turn_loop + streaming policy):
- New should_resume_after_network_drop policy: in headless hosts
  (exec / stream-json; terminal_chrome_enabled = false) a network-class
  stream error after partial content now schedules a full request
  re-issue, bounded by MAX_STREAM_RETRIES, exactly like the #2990
  sleep-resume. The partial fragment was never committed and no tool
  from the incomplete response executed, so replaying from the last
  committed boundary cannot duplicate side effects. Interactive TUI
  keeps the #103 surface-the-warning behavior. No error event is
  emitted for attempts that will be retried; the budget-exhausted final
  attempt still reports the real error.

Exec exit semantics (main.rs):
- Terminal failures with error_category network/timeout now exit 75
  (EX_TEMPFAIL) instead of 1, so harnesses can distinguish retryable
  infra failures from genuine task failures (still exit 1). No error is
  masked: the stream-json error event, terminal metadata status=failed,
  and error_category are unchanged.
- Recoverable mid-turn error events (e.g. stream-stall warnings) no
  longer poison the exec run summary; the terminal TurnComplete carries
  the authoritative outcome. Previously any recoverable warning forced
  a non-zero exit even when the turn later completed.

Regression coverage:
- Pure policy tests for the headless/network/budget/cancel matrix.
- Engine-level tests with a flaky mock client: mid-stream drop recovers
  (2 requests, completed, fragment discarded); budget exhaustion fails
  with the real error and exactly one error event.
- Process-level acceptance (tests/exec_stream_drop_acceptance.rs): raw
  TCP server truncates the SSE body mid-content-length, reproducing the
  production decode error against the real binary — exit 0 after
  recovery, exit 75 with error-channel reporting after exhaustion.

Gates: cargo fmt --all --check; cargo check -p codewhale-tui; targeted
tests 18/18 + acceptance 2/2; full codewhale-tui suite 10141 passed,
21 failed — all in the known pre-existing env-key/qa_pty set
(provider-catalog API-key panics + PTY visual matrix), none in the
touched paths.
2026-08-03 10:07:10 -07:00
Hmbown 4d2458770a docs: truth pass — drop phantom config, dead keys, inverted defaults
Verified each claim against the code before editing:

- [capacity]: the 15-key controller was documented in CONFIGURATION.md
  and config.example.toml but has zero matches anywhere under crates/
  — silently ignored on parse. Removed, along with the link to the
  nonexistent docs/capacity_controller.md and two prose mentions.
- [context] seam keys: verbatim_window_turns, l1/l2/l3_threshold and
  seam_model are all 'Ignored (was: …)' in crates/tui/src/config.rs
  (2036-2048); docs presented them as a live opt-in. Both files now
  document only the live keys (enabled, project_pack) and mark the
  seam keys ignored.
- Settings keys: show_thinking / thinking_default_expanded /
  cost_currency were misfiled in config.example.toml; they belong to
  ~/.codewhale/settings.toml (settings.rs:344,414) and Config has no
  deny_unknown_fields, so users got silently ignored settings.
  Replaced with a pointer comment.
- Hotbar default was inverted in docs: KEYBINDINGS.md and
  config.example.toml claimed fresh configs show the default bar;
  since #3807 a missing hotbar key renders no bar (sidebar.rs:192-195).
- MCP tool naming: docs/MCP.md claimed mcp_deepseek_shell; the rule
  is mcp_{server}_{tool} (mcp.rs:3022) with default server name
  codewhale, i.e. mcp_codewhale_shell.
- MODES.md said 'DeepSeek-TUI'; memory_path bullet described the
  deleted legacy single-file fallback — both fixed for the native
  store (see 1135a1e65).

Evidence: cross-surface-tech-debt-audit-2026-08-03.md findings 74-80;
§11.3 docs-truth row.
2026-08-02 20:59:24 -07:00
Turisla 171f0b2a27 docs(permissions): publish and lock authorization order (#4980)
Publish the implemented authorization order and lock its precedence with regression coverage. Preserve the contributor's documentation, translation, and contract-test work.
2026-07-30 05:15:28 -07:00
Hmbown 77cdb0db6b docs(fleet): document saved Fleets and drop "operation" from role copy
Documents the exact Fleet schema, the Adaptive Reasoning Router as a saved
service a Fleet references by name, and the permission ceilings a member
carries, across FLEET.md, MODES.md, and SUBAGENTS.md.

Role copy stops calling a session "the operation". The operator directs the
overall work and assigns managers to Workflows; the manager runs one
Workflow. "Operation" read as a distinct product concept that does not
exist, and the hierarchy is easier to state without it.

`FleetRoster::from_members` supports run-scoped rosters that are not a merge
of the config layers — an exact Fleet's members are frozen at Workflow start
and must not pick up built-in or workspace profiles by name, which is what
would let a saved route be shadowed after the fact.

The `oracle`/`advisor` → `consultant` rename is already landed on this
branch, so the harvested terminology changes reduced to the docs and the
copy above; `worker_profile.rs` needed no change at all once its conflict
resolved to this branch's spelling.
2026-07-27 04:38:38 -07:00
Hunter B a60ee8994c docs(modes): keep shortcut contract machine-readable
Keep the canonical idle-composer wording contiguous so the public-surface contract can verify it without weakening the assertion.

Verified: web check:facts, check:docs, 143/143 tests, lint, and production build.
2026-07-26 16:52:27 -07:00
Hunter B feef1846e2 fix(settings): persist mode and effort atomically
Route interactive mode, reasoning, model, and permission changes through one busy-turn lock and a cross-process settings transaction. Atomic no-clobber migration, startup-write shutdown draining, localized failure receipts, and same-live selection outcomes keep the next launch truthful without blocking the TUI event loop.
2026-07-26 16:39:22 -07:00
Hunter B a77d2e5cdc fix(tui): make running-turn input shortcuts unambiguous
Give each composer chord one stable role: Enter sends or queues, Ctrl+Enter steers, newline chords always add a line, Ctrl+G/Ctrl+S only stash, and Tab never submits text. Empty Enter now promotes the oldest queued follow-up explicitly.

Keep modified Enter chords out of paste-burst suppression, align hints/help/locales/docs, and cover the contract with unit and PTY runtime regressions.
2026-07-26 14:04:39 -07:00
Hunter B 65f9c8dde8 feat(operate): Phase 1 doctrine, verify contract, starters, best-of-n
Rewrite OPERATE_MODE into hard conductor doctrine (goal → dispatch →
background → verify → synthesize). Dispatching sub-agents is the default
multitask path — no /multitask verb. Write-capable children get a spawn-time
VERDICT PASS/FAIL evidence contract; the agent tool description prefers
implementer/verifier pairs and worktrees. Ship operate_* starter workflows
and strengthen the best-of-n skill so winners apply only after PASS.
2026-07-24 00:41:08 -07:00
Hunter B 124c45ad39 docs(runtime): align canonical v0.9.1 surface
Document the exact nine default-active tools, deferred Web behavior, and replay-only aliases from the implemented runtime contract. Align current mode, permission-posture, Fleet vocabulary, fanout, MCP, provider, and operations guidance while preserving historical lifecycle provenance.

Signed-off-by: Hunter B <hmbown@gmail.com>
2026-07-21 17:20:35 -07:00
Hunter Bown de15b5c613 fix(tui): align permission postures and compact approvals (#4608)
Align permission posture behavior, compact the approval surface, make Alt/Option+V the sole details chord, register runtime MCP handlers consistently, and keep recursive plugin review hashing off worker stacks. Preserve user questions outside Auto-Review while failing non-bypassable Full Access holds closed without a modal.
2026-07-20 04:04:14 -05:00
Hunter B 61ba7eb03f fix(runtime): project permission question discipline per turn
Derive Ask, Auto-Review, Full Access, and read-only question guidance from the effective runtime approval posture after provenance narrowing. This keeps tool execution authority separate from authority to invent user intent and updates the user-facing mode contract.

Fixes #4511

Signed-off-by: Hunter B <hmbown@gmail.com>
2026-07-17 20:30:20 -07:00
Hunter B b424bc02c9 fix(tui): let Operate use ordinary tools
Remove the Operate-only parent tool blocker so its direct tool surface follows the same posture, shell, sandbox, ask-rule, and repository-law path as Act.

Keep Fleet delegation preferred for parallel and background work, preserve Plan's write boundary, and align prompt, docs, and website copy with the runtime.
2026-07-15 00:14:52 -07:00
Hunter B 9df62edf31 fix(tui): harden Operate worker handoffs
Let an approved root Operate worker edit and run only the fixed built-in verification surfaces while keeping raw shell, custom verifier commands, Cargo argv, and nested delegation approval-gated.\n\nDeduplicate idle and in-turn completion delivery, release claims when route setup fails before transcript recording, and prevent child-authored handoffs from inheriting standing Full Access authority.\n\nAlign Workflow and Fleet copy with the message-first Operate contract and distinguish profile availability from filesystem authority.
2026-07-14 04:53:29 -07:00
Hunter B 2c8342f61d docs(fleet): distinguish reusable profiles from workspace scope
Explain that personal Fleet profiles travel across repositories without widening a running operation. Direct multi-repository work through a shared parent workspace, and surface the same boundary in Fleet setup.

Signed-off-by: Hunter B <hmbown@gmail.com>
2026-07-14 04:31:40 -07:00
Hunter B 32a5a56efc fix(tui): make Operate a simple multitask surface
Accept ordinary messages and async agent dispatch, keep detached workflows available for genuinely staged work, and enforce the coordinator/worker boundary against actual tool capabilities rather than prose heuristics. Keep queued-task copy and docs aligned while preserving exact dispatch versus completion receipts.
2026-07-14 04:26:37 -07:00
Hunter B 3e3d08f9df docs: explain Operate receipts and Fleet scopes
Document the visible Operate cycle, its host-enforced Workflow boundary, and the project-versus-personal Fleet profile precedence and setup flow.
2026-07-14 04:26:37 -07:00
Hunter B 7e760f8ce2 feat(tui): close metamorphosis readiness gates
Add configurable top/left/right Ocean work-surface placement while preserving Classic and narrow-terminal fallbacks. Unify exact-route provider readiness across provider/model/Fleet/setup surfaces, keep saved private models visible, and prevent OAuth, endpoint, model, or custom-provider health leakage. Retire visible legacy mode vocabulary while retaining compatibility aliases and strengthen hermetic/product-language gates.
2026-07-12 20:21:42 -07:00
Hunter B c176f05d37 chore(release): prepare v0.8.68
Update workspace, npm, changelogs, docs, and generated site facts for the 0.8.68 release. Refresh the public mode and Workflow language to match the shipped Plan/Act/Operate surface.
2026-07-09 17:41:38 -07:00
CodeWhale Agent 60e6c188b2 Merge origin/main into work/v0.9.0-cutover (0.8.68 train reconcile)
Reconciled the 0.8.68 train with 80 upstream commits:
- state: kept the held-connection read_thread_goal shape for the
  thread-goal deadlock both sides fixed independently (upstream 5331d10d6)
- workflow tests: consolidated on upstream's workflow_test_retry_guard
  (locks + clears retry state); dropped the local rate_limit_window_guard
- run card: merged upstream's schema_errors field/count into the 0.8.68
  card; kept the Wave 5c contract (header owns lifecycle, no body
  status KV) and both run-card test variants deduped to the 5c-aware ones
- ui: kept the recovery-snapshot tick alongside upstream's
  should_tick_status_animation refactor
- qa_pty: header assertion accepts the new Act/Multitask/Operate labels

Full gate on the merged tree: workspace tests green (TUI 5976 passed,
qa_pty 7/7), clippy -D warnings clean, fmt clean.
2026-07-07 12:26:38 -07:00
CodeWhale Agent 9e0e29703d docs: 0.8.68 changelog, keybinding/mode docs, and release tracker
Record the 0.8.68 train in CHANGELOG [Unreleased]; update KEYBINDINGS
for Ctrl+T/Ctrl+Shift+T/Shift+Tab; mark YOLO deprecated in MODES; add
the release tracker with wave dispositions, deep-dive table, review-pass
verification evidence, and GitHub close-out ledger.
2026-07-07 12:13:59 -07:00
CodeWhale Agent 360dee9725 docs: fix stale fleet/subagent references
docs/FLEET.md: bare /fleet + roster aliases open the roster, not the wizard; the wizard now picks a concrete model (inherit or a provider model), not a 'model class' (per 04249e7dc). docs/MODES.md + docs/SUBAGENTS.md: subagent limits are 64 default / 128 ceiling (DEFAULT_MAX_SUBAGENTS / MAX_SUBAGENTS), not 20. AGENTS.md: generic scratch-branch version placeholder.

Signed-off-by: CodeWhale Agent <codewhale-agent@hmbown.local>
2026-07-06 15:42:23 -07:00
CodeWhale Agent 7fe9d4d845 docs(i18n): document /workflow cancel and retire the swarm term
Add 'cancel <run_id>' to CmdWorkflowDescription in all six locale packs so the localized help matches the command usage. Delete the orphaned CmdSwarmDescription key (zh-Hans) and reword the swarm prose in docs/FLEET.md and docs/MODES.md to reference Workflow/Fleet fan-out.

Signed-off-by: CodeWhale Agent <codewhale-agent@hmbown.local>
2026-07-06 14:26:19 -07:00
Hunter B d6da71bbde Rename public Workflow surfaces 2026-07-05 14:42:42 -07:00
Hunter B f02d3590f0 Alias Act to agent mode 2026-07-05 14:30:48 -07:00
CodeWhale Agent c187e86588 fix(shell): explain multiline exec_shell safety block
Keep the direct multiline exec_shell safety block in place, but make the blocked result explain that allow_shell only controls shell availability and does not disable built-in safety validation.

Document the supported workarounds for heredocs and embedded scripts: use single-line commands, write a script/file first, or use task_shell_start/background shell for long manual flows.

Fixes #3827.
2026-06-30 10:37:18 -07:00
Hunter B baa4b4b73f fix(tui): default interactive Agent shell to approval-gated on
Interactive TUI sessions should expose shell tools in Agent mode so normal approval prompts can gate command execution. Keep the GHSA-safe Config::allow_shell() default for durable tasks and explicit allow_shell=false overrides, and document the distinction in the mode guide.

Tests: cargo fmt --all --check

Tests: git diff --check

Tests: ./scripts/release/check-versions.sh

Tests: cargo test -p codewhale-tui --bin codewhale-tui --locked interactive_tui_defaults_agent_shell_to_approval_gated_on

Tests: cargo test -p codewhale-tui --bin codewhale-tui --locked allow_shell_defaults_to_false_when_unset

Tests: cargo test -p codewhale-tui --bin codewhale-tui --locked add_task_without_optional_fields_does_not_grant_shell_or_auto_approve

Tests: cargo test -p codewhale-tui --bin codewhale-tui --locked build_tool_context_uses_typed_shell_policy_per_mode

Tests: cargo test -p codewhale-tui --bin codewhale-tui --locked agent_tools_with_allow_shell
2026-06-28 18:36:13 -07:00
Hunter B 7b4d2911ea chore: clean public release surfaces
Remove public benchmark docs/scripts and the shipped SWE-bench CLI surface from the CodeWhale repo; benchmark work belongs outside this release repo.

Trim public docs that routed users into private maintainer runbooks, remove stale deleted-doc links, tone down release-facing copy, update CodeWhale crate descriptions, and expose the residue ledger as /debt while keeping quiet legacy dispatch compatibility.

Verification:\n- cargo fmt --all -- --check\n- git diff --check\n- ./scripts/release/check-versions.sh\n- cargo check -p codewhale-tui --bin codewhale-tui --locked\n- cargo test -p codewhale-tui --bin codewhale-tui --locked command_registry\n- cargo test -p codewhale-tui --bin codewhale-tui --locked every_command_alias_dispatches_to_a_handler\n- cargo test -p codewhale-cli --locked
2026-06-21 13:35:47 -07:00
CodeWhale Agent 562f7ccdb9 wip(subagents): simplify agent surface
WIP branch for v0.8.61 sub-agent cutover. Removes old lifecycle/tool-agent surface, runtime tag injection, heartbeat scaffolding, and capacity/coherence code, but release readiness is not final: interactive fanout can still freeze the TUI and needs follow-up investigation before shipping.
2026-06-15 17:27:00 -07:00
Hunter B 64409f7a96 fix(swarm): keep prompt fanout gated
Disables the old prompt-only /swarm fanout path and documents that swarm must wait for the durable Train-3 worker and goal re-dispatch substrate.

Refs: #3218
2026-06-14 12:00:39 -07:00
Hunter B e8b52ac57a feat(fleet): security/trust + headless-worker foundation; unify recursion depth
Lands the Agent Fleet security/trust boundary and the headless-worker bridge on
the v0.8.60 line, and collapses the sub-agent and fleet recursion model into a
single shared axis (Hunter steer: "not two moving targets").

Security & trust (#3165):
- FleetTrustLevel, FleetSecurityPolicy, FleetSecretRef (redacted), FleetWorkerAuth,
  FleetCapabilityGrant, FleetAlertEndpoint (redacted) in protocol.
- secrets: resolve_direct(key, source_hint) — fleet secret resolution, never logged.
- Host adapters refuse secret-bearing env keys; SSH uses SendEnv (no argv secrets).

Roles & delegation (#3167):
- fleet role -> SubAgentType mapping; reviewer/verifier default read-only.

Headless worker bridge (#3096/#3154, partial — still simulation, real spawn next):
- worker_runtime: FleetTaskSpec -> AgentWorkerSpec, status -> ledger events,
  exec hardening (mirrors #3027), parallel-safe read-only tool set (#2983).
- FleetManager carries an optional SharedSubAgentManager + exec config.

Recursion depth — ONE axis:
- codewhale_config now owns DEFAULT_SPAWN_DEPTH (3) + MAX_SPAWN_DEPTH_CEILING (3).
- sub-agent DEFAULT_MAX_SPAWN_DEPTH and the fleet clamp both source these consts.
- fleet default raised 1 -> 3 to match standalone sub-agents; root runs at depth 0,
  budget gates child delegation. End-to-end test proves a depth-0 fleet worker
  reaches 3 nested levels (afford >= 3).

Dogfood scaffolding (#3166, partial): docs/examples/fleet-dogfood.toml.

Tests green: codewhale-config fleet, codewhale-tui fleet (58), subagent max_depth;
cargo fmt + git diff --check clean; cargo check --workspace ok.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 01:10:30 -07:00
Hunter B cf910b7da2 feat(goal): persist thread goals through app server 2026-06-12 06:28:47 -07:00
Hunter B f99fff969a release: harden v0.8.59 readiness lane
Integrate the v0.8.59 release-readiness aggregate: command-boundary grouping, Responses schema hardening, Codex reasoning tiers, goal lifecycle/runtime sync, sub-agent stall guards, activity metadata rows, and provider metadata/auth fixes.

Credit surfaces are captured in the changelogs for Paulo, Nightt, yekern, and the Devin/Hunter integration work.

Co-authored-by: aboimpinto <1231687+aboimpinto@users.noreply.github.com>

Co-authored-by: nightt5879 <87569709+nightt5879@users.noreply.github.com>
2026-06-12 01:07:11 -07:00
Hunter B 311eb4002b feat(tui): add bounded restore snapshot listing
Harvested from PR #2513 by @cyq1017.

Co-authored-by: cyq1017 <61975706+cyq1017@users.noreply.github.com>
2026-06-03 21:02:45 -07:00
cyq c92f3c350b feat(tui): expose current model in turn metadata 2026-06-01 19:22:49 -07:00
Hunter Bown cbd6239f3d docs: mark agent shell tools approval-gated 2026-06-01 17:23:23 -07:00
cyq 9e9326990d docs: polish mode availability table 2026-06-01 17:23:04 -07:00
cyq fda2141b70 docs: clarify shell tool mode availability 2026-06-01 17:23:04 -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
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 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 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 a3acdbe70b docs(brand): rename to codewhale across READMEs and docs
Sweep brand mentions of `DeepSeek TUI` / `deepseek-tui` / bare
`deepseek` (the dispatcher binary) across all user-facing docs to
the new `codewhale` brand. The DeepSeek **provider** integration is
left untouched throughout: env vars (`DEEPSEEK_*`), model IDs
(`deepseek-v4-pro`, `deepseek-v4-flash`, `deepseek-chat`,
`deepseek-reasoner`), the `api.deepseek.com` host, the
`~/.deepseek/` config dir, and the `--provider deepseek` argument
value all keep the legacy spelling.

Anti-scope items deliberately left as the legacy `deepseek-tui`:

- Homebrew tap and formula (`Hmbown/homebrew-deepseek-tui`,
  `brew install deepseek-tui`, `scoop install deepseek-tui`). The
  tap rename ships separately.
- Docker image (`ghcr.io/hmbown/deepseek-tui`). Image-tag rename
  ships separately.
- CNB mirror namespace (`cnb.cool/deepseek-tui.com/DeepSeek-TUI`).
  Third-party hosted path.
- Security contact email (`security@deepseek-tui.com`).
- GitHub repo URL (`Hmbown/DeepSeek-TUI`).

New artifact:

- `docs/REBRAND.md` documents what changed, what didn't, the
  deprecation window, and migration commands for npm / Cargo /
  Homebrew / manual installs.

CHANGELOG entries:

- Root `CHANGELOG.md` and `crates/tui/CHANGELOG.md` both gain a
  new `[Unreleased]` section describing the rename and the one-
  release deprecation window. Historical entries are untouched.

Issue templates:

- `.github/ISSUE_TEMPLATE/bug_report.md` and `feature_request.md`
  refer to "codewhale" / `codewhale --version` instead of the old
  brand name in their environment fields.

The rebrand sweep was driven by a perl script with bulk patterns
(`deepseek-tui` -> `codewhale-tui`, `DeepSeek TUI` -> `codewhale`,
bare `deepseek` -> `codewhale` with provider/model/host/env-var/
config-path negative lookbehind/lookahead) followed by targeted
reverts for the anti-scope items above. Output was visually
reviewed file-by-file before committing.

Verified:

- `cargo check --workspace --all-targets --locked` — pass.
- `cargo test --workspace --all-features --locked` — pass (no
  test source touched here; suite stayed green to confirm no
  doc-from-string assertions broke).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 11:25:48 -05:00
Hunter Bown 2c642ec375 feat(session): fork conversations inside the TUI 2026-05-21 00:24:52 +08:00
Hunter Bown d5c45d962d chore(release): prepare v0.8.36
Sync to CNB / sync (push) Has been cancelled
Release / parity (push) Has been cancelled
Release / resolve (push) Has been cancelled
Release / build (deepseek-macos-x64, deepseek, macos-latest, x86_64-apple-darwin) (push) Has been cancelled
Release / build (deepseek-linux-arm64, deepseek, ubuntu-24.04-arm, aarch64-unknown-linux-gnu) (push) Has been cancelled
Release / build (deepseek-linux-x64, deepseek, ubuntu-latest, x86_64-unknown-linux-gnu) (push) Has been cancelled
Release / build (deepseek-macos-arm64, deepseek, macos-latest, aarch64-apple-darwin) (push) Has been cancelled
Release / build (deepseek-tui-linux-arm64, deepseek-tui, ubuntu-24.04-arm, aarch64-unknown-linux-gnu) (push) Has been cancelled
Release / build (deepseek-tui-linux-x64, deepseek-tui, ubuntu-latest, x86_64-unknown-linux-gnu) (push) Has been cancelled
Release / build (deepseek-tui-macos-arm64, deepseek-tui, macos-latest, aarch64-apple-darwin) (push) Has been cancelled
Release / build (deepseek-tui-macos-x64, deepseek-tui, macos-latest, x86_64-apple-darwin) (push) Has been cancelled
Release / build (deepseek-tui-windows-x64.exe, deepseek-tui.exe, windows-latest, x86_64-pc-windows-msvc) (push) Has been cancelled
Release / build (deepseek-windows-x64.exe, deepseek.exe, windows-latest, x86_64-pc-windows-msvc) (push) Has been cancelled
Release / docker (push) Has been cancelled
Release / release (push) Has been cancelled
Squash merge of work/v0.8.36-cache-hygiene into main.

All preflight gates passed: version-drift/check/lint/test (3073 pass, 0 fail) / CodeQL / GitGuardian / npm-smoke. Preparing the v0.8.36 release tag.
2026-05-14 00:31:18 -05:00
Hunter Bown 485ba7bbd4 chore(release): finish v0.8.33 polish 2026-05-12 22:03:47 -05:00
Hunter Bown 99c6b22e83 chore(release): v0.8.33 — sub-agent and RLM renovation with persistent sessions
- Persistent RLM sessions (rlm_open/rlm_eval/rlm_close) with bounded REPL helpers
- Fork-aware sub-agent sessions (agent_open/agent_eval/agent_close) with handle_read
- Shared handle_read storage with slice/range/count/JSONPath projections
- Slash-command routing: /rlm, /agent, /relay (/接力) for handoff prompts
- Sidebar renamed to "Work" tab, consistent across Plan/Agent/YOLO modes
- Tool papercuts: file_search excludes, grep_files strings, fetch_url JSON,
  edit_file fuzz, exec_shell merged stdout/stderr, revert_turn no-op reject
- CLI reasoning-effort honoured on non-auto exec routes (#1511 @h3c-hexin)
- Edit-file replacement boundaries clarified (#1516)
- Pandoc output validated before probing (#1523)
- Running turns steerable/repaintable (#1533, #1537)
- Tasks/Activity Detail calmer under load
- npm retry timeout hint (#1538 @reidliu41)
- Issue templates improved (#1525 @reidliu41)
- Shell: kill process group to prevent UI freeze (#828 @CrepuscularIRIS)
- TUI: ignore leaked SGR mouse reports in composer (#1421 @reidliu41)
- Footer: keep chips within available width (#1417 @Wenjunyun123)
- Session picker: scope Ctrl+R to current workspace (#1395 @LinQ)
- Removed stale competitive-analysis doc
- Prompts/docs teach only new tool names
2026-05-12 19:54:08 -05:00