@google/gemini-cli-a2a-server 0.13.0-preview.0 → 0.13.0-preview.2
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/a2a-server.mjs +25 -9
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/a2a-server.mjs
CHANGED
|
@@ -295897,8 +295897,8 @@ var Float64Vector = import_vector.default.Float64Vector;
|
|
|
295897
295897
|
var PointerVector = import_vector.default.PointerVector;
|
|
295898
295898
|
|
|
295899
295899
|
// packages/core/dist/src/generated/git-commit.js
|
|
295900
|
-
var GIT_COMMIT_INFO = "
|
|
295901
|
-
var CLI_VERSION = "0.13.0-preview.
|
|
295900
|
+
var GIT_COMMIT_INFO = "ece06155";
|
|
295901
|
+
var CLI_VERSION = "0.13.0-preview.2";
|
|
295902
295902
|
|
|
295903
295903
|
// packages/core/dist/src/ide/detect-ide.js
|
|
295904
295904
|
var IDE_DEFINITIONS = {
|
|
@@ -298708,7 +298708,7 @@ async function createContentGenerator(config2, gcConfig, sessionId2) {
|
|
|
298708
298708
|
if (gcConfig.fakeResponses) {
|
|
298709
298709
|
return FakeContentGenerator.fromFile(gcConfig.fakeResponses);
|
|
298710
298710
|
}
|
|
298711
|
-
const version3 = "0.13.0-preview.
|
|
298711
|
+
const version3 = "0.13.0-preview.2";
|
|
298712
298712
|
const userAgent = `GeminiCLI/${version3} (${process.platform}; ${process.arch})`;
|
|
298713
298713
|
const baseHeaders = {
|
|
298714
298714
|
"User-Agent": userAgent
|
|
@@ -330145,15 +330145,31 @@ var RetryableQuotaError = class extends Error {
|
|
|
330145
330145
|
}
|
|
330146
330146
|
};
|
|
330147
330147
|
function parseDurationInSeconds(duration) {
|
|
330148
|
-
if (
|
|
330149
|
-
|
|
330148
|
+
if (duration.endsWith("ms")) {
|
|
330149
|
+
const milliseconds = parseFloat(duration.slice(0, -2));
|
|
330150
|
+
return isNaN(milliseconds) ? null : milliseconds / 1e3;
|
|
330151
|
+
}
|
|
330152
|
+
if (duration.endsWith("s")) {
|
|
330153
|
+
const seconds = parseFloat(duration.slice(0, -1));
|
|
330154
|
+
return isNaN(seconds) ? null : seconds;
|
|
330150
330155
|
}
|
|
330151
|
-
|
|
330152
|
-
return isNaN(seconds) ? null : seconds;
|
|
330156
|
+
return null;
|
|
330153
330157
|
}
|
|
330154
330158
|
function classifyGoogleError(error) {
|
|
330155
330159
|
const googleApiError = parseGoogleApiError(error);
|
|
330156
330160
|
if (!googleApiError || googleApiError.code !== 429) {
|
|
330161
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
330162
|
+
const match2 = errorMessage.match(/Please retry in ([0-9.]+(?:ms|s))/);
|
|
330163
|
+
if (match2?.[1]) {
|
|
330164
|
+
const retryDelaySeconds = parseDurationInSeconds(match2[1]);
|
|
330165
|
+
if (retryDelaySeconds !== null) {
|
|
330166
|
+
return new RetryableQuotaError(errorMessage, googleApiError ?? {
|
|
330167
|
+
code: 429,
|
|
330168
|
+
message: errorMessage,
|
|
330169
|
+
details: []
|
|
330170
|
+
}, retryDelaySeconds);
|
|
330171
|
+
}
|
|
330172
|
+
}
|
|
330157
330173
|
return error;
|
|
330158
330174
|
}
|
|
330159
330175
|
const quotaFailure = googleApiError.details.find((d) => d["@type"] === "type.googleapis.com/google.rpc.QuotaFailure");
|
|
@@ -336858,7 +336874,7 @@ var ShellExecutionService = class {
|
|
|
336858
336874
|
activePty.ptyProcess.resize(cols, rows);
|
|
336859
336875
|
activePty.headlessTerminal.resize(cols, rows);
|
|
336860
336876
|
} catch (e2) {
|
|
336861
|
-
if (e2 instanceof Error && ("code" in e2 && e2.code === "ESRCH" || e2.message
|
|
336877
|
+
if (e2 instanceof Error && ("code" in e2 && e2.code === "ESRCH" || e2.message.includes("Cannot resize a pty that has already exited"))) {
|
|
336862
336878
|
} else {
|
|
336863
336879
|
throw e2;
|
|
336864
336880
|
}
|
|
@@ -354639,7 +354655,7 @@ async function getClientMetadata() {
|
|
|
354639
354655
|
if (!clientMetadataPromise) {
|
|
354640
354656
|
clientMetadataPromise = (async () => ({
|
|
354641
354657
|
ideName: "GEMINI_CLI",
|
|
354642
|
-
ideVersion: "0.13.0-preview.
|
|
354658
|
+
ideVersion: "0.13.0-preview.2",
|
|
354643
354659
|
platform: getPlatform(),
|
|
354644
354660
|
updateChannel: await getReleaseChannel(__dirname5)
|
|
354645
354661
|
}))();
|