fenix-mcp 0.1.0__py3-none-any.whl → 0.2.2__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 +4 -1
- fenix_mcp/application/tool_base.py +3 -2
- fenix_mcp/application/tool_registry.py +3 -1
- fenix_mcp/application/tools/health.py +1 -3
- fenix_mcp/application/tools/initialize.py +20 -7
- fenix_mcp/application/tools/intelligence.py +47 -15
- fenix_mcp/application/tools/knowledge.py +162 -50
- fenix_mcp/application/tools/productivity.py +26 -9
- fenix_mcp/application/tools/user_config.py +18 -9
- fenix_mcp/domain/initialization.py +22 -22
- fenix_mcp/domain/intelligence.py +27 -15
- fenix_mcp/domain/knowledge.py +161 -61
- fenix_mcp/domain/productivity.py +3 -2
- fenix_mcp/domain/user_config.py +16 -7
- fenix_mcp/infrastructure/config.py +6 -2
- fenix_mcp/infrastructure/context.py +0 -1
- fenix_mcp/infrastructure/fenix_api/client.py +118 -38
- fenix_mcp/infrastructure/http_client.py +1 -1
- fenix_mcp/interface/mcp_server.py +0 -3
- fenix_mcp/interface/transports.py +19 -10
- fenix_mcp/main.py +4 -1
- {fenix_mcp-0.1.0.dist-info → fenix_mcp-0.2.2.dist-info}/METADATA +56 -6
- fenix_mcp-0.2.2.dist-info/RECORD +29 -0
- fenix_mcp-0.1.0.dist-info/RECORD +0 -29
- {fenix_mcp-0.1.0.dist-info → fenix_mcp-0.2.2.dist-info}/WHEEL +0 -0
- {fenix_mcp-0.1.0.dist-info → fenix_mcp-0.2.2.dist-info}/entry_points.txt +0 -0
- {fenix_mcp-0.1.0.dist-info → fenix_mcp-0.2.2.dist-info}/top_level.txt +0 -0
fenix_mcp/domain/knowledge.py
CHANGED
|
@@ -72,8 +72,12 @@ class KnowledgeService:
|
|
|
72
72
|
async def work_get(self, work_id: str) -> Dict[str, Any]:
|
|
73
73
|
return await self._call_dict(self.api.get_work_item, work_id)
|
|
74
74
|
|
|
75
|
-
async def work_update(
|
|
76
|
-
|
|
75
|
+
async def work_update(
|
|
76
|
+
self, work_id: str, payload: Dict[str, Any]
|
|
77
|
+
) -> Dict[str, Any]:
|
|
78
|
+
return await self._call(
|
|
79
|
+
self.api.update_work_item, work_id, _strip_none(payload)
|
|
80
|
+
)
|
|
77
81
|
|
|
78
82
|
async def work_delete(self, work_id: str) -> None:
|
|
79
83
|
await self._call(self.api.delete_work_item, work_id)
|
|
@@ -81,7 +85,9 @@ class KnowledgeService:
|
|
|
81
85
|
async def work_backlog(self, *, team_id: str) -> List[Dict[str, Any]]:
|
|
82
86
|
return await self._call_list(self.api.list_work_items_backlog, team_id=team_id)
|
|
83
87
|
|
|
84
|
-
async def work_search(
|
|
88
|
+
async def work_search(
|
|
89
|
+
self, *, query: str, team_id: str, limit: int
|
|
90
|
+
) -> List[Dict[str, Any]]:
|
|
85
91
|
return await self._call_list(
|
|
86
92
|
self.api.search_work_items,
|
|
87
93
|
query=query,
|
|
@@ -90,29 +96,46 @@ class KnowledgeService:
|
|
|
90
96
|
)
|
|
91
97
|
|
|
92
98
|
async def work_analytics(self, *, team_id: str) -> Dict[str, Any]:
|
|
93
|
-
return
|
|
99
|
+
return (
|
|
100
|
+
await self._call(self.api.get_work_items_analytics, team_id=team_id) or {}
|
|
101
|
+
)
|
|
94
102
|
|
|
95
|
-
async def work_velocity(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
103
|
+
async def work_velocity(
|
|
104
|
+
self, *, team_id: str, sprints_count: int
|
|
105
|
+
) -> Dict[str, Any]:
|
|
106
|
+
return (
|
|
107
|
+
await self._call(
|
|
108
|
+
self.api.get_work_items_velocity,
|
|
109
|
+
team_id=team_id,
|
|
110
|
+
sprints_count=sprints_count,
|
|
111
|
+
)
|
|
112
|
+
or {}
|
|
113
|
+
)
|
|
101
114
|
|
|
102
115
|
async def work_by_sprint(self, *, sprint_id: str) -> List[Dict[str, Any]]:
|
|
103
|
-
return await self._call_list(
|
|
116
|
+
return await self._call_list(
|
|
117
|
+
self.api.list_work_items_by_sprint, sprint_id=sprint_id
|
|
118
|
+
)
|
|
104
119
|
|
|
105
120
|
async def work_burndown(self, *, sprint_id: str) -> Dict[str, Any]:
|
|
106
|
-
return
|
|
121
|
+
return (
|
|
122
|
+
await self._call(self.api.get_work_items_burndown, sprint_id=sprint_id)
|
|
123
|
+
or {}
|
|
124
|
+
)
|
|
107
125
|
|
|
108
126
|
async def work_by_epic(self, *, epic_id: str) -> List[Dict[str, Any]]:
|
|
109
127
|
return await self._call(self.api.list_work_items_by_epic, epic_id=epic_id) or []
|
|
110
128
|
|
|
111
129
|
async def work_epic_progress(self, *, epic_id: str) -> Dict[str, Any]:
|
|
112
|
-
return
|
|
130
|
+
return (
|
|
131
|
+
await self._call(self.api.get_work_items_epic_progress, epic_id=epic_id)
|
|
132
|
+
or {}
|
|
133
|
+
)
|
|
113
134
|
|
|
114
135
|
async def work_by_board(self, *, board_id: str) -> List[Dict[str, Any]]:
|
|
115
|
-
return await self._call_list(
|
|
136
|
+
return await self._call_list(
|
|
137
|
+
self.api.list_work_items_by_board, board_id=board_id
|
|
138
|
+
)
|
|
116
139
|
|
|
117
140
|
async def work_children(self, work_id: str) -> List[Dict[str, Any]]:
|
|
118
141
|
return await self._call_list(self.api.get_work_item_children, work_id)
|
|
@@ -120,17 +143,27 @@ class KnowledgeService:
|
|
|
120
143
|
async def work_move(self, work_id: str, payload: Dict[str, Any]) -> Dict[str, Any]:
|
|
121
144
|
return await self._call(self.api.move_work_item, work_id, _strip_none(payload))
|
|
122
145
|
|
|
123
|
-
async def work_update_status(
|
|
124
|
-
|
|
146
|
+
async def work_update_status(
|
|
147
|
+
self, work_id: str, payload: Dict[str, Any]
|
|
148
|
+
) -> Dict[str, Any]:
|
|
149
|
+
return await self._call(
|
|
150
|
+
self.api.update_work_item_status, work_id, _strip_none(payload)
|
|
151
|
+
)
|
|
125
152
|
|
|
126
|
-
async def work_move_to_board(
|
|
127
|
-
|
|
153
|
+
async def work_move_to_board(
|
|
154
|
+
self, work_id: str, payload: Dict[str, Any]
|
|
155
|
+
) -> Dict[str, Any]:
|
|
156
|
+
return await self._call(
|
|
157
|
+
self.api.move_work_item_to_board, work_id, _strip_none(payload)
|
|
158
|
+
)
|
|
128
159
|
|
|
129
160
|
async def work_link(self, work_id: str, payload: Dict[str, Any]) -> Dict[str, Any]:
|
|
130
161
|
return await self._call(self.api.link_work_item, work_id, _strip_none(payload))
|
|
131
162
|
|
|
132
163
|
async def work_assign_to_sprint(self, payload: Dict[str, Any]) -> Dict[str, Any]:
|
|
133
|
-
return await self._call(
|
|
164
|
+
return await self._call(
|
|
165
|
+
self.api.assign_work_items_to_sprint, _strip_none(payload)
|
|
166
|
+
)
|
|
134
167
|
|
|
135
168
|
async def work_bulk_update(self, payload: Dict[str, Any]) -> Dict[str, Any]:
|
|
136
169
|
return await self._call(self.api.bulk_update_work_items, _strip_none(payload))
|
|
@@ -153,7 +186,9 @@ class KnowledgeService:
|
|
|
153
186
|
result = await self._call(self.api.list_favorite_work_boards)
|
|
154
187
|
return _ensure_list(result)
|
|
155
188
|
|
|
156
|
-
async def board_search(
|
|
189
|
+
async def board_search(
|
|
190
|
+
self, *, query: str, team_id: str, limit: int
|
|
191
|
+
) -> List[Dict[str, Any]]:
|
|
157
192
|
result = await self._call(
|
|
158
193
|
self.api.search_work_boards,
|
|
159
194
|
query=query,
|
|
@@ -170,8 +205,12 @@ class KnowledgeService:
|
|
|
170
205
|
result = await self._call(self.api.get_work_board, board_id)
|
|
171
206
|
return _ensure_dict(result)
|
|
172
207
|
|
|
173
|
-
async def board_update(
|
|
174
|
-
|
|
208
|
+
async def board_update(
|
|
209
|
+
self, board_id: str, payload: Dict[str, Any]
|
|
210
|
+
) -> Dict[str, Any]:
|
|
211
|
+
return await self._call(
|
|
212
|
+
self.api.update_work_board, board_id, _strip_none(payload)
|
|
213
|
+
)
|
|
175
214
|
|
|
176
215
|
async def board_delete(self, board_id: str) -> None:
|
|
177
216
|
await self._call(self.api.delete_work_board, board_id)
|
|
@@ -183,11 +222,19 @@ class KnowledgeService:
|
|
|
183
222
|
result = await self._call(self.api.list_work_board_columns, board_id)
|
|
184
223
|
return _ensure_list(result)
|
|
185
224
|
|
|
186
|
-
async def board_toggle_favorite(
|
|
187
|
-
|
|
225
|
+
async def board_toggle_favorite(
|
|
226
|
+
self, board_id: str, payload: Dict[str, Any]
|
|
227
|
+
) -> Dict[str, Any]:
|
|
228
|
+
return await self._call(
|
|
229
|
+
self.api.toggle_work_board_favorite, board_id, _strip_none(payload)
|
|
230
|
+
)
|
|
188
231
|
|
|
189
|
-
async def board_clone(
|
|
190
|
-
|
|
232
|
+
async def board_clone(
|
|
233
|
+
self, board_id: str, payload: Dict[str, Any]
|
|
234
|
+
) -> Dict[str, Any]:
|
|
235
|
+
return await self._call(
|
|
236
|
+
self.api.clone_work_board, board_id, _strip_none(payload)
|
|
237
|
+
)
|
|
191
238
|
|
|
192
239
|
async def board_reorder(self, payload: Dict[str, Any]) -> Dict[str, Any]:
|
|
193
240
|
return await self._call(self.api.reorder_work_boards, _strip_none(payload))
|
|
@@ -196,13 +243,19 @@ class KnowledgeService:
|
|
|
196
243
|
return await self._call(self.api.create_work_board_column, _strip_none(payload))
|
|
197
244
|
|
|
198
245
|
async def board_column_reorder(self, payload: Dict[str, Any]) -> Dict[str, Any]:
|
|
199
|
-
return await self._call(
|
|
246
|
+
return await self._call(
|
|
247
|
+
self.api.reorder_work_board_columns, _strip_none(payload)
|
|
248
|
+
)
|
|
200
249
|
|
|
201
250
|
async def board_column_get(self, column_id: str) -> Dict[str, Any]:
|
|
202
251
|
return await self._call(self.api.get_work_board_column, column_id)
|
|
203
252
|
|
|
204
|
-
async def board_column_update(
|
|
205
|
-
|
|
253
|
+
async def board_column_update(
|
|
254
|
+
self, column_id: str, payload: Dict[str, Any]
|
|
255
|
+
) -> Dict[str, Any]:
|
|
256
|
+
return await self._call(
|
|
257
|
+
self.api.update_work_board_column, column_id, _strip_none(payload)
|
|
258
|
+
)
|
|
206
259
|
|
|
207
260
|
async def board_column_delete(self, column_id: str) -> None:
|
|
208
261
|
await self._call(self.api.delete_work_board_column, column_id)
|
|
@@ -219,7 +272,9 @@ class KnowledgeService:
|
|
|
219
272
|
async def sprint_get(self, sprint_id: str) -> Dict[str, Any]:
|
|
220
273
|
return await self._call_dict(self.api.get_sprint, sprint_id)
|
|
221
274
|
|
|
222
|
-
async def sprint_update(
|
|
275
|
+
async def sprint_update(
|
|
276
|
+
self, sprint_id: str, payload: Dict[str, Any]
|
|
277
|
+
) -> Dict[str, Any]:
|
|
223
278
|
return await self._call(self.api.update_sprint, sprint_id, _strip_none(payload))
|
|
224
279
|
|
|
225
280
|
async def sprint_delete(self, sprint_id: str) -> None:
|
|
@@ -229,9 +284,14 @@ class KnowledgeService:
|
|
|
229
284
|
return await self._call_list(self.api.list_sprints_by_team, team_id=team_id)
|
|
230
285
|
|
|
231
286
|
async def sprint_recent(self, *, team_id: str, limit: int) -> List[Dict[str, Any]]:
|
|
232
|
-
return
|
|
287
|
+
return (
|
|
288
|
+
await self._call(self.api.list_recent_sprints, team_id=team_id, limit=limit)
|
|
289
|
+
or []
|
|
290
|
+
)
|
|
233
291
|
|
|
234
|
-
async def sprint_search(
|
|
292
|
+
async def sprint_search(
|
|
293
|
+
self, *, query: str, team_id: str, limit: int
|
|
294
|
+
) -> List[Dict[str, Any]]:
|
|
235
295
|
return await self._call_list(
|
|
236
296
|
self.api.search_sprints,
|
|
237
297
|
query=query,
|
|
@@ -251,11 +311,17 @@ class KnowledgeService:
|
|
|
251
311
|
async def sprint_work_items(self, sprint_id: str) -> List[Dict[str, Any]]:
|
|
252
312
|
return await self._call_list(self.api.get_sprint_work_items, sprint_id)
|
|
253
313
|
|
|
254
|
-
async def sprint_add_work_items(
|
|
255
|
-
|
|
314
|
+
async def sprint_add_work_items(
|
|
315
|
+
self, sprint_id: str, payload: Dict[str, Any]
|
|
316
|
+
) -> Dict[str, Any]:
|
|
317
|
+
return await self._call(
|
|
318
|
+
self.api.add_work_items_to_sprint, sprint_id, _strip_none(payload)
|
|
319
|
+
)
|
|
256
320
|
|
|
257
321
|
async def sprint_remove_work_items(self, payload: Dict[str, Any]) -> Dict[str, Any]:
|
|
258
|
-
return await self._call(
|
|
322
|
+
return await self._call(
|
|
323
|
+
self.api.remove_work_items_from_sprint, _strip_none(payload)
|
|
324
|
+
)
|
|
259
325
|
|
|
260
326
|
async def sprint_analytics(self, sprint_id: str) -> Dict[str, Any]:
|
|
261
327
|
return await self._call(self.api.get_sprint_analytics, sprint_id) or {}
|
|
@@ -263,11 +329,17 @@ class KnowledgeService:
|
|
|
263
329
|
async def sprint_capacity(self, sprint_id: str) -> Dict[str, Any]:
|
|
264
330
|
return await self._call(self.api.get_sprint_capacity, sprint_id) or {}
|
|
265
331
|
|
|
266
|
-
async def sprint_start(
|
|
332
|
+
async def sprint_start(
|
|
333
|
+
self, sprint_id: str, payload: Dict[str, Any]
|
|
334
|
+
) -> Dict[str, Any]:
|
|
267
335
|
return await self._call(self.api.start_sprint, sprint_id, _strip_none(payload))
|
|
268
336
|
|
|
269
|
-
async def sprint_complete(
|
|
270
|
-
|
|
337
|
+
async def sprint_complete(
|
|
338
|
+
self, sprint_id: str, payload: Dict[str, Any]
|
|
339
|
+
) -> Dict[str, Any]:
|
|
340
|
+
return await self._call(
|
|
341
|
+
self.api.complete_sprint, sprint_id, _strip_none(payload)
|
|
342
|
+
)
|
|
271
343
|
|
|
272
344
|
async def sprint_cancel(self, sprint_id: str) -> Dict[str, Any]:
|
|
273
345
|
return await self._call(self.api.cancel_sprint, sprint_id)
|
|
@@ -285,12 +357,15 @@ class KnowledgeService:
|
|
|
285
357
|
return_description: Optional[bool] = None,
|
|
286
358
|
return_metadata: Optional[bool] = None,
|
|
287
359
|
) -> List[Dict[str, Any]]:
|
|
288
|
-
return
|
|
289
|
-
self.
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
360
|
+
return (
|
|
361
|
+
await self._call(
|
|
362
|
+
self.api.list_modes,
|
|
363
|
+
include_rules=include_rules,
|
|
364
|
+
return_description=return_description,
|
|
365
|
+
return_metadata=return_metadata,
|
|
366
|
+
)
|
|
367
|
+
or []
|
|
368
|
+
)
|
|
294
369
|
|
|
295
370
|
async def mode_get(
|
|
296
371
|
self,
|
|
@@ -306,7 +381,9 @@ class KnowledgeService:
|
|
|
306
381
|
return_metadata=return_metadata,
|
|
307
382
|
)
|
|
308
383
|
|
|
309
|
-
async def mode_update(
|
|
384
|
+
async def mode_update(
|
|
385
|
+
self, mode_id: str, payload: Dict[str, Any]
|
|
386
|
+
) -> Dict[str, Any]:
|
|
310
387
|
return await self._call(self.api.update_mode, mode_id, _strip_none(payload))
|
|
311
388
|
|
|
312
389
|
async def mode_delete(self, mode_id: str) -> None:
|
|
@@ -334,12 +411,15 @@ class KnowledgeService:
|
|
|
334
411
|
return_metadata: Optional[bool] = None,
|
|
335
412
|
return_modes: Optional[bool] = None,
|
|
336
413
|
) -> List[Dict[str, Any]]:
|
|
337
|
-
return
|
|
338
|
-
self.
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
414
|
+
return (
|
|
415
|
+
await self._call(
|
|
416
|
+
self.api.list_rules,
|
|
417
|
+
return_description=return_description,
|
|
418
|
+
return_metadata=return_metadata,
|
|
419
|
+
return_modes=return_modes,
|
|
420
|
+
)
|
|
421
|
+
or []
|
|
422
|
+
)
|
|
343
423
|
|
|
344
424
|
async def rule_get(
|
|
345
425
|
self,
|
|
@@ -357,7 +437,9 @@ class KnowledgeService:
|
|
|
357
437
|
return_modes=return_modes,
|
|
358
438
|
)
|
|
359
439
|
|
|
360
|
-
async def rule_update(
|
|
440
|
+
async def rule_update(
|
|
441
|
+
self, rule_id: str, payload: Dict[str, Any]
|
|
442
|
+
) -> Dict[str, Any]:
|
|
361
443
|
return await self._call(self.api.update_rule, rule_id, _strip_none(payload))
|
|
362
444
|
|
|
363
445
|
async def rule_delete(self, rule_id: str) -> None:
|
|
@@ -367,23 +449,33 @@ class KnowledgeService:
|
|
|
367
449
|
# Documentation
|
|
368
450
|
# ------------------------------------------------------------------
|
|
369
451
|
async def doc_create(self, payload: Dict[str, Any]) -> Dict[str, Any]:
|
|
370
|
-
return await self._call_dict(
|
|
452
|
+
return await self._call_dict(
|
|
453
|
+
self.api.create_documentation_item, _strip_none(payload)
|
|
454
|
+
)
|
|
371
455
|
|
|
372
456
|
async def doc_list(self, **filters: Any) -> List[Dict[str, Any]]:
|
|
373
|
-
result = await self._call(
|
|
457
|
+
result = await self._call(
|
|
458
|
+
self.api.list_documentation_items, **_strip_none(filters)
|
|
459
|
+
)
|
|
374
460
|
return _ensure_list(result)
|
|
375
461
|
|
|
376
462
|
async def doc_get(self, doc_id: str, **filters: Any) -> Dict[str, Any]:
|
|
377
|
-
result = await self._call(
|
|
463
|
+
result = await self._call(
|
|
464
|
+
self.api.get_documentation_item, doc_id, **_strip_none(filters)
|
|
465
|
+
)
|
|
378
466
|
return _ensure_dict(result)
|
|
379
467
|
|
|
380
468
|
async def doc_update(self, doc_id: str, payload: Dict[str, Any]) -> Dict[str, Any]:
|
|
381
|
-
return await self._call_dict(
|
|
469
|
+
return await self._call_dict(
|
|
470
|
+
self.api.update_documentation_item, doc_id, _strip_none(payload)
|
|
471
|
+
)
|
|
382
472
|
|
|
383
473
|
async def doc_delete(self, doc_id: str) -> None:
|
|
384
474
|
await self._call(self.api.delete_documentation_item, doc_id)
|
|
385
475
|
|
|
386
|
-
async def doc_search(
|
|
476
|
+
async def doc_search(
|
|
477
|
+
self, *, query: str, team_id: str, limit: int
|
|
478
|
+
) -> List[Dict[str, Any]]:
|
|
387
479
|
result = await self._call(
|
|
388
480
|
self.api.search_documentation_items,
|
|
389
481
|
query=query,
|
|
@@ -418,16 +510,24 @@ class KnowledgeService:
|
|
|
418
510
|
return await self._call(self.api.get_documentation_full_tree) or {}
|
|
419
511
|
|
|
420
512
|
async def doc_move(self, doc_id: str, payload: Dict[str, Any]) -> Dict[str, Any]:
|
|
421
|
-
return await self._call_dict(
|
|
513
|
+
return await self._call_dict(
|
|
514
|
+
self.api.move_documentation_item, doc_id, _strip_none(payload)
|
|
515
|
+
)
|
|
422
516
|
|
|
423
517
|
async def doc_publish(self, doc_id: str) -> Dict[str, Any]:
|
|
424
518
|
return await self._call_dict(self.api.publish_documentation_item, doc_id)
|
|
425
519
|
|
|
426
520
|
async def doc_version(self, doc_id: str, payload: Dict[str, Any]) -> Dict[str, Any]:
|
|
427
|
-
return await self._call_dict(
|
|
521
|
+
return await self._call_dict(
|
|
522
|
+
self.api.create_documentation_version, doc_id, _strip_none(payload)
|
|
523
|
+
)
|
|
428
524
|
|
|
429
|
-
async def doc_duplicate(
|
|
430
|
-
|
|
525
|
+
async def doc_duplicate(
|
|
526
|
+
self, doc_id: str, payload: Dict[str, Any]
|
|
527
|
+
) -> Dict[str, Any]:
|
|
528
|
+
return await self._call_dict(
|
|
529
|
+
self.api.duplicate_documentation_item, doc_id, _strip_none(payload)
|
|
530
|
+
)
|
|
431
531
|
|
|
432
532
|
|
|
433
533
|
__all__ = [
|
fenix_mcp/domain/productivity.py
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
6
6
|
import asyncio
|
|
7
|
-
from dataclasses import dataclass
|
|
8
7
|
from datetime import datetime
|
|
9
8
|
from typing import Any, Dict, Iterable, List, Optional
|
|
10
9
|
|
|
@@ -94,7 +93,9 @@ class ProductivityService:
|
|
|
94
93
|
async def stats(self) -> Dict[str, Any]:
|
|
95
94
|
return await self._call(self._api.get_todo_stats) or {}
|
|
96
95
|
|
|
97
|
-
async def search(
|
|
96
|
+
async def search(
|
|
97
|
+
self, query: str, *, limit: int, offset: int
|
|
98
|
+
) -> List[Dict[str, Any]]:
|
|
98
99
|
# API atual não expõe paginação no endpoint de busca, mas mantemos
|
|
99
100
|
# assinatura para possível suporte futuro.
|
|
100
101
|
result = await self._call(self._api.search_todo_items, query=query)
|
fenix_mcp/domain/user_config.py
CHANGED
|
@@ -21,13 +21,20 @@ class UserConfigService:
|
|
|
21
21
|
payload = _strip_none(data)
|
|
22
22
|
return await asyncio.to_thread(self._api.create_user_core_document, payload)
|
|
23
23
|
|
|
24
|
-
async def list(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
async def list(
|
|
25
|
+
self, *, returnContent: Optional[bool] = None, **_: Any
|
|
26
|
+
) -> List[Dict[str, Any]]:
|
|
27
|
+
return (
|
|
28
|
+
await asyncio.to_thread(
|
|
29
|
+
self._api.list_user_core_documents,
|
|
30
|
+
return_content=bool(returnContent),
|
|
31
|
+
)
|
|
32
|
+
or []
|
|
33
|
+
)
|
|
29
34
|
|
|
30
|
-
async def get(
|
|
35
|
+
async def get(
|
|
36
|
+
self, doc_id: str, *, returnContent: Optional[bool] = None, **_: Any
|
|
37
|
+
) -> Dict[str, Any]:
|
|
31
38
|
return await asyncio.to_thread(
|
|
32
39
|
self._api.get_user_core_document,
|
|
33
40
|
doc_id,
|
|
@@ -36,7 +43,9 @@ class UserConfigService:
|
|
|
36
43
|
|
|
37
44
|
async def update(self, doc_id: str, data: Dict[str, Any]) -> Dict[str, Any]:
|
|
38
45
|
payload = _strip_none(data)
|
|
39
|
-
return await asyncio.to_thread(
|
|
46
|
+
return await asyncio.to_thread(
|
|
47
|
+
self._api.update_user_core_document, doc_id, payload
|
|
48
|
+
)
|
|
40
49
|
|
|
41
50
|
async def delete(self, doc_id: str) -> None:
|
|
42
51
|
await asyncio.to_thread(self._api.delete_user_core_document, doc_id)
|
|
@@ -17,14 +17,18 @@ class Settings(BaseSettings):
|
|
|
17
17
|
default="https://fenix-api-production-7619.up.railway.app",
|
|
18
18
|
description="Base URL for the Fênix Cloud API.",
|
|
19
19
|
)
|
|
20
|
-
http_timeout: float = Field(
|
|
20
|
+
http_timeout: float = Field(
|
|
21
|
+
default=30.0, description="Default HTTP timeout in seconds."
|
|
22
|
+
)
|
|
21
23
|
log_level: str = Field(default="INFO", description="Root log level.")
|
|
22
24
|
transport_mode: Literal["stdio", "http", "both"] = Field(
|
|
23
25
|
default="stdio",
|
|
24
26
|
description="Active transport mode: stdio, http or both.",
|
|
25
27
|
)
|
|
26
28
|
http_host: str = Field(default="127.0.0.1", description="HTTP bind host.")
|
|
27
|
-
http_port: int = Field(
|
|
29
|
+
http_port: int = Field(
|
|
30
|
+
default=3000, description="HTTP port when running with network transport."
|
|
31
|
+
)
|
|
28
32
|
|
|
29
33
|
model_config = SettingsConfigDict(
|
|
30
34
|
populate_by_name=True,
|