2803 Commits

Author SHA1 Message Date
Hunter Bown 2cd3cc6493 Merge branch 'main' into feat/fleet-ledger-3156 2026-06-12 11:34:37 -07:00
Hunter Bown 04d2351d9e Merge branch 'main' into feat/fleet-protocol-3155 2026-06-12 11:34:34 -07:00
Hunter Bown 19c73a7705 chore(fmt): format crates/secrets/src/lib.rs (#3173)
Co-authored-by: CodeWhale Agent <codewhale-agent@hmbown.local>
2026-06-12 11:34:22 -07:00
CodeWhale Agent 09231e74c4 feat(protocol): define Agent Fleet protocol types and event schema (#3155)
Adds  with the durable, serializable
contract for the v0.8.60 Agent Fleet control plane:

- FleetRun, FleetTaskSpec, FleetWorkerSpec, FleetHostSpec
- FleetWorkerStatus and FleetInboxEntry
- FleetWorkerEvent envelope with tagged lifecycle payloads:
  queued, leased, starting, running, model_wait, running_tool,
  heartbeat, artifact, completed, failed, cancelled, interrupted,
  stale, restarted, escalated
- FleetArtifactRef, FleetScorerSpec, FleetRetryPolicy,
  FleetAlertPolicy, FleetReceipt, FleetScore

Types are additive (unknown fields ignored by existing consumers) and
use stable snake_case JSON names. Includes JSON round-trip tests.

Closes #3155.
2026-06-12 11:29:37 -07:00
CodeWhale Agent c9969759d4 feat(tui): durable fleet inbox and run ledger (#3156)
Adds : an append-only JSONL ledger that
survives process restart and reconstructs queue/worker state.

- Records runs, task inbox entries, leases, lifecycle events, heartbeats,
  receipts, and alert decisions.
- Replays the ledger to rebuild  on startup.
- Atomic temp-file writes guard against partial writes; malformed lines
  are skipped during replay.
- Provides , , , , and a
  compaction helper.
- Six tests cover create/rebuild, enqueue/claim, restart survival,
  partial-line tolerance, event/heartbeat reconstruction, and receipts.

Closes #3156.
2026-06-12 11:29:29 -07:00
CodeWhale Agent 173fd00e27 feat(protocol): define Agent Fleet protocol types and event schema (#3155)
Adds  with the durable, serializable
contract for the v0.8.60 Agent Fleet control plane:

- FleetRun, FleetTaskSpec, FleetWorkerSpec, FleetHostSpec
- FleetWorkerStatus and FleetInboxEntry
- FleetWorkerEvent envelope with tagged lifecycle payloads:
  queued, leased, starting, running, model_wait, running_tool,
  heartbeat, artifact, completed, failed, cancelled, interrupted,
  stale, restarted, escalated
- FleetArtifactRef, FleetScorerSpec, FleetRetryPolicy,
  FleetAlertPolicy, FleetReceipt, FleetScore

Types are additive (unknown fields ignored by existing consumers) and
use stable snake_case JSON names. Includes JSON round-trip tests.

Closes #3155.
2026-06-12 11:02:14 -07:00
wavezhang eac4139e52 feat: build static linux x64 binaries with musl (#2903)
* feat: build static linux x64 binaries with musl

Build codewhale-cli and codewhale-tui with x86_64-unknown-linux-musl
target in the CNB tag_push workflow to produce fully static Linux x64
binaries. Install musl-tools instead of libdbus-1-dev; keep toolchain
install and build in a single stage since CNB stages run in isolated
containers without persistent state.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix: gate keyring behind not(target_env = "musl") for static builds

When targeting x86_64-unknown-linux-musl, the keyring crate's
linux-native-sync-persistent feature pulls in libdbus-sys which
cannot link against musl. Gate the OS keyring dependency behind
not(target_env = "musl") so musl builds fall back to the
file-backed secret store instead.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: wavezhang <wavezhang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-12 10:53:42 -07:00
Turisla 4e3e12eee7 feat(execpolicy): expose matched approval rule metadata (#2971) 2026-06-12 10:53:39 -07:00
Hanmiao Li 5d9b5f67cb feat(bench): improve cli-compare harness with real Harbor integration (#3009)
- Match actual Harbor CLI interface (no invented flags)
- Proper BaseInstalledAgent subclass for Codex
- Robust token extraction from stream JSONL + transcript parsing
- Heuristic answer_len extraction (## Final Answer markers)
- Metadata capture: versions, git commit, platform, timestamp
- --regenerate walks existing run directories
- All missing fields explicit null, never zero
- Support multiple runs per task with run_idx tracking

The harness is designed to run:
    harbor run --dataset terminal-bench@2.0:<task> --agent ... --model ...

for both codex and codewhale agents, then normalize the results.
2026-06-12 10:53:36 -07:00
cyq 38519552fd feat(cli): track provider source and customize unsupported TUI errors (#3011) 2026-06-12 10:53:32 -07:00
cyq b63287e653 feat(config): implement verbosity settings with normal and concise modes (#3052)
* feat(config): implement verbosity settings with normal and concise modes

* fix(config): wrap unsafe env calls in tests and fix clippy/fmt errors for CI

* perf(config): avoid verbosity prompt allocations
2026-06-12 10:53:29 -07:00
Gordon 5be5cd5a79 feat(i18n): localize ToolFamily labels (10 MessageIds) (#2901)
* feat(i18n): localize ToolFamily labels (10 MessageIds)

- localization.rs: Add 10 ToolFamily* MessageId variants + ALL_MESSAGE_IDS + all 7 locales
- tool_card.rs: tool_activity_label_for_name() accepts locale, uses tr() for labels
- footer_ui.rs, ui.rs: thread locale to tool_activity_label_for_name() callers
- Tests: 2 negative i18n tests + updated existing tests for new signatures

* chore: add .claude/ to gitignore

* fixup: make tool_display_label_for_name private + deduplicate family→MessageId mapping

---------

Co-authored-by: gordonlu <gordonlu@users.noreply.github.com>
2026-06-12 10:53:22 -07:00
dependabot[bot] f8e6de926c chore(deps): bump reqwest from 0.13.1 to 0.13.4 (#3001)
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.13.1 to 0.13.4.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.13.1...v0.13.4)

---
updated-dependencies:
- dependency-name: reqwest
  dependency-version: 0.13.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-12 10:53:19 -07:00
dependabot[bot] b8785403b2 chore(deps): bump rustls from 0.23.36 to 0.23.40 (#3002)
Bumps [rustls](https://github.com/rustls/rustls) from 0.23.36 to 0.23.40.
- [Release notes](https://github.com/rustls/rustls/releases)
- [Changelog](https://github.com/rustls/rustls/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustls/rustls/compare/v/0.23.36...v/0.23.40)

---
updated-dependencies:
- dependency-name: rustls
  dependency-version: 0.23.40
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-12 10:53:17 -07:00
dependabot[bot] 94456d728d chore(deps): bump clap_complete from 4.5.65 to 4.6.5 (#3003)
Bumps [clap_complete](https://github.com/clap-rs/clap) from 4.5.65 to 4.6.5.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.65...clap_complete-v4.6.5)

---
updated-dependencies:
- dependency-name: clap_complete
  dependency-version: 4.6.5
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-12 10:53:14 -07:00
Hanmiao Li b291214cd2 fix(config): add separate siliconflow_cn provider config field with fallback (#2893) (#2895)
Split SiliconflowCN into its own [providers.siliconflow_cn] TOML section
instead of silently ignoring [providers.siliconflow-CN] config.

- ProvidersToml / ProvidersConfig: add siliconflow_cn field with serde alias
- for_provider / for_provider_mut / provider_config_for: route SiliconflowCN
  to the new field
- resolve_runtime_options_with_secrets: fallback siliconflow_cn → siliconflow
  for api_key / base_url / model when unset
- deepseek_api_key: add config-file fallback for SiliconflowCn
- provider_config_key: update metadata to "siliconflow_cn"
- save_api_key_for: write SiliconflowCn keys to providers.siliconflow_cn
- docs/PROVIDERS.md, config.example.toml, scripts/check-provider-registry.py
2026-06-12 10:53:11 -07:00
Hanmiao Li 5e22753ee1 fix(tui): normalize macOS SUPER (Cmd) to CONTROL for keyboard shortcuts (#2938) (#2943)
* fix(tui): normalize macOS SUPER (Cmd) to CONTROL for keyboard shortcuts (#2938)

On macOS, terminal emulators may report Cmd (SUPER) instead of Ctrl
(CONTROL) for keyboard shortcuts, depending on the terminal app and
its configuration. This caused Ctrl+B, Ctrl+Alt+2, and other shortcuts
to be inconsistent.

Fix:
- Add normalize_macos_modifiers() in composer_ui.rs
- On macOS: map SUPER to CONTROL when CONTROL is not already set
- On other platforms: no-op
- Apply normalization at the key event entry point in ui.rs

Tests:
- normalize_macos_modifiers_maps_super_to_control
- normalize_macos_modifiers_preserves_existing_control
- normalize_macos_modifiers_leaves_alt_unchanged

* fix: strip SUPER from modifiers after normalization per review

* fix: gate macOS-specific modifier tests with #[cfg(target_os = "macos")]
2026-06-12 10:53:09 -07:00
New2Niu 2d81f91ea1 fix: codewhale update error: GitHub release downloads may be blocked or slow on this network (#3006)
Co-authored-by: lei <liulei@8531.cn>
2026-06-12 10:53:06 -07:00
cyq b8be06d9ba docs(prompt): clarify Constitution trust framing (#3008)
* docs(prompt): clarify Constitution trust framing

* docs(prompt): align trust standing wording
2026-06-12 10:53:03 -07:00
gus 24a91499e5 docs: add Upgrading from deepseek-tui section to README (#3053)
Co-authored-by: gus.guo <gus.guo@tec-do.com>
2026-06-12 10:53:01 -07:00
Hunter Bown aa1ce527e7 feat(tui): add /plugins slash command (#3169)
Adds a /plugins [name] command to list discovered script plugin tools
and inspect their metadata (description, input schema, approval level,
path). Includes localization strings and unit tests.

Co-authored-by: CodeWhale Agent <codewhale-agent@hmbown.local>
2026-06-12 10:52:38 -07:00
Reid 1ac32df627 feat(tui): dispatch hotbar slots from number keys (#3056)
Wire hotbar key dispatch into the TUI event loop.

  Bare 1-8 now fires the matching hotbar slot only when the composer is empty.
  Alt+1 through Alt+8 fires the matching slot even when the composer has text.
  Modal and overlay views keep ownership of those keys, and empty slots remain a
  safe no-op.
2026-06-12 10:52:02 -07:00
Nightt 4968983339 fix(tools): apply strict mode per schema (#3062)
* fix: apply strict tool mode per schema

* fix: preserve optional strict schema fields
2026-06-12 10:51:58 -07:00
Hunter Bown a448194b81 feat(runtime-api): Phase 0 + Phase 1 — brand-neutral naming, capabilities, and dynamic tool protocol types (#3168)
Phase 0:
- Rename runtime API metadata to CodeWhale Runtime API while keeping
  DeepSeek-prefixed env vars and headers as aliases.
- Add CODEWHALE_RUNTIME_TOKEN primary with DEEPSEEK_RUNTIME_TOKEN fallback.
- Accept x-codewhale-runtime-token header alongside x-deepseek-runtime-token.
- Change generated token prefix from dst_ to cwrt_.
- Add runtime_api_version, codewhale_version, transports, capabilities,
  and experimental to /v1/runtime/info while preserving old fields.
- Update CLI help for --auth-token and --cors-origin.
- Add CODEWHALE_CORS_ORIGINS with DEEPSEEK_CORS_ORIGINS alias.

Phase 1:
- Split inline pub mod runtime into crates/protocol/src/runtime/mod.rs.
- Add DynamicToolSpec, DynamicToolItemStatus, DynamicToolCallParams,
  DynamicToolCallResult, DynamicToolCallContent, and TurnEnvironmentParams.
- Accept dynamic_tools and environments on thread create, plus
  dynamic_tools and environment_id on turn start (no-op in Phase 0/1).

Tests:
- Update existing auth/health/runtime_info tests for new naming.
- Add header alias tests and dynamic-tool request deserialization tests.
- Add protocol crate round-trip tests for all new types.

Co-authored-by: CodeWhale Agent <codewhale-agent@hmbown.local>
2026-06-12 10:51:54 -07:00
CodeWhale Agent fc999162c0 build(release): static linux x64 binaries with musl
Harvested from PR #2903 by @wavezhang.
2026-06-12 10:18:08 -07:00
CodeWhale Agent 8fc2b904de docs: record full 90-PR equivalence audit and lane B landings
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 10:00:53 -07:00
CodeWhale Agent d7de0a8865 Merge PR #2971: expose matched approval rule metadata
Verified on scratch/v0.8.59-clean-train-20260612: build and hooks/core tests green.
2026-06-12 09:59:53 -07:00
CodeWhale Agent 4d84d66e67 Merge PR #2943: normalize macOS SUPER (Cmd) to CONTROL for keyboard shortcuts
Closes #2938. Verified on scratch/v0.8.59-clean-train-20260612: build and focused TUI modifier tests green.
2026-06-12 09:59:53 -07:00
CodeWhale Agent c08f161e1f docs: add v0.8.59 triage runbook and scratch-branch integration guidance
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 09:56:29 -07:00
Hunter B ca826bb23b fix(tui): clarify Codex response errors 2026-06-12 08:34:46 -07:00
Hunter B ccc0315831 chore(release): prepare v0.8.59
Cut the 0.8.59 changelog section, bump workspace/npm/README versions, refresh Cargo.lock and generated web facts, and sync the embedded TUI changelog slice.

Also fixes the short codew shim to prefer its sibling codewhale dispatcher before PATH so fresh installs do not delegate to an older global binary.
2026-06-12 07:05:05 -07:00
cyq1017 42de833d80 feat(config): add concise verbosity mode
Harvests #3052 onto the v0.8.59 release branch. Noninteractive CLI launches default to concise output discipline unless config, env, or --verbosity overrides it; interactive TUI launches remain normal by default.

Also forwards CODEWHALE_VERBOSITY as the primary env bridge while keeping DEEPSEEK_VERBOSITY for compatibility, documents the setting, and records @cyq1017 credit in both changelogs.
2026-06-12 06:41:01 -07:00
Hunter B cf910b7da2 feat(goal): persist thread goals through app server 2026-06-12 06:28:47 -07:00
Hunter B 8f265e204f fix(tui): use muted selection highlights in dark themes 2026-06-12 06:13:08 -07:00
Hunter B db8039ae46 fix(tui): keep sidebar hover live while loading 2026-06-12 06:03:07 -07:00
Hunter B 84cae206aa fix(tui): scope context menu actions to sidebar 2026-06-12 06:00:25 -07:00
Hunter B 18b865991f fix(acp): advertise terminal auth method 2026-06-12 05:54:18 -07:00
Hunter B b424848f7e fix(context): keep generated project context ephemeral 2026-06-12 05:52:00 -07:00
Hunter B 438104510c feat(tui): label collapsed command activity 2026-06-12 05:47:23 -07:00
Hunter B efcf299712 feat(models): add Kimi K2.7 Code defaults 2026-06-12 05:43:38 -07:00
Hunter B de9a0131cf test(tools): avoid approximate constant lint 2026-06-12 05:36:15 -07:00
Hunter B 0986cabb1d feat(tui): add context source map report
Add an explicit /context report|json|summary source-map surface while preserving plain /context as the existing inspector.

Expose the same diagnostic map through doctor --context-json for headless checks. The report uses the existing compaction token heuristic and labels counts as conservative estimates rather than exact provider billing.

Modified harvest from PR #3150 by @idling11.

Co-authored-by: idling11 <8055620+idling11@users.noreply.github.com>
2026-06-12 03:20:59 -07:00
Hunter B 6e9baaa988 refactor(tui): group completion search state
Introduce a small SearchContext for workspace completion walks so the related search state moves together and the helper signatures no longer need too-many-arguments allowances.

Also keeps the nearby hotbar test clippy-clean under the all-targets TUI gate.

Modified harvest from PR #3128 by @Hmbown.

Co-authored-by: Hmbown <101357273+Hmbown@users.noreply.github.com>
2026-06-12 03:05:56 -07:00
Hunter B c95122fb43 chore(deps): update reqwest rustls and clap_complete
Updates the lockfile-only Dependabot PRs for reqwest 0.13.4, rustls 0.23.40, and clap_complete 4.6.5 while keeping unrelated resolver drift out of the release branch.

Refs #3001.

Refs #3002.

Refs #3003.
2026-06-12 03:01:16 -07:00
Hunter B 757ffefc46 test(tools,release): cover execution subjects and mirror URLs
Harvests focused coverage from #3114, #3116, #3124, and #3127.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>

Co-authored-by: Hmbown <101357273+Hmbown@users.noreply.github.com>
2026-06-12 02:54:46 -07:00
Hunter B 1bb17cfced test(release,tools): extend helper coverage
Harvests focused coverage from #3110, #3111, #3113, #3123, #3125, and #3126.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>

Co-authored-by: Hmbown <101357273+Hmbown@users.noreply.github.com>
2026-06-12 02:53:47 -07:00
Hunter B c766aab406 test(tools): cover missing field constructor
Harvests focused coverage from #3133.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>

Co-authored-by: Hmbown <101357273+Hmbown@users.noreply.github.com>
2026-06-12 02:51:04 -07:00
Hunter B 936848f3a8 test(release): cover release channel query helpers
Harvests release helper coverage from #3130, #3131, #3132, and #3134 without adding a serial-test dependency.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>

Co-authored-by: Hmbown <101357273+Hmbown@users.noreply.github.com>
2026-06-12 02:50:35 -07:00
Hunter B e27d63a55a chore(tui): remove unused prompt persistence module
Harvests the dead-code cleanup from #3135.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>

Co-authored-by: Hmbown <101357273+Hmbown@users.noreply.github.com>
2026-06-12 02:48:57 -07:00
Hunter B f5104467db test(release): cover release base URL env overrides
Harvests the release URL coverage from #3137 without adding a serial-test dependency.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>

Co-authored-by: Hmbown <101357273+Hmbown@users.noreply.github.com>
2026-06-12 02:46:01 -07:00