Commit 462db9c
committed
mcp(fix[option_tools]): Reject target without scope instead of ignoring
why: When `target` was provided without `scope`, `_resolve_option_target`
silently ignored the target and returned the server object. This caused
`show_option(option="x", target="my_session")` to query the server
instead of the intended session — a fail-open behavior.
what:
- Raise ToolError when target is provided but scope is None
- Add test for target-without-scope error path1 parent 7dfedbe commit 462db9c
File tree
2 files changed
+18
-0
lines changed- src/libtmux/mcp/tools
- tests/mcp
2 files changed
+18
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
46 | 52 | | |
47 | 53 | | |
48 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
41 | 53 | | |
42 | 54 | | |
43 | 55 | | |
| |||
0 commit comments