skydeckai-code 0.1.39__tar.gz → 0.1.40__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.
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/PKG-INFO +6 -246
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/README.md +5 -245
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/pyproject.toml +1 -1
- skydeckai_code-0.1.40/screenshots/mseep_ai_helper.png +0 -0
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/src/aidd/tools/file_tools.py +90 -21
- skydeckai_code-0.1.39/screenshots/skydeck_ai_helper.png +0 -0
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/.claude/settings.local.json +0 -0
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/.gitignore +0 -0
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/Dockerfile +0 -0
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/LICENSE +0 -0
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/smithery.yaml +0 -0
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/src/__init__.py +0 -0
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/src/aidd/__init__.py +0 -0
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/src/aidd/cli.py +0 -0
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/src/aidd/server.py +0 -0
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/src/aidd/tools/__init__.py +0 -0
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/src/aidd/tools/base.py +0 -0
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/src/aidd/tools/code_analysis.py +0 -0
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/src/aidd/tools/code_execution.py +0 -0
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/src/aidd/tools/code_tools.py +0 -0
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/src/aidd/tools/directory_tools.py +0 -0
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/src/aidd/tools/get_active_apps_tool.py +0 -0
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/src/aidd/tools/get_available_windows_tool.py +0 -0
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/src/aidd/tools/image_tools.py +0 -0
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/src/aidd/tools/other_tools.py +0 -0
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/src/aidd/tools/path_tools.py +0 -0
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/src/aidd/tools/screenshot_tool.py +0 -0
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/src/aidd/tools/state.py +0 -0
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/src/aidd/tools/system_tools.py +0 -0
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/src/aidd/tools/web_tools.py +0 -0
- {skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/uv.lock +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: skydeckai-code
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.40
|
4
4
|
Summary: This MCP server provides a comprehensive set of tools for AI-driven Development workflows including file operations, code analysis, multi-language execution, web content fetching with HTML-to-markdown conversion, multi-engine web search, code content searching, and system information retrieval.
|
5
5
|
Project-URL: Homepage, https://github.com/skydeckai/skydeckai-code
|
6
6
|
Project-URL: Repository, https://github.com/skydeckai/skydeckai-code
|
@@ -43,13 +43,13 @@ An MCP server that provides a comprehensive set of tools for AI-driven developme
|
|
43
43
|
|
44
44
|
This mcp server was formerly known as `mcp-server-aidd`. It was renamed to `skydeckai-code` to credit the team at [SkyDeck.ai](https://skydeck.ai) with creating this application along with [East Agile](https://eastagile.com). But more importantly we realized that the term AI Driven Development (AIDD) was just not catching on. People did not understand at a glance what it was about. And nor did LLMs. "Code" was far more intuitive. And linguistically intuitive is important in the world of agentic AI.
|
45
45
|
|
46
|
-
|
46
|
+
[](https://mseep.ai/app/fe7a40fd-30c1-4767-84f9-d33bf997497e)
|
47
47
|
|
48
48
|
## Installation
|
49
49
|
|
50
50
|
```bash
|
51
|
-
# Using
|
52
|
-
|
51
|
+
# Using uvx
|
52
|
+
uvx skydeckai-code
|
53
53
|
```
|
54
54
|
|
55
55
|
## Claude Desktop Setup
|
@@ -69,9 +69,9 @@ Add to your `claude_desktop_config.json`:
|
|
69
69
|
|
70
70
|
## SkyDeck AI Helper App
|
71
71
|
|
72
|
-
If you're using
|
72
|
+
If you're using MseeP AI Helper app, you can search for "SkyDeckAI Code" and install it.
|
73
73
|
|
74
|
-

|
75
75
|
|
76
76
|
## Key Features
|
77
77
|
|
@@ -131,34 +131,6 @@ If you're using SkyDeck AI Helper app, you can search for "SkyDeckAI Code" and i
|
|
131
131
|
| delete_file | path: string | Success confirmation |
|
132
132
|
| get_file_info | path: string | File metadata (size, timestamps, permissions) |
|
133
133
|
|
134
|
-
**CLI Usage:**
|
135
|
-
|
136
|
-
```bash
|
137
|
-
# Read entire file
|
138
|
-
skydeckai-code-cli --tool read_file --args '{"files": [{"path": "src/main.py"}]}'
|
139
|
-
|
140
|
-
# Read 10 lines starting from line 20
|
141
|
-
skydeckai-code-cli --tool read_file --args '{"files": [{"path": "src/main.py", "offset": 20, "limit": 10}]}'
|
142
|
-
|
143
|
-
# Read from line 50 to the end of the file
|
144
|
-
skydeckai-code-cli --tool read_file --args '{"files": [{"path": "src/main.py", "offset": 50}]}'
|
145
|
-
|
146
|
-
# Read multiple files with different line ranges
|
147
|
-
skydeckai-code-cli --tool read_file --args '{"files": [
|
148
|
-
{"path": "src/main.py", "offset": 1, "limit": 10},
|
149
|
-
{"path": "README.md"}
|
150
|
-
]}'
|
151
|
-
|
152
|
-
# Write file
|
153
|
-
skydeckai-code-cli --tool write_file --args '{"path": "output.txt", "content": "Hello World"}'
|
154
|
-
|
155
|
-
# Copy file or directory
|
156
|
-
skydeckai-code-cli --tool copy_file --args '{"source": "config.json", "destination": "config.backup.json"}'
|
157
|
-
|
158
|
-
# Get file info
|
159
|
-
skydeckai-code-cli --tool get_file_info --args '{"path": "src/main.py"}'
|
160
|
-
```
|
161
|
-
|
162
134
|
### Complex File Operations
|
163
135
|
|
164
136
|
#### edit_file
|
@@ -208,16 +180,6 @@ Generates complete directory structure:
|
|
208
180
|
|
209
181
|
Returns: JSON tree structure of directory contents.
|
210
182
|
|
211
|
-
**CLI Usage:**
|
212
|
-
|
213
|
-
```bash
|
214
|
-
# List directory
|
215
|
-
skydeckai-code-cli --tool list_directory --args '{"path": "."}'
|
216
|
-
|
217
|
-
# Search for Python files
|
218
|
-
skydeckai-code-cli --tool search_files --args '{"pattern": ".py", "path": "src"}'
|
219
|
-
```
|
220
|
-
|
221
183
|
### Code Analysis
|
222
184
|
|
223
185
|
#### codebase_mapper
|
@@ -252,19 +214,6 @@ Supported Languages:
|
|
252
214
|
- C# (.cs)
|
253
215
|
- Kotlin (.kt, .kts)
|
254
216
|
|
255
|
-
**CLI Usage:**
|
256
|
-
|
257
|
-
```bash
|
258
|
-
# Map the entire codebase structure
|
259
|
-
skydeckai-code-cli --tool codebase_mapper --args '{"path": "."}'
|
260
|
-
|
261
|
-
# Map only the source directory
|
262
|
-
skydeckai-code-cli --tool codebase_mapper --args '{"path": "src"}'
|
263
|
-
|
264
|
-
# Map a specific component or module
|
265
|
-
skydeckai-code-cli --tool codebase_mapper --args '{"path": "src/components"}'
|
266
|
-
```
|
267
|
-
|
268
217
|
#### search_code
|
269
218
|
|
270
219
|
Fast content search tool using regular expressions:
|
@@ -295,29 +244,6 @@ Matching lines grouped by file with line numbers, sorted by file modification ti
|
|
295
244
|
|
296
245
|
This tool uses ripgrep when available for optimal performance, with a Python fallback implementation. It's ideal for finding specific code patterns like function declarations, imports, variable usages, or error handling.
|
297
246
|
|
298
|
-
**CLI Usage:**
|
299
|
-
|
300
|
-
```bash
|
301
|
-
# Find function and class declarations in JavaScript files
|
302
|
-
skydeckai-code-cli --tool search_code --args '{
|
303
|
-
"patterns": ["function\\s+\\w+", "class\\s+\\w+"],
|
304
|
-
"include": "*.js"
|
305
|
-
}'
|
306
|
-
|
307
|
-
# Find all console.log statements with errors or warnings
|
308
|
-
skydeckai-code-cli --tool search_code --args '{
|
309
|
-
"patterns": ["console\\.log.*[eE]rror", "console\\.log.*[wW]arning"],
|
310
|
-
"path": "src"
|
311
|
-
}'
|
312
|
-
|
313
|
-
# Find import and export statements in TypeScript files
|
314
|
-
skydeckai-code-cli --tool search_code --args '{
|
315
|
-
"patterns": ["import.*from", "export.*"],
|
316
|
-
"include": "*.{ts,tsx}",
|
317
|
-
"exclude": "node_modules/**"
|
318
|
-
}'
|
319
|
-
```
|
320
|
-
|
321
247
|
### System Information
|
322
248
|
|
323
249
|
| Tool | Parameters | Returns |
|
@@ -348,13 +274,6 @@ Returns:
|
|
348
274
|
|
349
275
|
Provides essential system information in a clean, readable format.
|
350
276
|
|
351
|
-
**CLI Usage:**
|
352
|
-
|
353
|
-
```bash
|
354
|
-
# Get system information
|
355
|
-
skydeckai-code-cli --tool get_system_info
|
356
|
-
```
|
357
|
-
|
358
277
|
### Screen Context and Image Tools
|
359
278
|
|
360
279
|
#### get_active_apps
|
@@ -518,28 +437,6 @@ Response content as text with HTTP status code and size information. For binary
|
|
518
437
|
|
519
438
|
This tool can be used to access web APIs, fetch documentation, or download content from the web while respecting size limits (10MB max) and security constraints.
|
520
439
|
|
521
|
-
**CLI Usage:**
|
522
|
-
|
523
|
-
```bash
|
524
|
-
# Fetch JSON from an API
|
525
|
-
skydeckai-code-cli --tool web_fetch --args '{
|
526
|
-
"url": "https://api.github.com/users/octocat",
|
527
|
-
"headers": {"Accept": "application/json"}
|
528
|
-
}'
|
529
|
-
|
530
|
-
# Download content to a file
|
531
|
-
skydeckai-code-cli --tool web_fetch --args '{
|
532
|
-
"url": "https://github.com/github/github-mcp-server/blob/main/README.md",
|
533
|
-
"save_to_file": "downloads/readme.md"
|
534
|
-
}'
|
535
|
-
|
536
|
-
# Fetch a webpage and convert to markdown for better readability
|
537
|
-
skydeckai-code-cli --tool web_fetch --args '{
|
538
|
-
"url": "https://example.com",
|
539
|
-
"convert_html_to_markdown": true
|
540
|
-
}'
|
541
|
-
```
|
542
|
-
|
543
440
|
#### web_search
|
544
441
|
|
545
442
|
Performs a robust web search using multiple search engines and returns concise, relevant results.
|
@@ -566,27 +463,6 @@ A list of search results formatted in markdown, including titles, URLs, and snip
|
|
566
463
|
|
567
464
|
This tool uses a multi-engine approach that tries different search engines with various parsing strategies to ensure reliable results. You can specify a preferred engine, but some engines may block automated access, in which case the tool will fall back to alternative engines when "auto" is selected.
|
568
465
|
|
569
|
-
**CLI Usage:**
|
570
|
-
|
571
|
-
```bash
|
572
|
-
# Search with default settings (auto engine selection)
|
573
|
-
skydeckai-code-cli --tool web_search --args '{
|
574
|
-
"query": "latest python release features"
|
575
|
-
}'
|
576
|
-
|
577
|
-
# Try DuckDuckGo if you want alternative results
|
578
|
-
skydeckai-code-cli --tool web_search --args '{
|
579
|
-
"query": "machine learning frameworks comparison",
|
580
|
-
"search_engine": "duckduckgo"
|
581
|
-
}'
|
582
|
-
|
583
|
-
# Use Bing for reliable results
|
584
|
-
skydeckai-code-cli --tool web_search --args '{
|
585
|
-
"query": "best programming practices 2023",
|
586
|
-
"search_engine": "bing"
|
587
|
-
}'
|
588
|
-
```
|
589
|
-
|
590
466
|
### Utility Tools
|
591
467
|
|
592
468
|
#### batch_tools
|
@@ -640,47 +516,6 @@ This tool provides efficient execution of multiple operations in a single reques
|
|
640
516
|
1. Use paths relative to the current working directory (e.g., "project/src" rather than just "src"), or
|
641
517
|
2. Include an explicit tool invocation to change directories using `update_allowed_directory`
|
642
518
|
|
643
|
-
**CLI Usage:**
|
644
|
-
|
645
|
-
```bash
|
646
|
-
# Setup a new project with multiple steps in sequential order (using proper paths)
|
647
|
-
skydeckai-code-cli --tool batch_tools --args '{
|
648
|
-
"description": "Setup new project",
|
649
|
-
"sequential": true,
|
650
|
-
"invocations": [
|
651
|
-
{"tool": "create_directory", "arguments": {"path": "project"}},
|
652
|
-
{"tool": "create_directory", "arguments": {"path": "project/src"}},
|
653
|
-
{"tool": "write_file", "arguments": {"path": "project/README.md", "content": "# Project\n\nA new project."}}
|
654
|
-
]
|
655
|
-
}'
|
656
|
-
|
657
|
-
# Create nested structure using relative paths (without changing directory)
|
658
|
-
skydeckai-code-cli --tool batch_tools --args '{
|
659
|
-
"description": "Create project structure",
|
660
|
-
"sequential": true,
|
661
|
-
"invocations": [
|
662
|
-
{"tool": "create_directory", "arguments": {"path": "project/src"}},
|
663
|
-
{"tool": "create_directory", "arguments": {"path": "project/docs"}},
|
664
|
-
{"tool": "write_file", "arguments": {"path": "project/README.md", "content": "# Project"}}
|
665
|
-
]
|
666
|
-
}'
|
667
|
-
|
668
|
-
# Gather system information and take a screenshot (tasks can run in parallel)
|
669
|
-
skydeckai-code-cli --tool batch_tools --args '{
|
670
|
-
"description": "System diagnostics",
|
671
|
-
"sequential": false,
|
672
|
-
"invocations": [
|
673
|
-
{"tool": "get_system_info", "arguments": {}},
|
674
|
-
{"tool": "capture_screenshot", "arguments": {
|
675
|
-
"output_path": "diagnostics/screen.png",
|
676
|
-
"capture_mode": {
|
677
|
-
"type": "full"
|
678
|
-
}
|
679
|
-
}}
|
680
|
-
]
|
681
|
-
}'
|
682
|
-
```
|
683
|
-
|
684
519
|
#### think
|
685
520
|
|
686
521
|
A tool for complex reasoning and brainstorming without making changes to the repository.
|
@@ -701,20 +536,6 @@ Your thoughts formatted as markdown, with a note indicating this was a thinking
|
|
701
536
|
|
702
537
|
This tool is useful for thinking through complex problems, brainstorming solutions, or laying out implementation plans without making any actual changes. It's a great way to document your reasoning process, evaluate different approaches, or plan out a multi-step strategy before taking action.
|
703
538
|
|
704
|
-
**CLI Usage:**
|
705
|
-
|
706
|
-
```bash
|
707
|
-
# Analyze a bug and plan a fix
|
708
|
-
skydeckai-code-cli --tool think --args '{
|
709
|
-
"thought": "# Bug Analysis\n\n## Observed Behavior\nThe login endpoint returns a 500 error when email contains Unicode characters.\n\n## Root Cause\nThe database adapter is not properly encoding Unicode strings before constructing the SQL query.\n\n## Potential Fixes\n1. Update the database adapter to use parameterized queries\n2. Add input validation to reject Unicode in emails\n3. Encode email input manually before database operations\n\nFix #1 is the best approach as it solves the core issue and improves security."
|
710
|
-
}'
|
711
|
-
|
712
|
-
# Evaluate design alternatives
|
713
|
-
skydeckai-code-cli --tool think --args '{
|
714
|
-
"thought": "# API Design Options\n\n## REST vs GraphQL\nFor this use case, GraphQL would provide more flexible data fetching but adds complexity. REST is simpler and sufficient for our current needs.\n\n## Authentication Methods\nJWT-based authentication offers stateless operation and better scalability compared to session-based auth.\n\nRecommendation: Use REST with JWT authentication for the initial implementation."
|
715
|
-
}'
|
716
|
-
```
|
717
|
-
|
718
539
|
### Code Execution
|
719
540
|
|
720
541
|
#### execute_code
|
@@ -745,34 +566,6 @@ Executes code in various programming languages with safety measures and restrict
|
|
745
566
|
| code | string | Yes | Code to execute |
|
746
567
|
| timeout | integer | No | Maximum execution time (default: 5s) |
|
747
568
|
|
748
|
-
**CLI Usage:**
|
749
|
-
|
750
|
-
```bash
|
751
|
-
# Python example
|
752
|
-
skydeckai-code-cli --tool execute_code --args '{
|
753
|
-
"language": "python",
|
754
|
-
"code": "print(sum(range(10)))"
|
755
|
-
}'
|
756
|
-
|
757
|
-
# JavaScript example
|
758
|
-
skydeckai-code-cli --tool execute_code --args '{
|
759
|
-
"language": "javascript",
|
760
|
-
"code": "console.log(Array.from({length: 5}, (_, i) => i*2))"
|
761
|
-
}'
|
762
|
-
|
763
|
-
# Ruby example
|
764
|
-
skydeckai-code-cli --tool execute_code --args '{
|
765
|
-
"language": "ruby",
|
766
|
-
"code": "puts (1..5).reduce(:+)"
|
767
|
-
}'
|
768
|
-
|
769
|
-
# Go example
|
770
|
-
skydeckai-code-cli --tool execute_code --args '{
|
771
|
-
"language": "go",
|
772
|
-
"code": "fmt.Println(\"Hello, Go!\")"
|
773
|
-
}'
|
774
|
-
```
|
775
|
-
|
776
569
|
**Requirements:**
|
777
570
|
|
778
571
|
- Respective language runtimes must be installed
|
@@ -805,25 +598,6 @@ Executes shell scripts (bash/sh) with safety measures and restrictions.
|
|
805
598
|
| script | string | Yes | Shell script to execute |
|
806
599
|
| timeout | integer | No | Maximum execution time (default: 300s, max: 600s) |
|
807
600
|
|
808
|
-
**CLI Usage:**
|
809
|
-
|
810
|
-
```bash
|
811
|
-
# List directory contents with details
|
812
|
-
skydeckai-code-cli --tool execute_shell_script --args '{
|
813
|
-
"script": "ls -la"
|
814
|
-
}'
|
815
|
-
|
816
|
-
# Find all Python files recursively
|
817
|
-
skydeckai-code-cli --tool execute_shell_script --args '{
|
818
|
-
"script": "find . -name \"*.py\" -type f"
|
819
|
-
}'
|
820
|
-
|
821
|
-
# Complex script with multiple commands
|
822
|
-
skydeckai-code-cli --tool execute_shell_script --args '{
|
823
|
-
"script": "echo \"System Info:\" && uname -a && echo \"\nDisk Usage:\" && df -h"
|
824
|
-
}'
|
825
|
-
```
|
826
|
-
|
827
601
|
**Features:**
|
828
602
|
|
829
603
|
- Uses /bin/sh for maximum compatibility across systems
|
@@ -850,20 +624,6 @@ Configuration file: `~/.skydeckai_code/config.json`
|
|
850
624
|
}
|
851
625
|
```
|
852
626
|
|
853
|
-
## CLI Usage
|
854
|
-
|
855
|
-
Basic command structure:
|
856
|
-
|
857
|
-
```bash
|
858
|
-
skydeckai-code-cli --tool <tool_name> --args '<json_arguments>'
|
859
|
-
|
860
|
-
# List available tools
|
861
|
-
skydeckai-code-cli --list-tools
|
862
|
-
|
863
|
-
# Enable debug output
|
864
|
-
skydeckai-code-cli --debug --tool <tool_name> --args '<json_arguments>'
|
865
|
-
```
|
866
|
-
|
867
627
|
## Debugging
|
868
628
|
|
869
629
|
Use MCP Inspector for debugging:
|
@@ -8,13 +8,13 @@ An MCP server that provides a comprehensive set of tools for AI-driven developme
|
|
8
8
|
|
9
9
|
This mcp server was formerly known as `mcp-server-aidd`. It was renamed to `skydeckai-code` to credit the team at [SkyDeck.ai](https://skydeck.ai) with creating this application along with [East Agile](https://eastagile.com). But more importantly we realized that the term AI Driven Development (AIDD) was just not catching on. People did not understand at a glance what it was about. And nor did LLMs. "Code" was far more intuitive. And linguistically intuitive is important in the world of agentic AI.
|
10
10
|
|
11
|
-
|
11
|
+
[](https://mseep.ai/app/fe7a40fd-30c1-4767-84f9-d33bf997497e)
|
12
12
|
|
13
13
|
## Installation
|
14
14
|
|
15
15
|
```bash
|
16
|
-
# Using
|
17
|
-
|
16
|
+
# Using uvx
|
17
|
+
uvx skydeckai-code
|
18
18
|
```
|
19
19
|
|
20
20
|
## Claude Desktop Setup
|
@@ -34,9 +34,9 @@ Add to your `claude_desktop_config.json`:
|
|
34
34
|
|
35
35
|
## SkyDeck AI Helper App
|
36
36
|
|
37
|
-
If you're using
|
37
|
+
If you're using MseeP AI Helper app, you can search for "SkyDeckAI Code" and install it.
|
38
38
|
|
39
|
-

|
40
40
|
|
41
41
|
## Key Features
|
42
42
|
|
@@ -96,34 +96,6 @@ If you're using SkyDeck AI Helper app, you can search for "SkyDeckAI Code" and i
|
|
96
96
|
| delete_file | path: string | Success confirmation |
|
97
97
|
| get_file_info | path: string | File metadata (size, timestamps, permissions) |
|
98
98
|
|
99
|
-
**CLI Usage:**
|
100
|
-
|
101
|
-
```bash
|
102
|
-
# Read entire file
|
103
|
-
skydeckai-code-cli --tool read_file --args '{"files": [{"path": "src/main.py"}]}'
|
104
|
-
|
105
|
-
# Read 10 lines starting from line 20
|
106
|
-
skydeckai-code-cli --tool read_file --args '{"files": [{"path": "src/main.py", "offset": 20, "limit": 10}]}'
|
107
|
-
|
108
|
-
# Read from line 50 to the end of the file
|
109
|
-
skydeckai-code-cli --tool read_file --args '{"files": [{"path": "src/main.py", "offset": 50}]}'
|
110
|
-
|
111
|
-
# Read multiple files with different line ranges
|
112
|
-
skydeckai-code-cli --tool read_file --args '{"files": [
|
113
|
-
{"path": "src/main.py", "offset": 1, "limit": 10},
|
114
|
-
{"path": "README.md"}
|
115
|
-
]}'
|
116
|
-
|
117
|
-
# Write file
|
118
|
-
skydeckai-code-cli --tool write_file --args '{"path": "output.txt", "content": "Hello World"}'
|
119
|
-
|
120
|
-
# Copy file or directory
|
121
|
-
skydeckai-code-cli --tool copy_file --args '{"source": "config.json", "destination": "config.backup.json"}'
|
122
|
-
|
123
|
-
# Get file info
|
124
|
-
skydeckai-code-cli --tool get_file_info --args '{"path": "src/main.py"}'
|
125
|
-
```
|
126
|
-
|
127
99
|
### Complex File Operations
|
128
100
|
|
129
101
|
#### edit_file
|
@@ -173,16 +145,6 @@ Generates complete directory structure:
|
|
173
145
|
|
174
146
|
Returns: JSON tree structure of directory contents.
|
175
147
|
|
176
|
-
**CLI Usage:**
|
177
|
-
|
178
|
-
```bash
|
179
|
-
# List directory
|
180
|
-
skydeckai-code-cli --tool list_directory --args '{"path": "."}'
|
181
|
-
|
182
|
-
# Search for Python files
|
183
|
-
skydeckai-code-cli --tool search_files --args '{"pattern": ".py", "path": "src"}'
|
184
|
-
```
|
185
|
-
|
186
148
|
### Code Analysis
|
187
149
|
|
188
150
|
#### codebase_mapper
|
@@ -217,19 +179,6 @@ Supported Languages:
|
|
217
179
|
- C# (.cs)
|
218
180
|
- Kotlin (.kt, .kts)
|
219
181
|
|
220
|
-
**CLI Usage:**
|
221
|
-
|
222
|
-
```bash
|
223
|
-
# Map the entire codebase structure
|
224
|
-
skydeckai-code-cli --tool codebase_mapper --args '{"path": "."}'
|
225
|
-
|
226
|
-
# Map only the source directory
|
227
|
-
skydeckai-code-cli --tool codebase_mapper --args '{"path": "src"}'
|
228
|
-
|
229
|
-
# Map a specific component or module
|
230
|
-
skydeckai-code-cli --tool codebase_mapper --args '{"path": "src/components"}'
|
231
|
-
```
|
232
|
-
|
233
182
|
#### search_code
|
234
183
|
|
235
184
|
Fast content search tool using regular expressions:
|
@@ -260,29 +209,6 @@ Matching lines grouped by file with line numbers, sorted by file modification ti
|
|
260
209
|
|
261
210
|
This tool uses ripgrep when available for optimal performance, with a Python fallback implementation. It's ideal for finding specific code patterns like function declarations, imports, variable usages, or error handling.
|
262
211
|
|
263
|
-
**CLI Usage:**
|
264
|
-
|
265
|
-
```bash
|
266
|
-
# Find function and class declarations in JavaScript files
|
267
|
-
skydeckai-code-cli --tool search_code --args '{
|
268
|
-
"patterns": ["function\\s+\\w+", "class\\s+\\w+"],
|
269
|
-
"include": "*.js"
|
270
|
-
}'
|
271
|
-
|
272
|
-
# Find all console.log statements with errors or warnings
|
273
|
-
skydeckai-code-cli --tool search_code --args '{
|
274
|
-
"patterns": ["console\\.log.*[eE]rror", "console\\.log.*[wW]arning"],
|
275
|
-
"path": "src"
|
276
|
-
}'
|
277
|
-
|
278
|
-
# Find import and export statements in TypeScript files
|
279
|
-
skydeckai-code-cli --tool search_code --args '{
|
280
|
-
"patterns": ["import.*from", "export.*"],
|
281
|
-
"include": "*.{ts,tsx}",
|
282
|
-
"exclude": "node_modules/**"
|
283
|
-
}'
|
284
|
-
```
|
285
|
-
|
286
212
|
### System Information
|
287
213
|
|
288
214
|
| Tool | Parameters | Returns |
|
@@ -313,13 +239,6 @@ Returns:
|
|
313
239
|
|
314
240
|
Provides essential system information in a clean, readable format.
|
315
241
|
|
316
|
-
**CLI Usage:**
|
317
|
-
|
318
|
-
```bash
|
319
|
-
# Get system information
|
320
|
-
skydeckai-code-cli --tool get_system_info
|
321
|
-
```
|
322
|
-
|
323
242
|
### Screen Context and Image Tools
|
324
243
|
|
325
244
|
#### get_active_apps
|
@@ -483,28 +402,6 @@ Response content as text with HTTP status code and size information. For binary
|
|
483
402
|
|
484
403
|
This tool can be used to access web APIs, fetch documentation, or download content from the web while respecting size limits (10MB max) and security constraints.
|
485
404
|
|
486
|
-
**CLI Usage:**
|
487
|
-
|
488
|
-
```bash
|
489
|
-
# Fetch JSON from an API
|
490
|
-
skydeckai-code-cli --tool web_fetch --args '{
|
491
|
-
"url": "https://api.github.com/users/octocat",
|
492
|
-
"headers": {"Accept": "application/json"}
|
493
|
-
}'
|
494
|
-
|
495
|
-
# Download content to a file
|
496
|
-
skydeckai-code-cli --tool web_fetch --args '{
|
497
|
-
"url": "https://github.com/github/github-mcp-server/blob/main/README.md",
|
498
|
-
"save_to_file": "downloads/readme.md"
|
499
|
-
}'
|
500
|
-
|
501
|
-
# Fetch a webpage and convert to markdown for better readability
|
502
|
-
skydeckai-code-cli --tool web_fetch --args '{
|
503
|
-
"url": "https://example.com",
|
504
|
-
"convert_html_to_markdown": true
|
505
|
-
}'
|
506
|
-
```
|
507
|
-
|
508
405
|
#### web_search
|
509
406
|
|
510
407
|
Performs a robust web search using multiple search engines and returns concise, relevant results.
|
@@ -531,27 +428,6 @@ A list of search results formatted in markdown, including titles, URLs, and snip
|
|
531
428
|
|
532
429
|
This tool uses a multi-engine approach that tries different search engines with various parsing strategies to ensure reliable results. You can specify a preferred engine, but some engines may block automated access, in which case the tool will fall back to alternative engines when "auto" is selected.
|
533
430
|
|
534
|
-
**CLI Usage:**
|
535
|
-
|
536
|
-
```bash
|
537
|
-
# Search with default settings (auto engine selection)
|
538
|
-
skydeckai-code-cli --tool web_search --args '{
|
539
|
-
"query": "latest python release features"
|
540
|
-
}'
|
541
|
-
|
542
|
-
# Try DuckDuckGo if you want alternative results
|
543
|
-
skydeckai-code-cli --tool web_search --args '{
|
544
|
-
"query": "machine learning frameworks comparison",
|
545
|
-
"search_engine": "duckduckgo"
|
546
|
-
}'
|
547
|
-
|
548
|
-
# Use Bing for reliable results
|
549
|
-
skydeckai-code-cli --tool web_search --args '{
|
550
|
-
"query": "best programming practices 2023",
|
551
|
-
"search_engine": "bing"
|
552
|
-
}'
|
553
|
-
```
|
554
|
-
|
555
431
|
### Utility Tools
|
556
432
|
|
557
433
|
#### batch_tools
|
@@ -605,47 +481,6 @@ This tool provides efficient execution of multiple operations in a single reques
|
|
605
481
|
1. Use paths relative to the current working directory (e.g., "project/src" rather than just "src"), or
|
606
482
|
2. Include an explicit tool invocation to change directories using `update_allowed_directory`
|
607
483
|
|
608
|
-
**CLI Usage:**
|
609
|
-
|
610
|
-
```bash
|
611
|
-
# Setup a new project with multiple steps in sequential order (using proper paths)
|
612
|
-
skydeckai-code-cli --tool batch_tools --args '{
|
613
|
-
"description": "Setup new project",
|
614
|
-
"sequential": true,
|
615
|
-
"invocations": [
|
616
|
-
{"tool": "create_directory", "arguments": {"path": "project"}},
|
617
|
-
{"tool": "create_directory", "arguments": {"path": "project/src"}},
|
618
|
-
{"tool": "write_file", "arguments": {"path": "project/README.md", "content": "# Project\n\nA new project."}}
|
619
|
-
]
|
620
|
-
}'
|
621
|
-
|
622
|
-
# Create nested structure using relative paths (without changing directory)
|
623
|
-
skydeckai-code-cli --tool batch_tools --args '{
|
624
|
-
"description": "Create project structure",
|
625
|
-
"sequential": true,
|
626
|
-
"invocations": [
|
627
|
-
{"tool": "create_directory", "arguments": {"path": "project/src"}},
|
628
|
-
{"tool": "create_directory", "arguments": {"path": "project/docs"}},
|
629
|
-
{"tool": "write_file", "arguments": {"path": "project/README.md", "content": "# Project"}}
|
630
|
-
]
|
631
|
-
}'
|
632
|
-
|
633
|
-
# Gather system information and take a screenshot (tasks can run in parallel)
|
634
|
-
skydeckai-code-cli --tool batch_tools --args '{
|
635
|
-
"description": "System diagnostics",
|
636
|
-
"sequential": false,
|
637
|
-
"invocations": [
|
638
|
-
{"tool": "get_system_info", "arguments": {}},
|
639
|
-
{"tool": "capture_screenshot", "arguments": {
|
640
|
-
"output_path": "diagnostics/screen.png",
|
641
|
-
"capture_mode": {
|
642
|
-
"type": "full"
|
643
|
-
}
|
644
|
-
}}
|
645
|
-
]
|
646
|
-
}'
|
647
|
-
```
|
648
|
-
|
649
484
|
#### think
|
650
485
|
|
651
486
|
A tool for complex reasoning and brainstorming without making changes to the repository.
|
@@ -666,20 +501,6 @@ Your thoughts formatted as markdown, with a note indicating this was a thinking
|
|
666
501
|
|
667
502
|
This tool is useful for thinking through complex problems, brainstorming solutions, or laying out implementation plans without making any actual changes. It's a great way to document your reasoning process, evaluate different approaches, or plan out a multi-step strategy before taking action.
|
668
503
|
|
669
|
-
**CLI Usage:**
|
670
|
-
|
671
|
-
```bash
|
672
|
-
# Analyze a bug and plan a fix
|
673
|
-
skydeckai-code-cli --tool think --args '{
|
674
|
-
"thought": "# Bug Analysis\n\n## Observed Behavior\nThe login endpoint returns a 500 error when email contains Unicode characters.\n\n## Root Cause\nThe database adapter is not properly encoding Unicode strings before constructing the SQL query.\n\n## Potential Fixes\n1. Update the database adapter to use parameterized queries\n2. Add input validation to reject Unicode in emails\n3. Encode email input manually before database operations\n\nFix #1 is the best approach as it solves the core issue and improves security."
|
675
|
-
}'
|
676
|
-
|
677
|
-
# Evaluate design alternatives
|
678
|
-
skydeckai-code-cli --tool think --args '{
|
679
|
-
"thought": "# API Design Options\n\n## REST vs GraphQL\nFor this use case, GraphQL would provide more flexible data fetching but adds complexity. REST is simpler and sufficient for our current needs.\n\n## Authentication Methods\nJWT-based authentication offers stateless operation and better scalability compared to session-based auth.\n\nRecommendation: Use REST with JWT authentication for the initial implementation."
|
680
|
-
}'
|
681
|
-
```
|
682
|
-
|
683
504
|
### Code Execution
|
684
505
|
|
685
506
|
#### execute_code
|
@@ -710,34 +531,6 @@ Executes code in various programming languages with safety measures and restrict
|
|
710
531
|
| code | string | Yes | Code to execute |
|
711
532
|
| timeout | integer | No | Maximum execution time (default: 5s) |
|
712
533
|
|
713
|
-
**CLI Usage:**
|
714
|
-
|
715
|
-
```bash
|
716
|
-
# Python example
|
717
|
-
skydeckai-code-cli --tool execute_code --args '{
|
718
|
-
"language": "python",
|
719
|
-
"code": "print(sum(range(10)))"
|
720
|
-
}'
|
721
|
-
|
722
|
-
# JavaScript example
|
723
|
-
skydeckai-code-cli --tool execute_code --args '{
|
724
|
-
"language": "javascript",
|
725
|
-
"code": "console.log(Array.from({length: 5}, (_, i) => i*2))"
|
726
|
-
}'
|
727
|
-
|
728
|
-
# Ruby example
|
729
|
-
skydeckai-code-cli --tool execute_code --args '{
|
730
|
-
"language": "ruby",
|
731
|
-
"code": "puts (1..5).reduce(:+)"
|
732
|
-
}'
|
733
|
-
|
734
|
-
# Go example
|
735
|
-
skydeckai-code-cli --tool execute_code --args '{
|
736
|
-
"language": "go",
|
737
|
-
"code": "fmt.Println(\"Hello, Go!\")"
|
738
|
-
}'
|
739
|
-
```
|
740
|
-
|
741
534
|
**Requirements:**
|
742
535
|
|
743
536
|
- Respective language runtimes must be installed
|
@@ -770,25 +563,6 @@ Executes shell scripts (bash/sh) with safety measures and restrictions.
|
|
770
563
|
| script | string | Yes | Shell script to execute |
|
771
564
|
| timeout | integer | No | Maximum execution time (default: 300s, max: 600s) |
|
772
565
|
|
773
|
-
**CLI Usage:**
|
774
|
-
|
775
|
-
```bash
|
776
|
-
# List directory contents with details
|
777
|
-
skydeckai-code-cli --tool execute_shell_script --args '{
|
778
|
-
"script": "ls -la"
|
779
|
-
}'
|
780
|
-
|
781
|
-
# Find all Python files recursively
|
782
|
-
skydeckai-code-cli --tool execute_shell_script --args '{
|
783
|
-
"script": "find . -name \"*.py\" -type f"
|
784
|
-
}'
|
785
|
-
|
786
|
-
# Complex script with multiple commands
|
787
|
-
skydeckai-code-cli --tool execute_shell_script --args '{
|
788
|
-
"script": "echo \"System Info:\" && uname -a && echo \"\nDisk Usage:\" && df -h"
|
789
|
-
}'
|
790
|
-
```
|
791
|
-
|
792
566
|
**Features:**
|
793
567
|
|
794
568
|
- Uses /bin/sh for maximum compatibility across systems
|
@@ -815,20 +589,6 @@ Configuration file: `~/.skydeckai_code/config.json`
|
|
815
589
|
}
|
816
590
|
```
|
817
591
|
|
818
|
-
## CLI Usage
|
819
|
-
|
820
|
-
Basic command structure:
|
821
|
-
|
822
|
-
```bash
|
823
|
-
skydeckai-code-cli --tool <tool_name> --args '<json_arguments>'
|
824
|
-
|
825
|
-
# List available tools
|
826
|
-
skydeckai-code-cli --list-tools
|
827
|
-
|
828
|
-
# Enable debug output
|
829
|
-
skydeckai-code-cli --debug --tool <tool_name> --args '<json_arguments>'
|
830
|
-
```
|
831
|
-
|
832
592
|
## Debugging
|
833
593
|
|
834
594
|
Use MCP Inspector for debugging:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "skydeckai-code"
|
3
|
-
version = "0.1.
|
3
|
+
version = "0.1.40"
|
4
4
|
description = "This MCP server provides a comprehensive set of tools for AI-driven Development workflows including file operations, code analysis, multi-language execution, web content fetching with HTML-to-markdown conversion, multi-engine web search, code content searching, and system information retrieval."
|
5
5
|
readme = "README.md"
|
6
6
|
requires-python = ">=3.11"
|
Binary file
|
@@ -232,11 +232,15 @@ def edit_file_tool():
|
|
232
232
|
"description": "Make line-based edits to a text file. "
|
233
233
|
"WHEN TO USE: When you need to make selective changes to specific parts of a file while preserving the rest of the content. "
|
234
234
|
"Useful for modifying configuration values, updating text while maintaining file structure, or making targeted code changes. "
|
235
|
+
"IMPORTANT: For multiple edits to the same file, use a single tool call with multiple edits in the 'edits' array rather than multiple tool calls. "
|
236
|
+
"This is more efficient and ensures all edits are applied atomically. "
|
235
237
|
"WHEN NOT TO USE: When you want to completely replace a file's contents (use write_file instead), when you need to create a new file (use write_file instead), "
|
236
238
|
"or when you want to apply highly complex edits with context. "
|
237
239
|
"RETURNS: A git-style diff showing the changes made, along with information about any failed matches. "
|
238
240
|
"The response includes sections for failed matches (if any) and the unified diff output. "
|
239
|
-
"
|
241
|
+
"Only works within the allowed directory. "
|
242
|
+
"EXAMPLES: For a single edit: {\"path\": \"config.js\", \"edits\": [{\"oldText\": \"port: 3000\", \"newText\": \"port: 8080\"}]}. "
|
243
|
+
"For multiple edits: {\"path\": \"app.py\", \"edits\": [{\"oldText\": \"debug=False\", \"newText\": \"debug=True\"}, {\"oldText\": \"version='1.0'\", \"newText\": \"version='2.0'\"}]}",
|
240
244
|
"inputSchema": {
|
241
245
|
"type": "object",
|
242
246
|
"properties": {
|
@@ -260,20 +264,26 @@ def edit_file_tool():
|
|
260
264
|
},
|
261
265
|
"required": ["oldText", "newText"]
|
262
266
|
},
|
263
|
-
"description": "
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
"default": False
|
267
|
+
"description": "MUST be an array of edit objects, NOT a string. Each edit object must contain 'oldText' and 'newText' properties. "
|
268
|
+
"For multiple edits, use: [{\"oldText\": \"text1\", \"newText\": \"replacement1\"}, {\"oldText\": \"text2\", \"newText\": \"replacement2\"}]. "
|
269
|
+
"For single edit, still use array: [{\"oldText\": \"text\", \"newText\": \"replacement\"}]. "
|
270
|
+
"The edits are applied in sequence, and each one can modify the result of previous edits. "
|
271
|
+
"AVOID multiple tool calls for the same file - instead, group all edits into a single call."
|
269
272
|
},
|
270
273
|
"options": {
|
271
274
|
"type": "object",
|
272
275
|
"properties": {
|
273
276
|
"partialMatch": {
|
274
277
|
"type": "boolean",
|
275
|
-
"description": "Enable fuzzy matching for finding text. When true, the tool will try to find the best match even if it's not an exact match, using
|
278
|
+
"description": "Enable fuzzy matching for finding text. When true, the tool will try to find the best match even if it's not an exact match, using the confidenceThreshold (default 80%).",
|
276
279
|
"default": True
|
280
|
+
},
|
281
|
+
"confidenceThreshold": {
|
282
|
+
"type": "number",
|
283
|
+
"description": "Minimum confidence threshold for fuzzy matching (0.0 to 1.0). Higher values require more exact matches. Default is 0.8 (80% confidence).",
|
284
|
+
"minimum": 0.0,
|
285
|
+
"maximum": 1.0,
|
286
|
+
"default": 0.8
|
277
287
|
}
|
278
288
|
}
|
279
289
|
}
|
@@ -784,11 +794,17 @@ def find_best_match(content: str, pattern: str, partial_match: bool = True) -> t
|
|
784
794
|
|
785
795
|
return best_start, best_end, best_score
|
786
796
|
|
787
|
-
async def apply_file_edits(file_path: str, edits: List[dict],
|
788
|
-
"""Apply edits to a file with optional formatting and return diff.
|
797
|
+
async def apply_file_edits(file_path: str, edits: List[dict], options: dict = None) -> tuple[str, bool, int, int]:
|
798
|
+
"""Apply edits to a file with optional formatting and return diff.
|
799
|
+
|
800
|
+
Returns:
|
801
|
+
tuple: (result_text, has_changes, successful_edits, failed_edits)
|
802
|
+
"""
|
789
803
|
# Set default options
|
790
804
|
options = options or {}
|
791
805
|
partial_match = options.get('partialMatch', True)
|
806
|
+
# Use 0.8 confidence threshold to prevent false positives while allowing reasonable fuzzy matches
|
807
|
+
confidence_threshold = options.get('confidenceThreshold', 0.8)
|
792
808
|
|
793
809
|
# Read file content
|
794
810
|
with open(file_path, 'r', encoding='utf-8') as f:
|
@@ -797,9 +813,10 @@ async def apply_file_edits(file_path: str, edits: List[dict], dry_run: bool = Fa
|
|
797
813
|
# Track modifications
|
798
814
|
modified_content = content
|
799
815
|
failed_matches = []
|
816
|
+
successful_edits = []
|
800
817
|
|
801
818
|
# Apply each edit
|
802
|
-
for edit in edits:
|
819
|
+
for edit_idx, edit in enumerate(edits):
|
803
820
|
old_text = edit['oldText']
|
804
821
|
new_text = edit['newText']
|
805
822
|
|
@@ -810,7 +827,7 @@ async def apply_file_edits(file_path: str, edits: List[dict], dry_run: bool = Fa
|
|
810
827
|
# Find best match
|
811
828
|
start, end, confidence = find_best_match(working_content, search_text, partial_match)
|
812
829
|
|
813
|
-
if confidence >=
|
830
|
+
if confidence >= confidence_threshold:
|
814
831
|
# Fix indentation while preserving relative structure
|
815
832
|
if start >= 0:
|
816
833
|
# Get the indentation of the first line of the matched text
|
@@ -851,31 +868,77 @@ async def apply_file_edits(file_path: str, edits: List[dict], dry_run: bool = Fa
|
|
851
868
|
|
852
869
|
# Apply the edit
|
853
870
|
modified_content = modified_content[:start] + replacement + modified_content[end:]
|
871
|
+
successful_edits.append({
|
872
|
+
'index': edit_idx,
|
873
|
+
'oldText': old_text,
|
874
|
+
'newText': new_text,
|
875
|
+
'confidence': confidence
|
876
|
+
})
|
854
877
|
else:
|
855
878
|
failed_matches.append({
|
879
|
+
'index': edit_idx,
|
856
880
|
'oldText': old_text,
|
881
|
+
'newText': new_text,
|
857
882
|
'confidence': confidence,
|
858
883
|
'bestMatch': working_content[start:end] if start >= 0 and end > start else None
|
859
884
|
})
|
860
885
|
|
861
886
|
# Create diff
|
862
887
|
diff = create_unified_diff(content, modified_content, os.path.basename(file_path))
|
888
|
+
has_changes = modified_content != content
|
863
889
|
|
864
|
-
# Write changes if
|
865
|
-
|
890
|
+
# CRITICAL FIX: Write changes even if some edits failed (partial success)
|
891
|
+
# This prevents the infinite retry loop
|
892
|
+
if has_changes:
|
866
893
|
with open(file_path, 'w', encoding='utf-8') as f:
|
867
894
|
f.write(modified_content)
|
868
895
|
|
869
|
-
#
|
870
|
-
|
871
|
-
|
872
|
-
|
896
|
+
# Build comprehensive result message
|
897
|
+
result_parts = []
|
898
|
+
|
899
|
+
# Summary
|
900
|
+
total_edits = len(edits)
|
901
|
+
successful_count = len(successful_edits)
|
902
|
+
failed_count = len(failed_matches)
|
903
|
+
|
904
|
+
result_parts.append(f'=== Edit Summary ===')
|
905
|
+
result_parts.append(f'Total edits: {total_edits}')
|
906
|
+
result_parts.append(f'Successful: {successful_count}')
|
907
|
+
result_parts.append(f'Failed: {failed_count}')
|
908
|
+
result_parts.append(f'File modified: {has_changes}')
|
909
|
+
result_parts.append('')
|
910
|
+
|
911
|
+
# Failed matches details
|
912
|
+
if failed_matches:
|
913
|
+
result_parts.append('=== Failed Matches ===')
|
914
|
+
for failed in failed_matches:
|
915
|
+
result_parts.append(f"Edit #{failed['index'] + 1}: Confidence {failed['confidence']:.2f}")
|
916
|
+
result_parts.append(f" Searched for: {repr(failed['oldText'][:100])}...")
|
917
|
+
if failed['bestMatch']:
|
918
|
+
result_parts.append(f" Best match: {repr(failed['bestMatch'][:100])}...")
|
919
|
+
result_parts.append('')
|
920
|
+
|
921
|
+
# Successful edits
|
922
|
+
if successful_edits:
|
923
|
+
result_parts.append('=== Successful Edits ===')
|
924
|
+
for success in successful_edits:
|
925
|
+
result_parts.append(f"Edit #{success['index'] + 1}: Confidence {success['confidence']:.2f}")
|
926
|
+
result_parts.append('')
|
927
|
+
|
928
|
+
# Diff
|
929
|
+
if diff.strip():
|
930
|
+
result_parts.append('=== Diff ===')
|
931
|
+
result_parts.append(diff)
|
932
|
+
else:
|
933
|
+
result_parts.append('=== No Changes ===')
|
934
|
+
result_parts.append('No modifications were made to the file.')
|
935
|
+
|
936
|
+
return '\n'.join(result_parts), has_changes, successful_count, failed_count
|
873
937
|
|
874
938
|
async def handle_edit_file(arguments: dict):
|
875
939
|
"""Handle editing a file with pattern matching and formatting."""
|
876
940
|
path = arguments.get("path")
|
877
941
|
edits = arguments.get("edits")
|
878
|
-
dry_run = arguments.get("dryRun", False)
|
879
942
|
options = arguments.get("options", {})
|
880
943
|
|
881
944
|
if not path:
|
@@ -900,8 +963,14 @@ async def handle_edit_file(arguments: dict):
|
|
900
963
|
raise ValueError(f"Access denied: Path ({full_path}) must be within allowed directory ({state.allowed_directory})")
|
901
964
|
|
902
965
|
try:
|
903
|
-
|
904
|
-
|
966
|
+
result_text, has_changes, successful_count, failed_count = await apply_file_edits(full_path, edits, options)
|
967
|
+
|
968
|
+
# CRITICAL FIX: Raise an exception only if ALL edits failed AND no changes were made
|
969
|
+
# This prevents silent failures that cause infinite retry loops
|
970
|
+
if failed_count > 0 and successful_count == 0:
|
971
|
+
raise ValueError(f"All {failed_count} edits failed to match. No changes were made to the file. Check the 'oldText' patterns and ensure they match the file content exactly.")
|
972
|
+
|
973
|
+
return [TextContent(type="text", text=result_text)]
|
905
974
|
except Exception as e:
|
906
975
|
raise ValueError(f"Error editing file: {str(e)}")
|
907
976
|
|
Binary file
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{skydeckai_code-0.1.39 → skydeckai_code-0.1.40}/src/aidd/tools/get_available_windows_tool.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|