Refactoring of mapping between the upstream tool/resource/prompt name - #124
Refactoring of mapping between the upstream tool/resource/prompt name#124cafalchio wants to merge 20 commits into
Conversation
a93714e to
adbbfa8
Compare
lucarlig
left a comment
There was a problem hiding this comment.
Requesting changes until the tuple order is confirmed and resource-template routing is accounted for.
lucarlig
left a comment
There was a problem hiding this comment.
- Field name is wrong.
resources_templatesshould beresource_templates, matching MCP terminology and the linked issue’s wire contract. - This changes the hot path and removes prefix/alias routing, but _context/wiki/routing.md was not updated, ask bob please.
- Cleanup gap: NameAlias and the three backend alias sets now have no production consumer, leaving a redundant second routing model. They should be removed
| pub struct VirtualHost { | ||
| pub backends: HashMap<String, BackendMCPGateway>, | ||
| #[serde(default)] | ||
| pub tools: HashMap<String, ServiceRoute>, |
There was a problem hiding this comment.
What the key here? Make it more descriptive in code so it is obvious without additional comments.
For example, instead of:
pub tools: HashMap<String, ServiceRoute>,
use
pub type DownstreamToolName= String;
pub tools: HashMap<DownstreamToolName, ServiceRoute>,```
There was a problem hiding this comment.
I learned about type alias Yesterday. Let me fix it.
|
|
||
| #[derive(Debug, Clone, Deserialize, Serialize, JsonSchema)] | ||
| pub struct VirtualHost { | ||
| pub backends: HashMap<String, BackendMCPGateway>, |
There was a problem hiding this comment.
Same thing, as below. It is not clear what the key is here.
Signed-off-by: cafalchio <mcafalchio@gmail.com>
Signed-off-by: cafalchio <mcafalchio@gmail.com>
Signed-off-by: cafalchio <mcafalchio@gmail.com>
Signed-off-by: cafalchio <mcafalchio@gmail.com>
Signed-off-by: cafalchio <mcafalchio@gmail.com>
Signed-off-by: cafalchio <mcafalchio@gmail.com>
Signed-off-by: cafalchio <mcafalchio@gmail.com>
Signed-off-by: cafalchio <mcafalchio@gmail.com>
Signed-off-by: cafalchio <mcafalchio@gmail.com>
Signed-off-by: cafalchio <mcafalchio@gmail.com>
Signed-off-by: cafalchio <mcafalchio@gmail.com>
Signed-off-by: cafalchio <mcafalchio@gmail.com>
Signed-off-by: cafalchio <mcafalchio@gmail.com>
Signed-off-by: cafalchio <mcafalchio@gmail.com>
1630015 to
2ea8795
Compare
|
|
||
| #[derive(Debug, Clone, Deserialize, Serialize, JsonSchema)] | ||
| pub struct VirtualHost { | ||
| pub backends: HashMap<String, BackendMCPGateway>, |
There was a problem hiding this comment.
Added DownstreamBackendName
dawid-nowak
left a comment
There was a problem hiding this comment.
More changes around improving clarity of user_store
Signed-off-by: cafalchio <mcafalchio@gmail.com>
Signed-off-by: cafalchio <mcafalchio@gmail.com>
Signed-off-by: cafalchio <mcafalchio@gmail.com>
| pub backends: HashMap<String, BackendMCPGateway>, | ||
| pub backends: HashMap<DownstreamBackendName, BackendMCPGateway>, | ||
| #[serde(default)] | ||
| pub tools: HashMap<DownstreamToolName, ServiceRoute>, |
There was a problem hiding this comment.
ServiceName.backend_name is still a string, it should mach DownstreamBackendName
Signed-off-by: cafalchio <mcafalchio@gmail.com>
Signed-off-by: cafalchio <mcafalchio@gmail.com>
150f15d to
484e5fb
Compare
Updated VirtualHost in user_store.rs to receive tools, prompts and resources.
closes IBM/mcp-context-forge#6450