agent-shim 11.83.6 → 11.83.8
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 +31 -22
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -39986,7 +39986,7 @@ var init_package = __esm({
|
|
|
39986
39986
|
"package.json"() {
|
|
39987
39987
|
package_default = {
|
|
39988
39988
|
name: "agent-shim",
|
|
39989
|
-
version: "11.83.
|
|
39989
|
+
version: "11.83.8",
|
|
39990
39990
|
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.",
|
|
39991
39991
|
license: "MIT",
|
|
39992
39992
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -68706,33 +68706,41 @@ async function* callCloudAntigravity(params, fetchFn = fetch) {
|
|
|
68706
68706
|
}
|
|
68707
68707
|
const decoder = new TextDecoder("utf-8");
|
|
68708
68708
|
let buffer2 = "";
|
|
68709
|
-
const sseDataPrefix = "data:";
|
|
68710
68709
|
for await (const rawChunk of response.body) {
|
|
68711
68710
|
const chunk2 = rawChunk instanceof Uint8Array ? rawChunk : Buffer.from(String(rawChunk));
|
|
68712
68711
|
buffer2 += decoder.decode(chunk2, { stream: true });
|
|
68713
68712
|
const lines = buffer2.split("\n");
|
|
68714
68713
|
buffer2 = lines.pop() ?? "";
|
|
68715
68714
|
for (const line of lines) {
|
|
68716
|
-
|
|
68717
|
-
|
|
68718
|
-
|
|
68719
|
-
|
|
68720
|
-
|
|
68721
|
-
|
|
68722
|
-
|
|
68723
|
-
|
|
68724
|
-
|
|
68725
|
-
|
|
68726
|
-
|
|
68727
|
-
|
|
68728
|
-
|
|
68729
|
-
|
|
68730
|
-
|
|
68731
|
-
|
|
68715
|
+
yield* chunksOfLine(line);
|
|
68716
|
+
}
|
|
68717
|
+
}
|
|
68718
|
+
buffer2 += decoder.decode();
|
|
68719
|
+
yield* chunksOfLine(buffer2);
|
|
68720
|
+
}
|
|
68721
|
+
function* chunksOfLine(line) {
|
|
68722
|
+
const trimmed = line.trim();
|
|
68723
|
+
if (!trimmed.startsWith(SSE_DATA_PREFIX)) {
|
|
68724
|
+
return;
|
|
68725
|
+
}
|
|
68726
|
+
const jsonStr = trimmed.slice(SSE_DATA_PREFIX.length).trim();
|
|
68727
|
+
if (jsonStr.length === 0) {
|
|
68728
|
+
return;
|
|
68729
|
+
}
|
|
68730
|
+
let parsed;
|
|
68731
|
+
try {
|
|
68732
|
+
parsed = JSON.parse(jsonStr);
|
|
68733
|
+
} catch {
|
|
68734
|
+
return;
|
|
68735
|
+
}
|
|
68736
|
+
if (isRecord6(parsed)) {
|
|
68737
|
+
const unwrapped = isRecord6(parsed.response) ? parsed.response : parsed;
|
|
68738
|
+
if (isGeminiChunk(unwrapped)) {
|
|
68739
|
+
yield unwrapped;
|
|
68732
68740
|
}
|
|
68733
68741
|
}
|
|
68734
68742
|
}
|
|
68735
|
-
var import_node_crypto18, CCPA_ENDPOINT, CCPA_DEFAULT_PROJECT_ID, CCPA_USER_AGENT, AntigravityUpstreamError;
|
|
68743
|
+
var import_node_crypto18, CCPA_ENDPOINT, CCPA_DEFAULT_PROJECT_ID, CCPA_USER_AGENT, AntigravityUpstreamError, SSE_DATA_PREFIX;
|
|
68736
68744
|
var init_cloudUpstream = __esm({
|
|
68737
68745
|
"src/antigravity/cloudUpstream.ts"() {
|
|
68738
68746
|
"use strict";
|
|
@@ -68753,6 +68761,7 @@ var init_cloudUpstream = __esm({
|
|
|
68753
68761
|
this.retryAfter = retryAfter;
|
|
68754
68762
|
}
|
|
68755
68763
|
};
|
|
68764
|
+
SSE_DATA_PREFIX = "data:";
|
|
68756
68765
|
}
|
|
68757
68766
|
});
|
|
68758
68767
|
|
|
@@ -147053,11 +147062,11 @@ function enrichStatuslinePayload(params) {
|
|
|
147053
147062
|
...params.doorCostUsd === void 0 ? {} : { doorCostUsd: params.doorCostUsd }
|
|
147054
147063
|
};
|
|
147055
147064
|
let scopedName;
|
|
147065
|
+
const routedProvider = routedProviderOf(params);
|
|
147056
147066
|
if (params.snapshot !== void 0) {
|
|
147057
|
-
const routedProvider = routedProviderOf(params);
|
|
147058
147067
|
scopedName = providerScopedState(params.snapshot, params.providerName, params.env.AGENT_SHIM_PROVIDER) ?? providerScopedState(params.snapshot, routedProvider, routedProvider);
|
|
147059
147068
|
const scopedState = scopedName === void 0 ? void 0 : params.snapshot.providers[scopedName];
|
|
147060
|
-
const states = summary.provider === void 0 && scopedState === void 0 ? Object.values(params.snapshot.providers) : scopedState === void 0 ? [] : [scopedState];
|
|
147069
|
+
const states = summary.provider === void 0 && routedProvider === void 0 && scopedState === void 0 ? Object.values(params.snapshot.providers) : scopedState === void 0 ? [] : [scopedState];
|
|
147061
147070
|
let email3;
|
|
147062
147071
|
let sub;
|
|
147063
147072
|
let plan;
|
|
@@ -147088,7 +147097,7 @@ function enrichStatuslinePayload(params) {
|
|
|
147088
147097
|
);
|
|
147089
147098
|
summary = { ...summary, ...windowsOf(states, params.nowMs), providerAccountEmail: email3, providerAccountSub: sub, providerPlan: plan, providerQuotaWindows, quotaFamilies: quotaFamiliesOf(providerBuckets, params.nowMs) };
|
|
147090
147099
|
}
|
|
147091
|
-
if (summary.provider === void 0 && scopedName === void 0) {
|
|
147100
|
+
if (summary.provider === void 0 && routedProvider === void 0 && scopedName === void 0) {
|
|
147092
147101
|
const agyBuckets = antigravityQuotaMapOf(params.payload);
|
|
147093
147102
|
if (agyBuckets !== void 0) {
|
|
147094
147103
|
summary = { ...summary, quotaFamilies: quotaFamiliesOf(agyBuckets, params.nowMs) };
|
package/dist/index.cjs
CHANGED
|
@@ -4853,7 +4853,7 @@ var init_package = __esm({
|
|
|
4853
4853
|
"package.json"() {
|
|
4854
4854
|
package_default = {
|
|
4855
4855
|
name: "agent-shim",
|
|
4856
|
-
version: "11.83.
|
|
4856
|
+
version: "11.83.8",
|
|
4857
4857
|
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.",
|
|
4858
4858
|
license: "MIT",
|
|
4859
4859
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
package/dist/index.mjs
CHANGED
|
@@ -4829,7 +4829,7 @@ var init_package = __esm({
|
|
|
4829
4829
|
"package.json"() {
|
|
4830
4830
|
package_default = {
|
|
4831
4831
|
name: "agent-shim",
|
|
4832
|
-
version: "11.83.
|
|
4832
|
+
version: "11.83.8",
|
|
4833
4833
|
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.",
|
|
4834
4834
|
license: "MIT",
|
|
4835
4835
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-shim",
|
|
3
|
-
"version": "11.83.
|
|
3
|
+
"version": "11.83.8",
|
|
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>",
|