You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds POST /workspace/tools/:name/enable — strict-gated mutation route
that toggles a tool name in the workspace's `tools.disabled` settings
list. Pure file IO + workspace-scoped event fan-out; no ACP roundtrip.
- Bridge `setWorkspaceToolEnabled(toolName, enabled, originatorClientId)`
invokes the new `BridgeOptions.persistDisabledTools` callback. The
default `runQwenServe` wires it to `loadSettings(workspace).setValue(
'tools.disabled', merged)` with a fresh load on each call so concurrent
edits from other writers stay safe across the read/modify/write window
- New private `broadcastWorkspaceEvent` helper fan-outs to every live
session SSE bus, swallowing per-bus errors so a single torn-down
session can't block its peers. Naming mirrors PR 21 #4255 (the post-
PR-16 fold-in will collapse the two helpers)
- Unknown tool names are accepted: the daemon has no authoritative tool
registry to validate against (built-ins live inside the ACP child,
MCP tools are discovered post-spawn). Pre-disabling a not-yet-installed
MCP tool is a legitimate use case
- Live ACP children retain already-registered tools — the toggle takes
effect on the next ACP child spawn (`tools.disabled` is consulted at
Config construction time, gated in ToolRegistry.registerTool by PR 17
commit 2)
SDK additions:
- `DaemonClient.setWorkspaceToolEnabled(toolName, enabled, clientId?)`
with URL-encoded tool name
- `DaemonToolToggleResult` + `DaemonToolToggledEvent` typed event,
reducer integration on `DaemonSessionViewState` (`toolToggleCount` /
`lastToolToggle`)
- `asKnownDaemonEvent` runtime guard for `tool_toggled` AND
`approval_mode_changed` (the latter was missed in commit 3 — without
this entry the events were silently filed as `unrecognizedKnownEvent`
by `reduceDaemonSessionEvent`, never reaching the typed reducer cases)
New capability tag `workspace_tool_toggle` (always-on, since v1).
🤖 Generated with [Qwen Code](https://github.com/QwenLM/qwen-code)
0 commit comments