claude-use 7.10.1 → 7.11.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/dist/cli.cjs CHANGED
@@ -60955,7 +60955,7 @@ function registerIdentityCommand(program2, deps) {
60955
60955
  // package.json
60956
60956
  var package_default = {
60957
60957
  name: "claude-use",
60958
- version: "7.10.1",
60958
+ version: "7.11.0",
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>",
@@ -64534,11 +64534,17 @@ ${request6.rawHeaders.reduce((accumulated, value, index) => index % 2 === 0 ? `$
64534
64534
  const listener = await effects.listenLoopback(preferredPort, (socket) => {
64535
64535
  handleConnect(socket, { config: config2, effects, sessions, ledger });
64536
64536
  });
64537
+ const apiSession = sessions.find((session) => session.host === config2.routedHost);
64538
+ const transparent = config2.transparentPort === void 0 || apiSession === void 0 ? void 0 : await effects.listenLoopback(config2.transparentPort, (socket) => {
64539
+ apiSession.tlsAcceptor.accept(socket, config2.transparentCapability ?? "");
64540
+ });
64537
64541
  return {
64538
64542
  port: listener.port,
64543
+ ...transparent === void 0 ? {} : { transparentPort: transparent.port },
64539
64544
  close: async () => {
64540
64545
  ledger.close();
64541
64546
  await listener.close();
64547
+ await transparent?.close();
64542
64548
  for (const { httpSession, tlsAcceptor } of sessions) {
64543
64549
  tlsAcceptor.close();
64544
64550
  httpSession?.close();
@@ -64666,7 +64672,6 @@ function routeConnect(socket, head, context) {
64666
64672
  const credential = proxyAuthorizationOf(head);
64667
64673
  const capability = credential === void 0 ? void 0 : capabilityFromProxyAuthorization(credential);
64668
64674
  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
64675
  refuse(socket, REFUSAL.proxyAuthenticationRequired, [`Proxy-Authenticate: Basic realm="${CONNECT_PROXY_REALM}"`]);
64671
64676
  return;
64672
64677
  }
@@ -66780,6 +66785,11 @@ function realFrontDoorSupervisorPorts(paths) {
66780
66785
  return { port: handle.port, close: handle.close };
66781
66786
  },
66782
66787
  startConnectListener: async (preferredPort) => {
66788
+ const transparentPort = process.env.AGENT_SHIM_TRANSPARENT_SURFACE === void 0 ? void 0 : Number(process.env.AGENT_SHIM_TRANSPARENT_SURFACE);
66789
+ const transparentCapability = transparentPort === void 0 || Number.isNaN(transparentPort) ? void 0 : (0, import_node_crypto13.randomUUID)();
66790
+ if (transparentCapability !== void 0) {
66791
+ writeFrontDoorSession(realFarmFs, paths.frontdoorSessionsDir, { pid: process.pid, startedAt: Date.now(), token: transparentCapability });
66792
+ }
66783
66793
  const leafFor = createLeafCache(loadCa(), () => /* @__PURE__ */ new Date());
66784
66794
  const capture = captureFromEnv(process.env, paths.logsDir);
66785
66795
  if (capture !== void 0) {
@@ -66812,6 +66822,7 @@ function realFrontDoorSupervisorPorts(paths) {
66812
66822
  leafFor,
66813
66823
  upstreamFor: (host) => ({ host, port: HTTPS_PORT, tls: true }),
66814
66824
  isLiveCapability: isLiveToken,
66825
+ ...transparentPort === void 0 || Number.isNaN(transparentPort) ? {} : { transparentPort, ...transparentCapability === void 0 ? {} : { transparentCapability } },
66815
66826
  limits: CONNECT_LIMITS,
66816
66827
  ...capture === void 0 ? {} : { capture }
66817
66828
  },
package/dist/index.cjs CHANGED
@@ -2940,11 +2940,17 @@ ${request3.rawHeaders.reduce((accumulated, value, index) => index % 2 === 0 ? `$
2940
2940
  const listener = await effects.listenLoopback(preferredPort, (socket) => {
2941
2941
  handleConnect(socket, { config, effects, sessions, ledger });
2942
2942
  });
2943
+ const apiSession = sessions.find((session) => session.host === config.routedHost);
2944
+ const transparent = config.transparentPort === void 0 || apiSession === void 0 ? void 0 : await effects.listenLoopback(config.transparentPort, (socket) => {
2945
+ apiSession.tlsAcceptor.accept(socket, config.transparentCapability ?? "");
2946
+ });
2943
2947
  return {
2944
2948
  port: listener.port,
2949
+ ...transparent === void 0 ? {} : { transparentPort: transparent.port },
2945
2950
  close: async () => {
2946
2951
  ledger.close();
2947
2952
  await listener.close();
2953
+ await transparent?.close();
2948
2954
  for (const { httpSession, tlsAcceptor } of sessions) {
2949
2955
  tlsAcceptor.close();
2950
2956
  httpSession?.close();
@@ -3072,7 +3078,6 @@ function routeConnect(socket, head, context) {
3072
3078
  const credential = proxyAuthorizationOf(head);
3073
3079
  const capability = credential === void 0 ? void 0 : capabilityFromProxyAuthorization(credential);
3074
3080
  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
3081
  refuse(socket, REFUSAL.proxyAuthenticationRequired, [`Proxy-Authenticate: Basic realm="${CONNECT_PROXY_REALM}"`]);
3077
3082
  return;
3078
3083
  }
package/dist/index.mjs CHANGED
@@ -2777,11 +2777,17 @@ ${request3.rawHeaders.reduce((accumulated, value, index) => index % 2 === 0 ? `$
2777
2777
  const listener = await effects.listenLoopback(preferredPort, (socket) => {
2778
2778
  handleConnect(socket, { config, effects, sessions, ledger });
2779
2779
  });
2780
+ const apiSession = sessions.find((session) => session.host === config.routedHost);
2781
+ const transparent = config.transparentPort === void 0 || apiSession === void 0 ? void 0 : await effects.listenLoopback(config.transparentPort, (socket) => {
2782
+ apiSession.tlsAcceptor.accept(socket, config.transparentCapability ?? "");
2783
+ });
2780
2784
  return {
2781
2785
  port: listener.port,
2786
+ ...transparent === void 0 ? {} : { transparentPort: transparent.port },
2782
2787
  close: async () => {
2783
2788
  ledger.close();
2784
2789
  await listener.close();
2790
+ await transparent?.close();
2785
2791
  for (const { httpSession, tlsAcceptor } of sessions) {
2786
2792
  tlsAcceptor.close();
2787
2793
  httpSession?.close();
@@ -2909,7 +2915,6 @@ function routeConnect(socket, head, context) {
2909
2915
  const credential = proxyAuthorizationOf(head);
2910
2916
  const capability = credential === void 0 ? void 0 : capabilityFromProxyAuthorization(credential);
2911
2917
  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
2918
  refuse(socket, REFUSAL.proxyAuthenticationRequired, [`Proxy-Authenticate: Basic realm="${CONNECT_PROXY_REALM}"`]);
2914
2919
  return;
2915
2920
  }
@@ -171,6 +171,14 @@ export interface ConnectServerConfig {
171
171
  readonly upstreamFor: (host: string) => ConnectForwardTarget;
172
172
  /** Whether a capability presented as a CONNECT request's proxy credential belongs to a live launch: the same constant-time check against the same registry the routed pipeline's admission makes, read fresh on every call because launches come and go. */
173
173
  readonly isLiveCapability: (token: string) => boolean;
174
+ /**
175
+ * Binds a second listener that serves the intercept hosts' sessions to connections arriving pre-established, with no CONNECT handshake to authenticate: what an operating-system redirect (a pf rule sending the real hosts' address to this port) delivers. Only the API host's session is reachable this way, never a tap host's, because a redirect can name only addresses and the control plane shares the API host's address today; if that ever splits, the transparent listener must not follow it blindly. There is no capability to check on this surface: the connection carried no proxy credential, so every request rides the pipeline anonymously, admitted the way a tunnel's own header-less requests are (by nothing, which is exactly what they present), and the surface exists solely for clients that ignore proxies and would otherwise be invisible to the door entirely.
176
+ */
177
+ readonly transparentPort?: number;
178
+ /**
179
+ * The capability the transparent surface's sessions carry: a real, registered token minted by the door for its own pid, so header-less traffic that arrives by redirect is admitted and attributed like any launch's instead of being refused for a credential it cannot possibly present. Absent along with `transparentPort`.
180
+ */
181
+ readonly transparentCapability?: string;
174
182
  /** The intercept hosts that are never HTTP-parsed: terminated, tapped at the byte level, and pumped to their real host. */
175
183
  readonly tapHosts: readonly string[];
176
184
  /** The connection deadlines and caps; production passes `CONNECT_LIMITS`. */
@@ -181,6 +189,8 @@ export interface ConnectServerConfig {
181
189
  /** A running connect surface. */
182
190
  export interface ConnectServerHandle {
183
191
  readonly port: number;
192
+ /** The transparent listener's port, when one was requested: what an operating-system redirect should point at. */
193
+ readonly transparentPort?: number;
184
194
  /** Stops the listener, drops every live tunnel and terminated session, and resolves once the port is released. */
185
195
  readonly close: () => Promise<void>;
186
196
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-use",
3
- "version": "7.10.1",
3
+ "version": "7.11.0",
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>",