claude-use 11.72.0 → 11.72.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 +71 -30
- package/dist/index.cjs +41 -27
- package/dist/index.mjs +41 -27
- package/dist/types/index.d.ts +28 -28
- 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.72.
|
|
37390
|
+
version: "11.72.1",
|
|
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>",
|
|
@@ -38399,36 +38399,71 @@ function readUsageLog(fs31, logDir, options = {}) {
|
|
|
38399
38399
|
if (sinceMs !== void 0 && segment.endsAt <= sinceMs) {
|
|
38400
38400
|
continue;
|
|
38401
38401
|
}
|
|
38402
|
-
const
|
|
38403
|
-
if (
|
|
38402
|
+
const read = readSegment(fs31, logDir, segment);
|
|
38403
|
+
if (read === void 0) {
|
|
38404
38404
|
continue;
|
|
38405
38405
|
}
|
|
38406
|
-
|
|
38407
|
-
|
|
38408
|
-
|
|
38409
|
-
|
|
38410
|
-
continue;
|
|
38411
|
-
}
|
|
38412
|
-
let raw;
|
|
38413
|
-
try {
|
|
38414
|
-
raw = JSON.parse(line);
|
|
38415
|
-
} catch {
|
|
38416
|
-
invalidLines += 1;
|
|
38417
|
-
continue;
|
|
38418
|
-
}
|
|
38419
|
-
const parsed = UsageRecordSchema.safeParse(raw);
|
|
38420
|
-
if (!parsed.success) {
|
|
38421
|
-
invalidLines += 1;
|
|
38422
|
-
continue;
|
|
38423
|
-
}
|
|
38424
|
-
if (sinceMs === void 0 || Date.parse(parsed.data.at) >= sinceMs) {
|
|
38425
|
-
records.push(parsed.data);
|
|
38406
|
+
invalidLines += read.invalidLines;
|
|
38407
|
+
for (const record2 of read.records) {
|
|
38408
|
+
if (sinceMs === void 0 || Date.parse(record2.at) >= sinceMs) {
|
|
38409
|
+
records.push(record2);
|
|
38426
38410
|
}
|
|
38427
38411
|
}
|
|
38428
38412
|
}
|
|
38429
38413
|
records.sort((left, right) => left.at.localeCompare(right.at));
|
|
38430
38414
|
return { records, invalidLines };
|
|
38431
38415
|
}
|
|
38416
|
+
function readSegment(fs31, logDir, segment) {
|
|
38417
|
+
const contents = fs31.readFileUtf8(import_node_path26.default.join(logDir, segment.name));
|
|
38418
|
+
if (contents === void 0) {
|
|
38419
|
+
return void 0;
|
|
38420
|
+
}
|
|
38421
|
+
const records = [];
|
|
38422
|
+
let invalidLines = 0;
|
|
38423
|
+
const lines = contents.split("\n");
|
|
38424
|
+
lines.pop();
|
|
38425
|
+
for (const line of lines) {
|
|
38426
|
+
if (line === "") {
|
|
38427
|
+
continue;
|
|
38428
|
+
}
|
|
38429
|
+
let raw;
|
|
38430
|
+
try {
|
|
38431
|
+
raw = JSON.parse(line);
|
|
38432
|
+
} catch {
|
|
38433
|
+
invalidLines += 1;
|
|
38434
|
+
continue;
|
|
38435
|
+
}
|
|
38436
|
+
const parsed = UsageRecordSchema.safeParse(raw);
|
|
38437
|
+
if (!parsed.success) {
|
|
38438
|
+
invalidLines += 1;
|
|
38439
|
+
continue;
|
|
38440
|
+
}
|
|
38441
|
+
records.push(parsed.data);
|
|
38442
|
+
}
|
|
38443
|
+
return { records, invalidLines };
|
|
38444
|
+
}
|
|
38445
|
+
function readRecentUsageRecords(fs31, logDir, count2) {
|
|
38446
|
+
const byDay = /* @__PURE__ */ new Map();
|
|
38447
|
+
for (const segment of listLogSegments(fs31, logDir)) {
|
|
38448
|
+
byDay.set(segment.day, [...byDay.get(segment.day) ?? [], segment]);
|
|
38449
|
+
}
|
|
38450
|
+
const days = [...byDay.values()];
|
|
38451
|
+
let records = [];
|
|
38452
|
+
for (let index = days.length - 1; index >= 0; index -= 1) {
|
|
38453
|
+
const dayRecords = [];
|
|
38454
|
+
for (const segment of days[index] ?? []) {
|
|
38455
|
+
dayRecords.push(...readSegment(fs31, logDir, segment)?.records ?? []);
|
|
38456
|
+
}
|
|
38457
|
+
records = [...dayRecords, ...records];
|
|
38458
|
+
records.sort((left, right) => left.at.localeCompare(right.at));
|
|
38459
|
+
const olderDay = days[index - 1]?.[0];
|
|
38460
|
+
const newestHeld = records[records.length - count2];
|
|
38461
|
+
if (olderDay === void 0 || newestHeld !== void 0 && Date.parse(newestHeld.at) >= olderDay.endsAt) {
|
|
38462
|
+
break;
|
|
38463
|
+
}
|
|
38464
|
+
}
|
|
38465
|
+
return records.slice(-count2);
|
|
38466
|
+
}
|
|
38432
38467
|
function snapshotPath(snapshotsDir, identity) {
|
|
38433
38468
|
if (!isIdentityName(identity)) {
|
|
38434
38469
|
throw new Error(`"${identity}" is not a valid identity name.`);
|
|
@@ -119889,7 +119924,7 @@ function blendedPricePerMTok(prices, mix) {
|
|
|
119889
119924
|
var SEED_LOOKBACK_RECORDS = 500;
|
|
119890
119925
|
function createTargetObservationStore(fs31, paths) {
|
|
119891
119926
|
let observations = /* @__PURE__ */ new Map();
|
|
119892
|
-
const seeded =
|
|
119927
|
+
const seeded = readRecentUsageRecords(fs31, paths.usageLogDir, SEED_LOOKBACK_RECORDS);
|
|
119893
119928
|
for (const record2 of seeded) {
|
|
119894
119929
|
observations = observeRecord(observations, record2);
|
|
119895
119930
|
}
|
|
@@ -134286,6 +134321,10 @@ async function collectBody(body) {
|
|
|
134286
134321
|
resolve3(result);
|
|
134287
134322
|
}
|
|
134288
134323
|
};
|
|
134324
|
+
if (body.destroyed) {
|
|
134325
|
+
settle2({ kind: "failed" });
|
|
134326
|
+
return;
|
|
134327
|
+
}
|
|
134289
134328
|
body.on("data", (chunk2) => {
|
|
134290
134329
|
if (settled) {
|
|
134291
134330
|
return;
|
|
@@ -134309,6 +134348,9 @@ async function collectBody(body) {
|
|
|
134309
134348
|
body.on("error", () => {
|
|
134310
134349
|
settle2({ kind: "failed" });
|
|
134311
134350
|
});
|
|
134351
|
+
body.on("close", () => {
|
|
134352
|
+
settle2({ kind: "failed" });
|
|
134353
|
+
});
|
|
134312
134354
|
});
|
|
134313
134355
|
}
|
|
134314
134356
|
function requestedModelOf(body) {
|
|
@@ -139201,6 +139243,7 @@ function createRcEventFanout() {
|
|
|
139201
139243
|
function createRcStreamHub(deps) {
|
|
139202
139244
|
const attachments = /* @__PURE__ */ new Map();
|
|
139203
139245
|
let closed = false;
|
|
139246
|
+
const refusedAuthorizations = /* @__PURE__ */ new Map();
|
|
139204
139247
|
const lastSavedSequenceNums = /* @__PURE__ */ new Map();
|
|
139205
139248
|
const persistCursor = (sessionId) => {
|
|
139206
139249
|
if (deps.saveSequenceNum === void 0) {
|
|
@@ -139304,7 +139347,6 @@ function createRcStreamHub(deps) {
|
|
|
139304
139347
|
};
|
|
139305
139348
|
const runLoop = async (attachment) => {
|
|
139306
139349
|
let retriedUnauthorized = false;
|
|
139307
|
-
let refusedAuthorization;
|
|
139308
139350
|
for (; ; ) {
|
|
139309
139351
|
if (attachment.isStopped()) {
|
|
139310
139352
|
return;
|
|
@@ -139320,11 +139362,11 @@ function createRcStreamHub(deps) {
|
|
|
139320
139362
|
}
|
|
139321
139363
|
return;
|
|
139322
139364
|
}
|
|
139323
|
-
if (
|
|
139365
|
+
if (credential.authorization === refusedAuthorizations.get(attachment.sessionId)) {
|
|
139324
139366
|
await deps.sleep(deps.backoffMs);
|
|
139325
139367
|
continue;
|
|
139326
139368
|
}
|
|
139327
|
-
|
|
139369
|
+
refusedAuthorizations.delete(attachment.sessionId);
|
|
139328
139370
|
let outcome;
|
|
139329
139371
|
try {
|
|
139330
139372
|
outcome = await attempt(attachment, credential);
|
|
@@ -139352,7 +139394,7 @@ function createRcStreamHub(deps) {
|
|
|
139352
139394
|
continue;
|
|
139353
139395
|
}
|
|
139354
139396
|
deps.log?.(`rc stream ${attachment.sessionId}: the client read stream refused the observed Authorization bearer past one retry; waiting for a fresh one`);
|
|
139355
|
-
|
|
139397
|
+
refusedAuthorizations.set(attachment.sessionId, credential.authorization);
|
|
139356
139398
|
await deps.sleep(deps.backoffMs);
|
|
139357
139399
|
retriedUnauthorized = false;
|
|
139358
139400
|
}
|
|
@@ -139392,6 +139434,7 @@ function createRcStreamHub(deps) {
|
|
|
139392
139434
|
attachment.stop();
|
|
139393
139435
|
}
|
|
139394
139436
|
attachments.clear();
|
|
139437
|
+
refusedAuthorizations.clear();
|
|
139395
139438
|
}
|
|
139396
139439
|
};
|
|
139397
139440
|
}
|
|
@@ -140022,10 +140065,8 @@ function realFrontDoorSupervisorPorts(paths, respawnGeneration, lifecycle, track
|
|
|
140022
140065
|
catalogueKeeper.tick();
|
|
140023
140066
|
everyFreshnessInterval(catalogueKeeper.tick);
|
|
140024
140067
|
const headroomDecision = createHeadroomDecision(createRoutingSettingReader(paths));
|
|
140025
|
-
const targetObservations = createTargetObservationStore(realFarmFs, paths);
|
|
140026
140068
|
const recordUsage = (record2) => {
|
|
140027
140069
|
withQuotaRefresh(usageStore.record, quotaRefresher)(record2);
|
|
140028
|
-
targetObservations.observe(record2);
|
|
140029
140070
|
};
|
|
140030
140071
|
const usageMiddleware = createUsageMiddleware({
|
|
140031
140072
|
// Each finished response also tells the per-session headroom decision when the session's cache was last touched and whether it read from it.
|
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.72.
|
|
4765
|
+
version: "11.72.1",
|
|
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>",
|
|
@@ -7606,36 +7606,49 @@ function readUsageLog(fs14, logDir, options = {}) {
|
|
|
7606
7606
|
if (sinceMs !== void 0 && segment.endsAt <= sinceMs) {
|
|
7607
7607
|
continue;
|
|
7608
7608
|
}
|
|
7609
|
-
const
|
|
7610
|
-
if (
|
|
7609
|
+
const read = readSegment(fs14, logDir, segment);
|
|
7610
|
+
if (read === void 0) {
|
|
7611
7611
|
continue;
|
|
7612
7612
|
}
|
|
7613
|
-
|
|
7614
|
-
|
|
7615
|
-
|
|
7616
|
-
|
|
7617
|
-
continue;
|
|
7618
|
-
}
|
|
7619
|
-
let raw;
|
|
7620
|
-
try {
|
|
7621
|
-
raw = JSON.parse(line);
|
|
7622
|
-
} catch {
|
|
7623
|
-
invalidLines += 1;
|
|
7624
|
-
continue;
|
|
7625
|
-
}
|
|
7626
|
-
const parsed = UsageRecordSchema.safeParse(raw);
|
|
7627
|
-
if (!parsed.success) {
|
|
7628
|
-
invalidLines += 1;
|
|
7629
|
-
continue;
|
|
7630
|
-
}
|
|
7631
|
-
if (sinceMs === void 0 || Date.parse(parsed.data.at) >= sinceMs) {
|
|
7632
|
-
records.push(parsed.data);
|
|
7613
|
+
invalidLines += read.invalidLines;
|
|
7614
|
+
for (const record of read.records) {
|
|
7615
|
+
if (sinceMs === void 0 || Date.parse(record.at) >= sinceMs) {
|
|
7616
|
+
records.push(record);
|
|
7633
7617
|
}
|
|
7634
7618
|
}
|
|
7635
7619
|
}
|
|
7636
7620
|
records.sort((left, right) => left.at.localeCompare(right.at));
|
|
7637
7621
|
return { records, invalidLines };
|
|
7638
7622
|
}
|
|
7623
|
+
function readSegment(fs14, logDir, segment) {
|
|
7624
|
+
const contents = fs14.readFileUtf8(import_node_path20.default.join(logDir, segment.name));
|
|
7625
|
+
if (contents === void 0) {
|
|
7626
|
+
return void 0;
|
|
7627
|
+
}
|
|
7628
|
+
const records = [];
|
|
7629
|
+
let invalidLines = 0;
|
|
7630
|
+
const lines = contents.split("\n");
|
|
7631
|
+
lines.pop();
|
|
7632
|
+
for (const line of lines) {
|
|
7633
|
+
if (line === "") {
|
|
7634
|
+
continue;
|
|
7635
|
+
}
|
|
7636
|
+
let raw;
|
|
7637
|
+
try {
|
|
7638
|
+
raw = JSON.parse(line);
|
|
7639
|
+
} catch {
|
|
7640
|
+
invalidLines += 1;
|
|
7641
|
+
continue;
|
|
7642
|
+
}
|
|
7643
|
+
const parsed = UsageRecordSchema.safeParse(raw);
|
|
7644
|
+
if (!parsed.success) {
|
|
7645
|
+
invalidLines += 1;
|
|
7646
|
+
continue;
|
|
7647
|
+
}
|
|
7648
|
+
records.push(parsed.data);
|
|
7649
|
+
}
|
|
7650
|
+
return { records, invalidLines };
|
|
7651
|
+
}
|
|
7639
7652
|
function snapshotPath(snapshotsDir, identity) {
|
|
7640
7653
|
if (!isIdentityName(identity)) {
|
|
7641
7654
|
throw new Error(`"${identity}" is not a valid identity name.`);
|
|
@@ -19527,6 +19540,7 @@ function createRcEventFanout() {
|
|
|
19527
19540
|
function createRcStreamHub(deps) {
|
|
19528
19541
|
const attachments = /* @__PURE__ */ new Map();
|
|
19529
19542
|
let closed = false;
|
|
19543
|
+
const refusedAuthorizations = /* @__PURE__ */ new Map();
|
|
19530
19544
|
const lastSavedSequenceNums = /* @__PURE__ */ new Map();
|
|
19531
19545
|
const persistCursor = (sessionId) => {
|
|
19532
19546
|
if (deps.saveSequenceNum === void 0) {
|
|
@@ -19630,7 +19644,6 @@ function createRcStreamHub(deps) {
|
|
|
19630
19644
|
};
|
|
19631
19645
|
const runLoop = async (attachment) => {
|
|
19632
19646
|
let retriedUnauthorized = false;
|
|
19633
|
-
let refusedAuthorization;
|
|
19634
19647
|
for (; ; ) {
|
|
19635
19648
|
if (attachment.isStopped()) {
|
|
19636
19649
|
return;
|
|
@@ -19646,11 +19659,11 @@ function createRcStreamHub(deps) {
|
|
|
19646
19659
|
}
|
|
19647
19660
|
return;
|
|
19648
19661
|
}
|
|
19649
|
-
if (
|
|
19662
|
+
if (credential.authorization === refusedAuthorizations.get(attachment.sessionId)) {
|
|
19650
19663
|
await deps.sleep(deps.backoffMs);
|
|
19651
19664
|
continue;
|
|
19652
19665
|
}
|
|
19653
|
-
|
|
19666
|
+
refusedAuthorizations.delete(attachment.sessionId);
|
|
19654
19667
|
let outcome;
|
|
19655
19668
|
try {
|
|
19656
19669
|
outcome = await attempt(attachment, credential);
|
|
@@ -19678,7 +19691,7 @@ function createRcStreamHub(deps) {
|
|
|
19678
19691
|
continue;
|
|
19679
19692
|
}
|
|
19680
19693
|
deps.log?.(`rc stream ${attachment.sessionId}: the client read stream refused the observed Authorization bearer past one retry; waiting for a fresh one`);
|
|
19681
|
-
|
|
19694
|
+
refusedAuthorizations.set(attachment.sessionId, credential.authorization);
|
|
19682
19695
|
await deps.sleep(deps.backoffMs);
|
|
19683
19696
|
retriedUnauthorized = false;
|
|
19684
19697
|
}
|
|
@@ -19718,6 +19731,7 @@ function createRcStreamHub(deps) {
|
|
|
19718
19731
|
attachment.stop();
|
|
19719
19732
|
}
|
|
19720
19733
|
attachments.clear();
|
|
19734
|
+
refusedAuthorizations.clear();
|
|
19721
19735
|
}
|
|
19722
19736
|
};
|
|
19723
19737
|
}
|
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.72.
|
|
4741
|
+
version: "11.72.1",
|
|
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>",
|
|
@@ -7582,36 +7582,49 @@ function readUsageLog(fs14, logDir, options = {}) {
|
|
|
7582
7582
|
if (sinceMs !== void 0 && segment.endsAt <= sinceMs) {
|
|
7583
7583
|
continue;
|
|
7584
7584
|
}
|
|
7585
|
-
const
|
|
7586
|
-
if (
|
|
7585
|
+
const read = readSegment(fs14, logDir, segment);
|
|
7586
|
+
if (read === void 0) {
|
|
7587
7587
|
continue;
|
|
7588
7588
|
}
|
|
7589
|
-
|
|
7590
|
-
|
|
7591
|
-
|
|
7592
|
-
|
|
7593
|
-
continue;
|
|
7594
|
-
}
|
|
7595
|
-
let raw;
|
|
7596
|
-
try {
|
|
7597
|
-
raw = JSON.parse(line);
|
|
7598
|
-
} catch {
|
|
7599
|
-
invalidLines += 1;
|
|
7600
|
-
continue;
|
|
7601
|
-
}
|
|
7602
|
-
const parsed = UsageRecordSchema.safeParse(raw);
|
|
7603
|
-
if (!parsed.success) {
|
|
7604
|
-
invalidLines += 1;
|
|
7605
|
-
continue;
|
|
7606
|
-
}
|
|
7607
|
-
if (sinceMs === void 0 || Date.parse(parsed.data.at) >= sinceMs) {
|
|
7608
|
-
records.push(parsed.data);
|
|
7589
|
+
invalidLines += read.invalidLines;
|
|
7590
|
+
for (const record of read.records) {
|
|
7591
|
+
if (sinceMs === void 0 || Date.parse(record.at) >= sinceMs) {
|
|
7592
|
+
records.push(record);
|
|
7609
7593
|
}
|
|
7610
7594
|
}
|
|
7611
7595
|
}
|
|
7612
7596
|
records.sort((left, right) => left.at.localeCompare(right.at));
|
|
7613
7597
|
return { records, invalidLines };
|
|
7614
7598
|
}
|
|
7599
|
+
function readSegment(fs14, logDir, segment) {
|
|
7600
|
+
const contents = fs14.readFileUtf8(path20.join(logDir, segment.name));
|
|
7601
|
+
if (contents === void 0) {
|
|
7602
|
+
return void 0;
|
|
7603
|
+
}
|
|
7604
|
+
const records = [];
|
|
7605
|
+
let invalidLines = 0;
|
|
7606
|
+
const lines = contents.split("\n");
|
|
7607
|
+
lines.pop();
|
|
7608
|
+
for (const line of lines) {
|
|
7609
|
+
if (line === "") {
|
|
7610
|
+
continue;
|
|
7611
|
+
}
|
|
7612
|
+
let raw;
|
|
7613
|
+
try {
|
|
7614
|
+
raw = JSON.parse(line);
|
|
7615
|
+
} catch {
|
|
7616
|
+
invalidLines += 1;
|
|
7617
|
+
continue;
|
|
7618
|
+
}
|
|
7619
|
+
const parsed = UsageRecordSchema.safeParse(raw);
|
|
7620
|
+
if (!parsed.success) {
|
|
7621
|
+
invalidLines += 1;
|
|
7622
|
+
continue;
|
|
7623
|
+
}
|
|
7624
|
+
records.push(parsed.data);
|
|
7625
|
+
}
|
|
7626
|
+
return { records, invalidLines };
|
|
7627
|
+
}
|
|
7615
7628
|
function snapshotPath(snapshotsDir, identity) {
|
|
7616
7629
|
if (!isIdentityName(identity)) {
|
|
7617
7630
|
throw new Error(`"${identity}" is not a valid identity name.`);
|
|
@@ -19112,6 +19125,7 @@ function createRcEventFanout() {
|
|
|
19112
19125
|
function createRcStreamHub(deps) {
|
|
19113
19126
|
const attachments = /* @__PURE__ */ new Map();
|
|
19114
19127
|
let closed = false;
|
|
19128
|
+
const refusedAuthorizations = /* @__PURE__ */ new Map();
|
|
19115
19129
|
const lastSavedSequenceNums = /* @__PURE__ */ new Map();
|
|
19116
19130
|
const persistCursor = (sessionId) => {
|
|
19117
19131
|
if (deps.saveSequenceNum === void 0) {
|
|
@@ -19215,7 +19229,6 @@ function createRcStreamHub(deps) {
|
|
|
19215
19229
|
};
|
|
19216
19230
|
const runLoop = async (attachment) => {
|
|
19217
19231
|
let retriedUnauthorized = false;
|
|
19218
|
-
let refusedAuthorization;
|
|
19219
19232
|
for (; ; ) {
|
|
19220
19233
|
if (attachment.isStopped()) {
|
|
19221
19234
|
return;
|
|
@@ -19231,11 +19244,11 @@ function createRcStreamHub(deps) {
|
|
|
19231
19244
|
}
|
|
19232
19245
|
return;
|
|
19233
19246
|
}
|
|
19234
|
-
if (
|
|
19247
|
+
if (credential.authorization === refusedAuthorizations.get(attachment.sessionId)) {
|
|
19235
19248
|
await deps.sleep(deps.backoffMs);
|
|
19236
19249
|
continue;
|
|
19237
19250
|
}
|
|
19238
|
-
|
|
19251
|
+
refusedAuthorizations.delete(attachment.sessionId);
|
|
19239
19252
|
let outcome;
|
|
19240
19253
|
try {
|
|
19241
19254
|
outcome = await attempt(attachment, credential);
|
|
@@ -19263,7 +19276,7 @@ function createRcStreamHub(deps) {
|
|
|
19263
19276
|
continue;
|
|
19264
19277
|
}
|
|
19265
19278
|
deps.log?.(`rc stream ${attachment.sessionId}: the client read stream refused the observed Authorization bearer past one retry; waiting for a fresh one`);
|
|
19266
|
-
|
|
19279
|
+
refusedAuthorizations.set(attachment.sessionId, credential.authorization);
|
|
19267
19280
|
await deps.sleep(deps.backoffMs);
|
|
19268
19281
|
retriedUnauthorized = false;
|
|
19269
19282
|
}
|
|
@@ -19303,6 +19316,7 @@ function createRcStreamHub(deps) {
|
|
|
19303
19316
|
attachment.stop();
|
|
19304
19317
|
}
|
|
19305
19318
|
attachments.clear();
|
|
19319
|
+
refusedAuthorizations.clear();
|
|
19306
19320
|
}
|
|
19307
19321
|
};
|
|
19308
19322
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -297,8 +297,8 @@ declare const LaunchSchema: z.ZodObject<{
|
|
|
297
297
|
}>>;
|
|
298
298
|
layout: z.ZodOptional<z.ZodObject<{
|
|
299
299
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
300
|
-
account: "account";
|
|
301
300
|
model: "model";
|
|
301
|
+
account: "account";
|
|
302
302
|
identity: "identity";
|
|
303
303
|
provider: "provider";
|
|
304
304
|
version: "version";
|
|
@@ -1525,8 +1525,8 @@ declare const ConfigProfileSchema: z.ZodObject<{
|
|
|
1525
1525
|
}>>;
|
|
1526
1526
|
layout: z.ZodOptional<z.ZodObject<{
|
|
1527
1527
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1528
|
-
account: "account";
|
|
1529
1528
|
model: "model";
|
|
1529
|
+
account: "account";
|
|
1530
1530
|
identity: "identity";
|
|
1531
1531
|
provider: "provider";
|
|
1532
1532
|
version: "version";
|
|
@@ -2373,8 +2373,8 @@ declare const DirectoryRuleSchema: z.ZodObject<{
|
|
|
2373
2373
|
}>>;
|
|
2374
2374
|
layout: z.ZodOptional<z.ZodObject<{
|
|
2375
2375
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
2376
|
-
account: "account";
|
|
2377
2376
|
model: "model";
|
|
2377
|
+
account: "account";
|
|
2378
2378
|
identity: "identity";
|
|
2379
2379
|
provider: "provider";
|
|
2380
2380
|
version: "version";
|
|
@@ -3148,8 +3148,8 @@ declare const DirectoryRulesSchema: z.ZodObject<{
|
|
|
3148
3148
|
}>>;
|
|
3149
3149
|
layout: z.ZodOptional<z.ZodObject<{
|
|
3150
3150
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
3151
|
-
account: "account";
|
|
3152
3151
|
model: "model";
|
|
3152
|
+
account: "account";
|
|
3153
3153
|
identity: "identity";
|
|
3154
3154
|
provider: "provider";
|
|
3155
3155
|
version: "version";
|
|
@@ -3923,8 +3923,8 @@ declare const PortableConfigSchema: z.ZodObject<{
|
|
|
3923
3923
|
}>>;
|
|
3924
3924
|
layout: z.ZodOptional<z.ZodObject<{
|
|
3925
3925
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
3926
|
-
account: "account";
|
|
3927
3926
|
model: "model";
|
|
3927
|
+
account: "account";
|
|
3928
3928
|
identity: "identity";
|
|
3929
3929
|
provider: "provider";
|
|
3930
3930
|
version: "version";
|
|
@@ -4679,8 +4679,8 @@ declare const GlobalConfigSchema: z.ZodObject<{
|
|
|
4679
4679
|
}>>;
|
|
4680
4680
|
layout: z.ZodOptional<z.ZodObject<{
|
|
4681
4681
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
4682
|
-
account: "account";
|
|
4683
4682
|
model: "model";
|
|
4683
|
+
account: "account";
|
|
4684
4684
|
identity: "identity";
|
|
4685
4685
|
provider: "provider";
|
|
4686
4686
|
version: "version";
|
|
@@ -9652,7 +9652,6 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
9652
9652
|
kind: zod.ZodLiteral<"profile">;
|
|
9653
9653
|
name: zod.ZodString;
|
|
9654
9654
|
value: zod.ZodObject<{
|
|
9655
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
9656
9655
|
entries: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodBoolean, zod.ZodObject<{
|
|
9657
9656
|
value: zod.ZodBoolean;
|
|
9658
9657
|
when: zod.ZodUnion<readonly [zod.ZodObject<{
|
|
@@ -9728,6 +9727,7 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
9728
9727
|
key: zod.ZodType<trilean.JsonValue, unknown, zod_v4_core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
9729
9728
|
}, zod_v4_core.$strip>], "kind">]>;
|
|
9730
9729
|
}, zod_v4_core.$strict>]>>>;
|
|
9730
|
+
description: zod.ZodOptional<zod.ZodString>;
|
|
9731
9731
|
models: zod.ZodOptional<zod.ZodObject<{
|
|
9732
9732
|
virtual: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodObject<{
|
|
9733
9733
|
mode: zod.ZodEnum<{
|
|
@@ -9815,8 +9815,8 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
9815
9815
|
}>>;
|
|
9816
9816
|
layout: zod.ZodOptional<zod.ZodObject<{
|
|
9817
9817
|
header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
9818
|
-
account: "account";
|
|
9819
9818
|
model: "model";
|
|
9819
|
+
account: "account";
|
|
9820
9820
|
identity: "identity";
|
|
9821
9821
|
provider: "provider";
|
|
9822
9822
|
version: "version";
|
|
@@ -10375,7 +10375,6 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
10375
10375
|
kind: zod.ZodLiteral<"profile">;
|
|
10376
10376
|
name: zod.ZodString;
|
|
10377
10377
|
value: zod.ZodObject<{
|
|
10378
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
10379
10378
|
entries: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodBoolean, zod.ZodObject<{
|
|
10380
10379
|
value: zod.ZodBoolean;
|
|
10381
10380
|
when: zod.ZodUnion<readonly [zod.ZodObject<{
|
|
@@ -10451,6 +10450,7 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
10451
10450
|
key: zod.ZodType<trilean.JsonValue, unknown, zod_v4_core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
10452
10451
|
}, zod_v4_core.$strip>], "kind">]>;
|
|
10453
10452
|
}, zod_v4_core.$strict>]>>>;
|
|
10453
|
+
description: zod.ZodOptional<zod.ZodString>;
|
|
10454
10454
|
models: zod.ZodOptional<zod.ZodObject<{
|
|
10455
10455
|
virtual: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodObject<{
|
|
10456
10456
|
mode: zod.ZodEnum<{
|
|
@@ -10538,8 +10538,8 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
10538
10538
|
}>>;
|
|
10539
10539
|
layout: zod.ZodOptional<zod.ZodObject<{
|
|
10540
10540
|
header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
10541
|
-
account: "account";
|
|
10542
10541
|
model: "model";
|
|
10542
|
+
account: "account";
|
|
10543
10543
|
identity: "identity";
|
|
10544
10544
|
provider: "provider";
|
|
10545
10545
|
version: "version";
|
|
@@ -11737,8 +11737,8 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
11737
11737
|
}>>;
|
|
11738
11738
|
layout: zod.ZodOptional<zod.ZodObject<{
|
|
11739
11739
|
header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
11740
|
-
account: "account";
|
|
11741
11740
|
model: "model";
|
|
11741
|
+
account: "account";
|
|
11742
11742
|
identity: "identity";
|
|
11743
11743
|
provider: "provider";
|
|
11744
11744
|
version: "version";
|
|
@@ -12517,8 +12517,8 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
12517
12517
|
}>>;
|
|
12518
12518
|
layout: zod.ZodOptional<zod.ZodObject<{
|
|
12519
12519
|
header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
12520
|
-
account: "account";
|
|
12521
12520
|
model: "model";
|
|
12521
|
+
account: "account";
|
|
12522
12522
|
identity: "identity";
|
|
12523
12523
|
provider: "provider";
|
|
12524
12524
|
version: "version";
|
|
@@ -13386,8 +13386,8 @@ declare const StatuslineSchema: z.ZodObject<{
|
|
|
13386
13386
|
}>>;
|
|
13387
13387
|
layout: z.ZodOptional<z.ZodObject<{
|
|
13388
13388
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
13389
|
-
account: "account";
|
|
13390
13389
|
model: "model";
|
|
13390
|
+
account: "account";
|
|
13391
13391
|
identity: "identity";
|
|
13392
13392
|
provider: "provider";
|
|
13393
13393
|
version: "version";
|
|
@@ -14246,8 +14246,8 @@ declare function createLaunchApiRouter(deps: LaunchApiDeps): {
|
|
|
14246
14246
|
}>>;
|
|
14247
14247
|
layout: zod.ZodOptional<zod.ZodObject<{
|
|
14248
14248
|
header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
14249
|
-
account: "account";
|
|
14250
14249
|
model: "model";
|
|
14250
|
+
account: "account";
|
|
14251
14251
|
identity: "identity";
|
|
14252
14252
|
provider: "provider";
|
|
14253
14253
|
version: "version";
|
|
@@ -15917,8 +15917,8 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
15917
15917
|
}>>;
|
|
15918
15918
|
layout: zod.ZodOptional<zod.ZodObject<{
|
|
15919
15919
|
header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
15920
|
-
account: "account";
|
|
15921
15920
|
model: "model";
|
|
15921
|
+
account: "account";
|
|
15922
15922
|
identity: "identity";
|
|
15923
15923
|
provider: "provider";
|
|
15924
15924
|
version: "version";
|
|
@@ -16717,7 +16717,6 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
16717
16717
|
kind: zod.ZodLiteral<"profile">;
|
|
16718
16718
|
name: zod.ZodString;
|
|
16719
16719
|
value: zod.ZodObject<{
|
|
16720
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
16721
16720
|
entries: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodBoolean, zod.ZodObject<{
|
|
16722
16721
|
value: zod.ZodBoolean;
|
|
16723
16722
|
when: zod.ZodUnion<readonly [zod.ZodObject<{
|
|
@@ -16793,6 +16792,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
16793
16792
|
key: zod.ZodType<trilean.JsonValue, unknown, zod_v4_core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
16794
16793
|
}, zod_v4_core.$strip>], "kind">]>;
|
|
16795
16794
|
}, zod_v4_core.$strict>]>>>;
|
|
16795
|
+
description: zod.ZodOptional<zod.ZodString>;
|
|
16796
16796
|
models: zod.ZodOptional<zod.ZodObject<{
|
|
16797
16797
|
virtual: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodObject<{
|
|
16798
16798
|
mode: zod.ZodEnum<{
|
|
@@ -16880,8 +16880,8 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
16880
16880
|
}>>;
|
|
16881
16881
|
layout: zod.ZodOptional<zod.ZodObject<{
|
|
16882
16882
|
header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
16883
|
-
account: "account";
|
|
16884
16883
|
model: "model";
|
|
16884
|
+
account: "account";
|
|
16885
16885
|
identity: "identity";
|
|
16886
16886
|
provider: "provider";
|
|
16887
16887
|
version: "version";
|
|
@@ -17440,7 +17440,6 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
17440
17440
|
kind: zod.ZodLiteral<"profile">;
|
|
17441
17441
|
name: zod.ZodString;
|
|
17442
17442
|
value: zod.ZodObject<{
|
|
17443
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
17444
17443
|
entries: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodBoolean, zod.ZodObject<{
|
|
17445
17444
|
value: zod.ZodBoolean;
|
|
17446
17445
|
when: zod.ZodUnion<readonly [zod.ZodObject<{
|
|
@@ -17516,6 +17515,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
17516
17515
|
key: zod.ZodType<trilean.JsonValue, unknown, zod_v4_core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
17517
17516
|
}, zod_v4_core.$strip>], "kind">]>;
|
|
17518
17517
|
}, zod_v4_core.$strict>]>>>;
|
|
17518
|
+
description: zod.ZodOptional<zod.ZodString>;
|
|
17519
17519
|
models: zod.ZodOptional<zod.ZodObject<{
|
|
17520
17520
|
virtual: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodObject<{
|
|
17521
17521
|
mode: zod.ZodEnum<{
|
|
@@ -17603,8 +17603,8 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
17603
17603
|
}>>;
|
|
17604
17604
|
layout: zod.ZodOptional<zod.ZodObject<{
|
|
17605
17605
|
header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
17606
|
-
account: "account";
|
|
17607
17606
|
model: "model";
|
|
17607
|
+
account: "account";
|
|
17608
17608
|
identity: "identity";
|
|
17609
17609
|
provider: "provider";
|
|
17610
17610
|
version: "version";
|
|
@@ -18802,8 +18802,8 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
18802
18802
|
}>>;
|
|
18803
18803
|
layout: zod.ZodOptional<zod.ZodObject<{
|
|
18804
18804
|
header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
18805
|
-
account: "account";
|
|
18806
18805
|
model: "model";
|
|
18806
|
+
account: "account";
|
|
18807
18807
|
identity: "identity";
|
|
18808
18808
|
provider: "provider";
|
|
18809
18809
|
version: "version";
|
|
@@ -19582,8 +19582,8 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
19582
19582
|
}>>;
|
|
19583
19583
|
layout: zod.ZodOptional<zod.ZodObject<{
|
|
19584
19584
|
header: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
19585
|
-
account: "account";
|
|
19586
19585
|
model: "model";
|
|
19586
|
+
account: "account";
|
|
19587
19587
|
identity: "identity";
|
|
19588
19588
|
provider: "provider";
|
|
19589
19589
|
version: "version";
|
|
@@ -21240,7 +21240,6 @@ declare const ConfigProfileAddOutputSchema: z.ZodObject<{
|
|
|
21240
21240
|
kind: z.ZodLiteral<"profile">;
|
|
21241
21241
|
name: z.ZodString;
|
|
21242
21242
|
value: z.ZodObject<{
|
|
21243
|
-
description: z.ZodOptional<z.ZodString>;
|
|
21244
21243
|
entries: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
21245
21244
|
value: z.ZodBoolean;
|
|
21246
21245
|
when: z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -21316,6 +21315,7 @@ declare const ConfigProfileAddOutputSchema: z.ZodObject<{
|
|
|
21316
21315
|
key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
21317
21316
|
}, z.core.$strip>], "kind">]>;
|
|
21318
21317
|
}, z.core.$strict>]>>>;
|
|
21318
|
+
description: z.ZodOptional<z.ZodString>;
|
|
21319
21319
|
models: z.ZodOptional<z.ZodObject<{
|
|
21320
21320
|
virtual: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
21321
21321
|
mode: z.ZodEnum<{
|
|
@@ -21403,8 +21403,8 @@ declare const ConfigProfileAddOutputSchema: z.ZodObject<{
|
|
|
21403
21403
|
}>>;
|
|
21404
21404
|
layout: z.ZodOptional<z.ZodObject<{
|
|
21405
21405
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
21406
|
-
account: "account";
|
|
21407
21406
|
model: "model";
|
|
21407
|
+
account: "account";
|
|
21408
21408
|
identity: "identity";
|
|
21409
21409
|
provider: "provider";
|
|
21410
21410
|
version: "version";
|
|
@@ -21965,7 +21965,6 @@ declare const ConfigProfileSetOutputSchema: z.ZodObject<{
|
|
|
21965
21965
|
kind: z.ZodLiteral<"profile">;
|
|
21966
21966
|
name: z.ZodString;
|
|
21967
21967
|
value: z.ZodObject<{
|
|
21968
|
-
description: z.ZodOptional<z.ZodString>;
|
|
21969
21968
|
entries: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
21970
21969
|
value: z.ZodBoolean;
|
|
21971
21970
|
when: z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -22041,6 +22040,7 @@ declare const ConfigProfileSetOutputSchema: z.ZodObject<{
|
|
|
22041
22040
|
key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
22042
22041
|
}, z.core.$strip>], "kind">]>;
|
|
22043
22042
|
}, z.core.$strict>]>>>;
|
|
22043
|
+
description: z.ZodOptional<z.ZodString>;
|
|
22044
22044
|
models: z.ZodOptional<z.ZodObject<{
|
|
22045
22045
|
virtual: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
22046
22046
|
mode: z.ZodEnum<{
|
|
@@ -22128,8 +22128,8 @@ declare const ConfigProfileSetOutputSchema: z.ZodObject<{
|
|
|
22128
22128
|
}>>;
|
|
22129
22129
|
layout: z.ZodOptional<z.ZodObject<{
|
|
22130
22130
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
22131
|
-
account: "account";
|
|
22132
22131
|
model: "model";
|
|
22132
|
+
account: "account";
|
|
22133
22133
|
identity: "identity";
|
|
22134
22134
|
provider: "provider";
|
|
22135
22135
|
version: "version";
|
|
@@ -23329,8 +23329,8 @@ declare const ConfigRuleAddOutputSchema: z.ZodObject<{
|
|
|
23329
23329
|
}>>;
|
|
23330
23330
|
layout: z.ZodOptional<z.ZodObject<{
|
|
23331
23331
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
23332
|
-
account: "account";
|
|
23333
23332
|
model: "model";
|
|
23333
|
+
account: "account";
|
|
23334
23334
|
identity: "identity";
|
|
23335
23335
|
provider: "provider";
|
|
23336
23336
|
version: "version";
|
|
@@ -24111,8 +24111,8 @@ declare const ConfigRuleSetOutputSchema: z.ZodObject<{
|
|
|
24111
24111
|
}>>;
|
|
24112
24112
|
layout: z.ZodOptional<z.ZodObject<{
|
|
24113
24113
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
24114
|
-
account: "account";
|
|
24115
24114
|
model: "model";
|
|
24115
|
+
account: "account";
|
|
24116
24116
|
identity: "identity";
|
|
24117
24117
|
provider: "provider";
|
|
24118
24118
|
version: "version";
|
|
@@ -25150,8 +25150,8 @@ declare const LaunchResolveOutputSchema: z.ZodObject<{
|
|
|
25150
25150
|
}>>;
|
|
25151
25151
|
layout: z.ZodOptional<z.ZodObject<{
|
|
25152
25152
|
header: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
25153
|
-
account: "account";
|
|
25154
25153
|
model: "model";
|
|
25154
|
+
account: "account";
|
|
25155
25155
|
identity: "identity";
|
|
25156
25156
|
provider: "provider";
|
|
25157
25157
|
version: "version";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-use",
|
|
3
|
-
"version": "11.72.
|
|
3
|
+
"version": "11.72.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>",
|