@trenchwork/erosolar 1.1.41 → 1.1.43

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 (72) hide show
  1. package/LICENSE +16 -21
  2. package/README.md +236 -236
  3. package/agents/erosolar-code.rules.json +199 -199
  4. package/dist/bin/erosolar.js +0 -0
  5. package/dist/capabilities/enhancedGitCapability.js +63 -63
  6. package/dist/config.js +12 -12
  7. package/dist/contracts/models.schema.json +9 -9
  8. package/dist/contracts/module-schema.json +367 -367
  9. package/dist/contracts/schemas/agent-profile.schema.json +157 -157
  10. package/dist/contracts/schemas/agent-rules.schema.json +238 -238
  11. package/dist/contracts/schemas/agent-schemas.schema.json +528 -528
  12. package/dist/contracts/schemas/agent.schema.json +90 -90
  13. package/dist/contracts/schemas/tool-selection.schema.json +174 -174
  14. package/dist/contracts/tools.schema.json +42 -42
  15. package/dist/core/constants.js +7 -7
  16. package/dist/core/contextManager.js +16 -16
  17. package/dist/core/hitl.d.ts.map +1 -1
  18. package/dist/core/hitl.js +17 -16
  19. package/dist/core/hitl.js.map +1 -1
  20. package/dist/core/permissionMode.d.ts +40 -0
  21. package/dist/core/permissionMode.d.ts.map +1 -0
  22. package/dist/core/permissionMode.js +86 -0
  23. package/dist/core/permissionMode.js.map +1 -0
  24. package/dist/core/secretStore.js +1 -1
  25. package/dist/core/taskCompletionDetector.js +17 -17
  26. package/dist/core/toolRuntime.d.ts.map +1 -1
  27. package/dist/core/toolRuntime.js +21 -2
  28. package/dist/core/toolRuntime.js.map +1 -1
  29. package/dist/headless/interactiveShell.d.ts +7 -5
  30. package/dist/headless/interactiveShell.d.ts.map +1 -1
  31. package/dist/headless/interactiveShell.js +105 -167
  32. package/dist/headless/interactiveShell.js.map +1 -1
  33. package/dist/leanAgent.js +38 -38
  34. package/dist/runtime/agentSession.js +4 -4
  35. package/dist/shell/commandRegistry.js +6 -6
  36. package/dist/shell/commandRegistry.js.map +1 -1
  37. package/dist/shell/toolPresentation.d.ts +47 -0
  38. package/dist/shell/toolPresentation.d.ts.map +1 -0
  39. package/dist/shell/toolPresentation.js +260 -0
  40. package/dist/shell/toolPresentation.js.map +1 -0
  41. package/dist/shell/vimMode.js +29 -29
  42. package/dist/tools/bashTools.js +2 -2
  43. package/dist/tools/bashTools.js.map +1 -1
  44. package/dist/tools/hitlTools.js +18 -18
  45. package/dist/tools/webTools.d.ts.map +1 -1
  46. package/dist/tools/webTools.js +75 -3
  47. package/dist/tools/webTools.js.map +1 -1
  48. package/dist/ui/ink/App.d.ts +2 -0
  49. package/dist/ui/ink/App.d.ts.map +1 -1
  50. package/dist/ui/ink/App.js +2 -2
  51. package/dist/ui/ink/App.js.map +1 -1
  52. package/dist/ui/ink/ChatStatic.d.ts +6 -5
  53. package/dist/ui/ink/ChatStatic.d.ts.map +1 -1
  54. package/dist/ui/ink/ChatStatic.js +35 -10
  55. package/dist/ui/ink/ChatStatic.js.map +1 -1
  56. package/dist/ui/ink/InkPromptController.d.ts +11 -0
  57. package/dist/ui/ink/InkPromptController.d.ts.map +1 -1
  58. package/dist/ui/ink/InkPromptController.js +50 -11
  59. package/dist/ui/ink/InkPromptController.js.map +1 -1
  60. package/dist/ui/ink/Prompt.d.ts +2 -0
  61. package/dist/ui/ink/Prompt.d.ts.map +1 -1
  62. package/dist/ui/ink/Prompt.js +31 -2
  63. package/dist/ui/ink/Prompt.js.map +1 -1
  64. package/dist/ui/ink/StatusLine.d.ts +16 -8
  65. package/dist/ui/ink/StatusLine.d.ts.map +1 -1
  66. package/dist/ui/ink/StatusLine.js +45 -4
  67. package/dist/ui/ink/StatusLine.js.map +1 -1
  68. package/dist/ui/theme.d.ts.map +1 -1
  69. package/dist/ui/theme.js +4 -6
  70. package/dist/ui/theme.js.map +1 -1
  71. package/package.json +116 -116
  72. package/scripts/postinstall.cjs +57 -57
