@rynfar/meridian 1.37.4 → 1.37.5

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 CHANGED
@@ -49,6 +49,95 @@ ANTHROPIC_API_KEY=x ANTHROPIC_BASE_URL=http://127.0.0.1:3456 opencode
49
49
 
50
50
  The API key value is a placeholder — Meridian authenticates through the Claude Code SDK, not API keys. Most Anthropic-compatible tools require this field to be set, but any value works.
51
51
 
52
+ ### NixOS / Nix Flake
53
+
54
+ Meridian provides a Nix flake for declarative installation.
55
+
56
+ **Add to your flake inputs:**
57
+
58
+ ```nix
59
+ {
60
+ inputs.meridian.url = "github:rynfar/meridian";
61
+ }
62
+ ```
63
+
64
+ **Install the package** (via overlay or directly):
65
+
66
+ ```nix
67
+ # Option A: overlay
68
+ nixpkgs.overlays = [ meridian.overlays.default ];
69
+ environment.systemPackages = [ pkgs.meridian ];
70
+
71
+ # Option B: direct reference
72
+ environment.systemPackages = [ meridian.packages.${system}.meridian ];
73
+ ```
74
+
75
+ **OpenCode plugin** -- the plugin file is included at `${pkgs.meridian}/lib/meridian/plugin/meridian.ts`. Since this path lives in the Nix store, you need to make it available to OpenCode:
76
+
77
+ If you generate your OpenCode config from Nix (e.g. via Home Manager), interpolate the path directly:
78
+
79
+ ```nix
80
+ # home-manager example
81
+ xdg.configFile."opencode/opencode.json".text = builtins.toJSON {
82
+ plugin = [ "${pkgs.meridian}/lib/meridian/plugin/meridian.ts" ];
83
+ };
84
+ ```
85
+
86
+ If you don't manage your OpenCode config through Nix, symlink the plugin to a stable path and reference that instead:
87
+
88
+ ```nix
89
+ # configuration.nix or home-manager
90
+ environment.etc."meridian/plugin/meridian.ts".source =
91
+ "${pkgs.meridian}/lib/meridian/plugin/meridian.ts";
92
+ ```
93
+
94
+ Then in `~/.config/opencode/opencode.json`:
95
+
96
+ ```json
97
+ { "plugin": ["/etc/meridian/plugin/meridian.ts"] }
98
+ ```
99
+
100
+ > **Important:** Do not use `meridian setup` on NixOS. It writes an absolute Nix store path (e.g. `/nix/store/...-meridian-1.x.x/lib/...`) into your OpenCode config, which will break on the next `nixos-rebuild switch` or `home-manager switch` when the store path changes. Use one of the approaches above instead.
101
+
102
+ **Home Manager service** -- run Meridian as a user systemd service:
103
+
104
+ ```nix
105
+ # flake.nix
106
+ {
107
+ inputs.meridian.url = "github:rynfar/meridian";
108
+ }
109
+
110
+ # home-manager config
111
+ {
112
+ imports = [ meridian.homeManagerModules.default ];
113
+
114
+ services.meridian = {
115
+ enable = true;
116
+ settings = {
117
+ port = 3456;
118
+ host = "127.0.0.1";
119
+ # passthrough = true;
120
+ # defaultAgent = "opencode";
121
+ # sonnetModel = "sonnet";
122
+ };
123
+ # Extra env vars not covered by settings
124
+ # environment = {
125
+ # MERIDIAN_MAX_CONCURRENT = "20";
126
+ # };
127
+ };
128
+ }
129
+ ```
130
+
131
+ The service starts automatically on login. Manage it with `systemctl --user {start,stop,restart,status} meridian`.
132
+
133
+ The plugin path is also available as `config.services.meridian.opencode.pluginPath` for use in your OpenCode config:
134
+
135
+ ```nix
136
+ xdg.configFile."opencode/opencode.json".text = builtins.toJSON {
137
+ plugin = [ config.services.meridian.opencode.pluginPath ];
138
+ };
139
+ ```
140
+
52
141
  ## Why Meridian?
53
142
 
54
143
  The Claude Code SDK provides programmatic access to Claude. But your favorite coding tools expect an Anthropic API endpoint. Meridian bridges that gap — it runs locally, accepts standard API requests, and routes them through the SDK. Claude Code does the heavy lifting; Meridian translates the output.
