fenix-mcp 0.5.1__py3-none-any.whl → 0.5.6__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 +2 -11
- fenix_mcp/application/tools/intelligence.py +12 -4
- {fenix_mcp-0.5.1.dist-info → fenix_mcp-0.5.6.dist-info}/METADATA +1 -1
- {fenix_mcp-0.5.1.dist-info → fenix_mcp-0.5.6.dist-info}/RECORD +7 -7
- {fenix_mcp-0.5.1.dist-info → fenix_mcp-0.5.6.dist-info}/WHEEL +0 -0
- {fenix_mcp-0.5.1.dist-info → fenix_mcp-0.5.6.dist-info}/entry_points.txt +0 -0
- {fenix_mcp-0.5.1.dist-info → fenix_mcp-0.5.6.dist-info}/top_level.txt +0 -0
fenix_mcp/__init__.py
CHANGED
|
@@ -3,18 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
"""
|
|
5
5
|
Fênix Cloud MCP Server (Python edition).
|
|
6
|
-
|
|
7
|
-
This package follows a Clean Architecture layout inside the MCP ecosystem:
|
|
8
|
-
|
|
9
|
-
- interface: transports and MCP protocol glue code
|
|
10
|
-
- application: tools, registries, presenters and use-case orchestrators
|
|
11
|
-
- domain: pure business models and services
|
|
12
|
-
- infrastructure: API clients, config, logging and shared context
|
|
13
|
-
|
|
14
|
-
Version 0.1.0 - Initial release with basic MCP functionality.
|
|
15
|
-
Updated with improved error handling and better documentation.
|
|
16
6
|
"""
|
|
17
7
|
|
|
18
8
|
__all__ = ["__version__"]
|
|
19
9
|
|
|
20
|
-
|
|
10
|
+
|
|
11
|
+
__version__ = "0.5.6"
|
|
@@ -155,7 +155,10 @@ class IntelligenceTool(Tool):
|
|
|
155
155
|
async def _handle_smart_create(self, payload: IntelligenceRequest):
|
|
156
156
|
if not payload.title or not payload.content:
|
|
157
157
|
return text("❌ Informe título e conteúdo para criar uma memória.")
|
|
158
|
-
|
|
158
|
+
try:
|
|
159
|
+
normalized_tags = _ensure_tag_sequence(payload.tags)
|
|
160
|
+
except ValueError as exc:
|
|
161
|
+
return text(f"❌ {exc}")
|
|
159
162
|
memory = await self._service.smart_create_memory(
|
|
160
163
|
title=payload.title,
|
|
161
164
|
content=payload.content,
|
|
@@ -260,7 +263,10 @@ class IntelligenceTool(Tool):
|
|
|
260
263
|
existing = await self._service.get_memory(
|
|
261
264
|
payload.id, include_content=False, include_metadata=True
|
|
262
265
|
)
|
|
263
|
-
|
|
266
|
+
try:
|
|
267
|
+
normalized_tags = _ensure_tag_sequence(payload.tags)
|
|
268
|
+
except ValueError as exc:
|
|
269
|
+
return text(f"❌ {exc}")
|
|
264
270
|
metadata = build_metadata(
|
|
265
271
|
payload.metadata,
|
|
266
272
|
importance=payload.importance,
|
|
@@ -324,6 +330,8 @@ def _ensure_tag_sequence(raw: Optional[Any]) -> Optional[List[str]]:
|
|
|
324
330
|
result = [str(item).strip() for item in raw if str(item).strip()]
|
|
325
331
|
return result or None
|
|
326
332
|
if isinstance(raw, str):
|
|
327
|
-
|
|
328
|
-
|
|
333
|
+
raise ValueError(
|
|
334
|
+
"O campo `tags` deve ser enviado como array JSON, por exemplo: "
|
|
335
|
+
'["tag1", "tag2"].'
|
|
336
|
+
)
|
|
329
337
|
return [str(raw).strip()]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
fenix_mcp/__init__.py,sha256=
|
|
1
|
+
fenix_mcp/__init__.py,sha256=LV_5ywWiAnodLDI7k4GMy1VEsHv9aaa6jyvhAjBS4_g,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=qUcb46qx9gHQfrSHgj4RD4NCHW-OIvKQdR5G9uxZ5l4,1316
|
|
@@ -6,7 +6,7 @@ fenix_mcp/application/tool_registry.py,sha256=bPT5g8GfxG_qu28R1WaDOZHvtmG6TPDvZi
|
|
|
6
6
|
fenix_mcp/application/tools/__init__.py,sha256=Gi1YvYh-KdL9HD8gLVrknHrxiKKEOhHBEZ02KBXJaKQ,796
|
|
7
7
|
fenix_mcp/application/tools/health.py,sha256=m5DxhoRbdwl6INzd6PISxv1NAv-ljCrezsr773VB0wE,834
|
|
8
8
|
fenix_mcp/application/tools/initialize.py,sha256=f33DNDn9u8IYwpqiBj6bjJ-wHgaUP1zEuAvUM1rMYPc,4674
|
|
9
|
-
fenix_mcp/application/tools/intelligence.py,sha256=
|
|
9
|
+
fenix_mcp/application/tools/intelligence.py,sha256=5qdCZbEK1IuKjhS5eDqgny0_zyT9lpYeZly-hM6ilxs,14165
|
|
10
10
|
fenix_mcp/application/tools/knowledge.py,sha256=4ClGoFRqyFIPuzzg2DAg-w2eMvTP37mH0THXDGftinw,44634
|
|
11
11
|
fenix_mcp/application/tools/productivity.py,sha256=2IMkNdZ-Kd1CFAO7geruAVjtf_BWoDdbnwkl76vhtC8,9973
|
|
12
12
|
fenix_mcp/application/tools/user_config.py,sha256=8mPOZuwszO0TapxgrA7Foe15VQE874_mvfQYlGzyv4Y,6230
|
|
@@ -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=Navi7cGAOradghcbYkFIQQINpjFrdINlNhdfZ4iSSYQ,28338
|
|
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-0.5.
|
|
26
|
-
fenix_mcp-0.5.
|
|
27
|
-
fenix_mcp-0.5.
|
|
28
|
-
fenix_mcp-0.5.
|
|
29
|
-
fenix_mcp-0.5.
|
|
25
|
+
fenix_mcp-0.5.6.dist-info/METADATA,sha256=uORCg1OqP0TIm_d39HHxxpatgW5JFL6yHt1yUspe9bI,7260
|
|
26
|
+
fenix_mcp-0.5.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
27
|
+
fenix_mcp-0.5.6.dist-info/entry_points.txt,sha256=o52x_YHBupEd-1Z1GSfUjv3gJrx5_I-EkHhCgt1WBaE,49
|
|
28
|
+
fenix_mcp-0.5.6.dist-info/top_level.txt,sha256=2G1UtKpwjaIGQyE7sRoHecxaGLeuexfjrOUjv9DDKh4,10
|
|
29
|
+
fenix_mcp-0.5.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|