local-coding-agent 1.1.0__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 (169) hide show
  1. local_coding_agent-1.1.0/LICENSE +21 -0
  2. local_coding_agent-1.1.0/PKG-INFO +202 -0
  3. local_coding_agent-1.1.0/README.md +177 -0
  4. local_coding_agent-1.1.0/local_coding_agent/__init__.py +314 -0
  5. local_coding_agent-1.1.0/local_coding_agent/__main__.py +5 -0
  6. local_coding_agent-1.1.0/local_coding_agent/acp_server/__init__.py +38 -0
  7. local_coding_agent-1.1.0/local_coding_agent/acp_server/_codec.py +95 -0
  8. local_coding_agent-1.1.0/local_coding_agent/acp_server/_protocol.py +13 -0
  9. local_coding_agent-1.1.0/local_coding_agent/acp_server/_server.py +663 -0
  10. local_coding_agent-1.1.0/local_coding_agent/acp_server/_session.py +24 -0
  11. local_coding_agent-1.1.0/local_coding_agent/acp_server/_tools.py +126 -0
  12. local_coding_agent-1.1.0/local_coding_agent/ast_compactor.py +130 -0
  13. local_coding_agent-1.1.0/local_coding_agent/atomizer.py +77 -0
  14. local_coding_agent-1.1.0/local_coding_agent/benchmark/__init__.py +57 -0
  15. local_coding_agent-1.1.0/local_coding_agent/benchmark/_cases.py +307 -0
  16. local_coding_agent-1.1.0/local_coding_agent/benchmark/_judge.py +175 -0
  17. local_coding_agent-1.1.0/local_coding_agent/benchmark/_oracles.py +157 -0
  18. local_coding_agent-1.1.0/local_coding_agent/benchmark/_runner.py +259 -0
  19. local_coding_agent-1.1.0/local_coding_agent/benchmark/_stats.py +22 -0
  20. local_coding_agent-1.1.0/local_coding_agent/benchmark/_summary.py +143 -0
  21. local_coding_agent-1.1.0/local_coding_agent/benchmark_oracle_worker.py +169 -0
  22. local_coding_agent-1.1.0/local_coding_agent/calibration.py +154 -0
  23. local_coding_agent-1.1.0/local_coding_agent/capability.py +450 -0
  24. local_coding_agent-1.1.0/local_coding_agent/chat_compaction.py +276 -0
  25. local_coding_agent-1.1.0/local_coding_agent/cli/__init__.py +12 -0
  26. local_coding_agent-1.1.0/local_coding_agent/cli/_dispatch.py +377 -0
  27. local_coding_agent-1.1.0/local_coding_agent/cli/_handlers.py +320 -0
  28. local_coding_agent-1.1.0/local_coding_agent/cli/_handlers2.py +725 -0
  29. local_coding_agent-1.1.0/local_coding_agent/cli/_input.py +61 -0
  30. local_coding_agent-1.1.0/local_coding_agent/cli/_main.py +159 -0
  31. local_coding_agent-1.1.0/local_coding_agent/cli/_parser.py +327 -0
  32. local_coding_agent-1.1.0/local_coding_agent/context_manager.py +155 -0
  33. local_coding_agent-1.1.0/local_coding_agent/controller/__init__.py +18 -0
  34. local_coding_agent-1.1.0/local_coding_agent/controller/_constants.py +108 -0
  35. local_coding_agent-1.1.0/local_coding_agent/controller/_controller.py +1008 -0
  36. local_coding_agent-1.1.0/local_coding_agent/controller/_post_apply.py +216 -0
  37. local_coding_agent-1.1.0/local_coding_agent/delegator.py +180 -0
  38. local_coding_agent-1.1.0/local_coding_agent/desktop/__init__.py +8 -0
  39. local_coding_agent-1.1.0/local_coding_agent/desktop/app.py +100 -0
  40. local_coding_agent-1.1.0/local_coding_agent/desktop/assets/lucide.min.js +12 -0
  41. local_coding_agent-1.1.0/local_coding_agent/desktop/assets/tailwind.css +1 -0
  42. local_coding_agent-1.1.0/local_coding_agent/desktop/client_js.py +1271 -0
  43. local_coding_agent-1.1.0/local_coding_agent/desktop/components.py +555 -0
  44. local_coding_agent-1.1.0/local_coding_agent/desktop/server/__init__.py +37 -0
  45. local_coding_agent-1.1.0/local_coding_agent/desktop/server/_handlers.py +2178 -0
  46. local_coding_agent-1.1.0/local_coding_agent/desktop/server/_models.py +204 -0
  47. local_coding_agent-1.1.0/local_coding_agent/desktop/server/_server.py +347 -0
  48. local_coding_agent-1.1.0/local_coding_agent/desktop/server/_telemetry.py +87 -0
  49. local_coding_agent-1.1.0/local_coding_agent/desktop/styles.py +76 -0
  50. local_coding_agent-1.1.0/local_coding_agent/desktop/ui.py +53 -0
  51. local_coding_agent-1.1.0/local_coding_agent/doctor.py +413 -0
  52. local_coding_agent-1.1.0/local_coding_agent/hooks/__init__.py +19 -0
  53. local_coding_agent-1.1.0/local_coding_agent/hooks/_adapters.py +458 -0
  54. local_coding_agent-1.1.0/local_coding_agent/hooks/_bridge.py +346 -0
  55. local_coding_agent-1.1.0/local_coding_agent/hooks/_decision.py +26 -0
  56. local_coding_agent-1.1.0/local_coding_agent/lsp/__init__.py +60 -0
  57. local_coding_agent-1.1.0/local_coding_agent/lsp/_client.py +322 -0
  58. local_coding_agent-1.1.0/local_coding_agent/lsp/_fallback.py +297 -0
  59. local_coding_agent-1.1.0/local_coding_agent/lsp/_manager.py +173 -0
  60. local_coding_agent-1.1.0/local_coding_agent/lsp/_mock.py +200 -0
  61. local_coding_agent-1.1.0/local_coding_agent/lsp/_types.py +398 -0
  62. local_coding_agent-1.1.0/local_coding_agent/mcp_config.py +398 -0
  63. local_coding_agent-1.1.0/local_coding_agent/mcp_server.py +377 -0
  64. local_coding_agent-1.1.0/local_coding_agent/memory.py +140 -0
  65. local_coding_agent-1.1.0/local_coding_agent/mode_router.py +200 -0
  66. local_coding_agent-1.1.0/local_coding_agent/model_scanner.py +525 -0
  67. local_coding_agent-1.1.0/local_coding_agent/monitor.py +635 -0
  68. local_coding_agent-1.1.0/local_coding_agent/observation_policy.py +184 -0
  69. local_coding_agent-1.1.0/local_coding_agent/ollama_adapter.py +736 -0
  70. local_coding_agent-1.1.0/local_coding_agent/plan_mode.py +653 -0
  71. local_coding_agent-1.1.0/local_coding_agent/prescriptions.py +278 -0
  72. local_coding_agent-1.1.0/local_coding_agent/profiles.py +239 -0
  73. local_coding_agent-1.1.0/local_coding_agent/repository_tools.py +782 -0
  74. local_coding_agent-1.1.0/local_coding_agent/ripgrep.py +326 -0
  75. local_coding_agent-1.1.0/local_coding_agent/semantic_linter.py +122 -0
  76. local_coding_agent-1.1.0/local_coding_agent/service.py +405 -0
  77. local_coding_agent-1.1.0/local_coding_agent/session_events.py +684 -0
  78. local_coding_agent-1.1.0/local_coding_agent/session_query.py +578 -0
  79. local_coding_agent-1.1.0/local_coding_agent/skill_config.py +426 -0
  80. local_coding_agent-1.1.0/local_coding_agent/smoke.py +268 -0
  81. local_coding_agent-1.1.0/local_coding_agent/speculative_racing.py +85 -0
  82. local_coding_agent-1.1.0/local_coding_agent/spill.py +258 -0
  83. local_coding_agent-1.1.0/local_coding_agent/stats.py +255 -0
  84. local_coding_agent-1.1.0/local_coding_agent/stdio.py +132 -0
  85. local_coding_agent-1.1.0/local_coding_agent/subagent.py +516 -0
  86. local_coding_agent-1.1.0/local_coding_agent/task.py +90 -0
  87. local_coding_agent-1.1.0/local_coding_agent/task_store.py +142 -0
  88. local_coding_agent-1.1.0/local_coding_agent/tasks.py +240 -0
  89. local_coding_agent-1.1.0/local_coding_agent/terminal/__init__.py +35 -0
  90. local_coding_agent-1.1.0/local_coding_agent/terminal/_manager.py +156 -0
  91. local_coding_agent-1.1.0/local_coding_agent/terminal/_process.py +148 -0
  92. local_coding_agent-1.1.0/local_coding_agent/terminal/_session.py +452 -0
  93. local_coding_agent-1.1.0/local_coding_agent/terminal/_tools.py +233 -0
  94. local_coding_agent-1.1.0/local_coding_agent/terminal/_types.py +60 -0
  95. local_coding_agent-1.1.0/local_coding_agent/tool_call_parser.py +178 -0
  96. local_coding_agent-1.1.0/local_coding_agent/validators.py +563 -0
  97. local_coding_agent-1.1.0/local_coding_agent/vram_fit.py +240 -0
  98. local_coding_agent-1.1.0/local_coding_agent/worker_pool.py +516 -0
  99. local_coding_agent-1.1.0/local_coding_agent.egg-info/PKG-INFO +202 -0
  100. local_coding_agent-1.1.0/local_coding_agent.egg-info/SOURCES.txt +167 -0
  101. local_coding_agent-1.1.0/local_coding_agent.egg-info/dependency_links.txt +1 -0
  102. local_coding_agent-1.1.0/local_coding_agent.egg-info/entry_points.txt +3 -0
  103. local_coding_agent-1.1.0/local_coding_agent.egg-info/requires.txt +9 -0
  104. local_coding_agent-1.1.0/local_coding_agent.egg-info/top_level.txt +1 -0
  105. local_coding_agent-1.1.0/pyproject.toml +42 -0
  106. local_coding_agent-1.1.0/setup.cfg +4 -0
  107. local_coding_agent-1.1.0/tests/test_acp_server.py +698 -0
  108. local_coding_agent-1.1.0/tests/test_adversarial_session.py +468 -0
  109. local_coding_agent-1.1.0/tests/test_ast_compactor.py +87 -0
  110. local_coding_agent-1.1.0/tests/test_atomizer.py +192 -0
  111. local_coding_agent-1.1.0/tests/test_benchmark.py +481 -0
  112. local_coding_agent-1.1.0/tests/test_calibration.py +164 -0
  113. local_coding_agent-1.1.0/tests/test_capability.py +185 -0
  114. local_coding_agent-1.1.0/tests/test_chat_compaction.py +224 -0
  115. local_coding_agent-1.1.0/tests/test_cli.py +851 -0
  116. local_coding_agent-1.1.0/tests/test_context_manager.py +125 -0
  117. local_coding_agent-1.1.0/tests/test_controller.py +1712 -0
  118. local_coding_agent-1.1.0/tests/test_ctx_preflight.py +309 -0
  119. local_coding_agent-1.1.0/tests/test_delegator.py +120 -0
  120. local_coding_agent-1.1.0/tests/test_desktop_app.py +1754 -0
  121. local_coding_agent-1.1.0/tests/test_desktop_http_framing.py +202 -0
  122. local_coding_agent-1.1.0/tests/test_desktop_release_gate.py +545 -0
  123. local_coding_agent-1.1.0/tests/test_doctor.py +103 -0
  124. local_coding_agent-1.1.0/tests/test_doctor_fix.py +76 -0
  125. local_coding_agent-1.1.0/tests/test_e2e_functional_scenario.py +401 -0
  126. local_coding_agent-1.1.0/tests/test_edits.py +222 -0
  127. local_coding_agent-1.1.0/tests/test_hooks.py +340 -0
  128. local_coding_agent-1.1.0/tests/test_lsp.py +570 -0
  129. local_coding_agent-1.1.0/tests/test_mcp_config.py +331 -0
  130. local_coding_agent-1.1.0/tests/test_mcp_server.py +233 -0
  131. local_coding_agent-1.1.0/tests/test_mediated_apply.py +142 -0
  132. local_coding_agent-1.1.0/tests/test_memory_manager.py +132 -0
  133. local_coding_agent-1.1.0/tests/test_mode_router.py +278 -0
  134. local_coding_agent-1.1.0/tests/test_model_scanner.py +217 -0
  135. local_coding_agent-1.1.0/tests/test_monitor.py +89 -0
  136. local_coding_agent-1.1.0/tests/test_observation_policy.py +152 -0
  137. local_coding_agent-1.1.0/tests/test_ollama_adapter.py +365 -0
  138. local_coding_agent-1.1.0/tests/test_openai_adapter.py +524 -0
  139. local_coding_agent-1.1.0/tests/test_plan_mode.py +679 -0
  140. local_coding_agent-1.1.0/tests/test_prescriptions.py +112 -0
  141. local_coding_agent-1.1.0/tests/test_profiles.py +82 -0
  142. local_coding_agent-1.1.0/tests/test_progress_telemetry.py +44 -0
  143. local_coding_agent-1.1.0/tests/test_r30_adversarial.py +225 -0
  144. local_coding_agent-1.1.0/tests/test_repository_tools.py +513 -0
  145. local_coding_agent-1.1.0/tests/test_ripgrep.py +204 -0
  146. local_coding_agent-1.1.0/tests/test_semantic_linter.py +72 -0
  147. local_coding_agent-1.1.0/tests/test_service.py +605 -0
  148. local_coding_agent-1.1.0/tests/test_session_events.py +317 -0
  149. local_coding_agent-1.1.0/tests/test_session_query.py +262 -0
  150. local_coding_agent-1.1.0/tests/test_skill_config.py +81 -0
  151. local_coding_agent-1.1.0/tests/test_skill_parity.py +10 -0
  152. local_coding_agent-1.1.0/tests/test_smoke.py +54 -0
  153. local_coding_agent-1.1.0/tests/test_speculative_racing.py +50 -0
  154. local_coding_agent-1.1.0/tests/test_spill.py +157 -0
  155. local_coding_agent-1.1.0/tests/test_stats.py +112 -0
  156. local_coding_agent-1.1.0/tests/test_stdio.py +149 -0
  157. local_coding_agent-1.1.0/tests/test_subagent.py +250 -0
  158. local_coding_agent-1.1.0/tests/test_task.py +30 -0
  159. local_coding_agent-1.1.0/tests/test_task_store.py +178 -0
  160. local_coding_agent-1.1.0/tests/test_tasks.py +621 -0
  161. local_coding_agent-1.1.0/tests/test_telemetry.py +54 -0
  162. local_coding_agent-1.1.0/tests/test_terminal.py +520 -0
  163. local_coding_agent-1.1.0/tests/test_tool_call_parser.py +144 -0
  164. local_coding_agent-1.1.0/tests/test_ui_app.py +51 -0
  165. local_coding_agent-1.1.0/tests/test_ux_audit_fixes.py +99 -0
  166. local_coding_agent-1.1.0/tests/test_validators.py +249 -0
  167. local_coding_agent-1.1.0/tests/test_version_consistency.py +148 -0
  168. local_coding_agent-1.1.0/tests/test_vram_fit.py +280 -0
  169. local_coding_agent-1.1.0/tests/test_worker_pool.py +322 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Local Coding Agent Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,202 @@
