claude-use 11.44.1 → 11.44.3
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 +29 -10
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -34701,7 +34701,7 @@ var init_package = __esm({
|
|
|
34701
34701
|
"package.json"() {
|
|
34702
34702
|
package_default = {
|
|
34703
34703
|
name: "claude-use",
|
|
34704
|
-
version: "11.44.
|
|
34704
|
+
version: "11.44.3",
|
|
34705
34705
|
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.",
|
|
34706
34706
|
license: "MIT",
|
|
34707
34707
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -35315,9 +35315,15 @@ function destinationOf(path65, sessionProvider) {
|
|
|
35315
35315
|
}
|
|
35316
35316
|
return { provider: sessionProvider ?? ANTHROPIC_PROVIDER, endpoint: path65 };
|
|
35317
35317
|
}
|
|
35318
|
+
function modelChoiceOf(event, servedModel, provider) {
|
|
35319
|
+
if (event.modelChoice !== void 0) return event.modelChoice;
|
|
35320
|
+
if (event.requestedModel === void 0 || servedModel === void 0 || event.requestedModel === servedModel) return void 0;
|
|
35321
|
+
return { requested: event.requestedModel, providers: [provider] };
|
|
35322
|
+
}
|
|
35318
35323
|
function buildRecord(event, context) {
|
|
35319
35324
|
const { scan } = context;
|
|
35320
35325
|
const { provider, endpoint } = destinationOf(event.servedPath, event.session.provider);
|
|
35326
|
+
const choice = modelChoiceOf(event, scan?.model, provider);
|
|
35321
35327
|
const rateLimitHeaders = rateLimitHeadersOf(event.headers);
|
|
35322
35328
|
const limit = classifyLimit({ status: event.status, headers: rateLimitHeaders ?? {}, error: scan?.error, nowMs: context.endedAt });
|
|
35323
35329
|
const requestId = headerValue(event.headers, "request-id");
|
|
@@ -35334,8 +35340,8 @@ function buildRecord(event, context) {
|
|
|
35334
35340
|
method: event.method,
|
|
35335
35341
|
endpoint,
|
|
35336
35342
|
...scan?.model === void 0 ? {} : { model: scan.model },
|
|
35337
|
-
...
|
|
35338
|
-
...
|
|
35343
|
+
...choice === void 0 ? {} : { requestedModel: choice.requested },
|
|
35344
|
+
...choice !== void 0 && choice.providers.length > 1 ? { candidateProviders: [...choice.providers] } : {},
|
|
35339
35345
|
status: event.status,
|
|
35340
35346
|
latencyMs: Math.max(0, Math.round(context.headAt - event.receivedAt)),
|
|
35341
35347
|
durationMs: Math.max(0, Math.round(context.endedAt - event.receivedAt)),
|
|
@@ -130147,7 +130153,7 @@ function responseHeaders(headers) {
|
|
|
130147
130153
|
}
|
|
130148
130154
|
return result;
|
|
130149
130155
|
}
|
|
130150
|
-
async function applyHeadroomHop(request7, response, upstream, deps,
|
|
130156
|
+
async function applyHeadroomHop(request7, response, upstream, deps, onFacts) {
|
|
130151
130157
|
const target = deps.headroomSocket();
|
|
130152
130158
|
if (target === void 0) {
|
|
130153
130159
|
await answerBadGateway(response, "agent-shim front door: the headroom daemon is restarting");
|
|
@@ -130183,7 +130189,7 @@ async function applyHeadroomHop(request7, response, upstream, deps, onThread) {
|
|
|
130183
130189
|
}
|
|
130184
130190
|
headers[HOP_SECRET_HEADER] = deps.hopSecret;
|
|
130185
130191
|
try {
|
|
130186
|
-
await forwardThroughHeadroom(request7, response, { socketPath, headers, log: deps.log,
|
|
130192
|
+
await forwardThroughHeadroom(request7, response, { socketPath, headers, log: deps.log, onFacts });
|
|
130187
130193
|
} finally {
|
|
130188
130194
|
if (hopId !== void 0) {
|
|
130189
130195
|
deps.custody.release(hopId);
|
|
@@ -130264,6 +130270,18 @@ async function collectBody(body) {
|
|
|
130264
130270
|
});
|
|
130265
130271
|
});
|
|
130266
130272
|
}
|
|
130273
|
+
function requestedModelOf(body) {
|
|
130274
|
+
try {
|
|
130275
|
+
const parsed = JSON.parse(body.toString("utf8"));
|
|
130276
|
+
if (typeof parsed !== "object" || parsed === null || !("model" in parsed) || typeof parsed.model !== "string") return void 0;
|
|
130277
|
+
return parsed.model;
|
|
130278
|
+
} catch {
|
|
130279
|
+
return void 0;
|
|
130280
|
+
}
|
|
130281
|
+
}
|
|
130282
|
+
function hopFactsOf(body) {
|
|
130283
|
+
return { lineage: lineageOf(body), requestedModel: requestedModelOf(body) };
|
|
130284
|
+
}
|
|
130267
130285
|
async function forwardThroughHeadroom(request7, response, target) {
|
|
130268
130286
|
const collected = await collectBody(request7.body);
|
|
130269
130287
|
if (collected.kind === "failed") {
|
|
@@ -130277,7 +130295,7 @@ async function forwardThroughHeadroom(request7, response, target) {
|
|
|
130277
130295
|
return;
|
|
130278
130296
|
}
|
|
130279
130297
|
const { body } = collected;
|
|
130280
|
-
target.
|
|
130298
|
+
target.onFacts(hopFactsOf(body));
|
|
130281
130299
|
for (let retriesLeft = HOP_RESET_RETRIES; ; retriesLeft -= 1) {
|
|
130282
130300
|
const outcome = await hopOnce(request7, response, target, body, retriesLeft > 0);
|
|
130283
130301
|
if (outcome === "settled") {
|
|
@@ -130417,7 +130435,7 @@ function createRoutedResponse(response, context) {
|
|
|
130417
130435
|
start: (status, headers) => {
|
|
130418
130436
|
for (const observe of deps.responseObservers) {
|
|
130419
130437
|
try {
|
|
130420
|
-
const body = observe({ session, route, method: request7.method, path: request7.path, servedPath: context.servedPath, receivedAt: request7.receivedAt, viaHeadroom: request7.viaHeadroom, lineage: request7.thread.lineage, modelChoice: request7.modelChoice.value, status, headers });
|
|
130438
|
+
const body = observe({ session, route, method: request7.method, path: request7.path, servedPath: context.servedPath, receivedAt: request7.receivedAt, viaHeadroom: request7.viaHeadroom, lineage: request7.thread.lineage, modelChoice: request7.modelChoice.value, requestedModel: request7.requestedModel.value, status, headers });
|
|
130421
130439
|
if (body !== void 0) {
|
|
130422
130440
|
bodyObservers.push(body);
|
|
130423
130441
|
}
|
|
@@ -130461,7 +130479,7 @@ function createRoutedResponse(response, context) {
|
|
|
130461
130479
|
};
|
|
130462
130480
|
}
|
|
130463
130481
|
async function serveRouted(request7, deps) {
|
|
130464
|
-
const observed = { method: request7.method, path: pathOf(request7.url), receivedAt: deps.now(), viaHeadroom: false, thread: { lineage: void 0 }, modelChoice: { value: void 0 } };
|
|
130482
|
+
const observed = { method: request7.method, path: pathOf(request7.url), receivedAt: deps.now(), viaHeadroom: false, thread: { lineage: void 0 }, modelChoice: { value: void 0 }, requestedModel: { value: void 0 } };
|
|
130465
130483
|
const identified = identifyRequest(request7.headers);
|
|
130466
130484
|
const admission = deps.admit({ url: request7.url, headers: request7.headers, forwardable: identified.forwardableHeaders });
|
|
130467
130485
|
if (!admission.ok) {
|
|
@@ -130496,8 +130514,9 @@ async function serveRouted(request7, deps) {
|
|
|
130496
130514
|
const response = createRoutedResponse(request7.response, { deps, session: identified.session, route: resolution.route.name, request: { ...observed, viaHeadroom }, servedPath: pathOf(resolution.request?.url ?? request7.url) });
|
|
130497
130515
|
try {
|
|
130498
130516
|
if (viaHeadroom) {
|
|
130499
|
-
await applyHeadroomHop(resolution.request ?? routed, response, resolution.route.headroomUpstream, deps.headroom, (
|
|
130500
|
-
observed.thread.lineage = lineage;
|
|
130517
|
+
await applyHeadroomHop(resolution.request ?? routed, response, resolution.route.headroomUpstream, deps.headroom, (facts) => {
|
|
130518
|
+
observed.thread.lineage = facts.lineage;
|
|
130519
|
+
observed.requestedModel.value = facts.requestedModel;
|
|
130501
130520
|
});
|
|
130502
130521
|
} else {
|
|
130503
130522
|
await resolution.route.serve(routed, response);
|
package/dist/index.cjs
CHANGED
|
@@ -3151,7 +3151,7 @@ var init_package = __esm({
|
|
|
3151
3151
|
"package.json"() {
|
|
3152
3152
|
package_default = {
|
|
3153
3153
|
name: "claude-use",
|
|
3154
|
-
version: "11.44.
|
|
3154
|
+
version: "11.44.3",
|
|
3155
3155
|
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.",
|
|
3156
3156
|
license: "MIT",
|
|
3157
3157
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
package/dist/index.mjs
CHANGED
|
@@ -3127,7 +3127,7 @@ var init_package = __esm({
|
|
|
3127
3127
|
"package.json"() {
|
|
3128
3128
|
package_default = {
|
|
3129
3129
|
name: "claude-use",
|
|
3130
|
-
version: "11.44.
|
|
3130
|
+
version: "11.44.3",
|
|
3131
3131
|
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.",
|
|
3132
3132
|
license: "MIT",
|
|
3133
3133
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-use",
|
|
3
|
-
"version": "11.44.
|
|
3
|
+
"version": "11.44.3",
|
|
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>",
|