agent-shim 14.12.0 → 14.12.1
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 +41 -12
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -31558,18 +31558,45 @@ function realFrontDoorLiveness(pids) {
|
|
|
31558
31558
|
return { status: result.status, stdout: result.stdout, stderr: result.stderr, ...result.error === void 0 ? {} : { error: result.error } };
|
|
31559
31559
|
});
|
|
31560
31560
|
}
|
|
31561
|
-
|
|
31562
|
-
|
|
31563
|
-
|
|
31564
|
-
|
|
31565
|
-
|
|
31566
|
-
|
|
31567
|
-
|
|
31568
|
-
|
|
31569
|
-
|
|
31561
|
+
function startProcessStateRead() {
|
|
31562
|
+
if (processStateReadRunning || processStateWaiters.length === 0) {
|
|
31563
|
+
return;
|
|
31564
|
+
}
|
|
31565
|
+
const batch = processStateWaiters;
|
|
31566
|
+
processStateWaiters = [];
|
|
31567
|
+
processStateReadRunning = true;
|
|
31568
|
+
const pids = [...new Set(batch.flatMap((waiter) => waiter.pids))].filter((pid) => Number.isInteger(pid) && pid > 0);
|
|
31569
|
+
const timeoutMs = Math.max(...batch.map((waiter) => waiter.timeoutMs));
|
|
31570
|
+
const finish = (stdout2) => {
|
|
31571
|
+
const states = /* @__PURE__ */ new Map();
|
|
31572
|
+
for (const line of stdout2.split("\n")) {
|
|
31573
|
+
const [pidText, stat2] = line.trim().split(/\s+/);
|
|
31574
|
+
if (stat2 !== void 0) {
|
|
31575
|
+
states.set(Number(pidText), stat2);
|
|
31570
31576
|
}
|
|
31571
|
-
|
|
31577
|
+
}
|
|
31578
|
+
processStateReadRunning = false;
|
|
31579
|
+
for (const waiter of batch) {
|
|
31580
|
+
waiter.resolve(states);
|
|
31581
|
+
}
|
|
31582
|
+
startProcessStateRead();
|
|
31583
|
+
};
|
|
31584
|
+
if (pids.length === 0) {
|
|
31585
|
+
finish("");
|
|
31586
|
+
return;
|
|
31587
|
+
}
|
|
31588
|
+
try {
|
|
31589
|
+
(0, import_node_child_process3.execFile)("ps", ["-o", "pid=,stat=", "-p", pids.map(String).join(",")], { encoding: "utf8", timeout: timeoutMs }, (_error, stdout2) => {
|
|
31590
|
+
finish(stdout2);
|
|
31572
31591
|
});
|
|
31592
|
+
} catch {
|
|
31593
|
+
finish("");
|
|
31594
|
+
}
|
|
31595
|
+
}
|
|
31596
|
+
async function readProcessStates(pids, timeoutMs) {
|
|
31597
|
+
return await new Promise((resolve3) => {
|
|
31598
|
+
processStateWaiters.push({ pids, timeoutMs, resolve: resolve3 });
|
|
31599
|
+
startProcessStateRead();
|
|
31573
31600
|
});
|
|
31574
31601
|
}
|
|
31575
31602
|
async function realRunningAmong(pids, psTimeoutMs = PS_TIMEOUT_MS) {
|
|
@@ -31856,7 +31883,7 @@ function realResolveClaudeBinary(isOwnBinary) {
|
|
|
31856
31883
|
function realInstalledClaudeVersions() {
|
|
31857
31884
|
return installedVersions(listVersionsDir(defaultVersionsDir()));
|
|
31858
31885
|
}
|
|
31859
|
-
var import_node_child_process3, import_node_crypto4, import_node_fs5, import_node_os2, import_node_path11, import_node_sea, realFsPort, OWNER_ONLY_DIR_MODE, OWNER_ONLY_FILE_MODE, PERMISSION_BITS2, DIRECTORY_FLUSH_UNSUPPORTED_CODES, realFarmFs, INT32_BYTE_LENGTH, KEY_POLL_MS, CTRL_C_BYTE, realHoldPort, LINE_FEED, UTF8_CONTINUATION_MASK, UTF8_CONTINUATION_BITS, PS_TIMEOUT_MS, RUN_OUTPUT_LIMIT_MIB, BYTES_PER_MIB2, RUN_OUTPUT_LIMIT_BYTES, realRunPort, ASYNC_RUN_TIMEOUT_MS, realRunAsync, MACOS_GUI_SESSION_MANAGER, realCredentialPort, realAsyncCredentialPort, SOCKET_PERMISSION_BITS, realHeadroomSocketTrust, realSpawnPort, realProcPort, realLogPort, EXECUTE_BITS_MASK, WINDOWS_DEFAULT_PATHEXT, processPathFacts;
|
|
31886
|
+
var import_node_child_process3, import_node_crypto4, import_node_fs5, import_node_os2, import_node_path11, import_node_sea, realFsPort, OWNER_ONLY_DIR_MODE, OWNER_ONLY_FILE_MODE, PERMISSION_BITS2, DIRECTORY_FLUSH_UNSUPPORTED_CODES, realFarmFs, INT32_BYTE_LENGTH, KEY_POLL_MS, CTRL_C_BYTE, realHoldPort, LINE_FEED, UTF8_CONTINUATION_MASK, UTF8_CONTINUATION_BITS, PS_TIMEOUT_MS, processStateWaiters, processStateReadRunning, RUN_OUTPUT_LIMIT_MIB, BYTES_PER_MIB2, RUN_OUTPUT_LIMIT_BYTES, realRunPort, ASYNC_RUN_TIMEOUT_MS, realRunAsync, MACOS_GUI_SESSION_MANAGER, realCredentialPort, realAsyncCredentialPort, SOCKET_PERMISSION_BITS, realHeadroomSocketTrust, realSpawnPort, realProcPort, realLogPort, EXECUTE_BITS_MASK, WINDOWS_DEFAULT_PATHEXT, processPathFacts;
|
|
31860
31887
|
var init_realPorts = __esm({
|
|
31861
31888
|
"src/realPorts.ts"() {
|
|
31862
31889
|
"use strict";
|
|
@@ -32057,6 +32084,8 @@ var init_realPorts = __esm({
|
|
|
32057
32084
|
UTF8_CONTINUATION_MASK = 192;
|
|
32058
32085
|
UTF8_CONTINUATION_BITS = 128;
|
|
32059
32086
|
PS_TIMEOUT_MS = BLOCKING_STEP_TIMEOUTS_MS.processTable;
|
|
32087
|
+
processStateWaiters = [];
|
|
32088
|
+
processStateReadRunning = false;
|
|
32060
32089
|
RUN_OUTPUT_LIMIT_MIB = 256;
|
|
32061
32090
|
BYTES_PER_MIB2 = 1048576;
|
|
32062
32091
|
RUN_OUTPUT_LIMIT_BYTES = RUN_OUTPUT_LIMIT_MIB * BYTES_PER_MIB2;
|
|
@@ -76414,7 +76443,7 @@ var init_package = __esm({
|
|
|
76414
76443
|
"package.json"() {
|
|
76415
76444
|
package_default = {
|
|
76416
76445
|
name: "agent-shim",
|
|
76417
|
-
version: "14.12.
|
|
76446
|
+
version: "14.12.1",
|
|
76418
76447
|
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.",
|
|
76419
76448
|
license: "MIT",
|
|
76420
76449
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
package/dist/index.cjs
CHANGED
|
@@ -15209,7 +15209,7 @@ var init_package = __esm({
|
|
|
15209
15209
|
"package.json"() {
|
|
15210
15210
|
package_default = {
|
|
15211
15211
|
name: "agent-shim",
|
|
15212
|
-
version: "14.12.
|
|
15212
|
+
version: "14.12.1",
|
|
15213
15213
|
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.",
|
|
15214
15214
|
license: "MIT",
|
|
15215
15215
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
package/dist/index.mjs
CHANGED
|
@@ -15180,7 +15180,7 @@ var init_package = __esm({
|
|
|
15180
15180
|
"package.json"() {
|
|
15181
15181
|
package_default = {
|
|
15182
15182
|
name: "agent-shim",
|
|
15183
|
-
version: "14.12.
|
|
15183
|
+
version: "14.12.1",
|
|
15184
15184
|
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.",
|
|
15185
15185
|
license: "MIT",
|
|
15186
15186
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-shim",
|
|
3
|
-
"version": "14.12.
|
|
3
|
+
"version": "14.12.1",
|
|
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>",
|