1
+ Metadata-Version: 2.4
2
+ Name: local-coding-agent
3
+ Version: 1.1.0
4
+ Summary: Harness-agnostic controller delegating atomic coding tasks to local Ollama & llama.cpp models via MCP, Agent Skills, and direct CLI.
5
+ Author: Local Coding Agent Contributors
6
+ License: MIT
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Programming Language :: Python :: 3.10
9
+ Classifier: Programming Language :: Python :: 3.11
10
+ Classifier: Programming Language :: Python :: 3.12
11
+ Classifier: Programming Language :: Python :: 3.13
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Topic :: Software Development :: Code Generators
14
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
15
+ Requires-Python: >=3.10
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Provides-Extra: mcp
19
+ Requires-Dist: mcp==2.0.0; extra == "mcp"
20
+ Provides-Extra: dev
21
+ Requires-Dist: pytest; extra == "dev"
22
+ Provides-Extra: desktop
23
+ Requires-Dist: pywebview>=5.0.0; extra == "desktop"
24
+ Dynamic: license-file
25
+
26
+ # Local Coding Agent
27
+
28
+ Local execution and safety layer for delegating coding tasks from cloud agents to models on your own machine.
29
+
30
+ [![CI](https://github.com/pvnc228/local-coding-agent/actions/workflows/ci.yml/badge.svg)](https://github.com/pvnc228/local-coding-agent/actions/workflows/ci.yml)
31
+ [![Version](https://img.shields.io/badge/version-1.1.0-blue.svg)](pyproject.toml)
32
+ [![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/)
33
+ [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
34
+
35
+ ## What is Local Coding Agent?
36
+
37
+ Local Coding Agent lets a cloud coding agent delegate a narrow task to a local model without giving that model unrestricted access to your repository. Connect Codex, Claude Code, Cursor, Windsurf, Cline, OpenCode, Antigravity, or another compatible harness through MCP, the reusable Agent Skill, or the `local-agent` CLI. The cloud agent stays in charge of the larger task; Local Coding Agent supplies the controlled local execution path.
38
+
39
+ The calling agent sends a focused goal, a workspace, an allowlist of files, and checks. Your local model returns a proposal for review. The local model proposes; the controller verifies. A change is only reported as applied after the declared file scope held, the patch passed static analysis, and a real external test runner confirmed the configured checks. If a post-apply check fails, the change is rolled back and the rollback is itself verified against recorded file digests. The local model does not receive unrestricted shell or write access to your workspace.
40
+
41
+ Use the **Desktop Harness** when you want a Windows interface for local chat, model selection, sessions, task status, and change review. Use the **CLI** for terminals, scripts, CI, or direct integration with a coding harness. Both use the same controller and safety rules.
42
+
43
+ You keep control of Git and delivery. Local Coding Agent does not create commits, push branches, publish releases, or download a model on its own.
44
+
45
+ ### What the gate refuses
46
+
47
+ The same gate backs `apply_proposal`, `local-agent apply`, and the desktop apply action:
48
+
49
+ - A patch that touches a file outside the declared scope is rejected before the workspace is touched (`error.kind: patch_outside_scope`).
50
+ - An apply with no targeted check is refused — no external evidence, no apply (`error.kind: apply_requires_checks`).
51
+ - A patch that fails the post-apply checks is rolled back; the result is `"rejected"` with `error.kind: post_apply_check_failed`.
52
+ - A rollback that cannot be confirmed against the recorded baseline is reported as `workspace_modified: true` with `workspace_state: "unknown"` and risk kind `rollback_failed` — never as a clean restore.
53
+
54
+ ## Choose your download
55
+
56
+ ### Current public release: v1.0.4
57
+
58
+ Choose the CLI release for terminal workflows, scripts, CI, or integration with another AI coding environment. It provides the `local-agent` command, MCP server, Agent Skill, diagnostics, sessions, model tools, and task delegation.
59
+
60
+ [Download the CLI wheel](https://github.com/pvnc228/local-coding-agent/releases/download/v1.0.4/local_coding_agent-1.0.4-py3-none-any.whl) or [CLI source archive](https://github.com/pvnc228/local-coding-agent/releases/download/v1.0.4/local_coding_agent-1.0.4.tar.gz). Windows users can [download the Desktop Harness installer](https://github.com/pvnc228/local-coding-agent/releases/download/v1.0.4/Local.AI.Coding.Harness_1.0.4_x64-setup.exe) and verify the published files with [SHA256SUMS.txt](https://github.com/pvnc228/local-coding-agent/releases/download/v1.0.4/SHA256SUMS.txt).
61
+
62
+ The `v1.0.4` release contains the CLI archives and the Windows Desktop Harness installer. Local inference remains local; install [Ollama](https://ollama.com/) or run a compatible local model server before requesting live model responses.
63
+
64
+ ## Desktop Harness
65
+
66
+ Open the Harness, choose a workspace, select a local model, and start working. The desktop application brings the complete local coding workflow into one focused interface:
67
+
68
+ - Interactive Chat for questions, explanations, and everyday coding work.
69
+ - Chat, Build, Plan, and Auto modes for different kinds of requests.
70
+ - Delegated Tasks for handing a focused coding change to a local model.
71
+ - Workspace sessions so you can return to previous conversations and tasks.
72
+ - Model discovery, model profiles, context settings, hardware telemetry, and diagnostics.
73
+ - Clear status messages when the local backend is ready, unavailable, or needs attention.
74
+ - Reviewable code changes and checks before changes are applied.
75
+
76
+ The screenshots below show the application loading `qwen2.5-coder:7b` and returning a real response about the selected workspace.
77
+
78
+ <p align="center">
79
+ <img src="https://raw.githubusercontent.com/pvnc228/local-coding-agent/main/docs/screenshots/harness-interactive-chat.jpg" alt="Interactive Chat with a local model response" width="49%">
80
+ <img src="https://raw.githubusercontent.com/pvnc228/local-coding-agent/main/docs/screenshots/harness-working-inference.jpg" alt="Loaded local model and Harness response" width="49%">
81
+ </p>
82
+
83
+ ## CLI installation
84
+
85
+ Requirements:
86
+
87
+ - Python 3.10 or newer.
88
+ - Git on `PATH` for workspace operations.
89
+ - Ollama or an OpenAI-compatible local model server for live inference.
90
+
91
+ Install the CLI package:
92
+
93
+ ```bash
94
+ pipx install "local-coding-agent[mcp]"
95
+ ```
96
+
97
+ Or install from a checkout:
98
+
99
+ ```bash
100
+ git clone https://github.com/pvnc228/local-coding-agent.git
101
+ cd local-coding-agent
102
+ python -m pip install -e ".[mcp]"
103
+ ```
104
+
105
+ Check the installation:
106
+
107
+ ```bash
108
+ local-agent doctor
109
+ local-agent test-run --mock
110
+ ```
111
+
112
+ Add `--json` where supported when the output will be consumed by another tool.
113
+
114
+ ## Connect another AI coding agent
115
+
116
+ Local Coding Agent can provide its capabilities to other AI coding environments through MCP or an Agent Skill:
117
+
118
+ ```bash
119
+ local-agent init-mcp --auto --write
120
+ local-agent init-skill --write
121
+ ```
122
+
123
+ Start the MCP server manually when a client needs an explicit command:
124
+
125
+ ```bash
126
+ local-agent serve-mcp --workspace . --enable-tasks
127
+ ```
128
+
129
+ See [docs/MCP_INTEGRATION.md](docs/MCP_INTEGRATION.md) for client configuration examples and [skills/local-coding-agent/SKILL.md](skills/local-coding-agent/SKILL.md) for the reusable Agent Skill.
130
+
131
+ ## A typical coding request
132
+
133
+ 1. Choose a workspace and a local model.
134
+ 2. Ask a question or describe the change you want.
135
+ 3. Inspect the suggested code change in the application.
136
+ 4. Run the relevant checks and apply the change when it looks right.
137
+
138
+ The application keeps the workflow understandable: you can see what is being changed, which checks are being run, and whether the local backend is available. Commits, tags, pushes, and publishing remain under your control.
139
+
140
+ ## CLI commands
141
+
142
+ | Command | Purpose |
143
+ | --- | --- |
144
+ | `local-agent delegate` | Give a focused coding task to a local model. |
145
+ | `local-agent decompose` | Break a larger request into smaller coding tasks. |
146
+ | `local-agent apply` | Apply a reviewed change and run its checks. |
147
+ | `local-agent chat` | Run a prompt or a persistent chat session. |
148
+ | `local-agent sessions` | List or inspect saved sessions. |
149
+ | `local-agent profiles` | Inspect configured model profiles. |
150
+ | `local-agent memory` | Inspect model memory and VRAM settings. |
151
+ | `local-agent calibrate` | Calculate safe worker bounds for a VRAM budget. |
152
+ | `local-agent benchmark` | Run the local coding benchmark. |
153
+ | `local-agent doctor` | Diagnose Python, Git, Ollama, RAM, VRAM, and models. |
154
+ | `local-agent monitor` | Serve the local metrics dashboard. |
155
+ | `local-agent test-run --mock` | Run deterministic local workflow checks. |
156
+
157
+ Examples:
158
+
159
+ ```bash
160
+ local-agent chat "Explain what context_manager.py does"
161
+ local-agent chat --repl --session-id refactor-session
162
+ local-agent delegate --task task.json --model qwen2.5-coder:7b --json
163
+ local-agent apply --patch-file patch.diff --workspace . --file src/foo.py --check "pytest tests/"
164
+ local-agent monitor --port 8765
165
+ ```
166
+
167
+ Open `http://127.0.0.1:8765/dashboard` to view queue load, latency, tokens per second, and change records.
168
+
169
+ The CLI also exposes preview surfaces that are not part of the stable contract and may change without notice: `ui`/`app`, `lsp`, `serve-acp`, `skeletonize`, `lint-patch`, `scan-models`, `spill-read`, and `grep`. The stable, tested set is the table above plus `desktop`, `chat`, `serve-mcp`, `init-mcp`, and `init-skill`.
170
+
171
+ ## Field results & limitations
172
+
173
+ The published numbers come from a 20-task suite, so treat them as directional rather than settled:
174
+
175
+ - On that suite, `qwen3.8-27b-q4` scored 100.0% correctness with a 95% Wilson interval of [83.9%, 100.0%], and `qwen3-8b-q6k` scored 90.0% [69.9%, 97.2%]. The wide intervals are the small sample size, not a rounding artifact.
176
+ - Small models handle single-file work in this harness; cross-file coordination (Tier 3 in the capability ladder) needs the host agent to decompose the task into atomic envelopes first.
177
+ - Results are model and hardware specific. Reproduce them with `local-agent benchmark` before relying on any figure.
178
+
179
+ See [docs/BENCHMARK.md](docs/BENCHMARK.md) for the methodology and the full table.
180
+
181
+ ## Local models
182
+
183
+ Model profiles describe the provider, model, context window, generation limits, and keep-alive behavior. The Harness can discover installed Ollama models and local GGUF files, while the CLI exposes the same information for scripts and integrations.
184
+
185
+ ```bash
186
+ local-agent profiles list --json
187
+ local-agent memory status --json
188
+ ```
189
+
190
+ ## Documentation
191
+
192
+ - [Quickstart](docs/QUICKSTART.md)
193
+ - [MCP integration](docs/MCP_INTEGRATION.md)
194
+ - [Security policy](SECURITY.md)
195
+ - [Changelog](CHANGELOG.md)
196
+ - [Architecture reference](docs/ARCHITECTURE.md)
197
+ - [Protocol reference](docs/PROTOCOL.md)
198
+ - [Benchmark methodology](docs/BENCHMARK.md)
199
+
200
+ ## License
201
+
202
+ Local Coding Agent is distributed under the [MIT License](LICENSE).
@@ -0,0 +1,177 @@
1
+ # Local Coding Agent
2
+
3
+ Local execution and safety layer for delegating coding tasks from cloud agents to models on your own machine.
4
+
5
+ [![CI](https://github.com/pvnc228/local-coding-agent/actions/workflows/ci.yml/badge.svg)](https://github.com/pvnc228/local-coding-agent/actions/workflows/ci.yml)
6
+ [![Version](https://img.shields.io/badge/version-1.1.0-blue.svg)](pyproject.toml)
7
+ [![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/)
8
+ [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
9
+
10
+ ## What is Local Coding Agent?
11
+
12
+ Local Coding Agent lets a cloud coding agent delegate a narrow task to a local model without giving that model unrestricted access to your repository. Connect Codex, Claude Code, Cursor, Windsurf, Cline, OpenCode, Antigravity, or another compatible harness through MCP, the reusable Agent Skill, or the `local-agent` CLI. The cloud agent stays in charge of the larger task; Local Coding Agent supplies the controlled local execution path.
13
+
14
+ The calling agent sends a focused goal, a workspace, an allowlist of files, and checks. Your local model returns a proposal for review. The local model proposes; the controller verifies. A change is only reported as applied after the declared file scope held, the patch passed static analysis, and a real external test runner confirmed the configured checks. If a post-apply check fails, the change is rolled back and the rollback is itself verified against recorded file digests. The local model does not receive unrestricted shell or write access to your workspace.
15
+
16
+ Use the **Desktop Harness** when you want a Windows interface for local chat, model selection, sessions, task status, and change review. Use the **CLI** for terminals, scripts, CI, or direct integration with a coding harness. Both use the same controller and safety rules.
17
+
18
+ You keep control of Git and delivery. Local Coding Agent does not create commits, push branches, publish releases, or download a model on its own.
19
+
20
+ ### What the gate refuses
21
+
22
+ The same gate backs `apply_proposal`, `local-agent apply`, and the desktop apply action:
23
+
24
+ - A patch that touches a file outside the declared scope is rejected before the workspace is touched (`error.kind: patch_outside_scope`).
25
+ - An apply with no targeted check is refused — no external evidence, no apply (`error.kind: apply_requires_checks`).
26
+ - A patch that fails the post-apply checks is rolled back; the result is `"rejected"` with `error.kind: post_apply_check_failed`.
27
+ - A rollback that cannot be confirmed against the recorded baseline is reported as `workspace_modified: true` with `workspace_state: "unknown"` and risk kind `rollback_failed` — never as a clean restore.
28
+
29
+ ## Choose your download
30
+
31
+ ### Current public release: v1.0.4
32
+
33
+ Choose the CLI release for terminal workflows, scripts, CI, or integration with another AI coding environment. It provides the `local-agent` command, MCP server, Agent Skill, diagnostics, sessions, model tools, and task delegation.
34
+
35
+ [Download the CLI wheel](https://github.com/pvnc228/local-coding-agent/releases/download/v1.0.4/local_coding_agent-1.0.4-py3-none-any.whl) or [CLI source archive](https://github.com/pvnc228/local-coding-agent/releases/download/v1.0.4/local_coding_agent-1.0.4.tar.gz). Windows users can [download the Desktop Harness installer](https://github.com/pvnc228/local-coding-agent/releases/download/v1.0.4/Local.AI.Coding.Harness_1.0.4_x64-setup.exe) and verify the published files with [SHA256SUMS.txt](https://github.com/pvnc228/local-coding-agent/releases/download/v1.0.4/SHA256SUMS.txt).
36
+
37
+ The `v1.0.4` release contains the CLI archives and the Windows Desktop Harness installer. Local inference remains local; install [Ollama](https://ollama.com/) or run a compatible local model server before requesting live model responses.
38
+
39
+ ## Desktop Harness
40
+
41
+ Open the Harness, choose a workspace, select a local model, and start working. The desktop application brings the complete local coding workflow into one focused interface:
42
+
43
+ - Interactive Chat for questions, explanations, and everyday coding work.
44
+ - Chat, Build, Plan, and Auto modes for different kinds of requests.
45
+ - Delegated Tasks for handing a focused coding change to a local model.
46
+ - Workspace sessions so you can return to previous conversations and tasks.
47
+ - Model discovery, model profiles, context settings, hardware telemetry, and diagnostics.
48
+ - Clear status messages when the local backend is ready, unavailable, or needs attention.
49
+ - Reviewable code changes and checks before changes are applied.
50
+
51
+ The screenshots below show the application loading `qwen2.5-coder:7b` and returning a real response about the selected workspace.
52
+
53
+ <p align="center">
54
+ <img src="https://raw.githubusercontent.com/pvnc228/local-coding-agent/main/docs/screenshots/harness-interactive-chat.jpg" alt="Interactive Chat with a local model response" width="49%">
55
+ <img src="https://raw.githubusercontent.com/pvnc228/local-coding-agent/main/docs/screenshots/harness-working-inference.jpg" alt="Loaded local model and Harness response" width="49%">
56
+ </p>
57
+
58
+ ## CLI installation
59
+
60
+ Requirements:
61
+
62
+ - Python 3.10 or newer.
63
+ - Git on `PATH` for workspace operations.
64
+ - Ollama or an OpenAI-compatible local model server for live inference.
65
+
66
+ Install the CLI package:
67
+
68
+ ```bash
69
+ pipx install "local-coding-agent[mcp]"
70
+ ```
71
+
72
+ Or install from a checkout:
73
+
74
+ ```bash
75
+ git clone https://github.com/pvnc228/local-coding-agent.git
76
+ cd local-coding-agent
77
+ python -m pip install -e ".[mcp]"
78
+ ```
79
+
80
+ Check the installation:
81
+
82
+ ```bash
83
+ local-agent doctor
84
+ local-agent test-run --mock
85
+ ```
86
+
87
+ Add `--json` where supported when the output will be consumed by another tool.
88
+
89
+ ## Connect another AI coding agent
90
+
91
+ Local Coding Agent can provide its capabilities to other AI coding environments through MCP or an Agent Skill:
92
+
93
+ ```bash
94
+ local-agent init-mcp --auto --write
95
+ local-agent init-skill --write
96
+ ```
97
+
98
+ Start the MCP server manually when a client needs an explicit command:
99
+
100
+ ```bash
101
+ local-agent serve-mcp --workspace . --enable-tasks
102
+ ```
103
+
104
+ See [docs/MCP_INTEGRATION.md](docs/MCP_INTEGRATION.md) for client configuration examples and [skills/local-coding-agent/SKILL.md](skills/local-coding-agent/SKILL.md) for the reusable Agent Skill.
105
+
106
+ ## A typical coding request
107
+
108
+ 1. Choose a workspace and a local model.
109
+ 2. Ask a question or describe the change you want.
110
+ 3. Inspect the suggested code change in the application.
111
+ 4. Run the relevant checks and apply the change when it looks right.
112
+
113
+ The application keeps the workflow understandable: you can see what is being changed, which checks are being run, and whether the local backend is available. Commits, tags, pushes, and publishing remain under your control.
114
+
115
+ ## CLI commands
116
+
117
+ | Command | Purpose |
118
+ | --- | --- |
119
+ | `local-agent delegate` | Give a focused coding task to a local model. |
120
+ | `local-agent decompose` | Break a larger request into smaller coding tasks. |
121
+ | `local-agent apply` | Apply a reviewed change and run its checks. |
122
+ | `local-agent chat` | Run a prompt or a persistent chat session. |
123
+ | `local-agent sessions` | List or inspect saved sessions. |
124
+ | `local-agent profiles` | Inspect configured model profiles. |
125
+ | `local-agent memory` | Inspect model memory and VRAM settings. |
126
+ | `local-agent calibrate` | Calculate safe worker bounds for a VRAM budget. |
127
+ | `local-agent benchmark` | Run the local coding benchmark. |
128
+ | `local-agent doctor` | Diagnose Python, Git, Ollama, RAM, VRAM, and models. |
129
+ | `local-agent monitor` | Serve the local metrics dashboard. |
130
+ | `local-agent test-run --mock` | Run deterministic local workflow checks. |
131
+
132
+ Examples:
133
+
134
+ ```bash
135
+ local-agent chat "Explain what context_manager.py does"
136
+ local-agent chat --repl --session-id refactor-session
137
+ local-agent delegate --task task.json --model qwen2.5-coder:7b --json
138
+ local-agent apply --patch-file patch.diff --workspace . --file src/foo.py --check "pytest tests/"
139
+ local-agent monitor --port 8765
140
+ ```
141
+
142
+ Open `http://127.0.0.1:8765/dashboard` to view queue load, latency, tokens per second, and change records.
143
+
144
+ The CLI also exposes preview surfaces that are not part of the stable contract and may change without notice: `ui`/`app`, `lsp`, `serve-acp`, `skeletonize`, `lint-patch`, `scan-models`, `spill-read`, and `grep`. The stable, tested set is the table above plus `desktop`, `chat`, `serve-mcp`, `init-mcp`, and `init-skill`.
145
+
146
+ ## Field results & limitations
147
+
148
+ The published numbers come from a 20-task suite, so treat them as directional rather than settled:
149
+
150
+ - On that suite, `qwen3.8-27b-q4` scored 100.0% correctness with a 95% Wilson interval of [83.9%, 100.0%], and `qwen3-8b-q6k` scored 90.0% [69.9%, 97.2%]. The wide intervals are the small sample size, not a rounding artifact.
151
+ - Small models handle single-file work in this harness; cross-file coordination (Tier 3 in the capability ladder) needs the host agent to decompose the task into atomic envelopes first.
152
+ - Results are model and hardware specific. Reproduce them with `local-agent benchmark` before relying on any figure.
153
+
154
+ See [docs/BENCHMARK.md](docs/BENCHMARK.md) for the methodology and the full table.
155
+
156
+ ## Local models
157
+
158
+ Model profiles describe the provider, model, context window, generation limits, and keep-alive behavior. The Harness can discover installed Ollama models and local GGUF files, while the CLI exposes the same information for scripts and integrations.
159
+
160
+ ```bash
161
+ local-agent profiles list --json
162
+ local-agent memory status --json
163
+ ```
164
+
165
+ ## Documentation
166
+
167
+ - [Quickstart](docs/QUICKSTART.md)
168
+ - [MCP integration](docs/MCP_INTEGRATION.md)
169
+ - [Security policy](SECURITY.md)
170
+ - [Changelog](CHANGELOG.md)
171
+ - [Architecture reference](docs/ARCHITECTURE.md)
172
+ - [Protocol reference](docs/PROTOCOL.md)
173
+ - [Benchmark methodology](docs/BENCHMARK.md)
174
+
175
+ ## License
176
+
177
+ Local Coding Agent is distributed under the [MIT License](LICENSE).