coder-agent 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. coder_agent-0.1.0.dist-info/METADATA +262 -0
  2. coder_agent-0.1.0.dist-info/RECORD +163 -0
  3. coder_agent-0.1.0.dist-info/WHEEL +5 -0
  4. coder_agent-0.1.0.dist-info/entry_points.txt +2 -0
  5. coder_agent-0.1.0.dist-info/licenses/LICENSE.md +21 -0
  6. coder_agent-0.1.0.dist-info/top_level.txt +1 -0
  7. coderagent/__init__.py +20 -0
  8. coderagent/compat/__init__.py +27 -0
  9. coderagent/compat/cache_control.py +69 -0
  10. coderagent/compat/config_spec.py +60 -0
  11. coderagent/compat/exceptions.py +20 -0
  12. coderagent/compat/retry.py +27 -0
  13. coderagent/compat/serialize.py +31 -0
  14. coderagent/config/__init__.py +1 -0
  15. coderagent/config/defaults.yaml +103 -0
  16. coderagent/config/loader.py +264 -0
  17. coderagent/config/schema.py +548 -0
  18. coderagent/config/writer.py +218 -0
  19. coderagent/core/__init__.py +1 -0
  20. coderagent/core/budget.py +47 -0
  21. coderagent/core/capabilities.py +136 -0
  22. coderagent/core/checkpoint.py +164 -0
  23. coderagent/core/content.py +156 -0
  24. coderagent/core/context.py +618 -0
  25. coderagent/core/events.py +83 -0
  26. coderagent/core/history.py +56 -0
  27. coderagent/core/instructions.py +99 -0
  28. coderagent/core/loop.py +702 -0
  29. coderagent/core/memory.py +56 -0
  30. coderagent/core/mentions.py +81 -0
  31. coderagent/core/os_sandbox.py +191 -0
  32. coderagent/core/otel.py +214 -0
  33. coderagent/core/protocols.py +38 -0
  34. coderagent/core/redact.py +49 -0
  35. coderagent/core/sandbox.py +82 -0
  36. coderagent/core/schema.py +107 -0
  37. coderagent/core/session.py +344 -0
  38. coderagent/core/shell_env.py +74 -0
  39. coderagent/core/subagent.py +474 -0
  40. coderagent/core/summarize.py +312 -0
  41. coderagent/core/telemetry.py +209 -0
  42. coderagent/core/tokens.py +132 -0
  43. coderagent/core/trust.py +301 -0
  44. coderagent/environments/__init__.py +11 -0
  45. coderagent/environments/bubblewrap.py +150 -0
  46. coderagent/environments/contree.py +146 -0
  47. coderagent/environments/docker.py +160 -0
  48. coderagent/environments/local.py +110 -0
  49. coderagent/environments/singularity.py +138 -0
  50. coderagent/environments/swerex_docker.py +79 -0
  51. coderagent/environments/swerex_modal.py +123 -0
  52. coderagent/eval/__init__.py +1 -0
  53. coderagent/eval/compare.py +190 -0
  54. coderagent/eval/report.py +141 -0
  55. coderagent/eval/runner.py +368 -0
  56. coderagent/eval/task.py +194 -0
  57. coderagent/extensions/__init__.py +1 -0
  58. coderagent/extensions/hooks.py +121 -0
  59. coderagent/extensions/plugins.py +217 -0
  60. coderagent/extensions/reflect.py +342 -0
  61. coderagent/models/__init__.py +33 -0
  62. coderagent/models/backends.py +218 -0
  63. coderagent/models/call.py +18 -0
  64. coderagent/models/check.py +139 -0
  65. coderagent/models/gateway.py +60 -0
  66. coderagent/models/litellm_config.py +70 -0
  67. coderagent/models/provider.py +98 -0
  68. coderagent/models/reasoning.py +28 -0
  69. coderagent/models/router.py +136 -0
  70. coderagent/models/settings.py +172 -0
  71. coderagent/models/streaming.py +122 -0
  72. coderagent/models/verbosity.py +14 -0
  73. coderagent/paths.py +31 -0
  74. coderagent/run.py +454 -0
  75. coderagent/skills/__init__.py +119 -0
  76. coderagent/skills/errors.py +11 -0
  77. coderagent/skills/install.py +340 -0
  78. coderagent/skills/presets/code-review/SKILL.md +35 -0
  79. coderagent/skills/presets/codebase-onboarding/SKILL.md +33 -0
  80. coderagent/skills/presets/data-analysis/SKILL.md +35 -0
  81. coderagent/skills/presets/deep-research/SKILL.md +38 -0
  82. coderagent/skills/presets/frontend-dev/SKILL.md +32 -0
  83. coderagent/skills/presets/long-document/SKILL.md +37 -0
  84. coderagent/skills/presets/long-document/scripts/pdf_text.py +37 -0
  85. coderagent/skills/presets/office-docx/SKILL.md +36 -0
  86. coderagent/skills/presets/office-docx/scripts/docx_text.py +36 -0
  87. coderagent/skills/presets/office-pptx/SKILL.md +32 -0
  88. coderagent/skills/presets/office-xlsx/SKILL.md +34 -0
  89. coderagent/skills/presets/office-xlsx/scripts/xlsx_text.py +72 -0
  90. coderagent/skills/presets/writing/SKILL.md +31 -0
  91. coderagent/skills/sandbox.py +269 -0
  92. coderagent/skills/sites.py +177 -0
  93. coderagent/skills/source.py +404 -0
  94. coderagent/testing/__init__.py +5 -0
  95. coderagent/testing/factory.py +59 -0
  96. coderagent/testing/scripted_model.py +54 -0
  97. coderagent/tools/__init__.py +1 -0
  98. coderagent/tools/base.py +54 -0
  99. coderagent/tools/bash_policy.py +486 -0
  100. coderagent/tools/builtin/__init__.py +35 -0
  101. coderagent/tools/builtin/fs.py +283 -0
  102. coderagent/tools/builtin/patch.py +279 -0
  103. coderagent/tools/builtin/search.py +242 -0
  104. coderagent/tools/builtin/shell.py +336 -0
  105. coderagent/tools/builtin/skill.py +41 -0
  106. coderagent/tools/builtin/task.py +53 -0
  107. coderagent/tools/builtin/todo.py +63 -0
  108. coderagent/tools/executor.py +243 -0
  109. coderagent/tools/mcp.py +317 -0
  110. coderagent/tools/permissions.py +472 -0
  111. coderagent/tools/registry.py +83 -0
  112. coderagent/tools/rules.py +138 -0
  113. coderagent/ui/__init__.py +1 -0
  114. coderagent/ui/cli.py +498 -0
  115. coderagent/ui/commands/__init__.py +109 -0
  116. coderagent/ui/commands/builtin.py +778 -0
  117. coderagent/ui/commands/compact.py +12 -0
  118. coderagent/ui/commands/resume.py +26 -0
  119. coderagent/ui/commands/review.py +73 -0
  120. coderagent/ui/commands/rewind.py +28 -0
  121. coderagent/ui/custom_commands.py +179 -0
  122. coderagent/ui/notify.py +46 -0
  123. coderagent/ui/open_file.py +48 -0
  124. coderagent/ui/render.py +62 -0
  125. coderagent/ui/spinner.py +68 -0
  126. coderagent/ui/tui.py +610 -0
  127. coderagent/ui/widgets/__init__.py +29 -0
  128. coderagent/ui/widgets/approval_prompt.py +129 -0
  129. coderagent/ui/widgets/diff_view.py +97 -0
  130. coderagent/ui/widgets/file_tree.py +105 -0
  131. coderagent/ui/widgets/markdown_message.py +44 -0
  132. coderagent/ui/widgets/markup.py +10 -0
  133. coderagent/ui/widgets/message_block.py +61 -0
  134. coderagent/ui/widgets/path_suggester.py +66 -0
  135. coderagent/ui/widgets/session_picker.py +49 -0
  136. coderagent/ui/widgets/status_bar.py +44 -0
  137. coderagent/ui/widgets/todo_panel.py +40 -0
  138. coderagent/ui/widgets/tool_card.py +104 -0
  139. coderagent/ui/widgets/working_dots.py +26 -0
  140. coderagent/version.py +7 -0
  141. coderagent/web/__init__.py +5 -0
  142. coderagent/web/api.py +449 -0
  143. coderagent/web/app.py +113 -0
  144. coderagent/web/approver.py +73 -0
  145. coderagent/web/config_api.py +53 -0
  146. coderagent/web/events.py +159 -0
  147. coderagent/web/files.py +115 -0
  148. coderagent/web/i18n.py +346 -0
  149. coderagent/web/server.py +100 -0
  150. coderagent/web/sessions.py +404 -0
  151. coderagent/web/skills_api.py +376 -0
  152. coderagent/web/static/app.css +283 -0
  153. coderagent/web/static/app.js +1466 -0
  154. coderagent/web/templates/en/base.html +31 -0
  155. coderagent/web/templates/en/chat.html +60 -0
  156. coderagent/web/templates/en/macros.html +9 -0
  157. coderagent/web/templates/en/settings.html +80 -0
  158. coderagent/web/templates/en/skills.html +64 -0
  159. coderagent/web/templates/zh/base.html +31 -0
  160. coderagent/web/templates/zh/chat.html +60 -0
  161. coderagent/web/templates/zh/macros.html +9 -0
  162. coderagent/web/templates/zh/settings.html +77 -0
  163. coderagent/web/templates/zh/skills.html +61 -0
