nia-mcp-server 1.0.20__tar.gz → 1.0.22__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.

Potentially problematic release.


This version of nia-mcp-server might be problematic. Click here for more details.

Files changed (22) hide show
  1. {nia_mcp_server-1.0.20 → nia_mcp_server-1.0.22}/PKG-INFO +1 -1
  2. {nia_mcp_server-1.0.20 → nia_mcp_server-1.0.22}/pyproject.toml +1 -1
  3. {nia_mcp_server-1.0.20 → nia_mcp_server-1.0.22}/src/nia_mcp_server/__init__.py +1 -1
  4. {nia_mcp_server-1.0.20 → nia_mcp_server-1.0.22}/src/nia_mcp_server/api_client.py +29 -3
  5. {nia_mcp_server-1.0.20 → nia_mcp_server-1.0.22}/src/nia_mcp_server/server.py +106 -0
  6. {nia_mcp_server-1.0.20 → nia_mcp_server-1.0.22}/.gitignore +0 -0
  7. {nia_mcp_server-1.0.20 → nia_mcp_server-1.0.22}/ARCHITECTURE.md +0 -0
  8. {nia_mcp_server-1.0.20 → nia_mcp_server-1.0.22}/LICENSE +0 -0
  9. {nia_mcp_server-1.0.20 → nia_mcp_server-1.0.22}/README.md +0 -0
  10. {nia_mcp_server-1.0.20 → nia_mcp_server-1.0.22}/nia_analytics.log +0 -0
  11. {nia_mcp_server-1.0.20 → nia_mcp_server-1.0.22}/nia_mcp_server.log +0 -0
  12. {nia_mcp_server-1.0.20 → nia_mcp_server-1.0.22}/src/nia_mcp_server/__main__.py +0 -0
  13. {nia_mcp_server-1.0.20 → nia_mcp_server-1.0.22}/src/nia_mcp_server/assets/rules/claude_rules.md +0 -0
  14. {nia_mcp_server-1.0.20 → nia_mcp_server-1.0.22}/src/nia_mcp_server/assets/rules/cursor_rules.md +0 -0
  15. {nia_mcp_server-1.0.20 → nia_mcp_server-1.0.22}/src/nia_mcp_server/assets/rules/nia_rules.md +0 -0
  16. {nia_mcp_server-1.0.20 → nia_mcp_server-1.0.22}/src/nia_mcp_server/assets/rules/vscode_rules.md +0 -0
  17. {nia_mcp_server-1.0.20 → nia_mcp_server-1.0.22}/src/nia_mcp_server/assets/rules/windsurf_rules.md +0 -0
  18. {nia_mcp_server-1.0.20 → nia_mcp_server-1.0.22}/src/nia_mcp_server/cli.py +0 -0
  19. {nia_mcp_server-1.0.20 → nia_mcp_server-1.0.22}/src/nia_mcp_server/profiles.py +0 -0
  20. {nia_mcp_server-1.0.20 → nia_mcp_server-1.0.22}/src/nia_mcp_server/project_init.py +0 -0
  21. {nia_mcp_server-1.0.20 → nia_mcp_server-1.0.22}/src/nia_mcp_server/rule_transformer.py +0 -0
  22. {nia_mcp_server-1.0.20 → nia_mcp_server-1.0.22}/src/nia_mcp_server/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nia-mcp-server
3
- Version: 1.0.20
3
+ Version: 1.0.22
4
4
  Summary: Nia Knowledge Agent
5
5
  Project-URL: Homepage, https://trynia.ai
6
6
  Project-URL: Documentation, https://docs.trynia.ai
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "nia-mcp-server"
7
- version = "1.0.20"
7
+ version = "1.0.22"
8
8
  description = "Nia Knowledge Agent"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -2,4 +2,4 @@
2
2
  NIA MCP Server - Proxy server for NIA Knowledge Agent
3
3
  """
4
4
 
5
- __version__ = "1.0.20"
5
+ __version__ = "1.0.22"
@@ -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.20",
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,
@@ -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
File without changes