@probelabs/probe 0.6.0-rc195 → 0.6.0-rc197
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/bin/binaries/probe-v0.6.0-rc197-aarch64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc197-aarch64-unknown-linux-musl.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc197-x86_64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc197-x86_64-pc-windows-msvc.zip +0 -0
- package/bin/binaries/probe-v0.6.0-rc197-x86_64-unknown-linux-musl.tar.gz +0 -0
- package/build/agent/ProbeAgent.js +6 -2
- package/build/agent/index.js +132 -97
- package/build/tools/bash.js +9 -3
- package/build/tools/common.js +71 -4
- package/build/tools/index.js +4 -2
- package/build/tools/vercel.js +28 -19
- package/cjs/agent/ProbeAgent.cjs +324 -250
- package/cjs/index.cjs +329 -253
- package/package.json +1 -1
- package/src/agent/ProbeAgent.js +6 -2
- package/src/tools/bash.js +9 -3
- package/src/tools/common.js +71 -4
- package/src/tools/index.js +4 -2
- package/src/tools/vercel.js +28 -19
- package/bin/binaries/probe-v0.6.0-rc195-aarch64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc195-aarch64-unknown-linux-musl.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc195-x86_64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc195-x86_64-pc-windows-msvc.zip +0 -0
- package/bin/binaries/probe-v0.6.0-rc195-x86_64-unknown-linux-musl.tar.gz +0 -0
package/cjs/agent/ProbeAgent.cjs
CHANGED
|
@@ -2329,7 +2329,7 @@ var require_headStream = __commonJS({
|
|
|
2329
2329
|
if ((0, stream_type_check_1.isReadableStream)(stream2)) {
|
|
2330
2330
|
return (0, headStream_browser_1.headStream)(stream2, bytes);
|
|
2331
2331
|
}
|
|
2332
|
-
return new Promise((
|
|
2332
|
+
return new Promise((resolve6, reject2) => {
|
|
2333
2333
|
const collector = new Collector();
|
|
2334
2334
|
collector.limit = bytes;
|
|
2335
2335
|
stream2.pipe(collector);
|
|
@@ -2340,7 +2340,7 @@ var require_headStream = __commonJS({
|
|
|
2340
2340
|
collector.on("error", reject2);
|
|
2341
2341
|
collector.on("finish", function() {
|
|
2342
2342
|
const bytes2 = new Uint8Array(Buffer.concat(this.buffers));
|
|
2343
|
-
|
|
2343
|
+
resolve6(bytes2);
|
|
2344
2344
|
});
|
|
2345
2345
|
});
|
|
2346
2346
|
};
|
|
@@ -2528,21 +2528,21 @@ var require_dist_cjs15 = __commonJS({
|
|
|
2528
2528
|
let sendBody = true;
|
|
2529
2529
|
if (!externalAgent && expect === "100-continue") {
|
|
2530
2530
|
sendBody = await Promise.race([
|
|
2531
|
-
new Promise((
|
|
2532
|
-
timeoutId = Number(timing.setTimeout(() =>
|
|
2531
|
+
new Promise((resolve6) => {
|
|
2532
|
+
timeoutId = Number(timing.setTimeout(() => resolve6(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));
|
|
2533
2533
|
}),
|
|
2534
|
-
new Promise((
|
|
2534
|
+
new Promise((resolve6) => {
|
|
2535
2535
|
httpRequest.on("continue", () => {
|
|
2536
2536
|
timing.clearTimeout(timeoutId);
|
|
2537
|
-
|
|
2537
|
+
resolve6(true);
|
|
2538
2538
|
});
|
|
2539
2539
|
httpRequest.on("response", () => {
|
|
2540
2540
|
timing.clearTimeout(timeoutId);
|
|
2541
|
-
|
|
2541
|
+
resolve6(false);
|
|
2542
2542
|
});
|
|
2543
2543
|
httpRequest.on("error", () => {
|
|
2544
2544
|
timing.clearTimeout(timeoutId);
|
|
2545
|
-
|
|
2545
|
+
resolve6(false);
|
|
2546
2546
|
});
|
|
2547
2547
|
})
|
|
2548
2548
|
]);
|
|
@@ -2608,13 +2608,13 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
2608
2608
|
return socketWarningTimestamp;
|
|
2609
2609
|
}
|
|
2610
2610
|
constructor(options) {
|
|
2611
|
-
this.configProvider = new Promise((
|
|
2611
|
+
this.configProvider = new Promise((resolve6, reject2) => {
|
|
2612
2612
|
if (typeof options === "function") {
|
|
2613
2613
|
options().then((_options) => {
|
|
2614
|
-
|
|
2614
|
+
resolve6(this.resolveDefaultConfig(_options));
|
|
2615
2615
|
}).catch(reject2);
|
|
2616
2616
|
} else {
|
|
2617
|
-
|
|
2617
|
+
resolve6(this.resolveDefaultConfig(options));
|
|
2618
2618
|
}
|
|
2619
2619
|
});
|
|
2620
2620
|
}
|
|
@@ -2657,7 +2657,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
2657
2657
|
const config = this.config;
|
|
2658
2658
|
let writeRequestBodyPromise = void 0;
|
|
2659
2659
|
const timeouts = [];
|
|
2660
|
-
const
|
|
2660
|
+
const resolve6 = async (arg) => {
|
|
2661
2661
|
await writeRequestBodyPromise;
|
|
2662
2662
|
timeouts.forEach(timing.clearTimeout);
|
|
2663
2663
|
_resolve(arg);
|
|
@@ -2723,7 +2723,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
2723
2723
|
headers: getTransformedHeaders(res.headers),
|
|
2724
2724
|
body: res
|
|
2725
2725
|
});
|
|
2726
|
-
|
|
2726
|
+
resolve6({ response: httpResponse });
|
|
2727
2727
|
});
|
|
2728
2728
|
req.on("error", (err) => {
|
|
2729
2729
|
if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) {
|
|
@@ -2903,13 +2903,13 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
2903
2903
|
return new _NodeHttp2Handler(instanceOrOptions);
|
|
2904
2904
|
}
|
|
2905
2905
|
constructor(options) {
|
|
2906
|
-
this.configProvider = new Promise((
|
|
2906
|
+
this.configProvider = new Promise((resolve6, reject2) => {
|
|
2907
2907
|
if (typeof options === "function") {
|
|
2908
2908
|
options().then((opts) => {
|
|
2909
|
-
|
|
2909
|
+
resolve6(opts || {});
|
|
2910
2910
|
}).catch(reject2);
|
|
2911
2911
|
} else {
|
|
2912
|
-
|
|
2912
|
+
resolve6(options || {});
|
|
2913
2913
|
}
|
|
2914
2914
|
});
|
|
2915
2915
|
}
|
|
@@ -2929,7 +2929,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
2929
2929
|
return new Promise((_resolve, _reject) => {
|
|
2930
2930
|
let fulfilled = false;
|
|
2931
2931
|
let writeRequestBodyPromise = void 0;
|
|
2932
|
-
const
|
|
2932
|
+
const resolve6 = async (arg) => {
|
|
2933
2933
|
await writeRequestBodyPromise;
|
|
2934
2934
|
_resolve(arg);
|
|
2935
2935
|
};
|
|
@@ -2985,7 +2985,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
2985
2985
|
body: req
|
|
2986
2986
|
});
|
|
2987
2987
|
fulfilled = true;
|
|
2988
|
-
|
|
2988
|
+
resolve6({ response: httpResponse });
|
|
2989
2989
|
if (disableConcurrentStreams) {
|
|
2990
2990
|
session.close();
|
|
2991
2991
|
this.connectionManager.deleteSession(authority, session);
|
|
@@ -3062,7 +3062,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
3062
3062
|
if (isReadableStreamInstance(stream3)) {
|
|
3063
3063
|
return collectReadableStream(stream3);
|
|
3064
3064
|
}
|
|
3065
|
-
return new Promise((
|
|
3065
|
+
return new Promise((resolve6, reject2) => {
|
|
3066
3066
|
const collector = new Collector();
|
|
3067
3067
|
stream3.pipe(collector);
|
|
3068
3068
|
stream3.on("error", (err) => {
|
|
@@ -3072,7 +3072,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
3072
3072
|
collector.on("error", reject2);
|
|
3073
3073
|
collector.on("finish", function() {
|
|
3074
3074
|
const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes));
|
|
3075
|
-
|
|
3075
|
+
resolve6(bytes);
|
|
3076
3076
|
});
|
|
3077
3077
|
});
|
|
3078
3078
|
};
|
|
@@ -3116,7 +3116,7 @@ var require_dist_cjs16 = __commonJS({
|
|
|
3116
3116
|
return new Request(url, requestOptions);
|
|
3117
3117
|
}
|
|
3118
3118
|
function requestTimeout(timeoutInMs = 0) {
|
|
3119
|
-
return new Promise((
|
|
3119
|
+
return new Promise((resolve6, reject2) => {
|
|
3120
3120
|
if (timeoutInMs) {
|
|
3121
3121
|
setTimeout(() => {
|
|
3122
3122
|
const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`);
|
|
@@ -3234,7 +3234,7 @@ var require_dist_cjs16 = __commonJS({
|
|
|
3234
3234
|
requestTimeout(requestTimeoutInMs)
|
|
3235
3235
|
];
|
|
3236
3236
|
if (abortSignal) {
|
|
3237
|
-
raceOfPromises.push(new Promise((
|
|
3237
|
+
raceOfPromises.push(new Promise((resolve6, reject2) => {
|
|
3238
3238
|
const onAbort = () => {
|
|
3239
3239
|
const abortError = new Error("Request aborted");
|
|
3240
3240
|
abortError.name = "AbortError";
|
|
@@ -3298,7 +3298,7 @@ var require_dist_cjs16 = __commonJS({
|
|
|
3298
3298
|
return collected;
|
|
3299
3299
|
}
|
|
3300
3300
|
function readToBase64(blob) {
|
|
3301
|
-
return new Promise((
|
|
3301
|
+
return new Promise((resolve6, reject2) => {
|
|
3302
3302
|
const reader = new FileReader();
|
|
3303
3303
|
reader.onloadend = () => {
|
|
3304
3304
|
if (reader.readyState !== 2) {
|
|
@@ -3307,7 +3307,7 @@ var require_dist_cjs16 = __commonJS({
|
|
|
3307
3307
|
const result = reader.result ?? "";
|
|
3308
3308
|
const commaIndex = result.indexOf(",");
|
|
3309
3309
|
const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length;
|
|
3310
|
-
|
|
3310
|
+
resolve6(result.substring(dataOffset));
|
|
3311
3311
|
};
|
|
3312
3312
|
reader.onabort = () => reject2(new Error("Read aborted"));
|
|
3313
3313
|
reader.onerror = () => reject2(reader.error);
|
|
@@ -3986,11 +3986,14 @@ function member(memberSchema, memberName) {
|
|
|
3986
3986
|
const internalCtorAccess = NormalizedSchema;
|
|
3987
3987
|
return new internalCtorAccess(memberSchema, memberName);
|
|
3988
3988
|
}
|
|
3989
|
-
var NormalizedSchema, isMemberSchema, isStaticSchema;
|
|
3989
|
+
var anno, NormalizedSchema, isMemberSchema, isStaticSchema;
|
|
3990
3990
|
var init_NormalizedSchema = __esm({
|
|
3991
3991
|
"node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js"() {
|
|
3992
3992
|
init_deref();
|
|
3993
3993
|
init_translateTraits();
|
|
3994
|
+
anno = {
|
|
3995
|
+
it: Symbol.for("@smithy/nor-struct-it")
|
|
3996
|
+
};
|
|
3994
3997
|
NormalizedSchema = class _NormalizedSchema {
|
|
3995
3998
|
ref;
|
|
3996
3999
|
memberName;
|
|
@@ -4136,9 +4139,7 @@ var init_NormalizedSchema = __esm({
|
|
|
4136
4139
|
return !!streaming || this.getSchema() === 42;
|
|
4137
4140
|
}
|
|
4138
4141
|
isIdempotencyToken() {
|
|
4139
|
-
|
|
4140
|
-
const { normalizedTraits, traits, memberTraits } = this;
|
|
4141
|
-
return match2(normalizedTraits) || match2(traits) || match2(memberTraits);
|
|
4142
|
+
return !!this.getMergedTraits().idempotencyToken;
|
|
4142
4143
|
}
|
|
4143
4144
|
getMergedTraits() {
|
|
4144
4145
|
return this.normalizedTraits ?? (this.normalizedTraits = {
|
|
@@ -4210,9 +4211,19 @@ var init_NormalizedSchema = __esm({
|
|
|
4210
4211
|
throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");
|
|
4211
4212
|
}
|
|
4212
4213
|
const struct2 = this.getSchema();
|
|
4213
|
-
|
|
4214
|
-
|
|
4214
|
+
const z2 = struct2[4].length;
|
|
4215
|
+
let it = struct2[anno.it];
|
|
4216
|
+
if (it && z2 === it.length) {
|
|
4217
|
+
yield* it;
|
|
4218
|
+
return;
|
|
4219
|
+
}
|
|
4220
|
+
it = Array(z2);
|
|
4221
|
+
for (let i4 = 0; i4 < z2; ++i4) {
|
|
4222
|
+
const k4 = struct2[4][i4];
|
|
4223
|
+
const v4 = member([struct2[5][i4], 0], k4);
|
|
4224
|
+
yield it[i4] = [k4, v4];
|
|
4215
4225
|
}
|
|
4226
|
+
struct2[anno.it] = it;
|
|
4216
4227
|
}
|
|
4217
4228
|
};
|
|
4218
4229
|
isMemberSchema = (sc) => Array.isArray(sc) && sc.length === 2;
|
|
@@ -4939,11 +4950,11 @@ function __metadata(metadataKey, metadataValue) {
|
|
|
4939
4950
|
}
|
|
4940
4951
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
4941
4952
|
function adopt(value) {
|
|
4942
|
-
return value instanceof P ? value : new P(function(
|
|
4943
|
-
|
|
4953
|
+
return value instanceof P ? value : new P(function(resolve6) {
|
|
4954
|
+
resolve6(value);
|
|
4944
4955
|
});
|
|
4945
4956
|
}
|
|
4946
|
-
return new (P || (P = Promise))(function(
|
|
4957
|
+
return new (P || (P = Promise))(function(resolve6, reject2) {
|
|
4947
4958
|
function fulfilled(value) {
|
|
4948
4959
|
try {
|
|
4949
4960
|
step(generator.next(value));
|
|
@@ -4959,7 +4970,7 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
4959
4970
|
}
|
|
4960
4971
|
}
|
|
4961
4972
|
function step(result) {
|
|
4962
|
-
result.done ?
|
|
4973
|
+
result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
4963
4974
|
}
|
|
4964
4975
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
4965
4976
|
});
|
|
@@ -5150,14 +5161,14 @@ function __asyncValues(o4) {
|
|
|
5150
5161
|
}, i4);
|
|
5151
5162
|
function verb(n4) {
|
|
5152
5163
|
i4[n4] = o4[n4] && function(v4) {
|
|
5153
|
-
return new Promise(function(
|
|
5154
|
-
v4 = o4[n4](v4), settle(
|
|
5164
|
+
return new Promise(function(resolve6, reject2) {
|
|
5165
|
+
v4 = o4[n4](v4), settle(resolve6, reject2, v4.done, v4.value);
|
|
5155
5166
|
});
|
|
5156
5167
|
};
|
|
5157
5168
|
}
|
|
5158
|
-
function settle(
|
|
5169
|
+
function settle(resolve6, reject2, d4, v4) {
|
|
5159
5170
|
Promise.resolve(v4).then(function(v5) {
|
|
5160
|
-
|
|
5171
|
+
resolve6({ value: v5, done: d4 });
|
|
5161
5172
|
}, reject2);
|
|
5162
5173
|
}
|
|
5163
5174
|
}
|
|
@@ -6145,7 +6156,9 @@ var init_HttpBindingProtocol = __esm({
|
|
|
6145
6156
|
const inputMemberValue = input[memberName];
|
|
6146
6157
|
if (inputMemberValue == null && !memberNs.isIdempotencyToken()) {
|
|
6147
6158
|
if (memberTraits.httpLabel) {
|
|
6148
|
-
|
|
6159
|
+
if (request.path.includes(`{${memberName}+}`) || request.path.includes(`{${memberName}}`)) {
|
|
6160
|
+
throw new Error(`No value provided for input HTTP label: ${memberName}.`);
|
|
6161
|
+
}
|
|
6149
6162
|
}
|
|
6150
6163
|
continue;
|
|
6151
6164
|
}
|
|
@@ -15627,7 +15640,7 @@ var require_dist_cjs37 = __commonJS({
|
|
|
15627
15640
|
this.sockets[url] = (this.sockets[url] ?? []).filter((socket) => ![WebSocket.CLOSING, WebSocket.CLOSED].includes(socket.readyState));
|
|
15628
15641
|
}
|
|
15629
15642
|
waitForReady(socket, connectionTimeout) {
|
|
15630
|
-
return new Promise((
|
|
15643
|
+
return new Promise((resolve6, reject2) => {
|
|
15631
15644
|
const timeout = setTimeout(() => {
|
|
15632
15645
|
this.removeNotUsableSockets(socket.url);
|
|
15633
15646
|
reject2({
|
|
@@ -15638,7 +15651,7 @@ var require_dist_cjs37 = __commonJS({
|
|
|
15638
15651
|
}, connectionTimeout);
|
|
15639
15652
|
socket.onopen = () => {
|
|
15640
15653
|
clearTimeout(timeout);
|
|
15641
|
-
|
|
15654
|
+
resolve6();
|
|
15642
15655
|
};
|
|
15643
15656
|
});
|
|
15644
15657
|
}
|
|
@@ -15647,10 +15660,10 @@ var require_dist_cjs37 = __commonJS({
|
|
|
15647
15660
|
let socketErrorOccurred = false;
|
|
15648
15661
|
let reject2 = () => {
|
|
15649
15662
|
};
|
|
15650
|
-
let
|
|
15663
|
+
let resolve6 = () => {
|
|
15651
15664
|
};
|
|
15652
15665
|
socket.onmessage = (event) => {
|
|
15653
|
-
|
|
15666
|
+
resolve6({
|
|
15654
15667
|
done: false,
|
|
15655
15668
|
value: new Uint8Array(event.data)
|
|
15656
15669
|
});
|
|
@@ -15667,7 +15680,7 @@ var require_dist_cjs37 = __commonJS({
|
|
|
15667
15680
|
if (streamError) {
|
|
15668
15681
|
reject2(streamError);
|
|
15669
15682
|
} else {
|
|
15670
|
-
|
|
15683
|
+
resolve6({
|
|
15671
15684
|
done: true,
|
|
15672
15685
|
value: void 0
|
|
15673
15686
|
});
|
|
@@ -15677,7 +15690,7 @@ var require_dist_cjs37 = __commonJS({
|
|
|
15677
15690
|
[Symbol.asyncIterator]: () => ({
|
|
15678
15691
|
next: () => {
|
|
15679
15692
|
return new Promise((_resolve, _reject) => {
|
|
15680
|
-
|
|
15693
|
+
resolve6 = _resolve;
|
|
15681
15694
|
reject2 = _reject;
|
|
15682
15695
|
});
|
|
15683
15696
|
}
|
|
@@ -16715,7 +16728,7 @@ var require_dist_cjs46 = __commonJS({
|
|
|
16715
16728
|
this.refillTokenBucket();
|
|
16716
16729
|
if (amount > this.currentCapacity) {
|
|
16717
16730
|
const delay = (amount - this.currentCapacity) / this.fillRate * 1e3;
|
|
16718
|
-
await new Promise((
|
|
16731
|
+
await new Promise((resolve6) => _DefaultRateLimiter.setTimeoutFn(resolve6, delay));
|
|
16719
16732
|
}
|
|
16720
16733
|
this.currentCapacity = this.currentCapacity - amount;
|
|
16721
16734
|
}
|
|
@@ -17050,7 +17063,7 @@ var require_dist_cjs47 = __commonJS({
|
|
|
17050
17063
|
const delayFromResponse = getDelayFromRetryAfterHeader(err.$response);
|
|
17051
17064
|
const delay = Math.max(delayFromResponse || 0, delayFromDecider);
|
|
17052
17065
|
totalDelay += delay;
|
|
17053
|
-
await new Promise((
|
|
17066
|
+
await new Promise((resolve6) => setTimeout(resolve6, delay));
|
|
17054
17067
|
continue;
|
|
17055
17068
|
}
|
|
17056
17069
|
if (!err.$metadata) {
|
|
@@ -17208,7 +17221,7 @@ var require_dist_cjs47 = __commonJS({
|
|
|
17208
17221
|
attempts = retryToken.getRetryCount();
|
|
17209
17222
|
const delay = retryToken.getRetryDelay();
|
|
17210
17223
|
totalRetryDelay += delay;
|
|
17211
|
-
await new Promise((
|
|
17224
|
+
await new Promise((resolve6) => setTimeout(resolve6, delay));
|
|
17212
17225
|
}
|
|
17213
17226
|
}
|
|
17214
17227
|
} else {
|
|
@@ -17360,7 +17373,7 @@ var require_package2 = __commonJS({
|
|
|
17360
17373
|
module2.exports = {
|
|
17361
17374
|
name: "@aws-sdk/client-bedrock-runtime",
|
|
17362
17375
|
description: "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
|
|
17363
|
-
version: "3.
|
|
17376
|
+
version: "3.972.0",
|
|
17364
17377
|
scripts: {
|
|
17365
17378
|
build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
17366
17379
|
"build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime",
|
|
@@ -17368,7 +17381,7 @@ var require_package2 = __commonJS({
|
|
|
17368
17381
|
"build:include:deps": 'yarn g:turbo run build -F="$npm_package_name"',
|
|
17369
17382
|
"build:types": "tsc -p tsconfig.types.json",
|
|
17370
17383
|
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
|
17371
|
-
clean: "
|
|
17384
|
+
clean: "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
|
|
17372
17385
|
"extract:docs": "api-extractor run --local",
|
|
17373
17386
|
"generate:client": "node ../../scripts/generate-clients/single-service --solo bedrock-runtime",
|
|
17374
17387
|
"test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs"
|
|
@@ -17380,21 +17393,21 @@ var require_package2 = __commonJS({
|
|
|
17380
17393
|
dependencies: {
|
|
17381
17394
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
17382
17395
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
17383
|
-
"@aws-sdk/core": "3.
|
|
17384
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
17385
|
-
"@aws-sdk/eventstream-handler-node": "3.
|
|
17386
|
-
"@aws-sdk/middleware-eventstream": "3.
|
|
17387
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
17388
|
-
"@aws-sdk/middleware-logger": "3.
|
|
17389
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
17390
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
17391
|
-
"@aws-sdk/middleware-websocket": "3.
|
|
17392
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
17393
|
-
"@aws-sdk/token-providers": "3.
|
|
17394
|
-
"@aws-sdk/types": "3.
|
|
17395
|
-
"@aws-sdk/util-endpoints": "3.
|
|
17396
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
17397
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
17396
|
+
"@aws-sdk/core": "3.972.0",
|
|
17397
|
+
"@aws-sdk/credential-provider-node": "3.972.0",
|
|
17398
|
+
"@aws-sdk/eventstream-handler-node": "3.972.0",
|
|
17399
|
+
"@aws-sdk/middleware-eventstream": "3.972.0",
|
|
17400
|
+
"@aws-sdk/middleware-host-header": "3.972.0",
|
|
17401
|
+
"@aws-sdk/middleware-logger": "3.972.0",
|
|
17402
|
+
"@aws-sdk/middleware-recursion-detection": "3.972.0",
|
|
17403
|
+
"@aws-sdk/middleware-user-agent": "3.972.0",
|
|
17404
|
+
"@aws-sdk/middleware-websocket": "3.972.0",
|
|
17405
|
+
"@aws-sdk/region-config-resolver": "3.972.0",
|
|
17406
|
+
"@aws-sdk/token-providers": "3.972.0",
|
|
17407
|
+
"@aws-sdk/types": "3.972.0",
|
|
17408
|
+
"@aws-sdk/util-endpoints": "3.972.0",
|
|
17409
|
+
"@aws-sdk/util-user-agent-browser": "3.972.0",
|
|
17410
|
+
"@aws-sdk/util-user-agent-node": "3.972.0",
|
|
17398
17411
|
"@smithy/config-resolver": "^4.4.6",
|
|
17399
17412
|
"@smithy/core": "^3.20.6",
|
|
17400
17413
|
"@smithy/eventstream-serde-browser": "^4.2.8",
|
|
@@ -17431,7 +17444,7 @@ var require_package2 = __commonJS({
|
|
|
17431
17444
|
"@types/node": "^20.14.8",
|
|
17432
17445
|
concurrently: "7.0.0",
|
|
17433
17446
|
"downlevel-dts": "0.10.1",
|
|
17434
|
-
|
|
17447
|
+
premove: "4.0.0",
|
|
17435
17448
|
typescript: "~5.8.3"
|
|
17436
17449
|
},
|
|
17437
17450
|
engines: {
|
|
@@ -17523,7 +17536,7 @@ var require_dist_cjs49 = __commonJS({
|
|
|
17523
17536
|
var nodeConfigProvider = require_dist_cjs43();
|
|
17524
17537
|
var urlParser = require_dist_cjs22();
|
|
17525
17538
|
function httpRequest(options) {
|
|
17526
|
-
return new Promise((
|
|
17539
|
+
return new Promise((resolve6, reject2) => {
|
|
17527
17540
|
const req = http.request({
|
|
17528
17541
|
method: "GET",
|
|
17529
17542
|
...options,
|
|
@@ -17548,7 +17561,7 @@ var require_dist_cjs49 = __commonJS({
|
|
|
17548
17561
|
chunks.push(chunk);
|
|
17549
17562
|
});
|
|
17550
17563
|
res.on("end", () => {
|
|
17551
|
-
|
|
17564
|
+
resolve6(buffer.Buffer.concat(chunks));
|
|
17552
17565
|
req.destroy();
|
|
17553
17566
|
});
|
|
17554
17567
|
});
|
|
@@ -17968,7 +17981,7 @@ var require_retry_wrapper = __commonJS({
|
|
|
17968
17981
|
try {
|
|
17969
17982
|
return await toRetry();
|
|
17970
17983
|
} catch (e4) {
|
|
17971
|
-
await new Promise((
|
|
17984
|
+
await new Promise((resolve6) => setTimeout(resolve6, delayMs));
|
|
17972
17985
|
}
|
|
17973
17986
|
}
|
|
17974
17987
|
return await toRetry();
|
|
@@ -18141,7 +18154,7 @@ var init_package = __esm({
|
|
|
18141
18154
|
"node_modules/@aws-sdk/nested-clients/package.json"() {
|
|
18142
18155
|
package_default = {
|
|
18143
18156
|
name: "@aws-sdk/nested-clients",
|
|
18144
|
-
version: "3.
|
|
18157
|
+
version: "3.972.0",
|
|
18145
18158
|
description: "Nested clients for AWS SDK packages.",
|
|
18146
18159
|
main: "./dist-cjs/index.js",
|
|
18147
18160
|
module: "./dist-es/index.js",
|
|
@@ -18153,7 +18166,7 @@ var init_package = __esm({
|
|
|
18153
18166
|
"build:include:deps": 'yarn g:turbo run build -F="$npm_package_name"',
|
|
18154
18167
|
"build:types": "tsc -p tsconfig.types.json",
|
|
18155
18168
|
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
|
18156
|
-
clean: "
|
|
18169
|
+
clean: "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
|
|
18157
18170
|
lint: "node ../../scripts/validation/submodules-linter.js --pkg nested-clients",
|
|
18158
18171
|
test: "yarn g:vitest run",
|
|
18159
18172
|
"test:watch": "yarn g:vitest watch"
|
|
@@ -18170,16 +18183,16 @@ var init_package = __esm({
|
|
|
18170
18183
|
dependencies: {
|
|
18171
18184
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
18172
18185
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
18173
|
-
"@aws-sdk/core": "3.
|
|
18174
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
18175
|
-
"@aws-sdk/middleware-logger": "3.
|
|
18176
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
18177
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
18178
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
18179
|
-
"@aws-sdk/types": "3.
|
|
18180
|
-
"@aws-sdk/util-endpoints": "3.
|
|
18181
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
18182
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
18186
|
+
"@aws-sdk/core": "3.972.0",
|
|
18187
|
+
"@aws-sdk/middleware-host-header": "3.972.0",
|
|
18188
|
+
"@aws-sdk/middleware-logger": "3.972.0",
|
|
18189
|
+
"@aws-sdk/middleware-recursion-detection": "3.972.0",
|
|
18190
|
+
"@aws-sdk/middleware-user-agent": "3.972.0",
|
|
18191
|
+
"@aws-sdk/region-config-resolver": "3.972.0",
|
|
18192
|
+
"@aws-sdk/types": "3.972.0",
|
|
18193
|
+
"@aws-sdk/util-endpoints": "3.972.0",
|
|
18194
|
+
"@aws-sdk/util-user-agent-browser": "3.972.0",
|
|
18195
|
+
"@aws-sdk/util-user-agent-node": "3.972.0",
|
|
18183
18196
|
"@smithy/config-resolver": "^4.4.6",
|
|
18184
18197
|
"@smithy/core": "^3.20.6",
|
|
18185
18198
|
"@smithy/fetch-http-handler": "^5.3.9",
|
|
@@ -18210,7 +18223,7 @@ var init_package = __esm({
|
|
|
18210
18223
|
devDependencies: {
|
|
18211
18224
|
concurrently: "7.0.0",
|
|
18212
18225
|
"downlevel-dts": "0.10.1",
|
|
18213
|
-
|
|
18226
|
+
premove: "4.0.0",
|
|
18214
18227
|
typescript: "~5.8.3"
|
|
18215
18228
|
},
|
|
18216
18229
|
typesVersions: {
|
|
@@ -19523,7 +19536,7 @@ var require_package3 = __commonJS({
|
|
|
19523
19536
|
module2.exports = {
|
|
19524
19537
|
name: "@aws-sdk/client-sso",
|
|
19525
19538
|
description: "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",
|
|
19526
|
-
version: "3.
|
|
19539
|
+
version: "3.972.0",
|
|
19527
19540
|
scripts: {
|
|
19528
19541
|
build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
19529
19542
|
"build:cjs": "node ../../scripts/compilation/inline client-sso",
|
|
@@ -19531,7 +19544,7 @@ var require_package3 = __commonJS({
|
|
|
19531
19544
|
"build:include:deps": 'yarn g:turbo run build -F="$npm_package_name"',
|
|
19532
19545
|
"build:types": "tsc -p tsconfig.types.json",
|
|
19533
19546
|
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
|
19534
|
-
clean: "
|
|
19547
|
+
clean: "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
|
|
19535
19548
|
"extract:docs": "api-extractor run --local",
|
|
19536
19549
|
"generate:client": "node ../../scripts/generate-clients/single-service --solo sso",
|
|
19537
19550
|
"test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs"
|
|
@@ -19543,16 +19556,16 @@ var require_package3 = __commonJS({
|
|
|
19543
19556
|
dependencies: {
|
|
19544
19557
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
19545
19558
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
19546
|
-
"@aws-sdk/core": "3.
|
|
19547
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
19548
|
-
"@aws-sdk/middleware-logger": "3.
|
|
19549
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
19550
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
19551
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
19552
|
-
"@aws-sdk/types": "3.
|
|
19553
|
-
"@aws-sdk/util-endpoints": "3.
|
|
19554
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
19555
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
19559
|
+
"@aws-sdk/core": "3.972.0",
|
|
19560
|
+
"@aws-sdk/middleware-host-header": "3.972.0",
|
|
19561
|
+
"@aws-sdk/middleware-logger": "3.972.0",
|
|
19562
|
+
"@aws-sdk/middleware-recursion-detection": "3.972.0",
|
|
19563
|
+
"@aws-sdk/middleware-user-agent": "3.972.0",
|
|
19564
|
+
"@aws-sdk/region-config-resolver": "3.972.0",
|
|
19565
|
+
"@aws-sdk/types": "3.972.0",
|
|
19566
|
+
"@aws-sdk/util-endpoints": "3.972.0",
|
|
19567
|
+
"@aws-sdk/util-user-agent-browser": "3.972.0",
|
|
19568
|
+
"@aws-sdk/util-user-agent-node": "3.972.0",
|
|
19556
19569
|
"@smithy/config-resolver": "^4.4.6",
|
|
19557
19570
|
"@smithy/core": "^3.20.6",
|
|
19558
19571
|
"@smithy/fetch-http-handler": "^5.3.9",
|
|
@@ -19585,7 +19598,7 @@ var require_package3 = __commonJS({
|
|
|
19585
19598
|
"@types/node": "^20.14.8",
|
|
19586
19599
|
concurrently: "7.0.0",
|
|
19587
19600
|
"downlevel-dts": "0.10.1",
|
|
19588
|
-
|
|
19601
|
+
premove: "4.0.0",
|
|
19589
19602
|
typescript: "~5.8.3"
|
|
19590
19603
|
},
|
|
19591
19604
|
engines: {
|
|
@@ -22994,7 +23007,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
22994
23007
|
streamEnded = true;
|
|
22995
23008
|
});
|
|
22996
23009
|
while (!generationEnded) {
|
|
22997
|
-
const value = await new Promise((
|
|
23010
|
+
const value = await new Promise((resolve6) => setTimeout(() => resolve6(records.shift()), 0));
|
|
22998
23011
|
if (value) {
|
|
22999
23012
|
yield value;
|
|
23000
23013
|
}
|
|
@@ -23529,7 +23542,9 @@ var require_dist_cjs66 = __commonJS({
|
|
|
23529
23542
|
var _CBo = "ContentBlock";
|
|
23530
23543
|
var _CC = "CitationsConfig";
|
|
23531
23544
|
var _CCB = "CitationsContentBlock";
|
|
23532
|
-
var _CD = "
|
|
23545
|
+
var _CD = "CacheDetail";
|
|
23546
|
+
var _CDL = "CacheDetailsList";
|
|
23547
|
+
var _CDi = "CitationsDelta";
|
|
23533
23548
|
var _CE = "ConflictException";
|
|
23534
23549
|
var _CGC = "CitationGeneratedContent";
|
|
23535
23550
|
var _CGCL = "CitationGeneratedContentList";
|
|
@@ -23748,6 +23763,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
23748
23763
|
var _cBS = "contentBlockStart";
|
|
23749
23764
|
var _cBSo = "contentBlockStop";
|
|
23750
23765
|
var _cC = "citationsContent";
|
|
23766
|
+
var _cD = "cacheDetails";
|
|
23751
23767
|
var _cFS = "claimsFalseScenario";
|
|
23752
23768
|
var _cGP = "contextualGroundingPolicy";
|
|
23753
23769
|
var _cGPU = "contextualGroundingPolicyUnits";
|
|
@@ -23909,7 +23925,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
23909
23925
|
var _str = "stream";
|
|
23910
23926
|
var _stre = "streaming";
|
|
23911
23927
|
var _sy = "system";
|
|
23912
|
-
var _t = "
|
|
23928
|
+
var _t = "ttl";
|
|
23913
23929
|
var _tA = "translationAmbiguous";
|
|
23914
23930
|
var _tC = "toolConfig";
|
|
23915
23931
|
var _tCe = "textCharacters";
|
|
@@ -23936,6 +23952,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
23936
23952
|
var _tr = "trace";
|
|
23937
23953
|
var _tra = "translation";
|
|
23938
23954
|
var _tran = "translations";
|
|
23955
|
+
var _ty = "type";
|
|
23939
23956
|
var _u = "usage";
|
|
23940
23957
|
var _uC = "untranslatedClaims";
|
|
23941
23958
|
var _uP = "untranslatedPremises";
|
|
@@ -24049,13 +24066,22 @@ var require_dist_cjs66 = __commonJS({
|
|
|
24049
24066
|
[_b],
|
|
24050
24067
|
[[() => PartBody, 0]]
|
|
24051
24068
|
];
|
|
24069
|
+
var CacheDetail$ = [
|
|
24070
|
+
3,
|
|
24071
|
+
n04,
|
|
24072
|
+
_CD,
|
|
24073
|
+
0,
|
|
24074
|
+
[_t, _iT3],
|
|
24075
|
+
[0, 1],
|
|
24076
|
+
2
|
|
24077
|
+
];
|
|
24052
24078
|
var CachePointBlock$ = [
|
|
24053
24079
|
3,
|
|
24054
24080
|
n04,
|
|
24055
24081
|
_CPB,
|
|
24056
24082
|
0,
|
|
24057
|
-
[_t],
|
|
24058
|
-
[0],
|
|
24083
|
+
[_ty, _t],
|
|
24084
|
+
[0, 0],
|
|
24059
24085
|
1
|
|
24060
24086
|
];
|
|
24061
24087
|
var Citation$ = [
|
|
@@ -24086,7 +24112,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
24086
24112
|
var CitationsDelta$ = [
|
|
24087
24113
|
3,
|
|
24088
24114
|
n04,
|
|
24089
|
-
|
|
24115
|
+
_CDi,
|
|
24090
24116
|
0,
|
|
24091
24117
|
[_ti, _s4, _sC, _l],
|
|
24092
24118
|
[0, 0, () => CitationSourceContentListDelta, () => CitationLocation$]
|
|
@@ -24335,7 +24361,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
24335
24361
|
n04,
|
|
24336
24362
|
_GARLW,
|
|
24337
24363
|
0,
|
|
24338
|
-
[
|
|
24364
|
+
[_ty, _p, _cl],
|
|
24339
24365
|
[0, [() => GuardrailAutomatedReasoningStatementList, 0], [() => GuardrailAutomatedReasoningStatementList, 0]]
|
|
24340
24366
|
];
|
|
24341
24367
|
var GuardrailAutomatedReasoningNoTranslationsFinding$ = [
|
|
@@ -24439,7 +24465,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
24439
24465
|
n04,
|
|
24440
24466
|
_GCF,
|
|
24441
24467
|
0,
|
|
24442
|
-
[
|
|
24468
|
+
[_ty, _conf, _a16, _fS, _de],
|
|
24443
24469
|
[0, 0, 0, 0, 2],
|
|
24444
24470
|
3
|
|
24445
24471
|
];
|
|
@@ -24457,7 +24483,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
24457
24483
|
n04,
|
|
24458
24484
|
_GCGF,
|
|
24459
24485
|
0,
|
|
24460
|
-
[
|
|
24486
|
+
[_ty, _th, _sc, _a16, _de],
|
|
24461
24487
|
[0, 1, 1, 0, 2],
|
|
24462
24488
|
4
|
|
24463
24489
|
];
|
|
@@ -24534,7 +24560,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
24534
24560
|
n04,
|
|
24535
24561
|
_GMW,
|
|
24536
24562
|
0,
|
|
24537
|
-
[_ma,
|
|
24563
|
+
[_ma, _ty, _a16, _de],
|
|
24538
24564
|
[0, 0, 0, 2],
|
|
24539
24565
|
3
|
|
24540
24566
|
];
|
|
@@ -24551,7 +24577,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
24551
24577
|
n04,
|
|
24552
24578
|
_GPEF,
|
|
24553
24579
|
0,
|
|
24554
|
-
[_ma,
|
|
24580
|
+
[_ma, _ty, _a16, _de],
|
|
24555
24581
|
[0, 0, 0, 2],
|
|
24556
24582
|
3
|
|
24557
24583
|
];
|
|
@@ -24603,7 +24629,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
24603
24629
|
n04,
|
|
24604
24630
|
_GT,
|
|
24605
24631
|
0,
|
|
24606
|
-
[_n,
|
|
24632
|
+
[_n, _ty, _a16, _de],
|
|
24607
24633
|
[0, 0, 0, 2],
|
|
24608
24634
|
3
|
|
24609
24635
|
];
|
|
@@ -24918,7 +24944,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
24918
24944
|
n04,
|
|
24919
24945
|
_ST2,
|
|
24920
24946
|
0,
|
|
24921
|
-
[
|
|
24947
|
+
[_ty],
|
|
24922
24948
|
[0],
|
|
24923
24949
|
1
|
|
24924
24950
|
];
|
|
@@ -24990,8 +25016,8 @@ var require_dist_cjs66 = __commonJS({
|
|
|
24990
25016
|
n04,
|
|
24991
25017
|
_TU,
|
|
24992
25018
|
0,
|
|
24993
|
-
[_iT3, _oT, _tT3, _cRIT, _cWIT],
|
|
24994
|
-
[1, 1, 1, 1, 1],
|
|
25019
|
+
[_iT3, _oT, _tT3, _cRIT, _cWIT, _cD],
|
|
25020
|
+
[1, 1, 1, 1, 1, () => CacheDetailsList],
|
|
24995
25021
|
3
|
|
24996
25022
|
];
|
|
24997
25023
|
var ToolConfiguration$ = [
|
|
@@ -25008,7 +25034,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
25008
25034
|
n04,
|
|
25009
25035
|
_TRB,
|
|
25010
25036
|
0,
|
|
25011
|
-
[_tUI, _co3, _st,
|
|
25037
|
+
[_tUI, _co3, _st, _ty],
|
|
25012
25038
|
[0, [() => ToolResultContentBlocks, 0], 0, 0],
|
|
25013
25039
|
2
|
|
25014
25040
|
];
|
|
@@ -25017,7 +25043,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
25017
25043
|
n04,
|
|
25018
25044
|
_TRBS,
|
|
25019
25045
|
0,
|
|
25020
|
-
[_tUI,
|
|
25046
|
+
[_tUI, _ty, _st],
|
|
25021
25047
|
[0, 0, 0],
|
|
25022
25048
|
1
|
|
25023
25049
|
];
|
|
@@ -25035,7 +25061,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
25035
25061
|
n04,
|
|
25036
25062
|
_TUB,
|
|
25037
25063
|
0,
|
|
25038
|
-
[_tUI, _n, _i,
|
|
25064
|
+
[_tUI, _n, _i, _ty],
|
|
25039
25065
|
[0, 0, 15, 0],
|
|
25040
25066
|
3
|
|
25041
25067
|
];
|
|
@@ -25053,7 +25079,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
25053
25079
|
n04,
|
|
25054
25080
|
_TUBS,
|
|
25055
25081
|
0,
|
|
25056
|
-
[_tUI, _n,
|
|
25082
|
+
[_tUI, _n, _ty],
|
|
25057
25083
|
[0, 0, 0],
|
|
25058
25084
|
2
|
|
25059
25085
|
];
|
|
@@ -25095,6 +25121,13 @@ var require_dist_cjs66 = __commonJS({
|
|
|
25095
25121
|
0
|
|
25096
25122
|
]
|
|
25097
25123
|
];
|
|
25124
|
+
var CacheDetailsList = [
|
|
25125
|
+
1,
|
|
25126
|
+
n04,
|
|
25127
|
+
_CDL,
|
|
25128
|
+
0,
|
|
25129
|
+
() => CacheDetail$
|
|
25130
|
+
];
|
|
25098
25131
|
var CitationGeneratedContentList = [
|
|
25099
25132
|
1,
|
|
25100
25133
|
n04,
|
|
@@ -25948,6 +25981,10 @@ var require_dist_cjs66 = __commonJS({
|
|
|
25948
25981
|
WEBM: "webm",
|
|
25949
25982
|
X_AAC: "x-aac"
|
|
25950
25983
|
};
|
|
25984
|
+
var CacheTTL = {
|
|
25985
|
+
FIVE_MINUTES: "5m",
|
|
25986
|
+
ONE_HOUR: "1h"
|
|
25987
|
+
};
|
|
25951
25988
|
var CachePointType = {
|
|
25952
25989
|
DEFAULT: "default"
|
|
25953
25990
|
};
|
|
@@ -26063,8 +26100,10 @@ var require_dist_cjs66 = __commonJS({
|
|
|
26063
26100
|
exports2.BedrockRuntimeServiceException$ = BedrockRuntimeServiceException$;
|
|
26064
26101
|
exports2.BidirectionalInputPayloadPart$ = BidirectionalInputPayloadPart$;
|
|
26065
26102
|
exports2.BidirectionalOutputPayloadPart$ = BidirectionalOutputPayloadPart$;
|
|
26103
|
+
exports2.CacheDetail$ = CacheDetail$;
|
|
26066
26104
|
exports2.CachePointBlock$ = CachePointBlock$;
|
|
26067
26105
|
exports2.CachePointType = CachePointType;
|
|
26106
|
+
exports2.CacheTTL = CacheTTL;
|
|
26068
26107
|
exports2.Citation$ = Citation$;
|
|
26069
26108
|
exports2.CitationGeneratedContent$ = CitationGeneratedContent$;
|
|
26070
26109
|
exports2.CitationLocation$ = CitationLocation$;
|
|
@@ -29278,7 +29317,7 @@ async function waitForFileLock(lockPath, binaryPath) {
|
|
|
29278
29317
|
}
|
|
29279
29318
|
} catch {
|
|
29280
29319
|
}
|
|
29281
|
-
await new Promise((
|
|
29320
|
+
await new Promise((resolve6) => setTimeout(resolve6, LOCK_POLL_INTERVAL_MS));
|
|
29282
29321
|
}
|
|
29283
29322
|
if (process.env.DEBUG === "1" || process.env.VERBOSE === "1") {
|
|
29284
29323
|
console.log(`Timeout waiting for file lock`);
|
|
@@ -30297,7 +30336,7 @@ Cwd: ${cwd}`;
|
|
|
30297
30336
|
}
|
|
30298
30337
|
}
|
|
30299
30338
|
function extractWithStdin(binaryPath, cliArgs, content, options, cwd) {
|
|
30300
|
-
return new Promise((
|
|
30339
|
+
return new Promise((resolve6, reject2) => {
|
|
30301
30340
|
const childProcess = (0, import_child_process4.spawn)(binaryPath, ["extract", ...cliArgs], {
|
|
30302
30341
|
stdio: ["pipe", "pipe", "pipe"],
|
|
30303
30342
|
cwd
|
|
@@ -30320,7 +30359,7 @@ function extractWithStdin(binaryPath, cliArgs, content, options, cwd) {
|
|
|
30320
30359
|
}
|
|
30321
30360
|
try {
|
|
30322
30361
|
const result = processExtractOutput(stdout, options);
|
|
30323
|
-
|
|
30362
|
+
resolve6(result);
|
|
30324
30363
|
} catch (error2) {
|
|
30325
30364
|
reject2(error2);
|
|
30326
30365
|
}
|
|
@@ -34895,13 +34934,44 @@ function parseTargets(targets) {
|
|
|
34895
34934
|
if (!targets || typeof targets !== "string") {
|
|
34896
34935
|
return [];
|
|
34897
34936
|
}
|
|
34898
|
-
return targets.split(
|
|
34937
|
+
return targets.split(/[\s,]+/).filter((f4) => f4.length > 0);
|
|
34899
34938
|
}
|
|
34900
|
-
|
|
34939
|
+
function parseAndResolvePaths(pathStr, cwd) {
|
|
34940
|
+
if (!pathStr) return [];
|
|
34941
|
+
const paths = pathStr.split(",").map((p4) => p4.trim()).filter((p4) => p4.length > 0);
|
|
34942
|
+
return paths.map((p4) => {
|
|
34943
|
+
if ((0, import_path5.isAbsolute)(p4)) {
|
|
34944
|
+
return p4;
|
|
34945
|
+
}
|
|
34946
|
+
return cwd ? (0, import_path5.resolve)(cwd, p4) : p4;
|
|
34947
|
+
});
|
|
34948
|
+
}
|
|
34949
|
+
function resolveTargetPath(target, cwd) {
|
|
34950
|
+
const searchStart = target.length > 2 && target[1] === ":" && /[a-zA-Z]/.test(target[0]) ? 2 : 0;
|
|
34951
|
+
const colonIdx = target.indexOf(":", searchStart);
|
|
34952
|
+
const hashIdx = target.indexOf("#");
|
|
34953
|
+
let filePart, suffix;
|
|
34954
|
+
if (colonIdx !== -1 && (hashIdx === -1 || colonIdx < hashIdx)) {
|
|
34955
|
+
filePart = target.substring(0, colonIdx);
|
|
34956
|
+
suffix = target.substring(colonIdx);
|
|
34957
|
+
} else if (hashIdx !== -1) {
|
|
34958
|
+
filePart = target.substring(0, hashIdx);
|
|
34959
|
+
suffix = target.substring(hashIdx);
|
|
34960
|
+
} else {
|
|
34961
|
+
filePart = target;
|
|
34962
|
+
suffix = "";
|
|
34963
|
+
}
|
|
34964
|
+
if (!(0, import_path5.isAbsolute)(filePart) && cwd) {
|
|
34965
|
+
filePart = (0, import_path5.resolve)(cwd, filePart);
|
|
34966
|
+
}
|
|
34967
|
+
return filePart + suffix;
|
|
34968
|
+
}
|
|
34969
|
+
var import_path5, searchSchema, querySchema, extractSchema, delegateSchema, bashSchema, attemptCompletionSchema, searchToolDefinition, queryToolDefinition, extractToolDefinition, delegateToolDefinition, attemptCompletionToolDefinition, bashToolDefinition, searchDescription, queryDescription, extractDescription, delegateDescription, DEFAULT_VALID_TOOLS;
|
|
34901
34970
|
var init_common2 = __esm({
|
|
34902
34971
|
"src/tools/common.js"() {
|
|
34903
34972
|
"use strict";
|
|
34904
34973
|
init_zod();
|
|
34974
|
+
import_path5 = require("path");
|
|
34905
34975
|
searchSchema = external_exports.object({
|
|
34906
34976
|
query: external_exports.string().describe("Search query with Elasticsearch syntax. Use quotes for exact matches, AND/OR for boolean logic, - for negation."),
|
|
34907
34977
|
path: external_exports.string().optional().default(".").describe('Path to search in. For dependencies use "go:github.com/owner/repo", "js:package_name", or "rust:cargo_name" etc.')
|
|
@@ -35227,13 +35297,14 @@ var init_vercel = __esm({
|
|
|
35227
35297
|
execute: async ({ query: searchQuery, path: path9, allow_tests, exact, maxTokens: paramMaxTokens, language }) => {
|
|
35228
35298
|
try {
|
|
35229
35299
|
const effectiveMaxTokens = paramMaxTokens || maxTokens;
|
|
35230
|
-
let
|
|
35231
|
-
if (
|
|
35232
|
-
|
|
35233
|
-
console.error(`Using cwd "${options.cwd}" instead of "${searchPath}"`);
|
|
35234
|
-
}
|
|
35235
|
-
searchPath = options.cwd;
|
|
35300
|
+
let searchPaths;
|
|
35301
|
+
if (path9) {
|
|
35302
|
+
searchPaths = parseAndResolvePaths(path9, options.cwd);
|
|
35236
35303
|
}
|
|
35304
|
+
if (!searchPaths || searchPaths.length === 0) {
|
|
35305
|
+
searchPaths = [options.cwd || "."];
|
|
35306
|
+
}
|
|
35307
|
+
const searchPath = searchPaths.join(" ");
|
|
35237
35308
|
if (debug) {
|
|
35238
35309
|
console.error(`Executing search with query: "${searchQuery}", path: "${searchPath}", exact: ${exact ? "true" : "false"}, language: ${language || "all"}, session: ${sessionId || "none"}`);
|
|
35239
35310
|
}
|
|
@@ -35271,13 +35342,14 @@ var init_vercel = __esm({
|
|
|
35271
35342
|
inputSchema: querySchema,
|
|
35272
35343
|
execute: async ({ pattern, path: path9, language, allow_tests }) => {
|
|
35273
35344
|
try {
|
|
35274
|
-
let
|
|
35275
|
-
if (
|
|
35276
|
-
|
|
35277
|
-
console.error(`Using cwd "${options.cwd}" instead of "${queryPath}"`);
|
|
35278
|
-
}
|
|
35279
|
-
queryPath = options.cwd;
|
|
35345
|
+
let queryPaths;
|
|
35346
|
+
if (path9) {
|
|
35347
|
+
queryPaths = parseAndResolvePaths(path9, options.cwd);
|
|
35280
35348
|
}
|
|
35349
|
+
if (!queryPaths || queryPaths.length === 0) {
|
|
35350
|
+
queryPaths = [options.cwd || "."];
|
|
35351
|
+
}
|
|
35352
|
+
const queryPath = queryPaths.join(" ");
|
|
35281
35353
|
if (debug) {
|
|
35282
35354
|
console.error(`Executing query with pattern: "${pattern}", path: "${queryPath}", language: ${language || "auto"}`);
|
|
35283
35355
|
}
|
|
@@ -35338,7 +35410,8 @@ var init_vercel = __esm({
|
|
|
35338
35410
|
format: effectiveFormat
|
|
35339
35411
|
};
|
|
35340
35412
|
} else if (targets) {
|
|
35341
|
-
const
|
|
35413
|
+
const parsedTargets = parseTargets(targets);
|
|
35414
|
+
const files = parsedTargets.map((target) => resolveTargetPath(target, effectiveCwd));
|
|
35342
35415
|
let effectiveFormat = format2;
|
|
35343
35416
|
if (outline && format2 === "outline-xml") {
|
|
35344
35417
|
effectiveFormat = "xml";
|
|
@@ -36358,7 +36431,7 @@ async function executeBashCommand(command, options = {}) {
|
|
|
36358
36431
|
} = options;
|
|
36359
36432
|
let cwd = workingDirectory;
|
|
36360
36433
|
try {
|
|
36361
|
-
cwd = (0,
|
|
36434
|
+
cwd = (0, import_path6.resolve)(cwd);
|
|
36362
36435
|
if (!(0, import_fs4.existsSync)(cwd)) {
|
|
36363
36436
|
throw new Error(`Working directory does not exist: ${cwd}`);
|
|
36364
36437
|
}
|
|
@@ -36380,7 +36453,7 @@ async function executeBashCommand(command, options = {}) {
|
|
|
36380
36453
|
console.log(`[BashExecutor] Working directory: "${cwd}"`);
|
|
36381
36454
|
console.log(`[BashExecutor] Timeout: ${timeout}ms`);
|
|
36382
36455
|
}
|
|
36383
|
-
return new Promise((
|
|
36456
|
+
return new Promise((resolve6, reject2) => {
|
|
36384
36457
|
const processEnv = {
|
|
36385
36458
|
...process.env,
|
|
36386
36459
|
...env
|
|
@@ -36397,7 +36470,7 @@ async function executeBashCommand(command, options = {}) {
|
|
|
36397
36470
|
} else {
|
|
36398
36471
|
const args = parseCommandForExecution(command);
|
|
36399
36472
|
if (!args || args.length === 0) {
|
|
36400
|
-
|
|
36473
|
+
resolve6({
|
|
36401
36474
|
success: false,
|
|
36402
36475
|
error: "Failed to parse command",
|
|
36403
36476
|
stdout: "",
|
|
@@ -36482,7 +36555,7 @@ async function executeBashCommand(command, options = {}) {
|
|
|
36482
36555
|
success = false;
|
|
36483
36556
|
error2 = `Command exited with code ${code}`;
|
|
36484
36557
|
}
|
|
36485
|
-
|
|
36558
|
+
resolve6({
|
|
36486
36559
|
success,
|
|
36487
36560
|
error: error2,
|
|
36488
36561
|
stdout: stdout.trim(),
|
|
@@ -36502,7 +36575,7 @@ async function executeBashCommand(command, options = {}) {
|
|
|
36502
36575
|
if (debug) {
|
|
36503
36576
|
console.log(`[BashExecutor] Spawn error:`, error2);
|
|
36504
36577
|
}
|
|
36505
|
-
|
|
36578
|
+
resolve6({
|
|
36506
36579
|
success: false,
|
|
36507
36580
|
error: `Failed to execute command: ${error2.message}`,
|
|
36508
36581
|
stdout: "",
|
|
@@ -36596,24 +36669,24 @@ function validateExecutionOptions(options = {}) {
|
|
|
36596
36669
|
warnings
|
|
36597
36670
|
};
|
|
36598
36671
|
}
|
|
36599
|
-
var import_child_process6,
|
|
36672
|
+
var import_child_process6, import_path6, import_fs4;
|
|
36600
36673
|
var init_bashExecutor = __esm({
|
|
36601
36674
|
"src/agent/bashExecutor.js"() {
|
|
36602
36675
|
"use strict";
|
|
36603
36676
|
import_child_process6 = require("child_process");
|
|
36604
|
-
|
|
36677
|
+
import_path6 = require("path");
|
|
36605
36678
|
import_fs4 = require("fs");
|
|
36606
36679
|
init_bashCommandUtils();
|
|
36607
36680
|
}
|
|
36608
36681
|
});
|
|
36609
36682
|
|
|
36610
36683
|
// src/tools/bash.js
|
|
36611
|
-
var import_ai2,
|
|
36684
|
+
var import_ai2, import_path7, bashTool;
|
|
36612
36685
|
var init_bash = __esm({
|
|
36613
36686
|
"src/tools/bash.js"() {
|
|
36614
36687
|
"use strict";
|
|
36615
36688
|
import_ai2 = require("ai");
|
|
36616
|
-
|
|
36689
|
+
import_path7 = require("path");
|
|
36617
36690
|
init_bashPermissions();
|
|
36618
36691
|
init_bashExecutor();
|
|
36619
36692
|
bashTool = (options = {}) => {
|
|
@@ -36721,12 +36794,13 @@ For code exploration, try these safe alternatives:
|
|
|
36721
36794
|
- git status, git log, git show for git operations
|
|
36722
36795
|
- npm list, pip list for package information`;
|
|
36723
36796
|
}
|
|
36724
|
-
const
|
|
36797
|
+
const defaultDir = getDefaultWorkingDirectory();
|
|
36798
|
+
const workingDir = workingDirectory ? (0, import_path7.isAbsolute)(workingDirectory) ? (0, import_path7.resolve)(workingDirectory) : (0, import_path7.resolve)(defaultDir, workingDirectory) : defaultDir;
|
|
36725
36799
|
if (allowedFolders && allowedFolders.length > 0) {
|
|
36726
|
-
const resolvedWorkingDir = (0,
|
|
36800
|
+
const resolvedWorkingDir = (0, import_path7.resolve)(workingDir);
|
|
36727
36801
|
const isAllowed = allowedFolders.some((folder) => {
|
|
36728
|
-
const resolvedFolder = (0,
|
|
36729
|
-
return resolvedWorkingDir.startsWith(resolvedFolder);
|
|
36802
|
+
const resolvedFolder = (0, import_path7.resolve)(folder);
|
|
36803
|
+
return resolvedWorkingDir === resolvedFolder || resolvedWorkingDir.startsWith(resolvedFolder + import_path7.sep);
|
|
36730
36804
|
});
|
|
36731
36805
|
if (!isAllowed) {
|
|
36732
36806
|
return `Error: Working directory "${workingDir}" is not within allowed folders: ${allowedFolders.join(", ")}`;
|
|
@@ -36781,14 +36855,14 @@ Command failed with exit code ${result.exitCode}`;
|
|
|
36781
36855
|
// src/tools/edit.js
|
|
36782
36856
|
function isPathAllowed(filePath, allowedFolders) {
|
|
36783
36857
|
if (!allowedFolders || allowedFolders.length === 0) {
|
|
36784
|
-
const resolvedPath3 = (0,
|
|
36785
|
-
const cwd = (0,
|
|
36786
|
-
return resolvedPath3 === cwd || resolvedPath3.startsWith(cwd +
|
|
36858
|
+
const resolvedPath3 = (0, import_path8.resolve)(filePath);
|
|
36859
|
+
const cwd = (0, import_path8.resolve)(process.cwd());
|
|
36860
|
+
return resolvedPath3 === cwd || resolvedPath3.startsWith(cwd + import_path8.sep);
|
|
36787
36861
|
}
|
|
36788
|
-
const resolvedPath2 = (0,
|
|
36862
|
+
const resolvedPath2 = (0, import_path8.resolve)(filePath);
|
|
36789
36863
|
return allowedFolders.some((folder) => {
|
|
36790
|
-
const allowedPath = (0,
|
|
36791
|
-
return resolvedPath2 === allowedPath || resolvedPath2.startsWith(allowedPath +
|
|
36864
|
+
const allowedPath = (0, import_path8.resolve)(folder);
|
|
36865
|
+
return resolvedPath2 === allowedPath || resolvedPath2.startsWith(allowedPath + import_path8.sep);
|
|
36792
36866
|
});
|
|
36793
36867
|
}
|
|
36794
36868
|
function parseFileToolOptions(options = {}) {
|
|
@@ -36798,13 +36872,13 @@ function parseFileToolOptions(options = {}) {
|
|
|
36798
36872
|
cwd: options.cwd
|
|
36799
36873
|
};
|
|
36800
36874
|
}
|
|
36801
|
-
var import_ai3, import_fs5,
|
|
36875
|
+
var import_ai3, import_fs5, import_path8, import_fs6, editTool, createTool, editDescription, createDescription, editToolDefinition, createToolDefinition;
|
|
36802
36876
|
var init_edit = __esm({
|
|
36803
36877
|
"src/tools/edit.js"() {
|
|
36804
36878
|
"use strict";
|
|
36805
36879
|
import_ai3 = require("ai");
|
|
36806
36880
|
import_fs5 = require("fs");
|
|
36807
|
-
|
|
36881
|
+
import_path8 = require("path");
|
|
36808
36882
|
import_fs6 = require("fs");
|
|
36809
36883
|
editTool = (options = {}) => {
|
|
36810
36884
|
const { debug, allowedFolders, cwd } = parseFileToolOptions(options);
|
|
@@ -36858,7 +36932,7 @@ Important:
|
|
|
36858
36932
|
if (new_string === void 0 || new_string === null || typeof new_string !== "string") {
|
|
36859
36933
|
return `Error editing file: Invalid new_string - must be a string`;
|
|
36860
36934
|
}
|
|
36861
|
-
const resolvedPath2 = (0,
|
|
36935
|
+
const resolvedPath2 = (0, import_path8.isAbsolute)(file_path) ? file_path : (0, import_path8.resolve)(cwd || process.cwd(), file_path);
|
|
36862
36936
|
if (debug) {
|
|
36863
36937
|
console.error(`[Edit] Attempting to edit file: ${resolvedPath2}`);
|
|
36864
36938
|
}
|
|
@@ -36942,7 +37016,7 @@ Important:
|
|
|
36942
37016
|
if (content === void 0 || content === null || typeof content !== "string") {
|
|
36943
37017
|
return `Error creating file: Invalid content - must be a string`;
|
|
36944
37018
|
}
|
|
36945
|
-
const resolvedPath2 = (0,
|
|
37019
|
+
const resolvedPath2 = (0, import_path8.isAbsolute)(file_path) ? file_path : (0, import_path8.resolve)(cwd || process.cwd(), file_path);
|
|
36946
37020
|
if (debug) {
|
|
36947
37021
|
console.error(`[Create] Attempting to create file: ${resolvedPath2}`);
|
|
36948
37022
|
}
|
|
@@ -36952,7 +37026,7 @@ Important:
|
|
|
36952
37026
|
if ((0, import_fs6.existsSync)(resolvedPath2) && !overwrite) {
|
|
36953
37027
|
return `Error creating file: File already exists - ${file_path}. Use overwrite: true to replace it.`;
|
|
36954
37028
|
}
|
|
36955
|
-
const dir = (0,
|
|
37029
|
+
const dir = (0, import_path8.dirname)(resolvedPath2);
|
|
36956
37030
|
await import_fs5.promises.mkdir(dir, { recursive: true });
|
|
36957
37031
|
await import_fs5.promises.writeFile(resolvedPath2, content, "utf-8");
|
|
36958
37032
|
const action = (0, import_fs6.existsSync)(resolvedPath2) && overwrite ? "overwrote" : "created";
|
|
@@ -37233,7 +37307,7 @@ async function listFilesByLevel(options) {
|
|
|
37233
37307
|
if (!import_fs7.default.existsSync(directory)) {
|
|
37234
37308
|
throw new Error(`Directory does not exist: ${directory}`);
|
|
37235
37309
|
}
|
|
37236
|
-
const gitDirExists = import_fs7.default.existsSync(
|
|
37310
|
+
const gitDirExists = import_fs7.default.existsSync(import_path9.default.join(directory, ".git"));
|
|
37237
37311
|
if (gitDirExists && respectGitignore) {
|
|
37238
37312
|
try {
|
|
37239
37313
|
return await listFilesUsingGit(directory, maxFiles);
|
|
@@ -37248,8 +37322,8 @@ async function listFilesUsingGit(directory, maxFiles) {
|
|
|
37248
37322
|
const { stdout } = await execAsync3("git ls-files", { cwd: directory });
|
|
37249
37323
|
const files = stdout.split("\n").filter(Boolean);
|
|
37250
37324
|
const sortedFiles = files.sort((a4, b4) => {
|
|
37251
|
-
const depthA = a4.split(
|
|
37252
|
-
const depthB = b4.split(
|
|
37325
|
+
const depthA = a4.split(import_path9.default.sep).length;
|
|
37326
|
+
const depthB = b4.split(import_path9.default.sep).length;
|
|
37253
37327
|
return depthA - depthB;
|
|
37254
37328
|
});
|
|
37255
37329
|
return sortedFiles.slice(0, maxFiles);
|
|
@@ -37266,23 +37340,23 @@ async function listFilesByLevelManually(directory, maxFiles, respectGitignore) {
|
|
|
37266
37340
|
try {
|
|
37267
37341
|
const entries = import_fs7.default.readdirSync(dir, { withFileTypes: true });
|
|
37268
37342
|
const files = entries.filter((entry) => {
|
|
37269
|
-
const fullPath =
|
|
37343
|
+
const fullPath = import_path9.default.join(dir, entry.name);
|
|
37270
37344
|
return getEntryTypeSync(entry, fullPath).isFile;
|
|
37271
37345
|
});
|
|
37272
37346
|
for (const file of files) {
|
|
37273
37347
|
if (result.length >= maxFiles) break;
|
|
37274
|
-
const filePath =
|
|
37275
|
-
const relativePath =
|
|
37348
|
+
const filePath = import_path9.default.join(dir, file.name);
|
|
37349
|
+
const relativePath = import_path9.default.relative(directory, filePath);
|
|
37276
37350
|
if (shouldIgnore(relativePath, ignorePatterns)) continue;
|
|
37277
37351
|
result.push(relativePath);
|
|
37278
37352
|
}
|
|
37279
37353
|
const dirs = entries.filter((entry) => {
|
|
37280
|
-
const fullPath =
|
|
37354
|
+
const fullPath = import_path9.default.join(dir, entry.name);
|
|
37281
37355
|
return getEntryTypeSync(entry, fullPath).isDirectory;
|
|
37282
37356
|
});
|
|
37283
37357
|
for (const subdir of dirs) {
|
|
37284
|
-
const subdirPath =
|
|
37285
|
-
const relativeSubdirPath =
|
|
37358
|
+
const subdirPath = import_path9.default.join(dir, subdir.name);
|
|
37359
|
+
const relativeSubdirPath = import_path9.default.relative(directory, subdirPath);
|
|
37286
37360
|
if (shouldIgnore(relativeSubdirPath, ignorePatterns)) continue;
|
|
37287
37361
|
if (subdir.name === "node_modules" || subdir.name === ".git") continue;
|
|
37288
37362
|
queue.push({ dir: subdirPath, level: level + 1 });
|
|
@@ -37294,7 +37368,7 @@ async function listFilesByLevelManually(directory, maxFiles, respectGitignore) {
|
|
|
37294
37368
|
return result;
|
|
37295
37369
|
}
|
|
37296
37370
|
function loadGitignorePatterns(directory) {
|
|
37297
|
-
const gitignorePath =
|
|
37371
|
+
const gitignorePath = import_path9.default.join(directory, ".gitignore");
|
|
37298
37372
|
if (!import_fs7.default.existsSync(gitignorePath)) {
|
|
37299
37373
|
return [];
|
|
37300
37374
|
}
|
|
@@ -37317,12 +37391,12 @@ function shouldIgnore(filePath, ignorePatterns) {
|
|
|
37317
37391
|
}
|
|
37318
37392
|
return false;
|
|
37319
37393
|
}
|
|
37320
|
-
var import_fs7,
|
|
37394
|
+
var import_fs7, import_path9, import_util11, import_child_process7, execAsync3;
|
|
37321
37395
|
var init_file_lister = __esm({
|
|
37322
37396
|
"src/utils/file-lister.js"() {
|
|
37323
37397
|
"use strict";
|
|
37324
37398
|
import_fs7 = __toESM(require("fs"), 1);
|
|
37325
|
-
|
|
37399
|
+
import_path9 = __toESM(require("path"), 1);
|
|
37326
37400
|
import_util11 = require("util");
|
|
37327
37401
|
import_child_process7 = require("child_process");
|
|
37328
37402
|
init_symlink_utils();
|
|
@@ -37331,12 +37405,12 @@ var init_file_lister = __esm({
|
|
|
37331
37405
|
});
|
|
37332
37406
|
|
|
37333
37407
|
// src/agent/simpleTelemetry.js
|
|
37334
|
-
var import_fs8,
|
|
37408
|
+
var import_fs8, import_path10;
|
|
37335
37409
|
var init_simpleTelemetry = __esm({
|
|
37336
37410
|
"src/agent/simpleTelemetry.js"() {
|
|
37337
37411
|
"use strict";
|
|
37338
37412
|
import_fs8 = require("fs");
|
|
37339
|
-
|
|
37413
|
+
import_path10 = require("path");
|
|
37340
37414
|
}
|
|
37341
37415
|
});
|
|
37342
37416
|
|
|
@@ -38185,7 +38259,7 @@ var init_escape = __esm({
|
|
|
38185
38259
|
});
|
|
38186
38260
|
|
|
38187
38261
|
// node_modules/minimatch/dist/esm/index.js
|
|
38188
|
-
var import_brace_expansion, minimatch, starDotExtRE, starDotExtTest, starDotExtTestDot, starDotExtTestNocase, starDotExtTestNocaseDot, starDotStarRE, starDotStarTest, starDotStarTestDot, dotStarRE, dotStarTest, starRE, starTest, starTestDot, qmarksRE, qmarksTestNocase, qmarksTestNocaseDot, qmarksTestDot, qmarksTest, qmarksTestNoExt, qmarksTestNoExtDot, defaultPlatform, path6,
|
|
38262
|
+
var import_brace_expansion, minimatch, starDotExtRE, starDotExtTest, starDotExtTestDot, starDotExtTestNocase, starDotExtTestNocaseDot, starDotStarRE, starDotStarTest, starDotStarTestDot, dotStarRE, dotStarTest, starRE, starTest, starTestDot, qmarksRE, qmarksTestNocase, qmarksTestNocaseDot, qmarksTestDot, qmarksTest, qmarksTestNoExt, qmarksTestNoExtDot, defaultPlatform, path6, sep3, GLOBSTAR, qmark2, star2, twoStarDot, twoStarNoDot, filter, ext, defaults, braceExpand, makeRe, match, globMagic, regExpEscape2, Minimatch;
|
|
38189
38263
|
var init_esm = __esm({
|
|
38190
38264
|
"node_modules/minimatch/dist/esm/index.js"() {
|
|
38191
38265
|
import_brace_expansion = __toESM(require_brace_expansion(), 1);
|
|
@@ -38258,8 +38332,8 @@ var init_esm = __esm({
|
|
|
38258
38332
|
win32: { sep: "\\" },
|
|
38259
38333
|
posix: { sep: "/" }
|
|
38260
38334
|
};
|
|
38261
|
-
|
|
38262
|
-
minimatch.sep =
|
|
38335
|
+
sep3 = defaultPlatform === "win32" ? path6.win32.sep : path6.posix.sep;
|
|
38336
|
+
minimatch.sep = sep3;
|
|
38263
38337
|
GLOBSTAR = Symbol("globstar **");
|
|
38264
38338
|
minimatch.GLOBSTAR = GLOBSTAR;
|
|
38265
38339
|
qmark2 = "[^/]";
|
|
@@ -41021,10 +41095,10 @@ var init_esm3 = __esm({
|
|
|
41021
41095
|
* Return a void Promise that resolves once the stream ends.
|
|
41022
41096
|
*/
|
|
41023
41097
|
async promise() {
|
|
41024
|
-
return new Promise((
|
|
41098
|
+
return new Promise((resolve6, reject2) => {
|
|
41025
41099
|
this.on(DESTROYED, () => reject2(new Error("stream destroyed")));
|
|
41026
41100
|
this.on("error", (er) => reject2(er));
|
|
41027
|
-
this.on("end", () =>
|
|
41101
|
+
this.on("end", () => resolve6());
|
|
41028
41102
|
});
|
|
41029
41103
|
}
|
|
41030
41104
|
/**
|
|
@@ -41048,7 +41122,7 @@ var init_esm3 = __esm({
|
|
|
41048
41122
|
return Promise.resolve({ done: false, value: res });
|
|
41049
41123
|
if (this[EOF])
|
|
41050
41124
|
return stop();
|
|
41051
|
-
let
|
|
41125
|
+
let resolve6;
|
|
41052
41126
|
let reject2;
|
|
41053
41127
|
const onerr = (er) => {
|
|
41054
41128
|
this.off("data", ondata);
|
|
@@ -41062,19 +41136,19 @@ var init_esm3 = __esm({
|
|
|
41062
41136
|
this.off("end", onend);
|
|
41063
41137
|
this.off(DESTROYED, ondestroy);
|
|
41064
41138
|
this.pause();
|
|
41065
|
-
|
|
41139
|
+
resolve6({ value, done: !!this[EOF] });
|
|
41066
41140
|
};
|
|
41067
41141
|
const onend = () => {
|
|
41068
41142
|
this.off("error", onerr);
|
|
41069
41143
|
this.off("data", ondata);
|
|
41070
41144
|
this.off(DESTROYED, ondestroy);
|
|
41071
41145
|
stop();
|
|
41072
|
-
|
|
41146
|
+
resolve6({ done: true, value: void 0 });
|
|
41073
41147
|
};
|
|
41074
41148
|
const ondestroy = () => onerr(new Error("stream destroyed"));
|
|
41075
41149
|
return new Promise((res2, rej) => {
|
|
41076
41150
|
reject2 = rej;
|
|
41077
|
-
|
|
41151
|
+
resolve6 = res2;
|
|
41078
41152
|
this.once(DESTROYED, ondestroy);
|
|
41079
41153
|
this.once("error", onerr);
|
|
41080
41154
|
this.once("end", onend);
|
|
@@ -42054,9 +42128,9 @@ var init_esm4 = __esm({
|
|
|
42054
42128
|
if (this.#asyncReaddirInFlight) {
|
|
42055
42129
|
await this.#asyncReaddirInFlight;
|
|
42056
42130
|
} else {
|
|
42057
|
-
let
|
|
42131
|
+
let resolve6 = () => {
|
|
42058
42132
|
};
|
|
42059
|
-
this.#asyncReaddirInFlight = new Promise((res) =>
|
|
42133
|
+
this.#asyncReaddirInFlight = new Promise((res) => resolve6 = res);
|
|
42060
42134
|
try {
|
|
42061
42135
|
for (const e4 of await this.#fs.promises.readdir(fullpath, {
|
|
42062
42136
|
withFileTypes: true
|
|
@@ -42069,7 +42143,7 @@ var init_esm4 = __esm({
|
|
|
42069
42143
|
children.provisional = 0;
|
|
42070
42144
|
}
|
|
42071
42145
|
this.#asyncReaddirInFlight = void 0;
|
|
42072
|
-
|
|
42146
|
+
resolve6();
|
|
42073
42147
|
}
|
|
42074
42148
|
return children.slice(0, children.provisional);
|
|
42075
42149
|
}
|
|
@@ -42299,7 +42373,7 @@ var init_esm4 = __esm({
|
|
|
42299
42373
|
*
|
|
42300
42374
|
* @internal
|
|
42301
42375
|
*/
|
|
42302
|
-
constructor(cwd = process.cwd(), pathImpl,
|
|
42376
|
+
constructor(cwd = process.cwd(), pathImpl, sep5, { nocase, childrenCacheSize = 16 * 1024, fs: fs10 = defaultFS } = {}) {
|
|
42303
42377
|
this.#fs = fsFromOption(fs10);
|
|
42304
42378
|
if (cwd instanceof URL || cwd.startsWith("file://")) {
|
|
42305
42379
|
cwd = (0, import_node_url.fileURLToPath)(cwd);
|
|
@@ -42310,7 +42384,7 @@ var init_esm4 = __esm({
|
|
|
42310
42384
|
this.#resolveCache = new ResolveCache();
|
|
42311
42385
|
this.#resolvePosixCache = new ResolveCache();
|
|
42312
42386
|
this.#children = new ChildrenCache(childrenCacheSize);
|
|
42313
|
-
const split = cwdPath.substring(this.rootPath.length).split(
|
|
42387
|
+
const split = cwdPath.substring(this.rootPath.length).split(sep5);
|
|
42314
42388
|
if (split.length === 1 && !split[0]) {
|
|
42315
42389
|
split.pop();
|
|
42316
42390
|
}
|
|
@@ -44097,7 +44171,7 @@ function createWrappedTools(baseTools) {
|
|
|
44097
44171
|
}
|
|
44098
44172
|
return wrappedTools;
|
|
44099
44173
|
}
|
|
44100
|
-
var import_child_process8, import_util12, import_crypto3, import_events, import_fs10, import_fs11,
|
|
44174
|
+
var import_child_process8, import_util12, import_crypto3, import_events, import_fs10, import_fs11, import_path11, toolCallEmitter, activeToolExecutions, wrapToolWithEmitter, listFilesTool, searchFilesTool, listFilesToolInstance, searchFilesToolInstance;
|
|
44101
44175
|
var init_probeTool = __esm({
|
|
44102
44176
|
"src/agent/probeTool.js"() {
|
|
44103
44177
|
"use strict";
|
|
@@ -44108,7 +44182,7 @@ var init_probeTool = __esm({
|
|
|
44108
44182
|
import_events = require("events");
|
|
44109
44183
|
import_fs10 = __toESM(require("fs"), 1);
|
|
44110
44184
|
import_fs11 = require("fs");
|
|
44111
|
-
|
|
44185
|
+
import_path11 = __toESM(require("path"), 1);
|
|
44112
44186
|
init_esm5();
|
|
44113
44187
|
init_symlink_utils();
|
|
44114
44188
|
toolCallEmitter = new import_events.EventEmitter();
|
|
@@ -44197,17 +44271,17 @@ var init_probeTool = __esm({
|
|
|
44197
44271
|
execute: async (params) => {
|
|
44198
44272
|
const { directory = ".", workingDirectory } = params;
|
|
44199
44273
|
const baseCwd = workingDirectory || process.cwd();
|
|
44200
|
-
const secureBaseDir =
|
|
44274
|
+
const secureBaseDir = import_path11.default.resolve(baseCwd);
|
|
44201
44275
|
const isDependencyPath = directory.startsWith("/dep/") || directory.startsWith("go:") || directory.startsWith("js:") || directory.startsWith("rust:");
|
|
44202
44276
|
let targetDir;
|
|
44203
|
-
if (
|
|
44204
|
-
targetDir =
|
|
44205
|
-
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir +
|
|
44277
|
+
if (import_path11.default.isAbsolute(directory)) {
|
|
44278
|
+
targetDir = import_path11.default.resolve(directory);
|
|
44279
|
+
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir + import_path11.default.sep) && targetDir !== secureBaseDir) {
|
|
44206
44280
|
throw new Error(`Path traversal attempt detected. Cannot access directory outside workspace: ${directory}`);
|
|
44207
44281
|
}
|
|
44208
44282
|
} else {
|
|
44209
|
-
targetDir =
|
|
44210
|
-
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir +
|
|
44283
|
+
targetDir = import_path11.default.resolve(secureBaseDir, directory);
|
|
44284
|
+
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir + import_path11.default.sep) && targetDir !== secureBaseDir) {
|
|
44211
44285
|
throw new Error(`Path traversal attempt detected. Access denied: ${directory}`);
|
|
44212
44286
|
}
|
|
44213
44287
|
}
|
|
@@ -44224,7 +44298,7 @@ var init_probeTool = __esm({
|
|
|
44224
44298
|
return `${(size / (1024 * 1024 * 1024)).toFixed(1)}G`;
|
|
44225
44299
|
};
|
|
44226
44300
|
const entries = await Promise.all(files.map(async (file) => {
|
|
44227
|
-
const fullPath =
|
|
44301
|
+
const fullPath = import_path11.default.join(targetDir, file.name);
|
|
44228
44302
|
const entryType = await getEntryType(file, fullPath);
|
|
44229
44303
|
return {
|
|
44230
44304
|
name: file.name,
|
|
@@ -44261,17 +44335,17 @@ var init_probeTool = __esm({
|
|
|
44261
44335
|
throw new Error("Pattern is required for file search");
|
|
44262
44336
|
}
|
|
44263
44337
|
const baseCwd = workingDirectory || process.cwd();
|
|
44264
|
-
const secureBaseDir =
|
|
44338
|
+
const secureBaseDir = import_path11.default.resolve(baseCwd);
|
|
44265
44339
|
const isDependencyPath = directory.startsWith("/dep/") || directory.startsWith("go:") || directory.startsWith("js:") || directory.startsWith("rust:");
|
|
44266
44340
|
let targetDir;
|
|
44267
|
-
if (
|
|
44268
|
-
targetDir =
|
|
44269
|
-
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir +
|
|
44341
|
+
if (import_path11.default.isAbsolute(directory)) {
|
|
44342
|
+
targetDir = import_path11.default.resolve(directory);
|
|
44343
|
+
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir + import_path11.default.sep) && targetDir !== secureBaseDir) {
|
|
44270
44344
|
throw new Error(`Path traversal attempt detected. Cannot access directory outside workspace: ${directory}`);
|
|
44271
44345
|
}
|
|
44272
44346
|
} else {
|
|
44273
|
-
targetDir =
|
|
44274
|
-
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir +
|
|
44347
|
+
targetDir = import_path11.default.resolve(secureBaseDir, directory);
|
|
44348
|
+
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir + import_path11.default.sep) && targetDir !== secureBaseDir) {
|
|
44275
44349
|
throw new Error(`Path traversal attempt detected. Access denied: ${directory}`);
|
|
44276
44350
|
}
|
|
44277
44351
|
}
|
|
@@ -44618,7 +44692,7 @@ function createMockProvider() {
|
|
|
44618
44692
|
provider: "mock",
|
|
44619
44693
|
// Mock the doGenerate method used by Vercel AI SDK
|
|
44620
44694
|
doGenerate: async ({ messages, tools: tools2 }) => {
|
|
44621
|
-
await new Promise((
|
|
44695
|
+
await new Promise((resolve6) => setTimeout(resolve6, 10));
|
|
44622
44696
|
return {
|
|
44623
44697
|
text: "This is a mock response for testing",
|
|
44624
44698
|
toolCalls: [],
|
|
@@ -70373,7 +70447,7 @@ var require_bk = __commonJS({
|
|
|
70373
70447
|
return xs;
|
|
70374
70448
|
}
|
|
70375
70449
|
function buildBlockGraph(g4, layering, root2, reverseSep) {
|
|
70376
|
-
var blockGraph = new Graph(), graphLabel = g4.graph(), sepFn =
|
|
70450
|
+
var blockGraph = new Graph(), graphLabel = g4.graph(), sepFn = sep5(graphLabel.nodesep, graphLabel.edgesep, reverseSep);
|
|
70377
70451
|
_.forEach(layering, function(layer) {
|
|
70378
70452
|
var u4;
|
|
70379
70453
|
_.forEach(layer, function(v4) {
|
|
@@ -70463,7 +70537,7 @@ var require_bk = __commonJS({
|
|
|
70463
70537
|
alignCoordinates(xss, smallestWidth);
|
|
70464
70538
|
return balance(xss, g4.graph().align);
|
|
70465
70539
|
}
|
|
70466
|
-
function
|
|
70540
|
+
function sep5(nodeSep, edgeSep, reverseSep) {
|
|
70467
70541
|
return function(g4, v4, w4) {
|
|
70468
70542
|
var vLabel = g4.node(v4);
|
|
70469
70543
|
var wLabel = g4.node(w4);
|
|
@@ -77757,7 +77831,7 @@ var require_compile = __commonJS({
|
|
|
77757
77831
|
const schOrFunc = root2.refs[ref];
|
|
77758
77832
|
if (schOrFunc)
|
|
77759
77833
|
return schOrFunc;
|
|
77760
|
-
let _sch =
|
|
77834
|
+
let _sch = resolve6.call(this, root2, ref);
|
|
77761
77835
|
if (_sch === void 0) {
|
|
77762
77836
|
const schema = (_a16 = root2.localRefs) === null || _a16 === void 0 ? void 0 : _a16[ref];
|
|
77763
77837
|
const { schemaId } = this.opts;
|
|
@@ -77784,7 +77858,7 @@ var require_compile = __commonJS({
|
|
|
77784
77858
|
function sameSchemaEnv(s1, s22) {
|
|
77785
77859
|
return s1.schema === s22.schema && s1.root === s22.root && s1.baseId === s22.baseId;
|
|
77786
77860
|
}
|
|
77787
|
-
function
|
|
77861
|
+
function resolve6(root2, ref) {
|
|
77788
77862
|
let sch;
|
|
77789
77863
|
while (typeof (sch = this.refs[ref]) == "string")
|
|
77790
77864
|
ref = sch;
|
|
@@ -78359,7 +78433,7 @@ var require_fast_uri = __commonJS({
|
|
|
78359
78433
|
}
|
|
78360
78434
|
return uri;
|
|
78361
78435
|
}
|
|
78362
|
-
function
|
|
78436
|
+
function resolve6(baseURI, relativeURI, options) {
|
|
78363
78437
|
const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
|
|
78364
78438
|
const resolved = resolveComponent(parse6(baseURI, schemelessOptions), parse6(relativeURI, schemelessOptions), schemelessOptions, true);
|
|
78365
78439
|
schemelessOptions.skipEscape = true;
|
|
@@ -78586,7 +78660,7 @@ var require_fast_uri = __commonJS({
|
|
|
78586
78660
|
var fastUri = {
|
|
78587
78661
|
SCHEMES,
|
|
78588
78662
|
normalize: normalize3,
|
|
78589
|
-
resolve:
|
|
78663
|
+
resolve: resolve6,
|
|
78590
78664
|
resolveComponent,
|
|
78591
78665
|
equal,
|
|
78592
78666
|
serialize,
|
|
@@ -82916,13 +82990,13 @@ function loadMCPConfiguration() {
|
|
|
82916
82990
|
// Environment variable path
|
|
82917
82991
|
process.env.MCP_CONFIG_PATH,
|
|
82918
82992
|
// Local project paths
|
|
82919
|
-
(0,
|
|
82920
|
-
(0,
|
|
82993
|
+
(0, import_path12.join)(process.cwd(), ".mcp", "config.json"),
|
|
82994
|
+
(0, import_path12.join)(process.cwd(), "mcp.config.json"),
|
|
82921
82995
|
// Home directory paths
|
|
82922
|
-
(0,
|
|
82923
|
-
(0,
|
|
82996
|
+
(0, import_path12.join)((0, import_os3.homedir)(), ".config", "probe", "mcp.json"),
|
|
82997
|
+
(0, import_path12.join)((0, import_os3.homedir)(), ".mcp", "config.json"),
|
|
82924
82998
|
// Claude-style config location
|
|
82925
|
-
(0,
|
|
82999
|
+
(0, import_path12.join)((0, import_os3.homedir)(), "Library", "Application Support", "Claude", "mcp_config.json")
|
|
82926
83000
|
].filter(Boolean);
|
|
82927
83001
|
let config = null;
|
|
82928
83002
|
for (const configPath of configPaths) {
|
|
@@ -83040,16 +83114,16 @@ function parseEnabledServers(config) {
|
|
|
83040
83114
|
}
|
|
83041
83115
|
return servers;
|
|
83042
83116
|
}
|
|
83043
|
-
var import_fs12,
|
|
83117
|
+
var import_fs12, import_path12, import_os3, import_url4, __filename4, __dirname4, DEFAULT_TIMEOUT, MAX_TIMEOUT, DEFAULT_CONFIG;
|
|
83044
83118
|
var init_config = __esm({
|
|
83045
83119
|
"src/agent/mcp/config.js"() {
|
|
83046
83120
|
"use strict";
|
|
83047
83121
|
import_fs12 = require("fs");
|
|
83048
|
-
|
|
83122
|
+
import_path12 = require("path");
|
|
83049
83123
|
import_os3 = require("os");
|
|
83050
83124
|
import_url4 = require("url");
|
|
83051
83125
|
__filename4 = (0, import_url4.fileURLToPath)("file:///");
|
|
83052
|
-
__dirname4 = (0,
|
|
83126
|
+
__dirname4 = (0, import_path12.dirname)(__filename4);
|
|
83053
83127
|
DEFAULT_TIMEOUT = 3e4;
|
|
83054
83128
|
MAX_TIMEOUT = 6e5;
|
|
83055
83129
|
DEFAULT_CONFIG = {
|
|
@@ -83057,7 +83131,7 @@ var init_config = __esm({
|
|
|
83057
83131
|
// Example probe server configuration
|
|
83058
83132
|
"probe-local": {
|
|
83059
83133
|
command: "node",
|
|
83060
|
-
args: [(0,
|
|
83134
|
+
args: [(0, import_path12.join)(__dirname4, "../../../examples/chat/mcpServer.js")],
|
|
83061
83135
|
transport: "stdio",
|
|
83062
83136
|
enabled: false
|
|
83063
83137
|
},
|
|
@@ -83697,7 +83771,7 @@ function extractErrorInfo(error2) {
|
|
|
83697
83771
|
};
|
|
83698
83772
|
}
|
|
83699
83773
|
function sleep(ms) {
|
|
83700
|
-
return new Promise((
|
|
83774
|
+
return new Promise((resolve6) => setTimeout(resolve6, ms));
|
|
83701
83775
|
}
|
|
83702
83776
|
var DEFAULT_RETRYABLE_ERRORS, RetryManager;
|
|
83703
83777
|
var init_RetryManager = __esm({
|
|
@@ -84531,7 +84605,7 @@ var init_built_in_server = __esm({
|
|
|
84531
84605
|
}
|
|
84532
84606
|
});
|
|
84533
84607
|
this.registerHandlers();
|
|
84534
|
-
return new Promise((
|
|
84608
|
+
return new Promise((resolve6, reject2) => {
|
|
84535
84609
|
this.httpServer.listen(this.port, this.host, async () => {
|
|
84536
84610
|
const address = this.httpServer.address();
|
|
84537
84611
|
this.port = address.port;
|
|
@@ -84541,7 +84615,7 @@ var init_built_in_server = __esm({
|
|
|
84541
84615
|
console.log(`[MCP] Messages endpoint: http://${this.host}:${this.port}/messages`);
|
|
84542
84616
|
}
|
|
84543
84617
|
this.emit("ready", { host: this.host, port: this.port });
|
|
84544
|
-
|
|
84618
|
+
resolve6({ host: this.host, port: this.port });
|
|
84545
84619
|
});
|
|
84546
84620
|
this.httpServer.on("error", reject2);
|
|
84547
84621
|
});
|
|
@@ -84760,7 +84834,7 @@ var init_built_in_server = __esm({
|
|
|
84760
84834
|
* Parse request body as JSON
|
|
84761
84835
|
*/
|
|
84762
84836
|
async parseRequestBody(req) {
|
|
84763
|
-
return new Promise((
|
|
84837
|
+
return new Promise((resolve6, reject2) => {
|
|
84764
84838
|
let body = "";
|
|
84765
84839
|
req.on("data", (chunk) => {
|
|
84766
84840
|
body += chunk.toString();
|
|
@@ -84768,7 +84842,7 @@ var init_built_in_server = __esm({
|
|
|
84768
84842
|
req.on("end", () => {
|
|
84769
84843
|
try {
|
|
84770
84844
|
const parsed = body ? JSON.parse(body) : null;
|
|
84771
|
-
|
|
84845
|
+
resolve6(parsed);
|
|
84772
84846
|
} catch (error2) {
|
|
84773
84847
|
reject2(error2);
|
|
84774
84848
|
}
|
|
@@ -85075,12 +85149,12 @@ data: ${JSON.stringify(data2)}
|
|
|
85075
85149
|
}
|
|
85076
85150
|
this.connections.clear();
|
|
85077
85151
|
if (this.httpServer) {
|
|
85078
|
-
return new Promise((
|
|
85152
|
+
return new Promise((resolve6) => {
|
|
85079
85153
|
this.httpServer.close(() => {
|
|
85080
85154
|
if (this.debug) {
|
|
85081
85155
|
console.log("[MCP] Built-in server stopped");
|
|
85082
85156
|
}
|
|
85083
|
-
|
|
85157
|
+
resolve6();
|
|
85084
85158
|
});
|
|
85085
85159
|
});
|
|
85086
85160
|
}
|
|
@@ -85179,12 +85253,12 @@ async function createEnhancedClaudeCLIEngine(options = {}) {
|
|
|
85179
85253
|
console.log("[DEBUG] Built-in MCP server started");
|
|
85180
85254
|
console.log("[DEBUG] MCP URL:", `http://${host}:${port}/mcp`);
|
|
85181
85255
|
}
|
|
85182
|
-
mcpConfigPath =
|
|
85256
|
+
mcpConfigPath = import_path13.default.join(import_os4.default.tmpdir(), `probe-mcp-${session.id}.json`);
|
|
85183
85257
|
const mcpConfig = {
|
|
85184
85258
|
mcpServers: {
|
|
85185
85259
|
probe: {
|
|
85186
85260
|
command: "node",
|
|
85187
|
-
args: [
|
|
85261
|
+
args: [import_path13.default.join(process.cwd(), "mcp-probe-server.js")],
|
|
85188
85262
|
env: {
|
|
85189
85263
|
PROBE_WORKSPACE: process.cwd(),
|
|
85190
85264
|
DEBUG: debug ? "true" : "false"
|
|
@@ -85353,8 +85427,8 @@ ${opts.schema}`;
|
|
|
85353
85427
|
break;
|
|
85354
85428
|
}
|
|
85355
85429
|
} else if (!processEnded) {
|
|
85356
|
-
await new Promise((
|
|
85357
|
-
resolver =
|
|
85430
|
+
await new Promise((resolve6) => {
|
|
85431
|
+
resolver = resolve6;
|
|
85358
85432
|
});
|
|
85359
85433
|
}
|
|
85360
85434
|
}
|
|
@@ -85553,14 +85627,14 @@ function combinePrompts(systemPrompt, customPrompt, agent) {
|
|
|
85553
85627
|
}
|
|
85554
85628
|
return systemPrompt || "";
|
|
85555
85629
|
}
|
|
85556
|
-
var import_child_process9, import_crypto6, import_promises2,
|
|
85630
|
+
var import_child_process9, import_crypto6, import_promises2, import_path13, import_os4, import_events3;
|
|
85557
85631
|
var init_enhanced_claude_code = __esm({
|
|
85558
85632
|
"src/agent/engines/enhanced-claude-code.js"() {
|
|
85559
85633
|
"use strict";
|
|
85560
85634
|
import_child_process9 = require("child_process");
|
|
85561
85635
|
import_crypto6 = require("crypto");
|
|
85562
85636
|
import_promises2 = __toESM(require("fs/promises"), 1);
|
|
85563
|
-
|
|
85637
|
+
import_path13 = __toESM(require("path"), 1);
|
|
85564
85638
|
import_os4 = __toESM(require("os"), 1);
|
|
85565
85639
|
import_events3 = require("events");
|
|
85566
85640
|
init_built_in_server();
|
|
@@ -85618,12 +85692,12 @@ async function createCodexEngine(options = {}) {
|
|
|
85618
85692
|
}
|
|
85619
85693
|
}
|
|
85620
85694
|
if (message.id !== void 0 && pendingRequests.has(message.id)) {
|
|
85621
|
-
const { resolve:
|
|
85695
|
+
const { resolve: resolve6, reject: reject2 } = pendingRequests.get(message.id);
|
|
85622
85696
|
pendingRequests.delete(message.id);
|
|
85623
85697
|
if (message.error) {
|
|
85624
85698
|
reject2(new Error(message.error.message || JSON.stringify(message.error)));
|
|
85625
85699
|
} else {
|
|
85626
|
-
|
|
85700
|
+
resolve6(message.result);
|
|
85627
85701
|
}
|
|
85628
85702
|
}
|
|
85629
85703
|
if (message.method === "codex/event" && message.params) {
|
|
@@ -85644,7 +85718,7 @@ async function createCodexEngine(options = {}) {
|
|
|
85644
85718
|
});
|
|
85645
85719
|
}
|
|
85646
85720
|
function sendRequest(method, params = {}) {
|
|
85647
|
-
return new Promise((
|
|
85721
|
+
return new Promise((resolve6, reject2) => {
|
|
85648
85722
|
const id = ++requestId;
|
|
85649
85723
|
const request = {
|
|
85650
85724
|
jsonrpc: "2.0",
|
|
@@ -85652,7 +85726,7 @@ async function createCodexEngine(options = {}) {
|
|
|
85652
85726
|
method,
|
|
85653
85727
|
params
|
|
85654
85728
|
};
|
|
85655
|
-
pendingRequests.set(id, { resolve:
|
|
85729
|
+
pendingRequests.set(id, { resolve: resolve6, reject: reject2 });
|
|
85656
85730
|
setTimeout(() => {
|
|
85657
85731
|
if (pendingRequests.has(id)) {
|
|
85658
85732
|
pendingRequests.delete(id);
|
|
@@ -85715,7 +85789,7 @@ ${prompt}`;
|
|
|
85715
85789
|
const reqId = requestId + 1;
|
|
85716
85790
|
let fullResponse = "";
|
|
85717
85791
|
let gotSessionId = false;
|
|
85718
|
-
const eventPromise = new Promise((
|
|
85792
|
+
const eventPromise = new Promise((resolve6) => {
|
|
85719
85793
|
eventHandlers.set(reqId, (eventParams) => {
|
|
85720
85794
|
const msg = eventParams.msg;
|
|
85721
85795
|
if (msg.type === "session_configured" && msg.session_id && !gotSessionId) {
|
|
@@ -85735,7 +85809,7 @@ ${prompt}`;
|
|
|
85735
85809
|
});
|
|
85736
85810
|
setTimeout(() => {
|
|
85737
85811
|
eventHandlers.delete(reqId);
|
|
85738
|
-
|
|
85812
|
+
resolve6();
|
|
85739
85813
|
}, 6e5);
|
|
85740
85814
|
});
|
|
85741
85815
|
const resultPromise = sendRequest("tools/call", {
|
|
@@ -85918,7 +85992,7 @@ __export(ProbeAgent_exports, {
|
|
|
85918
85992
|
ProbeAgent: () => ProbeAgent
|
|
85919
85993
|
});
|
|
85920
85994
|
module.exports = __toCommonJS(ProbeAgent_exports);
|
|
85921
|
-
var import_dotenv2, import_anthropic2, import_openai2, import_google2, import_ai5, import_crypto8, import_events4, import_fs13, import_promises3,
|
|
85995
|
+
var import_dotenv2, import_anthropic2, import_openai2, import_google2, import_ai5, import_crypto8, import_events4, import_fs13, import_promises3, import_path14, MAX_TOOL_ITERATIONS, MAX_HISTORY_MESSAGES, MAX_IMAGE_FILE_SIZE, ProbeAgent;
|
|
85922
85996
|
var init_ProbeAgent = __esm({
|
|
85923
85997
|
"src/agent/ProbeAgent.js"() {
|
|
85924
85998
|
import_dotenv2 = __toESM(require_main(), 1);
|
|
@@ -85931,7 +86005,7 @@ var init_ProbeAgent = __esm({
|
|
|
85931
86005
|
import_events4 = require("events");
|
|
85932
86006
|
import_fs13 = require("fs");
|
|
85933
86007
|
import_promises3 = require("fs/promises");
|
|
85934
|
-
|
|
86008
|
+
import_path14 = require("path");
|
|
85935
86009
|
init_tokenCounter();
|
|
85936
86010
|
init_InMemoryStorageAdapter();
|
|
85937
86011
|
init_HookManager();
|
|
@@ -86258,7 +86332,7 @@ var init_ProbeAgent = __esm({
|
|
|
86258
86332
|
if (!imagePath) {
|
|
86259
86333
|
throw new Error("Image path is required");
|
|
86260
86334
|
}
|
|
86261
|
-
const filename = (0,
|
|
86335
|
+
const filename = (0, import_path14.basename)(imagePath);
|
|
86262
86336
|
const extension = filename.toLowerCase().split(".").pop();
|
|
86263
86337
|
if (!extension || !SUPPORTED_IMAGE_EXTENSIONS.includes(extension)) {
|
|
86264
86338
|
throw new Error(`Invalid or unsupported image extension: ${extension}. Supported formats: ${SUPPORTED_IMAGE_EXTENSIONS.join(", ")}`);
|
|
@@ -86813,7 +86887,7 @@ var init_ProbeAgent = __esm({
|
|
|
86813
86887
|
let resolvedPath2 = imagePath;
|
|
86814
86888
|
if (!imagePath.includes("/") && !imagePath.includes("\\")) {
|
|
86815
86889
|
for (const dir of listFilesDirectories) {
|
|
86816
|
-
const potentialPath = (0,
|
|
86890
|
+
const potentialPath = (0, import_path14.resolve)(dir, imagePath);
|
|
86817
86891
|
const loaded = await this.loadImageIfValid(potentialPath);
|
|
86818
86892
|
if (loaded) {
|
|
86819
86893
|
if (this.debug) {
|
|
@@ -86838,7 +86912,7 @@ var init_ProbeAgent = __esm({
|
|
|
86838
86912
|
let match2;
|
|
86839
86913
|
while ((match2 = fileHeaderPattern.exec(content)) !== null) {
|
|
86840
86914
|
const filePath = match2[1].trim();
|
|
86841
|
-
const dir = (0,
|
|
86915
|
+
const dir = (0, import_path14.dirname)(filePath);
|
|
86842
86916
|
if (dir && dir !== ".") {
|
|
86843
86917
|
directories.push(dir);
|
|
86844
86918
|
if (this.debug) {
|
|
@@ -86883,17 +86957,17 @@ var init_ProbeAgent = __esm({
|
|
|
86883
86957
|
const allowedDirs = this.allowedFolders && this.allowedFolders.length > 0 ? this.allowedFolders : [process.cwd()];
|
|
86884
86958
|
let absolutePath;
|
|
86885
86959
|
let isPathAllowed2 = false;
|
|
86886
|
-
if ((0,
|
|
86887
|
-
absolutePath = (0,
|
|
86960
|
+
if ((0, import_path14.isAbsolute)(imagePath)) {
|
|
86961
|
+
absolutePath = (0, import_path14.normalize)((0, import_path14.resolve)(imagePath));
|
|
86888
86962
|
isPathAllowed2 = allowedDirs.some((dir) => {
|
|
86889
|
-
const normalizedDir = (0,
|
|
86890
|
-
return absolutePath === normalizedDir || absolutePath.startsWith(normalizedDir +
|
|
86963
|
+
const normalizedDir = (0, import_path14.normalize)((0, import_path14.resolve)(dir));
|
|
86964
|
+
return absolutePath === normalizedDir || absolutePath.startsWith(normalizedDir + import_path14.sep);
|
|
86891
86965
|
});
|
|
86892
86966
|
} else {
|
|
86893
86967
|
for (const dir of allowedDirs) {
|
|
86894
|
-
const normalizedDir = (0,
|
|
86895
|
-
const resolvedPath2 = (0,
|
|
86896
|
-
if (resolvedPath2 === normalizedDir || resolvedPath2.startsWith(normalizedDir +
|
|
86968
|
+
const normalizedDir = (0, import_path14.normalize)((0, import_path14.resolve)(dir));
|
|
86969
|
+
const resolvedPath2 = (0, import_path14.normalize)((0, import_path14.resolve)(dir, imagePath));
|
|
86970
|
+
if (resolvedPath2 === normalizedDir || resolvedPath2.startsWith(normalizedDir + import_path14.sep)) {
|
|
86897
86971
|
absolutePath = resolvedPath2;
|
|
86898
86972
|
isPathAllowed2 = true;
|
|
86899
86973
|
break;
|
|
@@ -87823,12 +87897,12 @@ ${toolResultContent}
|
|
|
87823
87897
|
}
|
|
87824
87898
|
} else if (this.toolImplementations[toolName]) {
|
|
87825
87899
|
try {
|
|
87826
|
-
let resolvedWorkingDirectory = this.allowedFolders && this.allowedFolders[0] || process.cwd();
|
|
87900
|
+
let resolvedWorkingDirectory = this.cwd || this.allowedFolders && this.allowedFolders[0] || process.cwd();
|
|
87827
87901
|
if (params.workingDirectory) {
|
|
87828
|
-
const requestedDir = (0,
|
|
87902
|
+
const requestedDir = (0, import_path14.isAbsolute)(params.workingDirectory) ? (0, import_path14.resolve)(params.workingDirectory) : (0, import_path14.resolve)(resolvedWorkingDirectory, params.workingDirectory);
|
|
87829
87903
|
const isWithinAllowed = !this.allowedFolders || this.allowedFolders.length === 0 || this.allowedFolders.some((folder) => {
|
|
87830
|
-
const resolvedFolder = (0,
|
|
87831
|
-
return requestedDir === resolvedFolder || requestedDir.startsWith(resolvedFolder +
|
|
87904
|
+
const resolvedFolder = (0, import_path14.resolve)(folder);
|
|
87905
|
+
return requestedDir === resolvedFolder || requestedDir.startsWith(resolvedFolder + import_path14.sep);
|
|
87832
87906
|
});
|
|
87833
87907
|
if (isWithinAllowed) {
|
|
87834
87908
|
resolvedWorkingDirectory = requestedDir;
|