agent-shim 14.17.1 → 14.19.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 +45 -4
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/types/index.d.ts +900 -897
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -40493,7 +40493,7 @@ ${request7.rawHeaders.reduce((accumulated, value3, index) => index % 2 === 0 ? `
|
|
|
40493
40493
|
answerAndClose(response, REQUEST_STATUS.notFound);
|
|
40494
40494
|
return;
|
|
40495
40495
|
}
|
|
40496
|
-
const rewritten = config2.rewriteForwardedAuthorization?.(host, request7, tunnelTokens.get(request7.socket));
|
|
40496
|
+
const rewritten = await config2.rewriteForwardedAuthorization?.(host, request7, tunnelTokens.get(request7.socket));
|
|
40497
40497
|
if (rewritten !== void 0) {
|
|
40498
40498
|
request7.headers.authorization = rewritten.authorization;
|
|
40499
40499
|
request7.url = rewritten.url;
|
|
@@ -41083,7 +41083,7 @@ async function fetchLenderConnectors(httpGet, apiBase, bearer) {
|
|
|
41083
41083
|
controller.abort();
|
|
41084
41084
|
}, LENDER_CONNECTORS_TIMEOUT_MS);
|
|
41085
41085
|
try {
|
|
41086
|
-
const response = await httpGet(`${apiBase}${MCP_SERVERS_PATH}`, { authorization: `Bearer ${bearer}`, "anthropic-beta": MCP_SERVERS_BETA, "mcp-protocol-version": "2025-11-25" }, controller.signal);
|
|
41086
|
+
const response = await httpGet(`${apiBase}${MCP_SERVERS_PATH}`, { authorization: `Bearer ${bearer}`, "anthropic-beta": MCP_SERVERS_BETA, "mcp-protocol-version": "2025-11-25", "anthropic-version": ANTHROPIC_VERSION }, controller.signal);
|
|
41087
41087
|
if (response.status !== HTTP_STATUS.ok) {
|
|
41088
41088
|
return void 0;
|
|
41089
41089
|
}
|
|
@@ -41133,7 +41133,7 @@ function wiredMergeConnectorList(deps) {
|
|
|
41133
41133
|
return await mergedConnectorListBody(bodyText, lenders, { httpGet: deps.httpGet, apiBase: deps.apiBase });
|
|
41134
41134
|
};
|
|
41135
41135
|
}
|
|
41136
|
-
var LENDER_CONNECTORS_TIMEOUT_MS, MCP_SERVERS_PATH, MCP_SERVERS_BETA;
|
|
41136
|
+
var LENDER_CONNECTORS_TIMEOUT_MS, MCP_SERVERS_PATH, MCP_SERVERS_BETA, ANTHROPIC_VERSION;
|
|
41137
41137
|
var init_connectorListMerge = __esm({
|
|
41138
41138
|
"src/connectorListMerge.ts"() {
|
|
41139
41139
|
"use strict";
|
|
@@ -41142,6 +41142,7 @@ var init_connectorListMerge = __esm({
|
|
|
41142
41142
|
LENDER_CONNECTORS_TIMEOUT_MS = 5e3;
|
|
41143
41143
|
MCP_SERVERS_PATH = "/v1/mcp_servers?limit=1000&include_additional_installs=true";
|
|
41144
41144
|
MCP_SERVERS_BETA = "mcp-servers-2025-12-04";
|
|
41145
|
+
ANTHROPIC_VERSION = "2023-06-01";
|
|
41145
41146
|
}
|
|
41146
41147
|
});
|
|
41147
41148
|
|
|
@@ -76541,6 +76542,23 @@ function ensureFrontDoor(params) {
|
|
|
76541
76542
|
ports.sleep(FRONTDOOR_LAUNCHER_POLL_MS);
|
|
76542
76543
|
}
|
|
76543
76544
|
}
|
|
76545
|
+
function startFrontDoor(params) {
|
|
76546
|
+
const { paths, ports } = params;
|
|
76547
|
+
const previousPid = readFrontDoorState(ports.fs, paths.frontdoorStateFile)?.supervisorPid;
|
|
76548
|
+
if (previousPid !== void 0 && ports.isRunning(previousPid)) {
|
|
76549
|
+
return { action: "already-running", pid: previousPid };
|
|
76550
|
+
}
|
|
76551
|
+
try {
|
|
76552
|
+
ensureFrontDoor({ paths, launcherPid: params.pid, ports });
|
|
76553
|
+
} finally {
|
|
76554
|
+
removeFrontDoorSession(ports.fs, paths.frontdoorSessionsDir, params.pid);
|
|
76555
|
+
}
|
|
76556
|
+
const pid = readFrontDoorState(ports.fs, paths.frontdoorStateFile)?.supervisorPid;
|
|
76557
|
+
if (pid === void 0) {
|
|
76558
|
+
throw new FrontDoorStartError(`the front door was started but its state records no supervisor. Daemon log: ${paths.frontdoorLogPath}`);
|
|
76559
|
+
}
|
|
76560
|
+
return { action: "started", pid };
|
|
76561
|
+
}
|
|
76544
76562
|
function restartFrontDoor(params) {
|
|
76545
76563
|
const { paths, ports } = params;
|
|
76546
76564
|
const previousPid = readFrontDoorState(ports.fs, paths.frontdoorStateFile)?.supervisorPid;
|
|
@@ -76678,6 +76696,9 @@ function realEnsurePorts(paths, spawnDaemon) {
|
|
|
76678
76696
|
function realRestartFrontDoor(paths, spawnDaemon, reason) {
|
|
76679
76697
|
return restartFrontDoor({ paths, pid: process.pid, reason, ports: realEnsurePorts(paths, spawnDaemon) });
|
|
76680
76698
|
}
|
|
76699
|
+
function realStartFrontDoor(paths, spawnDaemon) {
|
|
76700
|
+
return startFrontDoor({ paths, pid: process.pid, ports: realEnsurePorts(paths, spawnDaemon) });
|
|
76701
|
+
}
|
|
76681
76702
|
function realFrontDoorPort(paths, spawnDaemon) {
|
|
76682
76703
|
return {
|
|
76683
76704
|
waitForCatalogues: (supervisorPid) => {
|
|
@@ -76800,7 +76821,7 @@ var init_package = __esm({
|
|
|
76800
76821
|
"package.json"() {
|
|
76801
76822
|
package_default = {
|
|
76802
76823
|
name: "agent-shim",
|
|
76803
|
-
version: "14.
|
|
76824
|
+
version: "14.19.0",
|
|
76804
76825
|
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.",
|
|
76805
76826
|
license: "MIT",
|
|
76806
76827
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -154370,6 +154391,25 @@ function predecessorOfThisProcess() {
|
|
|
154370
154391
|
// src/frontdoor/commands.ts
|
|
154371
154392
|
init_realFrontDoorPort();
|
|
154372
154393
|
|
|
154394
|
+
// src/frontdoor/frontdoorStartCommand.ts
|
|
154395
|
+
init_commandDeps();
|
|
154396
|
+
init_realFrontDoorPort();
|
|
154397
|
+
function registerFrontdoorStartCommand(frontdoor, paths, spawnDetachedSupervisor2) {
|
|
154398
|
+
withExamples(
|
|
154399
|
+
frontdoor.command("start").description(
|
|
154400
|
+
"Start a front door when none is serving, the way a launch's own lazy start would, without spawning claude; attaches to an existing door rather than starting a second one. A watchdog uses this, never `restart`, which is a deliberate no-op with nothing already running."
|
|
154401
|
+
).option("--json", "Print the result as JSON.").action((options) => {
|
|
154402
|
+
const result = realStartFrontDoor(paths, spawnDetachedSupervisor2);
|
|
154403
|
+
if (options.json === true) {
|
|
154404
|
+
printJson(result);
|
|
154405
|
+
return;
|
|
154406
|
+
}
|
|
154407
|
+
console.log(result.action === "already-running" ? `front door already running: pid ${String(result.pid)}` : `front door started: pid ${String(result.pid)}`);
|
|
154408
|
+
}),
|
|
154409
|
+
["agent-shim frontdoor start", "agent-shim frontdoor start --json"]
|
|
154410
|
+
);
|
|
154411
|
+
}
|
|
154412
|
+
|
|
154373
154413
|
// src/frontdoor/rcCommands.ts
|
|
154374
154414
|
var import_node_crypto33 = require("node:crypto");
|
|
154375
154415
|
init_commandDeps();
|
|
@@ -158868,6 +158908,7 @@ function registerFrontDoorCommand(program2, deps) {
|
|
|
158868
158908
|
}),
|
|
158869
158909
|
["agent-shim frontdoor restart", "agent-shim frontdoor restart --json"]
|
|
158870
158910
|
);
|
|
158911
|
+
registerFrontdoorStartCommand(frontdoor, paths, spawnDetachedSupervisor);
|
|
158871
158912
|
registerRcCommand(frontdoor, paths);
|
|
158872
158913
|
program2.command("__frontdoor-supervisor", { hidden: true }).description("Internal: serve the front-door routing listeners. Started by the launcher; never run by hand.").allowUnknownOption().action(async () => {
|
|
158873
158914
|
const idleShutdownMinutes = readGlobalConfig(paths)?.frontdoor?.idleShutdownMinutes ?? FRONTDOOR_DEFAULT_IDLE_SHUTDOWN_MINUTES;
|
package/dist/index.cjs
CHANGED
|
@@ -6243,7 +6243,7 @@ ${request4.rawHeaders.reduce((accumulated, value, index) => index % 2 === 0 ? `$
|
|
|
6243
6243
|
answerAndClose(response, REQUEST_STATUS.notFound);
|
|
6244
6244
|
return;
|
|
6245
6245
|
}
|
|
6246
|
-
const rewritten = config.rewriteForwardedAuthorization?.(host, request4, tunnelTokens.get(request4.socket));
|
|
6246
|
+
const rewritten = await config.rewriteForwardedAuthorization?.(host, request4, tunnelTokens.get(request4.socket));
|
|
6247
6247
|
if (rewritten !== void 0) {
|
|
6248
6248
|
request4.headers.authorization = rewritten.authorization;
|
|
6249
6249
|
request4.url = rewritten.url;
|
|
@@ -15369,7 +15369,7 @@ var init_package = __esm({
|
|
|
15369
15369
|
"package.json"() {
|
|
15370
15370
|
package_default = {
|
|
15371
15371
|
name: "agent-shim",
|
|
15372
|
-
version: "14.
|
|
15372
|
+
version: "14.19.0",
|
|
15373
15373
|
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.",
|
|
15374
15374
|
license: "MIT",
|
|
15375
15375
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
package/dist/index.mjs
CHANGED
|
@@ -6219,7 +6219,7 @@ ${request4.rawHeaders.reduce((accumulated, value, index) => index % 2 === 0 ? `$
|
|
|
6219
6219
|
answerAndClose(response, REQUEST_STATUS.notFound);
|
|
6220
6220
|
return;
|
|
6221
6221
|
}
|
|
6222
|
-
const rewritten = config.rewriteForwardedAuthorization?.(host, request4, tunnelTokens.get(request4.socket));
|
|
6222
|
+
const rewritten = await config.rewriteForwardedAuthorization?.(host, request4, tunnelTokens.get(request4.socket));
|
|
6223
6223
|
if (rewritten !== void 0) {
|
|
6224
6224
|
request4.headers.authorization = rewritten.authorization;
|
|
6225
6225
|
request4.url = rewritten.url;
|
|
@@ -15340,7 +15340,7 @@ var init_package = __esm({
|
|
|
15340
15340
|
"package.json"() {
|
|
15341
15341
|
package_default = {
|
|
15342
15342
|
name: "agent-shim",
|
|
15343
|
-
version: "14.
|
|
15343
|
+
version: "14.19.0",
|
|
15344
15344
|
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.",
|
|
15345
15345
|
license: "MIT",
|
|
15346
15346
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|