largefile 0.0.1__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.
@@ -0,0 +1,10 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
@@ -0,0 +1 @@
1
+ 3.10
@@ -0,0 +1,65 @@
1
+ Metadata-Version: 2.4
2
+ Name: largefile
3
+ Version: 0.0.1
4
+ Summary: MCP server for surgical editing of large files with intelligent navigation
5
+ Project-URL: Homepage, https://github.com/peteretelej/largefile
6
+ Project-URL: Repository, https://github.com/peteretelej/largefile.git
7
+ Project-URL: Issues, https://github.com/peteretelej/largefile/issues
8
+ Project-URL: Documentation, https://github.com/peteretelej/largefile#readme
9
+ Author-email: Peter Etelej <peter@etelej.com>
10
+ Maintainer-email: Peter Etelej <peter@etelej.com>
11
+ License: MIT
12
+ Keywords: ai-tools,large-files,llm,mcp,text-editing
13
+ Classifier: Development Status :: 2 - Pre-Alpha
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Classifier: Topic :: Text Processing
22
+ Requires-Python: >=3.10
23
+ Requires-Dist: click>=8.2.1
24
+ Requires-Dist: mcp>=1.10.1
25
+ Description-Content-Type: text/markdown
26
+
27
+ # Largefile MCP Server
28
+
29
+ MCP server for surgical editing of large files with intelligent navigation.
30
+
31
+ ## Status
32
+
33
+ **This is a placeholder release (v0.0.1) - implementation coming soon!**
34
+
35
+ ## Vision
36
+
37
+ Enable LLMs to perform surgical operations on files of any size through intelligent navigation, targeted search, and precise editing, eliminating the context barrier that prevents AI tools from working with production codebases.
38
+
39
+ ## Planned Features
40
+
41
+ - **Surgical Navigation**: Jump to specific lines, functions, or patterns instantly
42
+ - **Intelligent Search**: Pattern-based search across files without context limits
43
+ - **Precision Editing**: Atomic edit operations that preserve file integrity
44
+ - **Context Extraction**: Extract minimal relevant context for LLM consumption
45
+ - **Atomic Calculations**: Perform file-wide calculations without full loading
46
+
47
+ ## Installation
48
+
49
+ ```bash
50
+ pip install largefile
51
+ ```
52
+
53
+ ## Usage
54
+
55
+ ```bash
56
+ largefile-mcp --host localhost --port 3000
57
+ ```
58
+
59
+ ## Development Status
60
+
61
+ This package is in pre-alpha development. The current release is a placeholder to reserve the package name and establish the project structure.
62
+
63
+ ## License
64
+
65
+ MIT
@@ -0,0 +1,39 @@
1
+ # Largefile MCP Server
2
+
3
+ MCP server for surgical editing of large files with intelligent navigation.
4
+
5
+ ## Status
6
+
7
+ **This is a placeholder release (v0.0.1) - implementation coming soon!**
8
+
9
+ ## Vision
10
+
11
+ Enable LLMs to perform surgical operations on files of any size through intelligent navigation, targeted search, and precise editing, eliminating the context barrier that prevents AI tools from working with production codebases.
12
+
13
+ ## Planned Features
14
+
15
+ - **Surgical Navigation**: Jump to specific lines, functions, or patterns instantly
16
+ - **Intelligent Search**: Pattern-based search across files without context limits
17
+ - **Precision Editing**: Atomic edit operations that preserve file integrity
18
+ - **Context Extraction**: Extract minimal relevant context for LLM consumption
19
+ - **Atomic Calculations**: Perform file-wide calculations without full loading
20
+
21
+ ## Installation
22
+
23
+ ```bash
24
+ pip install largefile
25
+ ```
26
+
27
+ ## Usage
28
+
29
+ ```bash
30
+ largefile-mcp --host localhost --port 3000
31
+ ```
32
+
33
+ ## Development Status
34
+
35
+ This package is in pre-alpha development. The current release is a placeholder to reserve the package name and establish the project structure.
36
+
37
+ ## License
38
+
39
+ MIT
File without changes
@@ -0,0 +1,182 @@
1
+ # Largefile Vision
2
+
3
+ ## Problem Statement
4
+
5
+ LLMs cannot work with large files due to context window limitations. When files exceed token limits, AI tools must choose between loading partial content (losing context) or failing entirely. This prevents effective AI-powered development on real-world codebases, generated code, large datasets, and complex configuration files.
6
+
7
+ The core challenge is enabling **surgical file operations** - precise navigation, targeted search, atomic edits, and contextual analysis - without requiring full file loading.
8
+
9
+ ## Core Vision
10
+
11
+ Enable LLMs to perform surgical operations on files of any size through intelligent navigation, targeted search, and precise editing, eliminating the context barrier that prevents AI tools from working with production codebases.
12
+
13
+ ## Technical Objectives
14
+
15
+ ### Core Capabilities
16
+
17
+ 1. **Surgical Navigation**
18
+ - Jump to specific lines, functions, classes, or patterns instantly
19
+ - Fast line-based access without loading entire file
20
+ - Maintain accurate line indexing across file modifications
21
+
22
+ 2. **Intelligent Search**
23
+ - Pattern-based search across files of any size
24
+ - Contextual search results with surrounding code
25
+ - Multiple search patterns and result aggregation
26
+
27
+ 3. **Precision Editing**
28
+ - Atomic edit operations that preserve file integrity
29
+ - Targeted changes with automatic line number updates
30
+ - Rollback capability for all modifications
31
+
32
+ 4. **Context Extraction**
33
+ - Extract minimal relevant context for LLM consumption
34
+ - Provide surrounding code context for surgical edits
35
+ - Maintain file state consistency across operations
36
+
37
+ 5. **Atomic Calculations**
38
+ - Perform file-wide calculations without full loading
39
+ - Line counts, pattern frequency, size analysis
40
+ - Fast file statistics and metadata operations
41
+
42
+ ## Technical Architecture
43
+
44
+ ### Core Components
45
+
46
+ 1. **File Manager**
47
+ - Efficient file access (in-memory for smaller files, memory-mapped for large files)
48
+ - Line indexing system for fast navigation
49
+ - Change tracking and state management
50
+
51
+ 2. **Search Engine**
52
+ - Pattern matching across files without full loading
53
+ - Context extraction around search results
54
+ - Multiple search pattern support
55
+
56
+ 3. **Edit Engine**
57
+ - Atomic edit operations with integrity guarantees
58
+ - Automatic line number recalculation
59
+ - Rollback and undo capabilities
60
+
61
+ 4. **MCP Interface**
62
+ - Tool definitions for navigation, search, and editing
63
+ - Resource management for file state
64
+ - Comprehensive error handling
65
+
66
+ ### Implementation Strategy
67
+
68
+ The server will dynamically choose the optimal approach based on file size:
69
+ - **Small files (<10MB)**: Direct memory loading for simplicity
70
+ - **Large files (>10MB)**: Memory-mapped access for efficiency
71
+ - **Hybrid approach**: Start with memory loading, upgrade to mmap as needed
72
+
73
+ This flexibility ensures optimal performance while maintaining code simplicity.
74
+
75
+ ## Scope Definition
76
+
77
+ ### In Scope
78
+
79
+ **File Operations:**
80
+ - Text files up to GB scale
81
+ - Line-based editing and navigation
82
+ - Pattern search and replacement
83
+ - Context extraction for LLM consumption
84
+ - Atomic calculations and file statistics
85
+
86
+ **Supported Use Cases:**
87
+ - Large codebase navigation and editing
88
+ - Generated code modification
89
+ - Log file analysis and processing
90
+ - Configuration file management
91
+ - Large dataset manipulation
92
+
93
+ **Technical Boundaries:**
94
+ - Single file focus only
95
+ - Text-based files only
96
+ - UTF-8 encoding support
97
+ - Line-oriented operations
98
+
99
+ ### Out of Scope
100
+
101
+ **Non-Goals:**
102
+ - Multi-file or project-wide operations
103
+ - Binary file support
104
+ - Real-time collaborative editing
105
+ - Version control integration
106
+ - Syntax highlighting or IDE features
107
+ - File system monitoring
108
+ - Network file access
109
+
110
+ **Explicit Limitations:**
111
+ - No multi-user concurrent access
112
+ - No distributed file systems
113
+ - No encryption/security features
114
+ - No backup/versioning system
115
+ - No plugin architecture
116
+
117
+ ## Success Metrics
118
+
119
+ ### Performance Goals
120
+ - Handle files up to 1GB efficiently
121
+ - Sub-second response for all operations
122
+ - Fast line navigation and search
123
+ - Minimal memory usage regardless of file size
124
+
125
+ ### Functional Requirements
126
+ - Navigate to any line instantly
127
+ - Search patterns across entire files
128
+ - Edit operations preserve file integrity
129
+ - Rollback capability for all modifications
130
+ - Accurate atomic calculations
131
+
132
+ ### Integration Success
133
+ - Seamless MCP client integration
134
+ - Stable API for tool implementations
135
+ - Comprehensive error handling
136
+ - Clear documentation and examples
137
+
138
+ ## Implementation Phases
139
+
140
+ ### Phase 1: Core Foundation
141
+ - File access system (memory/mmap hybrid)
142
+ - Line indexing system
143
+ - Basic navigation tools
144
+ - Simple search functionality
145
+
146
+ ### Phase 2: Surgical Operations
147
+ - Atomic edit operations
148
+ - Context extraction
149
+ - Line number tracking
150
+ - Error handling and validation
151
+
152
+ ### Phase 3: Advanced Features
153
+ - Pattern-based search
154
+ - Atomic calculations
155
+ - Performance optimization
156
+ - Comprehensive testing
157
+
158
+ ### Phase 4: Production Ready
159
+ - Edge case handling
160
+ - Performance tuning
161
+ - Documentation
162
+ - Integration examples
163
+
164
+ ## Risk Assessment
165
+
166
+ ### Technical Risks
167
+ - Memory mapping limitations on certain systems
168
+ - Performance degradation with extremely large files
169
+ - Encoding issues with non-UTF-8 files
170
+ - Concurrent access conflicts
171
+
172
+ ### Mitigation Strategies
173
+ - Fallback to streaming for unsupported systems
174
+ - Chunked processing for extreme file sizes
175
+ - Encoding detection and conversion
176
+ - File locking mechanisms
177
+
178
+ ## Long-term Vision
179
+
180
+ This vision provides a foundation for building a production-ready MCP server that solves the fundamental problem of LLM context limitations when working with large files.
181
+
182
+ Future expansion opportunities may include language-specific tooling, advanced search algorithms, and integration with development workflows - but only after the core single-file surgical operations are proven and stable.
@@ -0,0 +1,6 @@
1
+ def main():
2
+ print("Hello from largefile!")
3
+
4
+
5
+ if __name__ == "__main__":
6
+ main()
@@ -0,0 +1,54 @@
1
+ [project]
2
+ name = "largefile"
3
+ version = "0.0.1"
4
+ description = "MCP server for surgical editing of large files with intelligent navigation"
5
+ readme = "README.md"
6
+ requires-python = ">=3.10"
7
+ license = {text = "MIT"}
8
+ keywords = ["mcp", "large-files", "text-editing", "llm", "ai-tools"]
9
+ authors = [
10
+ {name = "Peter Etelej", email = "peter@etelej.com"}
11
+ ]
12
+ maintainers = [
13
+ {name = "Peter Etelej", email = "peter@etelej.com"}
14
+ ]
15
+ classifiers = [
16
+ "Development Status :: 2 - Pre-Alpha",
17
+ "Intended Audience :: Developers",
18
+ "Topic :: Software Development :: Libraries :: Python Modules",
19
+ "Topic :: Text Processing",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Operating System :: OS Independent",
25
+ ]
26
+ dependencies = [
27
+ "click>=8.2.1",
28
+ "mcp>=1.10.1",
29
+ ]
30
+
31
+ [project.urls]
32
+ Homepage = "https://github.com/peteretelej/largefile"
33
+ Repository = "https://github.com/peteretelej/largefile.git"
34
+ Issues = "https://github.com/peteretelej/largefile/issues"
35
+ Documentation = "https://github.com/peteretelej/largefile#readme"
36
+
37
+ [project.scripts]
38
+ largefile-mcp = "src.main:main"
39
+
40
+ [build-system]
41
+ requires = ["hatchling"]
42
+ build-backend = "hatchling.build"
43
+
44
+ [tool.hatch.build.targets.wheel]
45
+ packages = ["src"]
46
+
47
+ [dependency-groups]
48
+ dev = [
49
+ "mypy>=1.16.1",
50
+ "pytest>=8.4.1",
51
+ "pytest-asyncio>=1.0.0",
52
+ "pytest-cov>=6.2.1",
53
+ "ruff>=0.12.2",
54
+ ]
@@ -0,0 +1,5 @@
1
+ """Largefile MCP Server - Surgical editing of large files with intelligent navigation."""
2
+
3
+ __version__ = "0.0.1"
4
+ __author__ = "Peter Etelej"
5
+ __email__ = "peter@etelej.com"
@@ -0,0 +1,21 @@
1
+ """Main entry point for the largefile MCP server."""
2
+
3
+ import click
4
+ from mcp.server import Server
5
+
6
+
7
+ @click.command()
8
+ @click.option("--host", default="localhost", help="Host to bind the server to")
9
+ @click.option("--port", default=3000, help="Port to bind the server to")
10
+ def main(host: str, port: int):
11
+ """Start the largefile MCP server."""
12
+ click.echo(f"Starting largefile MCP server v0.0.1 on {host}:{port}")
13
+ click.echo("This is a placeholder implementation - coming soon!")
14
+
15
+ # TODO: Initialize actual MCP server
16
+ # server = Server("largefile")
17
+ # server.run(host=host, port=port)
18
+
19
+
20
+ if __name__ == "__main__":
21
+ main()