feat(app): PC control permissions (three levels, registered people only)

permissions::decide gives allow, ask or refuse for an action on the PC: only
people in pcControl.allowedUsers may ask (nobody by default), viewing is
automatic and clicking, typing and running ask first by default, and
payments, passwords, deleting files and administrator rights are never done.
A PC 제어 screen edits the levels and shows the chat channels' send and
delete switches beside them. The PC control tool (M7) will use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-14 16:44:37 +09:00
parent f952b72ed9
commit e8db417752
8 changed files with 225 additions and 3 deletions

View File

@@ -143,6 +143,24 @@ check something at a time or regularly; the brain's `schedule` tool
those are not delivered (and the screen says so).
- Logs (tab `conversation`): ids, kinds, repeats, channel ids, counts and outcomes, never the text.
## PC control permissions (`app/src/permissions.rs`)
`docs/v2/pc-features.md` ("키보드·마우스 제어와 안티치트") and `docs/v2/proactive.md` (제안 3; user
decision 2026-11-14). What Jarvis may do on this PC and for whom; the PC control module (M7) asks
`decide(settings, user, action)` before every action and gets allow, ask or refuse with a reason.
- `pcControl` (new section): `allowedUsers` (Discord user IDs, empty by default) and a level per
kind of action that can be changed, each `auto`, `ask` or `never`: `view` (seeing the screen, a
monitor or a window, and the window list; default `auto`), `click` (buttons, menu items, a point
on the screen; `ask`), `type` (text and keys; `ask`) and `run` (starting a program; `ask`).
- Only people in `allowedUsers` may ask for anything, screen viewing too (the screen may show
anything); with nobody listed nobody may. `ask` means the action is done only once the person
agrees in their next message (checked by the PC control tool like the chat delete consent).
- Never done, whatever the settings: payments, passwords and other secrets, deleting files, and
anything that needs administrator rights. They have no setting.
- The PC 제어 screen edits the section and shows, read-only, what is never done and each registered
chat channel's send and delete switches (changed on the 채팅 채널 screen).
## Secrets (`app/src/secrets.rs`)
`config/secrets.dat` holds a JSON object of named secrets (`discordToken`, the MCP servers'
@@ -565,7 +583,7 @@ Plain HTML, CSS and an ES module, no build step, dark theme after `DESIGN.md`. A
Strata's last line, and stop in the header; the header with start, restart and stop is rebuilt
only when the state changes, so a click is never lost to the refresh. Every screen change starts
a new generation: an answer that arrives after the user moved to another screen is dropped.
- **Settings screens** (봇, 채널·호출, 채팅 채널, 대화 기억, 모델, 기능, 백그라운드 수집, 예약, 게임 모드): built from `settings_fields`; only
- **Settings screens** (봇, 채널·호출, 채팅 채널, 대화 기억, 모델, 기능, 백그라운드 수집, 예약, PC 제어, 게임 모드): built from `settings_fields`; only
changed fields are sent; the server and voice channel are pickers (choosing another server clears
the voice channel and lists only that server's channels); the chat channels are a table
with their switches; the bot screen also changes the token; the 기능 screen has the feature