fix(secrets): hero_proc secret CLI sends wrong RPC params for every subcommand #52
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_proc#52
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Context
Every
hero_proc secretCLI subcommand is wired to the wrong RPC param shape, so the only way to manage secrets today is via the web UI or raw JSON-RPC. The server-side handlers (crates/hero_proc_server/src/rpc/secret.rs) expect:secret.set{ "secret": { "context_name", "key", "value", "description"?, "tags"? } }(or inline)secret.get{ "context": "core", "key": "..." }secret.list{ "filter": SecretFilter }(or inline / empty) → returns{ "secrets": [Secret] }secret.delete{ "context": "core", "key": "..." }secret.pull/secret.push{ "forge_token": "..." }The CLI (
crates/hero_proc/src/cli/commands.rs:869-924) sends{ "name": ... }for set/get/delete, sends{}for list and parses the response asVec<String>(server returns{secrets:[...]}), and sends{}for pull/push (no token).Symptoms reproduced today:
The web UI (
crates/hero_proc_ui/static/js/dashboard.js) already uses the correct shapes, so this is purely a CLI defect.Goals
hero_proc secret <set|get|list|delete>accept a--context <name>flag (defaultcore) and send the correct RPC params.secret setaccept optional--description <text>and repeatable--tag <name>, and wrap the payload as{ "secret": {...} }.secret listaccept optional--context,--filter <pattern>, and--tagflags; parse the{secrets:[...]}response and render a table with key, context, tags, and (with-v) value/description.secret getprint the full record (key, context, value, description, tags) — currently it prints only the bare value if it deserializes at all.secret pullandsecret pushforwardFORGE_TOKEN(orFORGEJO_TOKEN) from the environment as theforge_tokenRPC param, with a clear error if neither is set.--format/-q/-vflags.done and verified