fenix-mcp 1.3.0__tar.gz → 1.4.0__tar.gz

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.
Files changed (34) hide show
  1. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/PKG-INFO +1 -1
  2. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp/__init__.py +1 -1
  3. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp/application/tools/knowledge.py +26 -5
  4. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp.egg-info/PKG-INFO +1 -1
  5. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/README.md +0 -0
  6. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp/application/presenters.py +0 -0
  7. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp/application/tool_base.py +0 -0
  8. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp/application/tool_registry.py +0 -0
  9. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp/application/tools/__init__.py +0 -0
  10. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp/application/tools/health.py +0 -0
  11. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp/application/tools/initialize.py +0 -0
  12. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp/application/tools/intelligence.py +0 -0
  13. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp/application/tools/productivity.py +0 -0
  14. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp/application/tools/user_config.py +0 -0
  15. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp/domain/initialization.py +0 -0
  16. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp/domain/intelligence.py +0 -0
  17. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp/domain/knowledge.py +0 -0
  18. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp/domain/productivity.py +0 -0
  19. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp/domain/user_config.py +0 -0
  20. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp/infrastructure/config.py +0 -0
  21. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp/infrastructure/context.py +0 -0
  22. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp/infrastructure/fenix_api/client.py +0 -0
  23. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp/infrastructure/http_client.py +0 -0
  24. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp/infrastructure/logging.py +0 -0
  25. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp/interface/mcp_server.py +0 -0
  26. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp/interface/transports.py +0 -0
  27. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp/main.py +0 -0
  28. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp.egg-info/SOURCES.txt +0 -0
  29. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp.egg-info/dependency_links.txt +0 -0
  30. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp.egg-info/entry_points.txt +0 -0
  31. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp.egg-info/requires.txt +0 -0
  32. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/fenix_mcp.egg-info/top_level.txt +0 -0
  33. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/pyproject.toml +0 -0
  34. {fenix_mcp-1.3.0 → fenix_mcp-1.4.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fenix-mcp
3
- Version: 1.3.0
3
+ Version: 1.4.0
4
4
  Summary: Fênix Cloud MCP server implemented in Python
5
5
  Author: Fenix Inc
6
6
  Requires-Python: >=3.10
@@ -8,4 +8,4 @@ Fênix Cloud MCP Server (Python edition).
8
8
  __all__ = ["__version__"]
9
9
 
10
10
 
11
- __version__ = "1.3.0"
11
+ __version__ = "1.4.0"
@@ -679,7 +679,24 @@ class KnowledgeTool(Tool):
679
679
  return_description=payload.return_description,
680
680
  return_metadata=payload.return_metadata,
681
681
  )
682
- return text(_format_mode(mode, header="🎭 Mode details", show_content=True))
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
- rules = await self._service.mode_rules(payload.mode_id)
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
- rules = await self._service.mode_rules_for_rule(payload.rule_id)
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 rules:
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 rules
759
+ for item in items
739
760
  )
740
761
  return text(f"🔗 **Associations for {context_label}:**\n{body}")
741
762
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fenix-mcp
3
- Version: 1.3.0
3
+ Version: 1.4.0
4
4
  Summary: Fênix Cloud MCP server implemented in Python
5
5
  Author: Fenix Inc
6
6
  Requires-Python: >=3.10
File without changes
File without changes
File without changes
File without changes