amness 0.0.0-stage → 0.1.0

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 (233) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +212 -2
  3. package/dist/cli/acpcli.d.ts +7 -0
  4. package/dist/cli/acpcli.js +14 -0
  5. package/dist/cli/amness.d.ts +2 -0
  6. package/dist/cli/amness.js +693 -0
  7. package/dist/cli/benchcli.d.ts +5 -0
  8. package/dist/cli/benchcli.js +160 -0
  9. package/dist/cli/config.d.ts +79 -0
  10. package/dist/cli/config.js +54 -0
  11. package/dist/cli/demo.d.ts +13 -0
  12. package/dist/cli/demo.js +44 -0
  13. package/dist/cli/detect.d.ts +2 -0
  14. package/dist/cli/detect.js +20 -0
  15. package/dist/cli/evalcli.d.ts +15 -0
  16. package/dist/cli/evalcli.js +198 -0
  17. package/dist/cli/format.d.ts +5 -0
  18. package/dist/cli/format.js +55 -0
  19. package/dist/cli/headless.d.ts +2 -0
  20. package/dist/cli/headless.js +169 -0
  21. package/dist/cli/model.d.ts +11 -0
  22. package/dist/cli/model.js +19 -0
  23. package/dist/cli/plugincli.d.ts +2 -0
  24. package/dist/cli/plugincli.js +176 -0
  25. package/dist/cli/schedulecli.d.ts +2 -0
  26. package/dist/cli/schedulecli.js +66 -0
  27. package/dist/cli/state.d.ts +11 -0
  28. package/dist/cli/state.js +19 -0
  29. package/dist/cli/tui/ansi.d.ts +38 -0
  30. package/dist/cli/tui/ansi.js +142 -0
  31. package/dist/cli/tui/app.d.ts +328 -0
  32. package/dist/cli/tui/app.js +1358 -0
  33. package/dist/cli/tui/blocks.d.ts +151 -0
  34. package/dist/cli/tui/blocks.js +128 -0
  35. package/dist/cli/tui/brand.d.ts +9 -0
  36. package/dist/cli/tui/brand.js +16 -0
  37. package/dist/cli/tui/canvas.d.ts +92 -0
  38. package/dist/cli/tui/canvas.js +199 -0
  39. package/dist/cli/tui/cards.d.ts +44 -0
  40. package/dist/cli/tui/cards.js +215 -0
  41. package/dist/cli/tui/clipboard.d.ts +5 -0
  42. package/dist/cli/tui/clipboard.js +29 -0
  43. package/dist/cli/tui/commands.d.ts +10 -0
  44. package/dist/cli/tui/commands.js +649 -0
  45. package/dist/cli/tui/complete.d.ts +39 -0
  46. package/dist/cli/tui/complete.js +113 -0
  47. package/dist/cli/tui/custom.d.ts +9 -0
  48. package/dist/cli/tui/custom.js +34 -0
  49. package/dist/cli/tui/diffview.d.ts +25 -0
  50. package/dist/cli/tui/diffview.js +130 -0
  51. package/dist/cli/tui/editor.d.ts +60 -0
  52. package/dist/cli/tui/editor.js +230 -0
  53. package/dist/cli/tui/full.d.ts +86 -0
  54. package/dist/cli/tui/full.js +630 -0
  55. package/dist/cli/tui/keys.d.ts +31 -0
  56. package/dist/cli/tui/keys.js +134 -0
  57. package/dist/cli/tui/markdown.d.ts +37 -0
  58. package/dist/cli/tui/markdown.js +155 -0
  59. package/dist/cli/tui/mentions.d.ts +15 -0
  60. package/dist/cli/tui/mentions.js +48 -0
  61. package/dist/cli/tui/modal.d.ts +26 -0
  62. package/dist/cli/tui/modal.js +107 -0
  63. package/dist/cli/tui/overlays.d.ts +98 -0
  64. package/dist/cli/tui/overlays.js +237 -0
  65. package/dist/cli/tui/pager.d.ts +15 -0
  66. package/dist/cli/tui/pager.js +66 -0
  67. package/dist/cli/tui/pricing.d.ts +9 -0
  68. package/dist/cli/tui/pricing.js +23 -0
  69. package/dist/cli/tui/rich.d.ts +16 -0
  70. package/dist/cli/tui/rich.js +72 -0
  71. package/dist/cli/tui/screen.d.ts +30 -0
  72. package/dist/cli/tui/screen.js +62 -0
  73. package/dist/cli/tui/session.d.ts +77 -0
  74. package/dist/cli/tui/session.js +103 -0
  75. package/dist/cli/tui/sidebar.d.ts +84 -0
  76. package/dist/cli/tui/sidebar.js +114 -0
  77. package/dist/cli/tui/text.d.ts +15 -0
  78. package/dist/cli/tui/text.js +94 -0
  79. package/dist/cli/tui/theme.d.ts +59 -0
  80. package/dist/cli/tui/theme.js +148 -0
  81. package/dist/cli/tui/themes.d.ts +56 -0
  82. package/dist/cli/tui/themes.js +80 -0
  83. package/dist/cli/tui/tokens.d.ts +39 -0
  84. package/dist/cli/tui/tokens.js +71 -0
  85. package/dist/cli/tui/view.d.ts +60 -0
  86. package/dist/cli/tui/view.js +178 -0
  87. package/dist/cli/ui.d.ts +34 -0
  88. package/dist/cli/ui.js +224 -0
  89. package/dist/src/acp.d.ts +28 -0
  90. package/dist/src/acp.js +111 -0
  91. package/dist/src/agents.d.ts +23 -0
  92. package/dist/src/agents.js +71 -0
  93. package/dist/src/anthropic.d.ts +30 -0
  94. package/dist/src/anthropic.js +91 -0
  95. package/dist/src/approver.d.ts +15 -0
  96. package/dist/src/approver.js +40 -0
  97. package/dist/src/bench.d.ts +67 -0
  98. package/dist/src/bench.js +201 -0
  99. package/dist/src/bundle.d.ts +36 -0
  100. package/dist/src/bundle.js +55 -0
  101. package/dist/src/chaos.d.ts +15 -0
  102. package/dist/src/chaos.js +26 -0
  103. package/dist/src/code.d.ts +187 -0
  104. package/dist/src/code.js +590 -0
  105. package/dist/src/codeindex.d.ts +65 -0
  106. package/dist/src/codeindex.js +300 -0
  107. package/dist/src/deep.d.ts +62 -0
  108. package/dist/src/deep.js +177 -0
  109. package/dist/src/diff.d.ts +8 -0
  110. package/dist/src/diff.js +74 -0
  111. package/dist/src/dynamic.d.ts +42 -0
  112. package/dist/src/dynamic.js +133 -0
  113. package/dist/src/embed.d.ts +8 -0
  114. package/dist/src/embed.js +25 -0
  115. package/dist/src/evalcases.d.ts +11 -0
  116. package/dist/src/evalcases.js +196 -0
  117. package/dist/src/evals.d.ts +197 -0
  118. package/dist/src/evals.js +340 -0
  119. package/dist/src/gitflow.d.ts +27 -0
  120. package/dist/src/gitflow.js +56 -0
  121. package/dist/src/grade.d.ts +42 -0
  122. package/dist/src/grade.js +96 -0
  123. package/dist/src/guidance.d.ts +15 -0
  124. package/dist/src/guidance.js +68 -0
  125. package/dist/src/hardcases.d.ts +2 -0
  126. package/dist/src/hardcases.js +94 -0
  127. package/dist/src/harness.d.ts +411 -0
  128. package/dist/src/harness.js +725 -0
  129. package/dist/src/hooks.d.ts +44 -0
  130. package/dist/src/hooks.js +116 -0
  131. package/dist/src/images.d.ts +13 -0
  132. package/dist/src/images.js +27 -0
  133. package/dist/src/index.d.ts +57 -0
  134. package/dist/src/index.js +57 -0
  135. package/dist/src/ledger.d.ts +58 -0
  136. package/dist/src/ledger.js +78 -0
  137. package/dist/src/live.d.ts +16 -0
  138. package/dist/src/live.js +80 -0
  139. package/dist/src/lsp.d.ts +31 -0
  140. package/dist/src/lsp.js +147 -0
  141. package/dist/src/memory.d.ts +128 -0
  142. package/dist/src/memory.js +390 -0
  143. package/dist/src/metrics.d.ts +3 -0
  144. package/dist/src/metrics.js +42 -0
  145. package/dist/src/mining.d.ts +49 -0
  146. package/dist/src/mining.js +126 -0
  147. package/dist/src/openai.d.ts +50 -0
  148. package/dist/src/openai.js +307 -0
  149. package/dist/src/parallel.d.ts +66 -0
  150. package/dist/src/parallel.js +135 -0
  151. package/dist/src/patch.d.ts +45 -0
  152. package/dist/src/patch.js +219 -0
  153. package/dist/src/permissions.d.ts +46 -0
  154. package/dist/src/permissions.js +245 -0
  155. package/dist/src/plugins.d.ts +148 -0
  156. package/dist/src/plugins.js +225 -0
  157. package/dist/src/pluginscan.d.ts +8 -0
  158. package/dist/src/pluginscan.js +20 -0
  159. package/dist/src/procs.d.ts +41 -0
  160. package/dist/src/procs.js +94 -0
  161. package/dist/src/profiles.d.ts +36 -0
  162. package/dist/src/profiles.js +61 -0
  163. package/dist/src/progress.d.ts +29 -0
  164. package/dist/src/progress.js +75 -0
  165. package/dist/src/prompts.d.ts +10 -0
  166. package/dist/src/prompts.js +28 -0
  167. package/dist/src/ratelimit.d.ts +34 -0
  168. package/dist/src/ratelimit.js +116 -0
  169. package/dist/src/replay.d.ts +25 -0
  170. package/dist/src/replay.js +99 -0
  171. package/dist/src/review.d.ts +20 -0
  172. package/dist/src/review.js +49 -0
  173. package/dist/src/route.d.ts +9 -0
  174. package/dist/src/route.js +30 -0
  175. package/dist/src/router.d.ts +61 -0
  176. package/dist/src/router.js +126 -0
  177. package/dist/src/sandbox.d.ts +13 -0
  178. package/dist/src/sandbox.js +68 -0
  179. package/dist/src/schedule.d.ts +20 -0
  180. package/dist/src/schedule.js +59 -0
  181. package/dist/src/schema.d.ts +13 -0
  182. package/dist/src/schema.js +36 -0
  183. package/dist/src/secrets.d.ts +10 -0
  184. package/dist/src/secrets.js +41 -0
  185. package/dist/src/shell.d.ts +34 -0
  186. package/dist/src/shell.js +95 -0
  187. package/dist/src/skills.d.ts +20 -0
  188. package/dist/src/skills.js +112 -0
  189. package/dist/src/snapshot.d.ts +20 -0
  190. package/dist/src/snapshot.js +93 -0
  191. package/dist/src/stats.d.ts +24 -0
  192. package/dist/src/stats.js +62 -0
  193. package/dist/src/strategies.d.ts +16 -0
  194. package/dist/src/strategies.js +35 -0
  195. package/dist/src/suites.d.ts +30 -0
  196. package/dist/src/suites.js +112 -0
  197. package/dist/src/trace.d.ts +63 -0
  198. package/dist/src/trace.js +153 -0
  199. package/dist/src/tune.d.ts +38 -0
  200. package/dist/src/tune.js +49 -0
  201. package/dist/src/web.d.ts +19 -0
  202. package/dist/src/web.js +56 -0
  203. package/dist/src/worktree.d.ts +24 -0
  204. package/dist/src/worktree.js +85 -0
  205. package/docs/agent-loop.md +222 -0
  206. package/docs/architecture.md +228 -0
  207. package/docs/bench.md +293 -0
  208. package/docs/budgets.md +185 -0
  209. package/docs/build-your-own-harness.md +424 -0
  210. package/docs/cookbook.md +375 -0
  211. package/docs/development.md +150 -0
  212. package/docs/evaluation.md +450 -0
  213. package/docs/features.md +1320 -0
  214. package/docs/getting-started.md +196 -0
  215. package/docs/headless.md +183 -0
  216. package/docs/images/approval.png +0 -0
  217. package/docs/images/chat.png +0 -0
  218. package/docs/images/daylight.png +0 -0
  219. package/docs/images/loop.png +0 -0
  220. package/docs/images/palette.png +0 -0
  221. package/docs/images/running.png +0 -0
  222. package/docs/images/subagent-done.png +0 -0
  223. package/docs/images/subagent-running.png +0 -0
  224. package/docs/images/welcome.png +0 -0
  225. package/docs/index.md +25 -0
  226. package/docs/library.md +276 -0
  227. package/docs/plugins.md +691 -0
  228. package/docs/providers.md +175 -0
  229. package/docs/safety.md +237 -0
  230. package/docs/usage.md +348 -0
  231. package/docs/why.md +155 -0
  232. package/docs/writing-guide.md +39 -0
  233. package/package.json +72 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 amirhossein jofreh
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.
package/README.md CHANGED
@@ -1,3 +1,213 @@
1
- # Temporary Holding Version
1
+ # Amness
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ **An advanced, hackable harness for coding agents.** Any model, your own keys, and every part of the loop (guardrails, budgets, tools, prompts, evals) is something you can see, change and measure.
4
+
5
+ [![CI](https://github.com/amirsdream/Amness/actions/workflows/ci.yml/badge.svg)](https://github.com/amirsdream/Amness/actions/workflows/ci.yml)
6
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
7
+ ![Node](https://img.shields.io/badge/node-%E2%89%A5%2022.18-339933)
8
+ ![Runtime dependencies](https://img.shields.io/badge/runtime%20dependencies-0-brightgreen)
9
+
10
+ <p align="center"><img src="docs/images/chat.png" alt="Amness full-screen interface: cards, diff, sidebar, input panel" width="900"></p>
11
+
12
+ > **Who is this for?** Power users who outgrow closed tools: people who want to choose the model, read the loop, write their own guardrails, and *test* whether a change to the harness actually helps. If you want something that works with zero setup, Claude Code and Codex are excellent and you should use them. Amness is for when you want to open the hood. Newer features here are tested but not yet proven on real tasks; see [Status](#status-what-is-and-is-not-proven).
13
+
14
+ ## Quick start
15
+
16
+ You need **Node 22.18+**, git, and an API key (OpenAI or Anthropic) or a local model server.
17
+
18
+ ```bash
19
+ git clone https://github.com/amirsdream/Amness.git && cd Amness && npm install
20
+ export OPENAI_API_KEY=sk-... # or ANTHROPIC_API_KEY=sk-ant-...
21
+ npm link # gives you the `amness` command
22
+ cd ~/your-project && amness # start a conversation in your project
23
+ ```
24
+
25
+ More ways to start:
26
+
27
+ ```bash
28
+ amness "fix the failing test" # start with a prompt
29
+ amness -c # continue the last conversation here
30
+ amness run --provider ollama --model qwen2.5-coder:7b "list the TODO comments" # a local model, no key needed (in the chat, use /provider and /model)
31
+ amness demo # a scripted tour of the guardrails, no key needed
32
+ ```
33
+
34
+ New to it? Follow the [step-by-step guide](docs/getting-started.md). Inside the chat: `/help` lists everything · `Shift+Tab` changes how much it may do without asking · `Ctrl+P` opens the command palette · `@file` attaches a file or image · `!cmd` runs a shell command · `#note` saves a memory.
35
+
36
+ ## What it looks like
37
+
38
+ <p align="center"><img src="docs/images/approval.png" alt="An edit waiting for your approval, with the diff" width="780"></p>
39
+
40
+ This is the screen you will see most. The agent wants to change a file, shows you the exact diff, and waits. More screenshots (subagents, the loop view, themes) are in the [step-by-step guide](docs/getting-started.md).
41
+
42
+ ## Examples
43
+
44
+ Each example says what you type, what happens, and why it is useful.
45
+
46
+ ### 1. Your first change, in the chat
47
+
48
+ ```bash
49
+ cd ~/your-project
50
+ amness
51
+ ```
52
+
53
+ Then type a request in plain words:
54
+
55
+ ```
56
+ ❯ The login form accepts an empty password. Fix it and add a test.
57
+ ```
58
+
59
+ **What happens.** The agent reads the relevant files, then proposes a change. For each edit it shows you the diff and asks: apply it? Press Enter to accept. When it is done, it tells you what it changed and what it ran to check.
60
+
61
+ **Why it is useful.** Nothing changes without your approval (in the default mode). If you do not like the result, type `/undo`. It puts back the files and the conversation as they were before that request, including files that shell commands changed.
62
+
63
+ **Tip.** `Shift+Tab` changes how much the agent may do without asking: ask for everything, auto-accept edits, or plan only (read-only). `/mode yolo` skips most questions, but a safety floor still blocks things like `rm -rf /`.
64
+
65
+ ### 2. Make the agent prove its work
66
+
67
+ Without a check, an agent can say "fixed!" and be wrong. Give it a command that decides:
68
+
69
+ ```bash
70
+ amness run --verify "npm test" "the date parser fails on leap days, fix it"
71
+ ```
72
+
73
+ - `--verify "npm test"` is the **proof command**. The agent may not finish until this command succeeds. Use your own test command here (`pytest -q`, `go test ./...`, `cargo test`, ...).
74
+ - The last text is the **task**.
75
+
76
+ **What happens.** The agent works, then tries to finish. Amness runs `npm test`. If it fails, the finish is rejected and the agent must keep going. Amness also compares the agent's summary with what really happened. If the summary says "all tests pass" but no test ran after the last edit, it is rejected too.
77
+
78
+ **Why it is useful.** You can run this in CI or a script and trust the exit code: `0` means finished and verified, `1` means not finished. In the chat, `/verify npm test` does the same.
79
+
80
+ ### 3. Keep the cost under control
81
+
82
+ Long tasks can use a lot of tokens (the pieces of text you pay for). Amness lets you set a limit and tells the model about it:
83
+
84
+ ```
85
+ /budget 200k
86
+ ```
87
+
88
+ **What happens.** The limit applies to each request you send. At 50%, 75% and 90% of it, the model is told to start wrapping up. Just before the limit, Amness asks for one last short report, so you get what was found instead of a bare "budget exhausted" error. The sidebar shows the percentage used.
89
+
90
+ **Why it is useful.** Exploring a big codebase with subagents can burn tokens fast. The limit and the notes keep a long run from ending with nothing. See [Budgets](docs/budgets.md).
91
+
92
+ ### 4. Use a local model (no API key)
93
+
94
+ ```bash
95
+ ollama pull qwen2.5-coder:7b # download a model that can call tools
96
+ amness # start the chat, then type /provider and choose "Ollama (local)"
97
+ ```
98
+
99
+ Or, for one headless task:
100
+
101
+ ```bash
102
+ amness run --provider ollama --model qwen2.5-coder:7b "list the TODO comments in src"
103
+ ```
104
+
105
+ **Why it is useful.** Your code never leaves your machine. Small local models are weaker at calling tools, so start with simple tasks. See [Providers](docs/providers.md).
106
+
107
+ ### 5. Test whether a harness change really helps
108
+
109
+ Do not guess whether the reviewer, a guard, or a different model helps. Measure it:
110
+
111
+ ```bash
112
+ amness eval --builtin hard --variants baseline,full,full+review --trials 3
113
+ ```
114
+
115
+ It runs 6 built-in tasks under three setups, 3 times each, and prints a table like this:
116
+
117
+ ```
118
+ variant pass [95% CI] pass^3 tok/solved steps secs
119
+ baseline 89% [67%-100%] 83% 15.2k 8.2 11.4
120
+ full 83% [50%-100%] 83% 14.7k 8.1 10.5
121
+ full+review 89% [67%-100%] 83% 26.3k 9.9 19.5
122
+ reading: with 6 tasks only differences above ~81 points can be detected; "inconclusive" means the data cannot tell.
123
+ ```
124
+
125
+ **How to read it.**
126
+ - `pass` is the share of runs that solved the task, with a 95% confidence range in brackets. A wide range means "not sure yet".
127
+ - `pass^3` is the chance that all 3 tries at a task succeed (how reliable it is).
128
+ - `tok/solved` is the tokens spent for each solved task. A setup that is cheap but fails a lot is not cheap.
129
+ - The last line is the honest summary. Here the answer is: no difference is visible, and `full+review` costs almost twice the tokens. That was a real run (gpt-4.1-mini).
130
+
131
+ **Why it is useful.** You see what each part of the harness really costs and gives. You can run it on your own tasks too: [Evaluation guide](docs/evaluation.md).
132
+
133
+ ### 6. Add your own rule with a plugin
134
+
135
+ A plugin is a TypeScript file that runs inside Amness. This one refuses to edit lockfiles and makes the agent say how it verified its work. Save it as `.amness/plugins/house-rules.ts`:
136
+
137
+ ```ts
138
+ export default {
139
+ name: "house-rules",
140
+ hooks: {
141
+ // runs before every tool call
142
+ PreToolUse: ({ tool, args }) =>
143
+ /package-lock\.json$/.test(String((args as any).path)) && tool.endsWith("_file")
144
+ ? { block: "lockfiles are generated: run the package manager instead" } // refuse, and tell the model why
145
+ : undefined, // otherwise do nothing
146
+ // runs when the agent tries to finish
147
+ Stop: ({ summary }) =>
148
+ /test|build|lint/i.test(String(summary)) ? undefined : { block: "Say which command you ran to verify this." },
149
+ },
150
+ variants: { strict: { off: [], verify: true } }, // a setup you can compare against the default in an eval
151
+ };
152
+ ```
153
+
154
+ **What happens.** The next time you start Amness in this project, it asks you to approve the plugin (it shows what the file appears to touch). After that, the two rules apply to every session. A `block` message goes back to the model as the reason, so it can change its plan.
155
+
156
+ **Compare it with the default** (see example 5):
157
+
158
+ ```bash
159
+ amness eval --plugin .amness/plugins/house-rules.ts --variants full,strict --trials 3
160
+ ```
161
+
162
+ More plugin ideas (finish gates, policies, loop strategies, custom metrics) are in [Plugins](docs/plugins.md) and the [Cookbook](docs/cookbook.md).
163
+
164
+ ## What you get
165
+
166
+ | | |
167
+ |---|---|
168
+ | **A loop that checks itself** | A finish is compared with a record of what really ran (edits, commands, exit codes). Your `verify` command must pass. An optional independent reviewer can object. Loops, stalls and malformed calls are caught. Token budget notes and a final report mean a long run ends with an answer, not a bare "budget exhausted". |
169
+ | **Guardrails you control** | Permission rules (allow / ask / deny) with a safety floor that holds even in `yolo`, an OS sandbox (macOS, Linux), secrets masked before the model sees them, commands copied from untrusted text need approval, `/undo` also reverts what shell commands changed. |
170
+ | **Cost under control** | Staged context trimming that keeps the provider's prompt cache valid, a shared rate limiter for parallel agents (honours `Retry-After`), subagent budget slices, optional routing of exploration to a cheaper model, optional server-side compaction. |
171
+ | **Make it yours** | [Plugins](docs/plugins.md) (in-process hooks on 8 loop events, tools, prompt rewrites, eval graders and variants), shell hooks, skills, custom subagents, MCP servers, your own slash commands, `AGENTS.md`, a library API. |
172
+ | **Evaluate and improve** | `amness eval` (ablations, SWE-bench-format suites, injection suite, leak audit), trace replay, failure mining, `amness tune` (changes kept only if they hold on unseen tasks). |
173
+ | **Works where you work** | Full-screen and inline terminal UI, headless mode, git worktree sessions with `/review` and `/pr`, scheduled runs, a GitHub Action, an editor server (`amness acp`), image input, session branching. |
174
+
175
+ Models: OpenAI (Responses and Chat), Claude, and any OpenAI-compatible local server. No runtime dependencies.
176
+
177
+ ## Choose Amness if, choose something else if
178
+
179
+ **Choose Amness if** you want to pick the model per task or per role, run it from CI with your own limits, write your own guardrails or loop rules as code, compare harness changes with statistics, or read and modify every part of the agent.
180
+
181
+ **Choose something else if** you want the most polished zero-config experience, you rely on a subscription plan rather than API keys, you need a Windows sandbox or a VS Code extension today, or you do not want to maintain tooling. Amness is young and has one maintainer.
182
+
183
+ ## Status: what is and is not proven
184
+
185
+ - **Tested:** about 375 automated tests (scripted models, mock servers, real git repositories, a pseudo-terminal), CI on Linux and Windows, and a Docker and npm-package smoke test.
186
+ - **Measured on real models (small):** the guards and the reviewer showed no detectable pass-rate effect on [these tasks and models](docs/evaluation.md#measured-results-so-far); the guards and reviewer cost extra tokens, most visibly on strong models. Every newer feature (routing, `tune`, best-of-n, parallel parts, language-server diagnostics, the approval reviewer) is implemented and unit-tested but **not yet shown to help on real work**. The [roadmap](ROADMAP.md) lists the measurements still to run.
187
+ - **Platforms:** developed on macOS and Linux. Windows runs the test suite but has no OS sandbox. Not on npm yet.
188
+ - Cost figures are estimates. Small local models vary widely in tool-calling quality.
189
+
190
+ ## Documentation
191
+
192
+ | | |
193
+ |---|---|
194
+ | [Getting started](docs/getting-started.md) | a step-by-step first session, with screenshots |
195
+ | [Cookbook](docs/cookbook.md) | 12 task-based recipes: CI, best-of-n, budgets, plugins, evals, schedules |
196
+ | [Using the chat](docs/usage.md) | commands, keys, modes, mentions, images |
197
+ | [Features in depth](docs/features.md) | everything above, one section each |
198
+ | [Plugins: the harness as code](docs/plugins.md) | write your own loop rules, guardrails, tools and graders |
199
+ | [Evaluating the harness](docs/evaluation.md) | `amness eval`, statistics, measured results |
200
+ | [Bake-off: Amness vs Claude Code vs Codex](docs/bench.md) | run the same tasks through several agent tools and compare, with a Windows setup guide |
201
+ | [Budgets and subagents](docs/budgets.md) | why runs ran out of budget, rate limits, what the vendors recommend |
202
+ | [The agent loop](docs/agent-loop.md) · [Architecture](docs/architecture.md) | how it works inside |
203
+ | [Providers and local models](docs/providers.md) · [Headless and CI](docs/headless.md) · [Library](docs/library.md) | using it |
204
+ | [Safety and privacy](docs/safety.md) | what leaves your machine and what protects it |
205
+ | [Development](docs/development.md) · [Roadmap](ROADMAP.md) · [Changelog](CHANGELOG.md) | contributing and what is next |
206
+
207
+ **Safety in four lines.** Data goes only to the provider you configure; there is no telemetry. File tools stay inside the project and must read a file before editing it; shell commands are **not** sandboxed unless you turn the sandbox on (`/sandbox workspace`). Text from the web or tool servers is treated as data. Treat hooks, plugins, skills and `AGENTS.md` from a repository you cloned as untrusted: project hooks, plugins and allow-rules only run after you approve that exact version of the files.
208
+
209
+ ## Contributing
210
+
211
+ Issues and pull requests are welcome. `npm install && npm test` runs the suite (about two minutes); `npm run typecheck` checks types; `python3 test/pty/tui.py` drives the real terminal UI. See [docs/development.md](docs/development.md).
212
+
213
+ Licensed [MIT](LICENSE) © 2026 amirhossein jofreh.
@@ -0,0 +1,7 @@
1
+ import { type Model } from "../src/index.ts";
2
+ export declare const ACP_HELP = "usage: amness acp\n Speak the Agent Client Protocol (JSON-RPC lines) on stdin/stdout, for editors such as Zed or JetBrains.\n Uses your configured provider and model. Risky actions are sent to the editor as permission requests.\n Example Zed setting: \"agent_servers\": { \"Amness\": { \"command\": \"amness\", \"args\": [\"acp\"] } }";
3
+ export declare function runAcp(deps: {
4
+ model: () => Model;
5
+ version: string;
6
+ maxTokens: number;
7
+ }): Promise<number>;
@@ -0,0 +1,14 @@
1
+ // `amness acp`: serve the Agent Client Protocol on stdin/stdout so an editor can host Amness. stdout carries only protocol messages; everything else goes to stderr.
2
+ import { Budget, createCodeAgent, serveAcp } from "../src/index.js";
3
+ export const ACP_HELP = `usage: amness acp
4
+ Speak the Agent Client Protocol (JSON-RPC lines) on stdin/stdout, for editors such as Zed or JetBrains.
5
+ Uses your configured provider and model. Risky actions are sent to the editor as permission requests.
6
+ Example Zed setting: "agent_servers": { "Amness": { "command": "amness", "args": ["acp"] } }`;
7
+ export async function runAcp(deps) {
8
+ const model = deps.model();
9
+ await serveAcp({
10
+ input: process.stdin, output: process.stdout, version: deps.version,
11
+ makeAgent: ({ cwd, onEvent, approve, signal }) => createCodeAgent({ model, cwd, chat: true, approve, onEvent, signal, budget: new Budget({ maxTokens: deps.maxTokens, maxMs: 60 * 60_000 }), permissions: { mode: () => "default" } }),
12
+ });
13
+ return 0;
14
+ }
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};