claude-use 11.31.0 → 11.31.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 +23 -16
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -34323,7 +34323,7 @@ var init_package = __esm({
|
|
|
34323
34323
|
"package.json"() {
|
|
34324
34324
|
package_default = {
|
|
34325
34325
|
name: "claude-use",
|
|
34326
|
-
version: "11.31.
|
|
34326
|
+
version: "11.31.1",
|
|
34327
34327
|
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.",
|
|
34328
34328
|
license: "MIT",
|
|
34329
34329
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -34936,7 +34936,7 @@ function destinationOf(path65, sessionProvider) {
|
|
|
34936
34936
|
}
|
|
34937
34937
|
function buildRecord(event, context) {
|
|
34938
34938
|
const { scan } = context;
|
|
34939
|
-
const { provider, endpoint } = destinationOf(event.
|
|
34939
|
+
const { provider, endpoint } = destinationOf(event.servedPath, event.session.provider);
|
|
34940
34940
|
const rateLimitHeaders = rateLimitHeadersOf(event.headers);
|
|
34941
34941
|
const limit = classifyLimit({ status: event.status, headers: rateLimitHeaders ?? {}, error: scan?.error, nowMs: context.endedAt });
|
|
34942
34942
|
const requestId = headerValue(event.headers, "request-id");
|
|
@@ -129168,7 +129168,7 @@ function createRoutedResponse(response, context) {
|
|
|
129168
129168
|
start: (status, headers) => {
|
|
129169
129169
|
for (const observe of deps.responseObservers) {
|
|
129170
129170
|
try {
|
|
129171
|
-
const body = observe({ session, route, method: request7.method, path: request7.path, receivedAt: request7.receivedAt, viaHeadroom: request7.viaHeadroom, lineage: request7.thread.lineage, status, headers });
|
|
129171
|
+
const body = observe({ session, route, method: request7.method, path: request7.path, servedPath: context.servedPath, receivedAt: request7.receivedAt, viaHeadroom: request7.viaHeadroom, lineage: request7.thread.lineage, status, headers });
|
|
129172
129172
|
if (body !== void 0) {
|
|
129173
129173
|
bodyObservers.push(body);
|
|
129174
129174
|
}
|
|
@@ -129213,7 +129213,7 @@ async function serveRouted(request7, deps) {
|
|
|
129213
129213
|
const identified = identifyRequest(request7.headers);
|
|
129214
129214
|
const admission = deps.admit({ url: request7.url, headers: request7.headers, forwardable: identified.forwardableHeaders });
|
|
129215
129215
|
if (!admission.ok) {
|
|
129216
|
-
const response2 = createRoutedResponse(request7.response, { deps, session: identified.session, route: "(unauthorized)", request: observed });
|
|
129216
|
+
const response2 = createRoutedResponse(request7.response, { deps, session: identified.session, route: "(unauthorized)", request: observed, servedPath: observed.path });
|
|
129217
129217
|
response2.start(HTTP_STATUS.unauthorized, { "Content-Type": "application/json" });
|
|
129218
129218
|
await response2.write(errorBody(HTTP_STATUS.unauthorized, admission.message));
|
|
129219
129219
|
response2.end();
|
|
@@ -129229,7 +129229,7 @@ async function serveRouted(request7, deps) {
|
|
|
129229
129229
|
};
|
|
129230
129230
|
const resolution = await deps.resolveRoute(routed);
|
|
129231
129231
|
if (!resolution.ok) {
|
|
129232
|
-
const response2 = createRoutedResponse(request7.response, { deps, session: identified.session, route: "(unrouted)", request: observed });
|
|
129232
|
+
const response2 = createRoutedResponse(request7.response, { deps, session: identified.session, route: "(unrouted)", request: observed, servedPath: observed.path });
|
|
129233
129233
|
response2.start(resolution.status, { "Content-Type": "application/json" });
|
|
129234
129234
|
await response2.write(errorBody(resolution.status, resolution.message));
|
|
129235
129235
|
response2.end();
|
|
@@ -129238,10 +129238,10 @@ async function serveRouted(request7, deps) {
|
|
|
129238
129238
|
const { headroom } = deps;
|
|
129239
129239
|
const wantsHeadroom = headroom !== void 0 && await deps.headroomDecision.decide(identified.session.sessionId, identified.session.headroom, deps.now(), async () => await headroomReady(headroom, request7.signal));
|
|
129240
129240
|
const viaHeadroom = wantsHeadroom && resolution.route.headroomEligible && deps.headroom !== void 0;
|
|
129241
|
-
const response = createRoutedResponse(request7.response, { deps, session: identified.session, route: resolution.route.name, request: { ...observed, viaHeadroom } });
|
|
129241
|
+
const response = createRoutedResponse(request7.response, { deps, session: identified.session, route: resolution.route.name, request: { ...observed, viaHeadroom }, servedPath: pathOf(resolution.request?.url ?? request7.url) });
|
|
129242
129242
|
try {
|
|
129243
129243
|
if (viaHeadroom) {
|
|
129244
|
-
await applyHeadroomHop(routed, response, resolution.route.headroomUpstream, deps.headroom, (lineage) => {
|
|
129244
|
+
await applyHeadroomHop(resolution.request ?? routed, response, resolution.route.headroomUpstream, deps.headroom, (lineage) => {
|
|
129245
129245
|
observed.thread.lineage = lineage;
|
|
129246
129246
|
});
|
|
129247
129247
|
} else {
|
|
@@ -130236,7 +130236,7 @@ function exhaustedMessage(exhaustion) {
|
|
|
130236
130236
|
}
|
|
130237
130237
|
function createAntigravityRoute(ports) {
|
|
130238
130238
|
const fallbackId = ports.fallbackId ?? (() => (0, import_node_crypto23.randomUUID)());
|
|
130239
|
-
const lastRouted = /* @__PURE__ */ new Map();
|
|
130239
|
+
const lastRouted = ports.lastRouted ?? /* @__PURE__ */ new Map();
|
|
130240
130240
|
return async (request7) => {
|
|
130241
130241
|
await Promise.resolve();
|
|
130242
130242
|
if (request7.method !== "POST") {
|
|
@@ -130614,10 +130614,6 @@ async function scanRequestHead(request7, wholeBody = false) {
|
|
|
130614
130614
|
text2 += chunk2.toString("utf8");
|
|
130615
130615
|
if (!wholeBody && (modelIn() !== void 0 || seen >= REQUEST_SCAN_CAP_BYTES)) {
|
|
130616
130616
|
decided = true;
|
|
130617
|
-
body.pause();
|
|
130618
|
-
replay.once("resume", () => {
|
|
130619
|
-
body.resume();
|
|
130620
|
-
});
|
|
130621
130617
|
settle2();
|
|
130622
130618
|
}
|
|
130623
130619
|
});
|
|
@@ -130658,6 +130654,16 @@ function scopeSessionProviderPath(request7) {
|
|
|
130658
130654
|
function createProviderRouteResolver(deps) {
|
|
130659
130655
|
const oauthRoute = createPassthroughRoute("anthropic", { baseUrl: `https://${CONNECT_INTERCEPT_HOST}:${String(HTTPS_PORT)}`, stripPrefix: void 0, headroomUpstream: void 0 });
|
|
130660
130656
|
const antigravityQuotaSources = /* @__PURE__ */ new Map();
|
|
130657
|
+
const antigravityRoutingMemory = /* @__PURE__ */ new Map();
|
|
130658
|
+
const memoryFor = (provider) => {
|
|
130659
|
+
const existing = antigravityRoutingMemory.get(provider);
|
|
130660
|
+
if (existing !== void 0) {
|
|
130661
|
+
return existing;
|
|
130662
|
+
}
|
|
130663
|
+
const created = /* @__PURE__ */ new Map();
|
|
130664
|
+
antigravityRoutingMemory.set(provider, created);
|
|
130665
|
+
return created;
|
|
130666
|
+
};
|
|
130661
130667
|
const antigravityQuotaOf = (provider, definition, config2) => {
|
|
130662
130668
|
const existing = antigravityQuotaSources.get(provider);
|
|
130663
130669
|
if (existing !== void 0) {
|
|
@@ -130749,7 +130755,8 @@ function createProviderRouteResolver(deps) {
|
|
|
130749
130755
|
credentialTarget: antigravityProvider.credential.target
|
|
130750
130756
|
};
|
|
130751
130757
|
},
|
|
130752
|
-
quotaSource: antigravityQuotaOf(provider, antigravityProvider, config2)
|
|
130758
|
+
quotaSource: antigravityQuotaOf(provider, antigravityProvider, config2),
|
|
130759
|
+
lastRouted: memoryFor(provider)
|
|
130753
130760
|
},
|
|
130754
130761
|
directOrigin2(deps.directPort()),
|
|
130755
130762
|
provider
|
|
@@ -130803,7 +130810,7 @@ function createProviderRouteResolver(deps) {
|
|
|
130803
130810
|
}
|
|
130804
130811
|
if (routes === void 0 || routes.length === 0) {
|
|
130805
130812
|
const resolution = resolve2(current);
|
|
130806
|
-
return resolution.ok && replay !== void 0 ? { ok: true, route: servingRewritten(resolution.route, { ...replay, url: current.url }) } : resolution.ok ? serveScoped(resolution) : resolution;
|
|
130813
|
+
return resolution.ok && replay !== void 0 ? { ok: true, route: servingRewritten(resolution.route, { ...replay, url: current.url }), request: { ...replay, url: current.url } } : resolution.ok ? serveScoped(resolution) : resolution;
|
|
130807
130814
|
}
|
|
130808
130815
|
const whole = routes.some((entry) => entry.model !== void 0 || referencesFact(entry.when, "request.hasImage"));
|
|
130809
130816
|
const snapshot = deps.usageSnapshotOf?.(current.session.identity);
|
|
@@ -130815,7 +130822,7 @@ function createProviderRouteResolver(deps) {
|
|
|
130815
130822
|
const scan = await scanRequestHead(current, whole);
|
|
130816
130823
|
if (scan.replayed === void 0) {
|
|
130817
130824
|
const resolution = resolve2(current);
|
|
130818
|
-
return resolution.ok && replay !== void 0 ? { ok: true, route: servingRewritten(resolution.route, { ...replay, url: current.url }) } : resolution.ok ? serveScoped(resolution) : resolution;
|
|
130825
|
+
return resolution.ok && replay !== void 0 ? { ok: true, route: servingRewritten(resolution.route, { ...replay, url: current.url }), request: { ...replay, url: current.url } } : resolution.ok ? serveScoped(resolution) : resolution;
|
|
130819
130826
|
}
|
|
130820
130827
|
replay = scan.replayed;
|
|
130821
130828
|
const requestFacts = {
|
|
@@ -130837,7 +130844,7 @@ function createProviderRouteResolver(deps) {
|
|
|
130837
130844
|
}
|
|
130838
130845
|
if (matched === void 0) {
|
|
130839
130846
|
const resolution = resolve2(current);
|
|
130840
|
-
return resolution.ok ? { ok: true, route: servingRewritten(resolution.route, { ...replay, url: current.url }) } : resolution;
|
|
130847
|
+
return resolution.ok ? { ok: true, route: servingRewritten(resolution.route, { ...replay, url: current.url }), request: { ...replay, url: current.url } } : resolution;
|
|
130841
130848
|
}
|
|
130842
130849
|
if (matched.model !== void 0 && scan.text !== void 0 && scan.model !== void 0) {
|
|
130843
130850
|
const rewritten = scan.text.replace(new RegExp('"model":\\s*"' + scan.model.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + '"'), '"model":"' + matched.model + '"');
|
package/dist/index.cjs
CHANGED
|
@@ -2983,7 +2983,7 @@ var init_package = __esm({
|
|
|
2983
2983
|
"package.json"() {
|
|
2984
2984
|
package_default = {
|
|
2985
2985
|
name: "claude-use",
|
|
2986
|
-
version: "11.31.
|
|
2986
|
+
version: "11.31.1",
|
|
2987
2987
|
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.",
|
|
2988
2988
|
license: "MIT",
|
|
2989
2989
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
package/dist/index.mjs
CHANGED
|
@@ -2959,7 +2959,7 @@ var init_package = __esm({
|
|
|
2959
2959
|
"package.json"() {
|
|
2960
2960
|
package_default = {
|
|
2961
2961
|
name: "claude-use",
|
|
2962
|
-
version: "11.31.
|
|
2962
|
+
version: "11.31.1",
|
|
2963
2963
|
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.",
|
|
2964
2964
|
license: "MIT",
|
|
2965
2965
|
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.31.
|
|
3
|
+
"version": "11.31.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>",
|