mirror of
https://github.com/hansjone/netx.git
synced 2026-10-18 13:50:45 +08:00
feat(mcp): publish ops skills via /mcp resources, prompts and getNetxSkill
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
42d5f9c5a7
commit
166d2289c3
11 changed files with 1057 additions and 25 deletions
|
|
@ -212,11 +212,13 @@ def test_tools_for_scopes_filters_by_granted() -> None:
|
|||
|
||||
def test_registry_groups_and_scope_filter() -> None:
|
||||
ops = tools_for_request(None, frozenset({"ops"}))
|
||||
assert len(ops) == 15
|
||||
assert all(t["_group"] == "ops" for t in ops)
|
||||
assert len(ops) == 16 # 15 ops + getNetxSkill
|
||||
assert {t["_group"] for t in ops} == {"ops", "meta"}
|
||||
assert "getNetxSkill" in {t["name"] for t in ops}
|
||||
limited = tools_for_request(frozenset({"ne:read"}), frozenset({"ops"}))
|
||||
names = {t["name"] for t in limited}
|
||||
assert "listManagedNe" in names
|
||||
assert "getNetxSkill" in names
|
||||
assert "execManagedNe" not in names
|
||||
assert "queryNmsAlarms" not in names
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue