kcaa 0.2.3__tar.gz → 0.2.5__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.
Files changed (90) hide show
  1. {kcaa-0.2.3 → kcaa-0.2.5}/PKG-INFO +2 -4
  2. {kcaa-0.2.3 → kcaa-0.2.5}/README.md +0 -3
  3. {kcaa-0.2.3 → kcaa-0.2.5}/README_CN.md +0 -3
  4. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/server.py +3 -0
  5. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/tools/export_tools.py +0 -9
  6. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/tools/netlist_tools.py +0 -60
  7. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/tools/pattern_tools.py +0 -49
  8. kcaa-0.2.5/kcaa/tools/render_board_tools.py +1242 -0
  9. {kcaa-0.2.3 → kcaa-0.2.5}/kicad_plugin/README.md +3 -3
  10. {kcaa-0.2.3 → kcaa-0.2.5}/pyproject.toml +2 -1
  11. {kcaa-0.2.3 → kcaa-0.2.5}/.gitignore +0 -0
  12. {kcaa-0.2.3 → kcaa-0.2.5}/LICENSE +0 -0
  13. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/__init__.py +0 -0
  14. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/context.py +0 -0
  15. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/prompts/__init__.py +0 -0
  16. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/prompts/bom_prompts.py +0 -0
  17. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/prompts/drc_prompt.py +0 -0
  18. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/prompts/pattern_prompts.py +0 -0
  19. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/prompts/templates.py +0 -0
  20. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/resources/__init__.py +0 -0
  21. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/resources/bom_resources.py +0 -0
  22. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/resources/drc_resources.py +0 -0
  23. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/resources/files.py +0 -0
  24. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/resources/netlist_resources.py +0 -0
  25. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/resources/pattern_resources.py +0 -0
  26. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/resources/projects.py +0 -0
  27. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/router/__init__.py +0 -0
  28. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/router/a_star.py +0 -0
  29. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/router/grid_a_star.py +0 -0
  30. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/router/path_postprocess.py +0 -0
  31. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/router/router.py +0 -0
  32. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/router/via_check.py +0 -0
  33. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/router/visibility_graph.py +0 -0
  34. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/router/world_model.py +0 -0
  35. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/tools/__init__.py +0 -0
  36. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/tools/analysis_tools.py +0 -0
  37. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/tools/bom_tools.py +0 -0
  38. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/tools/drc_tools.py +0 -0
  39. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/tools/kipy_tools.py +0 -0
  40. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/tools/pcb_edit_tools.py +0 -0
  41. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/tools/pcb_group_tools.py +0 -0
  42. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/tools/pcb_library_tools.py +0 -0
  43. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/tools/pcb_placement_helpers.py +0 -0
  44. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/tools/pcb_placement_tools.py +0 -0
  45. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/tools/pcb_query_tools.py +0 -0
  46. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/tools/pcb_routing_tools.py +0 -0
  47. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/tools/pcb_zone_tools.py +0 -0
  48. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/tools/placement_helpers.py +0 -0
  49. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/tools/project_tools.py +0 -0
  50. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/tools/schematic_group_tools.py +0 -0
  51. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/tools/sheet_tools.py +0 -0
  52. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/tools/skill_tools.py +0 -0
  53. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/tools/symbol_edit_tools.py +0 -0
  54. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/tools/symbol_tools.py +0 -0
  55. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/tools/validation_tools.py +0 -0
  56. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/tools/version_tools.py +0 -0
  57. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/tools/wire_edit_tools.py +0 -0
  58. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/__init__.py +0 -0
  59. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/boundary_validator.py +0 -0
  60. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/component_utils.py +0 -0
  61. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/config.py +0 -0
  62. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/file_utils.py +0 -0
  63. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/footprint_database.py +0 -0
  64. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/footprint_index_manager.py +0 -0
  65. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/fp_lib_table_utils.py +0 -0
  66. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/ipc_drc.py +0 -0
  67. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/kicad_api_detection.py +0 -0
  68. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/kicad_cli.py +0 -0
  69. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/kicad_utils.py +0 -0
  70. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/kipy_reload.py +0 -0
  71. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/net_settings.py +0 -0
  72. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/netlist_parser.py +0 -0
  73. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/path_validator.py +0 -0
  74. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/pattern_recognition.py +0 -0
  75. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/pcb_board_utils.py +0 -0
  76. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/pcb_design_rules.py +0 -0
  77. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/pcb_footprint_utils.py +0 -0
  78. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/pcb_library_utils.py +0 -0
  79. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/pcb_sexp_utils.py +0 -0
  80. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/schematic_sexp_utils.py +0 -0
  81. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/secure_subprocess.py +0 -0
  82. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/skip_compat.py +0 -0
  83. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/skip_helpers.py +0 -0
  84. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/symbol_database.py +0 -0
  85. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/symbol_extractor.py +0 -0
  86. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/symbol_geometry.py +0 -0
  87. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/symbol_index_manager.py +0 -0
  88. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/symbol_index_reader.py +0 -0
  89. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/temp_dir_manager.py +0 -0
  90. {kcaa-0.2.3 → kcaa-0.2.5}/kcaa/utils/version_manager.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: kcaa
3
- Version: 0.2.3
3
+ Version: 0.2.5
4
4
  Summary: Model Context Protocol (MCP) server for KiCad electronic design automation (EDA) files
5
5
  Project-URL: Homepage, https://github.com/paul356/KiCad-AI-Assistant
6
6
  Project-URL: Bug Tracker, https://github.com/paul356/KiCad-AI-Assistant/issues
@@ -29,6 +29,7 @@ Requires-Dist: defusedxml>=0.7.0
29
29
  Requires-Dist: fastmcp>=2.0.0
30
30
  Requires-Dist: kicad-python>=0.7.1
31
31
  Requires-Dist: kicad-skip>=0.2.5
32
+ Requires-Dist: matplotlib>=3.8.0
32
33
  Requires-Dist: mcp[cli]>=1.0.0
33
34
  Requires-Dist: pandas>=2.0.0
34
35
  Requires-Dist: pyyaml>=6.0.0
@@ -263,10 +264,8 @@ kcaa
263
264
  | Tool | Description |
264
265
  |------|-------------|
265
266
  | `extract_schematic_netlist` | Extract netlist from a schematic |
266
- | `extract_project_netlist` | Extract netlist for a whole project |
267
267
  | `find_component_connections` | Find all connections for a component |
268
268
  | `identify_circuit_patterns` | Identify common circuit patterns |
269
- | `analyze_project_circuit_patterns` | Analyze circuit patterns in a project |
270
269
  | `validate_project` | Basic validation of a KiCad project |
271
270
  | `validate_project_boundaries` | Validate component boundaries |
272
271
  | `generate_validation_report` | Generate a comprehensive validation report |
@@ -378,7 +377,6 @@ kcaa
378
377
  | `list_project_versions` | List saved project version archives |
379
378
  | `restore_project_version` | Restore project files together to a saved archive |
380
379
  | `generate_pcb_thumbnail` | Render a PCB thumbnail image |
381
- | `generate_project_thumbnail` | Render a project thumbnail |
382
380
 
383
381
  ### Skill System
384
382
 
@@ -224,10 +224,8 @@ kcaa
224
224
  | Tool | Description |
225
225
  |------|-------------|
226
226
  | `extract_schematic_netlist` | Extract netlist from a schematic |
227
- | `extract_project_netlist` | Extract netlist for a whole project |
228
227
  | `find_component_connections` | Find all connections for a component |
229
228
  | `identify_circuit_patterns` | Identify common circuit patterns |
230
- | `analyze_project_circuit_patterns` | Analyze circuit patterns in a project |
231
229
  | `validate_project` | Basic validation of a KiCad project |
232
230
  | `validate_project_boundaries` | Validate component boundaries |
233
231
  | `generate_validation_report` | Generate a comprehensive validation report |
@@ -339,7 +337,6 @@ kcaa
339
337
  | `list_project_versions` | List saved project version archives |
340
338
  | `restore_project_version` | Restore project files together to a saved archive |
341
339
  | `generate_pcb_thumbnail` | Render a PCB thumbnail image |
342
- | `generate_project_thumbnail` | Render a project thumbnail |
343
340
 
344
341
  ### Skill System
345
342
 
@@ -223,10 +223,8 @@ kcaa
223
223
  | 工具 | 说明 |
224
224
  |------|------|
225
225
  | `extract_schematic_netlist` | 从原理图提取网表 |
226
- | `extract_project_netlist` | 提取整个项目的网表 |
227
226
  | `find_component_connections` | 查找元件的所有连接 |
228
227
  | `identify_circuit_patterns` | 识别常见电路模式 |
229
- | `analyze_project_circuit_patterns` | 分析项目中的电路模式 |
230
228
  | `validate_project` | 项目基本验证 |
231
229
  | `validate_project_boundaries` | 验证元件边界 |
232
230
  | `generate_validation_report` | 生成综合验证报告 |
@@ -338,7 +336,6 @@ kcaa
338
336
  | `list_project_versions` | 列出已保存的项目版本归档 |
339
337
  | `restore_project_version` | 将项目文件一起恢复到已保存的归档 |
340
338
  | `generate_pcb_thumbnail` | 渲染 PCB 缩略图 |
341
- | `generate_project_thumbnail` | 渲染项目缩略图 |
342
339
 
343
340
  ### 技能系统
344
341
 
@@ -42,6 +42,7 @@ from kcaa.tools.pcb_routing_tools import register_pcb_routing_tools
42
42
  from kcaa.tools.pcb_zone_tools import register_pcb_zone_tools
43
43
  from kcaa.tools.placement_helpers import register_placement_helpers
44
44
  from kcaa.tools.project_tools import register_project_tools
45
+ from kcaa.tools.render_board_tools import register_render_board_tools
45
46
  from kcaa.tools.schematic_group_tools import register_schematic_group_tools
46
47
  from kcaa.tools.sheet_tools import register_sheet_tools
47
48
  from kcaa.tools.skill_tools import register_skill_tools
@@ -132,6 +133,7 @@ def _register_plugin_profile(mcp: FastMCP) -> None:
132
133
  register_schematic_group_tools(mcp)
133
134
  register_pcb_zone_tools(mcp)
134
135
  register_pcb_routing_tools(mcp)
136
+ register_render_board_tools(mcp)
135
137
  register_kipy_tools(mcp)
136
138
  register_drc_tools(mcp)
137
139
  register_skill_tools(mcp)
@@ -175,6 +177,7 @@ def _register_full_profile(mcp: FastMCP) -> None:
175
177
  register_project_tools(mcp)
176
178
  register_analysis_tools(mcp)
177
179
  register_export_tools(mcp)
180
+ register_render_board_tools(mcp)
178
181
  register_drc_tools(mcp)
179
182
  register_bom_tools(mcp)
180
183
  register_netlist_tools(mcp)
@@ -99,15 +99,6 @@ def register_export_tools(mcp: FastMCP) -> None:
99
99
  await ctx.info(f"Error: {str(e)}")
100
100
  return None
101
101
 
102
- @mcp.tool()
103
- async def generate_project_thumbnail(project_path: str, ctx: Context | None):
104
- """Generate a thumbnail of a KiCad project's PCB layout (Alias for generate_pcb_thumbnail)."""
105
- # This function now just calls the main CLI-based thumbnail generator
106
- print(
107
- f"generate_project_thumbnail called, redirecting to generate_pcb_thumbnail for {project_path}"
108
- )
109
- return await generate_pcb_thumbnail(project_path, ctx)
110
-
111
102
 
112
103
  # Helper functions for thumbnail generation
113
104
  async def generate_thumbnail_with_cli(pcb_file: str, ctx: Context | None):
@@ -19,66 +19,6 @@ def register_netlist_tools(mcp: FastMCP) -> None:
19
19
  mcp: The FastMCP server instance
20
20
  """
21
21
 
22
- @mcp.tool()
23
- async def extract_project_netlist(project_path: str, ctx: Context | None) -> dict[str, Any]:
24
- """Extract netlist from a KiCad project's schematic.
25
-
26
- This tool finds the schematic associated with a KiCad project
27
- and extracts its netlist information.
28
-
29
- Args:
30
- project_path: Path to the KiCad project file (.kicad_pro)
31
- ctx: MCP context for progress reporting
32
-
33
- Returns:
34
- Dictionary with netlist information
35
- """
36
- print(f"Extracting netlist for project: {project_path}")
37
-
38
- if not os.path.exists(project_path):
39
- print(f"Project not found: {project_path}")
40
- if ctx:
41
- ctx.info(f"Project not found: {project_path}")
42
- return {"success": False, "error": f"Project not found: {project_path}"}
43
-
44
- # Report progress
45
- if ctx:
46
- await ctx.report_progress(10, 100)
47
-
48
- # Get the schematic file
49
- try:
50
- files = get_project_files(project_path)
51
-
52
- if "schematic" not in files:
53
- print("Schematic file not found in project")
54
- if ctx:
55
- ctx.info("Schematic file not found in project")
56
- return {"success": False, "error": "Schematic file not found in project"}
57
-
58
- schematic_path = files["schematic"]
59
- print(f"Found schematic file: {schematic_path}")
60
- if ctx:
61
- ctx.info(f"Found schematic file: {os.path.basename(schematic_path)}")
62
-
63
- # Extract netlist
64
- if ctx:
65
- await ctx.report_progress(20, 100)
66
-
67
- # Call the schematic netlist extraction
68
- result = await extract_schematic_netlist(schematic_path, ctx=ctx)
69
-
70
- # Add project path to result
71
- if "success" in result and result["success"]:
72
- result["project_path"] = project_path
73
-
74
- return result
75
-
76
- except Exception as e:
77
- print(f"Error extracting project netlist: {str(e)}")
78
- if ctx:
79
- ctx.info(f"Error extracting project netlist: {str(e)}")
80
- return {"success": False, "error": str(e)}
81
-
82
22
  @mcp.tool()
83
23
  async def extract_schematic_netlist(
84
24
  schematic_path: str,
@@ -7,7 +7,6 @@ from typing import Any
7
7
 
8
8
  from fastmcp import Context, FastMCP
9
9
 
10
- from kcaa.utils.file_utils import get_project_files
11
10
  from kcaa.utils.netlist_parser import extract_netlist
12
11
  from kcaa.utils.pattern_recognition import (
13
12
  identify_amplifiers,
@@ -155,51 +154,3 @@ def register_pattern_tools(mcp: FastMCP) -> None:
155
154
  if ctx:
156
155
  ctx.info(f"Error identifying circuit patterns: {str(e)}")
157
156
  return {"success": False, "error": str(e)}
158
-
159
- @mcp.tool()
160
- async def analyze_project_circuit_patterns(
161
- project_path: str, ctx: Context | None
162
- ) -> dict[str, Any]:
163
- """Identify circuit patterns in a KiCad project's schematic.
164
-
165
- Args:
166
- project_path: Path to the KiCad project file (.kicad_pro)
167
- ctx: MCP context for progress reporting
168
-
169
- Returns:
170
- Dictionary with identified circuit patterns
171
- """
172
- if not os.path.exists(project_path):
173
- if ctx:
174
- ctx.info(f"Project not found: {project_path}")
175
- return {"success": False, "error": f"Project not found: {project_path}"}
176
-
177
- # Report progress
178
- if ctx:
179
- await ctx.report_progress(10, 100)
180
-
181
- # Get the schematic file
182
- try:
183
- files = get_project_files(project_path)
184
-
185
- if "schematic" not in files:
186
- if ctx:
187
- ctx.info("Schematic file not found in project")
188
- return {"success": False, "error": "Schematic file not found in project"}
189
-
190
- schematic_path = files["schematic"]
191
- if ctx:
192
- ctx.info(f"Found schematic file: {os.path.basename(schematic_path)}")
193
-
194
- # Identify patterns in the schematic
195
- result = await identify_circuit_patterns(schematic_path, ctx)
196
-
197
- # Add project path to result
198
- if "success" in result and result["success"]:
199
- result["project_path"] = project_path
200
-
201
- return result
202
-
203
- except Exception as e:
204
- ctx.info(f"Error analyzing project circuit patterns: {str(e)}")
205
- return {"success": False, "error": str(e)}