@rynfar/meridian 1.27.2 → 1.27.4
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/dist/{cli-mx5hhmme.js → cli-td95gtqj.js} +15 -6
- package/dist/cli.js +1 -1
- package/dist/env.d.ts +24 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/proxy/server.d.ts.map +1 -1
- package/dist/server.js +1 -1
- package/package.json +1 -1
|
@@ -2175,6 +2175,15 @@ var DEFAULT_PROXY_CONFIG = {
|
|
|
2175
2175
|
silent: false
|
|
2176
2176
|
};
|
|
2177
2177
|
|
|
2178
|
+
// src/env.ts
|
|
2179
|
+
function env(suffix) {
|
|
2180
|
+
return process.env[`MERIDIAN_${suffix}`] ?? process.env[`CLAUDE_PROXY_${suffix}`];
|
|
2181
|
+
}
|
|
2182
|
+
function envBool(suffix) {
|
|
2183
|
+
const val = env(suffix);
|
|
2184
|
+
return val === "1" || val === "true" || val === "yes";
|
|
2185
|
+
}
|
|
2186
|
+
|
|
2178
2187
|
// src/proxy/server.ts
|
|
2179
2188
|
import { exec as execCallback2 } from "child_process";
|
|
2180
2189
|
import { promisify as promisify3 } from "util";
|
|
@@ -7656,7 +7665,7 @@ IMPORTANT: When using the task/Task tool, the subagent_type parameter must be on
|
|
|
7656
7665
|
},
|
|
7657
7666
|
extractFileChangesFromToolUse(toolName, toolInput) {
|
|
7658
7667
|
const input = toolInput;
|
|
7659
|
-
const filePath = input?.filePath ?? input?.file_path;
|
|
7668
|
+
const filePath = input?.filePath ?? input?.file_path ?? input?.path;
|
|
7660
7669
|
const lowerName = toolName.toLowerCase();
|
|
7661
7670
|
if (lowerName === "write" && filePath) {
|
|
7662
7671
|
return [{ operation: "wrote", path: String(filePath) }];
|
|
@@ -14609,7 +14618,7 @@ function createProxyServer(config = {}) {
|
|
|
14609
14618
|
`) || "";
|
|
14610
14619
|
}
|
|
14611
14620
|
const adapterPassthrough = adapter.usesPassthrough?.();
|
|
14612
|
-
const passthrough = adapterPassthrough !== undefined ? adapterPassthrough :
|
|
14621
|
+
const passthrough = adapterPassthrough !== undefined ? adapterPassthrough : envBool("PASSTHROUGH");
|
|
14613
14622
|
const capturedToolUses = [];
|
|
14614
14623
|
const fileChanges = [];
|
|
14615
14624
|
let passthroughMcp;
|
|
@@ -15480,7 +15489,7 @@ data: ${JSON.stringify({
|
|
|
15480
15489
|
requestModel: undefined,
|
|
15481
15490
|
mode: "non-stream",
|
|
15482
15491
|
isResume: false,
|
|
15483
|
-
isPassthrough:
|
|
15492
|
+
isPassthrough: envBool("PASSTHROUGH"),
|
|
15484
15493
|
lineageType: undefined,
|
|
15485
15494
|
messageCount: undefined,
|
|
15486
15495
|
sdkSessionId: undefined,
|
|
@@ -15520,7 +15529,7 @@ data: ${JSON.stringify({
|
|
|
15520
15529
|
return c.json({
|
|
15521
15530
|
status: "degraded",
|
|
15522
15531
|
error: "Could not verify auth status",
|
|
15523
|
-
mode:
|
|
15532
|
+
mode: envBool("PASSTHROUGH") ? "passthrough" : "internal"
|
|
15524
15533
|
});
|
|
15525
15534
|
}
|
|
15526
15535
|
if (!auth.loggedIn) {
|
|
@@ -15537,14 +15546,14 @@ data: ${JSON.stringify({
|
|
|
15537
15546
|
email: auth.email,
|
|
15538
15547
|
subscriptionType: auth.subscriptionType
|
|
15539
15548
|
},
|
|
15540
|
-
mode:
|
|
15549
|
+
mode: envBool("PASSTHROUGH") ? "passthrough" : "internal",
|
|
15541
15550
|
plugin: { opencode: checkPluginConfigured() ? "configured" : "not-configured" }
|
|
15542
15551
|
});
|
|
15543
15552
|
} catch {
|
|
15544
15553
|
return c.json({
|
|
15545
15554
|
status: "degraded",
|
|
15546
15555
|
error: "Could not verify auth status",
|
|
15547
|
-
mode:
|
|
15556
|
+
mode: envBool("PASSTHROUGH") ? "passthrough" : "internal"
|
|
15548
15557
|
});
|
|
15549
15558
|
}
|
|
15550
15559
|
});
|
package/dist/cli.js
CHANGED
package/dist/env.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Environment variable resolution with backward-compatible aliases.
|
|
3
|
+
*
|
|
4
|
+
* New MERIDIAN_* names take precedence over legacy CLAUDE_PROXY_* names.
|
|
5
|
+
* Both are supported indefinitely to avoid breaking existing deployments.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Resolve an env var with MERIDIAN_ prefix, falling back to CLAUDE_PROXY_ prefix.
|
|
9
|
+
* Returns undefined if neither is set.
|
|
10
|
+
*/
|
|
11
|
+
export declare function env(suffix: string): string | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Resolve an env var with a default value.
|
|
14
|
+
*/
|
|
15
|
+
export declare function envOr(suffix: string, defaultValue: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Resolve a boolean env var (truthy = "1", "true", "yes").
|
|
18
|
+
*/
|
|
19
|
+
export declare function envBool(suffix: string): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Resolve an integer env var with a default.
|
|
22
|
+
*/
|
|
23
|
+
export declare function envInt(suffix: string, defaultValue: number): number;
|
|
24
|
+
//# sourceMappingURL=env.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,wBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEtD;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAElE;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAG/C;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAKnE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/proxy/server.ts"],"names":[],"mappings":"
|
|
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,MAAM,SAAS,CAAA;AACtE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,CAAA;AAoBvD,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,oBAAoB,EACpB,KAAK,aAAa,EAEnB,MAAM,mBAAmB,CAAA;AAG1B,OAAO,EAA+B,iBAAiB,EAAE,mBAAmB,EAAsC,MAAM,iBAAiB,CAAA;AAEzI,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAA;AAChE,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,CAAA;AACjD,YAAY,EAAE,aAAa,EAAE,CAAA;AAoG7B,wBAAgB,iBAAiB,CAAC,MAAM,GAAE,OAAO,CAAC,WAAW,CAAM,GAAG,WAAW,CA0/ChF;AAED,wBAAsB,gBAAgB,CAAC,MAAM,GAAE,OAAO,CAAC,WAAW,CAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CA0ChG"}
|
package/dist/server.js
CHANGED
package/package.json
CHANGED