@agenticaiengineer/codingagent 0.0.1

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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 codingagent contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,281 @@
1
+ # @agenticaiengineer/codingagent
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@agenticaiengineer/codingagent)](https://www.npmjs.com/package/@agenticaiengineer/codingagent)
4
+ [![license](https://img.shields.io/npm/l/@agenticaiengineer/codingagent)](LICENSE)
5
+
6
+ An autonomous AI coding agent for your terminal.
7
+
8
+ Read, write, and edit files. Run shell commands. Search the web. Spawn sub-agents. Manage sessions. All from a single interactive REPL.
9
+
10
+ ---
11
+
12
+ ## Install
13
+
14
+ ```bash
15
+ npm install -g @agenticaiengineer/codingagent
16
+ ```
17
+
18
+ > **Requires Node.js 18+** and an [Anthropic API key](https://console.anthropic.com/).
19
+
20
+ ## Quick Start
21
+
22
+ ```bash
23
+ # Set your API key (Linux/macOS)
24
+ export ANTHROPIC_API_KEY=sk-ant-...
25
+
26
+ # Set your API key (Windows PowerShell)
27
+ $env:ANTHROPIC_API_KEY = "sk-ant-..."
28
+
29
+ # Set your API key (Windows cmd)
30
+ set ANTHROPIC_API_KEY=sk-ant-...
31
+
32
+ # Launch the agent
33
+ codingagent
34
+ ```
35
+
36
+ You'll land in an interactive REPL where you can give instructions in plain English:
37
+
38
+ ```
39
+ > Refactor the auth module to use JWT tokens
40
+ > Find all TODO comments and create a summary
41
+ > Write unit tests for src/utils.ts
42
+ ```
43
+
44
+ ## Features
45
+
46
+ ### 🛠 Built-in Tools
47
+
48
+ | Tool | Description |
49
+ |------|-------------|
50
+ | **Read** | Read files with line numbers, offset, and limit |
51
+ | **Write** | Write/create files (creates parent directories) |
52
+ | **Edit** | Exact string replacements in files |
53
+ | **Glob** | Fast file pattern matching (`**/*.ts`) |
54
+ | **Grep** | Regex search powered by ripgrep |
55
+ | **Bash** | Execute shell commands |
56
+ | **Task** | Spawn autonomous sub-agents |
57
+ | **Transcribe** | Local audio-to-text transcription (Whisper ONNX) |
58
+ | **WebFetch** | Fetch and extract content from URLs |
59
+ | **WebSearch** | Search the web via DuckDuckGo |
60
+ | **Open** | Open files/URLs in external applications |
61
+
62
+ ### 🎤 Audio Transcription
63
+
64
+ Built-in local transcription powered by Whisper ONNX — no API calls, no Python, no ffmpeg.
65
+
66
+ **Supported formats:** `.wav`, `.oga` (Telegram voice), `.ogg`, `.mp3`, `.flac`
67
+
68
+ **Models** (auto-downloaded on first use):
69
+
70
+ | Model | Size | Speed | Accuracy |
71
+ |-------|------|-------|----------|
72
+ | `tiny` | ~75 MB | Fastest | Basic |
73
+ | `base` | ~150 MB | Fast | Good (default) |
74
+ | `small` | ~500 MB | Medium | Better |
75
+ | `medium` | ~1.5 GB | Slow | Best |
76
+
77
+ Audio decoding uses pure WASM decoders (no native dependencies):
78
+
79
+ | Format | Decoder | Typical use |
80
+ |--------|---------|-------------|
81
+ | `.wav` | Inline RIFF parser | Standard audio |
82
+ | `.oga`/`.ogg` | `ogg-opus-decoder` | Telegram voice messages |
83
+ | `.mp3` | `mpg123-decoder` | Common audio |
84
+ | `.flac` | `@wasm-audio-decoders/flac` | Lossless audio |
85
+
86
+ Telegram voice messages are automatically transcribed when using the Telegram port.
87
+
88
+ ### 🤖 Sub-Agents
89
+
90
+ Spawn specialized background agents for parallel work:
91
+
92
+ - **Explore** — Fast read-only codebase exploration (uses small model)
93
+ - **Plan** — Architecture and implementation planning
94
+ - **Bash** — Shell-heavy automation tasks
95
+ - **General-purpose** — Full-capability agent
96
+
97
+ ```
98
+ > /agents # list running agents
99
+ ```
100
+
101
+ ### 🔌 MCP (Model Context Protocol)
102
+
103
+ Connect to external MCP servers for additional tools. Configuration is auto-discovered from:
104
+
105
+ - `.mcp.json` — Project-level (team-shared)
106
+ - `~/.claude.json` — User-level (all projects)
107
+ - `.vscode/mcp.json` — VS Code / Copilot MCP
108
+ - Claude Desktop config — Desktop app MCP servers
109
+
110
+ ```
111
+ > /mcp # show connected servers & tools
112
+ ```
113
+
114
+ ### 🧠 Project Memory & Skills
115
+
116
+ Automatically loads context from instruction files:
117
+
118
+ | Source | File |
119
+ |--------|------|
120
+ | Claude Code | `CLAUDE.md`, `.claude/CLAUDE.md`, `CLAUDE.local.md` |
121
+ | GitHub Copilot | `.github/copilot-instructions.md` |
122
+ | OpenAI Codex | `AGENTS.md`, `~/.codex/AGENTS.md` |
123
+ | Google Gemini | `GEMINI.md` |
124
+ | Skills | `.claude/skills/*.md`, `.github/prompts/*.prompt.md` |
125
+
126
+ ### 💾 Session Management
127
+
128
+ Save, resume, and manage conversation sessions:
129
+
130
+ ```
131
+ > /save # save current session
132
+ > /sessions # list saved sessions
133
+ > /resume # resume last session
134
+ > /resume #3 # resume session by number
135
+ ```
136
+
137
+ ### ⚡ Context Management
138
+
139
+ Automatic context compaction keeps conversations within token limits. Extended thinking support for complex reasoning tasks.
140
+
141
+ ### 🔍 Multi-Judge Eval Gate
142
+
143
+ Enable AI evaluation to verify the agent's work before accepting it:
144
+
145
+ ```bash
146
+ codingagent --eval -p "Refactor the auth module to use JWT tokens"
147
+ ```
148
+
149
+ Three independent judges evaluate from different perspectives:
150
+ - **Correctness** — Are there bugs or logic errors?
151
+ - **Completeness** — Were all parts of the request addressed?
152
+ - **Goal Alignment** — Does the result actually solve the user's problem?
153
+
154
+ The work is accepted when a **majority** of judges approve. If they don't, their
155
+ feedback is automatically injected and the agent refines its work (up to 3 rounds).
156
+
157
+ ## REPL Commands
158
+
159
+ | Command | Description |
160
+ |---------|-------------|
161
+ | `/help` | Show help message |
162
+ | `/clear` | Clear conversation history |
163
+ | `/compact` | Compact context to save tokens |
164
+ | `/tokens` | Show estimated token count |
165
+ | `/status` | Show session info & statistics |
166
+ | `/history` | Show recent prompt history |
167
+ | `/model <name>` | Switch model |
168
+ | `/smallmodel <name>` | Switch small model (compaction/exploration) |
169
+ | `/undo` | Stash uncommitted file changes |
170
+ | `/retry` | Re-send last prompt |
171
+ | `/agents` | Show background agent status |
172
+ | `/save` | Save session |
173
+ | `/sessions` | List saved sessions |
174
+ | `/resume [id]` | Resume a saved session |
175
+ | `/cache` | Show explore cache statistics |
176
+ | `/mcp` | Show MCP server status |
177
+ | `/memory` | Show loaded project memory |
178
+ | `/skills` | List available skills |
179
+ | `/reload` | Hot restart (reload code + tools) |
180
+ | `/quit` | Exit |
181
+
182
+ ## Configuration
183
+
184
+ Configuration is loaded from multiple sources with **first-set-wins** semantics — a variable set in a higher-priority source is never overridden by a lower one.
185
+
186
+ **Priority order:**
187
+ 1. Environment variables (highest)
188
+ 2. `~/.claude/settings.json` → `"env"` object
189
+ 3. `.env` file in project root
190
+ 4. `~/.codingagent/secrets.json`
191
+
192
+ ### Environment Variables
193
+
194
+ | Variable | Description | Default |
195
+ |----------|-------------|---------|
196
+ | `ANTHROPIC_API_KEY` | Your Anthropic API key (required) | — |
197
+ | `ANTHROPIC_BASE_URL` | Custom API endpoint URL | `https://api.anthropic.com` |
198
+ | `ANTHROPIC_MODEL` | Model to use | `claude-sonnet-4-20250514` |
199
+ | `ANTHROPIC_SMALL_FAST_MODEL` | Small model for compaction/exploration | `claude-haiku-3-5-20241022` |
200
+ | `ANTHROPIC_MAX_OUTPUT_TOKENS` | Max output tokens per response | `16384` |
201
+ | `ANTHROPIC_COMPACTION_THRESHOLD` | Token count to trigger auto-compaction | `160000` |
202
+ | `CODINGAGENT_DEBUG` | Enable debug output (`1`, `true`, `yes`, `on`) | `false` |
203
+
204
+ ### Settings File
205
+
206
+ Create `~/.claude/settings.json`:
207
+
208
+ ```json
209
+ {
210
+ "env": {
211
+ "ANTHROPIC_API_KEY": "sk-ant-...",
212
+ "ANTHROPIC_BASE_URL": "https://api.anthropic.com",
213
+ "ANTHROPIC_MODEL": "claude-sonnet-4-20250514",
214
+ "ANTHROPIC_SMALL_FAST_MODEL": "claude-haiku-3-5-20241022",
215
+ "ANTHROPIC_MAX_OUTPUT_TOKENS": "16384",
216
+ "ANTHROPIC_COMPACTION_THRESHOLD": "160000"
217
+ },
218
+ "skillDirs": ["/path/to/custom/skills"]
219
+ }
220
+ ```
221
+
222
+ ### `.env` File
223
+
224
+ Create a `.env` file in your project root:
225
+
226
+ ```bash
227
+ ANTHROPIC_API_KEY=sk-ant-...
228
+ ANTHROPIC_BASE_URL=https://api.anthropic.com
229
+ ANTHROPIC_MODEL=claude-sonnet-4-20250514
230
+ ```
231
+
232
+ ### Custom API Endpoint
233
+
234
+ To use a proxy or alternative API-compatible endpoint, set `ANTHROPIC_BASE_URL`:
235
+
236
+ ```bash
237
+ # Linux/macOS
238
+ export ANTHROPIC_BASE_URL=https://my-proxy.example.com
239
+
240
+ # Windows PowerShell
241
+ $env:ANTHROPIC_BASE_URL = "https://my-proxy.example.com"
242
+
243
+ # Windows cmd
244
+ set ANTHROPIC_BASE_URL=https://my-proxy.example.com
245
+ ```
246
+
247
+ > **Note:** Do **not** include `/v1` at the end — the SDK appends `/v1/messages` automatically. A base URL ending in `/v1` would produce a double-pathed URL like `https://proxy.com/v1/v1/messages`.
248
+
249
+ ## Development
250
+
251
+ ```bash
252
+ # Clone the repo
253
+ git clone https://github.com/agenticaiengineer/codingagent.git
254
+ cd codingagent
255
+
256
+ # Install dependencies
257
+ npm install
258
+
259
+ # Run in development mode (uses tsx, runs TypeScript directly)
260
+ npm run dev
261
+
262
+ # Build (TypeScript compilation only, for local use)
263
+ npm run build
264
+
265
+ # Bundle + obfuscate (for publishing)
266
+ npm run bundle
267
+ ```
268
+
269
+ ## Publishing
270
+
271
+ ```bash
272
+ # Bump version
273
+ npm version patch
274
+
275
+ # Publish to npm (auto-runs clean + bundle + obfuscate)
276
+ npm publish --access=public
277
+ ```
278
+
279
+ ## License
280
+
281
+ [MIT](LICENSE)