@@ -9407,7 +9407,7 @@ function fuzzyMatchAgentName(input, validAgents) {
9407
9407
  var openCodeAdapter = {
9408
9408
  name: "opencode",
9409
9409
  getSessionId(c) {
9410
- return c.req.header("x-opencode-session");
9410
+ return c.req.header("x-opencode-session") ?? c.req.header("x-session-affinity");
9411
9411
  },
9412
9412
  extractWorkingDirectory(body) {
9413
9413
  return extractClientCwd(body);
@@ -16384,7 +16384,7 @@ function storeSession(sessionId, messages, claudeSessionId, workingDirectory, sd
16384
16384
  if (sessionId)
16385
16385
  sessionCache.set(sessionId, state);
16386
16386
  const fp = getConversationFingerprint(messages, workingDirectory);
16387
- if (fp)
16387
+ if (fp && !sessionId)
16388
16388
  fingerprintCache.set(fp, state);
16389
16389
  const key = sessionId || fp;
16390
16390
  if (key) {
@@ -16395,6 +16395,42 @@ function storeSession(sessionId, messages, claudeSessionId, workingDirectory, sd
16395
16395
  // src/proxy/server.ts
16396
16396
  var exec3 = promisify3(execCallback2);
16397
16397
  var claudeExecutable = "";
16398
+ function flattenAssistantContent(content) {
16399
+ if (typeof content === "string")
16400
+ return content;
16401
+ if (!Array.isArray(content))
16402
+ return String(content ?? "");
16403
+ return content.map((b) => b?.type === "text" && b.text ? b.text : "").filter(Boolean).join(`
16404
+ `);
16405
+ }
16406
+ function flattenUserContent(content, sanitizeOpts = {}) {
16407
+ if (typeof content === "string")
16408
+ return sanitizeTextContent(content, sanitizeOpts);
16409
+ if (!Array.isArray(content))
16410
+ return String(content ?? "");
16411
+ return content.map((b) => {
16412
+ if (b?.type === "text" && b.text)
16413
+ return sanitizeTextContent(b.text, sanitizeOpts);
16414
+ if (b?.type === "tool_result") {
16415
+ const inner = b.content;
16416
+ if (typeof inner === "string")
16417
+ return inner;
16418
+ if (Array.isArray(inner)) {
16419
+ return inner.map((ib) => ib?.type === "text" && ib.text ? ib.text : "").filter(Boolean).join(`
16420
+ `);
16421
+ }
16422
+ return "";
16423
+ }
16424
+ if (b?.type === "image")
16425
+ return "[Image attached]";
16426
+ if (b?.type === "document")
16427
+ return "[Document attached]";
16428
+ if (b?.type === "file")
16429
+ return "[File attached]";
16430
+ return "";
16431
+ }).filter(Boolean).join(`
16432
+ `);
16433
+ }
16398
16434
  function buildFreshPrompt(messages, stripCacheControl, sanitizeOpts = {}) {
16399
16435
  const MULTIMODAL_TYPES = new Set(["image", "document", "file"]);
16400
16436
  const hasMultimodal = messages.some((m) => Array.isArray(m.content) && m.content.some((b) => MULTIMODAL_TYPES.has(b.type)));
@@ -16408,28 +16444,14 @@ function buildFreshPrompt(messages, stripCacheControl, sanitizeOpts = {}) {
16408
16444
  parent_tool_use_id: null
16409
16445
  });
16410
16446
  } else {
16411
- let text;
16412
- if (typeof m.content === "string") {
16413
- text = `[Assistant: ${m.content}]`;
16414
- } else if (Array.isArray(m.content)) {
16415
- text = m.content.map((b) => {
16416
- if (b.type === "text" && b.text)
16417
- return `[Assistant: ${b.text}]`;
16418
- if (b.type === "tool_use")
16419
- return `[Tool Use: ${b.name}(${JSON.stringify(b.input)})]`;
16420
- if (b.type === "tool_result")
16421
- return `[Tool Result: ${typeof b.content === "string" ? b.content : JSON.stringify(b.content)}]`;
16422
- return "";
16423
- }).filter(Boolean).join(`
16424
- `);
16425
- } else {
16426
- text = `[Assistant: ${String(m.content)}]`;
16447
+ const assistantText = flattenAssistantContent(m.content);
16448
+ if (assistantText) {
16449
+ structured.push({
16450
+ type: "user",
16451
+ message: { role: "user", content: `[Assistant: ${assistantText}]` },
16452
+ parent_tool_use_id: null
16453
+ });
16427
16454
  }
16428
- structured.push({
16429
- type: "user",
16430
- message: { role: "user", content: text },
16431
- parent_tool_use_id: null
16432
- });
16433
16455
  }
16434
16456
  }
16435
16457
  return async function* () {
@@ -16439,31 +16461,9 @@ function buildFreshPrompt(messages, stripCacheControl, sanitizeOpts = {}) {
16439
16461
  }
16440
16462
  return messages.map((m) => {
16441
16463
  const role = m.role === "assistant" ? "Assistant" : "Human";
16442
- let content;
16443
- if (typeof m.content === "string") {
16444
- content = sanitizeTextContent(m.content, sanitizeOpts);
16445
- } else if (Array.isArray(m.content)) {
16446
- content = m.content.map((block) => {
16447
- if (block.type === "text" && block.text)
16448
- return sanitizeTextContent(block.text, sanitizeOpts);
16449
- if (block.type === "tool_use")
16450
- return `[Tool Use: ${block.name}(${JSON.stringify(block.input)})]`;
16451
- if (block.type === "tool_result")
16452
- return `[Tool Result for ${block.tool_use_id}: ${typeof block.content === "string" ? block.content : JSON.stringify(block.content)}]`;
16453
- if (block.type === "image")
16454
- return "[Image attached]";
16455
- if (block.type === "document")
16456
- return "[Document attached]";
16457
- if (block.type === "file")
16458
- return "[File attached]";
16459
- return "";
16460
- }).filter(Boolean).join(`
16461
- `);
16462
- } else {
16463
- content = String(m.content);
16464
- }
16465
- return `${role}: ${content}`;
16466
- }).join(`
16464
+ const content = m.role === "assistant" ? flattenAssistantContent(m.content) : flattenUserContent(m.content, sanitizeOpts);
16465
+ return content ? `${role}: ${content}` : "";
16466
+ }).filter(Boolean).join(`
16467
16467
 
16468
16468
  `) || "";
16469
16469
  }
@@ -16594,6 +16594,7 @@ function createProxyServer(config = {}) {
16594
16594
  const profile = resolveProfile(finalConfig.profiles, finalConfig.defaultProfile, c.req.header("x-meridian-profile") || undefined);
16595
16595
  const authStatus = await getClaudeAuthStatusAsync(profile.id !== "default" ? profile.id : undefined, Object.keys(profile.env).length > 0 ? profile.env : undefined);
16596
16596
  const agentMode = c.req.header("x-opencode-agent-mode") ?? null;
16597
+ const requestSource = c.req.header("x-meridian-source")?.slice(0, 64) || undefined;
16597
16598
  let model = mapModelToClaudeModel(body.model || "sonnet", authStatus?.subscriptionType, agentMode);
16598
16599
  const adapterStreamPref = adapter.prefersStreaming?.(body);
16599
16600
  const stream2 = adapterStreamPref !== undefined ? adapterStreamPref : body.stream ?? false;
@@ -16653,7 +16654,11 @@ function createProxyServer(config = {}) {
16653
16654
  const agentSessionId = adapter.getSessionId(c);
16654
16655
  const profileSessionId = profile.id !== "default" && agentSessionId ? `${profile.id}:${agentSessionId}` : agentSessionId;
16655
16656
  const profileScopedCwd = profile.id !== "default" ? `${workingDirectory}::profile=${profile.id}` : workingDirectory;
16656
- const lineageResult = lookupSession(profileSessionId, body.messages || [], profileScopedCwd);
16657
+ const isIndependentSession = requestSource?.startsWith("fork-") || requestSource?.startsWith("subagent-") || false;
16658
+ let lineageResult = isIndependentSession ? { type: "diverged" } : lookupSession(profileSessionId, body.messages || [], profileScopedCwd);
16659
+ if (lineageResult.type === "undo" && adapter.name === "opencode" && !agentSessionId) {
16660
+ lineageResult = { type: "diverged" };
16661
+ }
16657
16662
  const isResume = lineageResult.type === "continuation" || lineageResult.type === "compaction";
16658
16663
  const isUndo = lineageResult.type === "undo";
16659
16664
  const cachedSession = lineageResult.type !== "diverged" ? lineageResult.session : undefined;
@@ -16666,10 +16671,10 @@ function createProxyServer(config = {}) {
16666
16671
  const lineageType = lineageResult.type === "diverged" && !cachedSession ? "new" : lineageResult.type;
16667
16672
  const msgCount = Array.isArray(body.messages) ? body.messages.length : 0;
16668
16673
  const toolCount = body.tools?.length ?? 0;
16669
- const requestLogLine = `${requestMeta.requestId} adapter=${adapter.name} model=${model} stream=${stream2} tools=${toolCount} lineage=${lineageType} session=${resumeSessionId?.slice(0, 8) || "new"}${isUndo && undoRollbackUuid ? ` rollback=${undoRollbackUuid.slice(0, 8)}` : ""}${agentMode ? ` agent=${agentMode}` : ""} active=${activeSessions}/${MAX_CONCURRENT_SESSIONS} msgCount=${msgCount}`;
16674
+ const requestLogLine = `${requestMeta.requestId} adapter=${adapter.name}${requestSource ? ` source=${requestSource}` : ""} model=${model} stream=${stream2} tools=${toolCount} lineage=${lineageType} session=${resumeSessionId?.slice(0, 8) || "new"}${isUndo && undoRollbackUuid ? ` rollback=${undoRollbackUuid.slice(0, 8)}` : ""}${agentMode ? ` agent=${agentMode}` : ""} active=${activeSessions}/${MAX_CONCURRENT_SESSIONS} msgCount=${msgCount}`;
16670
16675
  console.error(`[PROXY] ${requestLogLine} msgs=${msgSummary}`);
16671
16676
  diagnosticLog2.session(`${requestLogLine}`, requestMeta.requestId);
16672
- if (lineageResult.type === "diverged" && profileSessionId) {
16677
+ if (lineageResult.type === "diverged" && profileSessionId && !isIndependentSession) {
16673
16678
  const recovery = lookupSessionRecovery(profileSessionId);
16674
16679
  if (recovery) {
16675
16680
  const prevId = recovery.previousClaudeSessionId || recovery.claudeSessionId;
@@ -16737,59 +16742,23 @@ function createProxyServer(config = {}) {
16737
16742
  parent_tool_use_id: null
16738
16743
  });
16739
16744
  } else {
16740
- let text;
16741
- if (typeof m.content === "string") {
16742
- text = `[Assistant: ${m.content}]`;
16743
- } else if (Array.isArray(m.content)) {
16744
- text = m.content.map((b) => {
16745
- if (b.type === "text" && b.text)
16746
- return `[Assistant: ${b.text}]`;
16747
- if (b.type === "tool_use")
16748
- return `[Tool Use: ${b.name}(${JSON.stringify(b.input)})]`;
16749
- if (b.type === "tool_result")
16750
- return `[Tool Result: ${typeof b.content === "string" ? b.content : JSON.stringify(b.content)}]`;
16751
- return "";
16752
- }).filter(Boolean).join(`
16753
- `);
16754
- } else {
16755
- text = `[Assistant: ${String(m.content)}]`;
16745
+ const assistantText = flattenAssistantContent(m.content);
16746
+ if (assistantText) {
16747
+ structuredMessages.push({
16748
+ type: "user",
16749
+ message: { role: "user", content: `[Assistant: ${assistantText}]` },
16750
+ parent_tool_use_id: null
16751
+ });
16756
16752
  }
16757
- structuredMessages.push({
16758
- type: "user",
16759
- message: { role: "user", content: text },
16760
- parent_tool_use_id: null
16761
- });
16762
16753
  }
16763
16754
  }
16764
16755
  }
16765
16756
  } else {
16766
16757
  textPrompt = messagesToConvert?.map((m) => {
16767
16758
  const role = m.role === "assistant" ? "Assistant" : "Human";
16768
- let content;
16769
- if (typeof m.content === "string") {
16770
- content = sanitizeTextContent(m.content, sanitizeOpts);
16771
- } else if (Array.isArray(m.content)) {
16772
- content = m.content.map((block) => {
16773
- if (block.type === "text" && block.text)
16774
- return sanitizeTextContent(block.text, sanitizeOpts);
16775
- if (block.type === "tool_use")
16776
- return `[Tool Use: ${block.name}(${JSON.stringify(block.input)})]`;
16777
- if (block.type === "tool_result")
16778
- return `[Tool Result for ${block.tool_use_id}: ${typeof block.content === "string" ? block.content : JSON.stringify(block.content)}]`;
16779
- if (block.type === "image")
16780
- return "[Image attached]";
16781
- if (block.type === "document")
16782
- return "[Document attached]";
16783
- if (block.type === "file")
16784
- return "[File attached]";
16785
- return "";
16786
- }).filter(Boolean).join(`
16787
- `);
16788
- } else {
16789
- content = String(m.content);
16790
- }
16791
- return `${role}: ${content}`;
16792
- }).join(`
16759
+ const content = m.role === "assistant" ? flattenAssistantContent(m.content) : flattenUserContent(m.content, sanitizeOpts);
16760
+ return content ? `${role}: ${content}` : "";
16761
+ }).filter(Boolean).join(`
16793
16762
 
16794
16763
  `) || "";
16795
16764
  }
@@ -17186,7 +17155,7 @@ Subprocess stderr: ${stderrOutput}`;
17186
17155
  cacheCreationInputTokens: lastUsage?.cache_creation_input_tokens,
17187
17156
  cacheHitRate: computeCacheHitRate(lastUsage)
17188
17157
  });
17189
- if (currentSessionId) {
17158
+ if (currentSessionId && !isIndependentSession) {
17190
17159
  storeSession(profileSessionId, body.messages || [], currentSessionId, profileScopedCwd, sdkUuidMap, lastUsage);
17191
17160
  }
17192
17161
  const responseSessionId = currentSessionId || resumeSessionId || `session_${Date.now()}`;
@@ -17570,7 +17539,7 @@ data: ${JSON.stringify({ type: "message_stop" })}
17570
17539
  const allNames = [...sessionDiscoveredTools.get(sessId)];
17571
17540
  console.error(`[PROXY] ${requestMeta.requestId} discovered=${discoveredTools.size} (${newNames}) session_total=${allNames.length}`);
17572
17541
  }
17573
- if (currentSessionId) {
17542
+ if (currentSessionId && !isIndependentSession) {
17574
17543
  storeSession(profileSessionId, body.messages || [], currentSessionId, profileScopedCwd, sdkUuidMap, lastUsage);
17575
17544
  }
17576
17545
  if (!streamClosed) {
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  startProxyServer
4
- } from "./cli-g6ndy8jh.js";
4
+ } from "./cli-yahkdc3h.js";
5
5
  import"./cli-pr79d7nw.js";
6
6
  import"./cli-rtab0qa6.js";
7
7
  import"./cli-m9pfb7h9.js";
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/proxy/server.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,M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7 @@ import {
6
6
  getMaxSessionsLimit,
7
7
  hashMessage,
8
8
  startProxyServer
9
- } from "./cli-g6ndy8jh.js";
9
+ } from "./cli-yahkdc3h.js";
10
10
  import"./cli-pr79d7nw.js";
11
11
  import"./cli-rtab0qa6.js";
12
12
  import"./cli-m9pfb7h9.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rynfar/meridian",
3
- "version": "1.37.4",
3
+ "version": "1.37.5",
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",
@@ -25,6 +25,7 @@
25
25
  "postbuild": "node --check dist/cli.js && node --check dist/server.js && test -f dist/proxy/server.d.ts",
26
26
  "prepublishOnly": "bun run build",
27
27
  "test": "bun test --path-ignore-patterns '**/*session-store*' --path-ignore-patterns '**/*proxy-async-ops*' --path-ignore-patterns '**/*proxy-extra-usage-fallback*' --path-ignore-patterns '**/*models-auth-status*' --path-ignore-patterns '**/*proxy-context-usage-store*' --path-ignore-patterns '**/*proxy-passthrough-thinking*' --path-ignore-patterns '**/*profile-switch-integration*' --path-ignore-patterns '**/*session-recovery*' --path-ignore-patterns '**/*models.test*' --path-ignore-patterns '**/*proxy-health-degraded*' --path-ignore-patterns '**/*proxy-subagent-model-selection*' && bun test src/__tests__/profile-switch-integration.test.ts && bun test src/__tests__/proxy-extra-usage-fallback.test.ts && bun test src/__tests__/proxy-async-ops.test.ts && bun test src/__tests__/proxy-session-store.test.ts && bun test src/__tests__/session-store-pruning.test.ts && bun test src/__tests__/proxy-session-store-locking.test.ts && bun test src/__tests__/proxy-context-usage-store.test.ts && bun test src/__tests__/models-auth-status.test.ts && bun test src/__tests__/proxy-passthrough-thinking.test.ts && bun test src/__tests__/proxy-session-recovery.test.ts && bun test src/__tests__/models.test.ts && bun test src/__tests__/proxy-health-degraded.test.ts && bun test src/__tests__/proxy-subagent-model-selection.test.ts",
28
+ "nix:lock": "bun2nix -o bun.nix",
28
29
  "typecheck": "tsc --noEmit",
29
30
  "proxy:direct": "bun run ./bin/cli.ts"
30
31
  },
@@ -36,6 +37,7 @@
36
37
  "@hono/node-server": "^1.19.11",
37
38
  "@types/bun": "^1.3.11",
38
39
  "@types/node": "^22.0.0",
40
+ "bun2nix": "^2.0.8",
39
41
  "glob": "^13.0.0",
40
42
  "hono": "^4.11.4",
41
43
  "typescript": "^5.8.2"