Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkgs/mcpx/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,7 @@ skipped launcher phases).
| `plugin.bin` | string | `mcpx` | plugin | no | `--plugin-bin` | `MCPX_PLUGIN_BIN` | the executable the plugin invokes |
| `plugin.binArgs` | list | *(empty)* | plugin | no | `--plugin-bin-args` | `MCPX_PLUGIN_BIN_ARGS` | arguments put in front of every plugin invocation of mcpx |
| `plugin.daemonTools` | enum | `auto` | plugin | no | `--plugin-daemon-tools` | `MCPX_PLUGIN_DAEMON_TOOLS` | offer the tools that list and choose between daemons |
| `plugin.disabledTools` | list | *(empty)* | plugin | no | `--plugin-disabled-tools` | `MCPX_PLUGIN_DISABLED_TOOLS` | model-facing mcpx tools hidden from every session |
| `plugin.discoveryRetry` | duration | `1m0s` | plugin | no | `--plugin-discovery-retry` | `MCPX_PLUGIN_DISCOVERY_RETRY` | how long the plugin waits before looking for mcpx again |
| `plugin.env` | enum | `full` | plugin | no | `--plugin-env` | `MCPX_PLUGIN_ENV` | how much session context is put into each command's environment |
| `plugin.headless` | enum | `auto` | plugin | no | `--plugin-headless` | `MCPX_PLUGIN_HEADLESS` | suppress toasts, because nobody is looking at a screen |
Expand Down
3 changes: 2 additions & 1 deletion pkgs/mcpx/internal/settings/effect.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ var EffectExemptions = map[string]string{
"plugin.annotate": "read by the opencode plugin host (JS side); the Go e2e harness does not drive the plugin host",
"plugin.headless": "read by the opencode plugin host (JS side); the Go e2e harness does not drive the plugin host",
"plugin.daemonTools": "read by the opencode plugin host (JS side); the Go e2e harness does not drive the plugin host",
"plugin.disabledTools": "read by the opencode plugin host (JS side); the Go e2e harness does not drive the plugin host",
"protoMessages.listMaxAge": "protocol message timing: era fixtures cover the flow end-to-end, but no per-setting with/without probe exists yet",
"protoMessages.readMaxAge": "protocol message timing: era fixtures cover the flow end-to-end, but no per-setting with/without probe exists yet",
"protoMessages.taskAfter": "protocol message timing: era fixtures cover the flow end-to-end, but no per-setting with/without probe exists yet",
Expand All @@ -276,7 +277,7 @@ var EffectExemptions = map[string]string{
// EffectExemptionPin is the ratchet: the exemption count at the time
// the guard landed. It may only ever be lowered, and only in the PR
// that removes an exemption by adding the probe that replaces it.
const EffectExemptionPin = 202 // deliberate +1 for daemon.roots and +8 for model.*: model settings are covered by internal/model and daemon unit tests; settings-driven e2e probes are not yet present. Deliberate +1 (2026-11-03, #1925 slice 3) for sampling.answerLocally: same model-layer coverage, daemon unit tests in internal/daemon/sampling_local_test.go.
const EffectExemptionPin = 203 // deliberate +1 for daemon.roots and +8 for model.*: model settings are covered by internal/model and daemon unit tests; settings-driven e2e probes are not yet present. Deliberate +1 (2026-11-03, #1925 slice 3) for sampling.answerLocally: same model-layer coverage, daemon unit tests in internal/daemon/sampling_local_test.go. Deliberate +1 (2026-11-03, #5242) for plugin.disabledTools: read by the opencode plugin host (JS side); the Go e2e harness does not drive the plugin host, the same basis as every other plugin.* exemption.

// CheckEffectCoverage returns one violation per way the probe and
// exemption maps fail to cover reg exactly: a setting with neither,
Expand Down
11 changes: 11 additions & 0 deletions pkgs/mcpx/internal/settings/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,17 @@ func pluginSettings() []Setting {
Long: "Auto offers them when plugin.tools is on or when discovery found " +
"more than one daemon and somebody may want to choose.",
},
{
Path: "plugin.disabledTools", Kind: KindList, Default: "",
Scope: ScopePlugin, Repeatable: true,
Name: "Disabled tools", Short: "model-facing mcpx tools hidden from every session",
Long: "Model-facing mcpx tool names (mcpx_exec, ...) hidden from every " +
"session the plugin serves: setup records it as each new " +
"session's tool-filter policy, unless that session already " +
"has a policy of its own. Names outside the mcpx_ namespace " +
"are dropped when the policy is read, so this can never hide " +
"a host tool.",
},
}
}

Expand Down
1 change: 1 addition & 0 deletions pkgs/mcpx/internal/settings/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ func TestPluginEnvironmentNamesAreTheContractWithTheTypeScript(t *testing.T) {
"plugin.annotate": "MCPX_PLUGIN_ANNOTATE",
"plugin.headless": "MCPX_PLUGIN_HEADLESS",
"plugin.daemonTools": "MCPX_PLUGIN_DAEMON_TOOLS",
"plugin.disabledTools": "MCPX_PLUGIN_DISABLED_TOOLS",
} {
set, ok := s.Lookup(path)
if !ok {
Expand Down
1 change: 1 addition & 0 deletions pkgs/mcpx/plugin/opencode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ with `go test ./internal/settings -run TestThePluginReadmeListsEveryOption -upda
| `annotate` | `MCPX_PLUGIN_ANNOTATE` | `true` | add mcpx's own notes to a tool result. |
| `headless` | `MCPX_PLUGIN_HEADLESS` | `auto` | suppress toasts, because nobody is looking at a screen. |
| `daemonTools` | `MCPX_PLUGIN_DAEMON_TOOLS` | `auto` | offer the tools that list and choose between daemons. |
| `disabledTools` | `MCPX_PLUGIN_DISABLED_TOOLS` | — | model-facing mcpx tools hidden from every session. |

<!-- END GENERATED -->

Expand Down
Loading