@google/gemini-cli-a2a-server 0.30.0-preview.0 → 0.30.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 +262 -27
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/a2a-server.mjs
CHANGED
|
@@ -40431,6 +40431,245 @@ var require_utils4 = __commonJS({
|
|
|
40431
40431
|
}
|
|
40432
40432
|
});
|
|
40433
40433
|
|
|
40434
|
+
// node_modules/punycode/punycode.js
|
|
40435
|
+
var require_punycode = __commonJS({
|
|
40436
|
+
"node_modules/punycode/punycode.js"(exports2, module2) {
|
|
40437
|
+
"use strict";
|
|
40438
|
+
var maxInt = 2147483647;
|
|
40439
|
+
var base = 36;
|
|
40440
|
+
var tMin = 1;
|
|
40441
|
+
var tMax = 26;
|
|
40442
|
+
var skew = 38;
|
|
40443
|
+
var damp = 700;
|
|
40444
|
+
var initialBias = 72;
|
|
40445
|
+
var initialN = 128;
|
|
40446
|
+
var delimiter3 = "-";
|
|
40447
|
+
var regexPunycode = /^xn--/;
|
|
40448
|
+
var regexNonASCII = /[^\0-\x7F]/;
|
|
40449
|
+
var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g;
|
|
40450
|
+
var errors = {
|
|
40451
|
+
"overflow": "Overflow: input needs wider integers to process",
|
|
40452
|
+
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
40453
|
+
"invalid-input": "Invalid input"
|
|
40454
|
+
};
|
|
40455
|
+
var baseMinusTMin = base - tMin;
|
|
40456
|
+
var floor = Math.floor;
|
|
40457
|
+
var stringFromCharCode = String.fromCharCode;
|
|
40458
|
+
function error2(type2) {
|
|
40459
|
+
throw new RangeError(errors[type2]);
|
|
40460
|
+
}
|
|
40461
|
+
function map3(array2, callback) {
|
|
40462
|
+
const result2 = [];
|
|
40463
|
+
let length = array2.length;
|
|
40464
|
+
while (length--) {
|
|
40465
|
+
result2[length] = callback(array2[length]);
|
|
40466
|
+
}
|
|
40467
|
+
return result2;
|
|
40468
|
+
}
|
|
40469
|
+
function mapDomain(domain, callback) {
|
|
40470
|
+
const parts2 = domain.split("@");
|
|
40471
|
+
let result2 = "";
|
|
40472
|
+
if (parts2.length > 1) {
|
|
40473
|
+
result2 = parts2[0] + "@";
|
|
40474
|
+
domain = parts2[1];
|
|
40475
|
+
}
|
|
40476
|
+
domain = domain.replace(regexSeparators, ".");
|
|
40477
|
+
const labels = domain.split(".");
|
|
40478
|
+
const encoded = map3(labels, callback).join(".");
|
|
40479
|
+
return result2 + encoded;
|
|
40480
|
+
}
|
|
40481
|
+
function ucs2decode(string4) {
|
|
40482
|
+
const output = [];
|
|
40483
|
+
let counter = 0;
|
|
40484
|
+
const length = string4.length;
|
|
40485
|
+
while (counter < length) {
|
|
40486
|
+
const value = string4.charCodeAt(counter++);
|
|
40487
|
+
if (value >= 55296 && value <= 56319 && counter < length) {
|
|
40488
|
+
const extra = string4.charCodeAt(counter++);
|
|
40489
|
+
if ((extra & 64512) == 56320) {
|
|
40490
|
+
output.push(((value & 1023) << 10) + (extra & 1023) + 65536);
|
|
40491
|
+
} else {
|
|
40492
|
+
output.push(value);
|
|
40493
|
+
counter--;
|
|
40494
|
+
}
|
|
40495
|
+
} else {
|
|
40496
|
+
output.push(value);
|
|
40497
|
+
}
|
|
40498
|
+
}
|
|
40499
|
+
return output;
|
|
40500
|
+
}
|
|
40501
|
+
var ucs2encode = (codePoints) => String.fromCodePoint(...codePoints);
|
|
40502
|
+
var basicToDigit = function(codePoint) {
|
|
40503
|
+
if (codePoint >= 48 && codePoint < 58) {
|
|
40504
|
+
return 26 + (codePoint - 48);
|
|
40505
|
+
}
|
|
40506
|
+
if (codePoint >= 65 && codePoint < 91) {
|
|
40507
|
+
return codePoint - 65;
|
|
40508
|
+
}
|
|
40509
|
+
if (codePoint >= 97 && codePoint < 123) {
|
|
40510
|
+
return codePoint - 97;
|
|
40511
|
+
}
|
|
40512
|
+
return base;
|
|
40513
|
+
};
|
|
40514
|
+
var digitToBasic = function(digit, flag) {
|
|
40515
|
+
return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
|
|
40516
|
+
};
|
|
40517
|
+
var adapt = function(delta, numPoints, firstTime) {
|
|
40518
|
+
let k = 0;
|
|
40519
|
+
delta = firstTime ? floor(delta / damp) : delta >> 1;
|
|
40520
|
+
delta += floor(delta / numPoints);
|
|
40521
|
+
for (; delta > baseMinusTMin * tMax >> 1; k += base) {
|
|
40522
|
+
delta = floor(delta / baseMinusTMin);
|
|
40523
|
+
}
|
|
40524
|
+
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
|
|
40525
|
+
};
|
|
40526
|
+
var decode3 = function(input) {
|
|
40527
|
+
const output = [];
|
|
40528
|
+
const inputLength = input.length;
|
|
40529
|
+
let i4 = 0;
|
|
40530
|
+
let n3 = initialN;
|
|
40531
|
+
let bias = initialBias;
|
|
40532
|
+
let basic = input.lastIndexOf(delimiter3);
|
|
40533
|
+
if (basic < 0) {
|
|
40534
|
+
basic = 0;
|
|
40535
|
+
}
|
|
40536
|
+
for (let j = 0; j < basic; ++j) {
|
|
40537
|
+
if (input.charCodeAt(j) >= 128) {
|
|
40538
|
+
error2("not-basic");
|
|
40539
|
+
}
|
|
40540
|
+
output.push(input.charCodeAt(j));
|
|
40541
|
+
}
|
|
40542
|
+
for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; ) {
|
|
40543
|
+
const oldi = i4;
|
|
40544
|
+
for (let w = 1, k = base; ; k += base) {
|
|
40545
|
+
if (index >= inputLength) {
|
|
40546
|
+
error2("invalid-input");
|
|
40547
|
+
}
|
|
40548
|
+
const digit = basicToDigit(input.charCodeAt(index++));
|
|
40549
|
+
if (digit >= base) {
|
|
40550
|
+
error2("invalid-input");
|
|
40551
|
+
}
|
|
40552
|
+
if (digit > floor((maxInt - i4) / w)) {
|
|
40553
|
+
error2("overflow");
|
|
40554
|
+
}
|
|
40555
|
+
i4 += digit * w;
|
|
40556
|
+
const t3 = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
|
|
40557
|
+
if (digit < t3) {
|
|
40558
|
+
break;
|
|
40559
|
+
}
|
|
40560
|
+
const baseMinusT = base - t3;
|
|
40561
|
+
if (w > floor(maxInt / baseMinusT)) {
|
|
40562
|
+
error2("overflow");
|
|
40563
|
+
}
|
|
40564
|
+
w *= baseMinusT;
|
|
40565
|
+
}
|
|
40566
|
+
const out2 = output.length + 1;
|
|
40567
|
+
bias = adapt(i4 - oldi, out2, oldi == 0);
|
|
40568
|
+
if (floor(i4 / out2) > maxInt - n3) {
|
|
40569
|
+
error2("overflow");
|
|
40570
|
+
}
|
|
40571
|
+
n3 += floor(i4 / out2);
|
|
40572
|
+
i4 %= out2;
|
|
40573
|
+
output.splice(i4++, 0, n3);
|
|
40574
|
+
}
|
|
40575
|
+
return String.fromCodePoint(...output);
|
|
40576
|
+
};
|
|
40577
|
+
var encode3 = function(input) {
|
|
40578
|
+
const output = [];
|
|
40579
|
+
input = ucs2decode(input);
|
|
40580
|
+
const inputLength = input.length;
|
|
40581
|
+
let n3 = initialN;
|
|
40582
|
+
let delta = 0;
|
|
40583
|
+
let bias = initialBias;
|
|
40584
|
+
for (const currentValue of input) {
|
|
40585
|
+
if (currentValue < 128) {
|
|
40586
|
+
output.push(stringFromCharCode(currentValue));
|
|
40587
|
+
}
|
|
40588
|
+
}
|
|
40589
|
+
const basicLength = output.length;
|
|
40590
|
+
let handledCPCount = basicLength;
|
|
40591
|
+
if (basicLength) {
|
|
40592
|
+
output.push(delimiter3);
|
|
40593
|
+
}
|
|
40594
|
+
while (handledCPCount < inputLength) {
|
|
40595
|
+
let m2 = maxInt;
|
|
40596
|
+
for (const currentValue of input) {
|
|
40597
|
+
if (currentValue >= n3 && currentValue < m2) {
|
|
40598
|
+
m2 = currentValue;
|
|
40599
|
+
}
|
|
40600
|
+
}
|
|
40601
|
+
const handledCPCountPlusOne = handledCPCount + 1;
|
|
40602
|
+
if (m2 - n3 > floor((maxInt - delta) / handledCPCountPlusOne)) {
|
|
40603
|
+
error2("overflow");
|
|
40604
|
+
}
|
|
40605
|
+
delta += (m2 - n3) * handledCPCountPlusOne;
|
|
40606
|
+
n3 = m2;
|
|
40607
|
+
for (const currentValue of input) {
|
|
40608
|
+
if (currentValue < n3 && ++delta > maxInt) {
|
|
40609
|
+
error2("overflow");
|
|
40610
|
+
}
|
|
40611
|
+
if (currentValue === n3) {
|
|
40612
|
+
let q = delta;
|
|
40613
|
+
for (let k = base; ; k += base) {
|
|
40614
|
+
const t3 = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
|
|
40615
|
+
if (q < t3) {
|
|
40616
|
+
break;
|
|
40617
|
+
}
|
|
40618
|
+
const qMinusT = q - t3;
|
|
40619
|
+
const baseMinusT = base - t3;
|
|
40620
|
+
output.push(
|
|
40621
|
+
stringFromCharCode(digitToBasic(t3 + qMinusT % baseMinusT, 0))
|
|
40622
|
+
);
|
|
40623
|
+
q = floor(qMinusT / baseMinusT);
|
|
40624
|
+
}
|
|
40625
|
+
output.push(stringFromCharCode(digitToBasic(q, 0)));
|
|
40626
|
+
bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);
|
|
40627
|
+
delta = 0;
|
|
40628
|
+
++handledCPCount;
|
|
40629
|
+
}
|
|
40630
|
+
}
|
|
40631
|
+
++delta;
|
|
40632
|
+
++n3;
|
|
40633
|
+
}
|
|
40634
|
+
return output.join("");
|
|
40635
|
+
};
|
|
40636
|
+
var toUnicode = function(input) {
|
|
40637
|
+
return mapDomain(input, function(string4) {
|
|
40638
|
+
return regexPunycode.test(string4) ? decode3(string4.slice(4).toLowerCase()) : string4;
|
|
40639
|
+
});
|
|
40640
|
+
};
|
|
40641
|
+
var toASCII = function(input) {
|
|
40642
|
+
return mapDomain(input, function(string4) {
|
|
40643
|
+
return regexNonASCII.test(string4) ? "xn--" + encode3(string4) : string4;
|
|
40644
|
+
});
|
|
40645
|
+
};
|
|
40646
|
+
var punycode = {
|
|
40647
|
+
/**
|
|
40648
|
+
* A string representing the current Punycode.js version number.
|
|
40649
|
+
* @memberOf punycode
|
|
40650
|
+
* @type String
|
|
40651
|
+
*/
|
|
40652
|
+
"version": "2.3.1",
|
|
40653
|
+
/**
|
|
40654
|
+
* An object of methods to convert from JavaScript's internal character
|
|
40655
|
+
* representation (UCS-2) to Unicode code points, and back.
|
|
40656
|
+
* @see <https://mathiasbynens.be/notes/javascript-encoding>
|
|
40657
|
+
* @memberOf punycode
|
|
40658
|
+
* @type Object
|
|
40659
|
+
*/
|
|
40660
|
+
"ucs2": {
|
|
40661
|
+
"decode": ucs2decode,
|
|
40662
|
+
"encode": ucs2encode
|
|
40663
|
+
},
|
|
40664
|
+
"decode": decode3,
|
|
40665
|
+
"encode": encode3,
|
|
40666
|
+
"toASCII": toASCII,
|
|
40667
|
+
"toUnicode": toUnicode
|
|
40668
|
+
};
|
|
40669
|
+
module2.exports = punycode;
|
|
40670
|
+
}
|
|
40671
|
+
});
|
|
40672
|
+
|
|
40434
40673
|
// node_modules/node-fetch/node_modules/tr46/lib/mappingTable.json
|
|
40435
40674
|
var require_mappingTable = __commonJS({
|
|
40436
40675
|
"node_modules/node-fetch/node_modules/tr46/lib/mappingTable.json"(exports2, module2) {
|
|
@@ -40442,7 +40681,7 @@ var require_mappingTable = __commonJS({
|
|
|
40442
40681
|
var require_tr46 = __commonJS({
|
|
40443
40682
|
"node_modules/node-fetch/node_modules/tr46/index.js"(exports2, module2) {
|
|
40444
40683
|
"use strict";
|
|
40445
|
-
var punycode =
|
|
40684
|
+
var punycode = require_punycode();
|
|
40446
40685
|
var mappingTable = require_mappingTable();
|
|
40447
40686
|
var PROCESSING_OPTIONS = {
|
|
40448
40687
|
TRANSITIONAL: 0,
|
|
@@ -40603,7 +40842,7 @@ var require_tr46 = __commonJS({
|
|
|
40603
40842
|
var require_url_state_machine = __commonJS({
|
|
40604
40843
|
"node_modules/node-fetch/node_modules/whatwg-url/lib/url-state-machine.js"(exports2, module2) {
|
|
40605
40844
|
"use strict";
|
|
40606
|
-
var punycode =
|
|
40845
|
+
var punycode = require_punycode();
|
|
40607
40846
|
var tr46 = require_tr46();
|
|
40608
40847
|
var specialSchemes = {
|
|
40609
40848
|
ftp: 21,
|
|
@@ -122445,7 +122684,8 @@ var init_types8 = __esm({
|
|
|
122445
122684
|
secureModeEnabled: external_exports.boolean().optional(),
|
|
122446
122685
|
strictModeDisabled: external_exports.boolean().optional(),
|
|
122447
122686
|
mcpSetting: McpSettingSchema.optional(),
|
|
122448
|
-
cliFeatureSetting: CliFeatureSettingSchema.optional()
|
|
122687
|
+
cliFeatureSetting: CliFeatureSettingSchema.optional(),
|
|
122688
|
+
adminControlsApplicable: external_exports.boolean().optional()
|
|
122449
122689
|
});
|
|
122450
122690
|
}
|
|
122451
122691
|
});
|
|
@@ -131101,7 +131341,7 @@ function getVersion() {
|
|
|
131101
131341
|
}
|
|
131102
131342
|
versionPromise = (async () => {
|
|
131103
131343
|
const pkgJson = await getPackageJson(__dirname3);
|
|
131104
|
-
return "0.30.0-preview.
|
|
131344
|
+
return "0.30.0-preview.2";
|
|
131105
131345
|
})();
|
|
131106
131346
|
return versionPromise;
|
|
131107
131347
|
}
|
|
@@ -208501,8 +208741,8 @@ var GIT_COMMIT_INFO, CLI_VERSION;
|
|
|
208501
208741
|
var init_git_commit = __esm({
|
|
208502
208742
|
"packages/core/dist/src/generated/git-commit.js"() {
|
|
208503
208743
|
"use strict";
|
|
208504
|
-
GIT_COMMIT_INFO = "
|
|
208505
|
-
CLI_VERSION = "0.30.0-preview.
|
|
208744
|
+
GIT_COMMIT_INFO = "54a1200ef";
|
|
208745
|
+
CLI_VERSION = "0.30.0-preview.2";
|
|
208506
208746
|
}
|
|
208507
208747
|
});
|
|
208508
208748
|
|
|
@@ -397286,16 +397526,13 @@ function sanitizeAdminSettings(settings) {
|
|
|
397286
397526
|
}
|
|
397287
397527
|
};
|
|
397288
397528
|
}
|
|
397289
|
-
function isGaxiosError(error2) {
|
|
397290
|
-
return typeof error2 === "object" && error2 !== null && "status" in error2 && typeof error2.status === "number";
|
|
397291
|
-
}
|
|
397292
397529
|
async function fetchAdminControls(server, cachedSettings, adminControlsEnabled, onSettingsChanged) {
|
|
397293
397530
|
if (!server || !server.projectId || !adminControlsEnabled) {
|
|
397294
397531
|
stopAdminControlsPolling();
|
|
397295
397532
|
currentSettings = void 0;
|
|
397296
397533
|
return {};
|
|
397297
397534
|
}
|
|
397298
|
-
if (cachedSettings) {
|
|
397535
|
+
if (cachedSettings && Object.keys(cachedSettings).length !== 0) {
|
|
397299
397536
|
currentSettings = cachedSettings;
|
|
397300
397537
|
startAdminControlsPolling(server, server.projectId, onSettingsChanged);
|
|
397301
397538
|
return cachedSettings;
|
|
@@ -397304,20 +397541,18 @@ async function fetchAdminControls(server, cachedSettings, adminControlsEnabled,
|
|
|
397304
397541
|
const rawSettings = await server.fetchAdminControls({
|
|
397305
397542
|
project: server.projectId
|
|
397306
397543
|
});
|
|
397544
|
+
if (rawSettings.adminControlsApplicable !== true) {
|
|
397545
|
+
stopAdminControlsPolling();
|
|
397546
|
+
currentSettings = void 0;
|
|
397547
|
+
return {};
|
|
397548
|
+
}
|
|
397307
397549
|
const sanitizedSettings = sanitizeAdminSettings(rawSettings);
|
|
397308
397550
|
currentSettings = sanitizedSettings;
|
|
397309
397551
|
startAdminControlsPolling(server, server.projectId, onSettingsChanged);
|
|
397310
397552
|
return sanitizedSettings;
|
|
397311
397553
|
} catch (e3) {
|
|
397312
|
-
if (isGaxiosError(e3) && e3.status === 403) {
|
|
397313
|
-
stopAdminControlsPolling();
|
|
397314
|
-
currentSettings = void 0;
|
|
397315
|
-
return {};
|
|
397316
|
-
}
|
|
397317
397554
|
debugLogger.error("Failed to fetch admin controls: ", e3);
|
|
397318
|
-
|
|
397319
|
-
startAdminControlsPolling(server, server.projectId, onSettingsChanged);
|
|
397320
|
-
return {};
|
|
397555
|
+
throw e3;
|
|
397321
397556
|
}
|
|
397322
397557
|
}
|
|
397323
397558
|
async function fetchAdminControlsOnce(server, adminControlsEnabled) {
|
|
@@ -397328,13 +397563,13 @@ async function fetchAdminControlsOnce(server, adminControlsEnabled) {
|
|
|
397328
397563
|
const rawSettings = await server.fetchAdminControls({
|
|
397329
397564
|
project: server.projectId
|
|
397330
397565
|
});
|
|
397331
|
-
|
|
397332
|
-
} catch (e3) {
|
|
397333
|
-
if (isGaxiosError(e3) && e3.status === 403) {
|
|
397566
|
+
if (rawSettings.adminControlsApplicable !== true) {
|
|
397334
397567
|
return {};
|
|
397335
397568
|
}
|
|
397569
|
+
return sanitizeAdminSettings(rawSettings);
|
|
397570
|
+
} catch (e3) {
|
|
397336
397571
|
debugLogger.error("Failed to fetch admin controls: ", e3 instanceof Error ? e3.message : e3);
|
|
397337
|
-
|
|
397572
|
+
throw e3;
|
|
397338
397573
|
}
|
|
397339
397574
|
}
|
|
397340
397575
|
function startAdminControlsPolling(server, project, onSettingsChanged) {
|
|
@@ -397344,17 +397579,17 @@ function startAdminControlsPolling(server, project, onSettingsChanged) {
|
|
|
397344
397579
|
const rawSettings = await server.fetchAdminControls({
|
|
397345
397580
|
project
|
|
397346
397581
|
});
|
|
397582
|
+
if (rawSettings.adminControlsApplicable !== true) {
|
|
397583
|
+
stopAdminControlsPolling();
|
|
397584
|
+
currentSettings = void 0;
|
|
397585
|
+
return;
|
|
397586
|
+
}
|
|
397347
397587
|
const newSettings = sanitizeAdminSettings(rawSettings);
|
|
397348
397588
|
if (!isDeepStrictEqual(newSettings, currentSettings)) {
|
|
397349
397589
|
currentSettings = newSettings;
|
|
397350
397590
|
onSettingsChanged(newSettings);
|
|
397351
397591
|
}
|
|
397352
397592
|
} catch (e3) {
|
|
397353
|
-
if (isGaxiosError(e3) && e3.status === 403) {
|
|
397354
|
-
stopAdminControlsPolling();
|
|
397355
|
-
currentSettings = void 0;
|
|
397356
|
-
return;
|
|
397357
|
-
}
|
|
397358
397593
|
debugLogger.error("Failed to poll admin controls: ", e3);
|
|
397359
397594
|
}
|
|
397360
397595
|
}, 5 * 60 * 1e3);
|