@rynfar/meridian 1.34.0 → 1.35.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 +15 -9
- package/dist/{cli-1qv75efv.js → cli-0kfa6j99.js} +1319 -136
- package/dist/cli-p9swy5t3.js +67 -0
- package/dist/cli.js +8 -8
- package/dist/{profileCli-5e3p99k0.js → profileCli-5f15dx7k.js} +1 -1
- package/dist/{profilePage-9nkbct3w.js → profilePage-e90fq8ye.js} +1 -1
- package/dist/{profiles-ntgacztq.js → profiles-edzz1ffd.js} +1 -1
- package/dist/proxy/adapters/pi.d.ts.map +1 -1
- package/dist/proxy/sanitize.d.ts +26 -0
- package/dist/proxy/sanitize.d.ts.map +1 -0
- package/dist/proxy/server.d.ts.map +1 -1
- package/dist/proxy/types.d.ts +2 -0
- package/dist/proxy/types.d.ts.map +1 -1
- package/dist/server.js +2 -2
- package/dist/{setup-5x116vbs.js → setup-v5pnqe04.js} +1 -1
- package/dist/telemetry/index.d.ts +9 -4
- package/dist/telemetry/index.d.ts.map +1 -1
- package/dist/telemetry/logStore.d.ts +4 -25
- package/dist/telemetry/logStore.d.ts.map +1 -1
- package/dist/telemetry/percentiles.d.ts +12 -0
- package/dist/telemetry/percentiles.d.ts.map +1 -0
- package/dist/telemetry/prometheus.d.ts +10 -0
- package/dist/telemetry/prometheus.d.ts.map +1 -0
- package/dist/telemetry/routes.d.ts.map +1 -1
- package/dist/telemetry/sqlite.d.ts +7 -0
- package/dist/telemetry/sqlite.d.ts.map +1 -0
- package/dist/telemetry/store.d.ts +3 -3
- package/dist/telemetry/store.d.ts.map +1 -1
- package/dist/telemetry/types.d.ts +51 -0
- package/dist/telemetry/types.d.ts.map +1 -1
- package/dist/{tokenRefresh-ywwpe8k2.js → tokenRefresh-y7d1qvb3.js} +1 -1
- package/package.json +3 -2
- package/plugin/meridian.ts +4 -1
- package/dist/cli-a05ws7rb.js +0 -18
package/README.md
CHANGED
|
@@ -81,6 +81,8 @@ The Claude Code SDK provides programmatic access to Claude. But your favorite co
|
|
|
81
81
|
- **Multimodal** — images, documents, and file attachments pass through to Claude
|
|
82
82
|
- **Multi-profile** — switch between Claude accounts instantly, no restart needed
|
|
83
83
|
- **Telemetry dashboard** — real-time performance metrics at `/telemetry`, including token usage and prompt cache efficiency ([`MONITORING.md`](MONITORING.md))
|
|
84
|
+
- **Telemetry persistence** — opt-in SQLite storage for telemetry data that survives proxy restarts, with configurable retention
|
|
85
|
+
- **Prometheus metrics** — `GET /metrics` endpoint for scraping request counters and duration histograms
|
|
84
86
|
|
|
85
87
|
## Multi-Profile Support
|
|
86
88
|
|
|
@@ -318,19 +320,19 @@ Pi uses the `@mariozechner/pi-ai` library which supports a configurable `baseUrl
|
|
|
318
320
|
|
|
319
321
|
```json
|
|
320
322
|
{
|
|
321
|
-
"
|
|
322
|
-
"
|
|
323
|
+
"providers": {
|
|
324
|
+
"anthropic": {
|
|
325
|
+
"baseUrl": "http://127.0.0.1:3456",
|
|
326
|
+
"apiKey": "x",
|
|
327
|
+
"headers": {
|
|
328
|
+
"x-meridian-agent": "pi"
|
|
329
|
+
}
|
|
330
|
+
}
|
|
323
331
|
}
|
|
324
332
|
}
|
|
325
333
|
```
|
|
326
334
|
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
```bash
|
|
330
|
-
MERIDIAN_DEFAULT_AGENT=pi meridian
|
|
331
|
-
```
|
|
332
|
-
|
|
333
|
-
Pi mimics Claude Code's User-Agent, so automatic detection isn't possible. The `MERIDIAN_DEFAULT_AGENT` env var tells Meridian to use the pi adapter for all unrecognized requests. If you run other agents alongside pi, use the `x-meridian-agent: pi` header instead (requires pi-ai support for custom headers).
|
|
335
|
+
Pi mimics Claude Code's User-Agent, so automatic detection isn't possible. The `x-meridian-agent: pi` header in the config above tells Meridian to use the Pi adapter. Alternatively, if Pi is your only agent, you can set `MERIDIAN_DEFAULT_AGENT=pi` as an env var instead.
|
|
334
336
|
|
|
335
337
|
### Any Anthropic-compatible tool
|
|
336
338
|
|
|
@@ -437,6 +439,9 @@ Implement the `AgentAdapter` interface in `src/proxy/adapters/`. See [`adapters/
|
|
|
437
439
|
| `MERIDIAN_SONNET_MODEL` | `CLAUDE_PROXY_SONNET_MODEL` | `sonnet` | Sonnet context tier: `sonnet` (200k, default) or `sonnet[1m]` (1M, requires Extra Usage†) |
|
|
438
440
|
| `MERIDIAN_DEFAULT_AGENT` | — | `opencode` | Default adapter for unrecognized agents: `opencode`, `forgecode`, `pi`, `crush`, `droid`, `passthrough`. Requires restart. |
|
|
439
441
|
| `MERIDIAN_PROFILES` | — | unset | JSON array of profile configs (overrides disk discovery). See [Multi-Profile Support](#multi-profile-support). |
|
|
442
|
+
| `MERIDIAN_TELEMETRY_PERSIST` | — | unset | Enable SQLite telemetry persistence. Data survives proxy restarts. |
|
|
443
|
+
| `MERIDIAN_TELEMETRY_DB` | — | `~/.config/meridian/telemetry.db` | SQLite database path (when persistence is enabled) |
|
|
444
|
+
| `MERIDIAN_TELEMETRY_RETENTION_DAYS` | — | `7` | Days to retain telemetry data before cleanup |
|
|
440
445
|
| `MERIDIAN_DEFAULT_PROFILE` | — | *(first profile)* | Default profile ID when no header is sent |
|
|
441
446
|
|
|
442
447
|
†Sonnet 1M requires Extra Usage on all plans including Max ([docs](https://code.claude.com/docs/en/model-config#extended-context)). Opus 1M is included with Max/Team/Enterprise at no extra cost.
|
|
@@ -456,6 +461,7 @@ Implement the `AgentAdapter` interface in `src/proxy/adapters/`. See [`adapters/
|
|
|
456
461
|
| `GET /telemetry/requests` | Recent request metrics (JSON) |
|
|
457
462
|
| `GET /telemetry/summary` | Aggregate statistics (JSON) |
|
|
458
463
|
| `GET /telemetry/logs` | Diagnostic logs (JSON) |
|
|
464
|
+
| `GET /metrics` | Prometheus exposition format metrics |
|
|
459
465
|
| `GET /profiles` | Profile management page |
|
|
460
466
|
| `GET /profiles/list` | List profiles with auth status (JSON) |
|
|
461
467
|
| `POST /profiles/active` | Switch the active profile |
|