feat(cli): hide commands that cannot work inside a cloud workspace
What
superset --help inside a cloud workspace no longer lists commands that cannot work there. Commands and groups can carry sandbox: false; the command tree hides them when the CLI runs under SUPERSET_SANDBOX_WORKSPACE_ID (the signal resolve-auth.ts already keys on).
Tagged: auth login, auth logout, start, stop, update, hosts wake, hosts set-wake, plugins install/uninstall/enable/disable/connect, plugins marketplace add/remove. whoami, plugins list/sync, hosts list stay — a box needs to be able to say who it acts as.
Why
A box holds no login, its lifecycle belongs to the control plane, and account-state writes from a box are a person's call. Until now an agent learned all of that by collecting 403s. Visibility only; the API keeps enforcing.
This is a second axis beside audience (#7776), not a third audience value: audience is release stage, sandbox is surface. Same filterByAudience, one extra predicate, prefix hiding as before.
Verified
cli-frameworktests 35/35 (one block added to the existingrouter.test.ts), Biome clean,tscclean on both packages.- Dev runner, outside vs inside a box (
SUPERSET_SANDBOX_WORKSPACE_IDset):
| outside | inside | |
|---|---|---|
auth --help | login, logout, whoami | whoami |
plugins --help (internal) | full set | list, marketplace (list only), sync |
hosts --help | list, wake, set-wake | list |
Context: https://app.superset.sh/page/plugins-in-sandboxes-review-ax4huu
https://claude.ai/code/session_01BVBuTCFBb1JkoX76VpLAQ8
Summary by cubic
Hides commands that can't work inside a cloud workspace from superset --help, instead of letting agents discover them via 403s. Drop a flaky watcher-manager recovery test that raced the chokidar backend on shared runners; its backends' own create/update/delete and ignore tests remain.
- Commands and groups now support
sandbox: false, which hides them whenSUPERSET_SANDBOX_WORKSPACE_IDis set — the same signalresolve-auth.tsuses. - Tagged:
auth login/logout,start,stop,update,hosts wake/set-wake, plugin install/uninstall/enable/disable/connect, and marketplace add/remove.whoami,plugins list/sync, andhosts liststay. - This is a second axis beside
audience(release stage vs surface), so it reusesfilterByAudiencewith one additional predicate. API enforcement is unchanged.
Summary by CodeRabbit
- New Features
- Cloud workspace environments now hide commands that require local system access, keeping unavailable actions out of the command list.
- Authentication, host management, plugin management, start/stop, and update commands are marked as requiring local access and are hidden in cloud workspaces. They remain available in other environments.