screens-connection #33
No reviewers
Labels
No Label
CI/CD 🛠️
WIP 🚧
bug 🐞
code quality 🧹
data collection 🗃️
dependency 📦
do not merge 🚫
documentation 📝
duplicate 🔄
enhancement ✨
good first issue 🌱
help wanted 👋
inference 🧠
invalid 🛑
machine learning 🚀
priority
high🔥
priority
low 🍃
priority
medium 🌟
quantum ⚛️
question ❓
radio 📡
sprintable 🏃♂️
test 🧪
wont fix ❌
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: qoherent/ria-toolkit-oss#33
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "screens-connection"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Title:
fix(agent): improve ria-agent register UX (User-Agent, structured errors, human-readable names)Summary
Three small, focused improvements to the
ria-agent registerflow that make it actually work against a Cloudflare-fronted hub and surface useful feedback when it doesn't.User-Agenton the register POST. Python's defaultPython-urllib/<ver>is blocked by Cloudflare's Browser Integrity Check onriahub.ai(HTTP 403 edge code 1010), so the register call never reached the hub. Any non-default UA passes the check.{"detail": {"reason": "expired"}}; the CLI now maps the known reasons (invalid_key,expired,revoked,already_consumed) and rate-limit responses into human-readable messages. Previously users only sawHTTP 4xxand had to guess.--nameis omitted, the agent is given anadjective-noun-Nstyle name via the newnamegen.pymodule instead of being registered with an empty string.Changes
src/ria_toolkit_oss/agent/cli.py_cmd_registernow generates a default name, sets aUser-Agent, and routes HTTP errors through_explain_registration_failure(). NewREGISTRATION_REASON_MESSAGEStable maps controllerreasoncodes to messages.src/ria_toolkit_oss/agent/namegen.pygenerate_agent_name()producing pronounceable defaults.tests/agent/test_cli_register_errors.pypoetry.lockpyproject.toml.Test plan
pytest tests/agent/test_cli_register_errors.pypassesria-agent register --hub https://riahub.ai --api-key ria_reg_…against a hub with the matching public route exposed (PRfix/screens-agent-register-public-routeonqoherent/ria-hub) completes and writes~/.ria/agent.jsonHTTP 403--nameproduces a non-emptyadjective-noun-Nagent name in the configNotes for reviewers
main(which includes v0.1.6,datatypes/→data/, getting-started overhaul, etc.) — diff is now narrowly scoped.POST /screens/agents/registerexposed withoutreqSignIn) lands in a separate PR onqoherent/ria-hub(branchfix/screens-agent-register-public-route).Map the hub's structured `{detail: {reason}}` responses (invalid_key, expired, revoked, already_consumed) and 429 rate-limits to actionable CLI messages so users know to mint a fresh key from Settings → RIA Agents instead of seeing a raw HTTPError. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>2f6b5ced18