nia-mcp-server 1.0.20__py3-none-any.whl → 1.0.22__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.
Potentially problematic release.
This version of nia-mcp-server might be problematic. Click here for more details.
- nia_mcp_server/__init__.py +1 -1
- nia_mcp_server/api_client.py +29 -3
- nia_mcp_server/server.py +106 -0
- {nia_mcp_server-1.0.20.dist-info → nia_mcp_server-1.0.22.dist-info}/METADATA +1 -1
- {nia_mcp_server-1.0.20.dist-info → nia_mcp_server-1.0.22.dist-info}/RECORD +8 -8
- {nia_mcp_server-1.0.20.dist-info → nia_mcp_server-1.0.22.dist-info}/WHEEL +0 -0
- {nia_mcp_server-1.0.20.dist-info → nia_mcp_server-1.0.22.dist-info}/entry_points.txt +0 -0
- {nia_mcp_server-1.0.20.dist-info → nia_mcp_server-1.0.22.dist-info}/licenses/LICENSE +0 -0
nia_mcp_server/__init__.py
CHANGED
nia_mcp_server/api_client.py
CHANGED
|
@@ -28,7 +28,7 @@ class NIAApiClient:
|
|
|
28
28
|
self.client = httpx.AsyncClient(
|
|
29
29
|
headers={
|
|
30
30
|
"Authorization": f"Bearer {api_key}",
|
|
31
|
-
"User-Agent": "nia-mcp-server/1.0.
|
|
31
|
+
"User-Agent": "nia-mcp-server/1.0.22",
|
|
32
32
|
"Content-Type": "application/json"
|
|
33
33
|
},
|
|
34
34
|
timeout=720.0 # 12 minute timeout for deep research operations
|
|
@@ -685,18 +685,44 @@ class NIAApiClient:
|
|
|
685
685
|
"source_identifier": source_identifier,
|
|
686
686
|
"metadata": metadata or {}
|
|
687
687
|
}
|
|
688
|
-
|
|
688
|
+
|
|
689
689
|
response = await self.client.post(
|
|
690
690
|
f"{self.base_url}/v2/sources/content",
|
|
691
691
|
json=payload
|
|
692
692
|
)
|
|
693
693
|
response.raise_for_status()
|
|
694
694
|
return response.json()
|
|
695
|
-
|
|
695
|
+
|
|
696
696
|
except httpx.HTTPStatusError as e:
|
|
697
697
|
raise self._handle_api_error(e)
|
|
698
698
|
except Exception as e:
|
|
699
699
|
raise APIError(f"Failed to get source content: {str(e)}")
|
|
700
|
+
|
|
701
|
+
async def submit_bug_report(
|
|
702
|
+
self,
|
|
703
|
+
description: str,
|
|
704
|
+
bug_type: str = "bug",
|
|
705
|
+
additional_context: Optional[str] = None
|
|
706
|
+
) -> Dict[str, Any]:
|
|
707
|
+
"""Submit a bug report or feature request."""
|
|
708
|
+
try:
|
|
709
|
+
payload = {
|
|
710
|
+
"description": description,
|
|
711
|
+
"bug_type": bug_type,
|
|
712
|
+
"additional_context": additional_context
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
response = await self.client.post(
|
|
716
|
+
f"{self.base_url}/v2/bug-report",
|
|
717
|
+
json=payload
|
|
718
|
+
)
|
|
719
|
+
response.raise_for_status()
|
|
720
|
+
return response.json()
|
|
721
|
+
|
|
722
|
+
except httpx.HTTPStatusError as e:
|
|
723
|
+
raise self._handle_api_error(e)
|
|
724
|
+
except Exception as e:
|
|
725
|
+
raise APIError(f"Failed to submit bug report: {str(e)}")
|
|
700
726
|
|
|
701
727
|
async def index_local_filesystem(
|
|
702
728
|
self,
|
nia_mcp_server/server.py
CHANGED
|
@@ -2981,6 +2981,112 @@ async def visualize_codebase(
|
|
|
2981
2981
|
text=f"❌ Error opening visualization: {str(e)}"
|
|
2982
2982
|
)]
|
|
2983
2983
|
|
|
2984
|
+
|
|
2985
|
+
@mcp.tool()
|
|
2986
|
+
async def nia_bug_report(
|
|
2987
|
+
description: str,
|
|
2988
|
+
bug_type: str = "bug",
|
|
2989
|
+
additional_context: Optional[str] = None
|
|
2990
|
+
) -> List[TextContent]:
|
|
2991
|
+
"""
|
|
2992
|
+
Submit a bug report or feature request to the Nia development team.
|
|
2993
|
+
|
|
2994
|
+
This tool allows users to report bugs, request features, or provide feedback
|
|
2995
|
+
directly to the development team. Reports are sent via email and Slack for
|
|
2996
|
+
immediate attention.
|
|
2997
|
+
|
|
2998
|
+
Args:
|
|
2999
|
+
description: Detailed description of the bug or feature request (10-5000 characters)
|
|
3000
|
+
bug_type: Type of report - "bug", "feature-request", "improvement", or "other" (default: "bug")
|
|
3001
|
+
additional_context: Optional additional context, steps to reproduce, or related information
|
|
3002
|
+
|
|
3003
|
+
Returns:
|
|
3004
|
+
Confirmation of successful submission with reference ID
|
|
3005
|
+
|
|
3006
|
+
Examples:
|
|
3007
|
+
- nia_bug_report("The search is not returning any results for my repository")
|
|
3008
|
+
- nia_bug_report("Add support for searching within specific file types", "feature-request")
|
|
3009
|
+
- nia_bug_report("Repository indexing fails with large repos", "bug", "Happens with repos over 1GB")
|
|
3010
|
+
"""
|
|
3011
|
+
try:
|
|
3012
|
+
client = await ensure_api_client()
|
|
3013
|
+
|
|
3014
|
+
# Validate input parameters
|
|
3015
|
+
if not description or len(description.strip()) < 10:
|
|
3016
|
+
return [
|
|
3017
|
+
TextContent(
|
|
3018
|
+
type="text",
|
|
3019
|
+
text="❌ Error: Bug description must be at least 10 characters long."
|
|
3020
|
+
)
|
|
3021
|
+
]
|
|
3022
|
+
|
|
3023
|
+
if len(description) > 5000:
|
|
3024
|
+
return [
|
|
3025
|
+
TextContent(
|
|
3026
|
+
type="text",
|
|
3027
|
+
text="❌ Error: Bug description must be 5000 characters or less."
|
|
3028
|
+
)
|
|
3029
|
+
]
|
|
3030
|
+
|
|
3031
|
+
valid_types = ["bug", "feature-request", "improvement", "other"]
|
|
3032
|
+
if bug_type not in valid_types:
|
|
3033
|
+
return [
|
|
3034
|
+
TextContent(
|
|
3035
|
+
type="text",
|
|
3036
|
+
text=f"❌ Error: bug_type must be one of: {', '.join(valid_types)}"
|
|
3037
|
+
)
|
|
3038
|
+
]
|
|
3039
|
+
|
|
3040
|
+
if additional_context and len(additional_context) > 2000:
|
|
3041
|
+
return [
|
|
3042
|
+
TextContent(
|
|
3043
|
+
type="text",
|
|
3044
|
+
text="❌ Error: Additional context must be 2000 characters or less."
|
|
3045
|
+
)
|
|
3046
|
+
]
|
|
3047
|
+
|
|
3048
|
+
logger.info(f"Submitting bug report: type={bug_type}, description_length={len(description)}")
|
|
3049
|
+
|
|
3050
|
+
# Submit bug report via API client
|
|
3051
|
+
result = await client.submit_bug_report(
|
|
3052
|
+
description=description.strip(),
|
|
3053
|
+
bug_type=bug_type,
|
|
3054
|
+
additional_context=additional_context.strip() if additional_context else None
|
|
3055
|
+
)
|
|
3056
|
+
|
|
3057
|
+
if result.get("success"):
|
|
3058
|
+
return [
|
|
3059
|
+
TextContent(
|
|
3060
|
+
type="text",
|
|
3061
|
+
text=f"✅ Bug report submitted successfully!\n\n"
|
|
3062
|
+
f"Thank you for your feedback. Your report has been sent to the development team "
|
|
3063
|
+
f"and will be reviewed promptly.\n\n"
|
|
3064
|
+
f"Reference ID: {result.get('message', '').split(': ')[-1] if ': ' in result.get('message', '') else 'N/A'}\n"
|
|
3065
|
+
f"Type: {bug_type.title()}\n"
|
|
3066
|
+
f"Status: The team will be notified immediately via email and Slack.\n\n"
|
|
3067
|
+
f"You can also track issues and feature requests on our GitHub repository:\n"
|
|
3068
|
+
f"https://github.com/nozomio-labs/nia/issues"
|
|
3069
|
+
)
|
|
3070
|
+
]
|
|
3071
|
+
else:
|
|
3072
|
+
return [
|
|
3073
|
+
TextContent(
|
|
3074
|
+
type="text",
|
|
3075
|
+
text=f"❌ Failed to submit bug report: {result.get('message', 'Unknown error')}\n\n"
|
|
3076
|
+
f"Please try again or contact support directly at support@trynia.ai"
|
|
3077
|
+
)
|
|
3078
|
+
]
|
|
3079
|
+
|
|
3080
|
+
except Exception as e:
|
|
3081
|
+
logger.error(f"Error submitting bug report: {e}")
|
|
3082
|
+
return [
|
|
3083
|
+
TextContent(
|
|
3084
|
+
type="text",
|
|
3085
|
+
text=f"❌ Error submitting bug report: {str(e)}\n\n"
|
|
3086
|
+
f"Please try again or contact support directly at support@trynia.ai"
|
|
3087
|
+
)
|
|
3088
|
+
]
|
|
3089
|
+
|
|
2984
3090
|
# Resources
|
|
2985
3091
|
|
|
2986
3092
|
# Note: FastMCP doesn't have list_resources or read_resource decorators
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
nia_mcp_server/__init__.py,sha256
|
|
1
|
+
nia_mcp_server/__init__.py,sha256=-L7_Oke1LbPTbR5erNRFOQFFAsxA9isQh_BJS9q5XuA,85
|
|
2
2
|
nia_mcp_server/__main__.py,sha256=YQSpFtDeKp18r8mKr084cHnRFV4416_EKCu9FTM8_ik,394
|
|
3
|
-
nia_mcp_server/api_client.py,sha256=
|
|
3
|
+
nia_mcp_server/api_client.py,sha256=OBtGu5H0EhAdJpwe0yA9GfSDX4J0g8RuBB1U0O8Ccv4,35837
|
|
4
4
|
nia_mcp_server/cli.py,sha256=32VSPNIocXtDgVBDZNZsxvj3kytBn54_a1pIE84vOdY,1834
|
|
5
5
|
nia_mcp_server/profiles.py,sha256=2DD8PFRr5Ij4IK4sPUz0mH8aKjkrEtkKLC1R0iki2bA,7221
|
|
6
6
|
nia_mcp_server/project_init.py,sha256=T0-ziJhofL4L8APwnM43BLhxtlmOHaYH-V9PF2yXLw4,7138
|
|
7
7
|
nia_mcp_server/rule_transformer.py,sha256=wCxoQ1Kl_rI9mUFnh9kG5iCXYU4QInrmFQOReZfAFVo,11000
|
|
8
|
-
nia_mcp_server/server.py,sha256=
|
|
8
|
+
nia_mcp_server/server.py,sha256=1s6UHeXurwNlD7Kqc6vZFkidFOkQ-Bzv2OeqdhekTnA,134781
|
|
9
9
|
nia_mcp_server/setup.py,sha256=nJXVY8NHGtWROtoH8DW-3uOgyuPs4F9dW0cNhcbCLrM,5355
|
|
10
10
|
nia_mcp_server/assets/rules/claude_rules.md,sha256=HNL5GJMUbFxSpNbIAJUQWqAywjMl4lf530I1in69aNY,7380
|
|
11
11
|
nia_mcp_server/assets/rules/cursor_rules.md,sha256=hd6lhzNrK1ULQUYIEVeOnyKnuLKq4hmwZPbMqGUI1Lk,1720
|
|
12
12
|
nia_mcp_server/assets/rules/nia_rules.md,sha256=l6sx000uqoczoHYqOPp4hnNgyfpnhvO9NyT0fVx5nU0,8059
|
|
13
13
|
nia_mcp_server/assets/rules/vscode_rules.md,sha256=fqn4aJO_bhftaCGkVoquruQHf3EaREQJQWHXq6a4FOk,6967
|
|
14
14
|
nia_mcp_server/assets/rules/windsurf_rules.md,sha256=PzU2as5gaiVsV6PAzg8T_-GR7VCyRQGMjAHcSzYF_ms,3354
|
|
15
|
-
nia_mcp_server-1.0.
|
|
16
|
-
nia_mcp_server-1.0.
|
|
17
|
-
nia_mcp_server-1.0.
|
|
18
|
-
nia_mcp_server-1.0.
|
|
19
|
-
nia_mcp_server-1.0.
|
|
15
|
+
nia_mcp_server-1.0.22.dist-info/METADATA,sha256=yfp0gNMPa2jI63NsHImdwhLeF5LDTxWScVyE_Obxbu4,1324
|
|
16
|
+
nia_mcp_server-1.0.22.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
17
|
+
nia_mcp_server-1.0.22.dist-info/entry_points.txt,sha256=V74FQEp48pfWxPCl7B9mihtqvIJNVjCSbRfCz4ww77I,64
|
|
18
|
+
nia_mcp_server-1.0.22.dist-info/licenses/LICENSE,sha256=IrdVKi3bsiB2MTLM26MltBRpwyNi-8P6Cy0EnmAN76A,1557
|
|
19
|
+
nia_mcp_server-1.0.22.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|