* fix(managed-agent): keep runtime MCP state and permission sync honest
Clear the recorded runtime-MCP names when the live child that held them is
replaced, so a retired channel does not keep every later session on Legacy.
Diff each settings scope's own rule set when a permission change is
propagated: the merged view carries workspace rules into the User pass, which
then applies them to every session. Make the sync strict for a propagated
change and fail the acknowledgement when a live session rejects a rule, so
the Bridge keeps the channel quarantined instead of lifting the fence.
Refs #14483
(cherry picked from commit 3439ca9da9)
* test(acp-bridge): pin that an added runtime MCP server is observed
The paired selector reads hasRuntimeMcpServers() before it lets a session
select Managed. Pin that a successful workspace-level runtime add is visible
to the bridge.
Refs #14488
* fix(managed-agent): diff the effective permission set for workspace changes
The live permission manager keeps the scopes' rules merged, without provenance. Diffing each scope separately can remove a rule another scope still provides: clearing a workspace deny while the user scope also denies it would make read_file runnable again, and the acknowledgement would hide it. Diff the effective set instead, and keep the workspace filter on the apply.
Refs #14488
* fix(managed-agent): carry the permission scope through a workspace change
A single SettingScope.Workspace pass filtered user-scope deltas out of sessions admitted at another root, such as a worktree session, while still acknowledging the change. Carry the written scope in the change payload and use it to pick the audience: User reaches every live session, Workspace keeps the workspace filter. The content still comes from the effective merged set, so a rule another scope provides is never removed.
Refs #14488
* test(acp-bridge): include the permission scope in the propagated payload
The workspace-change payload now carries the written scope, so the exact assertion in the paired-engine test must include it. This also fixes the failing Test (ubuntu) lane on the same head.
Refs #14488
* test(cli): include the permission scope in the propagated payload
The workspace-change payload now carries the written scope. Update the CLI paired-engine assertion to include it, alongside the acp-bridge one.
Refs #14488