agent-shim 7.10.0 → 7.10.2
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.cjs +17 -17
- package/dist/index.cjs +0 -1
- package/dist/index.mjs +0 -1
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -15625,7 +15625,7 @@ var require_agent = __commonJS({
|
|
|
15625
15625
|
function defaultFactory(origin, opts) {
|
|
15626
15626
|
return opts && opts.connections === 1 ? new Client(origin, opts) : new Pool(origin, opts);
|
|
15627
15627
|
}
|
|
15628
|
-
var
|
|
15628
|
+
var Agent7 = class extends DispatcherBase {
|
|
15629
15629
|
constructor({ factory = defaultFactory, maxOrigins = Infinity, connect: connect3, ...options } = {}) {
|
|
15630
15630
|
if (typeof factory !== "function") {
|
|
15631
15631
|
throw new InvalidArgumentError2("factory must be a function.");
|
|
@@ -15734,7 +15734,7 @@ var require_agent = __commonJS({
|
|
|
15734
15734
|
return allClientStats;
|
|
15735
15735
|
}
|
|
15736
15736
|
};
|
|
15737
|
-
module2.exports =
|
|
15737
|
+
module2.exports = Agent7;
|
|
15738
15738
|
}
|
|
15739
15739
|
});
|
|
15740
15740
|
|
|
@@ -16440,7 +16440,7 @@ var require_proxy_agent = __commonJS({
|
|
|
16440
16440
|
"node_modules/.pnpm/undici@7.29.1/node_modules/undici/lib/dispatcher/proxy-agent.js"(exports2, module2) {
|
|
16441
16441
|
"use strict";
|
|
16442
16442
|
var { kProxy, kClose, kDestroy, kDispatch } = require_symbols();
|
|
16443
|
-
var
|
|
16443
|
+
var Agent7 = require_agent();
|
|
16444
16444
|
var Pool = require_pool();
|
|
16445
16445
|
var DispatcherBase = require_dispatcher_base();
|
|
16446
16446
|
var { InvalidArgumentError: InvalidArgumentError2, RequestAbortedError, SecureProxyConnectionError } = require_errors();
|
|
@@ -16571,7 +16571,7 @@ var require_proxy_agent = __commonJS({
|
|
|
16571
16571
|
} else {
|
|
16572
16572
|
this[kClient] = clientFactory(url2, { connect: connect3 });
|
|
16573
16573
|
}
|
|
16574
|
-
this[kAgent] = new
|
|
16574
|
+
this[kAgent] = new Agent7({
|
|
16575
16575
|
...opts,
|
|
16576
16576
|
factory,
|
|
16577
16577
|
connect: async (opts2, callback) => {
|
|
@@ -16699,7 +16699,7 @@ var require_env_http_proxy_agent = __commonJS({
|
|
|
16699
16699
|
var DispatcherBase = require_dispatcher_base();
|
|
16700
16700
|
var { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = require_symbols();
|
|
16701
16701
|
var ProxyAgent = require_proxy_agent();
|
|
16702
|
-
var
|
|
16702
|
+
var Agent7 = require_agent();
|
|
16703
16703
|
var DEFAULT_PORTS = {
|
|
16704
16704
|
"http:": 80,
|
|
16705
16705
|
"https:": 443
|
|
@@ -16712,7 +16712,7 @@ var require_env_http_proxy_agent = __commonJS({
|
|
|
16712
16712
|
super();
|
|
16713
16713
|
this.#opts = opts;
|
|
16714
16714
|
const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts;
|
|
16715
|
-
this[kNoProxyAgent] = new
|
|
16715
|
+
this[kNoProxyAgent] = new Agent7(agentOpts);
|
|
16716
16716
|
const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY;
|
|
16717
16717
|
if (HTTP_PROXY) {
|
|
16718
16718
|
this[kHttpProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTP_PROXY });
|
|
@@ -19410,7 +19410,7 @@ var require_mock_agent = __commonJS({
|
|
|
19410
19410
|
"node_modules/.pnpm/undici@7.29.1/node_modules/undici/lib/mock/mock-agent.js"(exports2, module2) {
|
|
19411
19411
|
"use strict";
|
|
19412
19412
|
var { kClients } = require_symbols();
|
|
19413
|
-
var
|
|
19413
|
+
var Agent7 = require_agent();
|
|
19414
19414
|
var {
|
|
19415
19415
|
kAgent,
|
|
19416
19416
|
kMockAgentSet,
|
|
@@ -19448,7 +19448,7 @@ var require_mock_agent = __commonJS({
|
|
|
19448
19448
|
if (opts?.agent && typeof opts.agent.dispatch !== "function") {
|
|
19449
19449
|
throw new InvalidArgumentError2("Argument opts.agent must implement Agent");
|
|
19450
19450
|
}
|
|
19451
|
-
const agent = opts?.agent ? opts.agent : new
|
|
19451
|
+
const agent = opts?.agent ? opts.agent : new Agent7(opts);
|
|
19452
19452
|
this[kAgent] = agent;
|
|
19453
19453
|
this[kClients] = agent[kClients];
|
|
19454
19454
|
this[kOptions] = mockOptions;
|
|
@@ -20055,7 +20055,7 @@ var require_snapshot_recorder = __commonJS({
|
|
|
20055
20055
|
var require_snapshot_agent = __commonJS({
|
|
20056
20056
|
"node_modules/.pnpm/undici@7.29.1/node_modules/undici/lib/mock/snapshot-agent.js"(exports2, module2) {
|
|
20057
20057
|
"use strict";
|
|
20058
|
-
var
|
|
20058
|
+
var Agent7 = require_agent();
|
|
20059
20059
|
var MockAgent = require_mock_agent();
|
|
20060
20060
|
var { SnapshotRecorder } = require_snapshot_recorder();
|
|
20061
20061
|
var WrapHandler = require_wrap_handler();
|
|
@@ -20106,7 +20106,7 @@ var require_snapshot_agent = __commonJS({
|
|
|
20106
20106
|
});
|
|
20107
20107
|
this[kSnapshotLoaded] = false;
|
|
20108
20108
|
if (this[kSnapshotMode] === "record" || this[kSnapshotMode] === "update" || this[kSnapshotMode] === "playback" && opts.excludeUrls && opts.excludeUrls.length > 0) {
|
|
20109
|
-
this[kRealAgent] = new
|
|
20109
|
+
this[kRealAgent] = new Agent7(opts);
|
|
20110
20110
|
}
|
|
20111
20111
|
if ((this[kSnapshotMode] === "playback" || this[kSnapshotMode] === "update") && this[kSnapshotPath]) {
|
|
20112
20112
|
this.loadSnapshots().catch(() => {
|
|
@@ -20345,9 +20345,9 @@ var require_global2 = __commonJS({
|
|
|
20345
20345
|
var globalDispatcher = /* @__PURE__ */ Symbol.for("undici.globalDispatcher.2");
|
|
20346
20346
|
var legacyGlobalDispatcher = /* @__PURE__ */ Symbol.for("undici.globalDispatcher.1");
|
|
20347
20347
|
var { InvalidArgumentError: InvalidArgumentError2 } = require_errors();
|
|
20348
|
-
var
|
|
20348
|
+
var Agent7 = require_agent();
|
|
20349
20349
|
if (getGlobalDispatcher() === void 0) {
|
|
20350
|
-
setGlobalDispatcher(new
|
|
20350
|
+
setGlobalDispatcher(new Agent7());
|
|
20351
20351
|
}
|
|
20352
20352
|
function setGlobalDispatcher(agent) {
|
|
20353
20353
|
if (!agent || typeof agent.dispatch !== "function") {
|
|
@@ -31562,7 +31562,7 @@ var require_undici = __commonJS({
|
|
|
31562
31562
|
var Pool = require_pool();
|
|
31563
31563
|
var BalancedPool = require_balanced_pool();
|
|
31564
31564
|
var RoundRobinPool = require_round_robin_pool();
|
|
31565
|
-
var
|
|
31565
|
+
var Agent7 = require_agent();
|
|
31566
31566
|
var ProxyAgent = require_proxy_agent();
|
|
31567
31567
|
var Socks5ProxyAgent = require_socks5_proxy_agent();
|
|
31568
31568
|
var EnvHttpProxyAgent = require_env_http_proxy_agent();
|
|
@@ -31589,7 +31589,7 @@ var require_undici = __commonJS({
|
|
|
31589
31589
|
module2.exports.Pool = Pool;
|
|
31590
31590
|
module2.exports.BalancedPool = BalancedPool;
|
|
31591
31591
|
module2.exports.RoundRobinPool = RoundRobinPool;
|
|
31592
|
-
module2.exports.Agent =
|
|
31592
|
+
module2.exports.Agent = Agent7;
|
|
31593
31593
|
module2.exports.ProxyAgent = ProxyAgent;
|
|
31594
31594
|
module2.exports.Socks5ProxyAgent = Socks5ProxyAgent;
|
|
31595
31595
|
module2.exports.EnvHttpProxyAgent = EnvHttpProxyAgent;
|
|
@@ -60955,7 +60955,7 @@ function registerIdentityCommand(program2, deps) {
|
|
|
60955
60955
|
// package.json
|
|
60956
60956
|
var package_default = {
|
|
60957
60957
|
name: "agent-shim",
|
|
60958
|
-
version: "7.10.
|
|
60958
|
+
version: "7.10.2",
|
|
60959
60959
|
description: "A profile manager and launcher for Claude Code that lets one person run multiple logins from one machine while controlling what gets shared between them.",
|
|
60960
60960
|
license: "MIT",
|
|
60961
60961
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -64666,7 +64666,6 @@ function routeConnect(socket, head, context) {
|
|
|
64666
64666
|
const credential = proxyAuthorizationOf(head);
|
|
64667
64667
|
const capability = credential === void 0 ? void 0 : capabilityFromProxyAuthorization(credential);
|
|
64668
64668
|
if (capability === void 0 || !config2.isLiveCapability(capability)) {
|
|
64669
|
-
console.error(`[upg-dbg] refused CONNECT to ${head.split("\r\n", 1)[0]?.split(" ")[1] ?? "?"} (credential ${credential === void 0 ? "absent" : "present but dead"})`);
|
|
64670
64669
|
refuse(socket, REFUSAL.proxyAuthenticationRequired, [`Proxy-Authenticate: Basic realm="${CONNECT_PROXY_REALM}"`]);
|
|
64671
64670
|
return;
|
|
64672
64671
|
}
|
|
@@ -65160,6 +65159,7 @@ async function applyHeadroomHop(request6, response, upstream, deps) {
|
|
|
65160
65159
|
}
|
|
65161
65160
|
}
|
|
65162
65161
|
}
|
|
65162
|
+
var HOP_AGENT = new http3.Agent({ keepAlive: false });
|
|
65163
65163
|
async function forwardThroughHeadroom(request6, response, target) {
|
|
65164
65164
|
const { port, headers } = target;
|
|
65165
65165
|
await new Promise((resolve) => {
|
|
@@ -65184,7 +65184,7 @@ async function forwardThroughHeadroom(request6, response, target) {
|
|
|
65184
65184
|
};
|
|
65185
65185
|
void stream();
|
|
65186
65186
|
};
|
|
65187
|
-
const hop = http3.request({ host: "127.0.0.1", port, method: request6.method, path: request6.url, headers }, onUpstreamResponse);
|
|
65187
|
+
const hop = http3.request({ host: "127.0.0.1", port, method: request6.method, path: request6.url, headers, agent: HOP_AGENT }, onUpstreamResponse);
|
|
65188
65188
|
hop.on("error", (error62) => {
|
|
65189
65189
|
target.log(`front door: headroom hop to 127.0.0.1:${String(port)} failed: ${error62.message}`);
|
|
65190
65190
|
if (!response.headersSent) {
|
package/dist/index.cjs
CHANGED
|
@@ -3072,7 +3072,6 @@ function routeConnect(socket, head, context) {
|
|
|
3072
3072
|
const credential = proxyAuthorizationOf(head);
|
|
3073
3073
|
const capability = credential === void 0 ? void 0 : capabilityFromProxyAuthorization(credential);
|
|
3074
3074
|
if (capability === void 0 || !config.isLiveCapability(capability)) {
|
|
3075
|
-
console.error(`[upg-dbg] refused CONNECT to ${head.split("\r\n", 1)[0]?.split(" ")[1] ?? "?"} (credential ${credential === void 0 ? "absent" : "present but dead"})`);
|
|
3076
3075
|
refuse(socket, REFUSAL.proxyAuthenticationRequired, [`Proxy-Authenticate: Basic realm="${CONNECT_PROXY_REALM}"`]);
|
|
3077
3076
|
return;
|
|
3078
3077
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -2909,7 +2909,6 @@ function routeConnect(socket, head, context) {
|
|
|
2909
2909
|
const credential = proxyAuthorizationOf(head);
|
|
2910
2910
|
const capability = credential === void 0 ? void 0 : capabilityFromProxyAuthorization(credential);
|
|
2911
2911
|
if (capability === void 0 || !config.isLiveCapability(capability)) {
|
|
2912
|
-
console.error(`[upg-dbg] refused CONNECT to ${head.split("\r\n", 1)[0]?.split(" ")[1] ?? "?"} (credential ${credential === void 0 ? "absent" : "present but dead"})`);
|
|
2913
2912
|
refuse(socket, REFUSAL.proxyAuthenticationRequired, [`Proxy-Authenticate: Basic realm="${CONNECT_PROXY_REALM}"`]);
|
|
2914
2913
|
return;
|
|
2915
2914
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-shim",
|
|
3
|
-
"version": "7.10.
|
|
3
|
+
"version": "7.10.2",
|
|
4
4
|
"description": "A profile manager and launcher for Claude Code that lets one person run multiple logins from one machine while controlling what gets shared between them.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Joseph Mearman <joseph@mearman.co.uk>",
|