Skip to content

Gateway/CLI: add paired-device remove and clear flows#20057

Merged
mbelinky merged 3 commits intomainfrom
pr/gateway-device-pairing-hygiene
Feb 18, 2026
Merged

Gateway/CLI: add paired-device remove and clear flows#20057
mbelinky merged 3 commits intomainfrom
pr/gateway-device-pairing-hygiene

Conversation

@mbelinky
Copy link
Contributor

@mbelinky mbelinky commented Feb 18, 2026

Summary

  • add gateway method device.pair.remove to delete stale paired device rows
  • add CLI commands:
    • openclaw devices remove <deviceId>
    • openclaw devices clear --yes [--pending]
  • wire protocol schemas/validators/allowlists for the new method
  • add infra + CLI tests for remove/clear behavior

Testing

  • pnpm vitest src/infra/device-pairing.test.ts src/cli/devices-cli.test.ts
  • pnpm check
  • pnpm build

Greptile Summary

Adds a device.pair.remove gateway method and two CLI commands (openclaw devices remove <deviceId> and openclaw devices clear --yes [--pending]) for managing paired device entries. The change spans the full vertical: Typebox schema + type, AJV validator, protocol schema registry, method allowlist, PAIRING_METHODS authorization set, server handler, infra layer (removePairedDevice), CLI wiring, and tests for both infra and CLI layers.

  • New removePairedDevice infra function deletes a device from the paired-devices state file under lock, consistent with existing rejectDevicePairing pattern
  • device.pair.remove server handler validates params, calls infra, returns the removed entry (or error for unknown deviceId)
  • CLI remove subcommand sends a single RPC call; clear lists all entries then sequentially removes paired devices (and optionally rejects pending requests)
  • Authorization is correctly gated behind operator.pairing scope via PAIRING_METHODS
  • Tests cover: single remove, clear with --yes guard, and clear with --pending flag

Confidence Score: 5/5

  • This PR is safe to merge — it follows existing patterns consistently across all layers with no logical errors.
  • Score reflects that all changes are well-structured, follow existing codebase conventions (schema, validator, handler, allowlist, CLI, tests), have correct authorization gating, and include comprehensive test coverage. No bugs or security issues found.
  • No files require special attention.

Last reviewed commit: df53236

@openclaw-barnacle openclaw-barnacle bot added app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes size: M maintainer Maintainer-authored PR labels Feb 18, 2026
@mbelinky mbelinky force-pushed the pr/gateway-device-pairing-hygiene branch from df53236 to 26523f8 Compare February 18, 2026 13:26
@mbelinky mbelinky merged commit 1437ed7 into main Feb 18, 2026
13 checks passed
@mbelinky mbelinky deleted the pr/gateway-device-pairing-hygiene branch February 18, 2026 13:27
@mbelinky
Copy link
Contributor Author

Merged via squash.

Thanks @mbelinky!

anschmieg pushed a commit to anschmieg/openclaw that referenced this pull request Feb 19, 2026
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 26523f8
Co-authored-by: mbelinky <[email protected]>
Co-authored-by: mbelinky <[email protected]>
Reviewed-by: @mbelinky
HenryChenV pushed a commit to HenryChenV/openclaw that referenced this pull request Feb 20, 2026
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 26523f8
Co-authored-by: mbelinky <[email protected]>
Co-authored-by: mbelinky <[email protected]>
Reviewed-by: @mbelinky
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui cli CLI command changes gateway Gateway runtime maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments