Releases: grovemotorco/glovebox
Release list
@glovebox.md/cli@0.2.0
Minor Changes
-
#12
24009edThanks @marwanhilmi! - Agent affordances in JSON mode: nextActions, errorfix, a command tree, and NDJSON forrunnextActionson success. JSON responses now carry anextActionsarray of runnable next steps with the context baked in:pull→glovebox push <path>,mount→glovebox run <dir>,workspaces create→glovebox mount … --workspace <id>,auth device/login→ verify/list,doctor→--fix/auth device,status(stopped) →run. Added as a sibling key, so existing fields are untouched (jq '.fileId'still works).fixon errors. The JSON error envelope gains an optionalfixstring (the remediation humans already see). Usage errors and the unknown-command path now throw a typedCliErrorrouted through the one renderer, so they honor--json(previously some printed human text even under--json) and carryfix(plusnextActionsfor a "did you mean" suggestion). In human mode thefixprints as a dim hint.- Machine-readable command tree.
gloveboxwith no args (or--help) in JSON mode —glovebox --json, or any piped/non-TTY invocation — now emits{ name, version, defaultServer, commands[], nextActions[] }instead of the prose help, so an agent can discover the whole surface in one call instead of scraping--help. Humans on a TTY still get the grouped help screen. - NDJSON for
glovebox run.glovebox --json run <dir>streams newline-delimited, typed JSON events (start,connected,log) with the last line always aresult/errorenvelope (the HATEOAS terminal line) — a clean stop is{ "type": "result", "ok": true, … }, a server close is{ "type": "error", "ok": false, "fix": …, "nextActions": … }. A tool reading only the final line gets exactly the envelope it expects. Streaming is opt-in via--jsononly (not auto-on-pipe): a supervised daemon shouldn't have its log format flip based on TTY, so humans and log scrapers keep the[glovebox] …lines.
-
#7
bb116dcThanks @marwanhilmi! - CLI UX overhaul: default to production, fix auth/server resolution, and add discovery commands- Default to production. Commands now target
https://api.glovebox.mdby default (was the dev URLapi.glovebox.test). Override with--server, the newGLOVEBOX_SERVER_URLenv var, or a persisted default. - Unified server resolution. Precedence:
--server→GLOVEBOX_SERVER_URL→~/.glovebox/config.jsondefaultServer→ built-in default. A successfulauth device/auth loginrecords the server as the default, so later commands need no--server— fixing the "logged into one server, command defaults to another" breakage.pull/pushnow resolve credentials through the same chain (the help text previously misstated this). auth deviceworks when piped. The verification URL and code now print to stderr in every output mode (previously suppressed in JSON/non-TTY mode, which left piped device logins hanging with no code).--workspaceis now optional.- New commands:
whoami(identity + accessible workspaces),workspaces list|create(discover or create — closes the chicken-and-egg of needing a workspace ID before you can log in),doctor(health, resolved server, auth, and reachability), plusauth use <url>andauth token.whoamidegrades gracefully where the server hasn't implementedme.getyet, falling back to listing accessible workspaces. - Output & help. Added
--human(alias--no-json) to force human output even when piped; grouped--helpwith Getting-started, Configuration, and Environment sections;--versionnow reads from the package manifest (was hardcoded and stale); "did you mean" suggestions include every command. rundiagnostics. Warns up front when no credentials are stored for the mount's server, and surfaces an authentication hint on connection failure instead of an opaque WebSocket error.
- Default to production. Commands now target
-
#10
5901352Thanks @marwanhilmi! - oRPC client + typed error handling across the HTTP/RPC boundaryRefactor the API client to idiomatic oRPC and make contract-defined errors typed end-to-end for both the CLI and the browser (using
+GARAGEas the reference).@glovebox.md/api— unwrap the client, expose typed errors. Dropped the dead "safe client" layer (createSafeClient+ the.then-strippingmaskThenproxy + theSafeGloveboxClienttype);createGloveboxWebClientnow returns the plain typed client withcredentials: 'include'. Added the typed-error surface —GloveboxClientError/GloveboxDefinedError, anisGloveboxError()narrowing guard, and re-exports ofisDefinedError/ORPCError/safe. Fixed theFORBIDDENcontract: the server threwreasonvalues (commenter_required,editor_required,admin_scope_required) that weren't in the declared enum and so didn't match the published contract; the enum now includes them.@glovebox.md/cli— structured errors at the top level. The top-level error handler now routes every thrown error throughtoErrorEnvelope/printCommandError: a{ error: { code, status, message, data? } }JSON envelope when--jsonis explicitly passed, otherwise a human line with the oRPCcode. Both go to stderr (stdout is the data channel, so a piped$(glovebox auth token)never captures the diagnostic).whoaminarrows itsNOT_IMPLEMENTEDfallback withisGloveboxErrorinstead of duck-typing.status/.code.@glovebox.md/worker— browser adoptssafe(). oRPC calls in the app shell handle errors with oRPC'ssafe()result helper ({ data, error }/result.isSuccess) instead of try/catch, on the plain throwing client (no client-level proxy).errorMessageprefers a contract-defined error's server-authored message.
Patch Changes
-
#12
1559647Thanks @marwanhilmi! - CLI help consistency, fixedauth <sub> --help, anddoctor --fixA second UX pass against the reference CLIs (
portless,agent-browser,dotagents).- Fix
glovebox auth <sub> --help.auth device|login|logout|status|use|token|mint-dev --helppreviously threwUnknown option '--help'(the strict subcommand parsers never declared it), andauth status --helpsilently ran the command. The dispatcher now intercepts--help/-hbefore the subcommand parser and prints focused, per-subcommand help. - Consistent per-command help. All command
--helpscreens render through one sharedrenderHelp()layout — uniform section order (Usage → description → Arguments → Options → Examples), aligned columns, and an auto-appended-h, --helprow. Every command now has copy-pasteableExamples:, and the root help points atglovebox <command> --help. - Uniform usage errors. Missing-argument paths (
mount,unmount,pull,push,auth use,auth mint-dev,workspaces create) now print a one-lineerror:plus aRun \glovebox --help`hint and exit1, instead of dumping the whole help screen (or, for some, exiting0`). doctoris tri-state and self-repairing. Each check is nowok/warn(non-fatal, e.g. missing credentials) /error(usage-blocking), rendered with✓ / ! / ✗. Newglovebox doctor --fixapplies safe automatic repairs — currently clearing stale daemon lockfiles (a dead-pid lock that would otherwise refuseunmount). The--json doctoroutput shape changed accordingly: each check carriesstatus(wasok: boolean) and the result gains afixedcount.- Friendlier durations.
glovebox run --rescan-intervalaccepts30m/1h/90sin addition to a bare number of seconds (still backward compatible).
- Fix
-
#12
d27ac57Thanks @marwanhilmi! - CLI UX: consolidated auth, clearer help, agent-parseable errors (breaking)A second UX pass benchmarked against the
garageandghCLIs.Auth flow consolidated (breaking). The
authsurface dropped from eight subcommands to three (login,logout,token), modeled ongh auth.auth loginis the one sign-in command. It runs the browser device flow by default (whatauth devicedid). To store a pre-minted token, pipe it on stdin with--with-token— e.g.echo "$GLOVEBOX_TOKEN" | glovebox auth login --with-token. Followinggh, there is no--token <value>flag (a secret on argv leaks intops/shell history) and no implicit stdin slurp. Login without--workspacewarns that an account-scoped key can't open workspaces.auth deviceremoved — useauth login.auth use <url>removed — login records its server as the default; target another with--server,GLOVEBOX_SERVER_URL, or by signing in to it.auth statusremoved — usewhoami(verified identity) ordoctor(local config/reachability). Removed names print a precise migration hint.auth token,auth logout, and the dev-onlyauth mint-devare unchanged.
Group help defers to leaf help.
auth --helpandworkspaces --helpnow list each subcommand asname — summaryand defer every flag, usage, and example to the leaf<sub> --help, so the optio...
@glovebox.md/cli@0.1.1
Patch Changes
- #4
84f603aThanks @marwanhilmi! - Validate the automated release pipeline end-to-end — first tokenless publish over npm OIDC trusted publishing. No runtime behavior changes; this release also lands a CI-only fix giving the heavy 4 MiB CRDT round-trip tests enough timeout headroom to stay green on the GitHub Actions runner.