@rynfar/meridian 1.21.1 → 1.22.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.
- package/README.md +39 -25
- package/dist/cli-n9mgaja3.js +15029 -0
- package/dist/cli.js +1 -1
- package/dist/proxy/adapter.d.ts +17 -0
- package/dist/proxy/adapter.d.ts.map +1 -1
- package/dist/proxy/adapters/crush.d.ts.map +1 -1
- package/dist/proxy/adapters/opencode.d.ts.map +1 -1
- package/dist/proxy/fileChanges.d.ts +83 -0
- package/dist/proxy/fileChanges.d.ts.map +1 -0
- package/dist/proxy/query.d.ts +4 -2
- package/dist/proxy/query.d.ts.map +1 -1
- package/dist/proxy/server.d.ts.map +1 -1
- package/dist/server.js +1 -1
- package/package.json +1 -1
- package/dist/cli-zyn4cqp2.js +0 -24392
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
|
-
<a href="https://github.com/rynfar/meridian/releases"><img src="https://img.shields.io/github/v/release/rynfar
|
|
6
|
+
<a href="https://github.com/rynfar/meridian/releases"><img src="https://img.shields.io/github/v/release/rynfar/meridian?style=flat-square&color=6366f1&label=release" alt="Release"></a>
|
|
7
7
|
<a href="https://www.npmjs.com/package/@rynfar/meridian"><img src="https://img.shields.io/npm/v/@rynfar/meridian?style=flat-square&color=8b5cf6&label=npm" alt="npm"></a>
|
|
8
8
|
<a href="#"><img src="https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows-a78bfa?style=flat-square" alt="Platform"></a>
|
|
9
9
|
<a href="#"><img src="https://img.shields.io/badge/license-MIT-c4b5fd?style=flat-square" alt="License"></a>
|
|
@@ -69,7 +69,7 @@ Meridian bridges that gap. It runs locally, accepts standard Anthropic API reque
|
|
|
69
69
|
ANTHROPIC_API_KEY=x ANTHROPIC_BASE_URL=http://127.0.0.1:3456 opencode
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
For automatic session tracking, use a plugin like [opencode-
|
|
72
|
+
For automatic session tracking, use a plugin like [opencode-with-claude](https://github.com/ianjwhite99/opencode-with-claude), or see the [reference plugin](examples/opencode-plugin/claude-max-headers.ts) to build your own.
|
|
73
73
|
|
|
74
74
|
### Crush
|
|
75
75
|
|
|
@@ -78,9 +78,9 @@ Add a provider to `~/.config/crush/crush.json`:
|
|
|
78
78
|
```json
|
|
79
79
|
{
|
|
80
80
|
"providers": {
|
|
81
|
-
"
|
|
82
|
-
"id": "
|
|
83
|
-
"name": "
|
|
81
|
+
"meridian": {
|
|
82
|
+
"id": "meridian",
|
|
83
|
+
"name": "Meridian",
|
|
84
84
|
"type": "anthropic",
|
|
85
85
|
"base_url": "http://127.0.0.1:3456",
|
|
86
86
|
"api_key": "dummy",
|
|
@@ -97,8 +97,8 @@ Add a provider to `~/.config/crush/crush.json`:
|
|
|
97
97
|
Then use Meridian models in Crush:
|
|
98
98
|
|
|
99
99
|
```bash
|
|
100
|
-
crush run --model
|
|
101
|
-
crush --model
|
|
100
|
+
crush run --model meridian/claude-sonnet-4-6 "refactor this function"
|
|
101
|
+
crush --model meridian/claude-opus-4-6 # interactive TUI
|
|
102
102
|
```
|
|
103
103
|
|
|
104
104
|
Crush is automatically detected from its `Charm-Crush/` User-Agent — no extra configuration needed. In `crush run` headless mode all tool operations (read, write, bash) execute automatically without prompting.
|
|
@@ -114,21 +114,21 @@ Droid connects via its BYOK (Bring Your Own Key) feature. This is a one-time set
|
|
|
114
114
|
"customModels": [
|
|
115
115
|
{
|
|
116
116
|
"model": "claude-sonnet-4-6",
|
|
117
|
-
"name": "Sonnet 4.6 (1M —
|
|
117
|
+
"name": "Sonnet 4.6 (1M — Meridian)",
|
|
118
118
|
"provider": "anthropic",
|
|
119
119
|
"baseUrl": "http://127.0.0.1:3456",
|
|
120
120
|
"apiKey": "x"
|
|
121
121
|
},
|
|
122
122
|
{
|
|
123
123
|
"model": "claude-opus-4-6",
|
|
124
|
-
"name": "Opus 4.6 (1M —
|
|
124
|
+
"name": "Opus 4.6 (1M — Meridian)",
|
|
125
125
|
"provider": "anthropic",
|
|
126
126
|
"baseUrl": "http://127.0.0.1:3456",
|
|
127
127
|
"apiKey": "x"
|
|
128
128
|
},
|
|
129
129
|
{
|
|
130
130
|
"model": "claude-haiku-4-5-20251001",
|
|
131
|
-
"name": "Haiku 4.5 (
|
|
131
|
+
"name": "Haiku 4.5 (Meridian)",
|
|
132
132
|
"provider": "anthropic",
|
|
133
133
|
"baseUrl": "http://127.0.0.1:3456",
|
|
134
134
|
"apiKey": "x"
|
|
@@ -182,6 +182,19 @@ cline --yolo --model claude-haiku-4-5-20251001 "quick question" # haiku (fastes
|
|
|
182
182
|
|
|
183
183
|
No adapter or plugin needed — Cline uses the standard Anthropic SDK and falls through to the default adapter. All models (Sonnet 4.6, Opus 4.6, Haiku 4.5) route to their correct Claude Max tiers automatically.
|
|
184
184
|
|
|
185
|
+
### Aider
|
|
186
|
+
|
|
187
|
+
Aider works out of the box — no plugin or config file needed:
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
ANTHROPIC_API_KEY=x ANTHROPIC_BASE_URL=http://127.0.0.1:3456 \
|
|
191
|
+
aider --model anthropic/claude-sonnet-4-5-20250929
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
All standard aider features work: file editing, repo-map, git integration, multi-file changes.
|
|
195
|
+
|
|
196
|
+
> **Note:** Aider's `--no-stream` flag is incompatible due to a litellm parsing issue — use the default streaming mode (no flag needed).
|
|
197
|
+
|
|
185
198
|
### Any Anthropic-compatible tool
|
|
186
199
|
|
|
187
200
|
```bash
|
|
@@ -194,12 +207,12 @@ export ANTHROPIC_BASE_URL=http://127.0.0.1:3456
|
|
|
194
207
|
|
|
195
208
|
| Agent | Status | Plugin | Notes |
|
|
196
209
|
|-------|--------|--------|-------|
|
|
197
|
-
| [OpenCode](https://github.com/anomalyco/opencode) | ✅ Verified | [opencode-
|
|
210
|
+
| [OpenCode](https://github.com/anomalyco/opencode) | ✅ Verified | [opencode-with-claude](https://github.com/ianjwhite99/opencode-with-claude) | Full tool support, session resume, streaming, subagents |
|
|
198
211
|
| [Droid (Factory AI)](https://factory.ai/product/ide) | ✅ Verified | BYOK config (see setup above) | Full tool support, session resume, streaming; one-time BYOK setup |
|
|
199
212
|
| [Crush](https://github.com/charmbracelet/crush) | ✅ Verified | Provider config (see setup above) | Full tool support, session resume, streaming, headless `crush run` |
|
|
200
213
|
| [Cline](https://github.com/cline/cline) | ✅ Verified | Config (see setup above) | Full tool support, file read/write/edit, bash, session resume, all models |
|
|
201
214
|
| [Continue](https://github.com/continuedev/continue) | 🔲 Untested | — | Should work — standard Anthropic API |
|
|
202
|
-
| [Aider](https://github.com/paul-gauthier/aider) |
|
|
215
|
+
| [Aider](https://github.com/paul-gauthier/aider) | ✅ Verified | Env vars (see setup above) | File editing, streaming; `--no-stream` broken (litellm bug) |
|
|
203
216
|
|
|
204
217
|
Tested an agent or built a plugin? [Open an issue](https://github.com/rynfar/meridian/issues) and we'll add it.
|
|
205
218
|
|
|
@@ -214,6 +227,7 @@ src/proxy/
|
|
|
214
227
|
├── adapters/
|
|
215
228
|
│ ├── detect.ts ← Agent detection from request headers
|
|
216
229
|
│ ├── opencode.ts ← OpenCode adapter
|
|
230
|
+
│ ├── crush.ts ← Crush (Charm) adapter
|
|
217
231
|
│ └── droid.ts ← Droid (Factory AI) adapter
|
|
218
232
|
├── query.ts ← SDK query options builder
|
|
219
233
|
├── errors.ts ← Error classification
|
|
@@ -240,7 +254,7 @@ Sessions map agent conversations to Claude SDK sessions. Meridian classifies eve
|
|
|
240
254
|
| **Undo** | User rolled back messages | Fork at rollback point |
|
|
241
255
|
| **Diverged** | Completely different conversation | Start fresh |
|
|
242
256
|
|
|
243
|
-
Sessions are stored in-memory (LRU) and persisted to `~/.cache
|
|
257
|
+
Sessions are stored in-memory (LRU) and persisted to `~/.cache/meridian/sessions.json` for cross-proxy resume.
|
|
244
258
|
|
|
245
259
|
### Adding a New Agent
|
|
246
260
|
|
|
@@ -277,17 +291,17 @@ See [`adapters/detect.ts`](src/proxy/adapters/detect.ts) and [`adapters/opencode
|
|
|
277
291
|
|
|
278
292
|
## Configuration
|
|
279
293
|
|
|
280
|
-
| Variable | Default | Description |
|
|
281
|
-
|
|
282
|
-
| `CLAUDE_PROXY_PORT` | `3456` | Port to listen on |
|
|
283
|
-
| `CLAUDE_PROXY_HOST` | `127.0.0.1` | Host to bind to |
|
|
284
|
-
| `CLAUDE_PROXY_PASSTHROUGH` | unset | Forward tool calls to client instead of executing |
|
|
285
|
-
| `CLAUDE_PROXY_MAX_CONCURRENT` | `10` | Maximum concurrent SDK sessions |
|
|
286
|
-
| `CLAUDE_PROXY_MAX_SESSIONS` | `1000` | In-memory LRU session cache size |
|
|
287
|
-
| `CLAUDE_PROXY_MAX_STORED_SESSIONS` | `10000` | File-based session store capacity |
|
|
288
|
-
| `CLAUDE_PROXY_WORKDIR` | `cwd()` | Default working directory for SDK |
|
|
289
|
-
| `CLAUDE_PROXY_IDLE_TIMEOUT_SECONDS` | `120` | HTTP keep-alive timeout |
|
|
290
|
-
| `CLAUDE_PROXY_TELEMETRY_SIZE` | `1000` | Telemetry ring buffer size |
|
|
294
|
+
| Variable | Alias | Default | Description |
|
|
295
|
+
|----------|-------|---------|-------------|
|
|
296
|
+
| `MERIDIAN_PORT` | `CLAUDE_PROXY_PORT` | `3456` | Port to listen on |
|
|
297
|
+
| `MERIDIAN_HOST` | `CLAUDE_PROXY_HOST` | `127.0.0.1` | Host to bind to |
|
|
298
|
+
| `MERIDIAN_PASSTHROUGH` | `CLAUDE_PROXY_PASSTHROUGH` | unset | Forward tool calls to client instead of executing |
|
|
299
|
+
| `MERIDIAN_MAX_CONCURRENT` | `CLAUDE_PROXY_MAX_CONCURRENT` | `10` | Maximum concurrent SDK sessions |
|
|
300
|
+
| `MERIDIAN_MAX_SESSIONS` | `CLAUDE_PROXY_MAX_SESSIONS` | `1000` | In-memory LRU session cache size |
|
|
301
|
+
| `MERIDIAN_MAX_STORED_SESSIONS` | `CLAUDE_PROXY_MAX_STORED_SESSIONS` | `10000` | File-based session store capacity |
|
|
302
|
+
| `MERIDIAN_WORKDIR` | `CLAUDE_PROXY_WORKDIR` | `cwd()` | Default working directory for SDK |
|
|
303
|
+
| `MERIDIAN_IDLE_TIMEOUT_SECONDS` | `CLAUDE_PROXY_IDLE_TIMEOUT_SECONDS` | `120` | HTTP keep-alive timeout |
|
|
304
|
+
| `MERIDIAN_TELEMETRY_SIZE` | `CLAUDE_PROXY_TELEMETRY_SIZE` | `1000` | Telemetry ring buffer size |
|
|
291
305
|
|
|
292
306
|
## Programmatic API
|
|
293
307
|
|
|
@@ -375,7 +389,7 @@ docker compose up -d
|
|
|
375
389
|
## Testing
|
|
376
390
|
|
|
377
391
|
```bash
|
|
378
|
-
npm test #
|
|
392
|
+
npm test # 522 unit/integration tests (bun test)
|
|
379
393
|
npm run build # Build with bun + tsc
|
|
380
394
|
```
|
|
381
395
|
|