Regression from the SDK refactor. --debug used to log every API request/response (the old ApiClient routed all calls through util::send_debug). Now it only logs the raw-HTTP/auth paths that still call send_debug (PKCE/token mints in jwt.rs, session mints, the /files upload, skill/update downloads) — the main API traffic is silent: the seam's raw helpers don't log, and SDK-typed calls can't be logged from the CLI (the SDK has zero log:: calls and exposes no request hook; reqwest has no logging middleware hook).
Fix belongs in the SDK, not a CLI workaround (per project preference — keep the CLI a thin consumer; a CLI-side raw-helper hack would only cover some commands and leave SDK-typed ones silent and inconsistent). Plan:
sdk-rust (prerequisite): add request/response debug logging that covers ALL ops — generated free functions AND the ergonomic methods (submit_query/upload_stream/resource handles). Likely a generator option/template change so generated ops emit log::debug! (method, url, redacted headers, body) + response (status, body), plus matching logs in the hand-written layer. MUST redact Authorization bearer tokens and sensitive bodies (e.g. secrets) — mirror the CLI's existing mask_credential/redaction. Validate any template change with the generator + a compile check.
hotdata-cli: when --debug is set, wire a log backend (e.g. env_logger or a small custom logger) at the SDK's target/debug level, formatted close to the old >>> METHOD url / <<< status / body output. Then --debug covers SDK-typed + raw + auth paths uniformly.
Until this lands, --debug only surfaces the auth/upload paths. Surfaced during the SDK refactor (PR hotdata-dev/hotdata-cli#134).
Regression from the SDK refactor.
--debugused to log every API request/response (the oldApiClientrouted all calls throughutil::send_debug). Now it only logs the raw-HTTP/auth paths that still callsend_debug(PKCE/token mints in jwt.rs, session mints, the /files upload, skill/update downloads) — the main API traffic is silent: the seam's raw helpers don't log, and SDK-typed calls can't be logged from the CLI (the SDK has zerolog::calls and exposes no request hook; reqwest has no logging middleware hook).Fix belongs in the SDK, not a CLI workaround (per project preference — keep the CLI a thin consumer; a CLI-side raw-helper hack would only cover some commands and leave SDK-typed ones silent and inconsistent). Plan:
sdk-rust (prerequisite): add request/response debug logging that covers ALL ops — generated free functions AND the ergonomic methods (submit_query/upload_stream/resource handles). Likely a generator option/template change so generated ops emit
log::debug!(method, url, redacted headers, body) + response (status, body), plus matching logs in the hand-written layer. MUST redactAuthorizationbearer tokens and sensitive bodies (e.g. secrets) — mirror the CLI's existingmask_credential/redaction. Validate any template change with the generator + a compile check.hotdata-cli: when
--debugis set, wire alogbackend (e.g. env_logger or a small custom logger) at the SDK's target/debug level, formatted close to the old>>> METHOD url/<<< status/ body output. Then--debugcovers SDK-typed + raw + auth paths uniformly.Until this lands,
--debugonly surfaces the auth/upload paths. Surfaced during the SDK refactor (PR hotdata-dev/hotdata-cli#134).