Commit fcac5df
committed
feat(meta-tools): target any Space via space_id + add mcpmux_list_spaces
Make the self-management surface flexible: a client can now inspect and
configure any Space it can discover, with user approval as the gate.
- New read tool `mcpmux_list_spaces` → [{id, name, is_default, description}]
so the LLM can discover valid space ids.
- Optional `space_id` on every tool (list_all_tools, search_tools,
list_feature_sets, manage_feature_set, bind_current_workspace). Omitted ⇒
the caller''s resolved Space (back-compatible); provided ⇒ that Space
(validated to exist). bind can now route a workspace into a *different* Space.
- Approval payload carries `space_name`; every write summary names the target
Space so a cross-Space change is a conscious approval, not a surprise.
- Reads stay silent (local-trust); writes still prompt.
Advertise a trigger language so the LLM isolates McpMux requests from the
user''s actual work: the server `instructions` now teach the `@mux` convention
and that `mcpmux_*` are McpMux controls, not task tools. Built-in descriptor
lists mcpmux_list_spaces.
Tests: list_spaces, unknown-space rejection, cross-Space create + bind land in
the targeted Space (not the caller''s), updated advertise + parity guards.
Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com>1 parent 43652ea commit fcac5df
6 files changed
Lines changed: 339 additions & 51 deletions
File tree
- crates
- mcpmux-core/src/domain
- mcpmux-gateway/src
- mcp
- services/meta_tools
- tests/rust/tests/integration
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
59 | 64 | | |
60 | 65 | | |
61 | | - | |
| 66 | + | |
62 | 67 | | |
63 | 68 | | |
64 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
357 | | - | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
358 | 372 | | |
359 | 373 | | |
360 | 374 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
76 | 82 | | |
77 | 83 | | |
78 | 84 | | |
| |||
350 | 356 | | |
351 | 357 | | |
352 | 358 | | |
| 359 | + | |
353 | 360 | | |
354 | 361 | | |
355 | 362 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| |||
0 commit comments