rcli: control-plane network driver (base-url/api-key flags + telemetry commands) - #571
rcli: control-plane network driver (base-url/api-key flags + telemetry commands)#571sanchitmonga22 wants to merge 1 commit into
Conversation
…h handshake, 12-modality telemetry
- Global --environment/--base-url/--api-key flags (RUNANYWHERE_ENV/_BASE_URL/_API_KEY
env fallbacks) threaded into rac_state + rac_sdk_config; combos validated
client-side via commons validators (staging allows http+localhost, prod https-only);
absent flags keep the historical offline dev-mode behavior exactly
- rcli auth login: API key → JWT via /api/v1/auth/sdk/authenticate, then
rac_sdk_init_phase2_proto (device registration + model-assignment fetch);
prints org/device/token-expiry/assignment summary (+ --json), exits non-zero
with the server's error surfaced
- rcli telemetry emit --modality <m> and rcli telemetry blast: model-free events
through the real commons telemetry manager, batched per modality and POSTed to
/api/v2/sdk/telemetry/{modality} with the in-process JWT (emit implies login);
per-endpoint accounting from the backend batch responses, non-zero exit when
any POST fails or an event never reached the backend
- src/net/control_plane.{h,cpp}: CLI platform wiring — device-manager callbacks
(real hardware facts via sysctl/uname/adapter memory info) and control-plane
HTTP over the registered curl transport
Verified end-to-end against the console backend (sqlite + uvicorn): login
creates the devices row, blast stores 12/12 modalities (10 child rows +
model/system base-only), re-runs store fresh ids, bad API key exits 1 with the
server's 401 surfaced.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U4scoVoLn3Z3NxaiK3LC5M
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Folded into #570 (combined single PR with both the rcli network driver and the example-app brand alignment). Continuing review there. |
rcli control-plane network driver
Turns
rcliinto a real control-plane client so it can drive ANY backend (including localhost) for integration testing and manual debugging.--base-url/--api-key/--environmentflags (+RUNANYWHERE_*env vars), threaded into the SDK config with zero regression when absent.rcli auth login— real handshake (API key → JWT, device register, model-assignments fetch).rcli telemetry emit --modality <m>andrcli telemetry blast— model-free telemetry through the real curl transport, 12-modality result table.Proven end-to-end against a locally-booted backend: login registers a device with real hardware facts; blast lands all 12 modalities (10 child + 2 base-only) as verified DB rows; bad key → clean 401. Existing commands unchanged (10/10 CLI tests). The
integration/suite in the monorepo shells out to this.