@rynfar/meridian 1.22.0 → 1.22.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.
Files changed (2) hide show
  1. package/dist/cli.js +31 -3
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -5,8 +5,36 @@ import {
5
5
  } from "./cli-n9mgaja3.js";
6
6
 
7
7
  // bin/cli.ts
8
+ import { createRequire } from "module";
8
9
  import { exec as execCallback } from "child_process";
9
10
  import { promisify } from "util";
11
+ var require2 = createRequire(import.meta.url);
12
+ var { version } = require2("../package.json");
13
+ var args = process.argv.slice(2);
14
+ if (args.includes("--version") || args.includes("-v")) {
15
+ console.log(version);
16
+ process.exit(0);
17
+ }
18
+ if (args.includes("--help") || args.includes("-h")) {
19
+ console.log(`meridian v${version}
20
+
21
+ Local Anthropic API powered by your Claude Max subscription.
22
+
23
+ Usage: meridian [options]
24
+
25
+ Options:
26
+ -v, --version Show version
27
+ -h, --help Show this help
28
+
29
+ Environment variables:
30
+ MERIDIAN_PORT Port to listen on (default: 3456)
31
+ MERIDIAN_HOST Host to bind to (default: 127.0.0.1)
32
+ MERIDIAN_PASSTHROUGH Enable passthrough mode (tools forwarded to client)
33
+ MERIDIAN_IDLE_TIMEOUT_SECONDS Idle timeout in seconds (default: 120)
34
+
35
+ See https://github.com/rynfar/meridian for full documentation.`);
36
+ process.exit(0);
37
+ }
10
38
  var exec = promisify(execCallback);
11
39
  process.on("uncaughtException", (err) => {
12
40
  console.error(`[PROXY] Uncaught exception (recovered): ${err.message}`);
@@ -14,9 +42,9 @@ process.on("uncaughtException", (err) => {
14
42
  process.on("unhandledRejection", (reason) => {
15
43
  console.error(`[PROXY] Unhandled rejection (recovered): ${reason instanceof Error ? reason.message : reason}`);
16
44
  });
17
- var port = parseInt(process.env.CLAUDE_PROXY_PORT || "3456", 10);
18
- var host = process.env.CLAUDE_PROXY_HOST || "127.0.0.1";
19
- var idleTimeoutSeconds = parseInt(process.env.CLAUDE_PROXY_IDLE_TIMEOUT_SECONDS || "120", 10);
45
+ var port = parseInt(process.env.MERIDIAN_PORT ?? process.env.CLAUDE_PROXY_PORT ?? "3456", 10);
46
+ var host = process.env.MERIDIAN_HOST ?? process.env.CLAUDE_PROXY_HOST ?? "127.0.0.1";
47
+ var idleTimeoutSeconds = parseInt(process.env.MERIDIAN_IDLE_TIMEOUT_SECONDS ?? process.env.CLAUDE_PROXY_IDLE_TIMEOUT_SECONDS ?? "120", 10);
20
48
  async function runCli(start = startProxyServer, runExec = exec) {
21
49
  try {
22
50
  const { stdout } = await runExec("claude auth status", { timeout: 5000 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rynfar/meridian",
3
- "version": "1.22.0",
3
+ "version": "1.22.1",
4
4
  "description": "Local Anthropic API powered by your Claude Max subscription. One subscription, every agent.",
5
5
  "type": "module",
6
6
  "main": "./dist/server.js",