@rynfar/meridian 1.22.2 → 1.23.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 CHANGED
@@ -302,6 +302,7 @@ See [`adapters/detect.ts`](src/proxy/adapters/detect.ts) and [`adapters/opencode
302
302
  | `MERIDIAN_WORKDIR` | `CLAUDE_PROXY_WORKDIR` | `cwd()` | Default working directory for SDK |
303
303
  | `MERIDIAN_IDLE_TIMEOUT_SECONDS` | `CLAUDE_PROXY_IDLE_TIMEOUT_SECONDS` | `120` | HTTP keep-alive timeout |
304
304
  | `MERIDIAN_TELEMETRY_SIZE` | `CLAUDE_PROXY_TELEMETRY_SIZE` | `1000` | Telemetry ring buffer size |
305
+ | `MERIDIAN_NO_FILE_CHANGES` | `CLAUDE_PROXY_NO_FILE_CHANGES` | unset | Disable "Files changed" summary in responses |
305
306
 
306
307
  ## Programmatic API
307
308
 
@@ -14194,7 +14194,8 @@ function createProxyServer(config = {}) {
14194
14194
  passthroughMcp = createPassthroughMcpServer(body.tools);
14195
14195
  }
14196
14196
  const mcpPrefix = `mcp__${adapter.getMcpServerName()}__`;
14197
- const fileChangeHook = createFileChangeHook(fileChanges, mcpPrefix);
14197
+ const trackFileChanges = !(process.env.MERIDIAN_NO_FILE_CHANGES ?? process.env.CLAUDE_PROXY_NO_FILE_CHANGES);
14198
+ const fileChangeHook = trackFileChanges ? createFileChangeHook(fileChanges, mcpPrefix) : undefined;
14198
14199
  const sdkHooks = passthrough ? {
14199
14200
  PreToolUse: [{
14200
14201
  matcher: "",
@@ -14212,7 +14213,7 @@ function createProxyServer(config = {}) {
14212
14213
  }]
14213
14214
  } : {
14214
14215
  ...adapter.buildSdkHooks?.(body, sdkAgents) ?? {},
14215
- PostToolUse: [fileChangeHook]
14216
+ ...fileChangeHook ? { PostToolUse: [fileChangeHook] } : {}
14216
14217
  };
14217
14218
  if (!stream2) {
14218
14219
  const contentBlocks = [];
@@ -14379,19 +14380,21 @@ function createProxyServer(config = {}) {
14379
14380
  }
14380
14381
  const hasToolUse = contentBlocks.some((b) => b.type === "tool_use");
14381
14382
  const stopReason = hasToolUse ? "tool_use" : "end_turn";
14382
- if (passthrough && stopReason === "end_turn" && adapter.extractFileChangesFromToolUse) {
14383
- const passthroughChanges = extractFileChangesFromMessages(body.messages || [], adapter.extractFileChangesFromToolUse.bind(adapter));
14384
- fileChanges.push(...passthroughChanges);
14385
- }
14386
- const fileChangeSummary = formatFileChangeSummary(fileChanges);
14387
- if (fileChangeSummary) {
14388
- const lastTextBlock = [...contentBlocks].reverse().find((b) => b.type === "text");
14389
- if (lastTextBlock) {
14390
- lastTextBlock.text = lastTextBlock.text + fileChangeSummary;
14391
- } else {
14392
- contentBlocks.push({ type: "text", text: fileChangeSummary.trimStart() });
14383
+ if (trackFileChanges) {
14384
+ if (passthrough && stopReason === "end_turn" && adapter.extractFileChangesFromToolUse) {
14385
+ const passthroughChanges = extractFileChangesFromMessages(body.messages || [], adapter.extractFileChangesFromToolUse.bind(adapter));
14386
+ fileChanges.push(...passthroughChanges);
14387
+ }
14388
+ const fileChangeSummary = formatFileChangeSummary(fileChanges);
14389
+ if (fileChangeSummary) {
14390
+ const lastTextBlock = [...contentBlocks].reverse().find((b) => b.type === "text");
14391
+ if (lastTextBlock) {
14392
+ lastTextBlock.text = lastTextBlock.text + fileChangeSummary;
14393
+ } else {
14394
+ contentBlocks.push({ type: "text", text: fileChangeSummary.trimStart() });
14395
+ }
14396
+ claudeLog("response.file_changes", { mode: "non_stream", count: fileChanges.length });
14393
14397
  }
14394
- claudeLog("response.file_changes", { mode: "non_stream", count: fileChanges.length });
14395
14398
  }
14396
14399
  if (contentBlocks.length === 0) {
14397
14400
  contentBlocks.push({
@@ -14750,37 +14753,39 @@ data: ${JSON.stringify({
14750
14753
 
14751
14754
  `), "passthrough_message_delta");
14752
14755
  }
