claude-use 11.67.2 → 11.67.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.cjs +43 -26
- package/dist/index.cjs +9 -9
- package/dist/index.mjs +9 -9
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -37387,7 +37387,7 @@ var init_package = __esm({
|
|
|
37387
37387
|
"package.json"() {
|
|
37388
37388
|
package_default = {
|
|
37389
37389
|
name: "claude-use",
|
|
37390
|
-
version: "11.67.
|
|
37390
|
+
version: "11.67.4",
|
|
37391
37391
|
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.",
|
|
37392
37392
|
license: "MIT",
|
|
37393
37393
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -66349,27 +66349,27 @@ var init_ensure2 = __esm({
|
|
|
66349
66349
|
});
|
|
66350
66350
|
|
|
66351
66351
|
// src/frontdoor/probe.ts
|
|
66352
|
-
function probeFrontDoorSync(port, caPem) {
|
|
66352
|
+
function probeFrontDoorSync(port, caPem, timeoutMs = PROBE_TIMEOUT_MS) {
|
|
66353
66353
|
refuseToBlockInRole("a synchronous probe of the front door");
|
|
66354
|
-
return runProbeWorker(PROBE_SOURCE, { port, ca: caPem });
|
|
66354
|
+
return runProbeWorker(PROBE_SOURCE, { port, ca: caPem }, timeoutMs);
|
|
66355
66355
|
}
|
|
66356
|
-
function probeListenerAcceptSync(port) {
|
|
66356
|
+
function probeListenerAcceptSync(port, timeoutMs = PROBE_TIMEOUT_MS) {
|
|
66357
66357
|
refuseToBlockInRole("a synchronous probe of a front door listener");
|
|
66358
|
-
return runProbeWorker(ACCEPT_PROBE_SOURCE, { port });
|
|
66358
|
+
return runProbeWorker(ACCEPT_PROBE_SOURCE, { port }, timeoutMs);
|
|
66359
66359
|
}
|
|
66360
|
-
function runProbeWorker(source, data) {
|
|
66360
|
+
function runProbeWorker(source, data, timeoutMs) {
|
|
66361
66361
|
const shared = new SharedArrayBuffer(HEADER_SLOTS * INT32_BYTES + REASON_BYTES);
|
|
66362
66362
|
const header = new Int32Array(shared, 0, HEADER_SLOTS);
|
|
66363
66363
|
const worker = new import_node_worker_threads.Worker(source, {
|
|
66364
66364
|
eval: true,
|
|
66365
|
-
workerData: { ...data, timeoutMs
|
|
66365
|
+
workerData: { ...data, timeoutMs, shared, ok: VERDICT_OK, failed: VERDICT_FAILED, headerSlots: HEADER_SLOTS }
|
|
66366
66366
|
});
|
|
66367
66367
|
worker.unref();
|
|
66368
66368
|
try {
|
|
66369
|
-
const waited = Atomics.wait(header, 0, VERDICT_PENDING,
|
|
66369
|
+
const waited = Atomics.wait(header, 0, VERDICT_PENDING, timeoutMs + PROBE_WAIT_MARGIN_MS);
|
|
66370
66370
|
const verdict = Atomics.load(header, 0);
|
|
66371
66371
|
if (waited === "timed-out" || verdict === VERDICT_PENDING) {
|
|
66372
|
-
return { ok: false, reason: `the probe did not finish within ${String(
|
|
66372
|
+
return { ok: false, reason: `the probe did not finish within ${String(timeoutMs + PROBE_WAIT_MARGIN_MS)}ms` };
|
|
66373
66373
|
}
|
|
66374
66374
|
if (verdict === VERDICT_OK) {
|
|
66375
66375
|
return { ok: true };
|
|
@@ -119565,8 +119565,8 @@ function unregisterSupervised(fs31, paths, pool, sessionId) {
|
|
|
119565
119565
|
fs31.removeRecursive(sessionFileOf(paths, pool, sessionId));
|
|
119566
119566
|
fs31.removeRecursive(sessionStatePath(paths, pool, sessionId));
|
|
119567
119567
|
}
|
|
119568
|
-
function
|
|
119569
|
-
const
|
|
119568
|
+
function listSupervised(fs31, paths, pool) {
|
|
119569
|
+
const listed = [];
|
|
119570
119570
|
for (const name of fs31.readdir(sessionsDirOf(paths, pool))) {
|
|
119571
119571
|
const file2 = import_node_path36.default.join(sessionsDirOf(paths, pool), name);
|
|
119572
119572
|
const raw = fs31.readFileUtf8(file2);
|
|
@@ -119580,8 +119580,19 @@ function liveSupervised(fs31, paths, pool, isRunning) {
|
|
|
119580
119580
|
fs31.removeRecursive(file2);
|
|
119581
119581
|
continue;
|
|
119582
119582
|
}
|
|
119583
|
-
if (parsed.success
|
|
119584
|
-
|
|
119583
|
+
if (parsed.success) {
|
|
119584
|
+
listed.push({ file: file2, session: parsed.data });
|
|
119585
|
+
} else {
|
|
119586
|
+
fs31.removeRecursive(file2);
|
|
119587
|
+
}
|
|
119588
|
+
}
|
|
119589
|
+
return listed;
|
|
119590
|
+
}
|
|
119591
|
+
function liveSupervised(fs31, paths, pool, isRunning) {
|
|
119592
|
+
const live = [];
|
|
119593
|
+
for (const { file: file2, session } of listSupervised(fs31, paths, pool)) {
|
|
119594
|
+
if (isRunning(session.pid)) {
|
|
119595
|
+
live.push(session);
|
|
119585
119596
|
} else {
|
|
119586
119597
|
fs31.removeRecursive(file2);
|
|
119587
119598
|
}
|
|
@@ -119631,15 +119642,17 @@ function readModelMove(fs31, paths, sessionId) {
|
|
|
119631
119642
|
function removeModelMove(fs31, paths, sessionId) {
|
|
119632
119643
|
fs31.removeRecursive(import_node_path36.default.join(paths.modelMovesDir, `${sessionId}.json`));
|
|
119633
119644
|
}
|
|
119634
|
-
function supervisedSessionOf(fs31, paths, sessionId,
|
|
119635
|
-
|
|
119636
|
-
|
|
119637
|
-
|
|
119638
|
-
if (
|
|
119639
|
-
return
|
|
119645
|
+
async function supervisedSessionOf(fs31, paths, sessionId, runningAmong) {
|
|
119646
|
+
const listed = fs31.readdir(paths.superviseDir).flatMap((pool) => listSupervised(fs31, paths, pool));
|
|
119647
|
+
const running = await runningAmong(listed.map(({ session }) => session.pid));
|
|
119648
|
+
const live = listed.filter(({ file: file2, session }) => {
|
|
119649
|
+
if (running.has(session.pid)) {
|
|
119650
|
+
return true;
|
|
119640
119651
|
}
|
|
119641
|
-
|
|
119642
|
-
|
|
119652
|
+
fs31.removeRecursive(file2);
|
|
119653
|
+
return false;
|
|
119654
|
+
});
|
|
119655
|
+
return live.find(({ session }) => session.sessionId === sessionId)?.session;
|
|
119643
119656
|
}
|
|
119644
119657
|
|
|
119645
119658
|
// src/selection/targetStore.ts
|
|
@@ -136103,7 +136116,7 @@ function createProviderRouteResolver(deps) {
|
|
|
136103
136116
|
const account = scan2.model === void 0 ? void 0 : resolveAccountTarget(scan2.model, deps.models?.(current.session));
|
|
136104
136117
|
if (account !== void 0) {
|
|
136105
136118
|
const sessionId = current.session.sessionId ?? "";
|
|
136106
|
-
const moved = sessionId !== "" && (deps.accountMoves?.(sessionId, account.identity, account.model) ?? false);
|
|
136119
|
+
const moved = sessionId !== "" && (await deps.accountMoves?.(sessionId, account.identity, account.model) ?? false);
|
|
136107
136120
|
return {
|
|
136108
136121
|
ok: false,
|
|
136109
136122
|
status: HTTP_STATUS.badRequest,
|
|
@@ -139648,8 +139661,8 @@ function realFrontDoorSupervisorPorts(paths, respawnGeneration, lifecycle, track
|
|
|
139648
139661
|
usageSnapshotOf: (identity) => identity === void 0 ? void 0 : routingSnapshots.get(identity) ?? readUsageSnapshot(realFarmFs, paths.usageSnapshotsDir, identity),
|
|
139649
139662
|
// An `acct:` model member is served by relaunch: the door leaves a move request for the session's supervisor (found across every pool's registry, since the door does not know which pool launched the session) and answers the request with what is happening. A session nothing supervises gets the message naming the command to run instead.
|
|
139650
139663
|
observations: (target) => observations.observation(target),
|
|
139651
|
-
accountMoves: (sessionId, to2, model) => {
|
|
139652
|
-
if (supervisedSessionOf(realFarmFs, paths, sessionId,
|
|
139664
|
+
accountMoves: async (sessionId, to2, model) => {
|
|
139665
|
+
if (await supervisedSessionOf(realFarmFs, paths, sessionId, realRunningAmong) === void 0) {
|
|
139653
139666
|
return false;
|
|
139654
139667
|
}
|
|
139655
139668
|
writeModelMove(realFarmFs, paths, { sessionId, to: to2, model, at: (/* @__PURE__ */ new Date()).toISOString() });
|
|
@@ -140315,6 +140328,10 @@ function windowsOf(states, nowMs) {
|
|
|
140315
140328
|
function isObject4(value2) {
|
|
140316
140329
|
return typeof value2 === "object" && value2 !== null && !Array.isArray(value2);
|
|
140317
140330
|
}
|
|
140331
|
+
function isoOf(ms2) {
|
|
140332
|
+
const instant = new Date(ms2);
|
|
140333
|
+
return Number.isNaN(instant.getTime()) ? void 0 : instant.toISOString();
|
|
140334
|
+
}
|
|
140318
140335
|
function payloadWindow(rateLimits, key) {
|
|
140319
140336
|
const window = rateLimits[key];
|
|
140320
140337
|
if (!isObject4(window) || typeof window.used_percentage !== "number" || !Number.isFinite(window.used_percentage)) {
|
|
@@ -140323,7 +140340,7 @@ function payloadWindow(rateLimits, key) {
|
|
|
140323
140340
|
const resetsAt = window.resets_at;
|
|
140324
140341
|
return {
|
|
140325
140342
|
used: Math.min(FULL_PERCENT2, Math.max(0, window.used_percentage)),
|
|
140326
|
-
resetAt: typeof resetsAt === "number" && Number.isFinite(resetsAt) ?
|
|
140343
|
+
resetAt: typeof resetsAt === "number" && Number.isFinite(resetsAt) ? isoOf(resetsAt * MS_PER_SECOND17) : void 0
|
|
140327
140344
|
};
|
|
140328
140345
|
}
|
|
140329
140346
|
function payloadWindowsOf(payload) {
|
|
@@ -140351,7 +140368,7 @@ function antigravityQuotaMapOf(payload) {
|
|
|
140351
140368
|
function bucketView(bucket, nowMs) {
|
|
140352
140369
|
return {
|
|
140353
140370
|
used: bucket?.remaining_fraction === void 0 || !Number.isFinite(bucket.remaining_fraction) ? void 0 : (1 - Math.min(1, Math.max(0, bucket.remaining_fraction))) * FULL_PERCENT2,
|
|
140354
|
-
resetAt: bucket?.reset_in_seconds === void 0 || !Number.isFinite(bucket.reset_in_seconds) ? void 0 :
|
|
140371
|
+
resetAt: bucket?.reset_in_seconds === void 0 || !Number.isFinite(bucket.reset_in_seconds) ? void 0 : isoOf(nowMs + bucket.reset_in_seconds * MS_PER_SECOND17)
|
|
140355
140372
|
};
|
|
140356
140373
|
}
|
|
140357
140374
|
function antigravityWindowsOf(payload, nowMs) {
|
package/dist/index.cjs
CHANGED
|
@@ -4762,7 +4762,7 @@ var init_package = __esm({
|
|
|
4762
4762
|
"package.json"() {
|
|
4763
4763
|
package_default = {
|
|
4764
4764
|
name: "claude-use",
|
|
4765
|
-
version: "11.67.
|
|
4765
|
+
version: "11.67.4",
|
|
4766
4766
|
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.",
|
|
4767
4767
|
license: "MIT",
|
|
4768
4768
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -10110,27 +10110,27 @@ var init_targets = __esm({
|
|
|
10110
10110
|
});
|
|
10111
10111
|
|
|
10112
10112
|
// src/frontdoor/probe.ts
|
|
10113
|
-
function probeFrontDoorSync(port, caPem) {
|
|
10113
|
+
function probeFrontDoorSync(port, caPem, timeoutMs = PROBE_TIMEOUT_MS) {
|
|
10114
10114
|
refuseToBlockInRole("a synchronous probe of the front door");
|
|
10115
|
-
return runProbeWorker(PROBE_SOURCE, { port, ca: caPem });
|
|
10115
|
+
return runProbeWorker(PROBE_SOURCE, { port, ca: caPem }, timeoutMs);
|
|
10116
10116
|
}
|
|
10117
|
-
function probeListenerAcceptSync(port) {
|
|
10117
|
+
function probeListenerAcceptSync(port, timeoutMs = PROBE_TIMEOUT_MS) {
|
|
10118
10118
|
refuseToBlockInRole("a synchronous probe of a front door listener");
|
|
10119
|
-
return runProbeWorker(ACCEPT_PROBE_SOURCE, { port });
|
|
10119
|
+
return runProbeWorker(ACCEPT_PROBE_SOURCE, { port }, timeoutMs);
|
|
10120
10120
|
}
|
|
10121
|
-
function runProbeWorker(source, data) {
|
|
10121
|
+
function runProbeWorker(source, data, timeoutMs) {
|
|
10122
10122
|
const shared = new SharedArrayBuffer(HEADER_SLOTS * INT32_BYTES + REASON_BYTES);
|
|
10123
10123
|
const header = new Int32Array(shared, 0, HEADER_SLOTS);
|
|
10124
10124
|
const worker = new import_node_worker_threads.Worker(source, {
|
|
10125
10125
|
eval: true,
|
|
10126
|
-
workerData: { ...data, timeoutMs
|
|
10126
|
+
workerData: { ...data, timeoutMs, shared, ok: VERDICT_OK, failed: VERDICT_FAILED, headerSlots: HEADER_SLOTS }
|
|
10127
10127
|
});
|
|
10128
10128
|
worker.unref();
|
|
10129
10129
|
try {
|
|
10130
|
-
const waited = Atomics.wait(header, 0, VERDICT_PENDING,
|
|
10130
|
+
const waited = Atomics.wait(header, 0, VERDICT_PENDING, timeoutMs + PROBE_WAIT_MARGIN_MS);
|
|
10131
10131
|
const verdict = Atomics.load(header, 0);
|
|
10132
10132
|
if (waited === "timed-out" || verdict === VERDICT_PENDING) {
|
|
10133
|
-
return { ok: false, reason: `the probe did not finish within ${String(
|
|
10133
|
+
return { ok: false, reason: `the probe did not finish within ${String(timeoutMs + PROBE_WAIT_MARGIN_MS)}ms` };
|
|
10134
10134
|
}
|
|
10135
10135
|
if (verdict === VERDICT_OK) {
|
|
10136
10136
|
return { ok: true };
|
package/dist/index.mjs
CHANGED
|
@@ -4738,7 +4738,7 @@ var init_package = __esm({
|
|
|
4738
4738
|
"package.json"() {
|
|
4739
4739
|
package_default = {
|
|
4740
4740
|
name: "claude-use",
|
|
4741
|
-
version: "11.67.
|
|
4741
|
+
version: "11.67.4",
|
|
4742
4742
|
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.",
|
|
4743
4743
|
license: "MIT",
|
|
4744
4744
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -10084,27 +10084,27 @@ var init_targets = __esm({
|
|
|
10084
10084
|
|
|
10085
10085
|
// src/frontdoor/probe.ts
|
|
10086
10086
|
import { Worker } from "node:worker_threads";
|
|
10087
|
-
function probeFrontDoorSync(port, caPem) {
|
|
10087
|
+
function probeFrontDoorSync(port, caPem, timeoutMs = PROBE_TIMEOUT_MS) {
|
|
10088
10088
|
refuseToBlockInRole("a synchronous probe of the front door");
|
|
10089
|
-
return runProbeWorker(PROBE_SOURCE, { port, ca: caPem });
|
|
10089
|
+
return runProbeWorker(PROBE_SOURCE, { port, ca: caPem }, timeoutMs);
|
|
10090
10090
|
}
|
|
10091
|
-
function probeListenerAcceptSync(port) {
|
|
10091
|
+
function probeListenerAcceptSync(port, timeoutMs = PROBE_TIMEOUT_MS) {
|
|
10092
10092
|
refuseToBlockInRole("a synchronous probe of a front door listener");
|
|
10093
|
-
return runProbeWorker(ACCEPT_PROBE_SOURCE, { port });
|
|
10093
|
+
return runProbeWorker(ACCEPT_PROBE_SOURCE, { port }, timeoutMs);
|
|
10094
10094
|
}
|
|
10095
|
-
function runProbeWorker(source, data) {
|
|
10095
|
+
function runProbeWorker(source, data, timeoutMs) {
|
|
10096
10096
|
const shared = new SharedArrayBuffer(HEADER_SLOTS * INT32_BYTES + REASON_BYTES);
|
|
10097
10097
|
const header = new Int32Array(shared, 0, HEADER_SLOTS);
|
|
10098
10098
|
const worker = new Worker(source, {
|
|
10099
10099
|
eval: true,
|
|
10100
|
-
workerData: { ...data, timeoutMs
|
|
10100
|
+
workerData: { ...data, timeoutMs, shared, ok: VERDICT_OK, failed: VERDICT_FAILED, headerSlots: HEADER_SLOTS }
|
|
10101
10101
|
});
|
|
10102
10102
|
worker.unref();
|
|
10103
10103
|
try {
|
|
10104
|
-
const waited = Atomics.wait(header, 0, VERDICT_PENDING,
|
|
10104
|
+
const waited = Atomics.wait(header, 0, VERDICT_PENDING, timeoutMs + PROBE_WAIT_MARGIN_MS);
|
|
10105
10105
|
const verdict = Atomics.load(header, 0);
|
|
10106
10106
|
if (waited === "timed-out" || verdict === VERDICT_PENDING) {
|
|
10107
|
-
return { ok: false, reason: `the probe did not finish within ${String(
|
|
10107
|
+
return { ok: false, reason: `the probe did not finish within ${String(timeoutMs + PROBE_WAIT_MARGIN_MS)}ms` };
|
|
10108
10108
|
}
|
|
10109
10109
|
if (verdict === VERDICT_OK) {
|
|
10110
10110
|
return { ok: true };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-use",
|
|
3
|
-
"version": "11.67.
|
|
3
|
+
"version": "11.67.4",
|
|
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>",
|