@@ -0,0 +1,262 @@
1
+ Metadata-Version: 2.4
2
+ Name: coder-agent
3
+ Version: 0.1.0
4
+ Summary: A coding agent for the terminal, for the browser and as a library
5
+ Author-email: sailor <sds819@126.com>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2025 Kilian A. Lieret and Carlos E. Jimenez
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+ Project-URL: Homepage, https://github.com/sds819/coder-agent
28
+ Project-URL: Repository, https://github.com/sds819/coder-agent
29
+ Project-URL: Bug Tracker, https://github.com/sds819/coder-agent/issues
30
+ Project-URL: Documentation, https://sds819.github.io/coder-agent/latest/
31
+ Keywords: nlp,agents,code,coding-agent
32
+ Classifier: Development Status :: 3 - Alpha
33
+ Classifier: Operating System :: OS Independent
34
+ Classifier: Intended Audience :: Developers
35
+ Classifier: License :: OSI Approved :: MIT License
36
+ Classifier: Programming Language :: Python :: 3.10
37
+ Classifier: Programming Language :: Python :: 3 :: Only
38
+ Requires-Python: >=3.10
39
+ Description-Content-Type: text/markdown
40
+ License-File: LICENSE.md
41
+ Requires-Dist: pyyaml
42
+ Requires-Dist: requests
43
+ Requires-Dist: jinja2
44
+ Requires-Dist: pydantic>=2.0
45
+ Requires-Dist: litellm!=1.82.7,!=1.82.8,>=1.75.5
46
+ Requires-Dist: tenacity
47
+ Requires-Dist: rich
48
+ Requires-Dist: python-dotenv
49
+ Requires-Dist: typer
50
+ Requires-Dist: platformdirs
51
+ Requires-Dist: textual
52
+ Requires-Dist: fastapi>=0.115
53
+ Provides-Extra: full
54
+ Requires-Dist: coder-agent[dev]; extra == "full"
55
+ Requires-Dist: coder-agent[sandbox]; extra == "full"
56
+ Requires-Dist: coder-agent[mcp]; extra == "full"
57
+ Provides-Extra: sandbox
58
+ Requires-Dist: swe-rex>=1.4.0; extra == "sandbox"
59
+ Requires-Dist: modal; extra == "sandbox"
60
+ Requires-Dist: boto3; extra == "sandbox"
61
+ Requires-Dist: contree-sdk<0.3,>=0.2.0; extra == "sandbox"
62
+ Provides-Extra: dev
63
+ Requires-Dist: pytest; extra == "dev"
64
+ Requires-Dist: pytest-cov; extra == "dev"
65
+ Requires-Dist: pytest-asyncio; extra == "dev"
66
+ Requires-Dist: pytest-xdist; extra == "dev"
67
+ Requires-Dist: pre-commit; extra == "dev"
68
+ Requires-Dist: ruff; extra == "dev"
69
+ Requires-Dist: mkdocs-include-markdown-plugin; extra == "dev"
70
+ Requires-Dist: mkdocstrings[python]>=0.18; extra == "dev"
71
+ Requires-Dist: mike; extra == "dev"
72
+ Requires-Dist: mkdocs-material; extra == "dev"
73
+ Requires-Dist: mkdocs-glightbox; extra == "dev"
74
+ Requires-Dist: mkdocs-redirects; extra == "dev"
75
+ Requires-Dist: coder-agent[sandbox]; extra == "dev"
76
+ Requires-Dist: uvicorn>=0.30; extra == "dev"
77
+ Requires-Dist: jinja2>=3.1.5; extra == "dev"
78
+ Requires-Dist: httpx>=0.27; extra == "dev"
79
+ Provides-Extra: web
80
+ Requires-Dist: uvicorn>=0.30; extra == "web"
81
+ Requires-Dist: jinja2>=3.1.5; extra == "web"
82
+ Provides-Extra: mcp
83
+ Requires-Dist: mcp>=2.0.0; extra == "mcp"
84
+ Dynamic: license-file
85
+
86
+ # The coding agent
87
+
88
+ > 中文版:[README_zh.md](https://github.com/sds819/coder-agent/blob/main/README_zh.md)
89
+
90
+ [![Docs](https://img.shields.io/badge/Docs-green?style=for-the-badge&logo=materialformkdocs&logoColor=white)](https://github.com/sds819/coder-agent/tree/main/docs)
91
+
92
+ `coder` is an interactive coding agent: it reads the code, writes the code, runs
93
+ the commands and tells you what it changed. It runs in the terminal **and** in
94
+ the browser, and it is a library too.
95
+
96
+ ```bash
97
+ pip install coder-agent
98
+ cd my-project
99
+
100
+ coder # the terminal interface
101
+ coder web # the same agent in the browser
102
+ coder eval path/to/suite # run a task suite against the agent
103
+ ```
104
+
105
+ The package is on PyPI. To follow the repository instead:
106
+ `pip install "coder-agent @ git+https://github.com/sds819/coder-agent"`.
107
+
108
+ ## What it does
109
+
110
+ **Tools.** Fourteen built-ins: `read`, `write`, `edit`, `multi_edit` and `apply_patch` to change
111
+ files; `glob`, `grep` and `ls` to find code; `bash`, `bash_output` and `bash_kill` to run commands
112
+ (also in the background); `todo_write` to keep a task list; `task` to spawn a sub agent; `skill`
113
+ to load a skill.
114
+
115
+ **Permissions.** Five modes: `default` (everything that changes something asks), `acceptEdits`
116
+ (writes pass, the rest still asks), `plan` and `readonly` (nothing is changed) and `bypass`
117
+ (nothing asks). Rules live in `~/.coderagent/rules.yaml` (yours) and `.coderagent/rules.yaml`
118
+ (the project's); a `deny` always wins over an `allow`.
119
+
120
+ **Sessions.** Every session has an event log, so it can be resumed (`coder --resume`), forked
121
+ (`/fork`), rewound (`/rewind`) and exported (`coder export`). The trace of a session can be sent to
122
+ an OpenTelemetry collector. A session started in the browser can be continued in the terminal, and
123
+ the other way round.
124
+
125
+ **Context.** The conversation is compacted when it reaches 80% of the budget; the summary keeps
126
+ the goal, the findings, the decisions, the files that were touched and the open questions. Before
127
+ a round ends, three gates are checked in order: a `Stop` hook, the `verify.commands` of the
128
+ project, and the output schema.
129
+
130
+ **Memory.** The project writes `.coderagent/memory/*.md`, your own preferences live in
131
+ `~/.coderagent/CLAUDE.md`, and `/init` writes an `AGENTS.md` for the repository.
132
+
133
+ **Subagents and routing.** `task` spawns a sub agent (`code-explorer`, `verifier`, `refactorer`
134
+ and your own). Different jobs can use different models: `main`, `cheap`, `strong`, `summarize`,
135
+ `reflect` and `review`.
136
+
137
+ **Extensions.** Hooks on nine events (`PreToolUse`, `PostToolUse`, `UserPromptSubmit`, `Stop`,
138
+ `SessionStart`, `SessionEnd`, `SubagentStop`, `PreCompact`, `PostCompact`), MCP servers, plugins,
139
+ skills and custom slash commands.
140
+
141
+ **Sandboxes.** The commands can run in `local`, `docker`, `singularity`, `bubblewrap`, `contree`
142
+ or SWE-ReX (`swerex_docker`, `swerex_modal`).
143
+
144
+ **35 slash commands** in the terminal (`/model`, `/mode`, `/plan`, `/review`, `/diff`, `/cost`,
145
+ `/context`, `/compact`, `/resume`, `/fork`, `/agents`, `/permissions`, `/hooks`, `/sandbox`, …)
146
+ — the same set in the browser.
147
+
148
+ **The web interface.** `coder web` serves a chat page, a settings page (model and permissions as
149
+ forms), a file tree and the diffs of the session. Every action is a plain HTTP call, so the
150
+ browser can be driven by a script too; the API docs are at `/api/docs`.
151
+
152
+ **Evaluation.** `coder eval <suite>` runs a task suite against the agent and reports what the
153
+ agent did with every task; `coder eval-compare` diffs two reports and names the regressions.
154
+
155
+ > [!WARNING]
156
+ > The browser interface has **no authentication**: everybody who can reach the port can drive the agent and run
157
+ > shell commands in the working directory. Keep it on `127.0.0.1`.
158
+
159
+ ## The model
160
+
161
+ The models go through [litellm](https://github.com/BerriAI/litellm), so every model that litellm
162
+ supports works — with the name of the provider in front of it (`anthropic/…`, `deepseek/…`). The
163
+ key of the provider is read from the environment (`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, …) or
164
+ from `~/.coderagent/.env`.
165
+
166
+ ```bash
167
+ coder -m deepseek/deepseek-flash --task "fix the failing test"
168
+ ```
169
+
170
+ The model is configured in the terminal, in the terminal interface and in the browser. All three
171
+ write the same file, `~/.coderagent/config.yaml`:
172
+
173
+ ```bash
174
+ coder model # show the settings in effect
175
+ coder model --name deepseek/deepseek-flash --max-retries 3 # write them down
176
+ coder model --test # try the model out
177
+ ```
178
+
179
+ The try-out and the writing are two steps: `--test` never writes anything, and the writing never
180
+ waits for the try-out — a configuration that does not work yet is worth writing down, to be fixed
181
+ later. The terminal interface has the same three steps (`/model name=… base=… key=… retries=…`,
182
+ `/model --test`, `/model --save`), and the settings page of the browser has a **Test** button next
183
+ to **Save**.
184
+
185
+ **Pictures.** When a picture is sent to a model nobody knows anything about, the agent asks it
186
+ once — with a picture of one color and the question what color it is — and writes the answer to
187
+ your own configuration file. The next time the configuration says it, and the model is never asked
188
+ again. A model that cannot take pictures is refused the turn, instead of making up an answer.
189
+
190
+ ## Read more
191
+
192
+ In `docs/usage`:
193
+
194
+ * [Quick start](docs/usage/coderagent_quickstart.md) — install it, set the model, run the first round (中文)
195
+ * [Everything `coder` can do](docs/usage/coderagent_features.md) — one page, every feature, with the errors you may hit
196
+ * [The web interface](docs/usage/coderagent_web.md) — the chat page, the settings page, the HTTP API, the security model
197
+ * [The commands](docs/usage/coderagent_commands.md) — every slash command
198
+ * [Sub agents](docs/usage/coderagent_subagents.md) — sub agents and their own models
199
+ * [Hooks](docs/usage/coderagent_hooks.md) — hooks on nine events
200
+ * [The sandbox](docs/usage/coderagent_sandbox.md) — where the commands run
201
+ * [The eval harness](docs/usage/coderagent_eval.md) — task suites, reports, comparisons
202
+ * [Model routing](docs/usage/coderagent_routing.md) — which model does which job
203
+ * [Memory](docs/usage/coderagent_memory.md) — project memory and your preferences
204
+ * [Skills](docs/usage/coderagent_skills.md) — the skills the agent may load
205
+ * [Plugins](docs/usage/coderagent_plugins.md) — the plugins that extend it
206
+ * [MCP servers](docs/usage/coderagent_mcp.md) — the tools other servers bring
207
+ * [The trace of a session](docs/usage/coderagent_export.md) — export the trace, send it to a collector
208
+
209
+ And if you want to know how it was designed, see `docs/design`:
210
+
211
+ * [The architecture](docs/design/coding-agent-architecture.md) — the layers, the modules, the interfaces, the key decisions
212
+ * [The design logic](docs/design/coderagent-design-logic.md) — why it grew this way: the load-bearing decisions, the invariants, the trade-offs
213
+ * [The questions and their answers](docs/design/coderagent-answers.md) — 41 questions about the agent, answered
214
+
215
+ ## Questions
216
+
217
+ * **Something is broken.** [Open a bug report](https://github.com/sds819/coder-agent/issues/new/choose) — the
218
+ template asks for the error message and how to reproduce it. The log of the last session is in
219
+ `~/.coderagent/sessions` (`coder export` writes it out).
220
+ * **An error you do not understand.** [Everything `coder` can do](docs/usage/coderagent_features.md) has a
221
+ "When something goes wrong" section for every part of the agent.
222
+ * **A question.** [Open a question](https://github.com/sds819/coder-agent/issues/new/choose) or ask on
223
+ [Discord](https://discord.gg/AVEFbBn2rH).
224
+
225
+ <a id="chinese"></a>
226
+
227
+ ### 中文
228
+
229
+ 这份 README 有中文版,文档也有中文的:
230
+
231
+ * [中文版 README](https://github.com/sds819/coder-agent/blob/main/README_zh.md)——整篇中文的这份介绍
232
+ * [快速开始](docs/usage/coderagent_quickstart.md)——装上、配置模型、跑第一轮
233
+ * [功能](docs/usage/coderagent_features_zh.md)——一页看完所有功能,外加你可能撞到的报错
234
+ * [网页版](docs/usage/coderagent_web_zh.md)——聊天页、设置页、HTTP API、安全模型
235
+ * [命令](docs/usage/coderagent_commands_zh.md)——全部 slash 命令
236
+ * [子 agent](docs/usage/coderagent_subagents_zh.md)——子 agent 和模型路由
237
+ * [Hooks](docs/usage/coderagent_hooks_zh.md)——九个事件上的 hook
238
+ * [沙箱](docs/usage/coderagent_sandbox_zh.md)——命令跑在哪里
239
+ * [评测](docs/usage/coderagent_eval_zh.md)——任务集、报告和对比
240
+
241
+ ## Where it comes from
242
+
243
+ This agent is built on the ideas of [mini-swe-agent](https://github.com/SWE-agent/mini-swe-agent),
244
+ the minimal AI software engineering agent: the linear history of the messages, the commands run
245
+ through one `bash` tool, the model layer of litellm, and the sandbox environments (Docker,
246
+ Singularity, bubblewrap, contree, SWE-ReX) that came with it. Everything else — the agent loop,
247
+ the tool system and the permission layer, the sessions and the event log, the context engine and
248
+ its compaction, the memory, the sub agents and the model routing, the extensions (hooks, MCP,
249
+ plugins, skills), the terminal interface, the web interface and the evaluation harness — is new.
250
+
251
+ mini-swe-agent itself is a research project of the SWE-agent team. If you found that work helpful,
252
+ please consider citing the [SWE-agent paper](https://arxiv.org/abs/2405.15793) in your work:
253
+
254
+ ```bibtex
255
+ @inproceedings{yang2024sweagent,
256
+ title={{SWE}-agent: Agent-Computer Interfaces Enable Automated Software Engineering},
257
+ author={John Yang and Carlos E Jimenez and Alexander Wettig and Kilian Lieret and Shunyu Yao and Karthik R Narasimhan and Ofir Press},
258
+ booktitle={The Thirty-eighth Annual Conference on Neural Information Processing Systems},
259
+ year={2024},
260
+ url={https://arxiv.org/abs/2405.15793}
261
+ }
262
+ ```
@@ -0,0 +1,163 @@
1
+ coder_agent-0.1.0.dist-info/licenses/LICENSE.md,sha256=D3luWPkdHAe7LBsdD4vzqDAXw6Xewb3G-uczss0uh1s,1094
2
+ coderagent/__init__.py,sha256=myTRyRZfBcJbkE385X0ldHHcu5Se95kuUL4WfQWVfDA,827
3
+ coderagent/paths.py,sha256=TgVxq-If2jfQKshI6GQp-Bmmg9JcQFq0RTGA2Ca3GbM,1089
4
+ coderagent/run.py,sha256=3_YkVsxjnzCC658K2ygC-LjDUB-f2jj6x0Uc8-1VhmM,17693
5
+ coderagent/version.py,sha256=Hy9NpofbBxx6qJfR4rWRL3dIAI6sFvvc5c0Q6g3y4NU,204
6
+ coderagent/compat/__init__.py,sha256=F480UjyT3345KPG-jIV_LG26A6FyKQIxbA4MOLPK2WU,917
7
+ coderagent/compat/cache_control.py,sha256=2l1NYAYaGoT5Rmxe1x9nYIFmEFgPz79uIFBXqmVcEws,2336
8
+ coderagent/compat/config_spec.py,sha256=S-48z6__rQdHqVxqeqV3Ow93rvc5neROO7MKEOMsv9g,1919
9
+ coderagent/compat/exceptions.py,sha256=QrZZD1borA0lxwydD4u5ebVGt15XclOdsvJJxT2xpd8,559
10
+ coderagent/compat/retry.py,sha256=J8eE4BHuVhlW0K9ITzCOvJ4luXCaXAClrAOSiKpr5fI,1010
11
+ coderagent/compat/serialize.py,sha256=CtAMBCuZgG2VWeRGSS05uV2inr1vNmOTATHUiKi61nM,995
12
+ coderagent/config/__init__.py,sha256=P9CHbBDYTC6DXiNYmTe4cDpOA-9obcYotT98hia3kKk,40
13
+ coderagent/config/defaults.yaml,sha256=iuC78zNrBI5tG5vDekSHz5sSZPowPjsdCLwlF0LFbyE,2143
14
+ coderagent/config/loader.py,sha256=PEKnr1e_hjhpsymotzgZEWqmZeXTc8sDi9TMkODyaU8,10788
15
+ coderagent/config/schema.py,sha256=eoNjmJQT0JHvGC1vacP9DkpqyZ-JR7vRqB-TWN10poM,21569
16
+ coderagent/config/writer.py,sha256=x2fxTR9iQRYJG22rm5sKcUaKSuuWazYeP4214FnaBCk,8957
17
+ coderagent/core/__init__.py,sha256=D3v_NNpW07DOVK2eWmF9nNBAtDRYdbXXgMhjdC67QZ4,65
18
+ coderagent/core/budget.py,sha256=hi2xmOPIQoPKuUKDRPaOYgSv5ShJ4m3DVjAFP7Ykcig,1494
19
+ coderagent/core/capabilities.py,sha256=uhf_aGBxpaSnURPEfJ2A680SNJyNK5O5QbdpB7FLuP0,4806
20
+ coderagent/core/checkpoint.py,sha256=eYOEraVxGq-FxBsAxbT0w6bFOONdHTVq4ew-paPiQcQ,5652
21
+ coderagent/core/content.py,sha256=uSHaAa4zsAjJg0iHbr3AkyTZs2q6GRz3VUiBMMJWz0c,5409
22
+ coderagent/core/context.py,sha256=95t-Tne1SuPs6bNqxXwFtWidOSe1ipBGbA8hQviKIbk,27071
23
+ coderagent/core/events.py,sha256=OePwB5CeEslvFfQXG2E4ogLkhJYYIUWh_3xm3XdHic4,2904
24
+ coderagent/core/history.py,sha256=vDgo7lrwJK0pTcFoDUvc9u8DyI_qEN2l0HB9t69-qDU,1998
25
+ coderagent/core/instructions.py,sha256=aovzNHhbk2nUopF8V7fVT0_Ei929yF3VqJC6O2-Yif4,3506
26
+ coderagent/core/loop.py,sha256=Ceki6Pddd68qVt6RTFolwt64b2tqWf8q-_uQ55AGk8c,30655
27
+ coderagent/core/memory.py,sha256=Wsul_-qfm6e3rLeVPm4X1Xx9TSnkBn2Fg1eSC_VTVYs,2237
28
+ coderagent/core/mentions.py,sha256=hRa_NCu_dKiE48W2LQmV3fS-syk9mpS66nfoDisavak,3145
29
+ coderagent/core/os_sandbox.py,sha256=H4SgZACbqJyTzrW5m1ZjI8vR9tVQ91TCO8ZLt7CYtQY,6865
30
+ coderagent/core/otel.py,sha256=WnukrXOvatpayuJe6Qcg0-FkCttK8bLD-qsp3E_LyyI,8183
31
+ coderagent/core/protocols.py,sha256=4nklIMsYsEzvXffCaZRw2gVpsjAKJQzLCflQOg3Cq_0,1298
32
+ coderagent/core/redact.py,sha256=GkJXLwYBio5wERhUjuE49K4-j6FT4uSlYymcYsrGa_Q,1860
33
+ coderagent/core/sandbox.py,sha256=U2s_ytgUnbBGlL4H0af4U_TLRlCkJlTabhyWo8WzN-c,3108
34
+ coderagent/core/schema.py,sha256=WGAQWjh1SqbHMTpp9rWSbKl8sl-kF1u1f7pUTi3-1AU,4434
35
+ coderagent/core/session.py,sha256=hzbMMAz4s_CetOxk4jfQGgttRKPvHA8fYyWeV2nebwo,13503
36
+ coderagent/core/shell_env.py,sha256=GMBzBtt__E71DjkRavxPkSegTdpzjmLjd9HsjTfzAv8,2110
37
+ coderagent/core/subagent.py,sha256=Cgj9VHQWO_kp51UxdLgi9vI7PuhOU9e30o-dtYVRb38,18398
38
+ coderagent/core/summarize.py,sha256=xUYQgvryuw87__zYIyOCNDgAaREKOanwnvId9NM1y1k,11601
39
+ coderagent/core/telemetry.py,sha256=VglwFj2LvJUGwmVndA3A_SXUIAUewd2rxrO4LzlBX70,8232
40
+ coderagent/core/tokens.py,sha256=30aOe1OxpYqccla6Yd1L5TdZOzwPZlLlbzO6piGUotc,4837
41
+ coderagent/core/trust.py,sha256=88DHdjYeN0YywsuSncpIEaMoxNXRxbGod7Mb0Y3brsw,11869
42
+ coderagent/environments/__init__.py,sha256=q7CG3-4hQlnkkVcW37j-kD59VVKGxsM-Fwn87oMCkp4,510
43
+ coderagent/environments/bubblewrap.py,sha256=R3n97zb5kXL5_zUTr10Ib5m0cxq6XRKUyjlh-OUUz14,5185
44
+ coderagent/environments/contree.py,sha256=xQv_7vlpAcrNX04R0BfQYMqlmvX2RATczXL0fMfk68U,5688
45
+ coderagent/environments/docker.py,sha256=gYiEL7yeBXeMk6wWx4T00jj4_9Lbsl9YgPxNgN06Wsc,6377
46
+ coderagent/environments/local.py,sha256=MWioaD9cRHJp1hG_HwMGkWy2UhuXR-VTfGHRcoEyqSk,4252
47
+ coderagent/environments/singularity.py,sha256=FX_tr-L85ksWPiE2ygvdW-_ptNkQpos51hIA4ArXG4M,5495
48
+ coderagent/environments/swerex_docker.py,sha256=2BP6N45F20D63e024gKlPKXkCG9F_d7cOnY2cE0uZX0,3152
49
+ coderagent/environments/swerex_modal.py,sha256=2Q17njs5fP3AagSAw8qL8K5luI4muCX9rU9zdE3zHxY,4991
50
+ coderagent/eval/__init__.py,sha256=sLHD_uLmkhfdUkRZPsB-iXcu1sObaVomI9bJDXWNWL8,68
51
+ coderagent/eval/compare.py,sha256=v5ObwSo0zcl4B-EDEw7KA5azCbvaon7uRK4Si9bAL48,8503
52
+ coderagent/eval/report.py,sha256=FanTX1kJDKFMHptCJw6fCet6JqTPugG_NpFXTk_0-HI,6286
53
+ coderagent/eval/runner.py,sha256=uAV6miB5ivAGIe8h6y7PyXX88bXYFdYEkHaftbq1ybs,13522
54
+ coderagent/eval/task.py,sha256=Svc5j0ajAiqGUpPsvNce_gg7IuwbztldbQlzLFL67Qo,7606
55
+ coderagent/extensions/__init__.py,sha256=5lylBHrLcyIGAdEdDZxiKzdKbqUxRvZOqY98Rro8Hcw,67
56
+ coderagent/extensions/hooks.py,sha256=1ENje_jZBy-RwPURPWF0Xhx6zMIIA297vJIRC9fNwT4,4480
57
+ coderagent/extensions/plugins.py,sha256=0X8dV7rvx113Ymb3qJzXSSG64xJGlasHH7FvfbdUDpU,7334
58
+ coderagent/extensions/reflect.py,sha256=QN0a6W9Kvln4tjr6N1uVKpCgRErEbhGU_-v-Uedurj8,12028
59
+ coderagent/models/__init__.py,sha256=9Iag2ilyMJtswGI671qBI5aKhUjeScFkM-9k4TgbsOI,912
60
+ coderagent/models/backends.py,sha256=MPUYSZ0PsS-PsL42C_1AZfomGZyFrA9pVTjAus3NcaU,9530
61
+ coderagent/models/call.py,sha256=4bQiPz5bya-uzttjRqzAX84xblliUrLtACkwxYTK51E,714
62
+ coderagent/models/check.py,sha256=s2gFnQafCIFpWzeUaMBt-ljWDaseGU36Jzx-2Hv6xPw,5388
63
+ coderagent/models/gateway.py,sha256=1j7cJF2ZIbyPTuKaPjYY_O4bS7uur7sUpfIxSWjK5vY,2543
64
+ coderagent/models/litellm_config.py,sha256=9pcK300HvpqTryz9exhcbzoWg__9Oz9FG3303JQWVKo,2339
65
+ coderagent/models/provider.py,sha256=PqIqbUafyuWsu4XP9pJrZBfrhcNGJ0nAXWQAp_aTdlU,3191
66
+ coderagent/models/reasoning.py,sha256=Ib_CW5ySaZrhKxCvGLNG1lyoVZtxWuJj0qhw6TNVClE,1137
67
+ coderagent/models/router.py,sha256=2l9V7MeAGUPScxd5-QkOI1eD4eSk-3JTZuBD6-_dkwk,5397
68
+ coderagent/models/settings.py,sha256=oZgOQJaa8kvJyUW2FzI19SAkIgVDn5PORWBmSG9gwlM,6903
69
+ coderagent/models/streaming.py,sha256=sKpbQFdUOBlxjUJxWcsWoOETs99UNCapQxz9dIMToMQ,4370
70
+ coderagent/models/verbosity.py,sha256=DqcwpSSdhExjuIhrGJKzcYgFYi_cCF-HXVQRF-fDiOI,551
71
+ coderagent/skills/__init__.py,sha256=Wf1-oRskvlXNpH0b0EocMCR7yNfh4ZD8GN0f-GQ07rk,3863
72
+ coderagent/skills/errors.py,sha256=2NCxK5Qgl6S7-GJfvP57luQ3ABWIhANwxSJK8v_Y2Xg,290
73
+ coderagent/skills/install.py,sha256=WCR_GoiPDJ07m8RFc_zQxLDUOF04Pb9ximgfk4c2uTY,11525
74
+ coderagent/skills/sandbox.py,sha256=N-dIzQL-qv4X8hDcPHogRqTTU1WBb5kwxvuNc2UvleA,10508
75
+ coderagent/skills/sites.py,sha256=_3KAc8djFn0BqJKS7LtV-89tRpbYIE0e9iTchuJYW7g,5522
76
+ coderagent/skills/source.py,sha256=uHd7rPWZ2ozKrfCF_eVV2Gl_SuqrdLUKl3UjnB1swxk,15307
77
+ coderagent/skills/presets/code-review/SKILL.md,sha256=1b1AdRE-6HdyhTsSAF2uAgCShr-x0y641VSpvERd-Yc,1584
78
+ coderagent/skills/presets/codebase-onboarding/SKILL.md,sha256=Q5DDkd8Lk82gF3AiCogGUMYlptsouBp58pdzJYmEIyw,1479
79
+ coderagent/skills/presets/data-analysis/SKILL.md,sha256=q7vqx7aQwQufHd64a2_RIceKgdKMWSGUCq6ME07jeSw,1578
80
+ coderagent/skills/presets/deep-research/SKILL.md,sha256=jXPcd_4oiOc5VrarCQeKHs2Wc7KyHR9bCs8Mqvg1K5Y,1661
81
+ coderagent/skills/presets/frontend-dev/SKILL.md,sha256=eLp4StEKCQaiOMtRigXu6ZgJJCXGXtykzZDFhw6256k,1443
82
+ coderagent/skills/presets/long-document/SKILL.md,sha256=7BvAXJIj04Z5XfS-TlMVp01sm7zklSEwfJWzua3V4Lo,1615
83
+ coderagent/skills/presets/long-document/scripts/pdf_text.py,sha256=aZxcUoPq4PNzcjHLImJH2aDdfDwtKi8kmQcRtAU9zUw,1187
84
+ coderagent/skills/presets/office-docx/SKILL.md,sha256=YBrPrQjJy1OXoz7v-GKX3a_NISkdEv54uloBT1mYkBc,1531
85
+ coderagent/skills/presets/office-docx/scripts/docx_text.py,sha256=4HPNWX0qqftL8xs4tAUHtPVyHuZUOd7rIyS3vs24FQM,1228
86
+ coderagent/skills/presets/office-pptx/SKILL.md,sha256=HOuFcdrWZbR_au74QFRii0t-9SCKPiNEMHgtbqyzLUE,1365
87
+ coderagent/skills/presets/office-xlsx/SKILL.md,sha256=-qjWtUMVRVfe6iRU98VhSkoLdTt34yI2EoC5yMEKmiY,1446
88
+ coderagent/skills/presets/office-xlsx/scripts/xlsx_text.py,sha256=D8Sx5QmJ4CXVfF7M5BaHRSjms-fZzgsidhvFStx84Fk,3000
89
+ coderagent/skills/presets/writing/SKILL.md,sha256=JQsg2XVBYphKvUe4ugJkSGPZMZNS4L7j016QmwCf7FQ,1342
90
+ coderagent/testing/__init__.py,sha256=HFgmMNtwF1tYrAJNLLQEIqLiPOqPPCwcAPE8HUyUNC4,131
91
+ coderagent/testing/factory.py,sha256=mQR_frpeU-G9URtmNelVFvZyvUCtFlXZClg20lTv9TM,1913
92
+ coderagent/testing/scripted_model.py,sha256=A8SLKAV_c7WNAox0j3vXvIrqF-3F4btwWMBOW_lb3dA,2041
93
+ coderagent/tools/__init__.py,sha256=KreGMocs5thlVV8MbdNXtZGPi7dbfeYy6Q8lHfxxOFs,74
94
+ coderagent/tools/base.py,sha256=zTm_LiBRWlpSCZ8zCn3ozbklojqCNCC56YsR4atVnZE,1682
95
+ coderagent/tools/bash_policy.py,sha256=RVV2t7OW1iQFf6xbllyaiRCbW2pWfVVsKUSA45fKKuE,16527
96
+ coderagent/tools/executor.py,sha256=wutezT78r8O2LAEKSAO66-nPIEEERvx7-FGVzF1Ox4E,10770
97
+ coderagent/tools/mcp.py,sha256=k68W3ejbLbOr0jIUNoM3WkcIEwEogqtZM_8UsLPKO1c,12124
98
+ coderagent/tools/permissions.py,sha256=9GVnTV82gdUACJOV7PlyUQg1A-gMbtjOZiecTj0IJRw,19459
99
+ coderagent/tools/registry.py,sha256=lZz_5vqUiEX2QlyJpcZYfaIMgiPTzGApS6BVjFnvzN0,2599
100
+ coderagent/tools/rules.py,sha256=Foi7ncugOKkONVEzY4pGhZ-kuzCChNCoyCj9wHpj9xs,5331
101
+ coderagent/tools/builtin/__init__.py,sha256=OSMih0ZugKHlzmWqn2t0bYP7weCtz_s20nVHnJd9Ekg,1178
102
+ coderagent/tools/builtin/fs.py,sha256=KjqpGNViGsxs4BfNWlTWJg0G-4QRv9rs966uISpaaEU,12415
103
+ coderagent/tools/builtin/patch.py,sha256=wg-bgb7wA-izovKvO0QFardZ2ca7HvH3ZvMlcHDmyu8,10776
104
+ coderagent/tools/builtin/search.py,sha256=WyQUfP6OL4AFWEuRmNm_afaaPszpEJKK39E6bLhfur4,10169
105
+ coderagent/tools/builtin/shell.py,sha256=N6xM5dQPxJ50FckkE2JAQBim2HHEts0iN3cjtdCfHxE,13307
106
+ coderagent/tools/builtin/skill.py,sha256=22rskUPulDHyTcQTpt6CYh7o0yqDIVjQ18YAhvbkRc4,1433
107
+ coderagent/tools/builtin/task.py,sha256=3_jsT1nOX_5edR4gCMddZd4DxNH70hmSM5J0Qo5mc2M,2282
108
+ coderagent/tools/builtin/todo.py,sha256=VvSoWZ6RfehqOv7o9Vt8mrF3XizYeqcrRHmNgdeowmU,2541
109
+ coderagent/ui/__init__.py,sha256=hqa6OCFjkgRTLRRzn3Wb6LDz93jHS7BxeUumCtMcSUY,23
110
+ coderagent/ui/cli.py,sha256=gLLlC-_Ub1K_nksD66nVy8zuNdsNW0a0I1va4o3a7v4,20285
111
+ coderagent/ui/custom_commands.py,sha256=FHCx0sTQUwo5CrpFBHlYBhborzYKTBr9MfaaTm9llZ8,7002
112
+ coderagent/ui/notify.py,sha256=PRkugUMkpPJoeYZlnwqi4ZbD4GSASqhRaEfdojwG2hc,1442
113
+ coderagent/ui/open_file.py,sha256=nmRcpLufN-UYametAYMT5qfnqEtTTiY6u2lDAkOQzqg,1644
114
+ coderagent/ui/render.py,sha256=Uy76KZhs7taLaXpY5phTfG3M_la-v6C4W456vzf0iag,1872
115
+ coderagent/ui/spinner.py,sha256=3EDODUHKyY1Z5NyIjIpHw59YiM-mVd-qCgob4b9ycsU,2148
116
+ coderagent/ui/tui.py,sha256=rVvdlWGyXlr4yKnp_9e4pNq38CegwfbvxsZdrAWITUs,23991
117
+ coderagent/ui/commands/__init__.py,sha256=CaP4tBi4-Ct16db1_qAnzgONowdh8hJBCdRYxQCOhY0,3483
118
+ coderagent/ui/commands/builtin.py,sha256=Wy0raArQBg0h1O4oL0pJH0cF2D-1l609x_5UHZSgqdg,29366
119
+ coderagent/ui/commands/compact.py,sha256=K-D7YlAdOSEn7Ct2W_PjTjrEDoUjW_SO-Tv9jkP-iPU,432
120
+ coderagent/ui/commands/resume.py,sha256=ZB0Ef33XeaC5VA0ZPALnMpW3lR5-ZB8gn6WU3pwVVQ0,933
121
+ coderagent/ui/commands/review.py,sha256=JZSq2vQAJqbK332yG6n4ztd02YZcc7zlZzLziNxSHwc,2997
122
+ coderagent/ui/commands/rewind.py,sha256=YXpSlC3eCweDegu6Ei3xR03qjnGEBm0PizUS1nkh0V0,1181
123
+ coderagent/ui/widgets/__init__.py,sha256=jvcIIcRJq-xq9FWY1HwbD5_3f8O0Ohmu79JEoaLcaBE,968
124
+ coderagent/ui/widgets/approval_prompt.py,sha256=4yWvf2pWeBkJ4jLo0vgt608k359UIWeXjwsIfBbU7mU,4454
125
+ coderagent/ui/widgets/diff_view.py,sha256=4pVnTdxLpftMjk36scAdNIyXHCm-7025U0xei-Nc4Aw,2967
126
+ coderagent/ui/widgets/file_tree.py,sha256=adYj8VaG3G70QSqOacL9NYSTu6CTO9Qdd92egIhHhEs,3728
127
+ coderagent/ui/widgets/markdown_message.py,sha256=gcufiu75wz8iob6wTeTNexOdZcc2N0C9oBSStPcl7TQ,1247
128
+ coderagent/ui/widgets/markup.py,sha256=ixxWX80j783mFXbWdBPQOVNmRxZX0sNT8hAnfYYvD1I,363
129
+ coderagent/ui/widgets/message_block.py,sha256=JXcojLYrzPRriGwLzUoBr6W7V6ja7bb8Qp8-Bgqp154,1891
130
+ coderagent/ui/widgets/path_suggester.py,sha256=qLJa85UnGfk3MS_YK_9Md6uQs2LETTLv4H0tQWIDhE8,2173
131
+ coderagent/ui/widgets/session_picker.py,sha256=WedVZQ_gWEY83Ki0Sbtcx7rAKe65_WYhjttn1Y6KxJU,1582
132
+ coderagent/ui/widgets/status_bar.py,sha256=oX4FcQNkaKhZoUyiOz23lBJzAIrRXlF171J1AXxfSfY,1375
133
+ coderagent/ui/widgets/todo_panel.py,sha256=pV9fU3gXjgTT7hnGP_gagUE8nzfT7XjPpS8z5vvoWY0,1168
134
+ coderagent/ui/widgets/tool_card.py,sha256=_7I11jiVRbRChV8Mw-M8wKQKJqHP0n9udVoBAY6zVDg,3448
135
+ coderagent/ui/widgets/working_dots.py,sha256=s45ntEleUYc-eNeXb2iBp9iTNV3AtV0M25_rONoMRZE,617
136
+ coderagent/web/__init__.py,sha256=Pr7It2B_egagDQYbmTUNZlJAAhO4e33t6-uHek0aUbk,227
137
+ coderagent/web/api.py,sha256=qTYociu-dsLe2MDULIksTJ61Sk3XHckZy4AZRVefCTs,17127
138
+ coderagent/web/app.py,sha256=dtqMcwyo_FGmILJJmqcHDQXnI0cK_uC1LiK0BnhWwHI,4397
139
+ coderagent/web/approver.py,sha256=rBolKfDW5b9B18gnsBc0yMtyZUbKHPoDFbhEOGdmx4M,2683
140
+ coderagent/web/config_api.py,sha256=m3mj9bmynI9nc5TBuS3kviNmg5WGIa20kNmk3Dmzjrs,1957
141
+ coderagent/web/events.py,sha256=JiNy8iNst9kSGrUCDX_5NOr8HQUbekWOt57-Msco6Ng,6397
142
+ coderagent/web/files.py,sha256=PithBXe8CvfWc8SoGfurd-5TpEKhC_66PkZDp9pnFrY,4563
143
+ coderagent/web/i18n.py,sha256=UE-B395WSF5fJaqplcegHhomNVgyyvLmHjW_EO8Y1_U,15575
144
+ coderagent/web/server.py,sha256=X-kKFbe0gH6lGzt5c92e1tfcxVQWPB2zJ2yxr6mSaXg,3495
145
+ coderagent/web/sessions.py,sha256=gQg33cx1LKiPMpr_jYB0Mi-3n_aEPuKJ6-sIR14DI8c,16280
146
+ coderagent/web/skills_api.py,sha256=6soCGBVFm1T4un3utp4Notqa3BAKPWPKHc2ExZDhFk0,14511
147
+ coderagent/web/static/app.css,sha256=THQAyf9t9GHYMreUGitD5F4JKWJLOo1PFjns-vcmxXs,11417
148
+ coderagent/web/static/app.js,sha256=nM_yAurHH38gNCQ9jBhK2A1eV0PvKr0wu0ifeaii17g,51156
149
+ coderagent/web/templates/en/base.html,sha256=xZC5vBaW3kxVNYCNj4lO4Z240i3ecxr7HiuJkQXaT_w,1095
150
+ coderagent/web/templates/en/chat.html,sha256=GM0TceMpgLoVC2crzJ_mAQ-UZBeGnlLwFdk-kp8zXjI,2164
151
+ coderagent/web/templates/en/macros.html,sha256=1dsX4fuvjUT3T8EZMNa3wIvXXVCn48N_0QQn8TvFFbc,639
152
+ coderagent/web/templates/en/settings.html,sha256=fNg9TWZW-qKcT9lJTE7iqM41CD1f0d7Ogza2QF0TB_E,3408
153
+ coderagent/web/templates/en/skills.html,sha256=cY28v03cDxxP25VZm2jBjuX-GeI8sDbAIcoKAEqKHmE,2231
154
+ coderagent/web/templates/zh/base.html,sha256=fzqtfH9rt97-WOSQqcxOjKvwyseWFv2OLaQJO4A_-mw,1085
155
+ coderagent/web/templates/zh/chat.html,sha256=oIUIdZ2kWbhr_EgX_-3Woe5vy1HPpIMUmKTEfQFUaFc,2171
156
+ coderagent/web/templates/zh/macros.html,sha256=4pjfRr5OGWblPClVIPZCAySUMOFmUI_a6nKSM0IowfU,632
157
+ coderagent/web/templates/zh/settings.html,sha256=JQzfS6htOLqWM9VYBiOl4J61G4uaBp2-PoImTkW1i0k,3209
158
+ coderagent/web/templates/zh/skills.html,sha256=yoQAkN94ap7REGEfuC7jXL_YZnZlyRKUWVhAmMn2f0A,2192
159
+ coder_agent-0.1.0.dist-info/METADATA,sha256=yyX-2ETB8NsKEtOTRmD5v68YoGprpHlFxGDWg7JELy8,13739
160
+ coder_agent-0.1.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
161
+ coder_agent-0.1.0.dist-info/entry_points.txt,sha256=mX2Vd0l2Y17GFTLxMaGlQKx7QVGBJmONAkULKXcGhbo,48
162
+ coder_agent-0.1.0.dist-info/top_level.txt,sha256=eVyt7C_Iq9PCeaNE-vfp9bfSuCpgs-cv5PST8AocvEs,11
163
+ coder_agent-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ coder = coderagent.ui.cli:app
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Kilian A. Lieret and Carlos E. Jimenez
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 @@
1
+ coderagent
coderagent/__init__.py ADDED
@@ -0,0 +1,20 @@
1
+ """The coding agent: a coding agent for the terminal, for the browser and as a library.
2
+
3
+ See `docs/design/coding-agent-architecture.md` for the architecture this package implements.
4
+ """
5
+
6
+ import os
7
+
8
+ # litellm fetches the price table from GitHub while it is imported: seconds of waiting,
9
+ # and a failure behind a firewall. The copy it ships with is good enough.
10
+ os.environ.setdefault("LITELLM_LOCAL_MODEL_COST_MAP", "true")
11
+
12
+ from coderagent.core.protocols import ModelBackend, ToolExecutor # noqa: E402
13
+ from coderagent.paths import load_global_env # noqa: E402
14
+ from coderagent.version import __version__ # noqa: E402
15
+
16
+ load_global_env()
17
+ """The keys of the models come from the files of the user: they have to be in
18
+ the environment before the first call to a model."""
19
+
20
+ __all__ = ["ModelBackend", "ToolExecutor", "__version__"]
@@ -0,0 +1,27 @@
1
+ """The pieces of mini-swe-agent that the coding agent needed.
2
+
3
+ They were copied here on 2026-11-26, when the coding agent had to stand on its
4
+ own without another package next to it. The behaviour is the same as the
5
+ original, the names are the same, so that the code that uses them did not have
6
+ to change.
7
+
8
+ The environments are not here: they have a home of their own now,
9
+ `coderagent.environments`.
10
+ """
11
+
12
+ from coderagent.compat.cache_control import set_cache_control
13
+ from coderagent.compat.config_spec import get_config_from_spec, get_config_path
14
+ from coderagent.compat.exceptions import FormatError, InterruptAgentFlow, Submitted
15
+ from coderagent.compat.retry import retry
16
+ from coderagent.compat.serialize import recursive_merge
17
+
18
+ __all__ = [
19
+ "FormatError",
20
+ "InterruptAgentFlow",
21
+ "Submitted",
22
+ "get_config_from_spec",
23
+ "get_config_path",
24
+ "recursive_merge",
25
+ "retry",
26
+ "set_cache_control",
27
+ ]
@@ -0,0 +1,69 @@
1
+ """Cache control marks for the models that cache their prompts.
2
+
3
+ They are mostly for Anthropic models: the marks say which part of the
4
+ conversation is worth keeping.
5
+ """
6
+
7
+ import copy
8
+ import warnings
9
+ from typing import Literal
10
+
11
+
12
+ def _get_content_text(entry: dict) -> str | None:
13
+ if entry["content"] is None:
14
+ return None
15
+ if isinstance(entry["content"], str):
16
+ return entry["content"]
17
+ assert len(entry["content"]) == 1, "Expected single message in content"
18
+ return entry["content"][0]["text"]
19
+
20
+
21
+ def _clear_cache_control(entry: dict) -> None:
22
+ if isinstance(entry["content"], list):
23
+ for part in entry["content"]:
24
+ part.pop("cache_control", None)
25
+ # Note: entry["content"] can be None for assistant messages with only tool_use
26
+ entry.pop("cache_control", None)
27
+
28
+
29
+ def _set_cache_control(entry: dict) -> None:
30
+ # Handle None content (e.g., assistant messages with only tool_use)
31
+ if entry["content"] is None:
32
+ entry["cache_control"] = {"type": "ephemeral"}
33
+ return
34
+
35
+ if not isinstance(entry["content"], list):
36
+ entry["content"] = [ # type: ignore
37
+ {
38
+ "type": "text",
39
+ "text": _get_content_text(entry),
40
+ "cache_control": {"type": "ephemeral"},
41
+ }
42
+ ]
43
+ else:
44
+ entry["content"][0]["cache_control"] = {"type": "ephemeral"}
45
+ if entry["role"] == "tool":
46
+ # Workaround for weird bug
47
+ entry["content"][0].pop("cache_control", None)
48
+ entry["cache_control"] = {"type": "ephemeral"}
49
+
50
+
51
+ def set_cache_control(
52
+ messages: list[dict], *, mode: Literal["default_end"] | None = "default_end", last_n_messages_offset: int = 0
53
+ ) -> list[dict]:
54
+ """Add the cache control marks to the messages."""
55
+ if mode is None:
56
+ return messages
57
+ if mode != "default_end":
58
+ raise ValueError(f"Invalid mode: {mode}")
59
+ if last_n_messages_offset:
60
+ warnings.warn("last_n_messages_offset is deprecated and will be removed in the future. It has no effect.")
61
+
62
+ messages = copy.deepcopy(messages)
63
+ new_messages = []
64
+ for i_entry, entry in enumerate(reversed(messages)):
65
+ _clear_cache_control(entry)
66
+ if i_entry == 0:
67
+ _set_cache_control(entry)
68
+ new_messages.append(entry)
69
+ return list(reversed(new_messages))
@@ -0,0 +1,60 @@
1
+ """The configuration files of the agent and the `key=value` overrides of the command line."""
2
+
3
+ import json
4
+ import os
5
+ from pathlib import Path
6
+
7
+ import yaml
8
+
9
+ builtin_config_dir = Path(__file__).parent.parent / "config"
10
+ """The configuration files that come with the package."""
11
+
12
+
13
+ def get_config_path(config_spec: str | Path) -> Path:
14
+ """The path of a configuration file."""
15
+ config_spec = Path(config_spec)
16
+ if config_spec.suffix != ".yaml":
17
+ config_spec = config_spec.with_suffix(".yaml")
18
+ candidates = [
19
+ Path(config_spec),
20
+ Path(os.getenv("MSWEA_CONFIG_DIR", ".")) / config_spec,
21
+ builtin_config_dir / config_spec,
22
+ ]
23
+ for candidate in candidates:
24
+ if candidate.exists():
25
+ return candidate
26
+
27
+ raise FileNotFoundError(f"Could not find config file for {config_spec} (tried: {candidates})")
28
+
29
+
30
+ def _key_value_spec_to_nested_dict(config_spec: str) -> dict:
31
+ """The `key=value` of the command line as a dictionary.
32
+
33
+ Example:
34
+
35
+ "model.model_name=anthropic/claude-sonnet-4-5-20250929" ->
36
+ {"model": {"model_name": "anthropic/claude-sonnet-4-5-20250929"}}
37
+ """
38
+ key, value = config_spec.split("=", 1)
39
+ try:
40
+ value = json.loads(value)
41
+ except json.JSONDecodeError:
42
+ pass
43
+ keys = key.split(".")
44
+ if any(k == "" for k in keys):
45
+ raise ValueError(f"Invalid config spec {config_spec!r}: empty config key")
46
+ result = {}
47
+ current = result
48
+ for k in keys[:-1]:
49
+ current[k] = {}
50
+ current = current[k]
51
+ current[keys[-1]] = value
52
+ return result
53
+
54
+
55
+ def get_config_from_spec(config_spec: str | Path) -> dict:
56
+ """The configuration of a spec: a file or a `key=value`."""
57
+ if isinstance(config_spec, str) and "=" in config_spec:
58
+ return _key_value_spec_to_nested_dict(config_spec)
59
+ path = get_config_path(config_spec)
60
+ return yaml.safe_load(path.read_text(encoding="utf-8"))