nia-mcp-server 1.0.17__py3-none-any.whl → 1.0.18__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.

@@ -2,4 +2,4 @@
2
2
  NIA MCP Server - Proxy server for NIA Knowledge Agent
3
3
  """
4
4
 
5
- __version__ = "1.0.17"
5
+ __version__ = "1.0.18"
nia_mcp_server/server.py CHANGED
@@ -225,6 +225,7 @@ async def search_codebase(
225
225
  # Stream the response using unified query
226
226
  response_parts = []
227
227
  sources_parts = []
228
+ follow_up_questions = []
228
229
 
229
230
  async for chunk in client.query_unified(
230
231
  messages=messages,
@@ -243,6 +244,10 @@ async def search_codebase(
243
244
  if "sources" in data and data["sources"]:
244
245
  logger.debug(f"Received sources data: {type(data['sources'])}, count: {len(data['sources'])}")
245
246
  sources_parts.extend(data["sources"])
247
+
248
+ if "follow_up_questions" in data and data["follow_up_questions"]:
249
+ follow_up_questions = data["follow_up_questions"]
250
+ logger.debug(f"Received {len(follow_up_questions)} follow-up questions")
246
251
 
247
252
  except json.JSONDecodeError as e:
248
253
  logger.warning(f"Failed to parse JSON chunk: {chunk}, error: {e}")
@@ -294,6 +299,13 @@ async def search_codebase(
294
299
  response_text += "\n💡 **Need more details from a source?**\n\n"
295
300
  response_text += "If you need more information from the source links provided above, use the `read_source_content` tool from the available tools provided by Nia to get full context about that particular source.\n"
296
301
 
302
+ # Add follow-up questions if available
303
+ if follow_up_questions:
304
+ response_text += "\n\n## 🔍 Suggested Follow-up Questions\n\n"
305
+ for i, question in enumerate(follow_up_questions, 1):
306
+ response_text += f"{i}. {question}\n"
307
+ response_text += "\n*These questions are based on the search results and can help you explore deeper insights.*\n"
308
+
297
309
  return [TextContent(type="text", text=response_text)]
298
310
 
299
311
  except APIError as e:
@@ -367,6 +379,7 @@ async def search_documentation(
367
379
  # Stream the response using unified query
368
380
  response_parts = []
369
381
  sources_parts = []
382
+ follow_up_questions = []
370
383
 
371
384
  async for chunk in client.query_unified(
372
385
  messages=messages,
@@ -385,6 +398,10 @@ async def search_documentation(
385
398
  if "sources" in data and data["sources"]:
386
399
  logger.debug(f"Received doc sources data: {type(data['sources'])}, count: {len(data['sources'])}")
387
400
  sources_parts.extend(data["sources"])
401
+
402
+ if "follow_up_questions" in data and data["follow_up_questions"]:
403
+ follow_up_questions = data["follow_up_questions"]
404
+ logger.debug(f"Received {len(follow_up_questions)} follow-up questions for documentation")
388
405
 
389
406
  except json.JSONDecodeError as e:
390
407
  logger.warning(f"Failed to parse JSON chunk in documentation search: {chunk}, error: {e}")
@@ -432,6 +449,13 @@ async def search_documentation(
432
449
  response_text += "\n💡 **Need more details from a source?**\n\n"
433
450
  response_text += "If you need more information from the source links provided above, use the `read_source_content` tool from the available tools provided by Nia to get full context about that particular source.\n"
434
451
 
452
+ # Add follow-up questions if available
453
+ if follow_up_questions:
454
+ response_text += "\n\n## 🔍 Suggested Follow-up Questions\n\n"
455
+ for i, question in enumerate(follow_up_questions, 1):
456
+ response_text += f"{i}. {question}\n"
457
+ response_text += "\n*These questions are based on the documentation and can help you explore related topics.*\n"
458
+
435
459
  return [TextContent(type="text", text=response_text)]
436
460
 
437
461
  except APIError as e:
@@ -497,20 +521,7 @@ async def list_repositories() -> List[TextContent]:
497
521
  if repo.get("status") == "completed":
498
522
  lines.append(f"- **Usage:** `search_codebase(query, [\"{repo_name}\"])`")
499
523
 
500
- # Add general usage instructions at the end
501
- lines.extend([
502
- "\n---",
503
- "\n## Usage Tips",
504
- "- To search all repositories: `search_codebase(\"your query\")`",
505
- "- To search specific repository: `search_codebase(\"your query\", [\"owner/repo\"])`"
506
- ])
507
-
508
- if has_folder_repos:
509
- lines.extend([
510
- "- For folder-indexed repositories: Use the EXACT repository path shown above",
511
- " Example: `search_codebase(\"query\", [\"owner/repo/tree/branch/folder\"])`"
512
- ])
513
-
524
+ # Return without usage tips
514
525
  return [TextContent(type="text", text="\n".join(lines))]
515
526
 
516
527
  except APIError as e:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nia-mcp-server
3
- Version: 1.0.17
3
+ Version: 1.0.18
4
4
  Summary: Nia Knowledge Agent
5
5
  Project-URL: Homepage, https://trynia.ai
6
6
  Project-URL: Documentation, https://docs.trynia.ai
@@ -1,19 +1,19 @@
1
- nia_mcp_server/__init__.py,sha256=Vey2MprReAMtBucCOwDlS0ZmshGrAJ0IJ1RV6BTFT50,85
1
+ nia_mcp_server/__init__.py,sha256=_QdlhBenOh3kbV3EalKuqZxEBxmPq3i71u8R03FMYSs,85
2
2
  nia_mcp_server/__main__.py,sha256=YQSpFtDeKp18r8mKr084cHnRFV4416_EKCu9FTM8_ik,394
3
3
  nia_mcp_server/api_client.py,sha256=L9xf7rz6i2aPKKLfYOwj8Fs0_SYqJHHZgTki0y3UtcY,30415
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=hdn81qwTR_zPvOsO4wnIs7jI3HzYHvmzgKKs9QX_7-Y,94731
8
+ nia_mcp_server/server.py,sha256=oGNcJKU87_5GlsoAGmr7Bqn6RWQb2Vy8onkJ0HeB6oQ,95601
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.17.dist-info/METADATA,sha256=FRAGfMUlSLv3AOkry3a6Blb0LffzGze_R9nfnJq54R4,1324
16
- nia_mcp_server-1.0.17.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
17
- nia_mcp_server-1.0.17.dist-info/entry_points.txt,sha256=V74FQEp48pfWxPCl7B9mihtqvIJNVjCSbRfCz4ww77I,64
18
- nia_mcp_server-1.0.17.dist-info/licenses/LICENSE,sha256=IrdVKi3bsiB2MTLM26MltBRpwyNi-8P6Cy0EnmAN76A,1557
19
- nia_mcp_server-1.0.17.dist-info/RECORD,,
15
+ nia_mcp_server-1.0.18.dist-info/METADATA,sha256=Ptsenk9rz-XEmqygQHZUEYAkDEZkhqhdR3isWhMx7GQ,1324
16
+ nia_mcp_server-1.0.18.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
17
+ nia_mcp_server-1.0.18.dist-info/entry_points.txt,sha256=V74FQEp48pfWxPCl7B9mihtqvIJNVjCSbRfCz4ww77I,64
18
+ nia_mcp_server-1.0.18.dist-info/licenses/LICENSE,sha256=IrdVKi3bsiB2MTLM26MltBRpwyNi-8P6Cy0EnmAN76A,1557
19
+ nia_mcp_server-1.0.18.dist-info/RECORD,,