Skip to content

feat(net): a computer can let another only view threads and chat with bots, set from three presets - #1469

Merged
TheAnimatrix merged 3 commits into
masterfrom
access-presets
Nov 17, 2026
Merged

TheAnimatrix merged 3 commits into
masterfrom
access-presets

Conversation

@TheAnimatrix

Copy link
Copy Markdown
Collaborator

Refs #1463 (stage 6)

Each computer can now let another of your computers only read threads and chat with bots, without letting it start or change work. This is set with one control on that computer's row in Settings → Devices.

What changes

  • A new per-device switch, Work on threads from this device, is kept on the computer that enforces it. It is on by default, so nothing changes until someone turns it off.
  • With the switch off, the device can still read threads and lists and chat with this computer's bots, within each bot's own permissions. It is refused anything that starts, changes or stops work, in every family:
    • Threads: create, send, steer, stop, queue, model, settle, open project, dispatch.
    • Files and Git reads.
    • Bots: create, change, permissions, memory, pause, and answering a bot's permission ask.
  • The check sits where every remote call is authorized, which also runs when a saved result is looked up. A refused call can't get through by fetching its earlier result. A refusal carries the new reason work_off and is shown in words: " lets this computer view threads and chat with bots only."
  • Every remote method and stream kind is classed in one table (src/shared/net/accessClasses.ts):
    • The classes are view, bots chat, bots manage, work, terminal and editor.
    • A method missing from the table counts as work, so it is refused to a view-only device.
    • A test starts real daemons and fails on any registered method or stream kind that has no class, or on a class for a method that no longer exists.
  • Each computer's row in Settings → Devices has three presets, defined in src/shared/net/accessPresets.ts so a later Allow screen can reuse them:
    • View and chat: work, terminals and editor off.
    • Work on threads: today's defaults.
    • Full control: terminals and editor on, Full access, agents may change all threads.
  • A set of switches that matches no preset shows as Custom, and Limits keeps every single switch. Phones get no preset.
  • The CLI has bridge limits --work on|off.
  • Existing stores gain the column with work on, and the schema version is unchanged.

Notes

Tests

  • tests/net/bridge/routed/accessClasses.test.ts (new): the completeness test, then real daemons in both directions:
    • The receiver is first the keeper, then a member that is not the keeper.
    • A view-only caller reads a transcript, lists and a bot, and chats with the bot.
    • Its send, start, steer, stop, file read, phone create and send, and bot create are refused with work_off, for person and agent calls alike.
    • A saved result is refused while the switch is off, and readable again once it is back on.
  • tests/renderer/deviceAccessPreset.test.ts (new): each preset sends its fields, a non-matching set shows Custom, the Limits switch works alone, and phones and older services show no preset.
  • tests/net/store/nodePolicyMigration.test.ts, tests/net/bridge/nodePolicy.test.ts, tests/net/cli/net.test.ts: the new column, its default, and the CLI flag.

These pass, as do connectedHere and botDeviceAccess. Both typecheck configs are clean.

Each computer keeps a new switch per device, "Work on threads from this device" (net_node_policy.work, on by default; a store from before it keeps every device on). Off, every call that starts, sends to, steers, stops or changes a thread, reads its files or Git, or makes or changes a bot is refused with the reason work_off, in every family and for a person's call and an agent's alike, also when a saved result is looked up. Reads and bot chat still pass.

One table classes every remote method and stream kind as view, bots_chat, bots_manage, work, terminal or editor (src/shared/net/accessClasses.ts); a test reads the methods a real daemon registers and fails on one with no class. mousse-cli bridge limits takes --work on|off.
Each computer's row in Settings, Devices has Access from this device: View and chat with bots, Work on threads (the defaults) or Full control. A pick sets the device's switches at once; switches that match none show as Custom, and the single switches stay. Limits has the Work on threads switch on its own. Phones have no preset. The presets are shared (src/shared/net/accessPresets.ts) for later screens.
@TheAnimatrix
TheAnimatrix merged commit 162fc0f into master Nov 17, 2026
7 checks passed
@TheAnimatrix
TheAnimatrix deleted the access-presets branch November 17, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant