fenix-mcp 1.3.0__py3-none-any.whl → 1.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fenix_mcp/__init__.py +1 -1
- fenix_mcp/application/tools/knowledge.py +26 -5
- {fenix_mcp-1.3.0.dist-info → fenix_mcp-1.4.0.dist-info}/METADATA +1 -1
- {fenix_mcp-1.3.0.dist-info → fenix_mcp-1.4.0.dist-info}/RECORD +7 -7
- {fenix_mcp-1.3.0.dist-info → fenix_mcp-1.4.0.dist-info}/WHEEL +0 -0
- {fenix_mcp-1.3.0.dist-info → fenix_mcp-1.4.0.dist-info}/entry_points.txt +0 -0
- {fenix_mcp-1.3.0.dist-info → fenix_mcp-1.4.0.dist-info}/top_level.txt +0 -0
fenix_mcp/__init__.py
CHANGED
|
@@ -679,7 +679,24 @@ class KnowledgeTool(Tool):
|
|
|
679
679
|
return_description=payload.return_description,
|
|
680
680
|
return_metadata=payload.return_metadata,
|
|
681
681
|
)
|
|
682
|
-
|
|
682
|
+
# Buscar rules associadas ao mode
|
|
683
|
+
associations = await self._service.mode_rules(payload.mode_id)
|
|
684
|
+
rules = [assoc.get("rule", assoc) for assoc in associations]
|
|
685
|
+
|
|
686
|
+
# Formatar resposta com rules (incluindo content)
|
|
687
|
+
output = _format_mode(mode, header="🎭 Mode details", show_content=True)
|
|
688
|
+
if rules:
|
|
689
|
+
rules_parts = []
|
|
690
|
+
for r in rules:
|
|
691
|
+
rule_text = f"### 📋 {r.get('name', 'Unnamed')}\n"
|
|
692
|
+
rule_text += f"ID: {r.get('id')}\n"
|
|
693
|
+
if r.get("content"):
|
|
694
|
+
rule_text += f"\n{r.get('content')}"
|
|
695
|
+
rules_parts.append(rule_text)
|
|
696
|
+
output += f"\n\n**Rules ({len(rules)}):**\n\n" + "\n\n---\n\n".join(
|
|
697
|
+
rules_parts
|
|
698
|
+
)
|
|
699
|
+
return text(output)
|
|
683
700
|
|
|
684
701
|
if action is KnowledgeAction.MODE_UPDATE:
|
|
685
702
|
if not payload.mode_id:
|
|
@@ -724,18 +741,22 @@ class KnowledgeTool(Tool):
|
|
|
724
741
|
|
|
725
742
|
if action is KnowledgeAction.MODE_RULES:
|
|
726
743
|
if payload.mode_id:
|
|
727
|
-
|
|
744
|
+
associations = await self._service.mode_rules(payload.mode_id)
|
|
728
745
|
context_label = f"mode {payload.mode_id}"
|
|
746
|
+
# API retorna [{id, mode_id, rule_id, rule: {...}}] - extrair rule
|
|
747
|
+
items = [assoc.get("rule", assoc) for assoc in associations]
|
|
729
748
|
elif payload.rule_id:
|
|
730
|
-
|
|
749
|
+
associations = await self._service.mode_rules_for_rule(payload.rule_id)
|
|
731
750
|
context_label = f"rule {payload.rule_id}"
|
|
751
|
+
# API retorna [{id, mode_id, rule_id, mode: {...}}] - extrair mode
|
|
752
|
+
items = [assoc.get("mode", assoc) for assoc in associations]
|
|
732
753
|
else:
|
|
733
754
|
return text("❌ Provide mode_id or rule_id to list associations.")
|
|
734
|
-
if not
|
|
755
|
+
if not items:
|
|
735
756
|
return text("🔗 No associations found.")
|
|
736
757
|
body = "\n".join(
|
|
737
758
|
f"- {item.get('name', 'Unnamed')} (ID: {item.get('id')})"
|
|
738
|
-
for item in
|
|
759
|
+
for item in items
|
|
739
760
|
)
|
|
740
761
|
return text(f"🔗 **Associations for {context_label}:**\n{body}")
|
|
741
762
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
fenix_mcp/__init__.py,sha256=
|
|
1
|
+
fenix_mcp/__init__.py,sha256=c39bdiud7BvOvRegYtF7vm5AIO3SEp8fgNQu1KJGSDM,180
|
|
2
2
|
fenix_mcp/main.py,sha256=iJV-9btNMDJMObvcn7wBQdbLLKjkYCQ1ANGEwHGHlMU,2857
|
|
3
3
|
fenix_mcp/application/presenters.py,sha256=fGME54PdCDhTBhXO-JUB9yLdBHiE1aeXLTC2fCuxnxM,689
|
|
4
4
|
fenix_mcp/application/tool_base.py,sha256=YJk7aSVGjXEvAkXrOHOuUjCFhYni9NPKFyPKiZqkrCc,4235
|
|
@@ -7,7 +7,7 @@ fenix_mcp/application/tools/__init__.py,sha256=Gi1YvYh-KdL9HD8gLVrknHrxiKKEOhHBE
|
|
|
7
7
|
fenix_mcp/application/tools/health.py,sha256=m5DxhoRbdwl6INzd6PISxv1NAv-ljCrezsr773VB0wE,834
|
|
8
8
|
fenix_mcp/application/tools/initialize.py,sha256=YfsE3fVYiqGEwvaI_jg5-0K7pGURXxpB3WNwETmGBPc,5499
|
|
9
9
|
fenix_mcp/application/tools/intelligence.py,sha256=fXfjBwAQmZCn3Zc8BqFnQFAJkpd9JsfOPa_uXJj-bMU,15778
|
|
10
|
-
fenix_mcp/application/tools/knowledge.py,sha256=
|
|
10
|
+
fenix_mcp/application/tools/knowledge.py,sha256=W8YFAPy3s1l7amdWLSEdG3xOXbPVyORCfM8Lza_M3Qs,51312
|
|
11
11
|
fenix_mcp/application/tools/productivity.py,sha256=wyJ7-2VqgI2cdrliBD_ejwNvQhN1DecpXSQVrCxcUpQ,11231
|
|
12
12
|
fenix_mcp/application/tools/user_config.py,sha256=O5AVg7IUKL9uIoUoBSFovBDHl9jofhKWzhFK7CnKi4s,6470
|
|
13
13
|
fenix_mcp/domain/initialization.py,sha256=AZhdSNITQ7O3clELBuqGvjJc-c8pFKc7zQz-XR2xXPc,6933
|
|
@@ -22,8 +22,8 @@ fenix_mcp/infrastructure/logging.py,sha256=bHrWlSi_0HshRe3--BK_5nzUszW-gh37q6jsd
|
|
|
22
22
|
fenix_mcp/infrastructure/fenix_api/client.py,sha256=z5S6cwBxerpaDXj4Y4LWZEd7ZuGcVmgcaXQv3tTFPBs,28038
|
|
23
23
|
fenix_mcp/interface/mcp_server.py,sha256=5UM2NJuNbwHkmCEprIFataJ5nFZiO8efTtP_oW3_iX0,2331
|
|
24
24
|
fenix_mcp/interface/transports.py,sha256=PxdhfjH8UMl03f7nuCLc-M6tMx6-Y-btVz_mSqXKrSI,8138
|
|
25
|
-
fenix_mcp-1.
|
|
26
|
-
fenix_mcp-1.
|
|
27
|
-
fenix_mcp-1.
|
|
28
|
-
fenix_mcp-1.
|
|
29
|
-
fenix_mcp-1.
|
|
25
|
+
fenix_mcp-1.4.0.dist-info/METADATA,sha256=A0YktRHXhAMgbmzjdbsm0oMDV7V079flOVhTs3QJxqw,7260
|
|
26
|
+
fenix_mcp-1.4.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
27
|
+
fenix_mcp-1.4.0.dist-info/entry_points.txt,sha256=o52x_YHBupEd-1Z1GSfUjv3gJrx5_I-EkHhCgt1WBaE,49
|
|
28
|
+
fenix_mcp-1.4.0.dist-info/top_level.txt,sha256=2G1UtKpwjaIGQyE7sRoHecxaGLeuexfjrOUjv9DDKh4,10
|
|
29
|
+
fenix_mcp-1.4.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|