@google/gemini-cli-a2a-server 0.28.0-preview.7 → 0.28.0
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 +139 -137
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/a2a-server.mjs
CHANGED
|
@@ -6344,7 +6344,7 @@ var require_diagnostics = __commonJS({
|
|
|
6344
6344
|
function write2() {
|
|
6345
6345
|
logger7.apply(logger7, arguments);
|
|
6346
6346
|
}
|
|
6347
|
-
function
|
|
6347
|
+
function process26(message) {
|
|
6348
6348
|
for (var i4 = 0; i4 < modifiers.length; i4++) {
|
|
6349
6349
|
message = modifiers[i4].apply(modifiers[i4], arguments);
|
|
6350
6350
|
}
|
|
@@ -6371,7 +6371,7 @@ var require_diagnostics = __commonJS({
|
|
|
6371
6371
|
function yep(options) {
|
|
6372
6372
|
function diagnostics() {
|
|
6373
6373
|
var args2 = Array.prototype.slice.call(arguments, 0);
|
|
6374
|
-
write2.call(write2, options,
|
|
6374
|
+
write2.call(write2, options, process26(args2, options));
|
|
6375
6375
|
return true;
|
|
6376
6376
|
}
|
|
6377
6377
|
options.enabled = true;
|
|
@@ -6383,7 +6383,7 @@ var require_diagnostics = __commonJS({
|
|
|
6383
6383
|
module2.exports = function create3(diagnostics) {
|
|
6384
6384
|
diagnostics.introduce = introduce;
|
|
6385
6385
|
diagnostics.enabled = enabled;
|
|
6386
|
-
diagnostics.process =
|
|
6386
|
+
diagnostics.process = process26;
|
|
6387
6387
|
diagnostics.modify = modify;
|
|
6388
6388
|
diagnostics.write = write2;
|
|
6389
6389
|
diagnostics.nope = nope;
|
|
@@ -44582,7 +44582,7 @@ var require_logging_utils = __commonJS({
|
|
|
44582
44582
|
exports2.setBackend = setBackend;
|
|
44583
44583
|
exports2.log = log;
|
|
44584
44584
|
var node_events_1 = __require("node:events");
|
|
44585
|
-
var
|
|
44585
|
+
var process26 = __importStar(__require("node:process"));
|
|
44586
44586
|
var util5 = __importStar(__require("node:util"));
|
|
44587
44587
|
var colours_1 = require_colours();
|
|
44588
44588
|
var LogSeverity;
|
|
@@ -44633,7 +44633,7 @@ var require_logging_utils = __commonJS({
|
|
|
44633
44633
|
this.cached = /* @__PURE__ */ new Map();
|
|
44634
44634
|
this.filters = [];
|
|
44635
44635
|
this.filtersSet = false;
|
|
44636
|
-
let nodeFlag = (_a3 =
|
|
44636
|
+
let nodeFlag = (_a3 = process26.env[exports2.env.nodeEnables]) !== null && _a3 !== void 0 ? _a3 : "*";
|
|
44637
44637
|
if (nodeFlag === "all") {
|
|
44638
44638
|
nodeFlag = "*";
|
|
44639
44639
|
}
|
|
@@ -44673,7 +44673,7 @@ var require_logging_utils = __commonJS({
|
|
|
44673
44673
|
return (fields, ...args2) => {
|
|
44674
44674
|
var _a3;
|
|
44675
44675
|
const nscolour = `${colours_1.Colours.green}${namespace}${colours_1.Colours.reset}`;
|
|
44676
|
-
const pid = `${colours_1.Colours.yellow}${
|
|
44676
|
+
const pid = `${colours_1.Colours.yellow}${process26.pid}${colours_1.Colours.reset}`;
|
|
44677
44677
|
let level;
|
|
44678
44678
|
switch (fields.severity) {
|
|
44679
44679
|
case LogSeverity.ERROR:
|
|
@@ -44721,8 +44721,8 @@ var require_logging_utils = __commonJS({
|
|
|
44721
44721
|
}
|
|
44722
44722
|
setFilters() {
|
|
44723
44723
|
var _a3;
|
|
44724
|
-
const existingFilters = (_a3 =
|
|
44725
|
-
|
|
44724
|
+
const existingFilters = (_a3 = process26.env["NODE_DEBUG"]) !== null && _a3 !== void 0 ? _a3 : "";
|
|
44725
|
+
process26.env["NODE_DEBUG"] = `${existingFilters}${existingFilters ? "," : ""}${this.filters.join(",")}`;
|
|
44726
44726
|
}
|
|
44727
44727
|
};
|
|
44728
44728
|
function getDebugBackend(debugPkg) {
|
|
@@ -44768,7 +44768,7 @@ var require_logging_utils = __commonJS({
|
|
|
44768
44768
|
loggerCache.clear();
|
|
44769
44769
|
}
|
|
44770
44770
|
function log(namespace, parent) {
|
|
44771
|
-
const enablesFlag =
|
|
44771
|
+
const enablesFlag = process26.env[exports2.env.nodeEnables];
|
|
44772
44772
|
if (!enablesFlag) {
|
|
44773
44773
|
return exports2.placeholder;
|
|
44774
44774
|
}
|
|
@@ -63160,15 +63160,15 @@ var require_streams3 = __commonJS({
|
|
|
63160
63160
|
var POOL_SIZE2 = 65536;
|
|
63161
63161
|
if (!globalThis.ReadableStream) {
|
|
63162
63162
|
try {
|
|
63163
|
-
const
|
|
63164
|
-
const { emitWarning: emitWarning2 } =
|
|
63163
|
+
const process26 = __require("node:process");
|
|
63164
|
+
const { emitWarning: emitWarning2 } = process26;
|
|
63165
63165
|
try {
|
|
63166
|
-
|
|
63166
|
+
process26.emitWarning = () => {
|
|
63167
63167
|
};
|
|
63168
63168
|
Object.assign(globalThis, __require("node:stream/web"));
|
|
63169
|
-
|
|
63169
|
+
process26.emitWarning = emitWarning2;
|
|
63170
63170
|
} catch (error2) {
|
|
63171
|
-
|
|
63171
|
+
process26.emitWarning = emitWarning2;
|
|
63172
63172
|
throw error2;
|
|
63173
63173
|
}
|
|
63174
63174
|
} catch (error2) {
|
|
@@ -66000,7 +66000,7 @@ var require_logging_utils2 = __commonJS({
|
|
|
66000
66000
|
exports2.setBackend = setBackend;
|
|
66001
66001
|
exports2.log = log;
|
|
66002
66002
|
var events_1 = __require("events");
|
|
66003
|
-
var
|
|
66003
|
+
var process26 = __importStar(__require("process"));
|
|
66004
66004
|
var util5 = __importStar(__require("util"));
|
|
66005
66005
|
var colours_1 = require_colours2();
|
|
66006
66006
|
var LogSeverity;
|
|
@@ -66057,7 +66057,7 @@ var require_logging_utils2 = __commonJS({
|
|
|
66057
66057
|
this.cached = /* @__PURE__ */ new Map();
|
|
66058
66058
|
this.filters = [];
|
|
66059
66059
|
this.filtersSet = false;
|
|
66060
|
-
let nodeFlag = (_a3 =
|
|
66060
|
+
let nodeFlag = (_a3 = process26.env[exports2.env.nodeEnables]) !== null && _a3 !== void 0 ? _a3 : "*";
|
|
66061
66061
|
if (nodeFlag === "all") {
|
|
66062
66062
|
nodeFlag = "*";
|
|
66063
66063
|
}
|
|
@@ -66097,7 +66097,7 @@ var require_logging_utils2 = __commonJS({
|
|
|
66097
66097
|
return (fields, ...args2) => {
|
|
66098
66098
|
var _a3;
|
|
66099
66099
|
const nscolour = `${colours_1.Colours.green}${namespace}${colours_1.Colours.reset}`;
|
|
66100
|
-
const pid = `${colours_1.Colours.yellow}${
|
|
66100
|
+
const pid = `${colours_1.Colours.yellow}${process26.pid}${colours_1.Colours.reset}`;
|
|
66101
66101
|
let level;
|
|
66102
66102
|
switch (fields.severity) {
|
|
66103
66103
|
case LogSeverity.ERROR:
|
|
@@ -66145,8 +66145,8 @@ var require_logging_utils2 = __commonJS({
|
|
|
66145
66145
|
}
|
|
66146
66146
|
setFilters() {
|
|
66147
66147
|
var _a3;
|
|
66148
|
-
const existingFilters = (_a3 =
|
|
66149
|
-
|
|
66148
|
+
const existingFilters = (_a3 = process26.env["NODE_DEBUG"]) !== null && _a3 !== void 0 ? _a3 : "";
|
|
66149
|
+
process26.env["NODE_DEBUG"] = `${existingFilters}${existingFilters ? "," : ""}${this.filters.join(",")}`;
|
|
66150
66150
|
}
|
|
66151
66151
|
};
|
|
66152
66152
|
function getDebugBackend(debugPkg) {
|
|
@@ -66199,7 +66199,7 @@ var require_logging_utils2 = __commonJS({
|
|
|
66199
66199
|
}
|
|
66200
66200
|
function log(namespace, parent) {
|
|
66201
66201
|
if (!cachedBackend) {
|
|
66202
|
-
const enablesFlag =
|
|
66202
|
+
const enablesFlag = process26.env[exports2.env.nodeEnables];
|
|
66203
66203
|
if (!enablesFlag) {
|
|
66204
66204
|
return exports2.placeholder;
|
|
66205
66205
|
}
|
|
@@ -123949,7 +123949,7 @@ var require_root = __commonJS({
|
|
|
123949
123949
|
}
|
|
123950
123950
|
return null;
|
|
123951
123951
|
}
|
|
123952
|
-
function
|
|
123952
|
+
function process26(filename2, source) {
|
|
123953
123953
|
try {
|
|
123954
123954
|
if (util5.isString(source) && source.charAt(0) === "{")
|
|
123955
123955
|
source = JSON.parse(source);
|
|
@@ -123984,12 +123984,12 @@ var require_root = __commonJS({
|
|
|
123984
123984
|
self2.files.push(filename2);
|
|
123985
123985
|
if (filename2 in common3) {
|
|
123986
123986
|
if (sync2) {
|
|
123987
|
-
|
|
123987
|
+
process26(filename2, common3[filename2]);
|
|
123988
123988
|
} else {
|
|
123989
123989
|
++queued;
|
|
123990
123990
|
setTimeout(function() {
|
|
123991
123991
|
--queued;
|
|
123992
|
-
|
|
123992
|
+
process26(filename2, common3[filename2]);
|
|
123993
123993
|
});
|
|
123994
123994
|
}
|
|
123995
123995
|
return;
|
|
@@ -124003,7 +124003,7 @@ var require_root = __commonJS({
|
|
|
124003
124003
|
finish(err2);
|
|
124004
124004
|
return;
|
|
124005
124005
|
}
|
|
124006
|
-
|
|
124006
|
+
process26(filename2, source);
|
|
124007
124007
|
} else {
|
|
124008
124008
|
++queued;
|
|
124009
124009
|
self2.fetch(filename2, function(err2, source2) {
|
|
@@ -124018,7 +124018,7 @@ var require_root = __commonJS({
|
|
|
124018
124018
|
finish(null, self2);
|
|
124019
124019
|
return;
|
|
124020
124020
|
}
|
|
124021
|
-
|
|
124021
|
+
process26(filename2, source2);
|
|
124022
124022
|
});
|
|
124023
124023
|
}
|
|
124024
124024
|
}
|
|
@@ -150743,13 +150743,13 @@ var require_getMachineId_win = __commonJS({
|
|
|
150743
150743
|
"use strict";
|
|
150744
150744
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
150745
150745
|
exports2.getMachineId = void 0;
|
|
150746
|
-
var
|
|
150746
|
+
var process26 = __require("process");
|
|
150747
150747
|
var execAsync_1 = require_execAsync();
|
|
150748
150748
|
var api_1 = (init_esm(), __toCommonJS(esm_exports4));
|
|
150749
150749
|
async function getMachineId() {
|
|
150750
150750
|
const args2 = "QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid";
|
|
150751
150751
|
let command = "%windir%\\System32\\REG.exe";
|
|
150752
|
-
if (
|
|
150752
|
+
if (process26.arch === "ia32" && "PROCESSOR_ARCHITEW6432" in process26.env) {
|
|
150753
150753
|
command = "%windir%\\sysnative\\cmd.exe /c " + command;
|
|
150754
150754
|
}
|
|
150755
150755
|
try {
|
|
@@ -150788,11 +150788,11 @@ var require_getMachineId = __commonJS({
|
|
|
150788
150788
|
"use strict";
|
|
150789
150789
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
150790
150790
|
exports2.getMachineId = void 0;
|
|
150791
|
-
var
|
|
150791
|
+
var process26 = __require("process");
|
|
150792
150792
|
var getMachineIdImpl;
|
|
150793
150793
|
async function getMachineId() {
|
|
150794
150794
|
if (!getMachineIdImpl) {
|
|
150795
|
-
switch (
|
|
150795
|
+
switch (process26.platform) {
|
|
150796
150796
|
case "darwin":
|
|
150797
150797
|
getMachineIdImpl = (await Promise.resolve().then(() => __toESM(require_getMachineId_darwin()))).getMachineId;
|
|
150798
150798
|
break;
|
|
@@ -173812,11 +173812,11 @@ var require_network = __commonJS({
|
|
|
173812
173812
|
connstate = "TIME_WAIT";
|
|
173813
173813
|
}
|
|
173814
173814
|
let pid = null;
|
|
173815
|
-
let
|
|
173815
|
+
let process26 = "";
|
|
173816
173816
|
if (line.length >= 7 && line[6].indexOf("users:") > -1) {
|
|
173817
173817
|
const proc2 = line[6].replace('users:(("', "").replace(/"/g, "").replace("pid=", "").split(",");
|
|
173818
173818
|
if (proc2.length > 2) {
|
|
173819
|
-
|
|
173819
|
+
process26 = proc2[0];
|
|
173820
173820
|
const pidValue = parseInt(proc2[1], 10);
|
|
173821
173821
|
if (pidValue > 0) {
|
|
173822
173822
|
pid = pidValue;
|
|
@@ -173832,7 +173832,7 @@ var require_network = __commonJS({
|
|
|
173832
173832
|
peerPort: peerport,
|
|
173833
173833
|
state: connstate,
|
|
173834
173834
|
pid,
|
|
173835
|
-
process:
|
|
173835
|
+
process: process26
|
|
173836
173836
|
});
|
|
173837
173837
|
}
|
|
173838
173838
|
}
|
|
@@ -177538,22 +177538,22 @@ var require_docker = __commonJS({
|
|
|
177538
177538
|
let pos_stat = titles.indexOf("STAT");
|
|
177539
177539
|
let pos_rss = titles.indexOf("RSS");
|
|
177540
177540
|
let pos_command = titles.indexOf("COMMAND");
|
|
177541
|
-
data.Processes.forEach((
|
|
177541
|
+
data.Processes.forEach((process26) => {
|
|
177542
177542
|
result2.push({
|
|
177543
|
-
pidHost: pos_pid >= 0 ?
|
|
177544
|
-
ppid: pos_ppid >= 0 ?
|
|
177545
|
-
pgid: pos_pgid >= 0 ?
|
|
177546
|
-
user: pos_user >= 0 ?
|
|
177547
|
-
ruser: pos_ruser >= 0 ?
|
|
177548
|
-
group: pos_group >= 0 ?
|
|
177549
|
-
rgroup: pos_rgroup >= 0 ?
|
|
177550
|
-
stat: pos_stat >= 0 ?
|
|
177551
|
-
time: pos_time >= 0 ?
|
|
177552
|
-
elapsed: pos_elapsed >= 0 ?
|
|
177553
|
-
nice: pos_ni >= 0 ?
|
|
177554
|
-
rss: pos_rss >= 0 ?
|
|
177555
|
-
vsz: pos_vsz >= 0 ?
|
|
177556
|
-
command: pos_command >= 0 ?
|
|
177543
|
+
pidHost: pos_pid >= 0 ? process26[pos_pid] : "",
|
|
177544
|
+
ppid: pos_ppid >= 0 ? process26[pos_ppid] : "",
|
|
177545
|
+
pgid: pos_pgid >= 0 ? process26[pos_pgid] : "",
|
|
177546
|
+
user: pos_user >= 0 ? process26[pos_user] : "",
|
|
177547
|
+
ruser: pos_ruser >= 0 ? process26[pos_ruser] : "",
|
|
177548
|
+
group: pos_group >= 0 ? process26[pos_group] : "",
|
|
177549
|
+
rgroup: pos_rgroup >= 0 ? process26[pos_rgroup] : "",
|
|
177550
|
+
stat: pos_stat >= 0 ? process26[pos_stat] : "",
|
|
177551
|
+
time: pos_time >= 0 ? process26[pos_time] : "",
|
|
177552
|
+
elapsed: pos_elapsed >= 0 ? process26[pos_elapsed] : "",
|
|
177553
|
+
nice: pos_ni >= 0 ? process26[pos_ni] : "",
|
|
177554
|
+
rss: pos_rss >= 0 ? process26[pos_rss] : "",
|
|
177555
|
+
vsz: pos_vsz >= 0 ? process26[pos_vsz] : "",
|
|
177556
|
+
command: pos_command >= 0 ? process26[pos_command] : ""
|
|
177557
177557
|
});
|
|
177558
177558
|
});
|
|
177559
177559
|
}
|
|
@@ -185882,10 +185882,10 @@ var require_http22 = __commonJS({
|
|
|
185882
185882
|
var extend4 = require_extend();
|
|
185883
185883
|
var stream_1 = __require("stream");
|
|
185884
185884
|
var util5 = __require("util");
|
|
185885
|
-
var
|
|
185885
|
+
var process26 = __require("process");
|
|
185886
185886
|
var common_1 = require_common3();
|
|
185887
185887
|
var { HTTP2_HEADER_CONTENT_ENCODING, HTTP2_HEADER_CONTENT_TYPE, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } = http22.constants;
|
|
185888
|
-
var DEBUG = !!
|
|
185888
|
+
var DEBUG = !!process26.env.HTTP2_DEBUG;
|
|
185889
185889
|
exports2.sessions = {};
|
|
185890
185890
|
async function request3(config3) {
|
|
185891
185891
|
const opts = extend4(true, {}, config3);
|
|
@@ -321272,7 +321272,7 @@ import * as fs63 from "node:fs";
|
|
|
321272
321272
|
import * as path72 from "node:path";
|
|
321273
321273
|
import * as os21 from "node:os";
|
|
321274
321274
|
import { inspect as inspect4 } from "node:util";
|
|
321275
|
-
import
|
|
321275
|
+
import process25 from "node:process";
|
|
321276
321276
|
|
|
321277
321277
|
// packages/core/dist/src/core/contentGenerator.js
|
|
321278
321278
|
init_node();
|
|
@@ -322331,10 +322331,21 @@ init_events();
|
|
|
322331
322331
|
// packages/core/dist/src/utils/authConsent.js
|
|
322332
322332
|
init_events();
|
|
322333
322333
|
import readline from "node:readline";
|
|
322334
|
+
|
|
322335
|
+
// packages/core/dist/src/utils/headless.js
|
|
322336
|
+
import process8 from "node:process";
|
|
322337
|
+
function isHeadlessMode(options) {
|
|
322338
|
+
if (process8.env["GEMINI_CLI_INTEGRATION_TEST"] === "true") {
|
|
322339
|
+
return !!options?.prompt || !!process8.stdin && !process8.stdin.isTTY || !!process8.stdout && !process8.stdout.isTTY;
|
|
322340
|
+
}
|
|
322341
|
+
return process8.env["CI"] === "true" || process8.env["GITHUB_ACTIONS"] === "true" || !!options?.prompt || !!process8.stdin && !process8.stdin.isTTY || !!process8.stdout && !process8.stdout.isTTY;
|
|
322342
|
+
}
|
|
322343
|
+
|
|
322344
|
+
// packages/core/dist/src/utils/authConsent.js
|
|
322334
322345
|
async function getConsentForOauth(prompt) {
|
|
322335
322346
|
const finalPrompt = prompt + " Opening authentication page in your browser. ";
|
|
322336
322347
|
if (coreEvents.listenerCount(CoreEvent.ConsentRequest) === 0) {
|
|
322337
|
-
if (
|
|
322348
|
+
if (isHeadlessMode()) {
|
|
322338
322349
|
throw new FatalAuthenticationError("Interactive consent could not be obtained.\nPlease run Gemini CLI in an interactive terminal to authenticate, or use NO_BROWSER=true for manual authentication.");
|
|
322339
322350
|
}
|
|
322340
322351
|
return getOauthConsentNonInteractive(finalPrompt);
|
|
@@ -327167,10 +327178,6 @@ function resolveClassifierModel(requestedModel, modelAlias, previewFeaturesEnabl
|
|
|
327167
327178
|
function isPreviewModel(model) {
|
|
327168
327179
|
return model === PREVIEW_GEMINI_MODEL || model === PREVIEW_GEMINI_FLASH_MODEL || model === PREVIEW_GEMINI_MODEL_AUTO;
|
|
327169
327180
|
}
|
|
327170
|
-
function isGemini3Model(model, previewFeaturesEnabled = false) {
|
|
327171
|
-
const resolved = resolveModel(model, previewFeaturesEnabled);
|
|
327172
|
-
return /^gemini-3(\.|-|$)/.test(resolved);
|
|
327173
|
-
}
|
|
327174
327181
|
function isGemini2Model(model) {
|
|
327175
327182
|
return /^gemini-2(\.|$)/.test(model);
|
|
327176
327183
|
}
|
|
@@ -327347,13 +327354,13 @@ function hasError(response) {
|
|
|
327347
327354
|
import path19 from "node:path";
|
|
327348
327355
|
|
|
327349
327356
|
// node_modules/find-up-simple/index.js
|
|
327350
|
-
import
|
|
327357
|
+
import process9 from "node:process";
|
|
327351
327358
|
import fsPromises from "node:fs/promises";
|
|
327352
327359
|
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
327353
327360
|
import path17 from "node:path";
|
|
327354
327361
|
var toPath = (urlOrPath) => urlOrPath instanceof URL ? fileURLToPath3(urlOrPath) : urlOrPath;
|
|
327355
327362
|
async function findUp(name4, {
|
|
327356
|
-
cwd =
|
|
327363
|
+
cwd = process9.cwd(),
|
|
327357
327364
|
type: type2 = "file",
|
|
327358
327365
|
stopAt
|
|
327359
327366
|
} = {}) {
|
|
@@ -327585,7 +327592,7 @@ var __filename = fileURLToPath5(import.meta.url);
|
|
|
327585
327592
|
var __dirname3 = path20.dirname(__filename);
|
|
327586
327593
|
async function getVersion() {
|
|
327587
327594
|
const pkgJson = await getPackageJson(__dirname3);
|
|
327588
|
-
return "0.28.0
|
|
327595
|
+
return "0.28.0";
|
|
327589
327596
|
}
|
|
327590
327597
|
|
|
327591
327598
|
// packages/core/dist/src/code_assist/experiments/client_metadata.js
|
|
@@ -331009,8 +331016,8 @@ var Float64Vector = import_vector.default.Float64Vector;
|
|
|
331009
331016
|
var PointerVector = import_vector.default.PointerVector;
|
|
331010
331017
|
|
|
331011
331018
|
// packages/core/dist/src/generated/git-commit.js
|
|
331012
|
-
var GIT_COMMIT_INFO = "
|
|
331013
|
-
var CLI_VERSION = "0.28.0
|
|
331019
|
+
var GIT_COMMIT_INFO = "b7bd9ec18";
|
|
331020
|
+
var CLI_VERSION = "0.28.0";
|
|
331014
331021
|
|
|
331015
331022
|
// packages/core/dist/src/ide/detect-ide.js
|
|
331016
331023
|
var IDE_DEFINITIONS = {
|
|
@@ -332680,7 +332687,7 @@ var uiTelemetryService = new UiTelemetryService();
|
|
|
332680
332687
|
|
|
332681
332688
|
// packages/core/dist/src/telemetry/memory-monitor.js
|
|
332682
332689
|
import v8 from "node:v8";
|
|
332683
|
-
import
|
|
332690
|
+
import process10 from "node:process";
|
|
332684
332691
|
|
|
332685
332692
|
// packages/core/dist/src/utils/formatters.js
|
|
332686
332693
|
var bytesToMB = (bytes) => bytes / (1024 * 1024);
|
|
@@ -332983,7 +332990,7 @@ var MemoryMonitor = class _MemoryMonitor {
|
|
|
332983
332990
|
* Take a memory snapshot and record metrics
|
|
332984
332991
|
*/
|
|
332985
332992
|
takeSnapshot(context2, config3) {
|
|
332986
|
-
const memUsage =
|
|
332993
|
+
const memUsage = process10.memoryUsage();
|
|
332987
332994
|
const heapStats = v8.getHeapStatistics();
|
|
332988
332995
|
const snapshot = {
|
|
332989
332996
|
timestamp: Date.now(),
|
|
@@ -333019,7 +333026,7 @@ var MemoryMonitor = class _MemoryMonitor {
|
|
|
333019
333026
|
* Take a memory snapshot without recording metrics (for internal tracking)
|
|
333020
333027
|
*/
|
|
333021
333028
|
takeSnapshotWithoutRecording(_context, _config) {
|
|
333022
|
-
const memUsage =
|
|
333029
|
+
const memUsage = process10.memoryUsage();
|
|
333023
333030
|
const heapStats = v8.getHeapStatistics();
|
|
333024
333031
|
const snapshot = {
|
|
333025
333032
|
timestamp: Date.now(),
|
|
@@ -333039,7 +333046,7 @@ var MemoryMonitor = class _MemoryMonitor {
|
|
|
333039
333046
|
* Get current memory usage without recording metrics
|
|
333040
333047
|
*/
|
|
333041
333048
|
getCurrentMemoryUsage() {
|
|
333042
|
-
const memUsage =
|
|
333049
|
+
const memUsage = process10.memoryUsage();
|
|
333043
333050
|
const heapStats = v8.getHeapStatistics();
|
|
333044
333051
|
return {
|
|
333045
333052
|
timestamp: Date.now(),
|
|
@@ -333084,9 +333091,9 @@ var MemoryMonitor = class _MemoryMonitor {
|
|
|
333084
333091
|
*/
|
|
333085
333092
|
getProcessMetrics() {
|
|
333086
333093
|
return {
|
|
333087
|
-
cpuUsage:
|
|
333088
|
-
memoryUsage:
|
|
333089
|
-
uptime:
|
|
333094
|
+
cpuUsage: process10.cpuUsage(),
|
|
333095
|
+
memoryUsage: process10.memoryUsage(),
|
|
333096
|
+
uptime: process10.uptime()
|
|
333090
333097
|
};
|
|
333091
333098
|
}
|
|
333092
333099
|
/**
|
|
@@ -341271,7 +341278,7 @@ var PathScurryBase = class {
|
|
|
341271
341278
|
const dirs = /* @__PURE__ */ new Set();
|
|
341272
341279
|
const queue = [entry];
|
|
341273
341280
|
let processing = 0;
|
|
341274
|
-
const
|
|
341281
|
+
const process26 = () => {
|
|
341275
341282
|
let paused = false;
|
|
341276
341283
|
while (!paused) {
|
|
341277
341284
|
const dir = queue.shift();
|
|
@@ -341312,9 +341319,9 @@ var PathScurryBase = class {
|
|
|
341312
341319
|
}
|
|
341313
341320
|
}
|
|
341314
341321
|
if (paused && !results.flowing) {
|
|
341315
|
-
results.once("drain",
|
|
341322
|
+
results.once("drain", process26);
|
|
341316
341323
|
} else if (!sync2) {
|
|
341317
|
-
|
|
341324
|
+
process26();
|
|
341318
341325
|
}
|
|
341319
341326
|
};
|
|
341320
341327
|
let sync2 = true;
|
|
@@ -341322,7 +341329,7 @@ var PathScurryBase = class {
|
|
|
341322
341329
|
sync2 = false;
|
|
341323
341330
|
}
|
|
341324
341331
|
};
|
|
341325
|
-
|
|
341332
|
+
process26();
|
|
341326
341333
|
return results;
|
|
341327
341334
|
}
|
|
341328
341335
|
streamSync(entry = this.cwd, opts = {}) {
|
|
@@ -341340,7 +341347,7 @@ var PathScurryBase = class {
|
|
|
341340
341347
|
}
|
|
341341
341348
|
const queue = [entry];
|
|
341342
341349
|
let processing = 0;
|
|
341343
|
-
const
|
|
341350
|
+
const process26 = () => {
|
|
341344
341351
|
let paused = false;
|
|
341345
341352
|
while (!paused) {
|
|
341346
341353
|
const dir = queue.shift();
|
|
@@ -341374,9 +341381,9 @@ var PathScurryBase = class {
|
|
|
341374
341381
|
}
|
|
341375
341382
|
}
|
|
341376
341383
|
if (paused && !results.flowing)
|
|
341377
|
-
results.once("drain",
|
|
341384
|
+
results.once("drain", process26);
|
|
341378
341385
|
};
|
|
341379
|
-
|
|
341386
|
+
process26();
|
|
341380
341387
|
return results;
|
|
341381
341388
|
}
|
|
341382
341389
|
chdir(path82 = this.cwd) {
|
|
@@ -347756,9 +347763,9 @@ import { spawnSync as spawnSync2 } from "node:child_process";
|
|
|
347756
347763
|
import { debuglog } from "node:util";
|
|
347757
347764
|
|
|
347758
347765
|
// node_modules/execa/lib/utils/standard-stream.js
|
|
347759
|
-
import
|
|
347766
|
+
import process11 from "node:process";
|
|
347760
347767
|
var isStandardStream = (stream3) => STANDARD_STREAMS.includes(stream3);
|
|
347761
|
-
var STANDARD_STREAMS = [
|
|
347768
|
+
var STANDARD_STREAMS = [process11.stdin, process11.stdout, process11.stderr];
|
|
347762
347769
|
var STANDARD_STREAMS_ALIASES = ["stdin", "stdout", "stderr"];
|
|
347763
347770
|
var getStreamName = (fdNumber) => STANDARD_STREAMS_ALIASES[fdNumber] ?? `stdio[${fdNumber}]`;
|
|
347764
347771
|
|
|
@@ -347893,11 +347900,11 @@ var quoteString = (escapedArgument) => {
|
|
|
347893
347900
|
var NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
347894
347901
|
|
|
347895
347902
|
// node_modules/is-unicode-supported/index.js
|
|
347896
|
-
import
|
|
347903
|
+
import process12 from "node:process";
|
|
347897
347904
|
function isUnicodeSupported() {
|
|
347898
|
-
const { env: env2 } =
|
|
347905
|
+
const { env: env2 } = process12;
|
|
347899
347906
|
const { TERM, TERM_PROGRAM } = env2;
|
|
347900
|
-
if (
|
|
347907
|
+
if (process12.platform !== "win32") {
|
|
347901
347908
|
return TERM !== "linux";
|
|
347902
347909
|
}
|
|
347903
347910
|
return Boolean(env2.WT_SESSION) || Boolean(env2.TERMINUS_SUBLIME) || env2.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env2.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
@@ -348400,10 +348407,10 @@ var handleCommand = (filePath, rawArguments, rawOptions) => {
|
|
|
348400
348407
|
// node_modules/execa/lib/arguments/options.js
|
|
348401
348408
|
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
348402
348409
|
import path40 from "node:path";
|
|
348403
|
-
import
|
|
348410
|
+
import process15 from "node:process";
|
|
348404
348411
|
|
|
348405
348412
|
// node_modules/npm-run-path/index.js
|
|
348406
|
-
import
|
|
348413
|
+
import process13 from "node:process";
|
|
348407
348414
|
import path37 from "node:path";
|
|
348408
348415
|
|
|
348409
348416
|
// node_modules/npm-run-path/node_modules/path-key/index.js
|
|
@@ -348444,10 +348451,10 @@ var TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
|
|
|
348444
348451
|
|
|
348445
348452
|
// node_modules/npm-run-path/index.js
|
|
348446
348453
|
var npmRunPath = ({
|
|
348447
|
-
cwd =
|
|
348448
|
-
path: pathOption =
|
|
348454
|
+
cwd = process13.cwd(),
|
|
348455
|
+
path: pathOption = process13.env[pathKey()],
|
|
348449
348456
|
preferLocal = true,
|
|
348450
|
-
execPath: execPath2 =
|
|
348457
|
+
execPath: execPath2 = process13.execPath,
|
|
348451
348458
|
addExecPath = true
|
|
348452
348459
|
} = {}) => {
|
|
348453
348460
|
const cwdPath = path37.resolve(toPath3(cwd));
|
|
@@ -348475,7 +348482,7 @@ var applyExecPath = (result2, pathParts, execPath2, cwdPath) => {
|
|
|
348475
348482
|
result2.push(pathPart);
|
|
348476
348483
|
}
|
|
348477
348484
|
};
|
|
348478
|
-
var npmRunPathEnv = ({ env: env2 =
|
|
348485
|
+
var npmRunPathEnv = ({ env: env2 = process13.env, ...options } = {}) => {
|
|
348479
348486
|
env2 = { ...env2 };
|
|
348480
348487
|
const pathName = pathKey({ env: env2 });
|
|
348481
348488
|
options.path = env2[pathName];
|
|
@@ -349745,14 +349752,14 @@ var serializeEncoding = (encoding) => typeof encoding === "string" ? `"${encodin
|
|
|
349745
349752
|
// node_modules/execa/lib/arguments/cwd.js
|
|
349746
349753
|
import { statSync as statSync2 } from "node:fs";
|
|
349747
349754
|
import path39 from "node:path";
|
|
349748
|
-
import
|
|
349755
|
+
import process14 from "node:process";
|
|
349749
349756
|
var normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
349750
349757
|
const cwdString = safeNormalizeFileUrl(cwd, 'The "cwd" option');
|
|
349751
349758
|
return path39.resolve(cwdString);
|
|
349752
349759
|
};
|
|
349753
349760
|
var getDefaultCwd = () => {
|
|
349754
349761
|
try {
|
|
349755
|
-
return
|
|
349762
|
+
return process14.cwd();
|
|
349756
349763
|
} catch (error2) {
|
|
349757
349764
|
error2.message = `The current directory does not exist.
|
|
349758
349765
|
${error2.message}`;
|
|
@@ -349795,7 +349802,7 @@ var normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
349795
349802
|
options.killSignal = normalizeKillSignal(options.killSignal);
|
|
349796
349803
|
options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
|
|
349797
349804
|
options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
|
|
349798
|
-
if (
|
|
349805
|
+
if (process15.platform === "win32" && path40.basename(file, ".exe") === "cmd") {
|
|
349799
349806
|
commandArguments.unshift("/q");
|
|
349800
349807
|
}
|
|
349801
349808
|
return { file, commandArguments, options };
|
|
@@ -349836,7 +349843,7 @@ var addDefaultOptions = ({
|
|
|
349836
349843
|
serialization
|
|
349837
349844
|
});
|
|
349838
349845
|
var getEnv2 = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath: nodePath2 }) => {
|
|
349839
|
-
const env2 = extendEnv ? { ...
|
|
349846
|
+
const env2 = extendEnv ? { ...process15.env, ...envOption } : envOption;
|
|
349840
349847
|
if (preferLocal || node) {
|
|
349841
349848
|
return npmRunPathEnv({
|
|
349842
349849
|
env: env2,
|
|
@@ -351037,7 +351044,7 @@ var normalizeGenerator = ({ stdioItem, stdioItem: { value }, index, newTransform
|
|
|
351037
351044
|
var sortTransforms = (newTransforms, direction) => direction === "input" ? newTransforms.reverse() : newTransforms;
|
|
351038
351045
|
|
|
351039
351046
|
// node_modules/execa/lib/stdio/direction.js
|
|
351040
|
-
import
|
|
351047
|
+
import process16 from "node:process";
|
|
351041
351048
|
var getStreamDirection = (stdioItems, fdNumber, optionName) => {
|
|
351042
351049
|
const directions = stdioItems.map((stdioItem) => getStdioItemDirection(stdioItem, fdNumber));
|
|
351043
351050
|
if (directions.includes("input") && directions.includes("output")) {
|
|
@@ -351077,10 +351084,10 @@ var guessStreamDirection = {
|
|
|
351077
351084
|
}
|
|
351078
351085
|
};
|
|
351079
351086
|
var getStandardStreamDirection = (value) => {
|
|
351080
|
-
if ([0,
|
|
351087
|
+
if ([0, process16.stdin].includes(value)) {
|
|
351081
351088
|
return "input";
|
|
351082
351089
|
}
|
|
351083
|
-
if ([1, 2,
|
|
351090
|
+
if ([1, 2, process16.stdout, process16.stderr].includes(value)) {
|
|
351084
351091
|
return "output";
|
|
351085
351092
|
}
|
|
351086
351093
|
};
|
|
@@ -352184,7 +352191,7 @@ import { setMaxListeners } from "node:events";
|
|
|
352184
352191
|
import { spawn as spawn4 } from "node:child_process";
|
|
352185
352192
|
|
|
352186
352193
|
// node_modules/execa/lib/ipc/methods.js
|
|
352187
|
-
import
|
|
352194
|
+
import process17 from "node:process";
|
|
352188
352195
|
|
|
352189
352196
|
// node_modules/execa/lib/ipc/get-one.js
|
|
352190
352197
|
import { once as once5, on as on2 } from "node:events";
|
|
@@ -352325,9 +352332,9 @@ var addIpcMethods = (subprocess, { ipc }) => {
|
|
|
352325
352332
|
Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
|
|
352326
352333
|
};
|
|
352327
352334
|
var getIpcExport = () => {
|
|
352328
|
-
const anyProcess =
|
|
352335
|
+
const anyProcess = process17;
|
|
352329
352336
|
const isSubprocess = true;
|
|
352330
|
-
const ipc =
|
|
352337
|
+
const ipc = process17.channel !== void 0;
|
|
352331
352338
|
return {
|
|
352332
352339
|
...getIpcMethods(anyProcess, isSubprocess, ipc),
|
|
352333
352340
|
getCancelSignal: getCancelSignal.bind(void 0, {
|
|
@@ -352793,7 +352800,7 @@ if (process.platform === "linux") {
|
|
|
352793
352800
|
}
|
|
352794
352801
|
|
|
352795
352802
|
// node_modules/signal-exit/dist/mjs/index.js
|
|
352796
|
-
var processOk = (
|
|
352803
|
+
var processOk = (process26) => !!process26 && typeof process26 === "object" && typeof process26.removeListener === "function" && typeof process26.emit === "function" && typeof process26.reallyExit === "function" && typeof process26.listeners === "function" && typeof process26.kill === "function" && typeof process26.pid === "number" && typeof process26.on === "function";
|
|
352797
352804
|
var kExitEmitter = Symbol.for("signal-exit emitter");
|
|
352798
352805
|
var global2 = globalThis;
|
|
352799
352806
|
var ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
@@ -352878,7 +352885,7 @@ var SignalExit = class extends SignalExitBase {
|
|
|
352878
352885
|
// "SIGHUP" throws an `ENOSYS` error on Windows,
|
|
352879
352886
|
// so use a supported signal instead
|
|
352880
352887
|
/* c8 ignore start */
|
|
352881
|
-
#hupSig =
|
|
352888
|
+
#hupSig = process18.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
352882
352889
|
/* c8 ignore stop */
|
|
352883
352890
|
#emitter = new Emitter();
|
|
352884
352891
|
#process;
|
|
@@ -352886,15 +352893,15 @@ var SignalExit = class extends SignalExitBase {
|
|
|
352886
352893
|
#originalProcessReallyExit;
|
|
352887
352894
|
#sigListeners = {};
|
|
352888
352895
|
#loaded = false;
|
|
352889
|
-
constructor(
|
|
352896
|
+
constructor(process26) {
|
|
352890
352897
|
super();
|
|
352891
|
-
this.#process =
|
|
352898
|
+
this.#process = process26;
|
|
352892
352899
|
this.#sigListeners = {};
|
|
352893
352900
|
for (const sig of signals) {
|
|
352894
352901
|
this.#sigListeners[sig] = () => {
|
|
352895
352902
|
const listeners = this.#process.listeners(sig);
|
|
352896
352903
|
let { count: count2 } = this.#emitter;
|
|
352897
|
-
const p =
|
|
352904
|
+
const p = process26;
|
|
352898
352905
|
if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") {
|
|
352899
352906
|
count2 += p.__signal_exit_emitter__.count;
|
|
352900
352907
|
}
|
|
@@ -352903,12 +352910,12 @@ var SignalExit = class extends SignalExitBase {
|
|
|
352903
352910
|
const ret = this.#emitter.emit("exit", null, sig);
|
|
352904
352911
|
const s3 = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
352905
352912
|
if (!ret)
|
|
352906
|
-
|
|
352913
|
+
process26.kill(process26.pid, s3);
|
|
352907
352914
|
}
|
|
352908
352915
|
};
|
|
352909
352916
|
}
|
|
352910
|
-
this.#originalProcessReallyExit =
|
|
352911
|
-
this.#originalProcessEmit =
|
|
352917
|
+
this.#originalProcessReallyExit = process26.reallyExit;
|
|
352918
|
+
this.#originalProcessEmit = process26.emit;
|
|
352912
352919
|
}
|
|
352913
352920
|
onExit(cb, opts) {
|
|
352914
352921
|
if (!processOk(this.#process)) {
|
|
@@ -352989,7 +352996,7 @@ var SignalExit = class extends SignalExitBase {
|
|
|
352989
352996
|
}
|
|
352990
352997
|
}
|
|
352991
352998
|
};
|
|
352992
|
-
var
|
|
352999
|
+
var process18 = globalThis.process;
|
|
352993
353000
|
var {
|
|
352994
353001
|
/**
|
|
352995
353002
|
* Called when the process is exiting, whether via signal, explicit
|
|
@@ -353017,7 +353024,7 @@ var {
|
|
|
353017
353024
|
* @internal
|
|
353018
353025
|
*/
|
|
353019
353026
|
unload
|
|
353020
|
-
} = signalExitWrap(processOk(
|
|
353027
|
+
} = signalExitWrap(processOk(process18) ? new SignalExit(process18) : new SignalExitFallback());
|
|
353021
353028
|
|
|
353022
353029
|
// node_modules/execa/lib/terminate/cleanup.js
|
|
353023
353030
|
var cleanupOnExit = (subprocess, { cleanup, detached }, { signal }) => {
|
|
@@ -355824,7 +355831,7 @@ var AbortError2 = class extends RequestError2 {
|
|
|
355824
355831
|
};
|
|
355825
355832
|
|
|
355826
355833
|
// node_modules/got/dist/source/core/index.js
|
|
355827
|
-
import
|
|
355834
|
+
import process20 from "node:process";
|
|
355828
355835
|
import { Buffer as Buffer10 } from "node:buffer";
|
|
355829
355836
|
import { Duplex as Duplex4 } from "node:stream";
|
|
355830
355837
|
import http6, { ServerResponse } from "node:http";
|
|
@@ -357102,7 +357109,7 @@ var calculateRetryDelay = ({ attemptCount, retryOptions, error: error2, retryAft
|
|
|
357102
357109
|
var calculate_retry_delay_default = calculateRetryDelay;
|
|
357103
357110
|
|
|
357104
357111
|
// node_modules/got/dist/source/core/options.js
|
|
357105
|
-
import
|
|
357112
|
+
import process19 from "node:process";
|
|
357106
357113
|
import { promisify as promisify11, inspect as inspect3 } from "node:util";
|
|
357107
357114
|
import { checkServerIdentity } from "node:tls";
|
|
357108
357115
|
import https3 from "node:https";
|
|
@@ -357500,7 +357507,7 @@ function parseLinkHeader(link) {
|
|
|
357500
357507
|
}
|
|
357501
357508
|
|
|
357502
357509
|
// node_modules/got/dist/source/core/options.js
|
|
357503
|
-
var [major2, minor] =
|
|
357510
|
+
var [major2, minor] = process19.versions.node.split(".").map(Number);
|
|
357504
357511
|
function validateSearchParameters(searchParameters) {
|
|
357505
357512
|
for (const key in searchParameters) {
|
|
357506
357513
|
const value = searchParameters[key];
|
|
@@ -359112,7 +359119,7 @@ function isUnixSocketURL(url5) {
|
|
|
359112
359119
|
}
|
|
359113
359120
|
|
|
359114
359121
|
// node_modules/got/dist/source/core/index.js
|
|
359115
|
-
var supportsBrotli = distribution_default.string(
|
|
359122
|
+
var supportsBrotli = distribution_default.string(process20.versions.brotli);
|
|
359116
359123
|
var methodsWithoutBody = /* @__PURE__ */ new Set(["GET", "HEAD"]);
|
|
359117
359124
|
var cacheableStore = new WeakableMap();
|
|
359118
359125
|
var redirectCodes = /* @__PURE__ */ new Set([300, 301, 302, 303, 304, 307, 308]);
|
|
@@ -359342,7 +359349,7 @@ var Request2 = class _Request extends Duplex4 {
|
|
|
359342
359349
|
this.emit("retry", this.retryCount + 1, error2, (updatedOptions) => {
|
|
359343
359350
|
const request3 = new _Request(options.url, updatedOptions, options);
|
|
359344
359351
|
request3.retryCount = this.retryCount + 1;
|
|
359345
|
-
|
|
359352
|
+
process20.nextTick(() => {
|
|
359346
359353
|
void request3.flush();
|
|
359347
359354
|
});
|
|
359348
359355
|
return request3;
|
|
@@ -371766,7 +371773,7 @@ var StreamableHTTPClientTransport = class {
|
|
|
371766
371773
|
|
|
371767
371774
|
// node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js
|
|
371768
371775
|
var import_cross_spawn2 = __toESM(require_cross_spawn(), 1);
|
|
371769
|
-
import
|
|
371776
|
+
import process21 from "node:process";
|
|
371770
371777
|
import { PassThrough as PassThrough5 } from "node:stream";
|
|
371771
371778
|
|
|
371772
371779
|
// node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
|
|
@@ -371798,7 +371805,7 @@ function serializeMessage(message) {
|
|
|
371798
371805
|
}
|
|
371799
371806
|
|
|
371800
371807
|
// node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js
|
|
371801
|
-
var DEFAULT_INHERITED_ENV_VARS =
|
|
371808
|
+
var DEFAULT_INHERITED_ENV_VARS = process21.platform === "win32" ? [
|
|
371802
371809
|
"APPDATA",
|
|
371803
371810
|
"HOMEDRIVE",
|
|
371804
371811
|
"HOMEPATH",
|
|
@@ -371818,7 +371825,7 @@ var DEFAULT_INHERITED_ENV_VARS = process20.platform === "win32" ? [
|
|
|
371818
371825
|
function getDefaultEnvironment() {
|
|
371819
371826
|
const env2 = {};
|
|
371820
371827
|
for (const key of DEFAULT_INHERITED_ENV_VARS) {
|
|
371821
|
-
const value =
|
|
371828
|
+
const value = process21.env[key];
|
|
371822
371829
|
if (value === void 0) {
|
|
371823
371830
|
continue;
|
|
371824
371831
|
}
|
|
@@ -371854,7 +371861,7 @@ var StdioClientTransport = class {
|
|
|
371854
371861
|
},
|
|
371855
371862
|
stdio: ["pipe", "pipe", this._serverParams.stderr ?? "inherit"],
|
|
371856
371863
|
shell: false,
|
|
371857
|
-
windowsHide:
|
|
371864
|
+
windowsHide: process21.platform === "win32" && isElectron(),
|
|
371858
371865
|
cwd: this._serverParams.cwd
|
|
371859
371866
|
});
|
|
371860
371867
|
this._process.on("error", (error2) => {
|
|
@@ -371962,7 +371969,7 @@ var StdioClientTransport = class {
|
|
|
371962
371969
|
}
|
|
371963
371970
|
};
|
|
371964
371971
|
function isElectron() {
|
|
371965
|
-
return "type" in
|
|
371972
|
+
return "type" in process21;
|
|
371966
371973
|
}
|
|
371967
371974
|
|
|
371968
371975
|
// packages/core/dist/src/ide/ide-client.js
|
|
@@ -374375,7 +374382,7 @@ function detectEncodingFromBuffer(buffer) {
|
|
|
374375
374382
|
}
|
|
374376
374383
|
|
|
374377
374384
|
// packages/core/dist/src/services/shellExecutionService.js
|
|
374378
|
-
var
|
|
374385
|
+
var import_headless2 = __toESM(require_xterm_headless(), 1);
|
|
374379
374386
|
|
|
374380
374387
|
// packages/core/dist/src/utils/terminalSerializer.js
|
|
374381
374388
|
var Attribute;
|
|
@@ -374990,7 +374997,7 @@ async function killProcessGroup(options) {
|
|
|
374990
374997
|
}
|
|
374991
374998
|
|
|
374992
374999
|
// packages/core/dist/src/services/shellExecutionService.js
|
|
374993
|
-
var { Terminal } =
|
|
375000
|
+
var { Terminal } = import_headless2.default;
|
|
374994
375001
|
var MAX_CHILD_PROCESS_BUFFER_SIZE = 16 * 1024 * 1024;
|
|
374995
375002
|
var SCROLLBACK_LIMIT = 3e5;
|
|
374996
375003
|
var BASH_SHOPT_OPTIONS = "promptvars nullglob extglob nocaseglob dotglob";
|
|
@@ -381276,10 +381283,10 @@ function compile$1(options = {}) {
|
|
|
381276
381283
|
}
|
|
381277
381284
|
);
|
|
381278
381285
|
return function(html, metadata2 = void 0) {
|
|
381279
|
-
return
|
|
381286
|
+
return process22(html, metadata2, options, picker, findBaseElements, limitedWalk);
|
|
381280
381287
|
};
|
|
381281
381288
|
}
|
|
381282
|
-
function
|
|
381289
|
+
function process22(html, metadata2, options, picker, findBaseElements, walk) {
|
|
381283
381290
|
const maxInputLength = options.limits.maxInputLength;
|
|
381284
381291
|
if (maxInputLength && html && html.length > maxInputLength) {
|
|
381285
381292
|
console.warn(
|
|
@@ -385454,7 +385461,7 @@ init_paths();
|
|
|
385454
385461
|
init_types2();
|
|
385455
385462
|
import fs50 from "node:fs";
|
|
385456
385463
|
import path60 from "node:path";
|
|
385457
|
-
import
|
|
385464
|
+
import process24 from "node:process";
|
|
385458
385465
|
|
|
385459
385466
|
// packages/core/dist/src/prompts/snippets.js
|
|
385460
385467
|
init_tool_names();
|
|
@@ -385886,7 +385893,7 @@ The structure MUST be as follows:
|
|
|
385886
385893
|
init_paths();
|
|
385887
385894
|
init_debugLogger();
|
|
385888
385895
|
import path59 from "node:path";
|
|
385889
|
-
import
|
|
385896
|
+
import process23 from "node:process";
|
|
385890
385897
|
function resolvePathFromEnv(envVar) {
|
|
385891
385898
|
const trimmedEnvVar = envVar?.trim();
|
|
385892
385899
|
if (!trimmedEnvVar) {
|
|
@@ -385932,7 +385939,7 @@ function applySubstitutions(prompt, config3, skillsPrompt) {
|
|
|
385932
385939
|
return result2;
|
|
385933
385940
|
}
|
|
385934
385941
|
function isSectionEnabled(key) {
|
|
385935
|
-
const envVar =
|
|
385942
|
+
const envVar = process23.env[`GEMINI_PROMPT_${key.toUpperCase()}`];
|
|
385936
385943
|
const lowerEnvVar = envVar?.trim().toLowerCase();
|
|
385937
385944
|
return lowerEnvVar !== "0" && lowerEnvVar !== "false";
|
|
385938
385945
|
}
|
|
@@ -386080,7 +386087,7 @@ var PromptProvider = class {
|
|
|
386080
386087
|
* Generates the core system prompt.
|
|
386081
386088
|
*/
|
|
386082
386089
|
getCoreSystemPrompt(config3, userMemory, interactiveOverride) {
|
|
386083
|
-
const systemMdResolution = resolvePathFromEnv(
|
|
386090
|
+
const systemMdResolution = resolvePathFromEnv(process24.env["GEMINI_SYSTEM_MD"]);
|
|
386084
386091
|
const interactiveMode = interactiveOverride ?? config3.isInteractive();
|
|
386085
386092
|
const approvalMode = config3.getApprovalMode?.() ?? ApprovalMode.DEFAULT;
|
|
386086
386093
|
const isPlanMode = approvalMode === ApprovalMode.PLAN;
|
|
@@ -386136,7 +386143,7 @@ var PromptProvider = class {
|
|
|
386136
386143
|
enableShellEfficiency: config3.getEnableShellOutputEfficiency()
|
|
386137
386144
|
})),
|
|
386138
386145
|
sandbox: this.withSection("sandbox", () => getSandboxMode()),
|
|
386139
|
-
gitRepo: this.withSection("git", () => ({ interactive: interactiveMode }), isGitRepository(
|
|
386146
|
+
gitRepo: this.withSection("git", () => ({ interactive: interactiveMode }), isGitRepository(process24.cwd()) ? true : false),
|
|
386140
386147
|
finalReminder: this.withSection("finalReminder", () => ({
|
|
386141
386148
|
readFileToolName: READ_FILE_TOOL_NAME
|
|
386142
386149
|
}))
|
|
@@ -386155,7 +386162,7 @@ var PromptProvider = class {
|
|
|
386155
386162
|
return guard && isSectionEnabled(key) ? factory() : void 0;
|
|
386156
386163
|
}
|
|
386157
386164
|
maybeWriteSystemMd(basePrompt, resolution, defaultPath) {
|
|
386158
|
-
const writeSystemMdResolution = resolvePathFromEnv(
|
|
386165
|
+
const writeSystemMdResolution = resolvePathFromEnv(process24.env["GEMINI_WRITE_SYSTEM_MD"]);
|
|
386159
386166
|
if (writeSystemMdResolution.value && !writeSystemMdResolution.isDisabled) {
|
|
386160
386167
|
const writePath = writeSystemMdResolution.isSwitch ? defaultPath : writeSystemMdResolution.value;
|
|
386161
386168
|
fs50.mkdirSync(path60.dirname(writePath), { recursive: true });
|
|
@@ -386164,9 +386171,9 @@ var PromptProvider = class {
|
|
|
386164
386171
|
}
|
|
386165
386172
|
};
|
|
386166
386173
|
function getSandboxMode() {
|
|
386167
|
-
if (
|
|
386174
|
+
if (process24.env["SANDBOX"] === "sandbox-exec")
|
|
386168
386175
|
return "macos-seatbelt";
|
|
386169
|
-
if (
|
|
386176
|
+
if (process24.env["SANDBOX"])
|
|
386170
386177
|
return "generic";
|
|
386171
386178
|
return "outside";
|
|
386172
386179
|
}
|
|
@@ -392564,8 +392571,7 @@ var ClassifierStrategy = class {
|
|
|
392564
392571
|
async route(context2, config3, baseLlmClient) {
|
|
392565
392572
|
const startTime = Date.now();
|
|
392566
392573
|
try {
|
|
392567
|
-
|
|
392568
|
-
if (await config3.getNumericalRoutingEnabled() && isGemini3Model(model, config3.getPreviewFeatures())) {
|
|
392574
|
+
if (await config3.getNumericalRoutingEnabled()) {
|
|
392569
392575
|
return null;
|
|
392570
392576
|
}
|
|
392571
392577
|
const promptId = getPromptIdWithFallback("classifier-router");
|
|
@@ -392583,7 +392589,7 @@ var ClassifierStrategy = class {
|
|
|
392583
392589
|
const routerResponse = ClassifierResponseSchema.parse(jsonResponse);
|
|
392584
392590
|
const reasoning = routerResponse.reasoning;
|
|
392585
392591
|
const latencyMs = Date.now() - startTime;
|
|
392586
|
-
const selectedModel = resolveClassifierModel(
|
|
392592
|
+
const selectedModel = resolveClassifierModel(context2.requestedModel ?? config3.getModel(), routerResponse.model_choice, config3.getPreviewFeatures());
|
|
392587
392593
|
return {
|
|
392588
392594
|
model: selectedModel,
|
|
392589
392595
|
metadata: {
|
|
@@ -392687,13 +392693,9 @@ var NumericalClassifierStrategy = class {
|
|
|
392687
392693
|
async route(context2, config3, baseLlmClient) {
|
|
392688
392694
|
const startTime = Date.now();
|
|
392689
392695
|
try {
|
|
392690
|
-
const model = context2.requestedModel ?? config3.getModel();
|
|
392691
392696
|
if (!await config3.getNumericalRoutingEnabled()) {
|
|
392692
392697
|
return null;
|
|
392693
392698
|
}
|
|
392694
|
-
if (!isGemini3Model(model, config3.getPreviewFeatures())) {
|
|
392695
|
-
return null;
|
|
392696
|
-
}
|
|
392697
392699
|
const promptId = getPromptIdWithFallback("classifier-router");
|
|
392698
392700
|
const finalHistory = context2.history.slice(-HISTORY_TURNS_FOR_CONTEXT2);
|
|
392699
392701
|
const requestParts = Array.isArray(context2.request) ? context2.request : [context2.request];
|
|
@@ -392717,7 +392719,7 @@ var NumericalClassifierStrategy = class {
|
|
|
392717
392719
|
const routerResponse = ClassifierResponseSchema2.parse(jsonResponse);
|
|
392718
392720
|
const score = routerResponse.complexity_score;
|
|
392719
392721
|
const { threshold, groupLabel, modelAlias } = await this.getRoutingDecision(score, config3, config3.getSessionId() || "unknown-session");
|
|
392720
|
-
const selectedModel = resolveClassifierModel(
|
|
392722
|
+
const selectedModel = resolveClassifierModel(config3.getModel(), modelAlias, config3.getPreviewFeatures());
|
|
392721
392723
|
const latencyMs = Date.now() - startTime;
|
|
392722
392724
|
return {
|
|
392723
392725
|
model: selectedModel,
|
|
@@ -405965,7 +405967,7 @@ var Config = class {
|
|
|
405965
405967
|
};
|
|
405966
405968
|
this.checkpointing = params.checkpointing ?? false;
|
|
405967
405969
|
this.proxy = params.proxy;
|
|
405968
|
-
this.cwd = params.cwd ??
|
|
405970
|
+
this.cwd = params.cwd ?? process25.cwd();
|
|
405969
405971
|
this.fileDiscoveryService = params.fileDiscoveryService ?? null;
|
|
405970
405972
|
this.bugCommand = params.bugCommand;
|
|
405971
405973
|
this.model = params.model;
|
|
@@ -406317,7 +406319,7 @@ var Config = class {
|
|
|
406317
406319
|
}
|
|
406318
406320
|
isRestrictiveSandbox() {
|
|
406319
406321
|
const sandboxConfig = this.getSandbox();
|
|
406320
|
-
const seatbeltProfile =
|
|
406322
|
+
const seatbeltProfile = process25.env["SEATBELT_PROFILE"];
|
|
406321
406323
|
return !!sandboxConfig && sandboxConfig.command === "sandbox-exec" && !!seatbeltProfile && seatbeltProfile.startsWith("restrictive-");
|
|
406322
406324
|
}
|
|
406323
406325
|
getTargetDir() {
|