14753
- if (passthrough && adapter.extractFileChangesFromToolUse) {
14756
+ if (trackFileChanges && passthrough && adapter.extractFileChangesFromToolUse) {
14754
14757
  const passthroughChanges = extractFileChangesFromMessages(body.messages || [], adapter.extractFileChangesFromToolUse.bind(adapter));
14755
14758
  fileChanges.push(...passthroughChanges);
14756
14759
  }
14757
- const streamFileChangeSummary = formatFileChangeSummary(fileChanges);
14758
- if (streamFileChangeSummary && messageStartEmitted) {
14759
- const fcBlockIndex = nextClientBlockIndex++;
14760
- safeEnqueue(encoder.encode(`event: content_block_start
14760
+ if (trackFileChanges) {
14761
+ const streamFileChangeSummary = formatFileChangeSummary(fileChanges);
14762
+ if (streamFileChangeSummary && messageStartEmitted) {
14763
+ const fcBlockIndex = nextClientBlockIndex++;
14764
+ safeEnqueue(encoder.encode(`event: content_block_start
14761
14765
  data: ${JSON.stringify({
14762
- type: "content_block_start",
14763
- index: fcBlockIndex,
14764
- content_block: { type: "text", text: "" }
14765
- })}
14766
+ type: "content_block_start",
14767
+ index: fcBlockIndex,
14768
+ content_block: { type: "text", text: "" }
14769
+ })}
14766
14770
 
14767
14771
  `), "file_changes_block_start");
14768
- safeEnqueue(encoder.encode(`event: content_block_delta
14772
+ safeEnqueue(encoder.encode(`event: content_block_delta
14769
14773
  data: ${JSON.stringify({
14770
- type: "content_block_delta",
14771
- index: fcBlockIndex,
14772
- delta: { type: "text_delta", text: streamFileChangeSummary }
14773
- })}
14774
+ type: "content_block_delta",
14775
+ index: fcBlockIndex,
14776
+ delta: { type: "text_delta", text: streamFileChangeSummary }
14777
+ })}
14774
14778
 
14775
14779
  `), "file_changes_text_delta");
14776
- safeEnqueue(encoder.encode(`event: content_block_stop
14780
+ safeEnqueue(encoder.encode(`event: content_block_stop
14777
14781
  data: ${JSON.stringify({
14778
- type: "content_block_stop",
14779
- index: fcBlockIndex
14780
- })}
14782
+ type: "content_block_stop",
14783
+ index: fcBlockIndex
14784
+ })}
14781
14785
 
14782
14786
  `), "file_changes_block_stop");
14783
- claudeLog("response.file_changes", { mode: "stream", count: fileChanges.length });
14787
+ claudeLog("response.file_changes", { mode: "stream", count: fileChanges.length });
14788
+ }
14784
14789
  }
14785
14790
  if (messageStartEmitted) {
14786
14791
  safeEnqueue(encoder.encode(`event: message_stop
package/dist/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  __require,
4
4
  startProxyServer
5
- } from "./cli-avsc9sr9.js";
5
+ } from "./cli-jxs230js.js";
6
6
 
7
7
  // bin/cli.ts
8
8
  import { createRequire } from "module";
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/proxy/server.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACtE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,CAAA;AAiBvD,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,oBAAoB,EACpB,KAAK,aAAa,EACnB,MAAM,mBAAmB,CAAA;AAG1B,OAAO,EAA+B,iBAAiB,EAAE,mBAAmB,EAAgB,MAAM,iBAAiB,CAAA;AAEnH,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAA;AAChE,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,CAAA;AACjD,YAAY,EAAE,aAAa,EAAE,CAAA;AAyF7B,wBAAgB,iBAAiB,CAAC,MAAM,GAAE,OAAO,CAAC,WAAW,CAAM,GAAG,WAAW,CA2qChF;AAED,wBAAsB,gBAAgB,CAAC,MAAM,GAAE,OAAO,CAAC,WAAW,CAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CA0ChG"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/proxy/server.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACtE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,CAAA;AAiBvD,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,oBAAoB,EACpB,KAAK,aAAa,EACnB,MAAM,mBAAmB,CAAA;AAG1B,OAAO,EAA+B,iBAAiB,EAAE,mBAAmB,EAAgB,MAAM,iBAAiB,CAAA;AAEnH,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAA;AAChE,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,CAAA;AACjD,YAAY,EAAE,aAAa,EAAE,CAAA;AAyF7B,wBAAgB,iBAAiB,CAAC,MAAM,GAAE,OAAO,CAAC,WAAW,CAAM,GAAG,WAAW,CAgrChF;AAED,wBAAsB,gBAAgB,CAAC,MAAM,GAAE,OAAO,CAAC,WAAW,CAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CA0ChG"}
package/dist/server.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  getMaxSessionsLimit,
7
7
  hashMessage,
8
8
  startProxyServer
9
- } from "./cli-avsc9sr9.js";
9
+ } from "./cli-jxs230js.js";
10
10
  export {
11
11
  startProxyServer,
12
12
  hashMessage,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rynfar/meridian",
3
- "version": "1.22.2",
3
+ "version": "1.23.0",
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",