Skip to content

rcli: control-plane network driver (base-url/api-key flags + telemetry commands) - #571

Closed
sanchitmonga22 wants to merge 1 commit into
mainfrom
feat/rcli-network-driver
Closed

rcli: control-plane network driver (base-url/api-key flags + telemetry commands)#571
sanchitmonga22 wants to merge 1 commit into
mainfrom
feat/rcli-network-driver

Conversation

@sanchitmonga22

Copy link
Copy Markdown
Contributor

rcli control-plane network driver

Turns rcli into a real control-plane client so it can drive ANY backend (including localhost) for integration testing and manual debugging.

  • Global --base-url / --api-key / --environment flags (+ 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> and rcli 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.

…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
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 67933844-ecb1-4df0-802c-64a5b3c7b0ec

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/rcli-network-driver

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sanchitmonga22

Copy link
Copy Markdown
Contributor Author

Folded into #570 (combined single PR with both the rcli network driver and the example-app brand alignment). Continuing review there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant