Problem
Feishu remote control is not credible if the user can only send messages but cannot inspect the live TUI from a phone. The current bridge can start a local read-only Web TUI, but the safe remote story needs explicit product support instead of an ad hoc localhost link.
Current stopgap
- Reuse the existing ngrok webhook tunnel instead of starting a second public tunnel.
- Serve a read-only
/watch route from the local Feishu webhook process.
- Require a random
watch_token in the URL/query or bearer header before exposing TUI HTML or snapshot JSON.
- Keep the TUI read-only: no keyboard input, tmux attach, or command execution through the web view.
Follow-up support plan
- Add first-class config and CLI support for remote watch URLs:
watch_public_url
watch_token
- token rotation command
- redacted status output by default
- Add tunnel provider abstraction:
- ngrok
- Cloudflare Tunnel
- localhost-only fallback
- clear handling when only one ngrok tunnel is available
- Add mobile-oriented UX:
- stable
/watch route
- auto-refresh snapshot
- visible session/project label
- stale snapshot indicator
- Add safety controls:
- read-only by default
- random unguessable tokens
- optional allowlisted Feishu chat/sender binding
- no token in logs or ordinary status output
- Add tests and docs:
- unauthenticated
/watch returns 403
- authenticated
/watch and /watch/snapshot return 200
/cnb_watch replies with the configured public URL when present
- README/README_zh setup notes for phone access
Acceptance criteria
- A user can ask from Feishu for an observation link and receive a phone-openable HTTPS URL.
- The URL shows the current device-supervisor TUI within a few seconds.
- The public route is inaccessible without the configured token.
- Restarting
cnb feishu start preserves the configured public watch route.
- Documentation clearly distinguishes message control, TUI snapshot, read-only watch, and any future interactive remote-control mode.
Problem
Feishu remote control is not credible if the user can only send messages but cannot inspect the live TUI from a phone. The current bridge can start a local read-only Web TUI, but the safe remote story needs explicit product support instead of an ad hoc localhost link.
Current stopgap
/watchroute from the local Feishu webhook process.watch_tokenin the URL/query or bearer header before exposing TUI HTML or snapshot JSON.Follow-up support plan
watch_public_urlwatch_token/watchroute/watchreturns 403/watchand/watch/snapshotreturn 200/cnb_watchreplies with the configured public URL when presentAcceptance criteria
cnb feishu startpreserves the configured public watch route.