package/LICENSE CHANGED
@@ -1,21 +1,16 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Erosolar AI
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.
1
+ Erosolar Coder License — Proprietary / Closed Source
2
+
3
+ Copyright (c) 2025 Erosolar AI. All rights reserved.
4
+
5
+ This software and associated documentation files (the "Software") are proprietary
6
+ and confidential. Unauthorized copying, distribution, modification, public
7
+ display, or any use of the Software, in whole or in part, via any medium, is
8
+ strictly prohibited without prior written permission from Erosolar AI.
9
+
10
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. IN NO EVENT
11
+ SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
12
+ OTHER LIABILITY ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE.
13
+
14
+ No license, express or implied, is granted for any patent, trademark, copyright,
15
+ or other intellectual property right. All rights not expressly granted are
16
+ reserved by Erosolar AI.
package/README.md CHANGED
@@ -1,236 +1,236 @@
1
- # Erosolar Coder
2
-
3
- [![npm version](https://img.shields.io/npm/v/@trenchwork/erosolar)](https://www.npmjs.com/package/@trenchwork/erosolar)
4
-
5
- > **First public research run — 3 hours of unattended offensive
6
- > security research, useful enough to submit to Google Bug Hunters.**
7
- >
8
- > The first prompt I asked
9
- > [erosolar-coder](https://www.npmjs.com/package/@trenchwork/erosolar)
10
- > to run autonomously was an automated security-research pass for
11
- > submission to the [Google Bug Hunters](https://bughunters.google.com/)
12
- > program. It ran unattended for **3 continuous hours** on a CLI
13
- > still under initial development and produced useful offensive-
14
- > security research. For a starting CLI that's an amazing accomplishment.
15
- >
16
- > The open-source first-prompt result is at
17
- > [`Aroxora/google-bug-hunters-initial-AI-research-and-offensive-research-results`](https://github.com/Aroxora/google-bug-hunters-initial-AI-research-and-offensive-research-results).
18
- > All subsequent research is in a separate **private** repository
19
- > under responsible-AI and cyber-safety guidelines, by my own AI-safety,
20
- > regulatory, and moral judgement. I'm open-sourcing the first prompt
21
- > that ran — which showed extreme promise — to share the research
22
- > result responsibly with others.
23
-
24
- ---
25
-
26
- Erosolar Coder is an AI-powered CLI agent that uses DeepSeek-V4-Pro to
27
- deliver coding assistance at ~30× the cost-efficiency of comparable
28
- agents. It is a terminal-only coding CLI — a fully Ink-rendered shell
29
- powered by DeepSeek-V4-Pro on your own API key (bring-your-own-key; no
30
- login, no account).
31
-
32
- The agent runs with the rails turned down for full-machine
33
- offensive-security research. Its security does **not** rest on hiding the
34
- source — this repo is inspired by [Project Glasswing](GLASSWING.md), an
35
- Anthropic initiative: the design
36
- is open to scrutiny, and what's protected is protected by small, rotatable
37
- secrets (keys in the OS keychain / secret store), not by obscurity. Under
38
- U.S. law, offensive-cyber tooling is a *dual-use commercial item* (Commerce
39
- Control List,
40
- [ECCN 4D004](https://www.federalregister.gov/documents/2021/10/21/2021-22774/information-security-controls-cybersecurity-items)),
41
- not a "defense article" on the U.S. Munitions List — so it is not a
42
- "weapon" in the ITAR sense. EAR controls govern *international export*;
43
- they do not restrict domestic development or sale to U.S. government
44
- agencies, and BIS's vulnerability-disclosure carve-out explicitly exempts
45
- ordinary security-research activity. See
46
- [`/about`](https://ero.solar/about) for the full disclosure and
47
- [`GLASSWING.md`](GLASSWING.md) for the security principle.
48
-
49
- ## Install
50
-
51
- ```bash
52
- npm install -g @trenchwork/erosolar
53
- ```
54
-
55
- Exposes three synonyms on PATH: `erosolar`, `erosolar-coder`,
56
- `deepseek`. Pick whichever you prefer.
57
-
58
- The bin is **interactive-only**. Running it launches the Ink-rendered
59
- shell — there are no argv flags, no print/headless mode, no initial
60
- prompt argument. Anything after the command name is ignored.
61
-
62
- ```bash
63
- erosolar # launch the Ink shell
64
- ```
65
-
66
- Set your DeepSeek key once, then run `erosolar`:
67
-
68
- - In-shell: `/key sk-...` (or `/secrets` for a menu)
69
- - Or via env: `export DEEPSEEK_API_KEY=sk-...`
70
-
71
- In-shell commands: `/model`, `/key`, `/secrets`, `/auto`,
72
- `/adversarial`, `/ultracode`, `/stats`, `/debug`, `/keys`, `/clear`,
73
- `/exit`. Run `/help` in the shell for the full list.
74
-
75
- A non-TTY invocation (`erosolar < /dev/null`, `git diff | erosolar`,
76
- CI without a PTY) fails fast with a clear message — there is no
77
- scriptable path on purpose. If you want one, file an issue.
78
-
79
- ## How it works (skim)
80
-
81
- ```
82
- CLI ──Firebase ID token──▶ AWS API Gateway ─▶ AWS Lambda
83
- │ │
84
- ▼ ▼
85
- Firebase Hosting + Auth DeepSeek / Stripe / GitHub /
86
- + Firestore (Spark plan) Tavily / Anthropic / Proton SMTP
87
- ```
88
-
89
- Four boxes, one trust boundary (the Firebase ID token), and one
90
- reason this isn't all on Firebase: the original GCP account was
91
- suspended and the new one is on the Spark plan, which doesn't run
92
- Cloud Functions. Everything stateful that Spark *does* support
93
- (Hosting, Auth, Firestore, FCM) stayed there. Everything else moved
94
- to AWS — Lambda for handlers, Secrets Manager for the 14+ shared
95
- keys, EventBridge for cron schedules, no extra infrastructure.
96
-
97
- ## Layout
98
-
99
- ```
100
- src/ CLI source
101
- core/ Auth, secret store, hooks, HITL, agent loop, adversarial verifier
102
- runtime/ Agent controller, session, tool runtime
103
- tools/ Read / Edit / Write / Bash / Glob / Grep / Web (Helia)
104
- capabilities/ Pluggable capability modules
105
- ui/ Ink renderer (theme + ink/*) — terminal UI
106
- headless/ Interactive shell + CLI bootstrap
107
- contracts/ Shared schemas (agent, tools, profiles)
108
- agents/ Agent rulebooks (erosolar-code.rules.json)
109
- test/ jest suites (unit, integration, ink, ui-pty e2e)
110
- GLASSWING.md Glasswing-inspired security principle (transparency over secrecy)
111
- CLAUDE.md Project conventions for agentic contributors
112
- ```
113
-
114
- ## Build / test
115
-
116
- ```bash
117
- npm install # deps
118
- npx tsc # build
119
- npm test # full jest suite
120
- npx jest --config jest.config.cjs --testPathPatterns "v[0-9]+\\.[0-9]+-hardening" # hardening only
121
- ```
122
-
123
- The hardening suite (`test/v*-hardening.test.ts`) is the canonical proof
124
- that closed security/correctness issues stay closed. Per the
125
- Glasswing-inspired "checkable by anyone" pillar, verification runs in two places:
126
- a local pre-push hook for fast feedback, and a public GitHub Actions
127
- workflow (`.github/workflows/ci.yml`) on every push and PR.
128
-
129
- ## Cost
130
-
131
- Per-million tokens at list rates (May 2026, short-context tier):
132
-
133
- | Tool | Model | Input $/M | Output $/M |
134
- | --- | --- | --- | --- |
135
- | **Erosolar Coder** (now) | `deepseek-v4-pro` *75% off through 2026-05-31* | **$0.435** | **$1.74** |
136
- | **Erosolar Coder** (after 2026-05-31) | `deepseek-v4-pro` list | $1.74 | $3.48 |
137
- | Claude Code (Sonnet) | `claude-sonnet-4.6` | $3.00 | $15.00 |
138
- | Claude Code (Opus) | `claude-opus-4.7` | $5.00 | $25.00 |
139
- | OpenAI Codex CLI | `gpt-5.5` | $5.00 | $30.00 |
140
- | OpenAI Codex CLI (Pro) | `gpt-5.5-pro` | $30.00 | $180.00 |
141
- | Cursor agents | `claude-sonnet-4.6` | $3.00 | $15.00 |
142
- | Gemini CLI | `gemini-3.1-pro` | $2.00 | $12.00 |
143
- | Grok CLI | `grok-4.3` | $1.25 | $2.50 |
144
-
145
- DeepSeek's 75%-off promotional rate applies until **2026-05-31
146
- 15:59 UTC**. After that, the list price ($1.74 / $3.48) takes over
147
- — still well under every Claude / OpenAI / Cursor option, and
148
- within Grok's range. Long-context surcharges (prompts > 200k
149
- tokens): `gpt-5.5` doubles to $10 / $45; `gpt-5.5-pro` doubles to
150
- $60 / $270; `gemini-3.1-pro` goes to $4 / $18. Cache-write /
151
- cache-hit reductions on Claude (`$0.50` / MTok cache hit on Opus
152
- 4.7, `$10` / MTok 1h cache write) and on `gpt-5.5` (cached input
153
- $0.50–$1.00 / MTok depending on context tier) further close the
154
- gap on those vendors at the cost of operational complexity.
155
- DeepSeek-V4-Pro has no cache tier — list price is the price.
156
-
157
- A representative coding session (~150k input + 30k output, all
158
- short-context) costs:
159
-
160
- | Tool | Cost | vs. Erosolar (now) |
161
- | --- | --- | --- |
162
- | **Erosolar Coder** — promo through 2026-05-31 | **~$0.09** | — |
163
- | **Erosolar Coder** — list (post-2026-05-31) | ~$0.37 | 4.0× |
164
- | Grok CLI (`grok-4.3`) | ~$0.26 | 2.9× |
165
- | Gemini CLI (`gemini-3.1-pro`) | ~$0.66 | 7.2× |
166
- | Claude Code (Sonnet 4.6) | ~$0.90 | 9.8× |
167
- | Claude Code (Opus 4.7) | ~$1.50 | 16× |
168
- | OpenAI Codex CLI (`gpt-5.5`) | ~$1.65 | 18× |
169
- | OpenAI Codex CLI (`gpt-5.5-pro`) | ~$9.90 | 108× |
170
-
171
- DeepSeek-V4-Pro performs in the same SWE-bench Verified band as
172
- Sonnet 4.6 on most coding benchmarks, so the ~10× cost gap (today)
173
- is real delivered savings, not a quality concession. After the
174
- promotional period the gap narrows to ~2.4× vs. Sonnet — still a
175
- material saving, but Grok 4.3 will be the cheapest cell on the
176
- table at that point and worth a side-by-side eval.
177
-
178
- ## Authorization scope
179
-
180
- Erosolar Coder ships with the rails turned down for security
181
- research, red-team, and infrastructure automation that mainstream
182
- agents refuse to help with — destructive shell commands, sudo,
183
- credential testing, exploit scaffolding. Use it on systems you own
184
- or are explicitly authorized to test. The CLI logs the authorization
185
- scope before running offensive tooling — read it.
186
-
187
- ## Surface
188
-
189
- - **Terminal CLI** — `npm install -g @trenchwork/erosolar`,
190
- then `erosolar`. A fully Ink-rendered coding shell — the one surface.
191
-
192
- Bring your own DeepSeek API key — set it in-shell via `/key sk-...` or
193
- `/secrets`, or out-of-band via the `DEEPSEEK_API_KEY` env var. No login,
194
- no account. Web tasks the agent needs are handled in-CLI by the `Helia`
195
- web tool (search / fetch / extract), not a separate browser.
196
-
197
- ## Contributing
198
-
199
- Read `CLAUDE.md` first — it documents the testing discipline and the
200
- "research before custom code" rules this repo enforces. Every fix
201
- must ship with a test that fails before and passes after.
202
-
203
- Test gate is **local, not CI**. Install the pre-push hook once per
204
- checkout — it runs `npm test` before every `git push` so a broken
205
- build never reaches origin:
206
-
207
- ```bash
208
- git config core.hooksPath scripts/git-hooks
209
- ```
210
-
211
- Bypass in an emergency with `git push --no-verify`. The previous
212
- `.github/workflows/hardening.yml` workflow was deleted because the
213
- repo is private + solo and GH Actions runs were burning free-tier
214
- minutes + sending failure emails to cover what `npm test` already
215
- covers locally.
216
-
217
- ## Contact
218
-
219
- Bo Shang — building Ero.Solar.
220
-
221
- - Email: [bo@ero.solar](mailto:bo@ero.solar)
222
- - Phone: [+1 508-260-0326](tel:+15082600326)
223
- - GitHub: [@Aroxora](https://github.com/Aroxora)
224
- - LinkedIn: [linkedin.com/in/bo-shang-04923b3a6](https://www.linkedin.com/in/bo-shang-04923b3a6/)
225
- - X: [@erolunar](https://x.com/erolunar)
226
- - YouTube: [@erosolarai](https://www.youtube.com/@erosolarai)
227
-
228
- ## License
229
-
230
- MIT
231
-
232
- ---
233
-
234
- erosolar-coder is an independent project and is not affiliated with or endorsed
235
- by Anthropic. Project Glasswing is an Anthropic initiative; this repo is only
236
- inspired by it.
1
+ # Erosolar Coder
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@trenchwork/erosolar)](https://www.npmjs.com/package/@trenchwork/erosolar)
4
+
5
+ > **First public research run — 3 hours of unattended offensive
6
+ > security research, useful enough to submit to Google Bug Hunters.**
7
+ >
8
+ > The first prompt I asked
9
+ > [erosolar-coder](https://www.npmjs.com/package/@trenchwork/erosolar)
10
+ > to run autonomously was an automated security-research pass for
11
+ > submission to the [Google Bug Hunters](https://bughunters.google.com/)
12
+ > program. It ran unattended for **3 continuous hours** on a CLI
13
+ > still under initial development and produced useful offensive-
14
+ > security research. For a starting CLI that's an amazing accomplishment.
15
+ >
16
+ > The open-source first-prompt result is at
17
+ > [`Aroxora/google-bug-hunters-initial-AI-research-and-offensive-research-results`](https://github.com/Aroxora/google-bug-hunters-initial-AI-research-and-offensive-research-results).
18
+ > All subsequent research is in a separate **private** repository
19
+ > under responsible-AI and cyber-safety guidelines, by my own AI-safety,
20
+ > regulatory, and moral judgement. I'm open-sourcing the first prompt
21
+ > that ran — which showed extreme promise — to share the research
22
+ > result responsibly with others.
23
+
24
+ ---
25
+
26
+ Erosolar Coder is an AI-powered CLI agent that uses DeepSeek-V4-Pro to
27
+ deliver coding assistance at ~30× the cost-efficiency of comparable
28
+ agents. It is a terminal-only coding CLI — a fully Ink-rendered shell
29
+ powered by DeepSeek-V4-Pro on your own API key (bring-your-own-key; no
30
+ login, no account).
31
+
32
+ The agent runs with the rails turned down for full-machine
33
+ offensive-security research. Its security does **not** rest on hiding the
34
+ source — this repo is inspired by [Project Glasswing](GLASSWING.md), an
35
+ Anthropic initiative: the design
36
+ is open to scrutiny, and what's protected is protected by small, rotatable
37
+ secrets (keys in the OS keychain / secret store), not by obscurity. Under
38
+ U.S. law, offensive-cyber tooling is a *dual-use commercial item* (Commerce
39
+ Control List,
40
+ [ECCN 4D004](https://www.federalregister.gov/documents/2021/10/21/2021-22774/information-security-controls-cybersecurity-items)),
41
+ not a "defense article" on the U.S. Munitions List — so it is not a
42
+ "weapon" in the ITAR sense. EAR controls govern *international export*;
43
+ they do not restrict domestic development or sale to U.S. government
44
+ agencies, and BIS's vulnerability-disclosure carve-out explicitly exempts
45
+ ordinary security-research activity. See
46
+ [`/about`](https://ero.solar/about) for the full disclosure and
47
+ [`GLASSWING.md`](GLASSWING.md) for the security principle.
48
+
49
+ ## Install
50
+
51
+ ```bash
52
+ npm install -g @trenchwork/erosolar
53
+ ```
54
+
55
+ Exposes three synonyms on PATH: `erosolar`, `erosolar-coder`,
56
+ `deepseek`. Pick whichever you prefer.
57
+
58
+ The bin is **interactive-only**. Running it launches the Ink-rendered
59
+ shell — there are no argv flags, no print/headless mode, no initial
60
+ prompt argument. Anything after the command name is ignored.
61
+
62
+ ```bash
63
+ erosolar # launch the Ink shell
64
+ ```
65
+
66
+ Set your DeepSeek key once, then run `erosolar`:
67
+
68
+ - In-shell: `/key sk-...` (or `/secrets` for a menu)
69
+ - Or via env: `export DEEPSEEK_API_KEY=sk-...`
70
+
71
+ In-shell commands: `/model`, `/key`, `/secrets`, `/auto`,
72
+ `/adversarial`, `/ultracode`, `/stats`, `/debug`, `/keys`, `/clear`,
73
+ `/exit`. Run `/help` in the shell for the full list.
74
+
75
+ A non-TTY invocation (`erosolar < /dev/null`, `git diff | erosolar`,
76
+ CI without a PTY) fails fast with a clear message — there is no
77
+ scriptable path on purpose. If you want one, file an issue.
78
+
79
+ ## How it works (skim)
80
+
81
+ ```
82
+ CLI ──Firebase ID token──▶ AWS API Gateway ─▶ AWS Lambda
83
+ │ │
84
+ ▼ ▼
85
+ Firebase Hosting + Auth DeepSeek / Stripe / GitHub /
86
+ + Firestore (Spark plan) Tavily / Anthropic / Proton SMTP
87
+ ```
88
+
89
+ Four boxes, one trust boundary (the Firebase ID token), and one
90
+ reason this isn't all on Firebase: the original GCP account was
91
+ suspended and the new one is on the Spark plan, which doesn't run
92
+ Cloud Functions. Everything stateful that Spark *does* support
93
+ (Hosting, Auth, Firestore, FCM) stayed there. Everything else moved
94
+ to AWS — Lambda for handlers, Secrets Manager for the 14+ shared
95
+ keys, EventBridge for cron schedules, no extra infrastructure.
96
+
97
+ ## Layout
98
+
99
+ ```
100
+ src/ CLI source
101
+ core/ Auth, secret store, hooks, HITL, agent loop, adversarial verifier
102
+ runtime/ Agent controller, session, tool runtime
103
+ tools/ Read / Edit / Write / Bash / Glob / Grep / Web (Helia)
104
+ capabilities/ Pluggable capability modules
105
+ ui/ Ink renderer (theme + ink/*) — terminal UI
106
+ headless/ Interactive shell + CLI bootstrap
107
+ contracts/ Shared schemas (agent, tools, profiles)
108
+ agents/ Agent rulebooks (erosolar-code.rules.json)
109
+ test/ jest suites (unit, integration, ink, ui-pty e2e)
110
+ GLASSWING.md Glasswing-inspired security principle (transparency over secrecy)
111
+ CLAUDE.md Project conventions for agentic contributors
112
+ ```
113
+
114
+ ## Build / test
115
+
116
+ ```bash
117
+ npm install # deps
118
+ npx tsc # build
119
+ npm test # full jest suite
120
+ npx jest --config jest.config.cjs --testPathPatterns "v[0-9]+\\.[0-9]+-hardening" # hardening only
121
+ ```
122
+
123
+ The hardening suite (`test/v*-hardening.test.ts`) is the canonical proof
124
+ that closed security/correctness issues stay closed. Per the
125
+ Glasswing-inspired "checkable by anyone" pillar, verification runs in two places:
126
+ a local pre-push hook for fast feedback, and a public GitHub Actions
127
+ workflow (`.github/workflows/ci.yml`) on every push and PR.
128
+
129
+ ## Cost
130
+
131
+ Per-million tokens at list rates (May 2026, short-context tier):
132
+
133
+ | Tool | Model | Input $/M | Output $/M |
134
+ | --- | --- | --- | --- |
135
+ | **Erosolar Coder** (now) | `deepseek-v4-pro` *75% off through 2026-05-31* | **$0.435** | **$1.74** |
136
+ | **Erosolar Coder** (after 2026-05-31) | `deepseek-v4-pro` list | $1.74 | $3.48 |
137
+ | Claude Code (Sonnet) | `claude-sonnet-4.6` | $3.00 | $15.00 |
138
+ | Claude Code (Opus) | `claude-opus-4.7` | $5.00 | $25.00 |
139
+ | OpenAI Codex CLI | `gpt-5.5` | $5.00 | $30.00 |
140
+ | OpenAI Codex CLI (Pro) | `gpt-5.5-pro` | $30.00 | $180.00 |
141
+ | Cursor agents | `claude-sonnet-4.6` | $3.00 | $15.00 |
142
+ | Gemini CLI | `gemini-3.1-pro` | $2.00 | $12.00 |
143
+ | Grok CLI | `grok-4.3` | $1.25 | $2.50 |
144
+
145
+ DeepSeek's 75%-off promotional rate applies until **2026-05-31
146
+ 15:59 UTC**. After that, the list price ($1.74 / $3.48) takes over
147
+ — still well under every Claude / OpenAI / Cursor option, and
148
+ within Grok's range. Long-context surcharges (prompts > 200k
149
+ tokens): `gpt-5.5` doubles to $10 / $45; `gpt-5.5-pro` doubles to
150
+ $60 / $270; `gemini-3.1-pro` goes to $4 / $18. Cache-write /
151
+ cache-hit reductions on Claude (`$0.50` / MTok cache hit on Opus
152
+ 4.7, `$10` / MTok 1h cache write) and on `gpt-5.5` (cached input
153
+ $0.50–$1.00 / MTok depending on context tier) further close the
154
+ gap on those vendors at the cost of operational complexity.
155
+ DeepSeek-V4-Pro has no cache tier — list price is the price.
156
+
157
+ A representative coding session (~150k input + 30k output, all
158
+ short-context) costs:
159
+
160
+ | Tool | Cost | vs. Erosolar (now) |
161
+ | --- | --- | --- |
162
+ | **Erosolar Coder** — promo through 2026-05-31 | **~$0.09** | — |
163
+ | **Erosolar Coder** — list (post-2026-05-31) | ~$0.37 | 4.0× |
164
+ | Grok CLI (`grok-4.3`) | ~$0.26 | 2.9× |
165
+ | Gemini CLI (`gemini-3.1-pro`) | ~$0.66 | 7.2× |
166
+ | Claude Code (Sonnet 4.6) | ~$0.90 | 9.8× |
167
+ | Claude Code (Opus 4.7) | ~$1.50 | 16× |
168
+ | OpenAI Codex CLI (`gpt-5.5`) | ~$1.65 | 18× |
169
+ | OpenAI Codex CLI (`gpt-5.5-pro`) | ~$9.90 | 108× |
170
+
171
+ DeepSeek-V4-Pro performs in the same SWE-bench Verified band as
172
+ Sonnet 4.6 on most coding benchmarks, so the ~10× cost gap (today)
173
+ is real delivered savings, not a quality concession. After the
174
+ promotional period the gap narrows to ~2.4× vs. Sonnet — still a
175
+ material saving, but Grok 4.3 will be the cheapest cell on the
176
+ table at that point and worth a side-by-side eval.
177
+
178
+ ## Authorization scope
179
+
180
+ Erosolar Coder ships with the rails turned down for security
181
+ research, red-team, and infrastructure automation that mainstream
182
+ agents refuse to help with — destructive shell commands, sudo,
183
+ credential testing, exploit scaffolding. Use it on systems you own
184
+ or are explicitly authorized to test. The CLI logs the authorization
185
+ scope before running offensive tooling — read it.
186
+
187
+ ## Surface
188
+
189
+ - **Terminal CLI** — `npm install -g @trenchwork/erosolar`,
190
+ then `erosolar`. A fully Ink-rendered coding shell — the one surface.
191
+
192
+ Bring your own DeepSeek API key — set it in-shell via `/key sk-...` or
193
+ `/secrets`, or out-of-band via the `DEEPSEEK_API_KEY` env var. No login,
194
+ no account. Web tasks the agent needs are handled in-CLI by the `Helia`
195
+ web tool (search / fetch / extract), not a separate browser.
196
+
197
+ ## Contributing
198
+
199
+ Read `CLAUDE.md` first — it documents the testing discipline and the
200
+ "research before custom code" rules this repo enforces. Every fix
201
+ must ship with a test that fails before and passes after.
202
+
203
+ Test gate is **local, not CI**. Install the pre-push hook once per
204
+ checkout — it runs `npm test` before every `git push` so a broken
205
+ build never reaches origin:
206
+
207
+ ```bash
208
+ git config core.hooksPath scripts/git-hooks
209
+ ```
210
+
211
+ Bypass in an emergency with `git push --no-verify`. The previous
212
+ `.github/workflows/hardening.yml` workflow was deleted because the
213
+ repo is private + solo and GH Actions runs were burning free-tier
214
+ minutes + sending failure emails to cover what `npm test` already
215
+ covers locally.
216
+
217
+ ## Contact
218
+
219
+ Bo Shang — building Ero.Solar.
220
+
221
+ - Email: [bo@ero.solar](mailto:bo@ero.solar)
222
+ - Phone: [+1 508-260-0326](tel:+15082600326)
223
+ - GitHub: [@Aroxora](https://github.com/Aroxora)
224
+ - LinkedIn: [linkedin.com/in/bo-shang-04923b3a6](https://www.linkedin.com/in/bo-shang-04923b3a6/)
225
+ - X: [@erolunar](https://x.com/erolunar)
226
+ - YouTube: [@erosolarai](https://www.youtube.com/@erosolarai)
227
+
228
+ ## License
229
+
230
+ MIT
231
+
232
+ ---
233
+
234
+ erosolar-coder is an independent project and is not affiliated with or endorsed
235
+ by Anthropic. Project Glasswing is an Anthropic initiative; this repo is only
236
+ inspired by it.