chore: Move shared CLI error handling into common errors

Merged
HA
3mo ago
+181-79

Summary

  • Shared CLI error envelopes and classifiers now live in a dedicated common/errors package.
  • Existing clicore callers keep working through compatibility wrappers.

User Impact

  • CLI error JSON and messages are unchanged.
  • This reduces the size and responsibility of clicore before later package splits.

Changes

  • Moved argument errors, busy status envelopes, error classification, transport error helpers, and their tests into common/errors.
  • Kept thin clicore aliases and wrappers for existing dispatcher and project-runner call sites.
  • Left tool-cache-specific unknown-command command collection in clicore to avoid reversing dependencies.

Verification

  • go test ./errors ./clicore ./unityipc
  • go test ./internal/projectrunner
  • go test ./internal/dispatcher
  • scripts/check-go-cli.sh