claw-code/rust/crates
Thiago Margatho 0089e45724 refactor(cli): split main.rs into per-responsibility modules
main.rs had grown to ~19.8k lines with 8+ unrelated concerns
interleaved function-by-function throughout the file (arg parsing,
boot/health checks, runtime bootstrap, provider client, progress
reporting, model resolution, skill dispatch all mixed together).
Split along those natural boundaries into separate files, keeping
main.rs as a thin entry point (constants, main(), mod declarations,
existing tests).

No logic changed — items moved verbatim, marked pub(crate) where a
new module boundary required it, with `use crate::*;` in each new
file so cross-module references keep resolving through main.rs's
re-exports. Verified with cargo check/clippy/test on this crate and
scripts/fmt.sh; confirmed the few remaining test failures
(provider-detection defaults in the api/rusty-claude-cli crates) are
pre-existing on a clean checkout of main, unrelated to this change.

New files:
- model_provenance.rs — model alias/version resolution
- cli_parse.rs — CLI arg parsing, help, report formatting
- preflight.rs — doctor/health checks, boot snapshot, git status
- bootstrap.rs — runtime bootstrap, LiveCli, session management
- provider_client.rs — Anthropic client, tool executor, MCP wiring
- progress.rs — prompt/hook progress reporting
- skill_dispatch.rs — bare-skill dispatch, cwd guard, diff reports

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-07 09:16:13 -03:00
..
api fix(providers): parse Ollama reasoning fields 2026-06-08 10:08:32 +09:00
claw-analog Reject drifted claw-analog bootstrap phases 2026-05-25 19:33:37 +00:00
claw-rag-service feat(rag): add claw-rag-service 2026-05-25 11:25:25 +09:00
commands fix: update slash command count and add /setup assertion in test 2026-06-04 22:06:32 -05:00
compat-harness feat: ultraclaw droid batch — ROADMAP #41 test isolation + #50 PowerShell permissions 2026-04-12 03:06:24 +09:00
mock-anthropic-service Stabilize final gate before release checkpoint 2026-05-15 13:34:57 +09:00
plugins fix: resolve EACCES error from incorrect bundled plugins directory 2026-05-25 11:22:34 +09:00
runtime Merge pull request #3227 from TheArchitectit/worktree-wizard-entry-points 2026-06-08 15:06:11 +09:00
rusty-claude-cli refactor(cli): split main.rs into per-responsibility modules 2026-07-07 09:16:13 -03:00
telemetry feat: anthropic SDK header matching + request profile 2026-04-01 05:55:25 +00:00
tools Merge pull request #3209 from Sam0urr/harden-permission-enforcer 2026-06-05 10:32:50 +09:00