@probelabs/visor 0.1.113 → 0.1.114
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/index.js +600 -513
- package/dist/output/traces/{run-2026-01-21T12-31-10-108Z.ndjson → run-2026-01-21T15-14-48-178Z.ndjson} +84 -84
- package/dist/output/traces/{run-2026-01-21T12-32-04-510Z.ndjson → run-2026-01-21T15-15-43-857Z.ndjson} +794 -794
- package/dist/traces/{run-2026-01-21T12-31-10-108Z.ndjson → run-2026-01-21T15-14-48-178Z.ndjson} +84 -84
- package/dist/traces/{run-2026-01-21T12-32-04-510Z.ndjson → run-2026-01-21T15-15-43-857Z.ndjson} +794 -794
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
process.env.VISOR_VERSION = '0.1.
|
|
3
|
-
process.env.PROBE_VERSION = '0.6.0-
|
|
4
|
-
process.env.VISOR_COMMIT_SHA = '
|
|
5
|
-
process.env.VISOR_COMMIT_SHORT = '
|
|
2
|
+
process.env.VISOR_VERSION = '0.1.114';
|
|
3
|
+
process.env.PROBE_VERSION = '0.6.0-rc199';
|
|
4
|
+
process.env.VISOR_COMMIT_SHA = '97b159dbd3f65da83b6836633f70ef7063af90b5';
|
|
5
|
+
process.env.VISOR_COMMIT_SHORT = '97b159d';
|
|
6
6
|
/******/ (() => { // webpackBootstrap
|
|
7
7
|
/******/ var __webpack_modules__ = ({
|
|
8
8
|
|
|
@@ -191312,7 +191312,7 @@ async function waitForFileLock(lockPath, binaryPath) {
|
|
|
191312
191312
|
}
|
|
191313
191313
|
} catch {
|
|
191314
191314
|
}
|
|
191315
|
-
await new Promise((
|
|
191315
|
+
await new Promise((resolve6) => setTimeout(resolve6, LOCK_POLL_INTERVAL_MS));
|
|
191316
191316
|
}
|
|
191317
191317
|
if (process.env.DEBUG === "1" || process.env.VERBOSE === "1") {
|
|
191318
191318
|
console.log(`Timeout waiting for file lock`);
|
|
@@ -192337,7 +192337,7 @@ Cwd: ${cwd}`;
|
|
|
192337
192337
|
}
|
|
192338
192338
|
}
|
|
192339
192339
|
function extractWithStdin(binaryPath, cliArgs, content, options, cwd) {
|
|
192340
|
-
return new Promise((
|
|
192340
|
+
return new Promise((resolve6, reject2) => {
|
|
192341
192341
|
const childProcess = (0, import_child_process4.spawn)(binaryPath, ["extract", ...cliArgs], {
|
|
192342
192342
|
stdio: ["pipe", "pipe", "pipe"],
|
|
192343
192343
|
cwd
|
|
@@ -192360,7 +192360,7 @@ function extractWithStdin(binaryPath, cliArgs, content, options, cwd) {
|
|
|
192360
192360
|
}
|
|
192361
192361
|
try {
|
|
192362
192362
|
const result = processExtractOutput(stdout, options);
|
|
192363
|
-
|
|
192363
|
+
resolve6(result);
|
|
192364
192364
|
} catch (error2) {
|
|
192365
192365
|
reject2(error2);
|
|
192366
192366
|
}
|
|
@@ -194448,7 +194448,7 @@ var require_headStream = __commonJS({
|
|
|
194448
194448
|
if ((0, stream_type_check_1.isReadableStream)(stream2)) {
|
|
194449
194449
|
return (0, headStream_browser_1.headStream)(stream2, bytes);
|
|
194450
194450
|
}
|
|
194451
|
-
return new Promise((
|
|
194451
|
+
return new Promise((resolve6, reject2) => {
|
|
194452
194452
|
const collector = new Collector();
|
|
194453
194453
|
collector.limit = bytes;
|
|
194454
194454
|
stream2.pipe(collector);
|
|
@@ -194459,7 +194459,7 @@ var require_headStream = __commonJS({
|
|
|
194459
194459
|
collector.on("error", reject2);
|
|
194460
194460
|
collector.on("finish", function() {
|
|
194461
194461
|
const bytes2 = new Uint8Array(Buffer.concat(this.buffers));
|
|
194462
|
-
|
|
194462
|
+
resolve6(bytes2);
|
|
194463
194463
|
});
|
|
194464
194464
|
});
|
|
194465
194465
|
};
|
|
@@ -194647,21 +194647,21 @@ var require_dist_cjs15 = __commonJS({
|
|
|
194647
194647
|
let sendBody = true;
|
|
194648
194648
|
if (!externalAgent && expect === "100-continue") {
|
|
194649
194649
|
sendBody = await Promise.race([
|
|
194650
|
-
new Promise((
|
|
194651
|
-
timeoutId = Number(timing.setTimeout(() =>
|
|
194650
|
+
new Promise((resolve6) => {
|
|
194651
|
+
timeoutId = Number(timing.setTimeout(() => resolve6(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));
|
|
194652
194652
|
}),
|
|
194653
|
-
new Promise((
|
|
194653
|
+
new Promise((resolve6) => {
|
|
194654
194654
|
httpRequest.on("continue", () => {
|
|
194655
194655
|
timing.clearTimeout(timeoutId);
|
|
194656
|
-
|
|
194656
|
+
resolve6(true);
|
|
194657
194657
|
});
|
|
194658
194658
|
httpRequest.on("response", () => {
|
|
194659
194659
|
timing.clearTimeout(timeoutId);
|
|
194660
|
-
|
|
194660
|
+
resolve6(false);
|
|
194661
194661
|
});
|
|
194662
194662
|
httpRequest.on("error", () => {
|
|
194663
194663
|
timing.clearTimeout(timeoutId);
|
|
194664
|
-
|
|
194664
|
+
resolve6(false);
|
|
194665
194665
|
});
|
|
194666
194666
|
})
|
|
194667
194667
|
]);
|
|
@@ -194727,13 +194727,13 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
194727
194727
|
return socketWarningTimestamp;
|
|
194728
194728
|
}
|
|
194729
194729
|
constructor(options) {
|
|
194730
|
-
this.configProvider = new Promise((
|
|
194730
|
+
this.configProvider = new Promise((resolve6, reject2) => {
|
|
194731
194731
|
if (typeof options === "function") {
|
|
194732
194732
|
options().then((_options) => {
|
|
194733
|
-
|
|
194733
|
+
resolve6(this.resolveDefaultConfig(_options));
|
|
194734
194734
|
}).catch(reject2);
|
|
194735
194735
|
} else {
|
|
194736
|
-
|
|
194736
|
+
resolve6(this.resolveDefaultConfig(options));
|
|
194737
194737
|
}
|
|
194738
194738
|
});
|
|
194739
194739
|
}
|
|
@@ -194776,7 +194776,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
194776
194776
|
const config = this.config;
|
|
194777
194777
|
let writeRequestBodyPromise = void 0;
|
|
194778
194778
|
const timeouts = [];
|
|
194779
|
-
const
|
|
194779
|
+
const resolve6 = async (arg) => {
|
|
194780
194780
|
await writeRequestBodyPromise;
|
|
194781
194781
|
timeouts.forEach(timing.clearTimeout);
|
|
194782
194782
|
_resolve(arg);
|
|
@@ -194842,7 +194842,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
194842
194842
|
headers: getTransformedHeaders(res.headers),
|
|
194843
194843
|
body: res
|
|
194844
194844
|
});
|
|
194845
|
-
|
|
194845
|
+
resolve6({ response: httpResponse });
|
|
194846
194846
|
});
|
|
194847
194847
|
req.on("error", (err) => {
|
|
194848
194848
|
if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) {
|
|
@@ -195022,13 +195022,13 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
195022
195022
|
return new _NodeHttp2Handler(instanceOrOptions);
|
|
195023
195023
|
}
|
|
195024
195024
|
constructor(options) {
|
|
195025
|
-
this.configProvider = new Promise((
|
|
195025
|
+
this.configProvider = new Promise((resolve6, reject2) => {
|
|
195026
195026
|
if (typeof options === "function") {
|
|
195027
195027
|
options().then((opts) => {
|
|
195028
|
-
|
|
195028
|
+
resolve6(opts || {});
|
|
195029
195029
|
}).catch(reject2);
|
|
195030
195030
|
} else {
|
|
195031
|
-
|
|
195031
|
+
resolve6(options || {});
|
|
195032
195032
|
}
|
|
195033
195033
|
});
|
|
195034
195034
|
}
|
|
@@ -195048,7 +195048,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
195048
195048
|
return new Promise((_resolve, _reject) => {
|
|
195049
195049
|
let fulfilled = false;
|
|
195050
195050
|
let writeRequestBodyPromise = void 0;
|
|
195051
|
-
const
|
|
195051
|
+
const resolve6 = async (arg) => {
|
|
195052
195052
|
await writeRequestBodyPromise;
|
|
195053
195053
|
_resolve(arg);
|
|
195054
195054
|
};
|
|
@@ -195104,7 +195104,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
195104
195104
|
body: req
|
|
195105
195105
|
});
|
|
195106
195106
|
fulfilled = true;
|
|
195107
|
-
|
|
195107
|
+
resolve6({ response: httpResponse });
|
|
195108
195108
|
if (disableConcurrentStreams) {
|
|
195109
195109
|
session.close();
|
|
195110
195110
|
this.connectionManager.deleteSession(authority, session);
|
|
@@ -195181,7 +195181,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
195181
195181
|
if (isReadableStreamInstance(stream3)) {
|
|
195182
195182
|
return collectReadableStream(stream3);
|
|
195183
195183
|
}
|
|
195184
|
-
return new Promise((
|
|
195184
|
+
return new Promise((resolve6, reject2) => {
|
|
195185
195185
|
const collector = new Collector();
|
|
195186
195186
|
stream3.pipe(collector);
|
|
195187
195187
|
stream3.on("error", (err) => {
|
|
@@ -195191,7 +195191,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
195191
195191
|
collector.on("error", reject2);
|
|
195192
195192
|
collector.on("finish", function() {
|
|
195193
195193
|
const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes));
|
|
195194
|
-
|
|
195194
|
+
resolve6(bytes);
|
|
195195
195195
|
});
|
|
195196
195196
|
});
|
|
195197
195197
|
};
|
|
@@ -195235,7 +195235,7 @@ var require_dist_cjs16 = __commonJS({
|
|
|
195235
195235
|
return new Request(url, requestOptions);
|
|
195236
195236
|
}
|
|
195237
195237
|
function requestTimeout(timeoutInMs = 0) {
|
|
195238
|
-
return new Promise((
|
|
195238
|
+
return new Promise((resolve6, reject2) => {
|
|
195239
195239
|
if (timeoutInMs) {
|
|
195240
195240
|
setTimeout(() => {
|
|
195241
195241
|
const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`);
|
|
@@ -195353,7 +195353,7 @@ var require_dist_cjs16 = __commonJS({
|
|
|
195353
195353
|
requestTimeout(requestTimeoutInMs)
|
|
195354
195354
|
];
|
|
195355
195355
|
if (abortSignal) {
|
|
195356
|
-
raceOfPromises.push(new Promise((
|
|
195356
|
+
raceOfPromises.push(new Promise((resolve6, reject2) => {
|
|
195357
195357
|
const onAbort = () => {
|
|
195358
195358
|
const abortError = new Error("Request aborted");
|
|
195359
195359
|
abortError.name = "AbortError";
|
|
@@ -195417,7 +195417,7 @@ var require_dist_cjs16 = __commonJS({
|
|
|
195417
195417
|
return collected;
|
|
195418
195418
|
}
|
|
195419
195419
|
function readToBase64(blob) {
|
|
195420
|
-
return new Promise((
|
|
195420
|
+
return new Promise((resolve6, reject2) => {
|
|
195421
195421
|
const reader = new FileReader();
|
|
195422
195422
|
reader.onloadend = () => {
|
|
195423
195423
|
if (reader.readyState !== 2) {
|
|
@@ -195426,7 +195426,7 @@ var require_dist_cjs16 = __commonJS({
|
|
|
195426
195426
|
const result = reader.result ?? "";
|
|
195427
195427
|
const commaIndex = result.indexOf(",");
|
|
195428
195428
|
const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length;
|
|
195429
|
-
|
|
195429
|
+
resolve6(result.substring(dataOffset));
|
|
195430
195430
|
};
|
|
195431
195431
|
reader.onabort = () => reject2(new Error("Read aborted"));
|
|
195432
195432
|
reader.onerror = () => reject2(reader.error);
|
|
@@ -196105,11 +196105,14 @@ function member(memberSchema, memberName) {
|
|
|
196105
196105
|
const internalCtorAccess = NormalizedSchema;
|
|
196106
196106
|
return new internalCtorAccess(memberSchema, memberName);
|
|
196107
196107
|
}
|
|
196108
|
-
var NormalizedSchema, isMemberSchema, isStaticSchema;
|
|
196108
|
+
var anno, NormalizedSchema, isMemberSchema, isStaticSchema;
|
|
196109
196109
|
var init_NormalizedSchema = __esm({
|
|
196110
196110
|
"node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js"() {
|
|
196111
196111
|
init_deref();
|
|
196112
196112
|
init_translateTraits();
|
|
196113
|
+
anno = {
|
|
196114
|
+
it: Symbol.for("@smithy/nor-struct-it")
|
|
196115
|
+
};
|
|
196113
196116
|
NormalizedSchema = class _NormalizedSchema {
|
|
196114
196117
|
ref;
|
|
196115
196118
|
memberName;
|
|
@@ -196255,9 +196258,7 @@ var init_NormalizedSchema = __esm({
|
|
|
196255
196258
|
return !!streaming || this.getSchema() === 42;
|
|
196256
196259
|
}
|
|
196257
196260
|
isIdempotencyToken() {
|
|
196258
|
-
|
|
196259
|
-
const { normalizedTraits, traits, memberTraits } = this;
|
|
196260
|
-
return match2(normalizedTraits) || match2(traits) || match2(memberTraits);
|
|
196261
|
+
return !!this.getMergedTraits().idempotencyToken;
|
|
196261
196262
|
}
|
|
196262
196263
|
getMergedTraits() {
|
|
196263
196264
|
return this.normalizedTraits ?? (this.normalizedTraits = {
|
|
@@ -196329,9 +196330,19 @@ var init_NormalizedSchema = __esm({
|
|
|
196329
196330
|
throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");
|
|
196330
196331
|
}
|
|
196331
196332
|
const struct2 = this.getSchema();
|
|
196332
|
-
|
|
196333
|
-
|
|
196333
|
+
const z2 = struct2[4].length;
|
|
196334
|
+
let it = struct2[anno.it];
|
|
196335
|
+
if (it && z2 === it.length) {
|
|
196336
|
+
yield* it;
|
|
196337
|
+
return;
|
|
196338
|
+
}
|
|
196339
|
+
it = Array(z2);
|
|
196340
|
+
for (let i4 = 0; i4 < z2; ++i4) {
|
|
196341
|
+
const k4 = struct2[4][i4];
|
|
196342
|
+
const v4 = member([struct2[5][i4], 0], k4);
|
|
196343
|
+
yield it[i4] = [k4, v4];
|
|
196334
196344
|
}
|
|
196345
|
+
struct2[anno.it] = it;
|
|
196335
196346
|
}
|
|
196336
196347
|
};
|
|
196337
196348
|
isMemberSchema = (sc) => Array.isArray(sc) && sc.length === 2;
|
|
@@ -197058,11 +197069,11 @@ function __metadata(metadataKey, metadataValue) {
|
|
|
197058
197069
|
}
|
|
197059
197070
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
197060
197071
|
function adopt(value) {
|
|
197061
|
-
return value instanceof P ? value : new P(function(
|
|
197062
|
-
|
|
197072
|
+
return value instanceof P ? value : new P(function(resolve6) {
|
|
197073
|
+
resolve6(value);
|
|
197063
197074
|
});
|
|
197064
197075
|
}
|
|
197065
|
-
return new (P || (P = Promise))(function(
|
|
197076
|
+
return new (P || (P = Promise))(function(resolve6, reject2) {
|
|
197066
197077
|
function fulfilled(value) {
|
|
197067
197078
|
try {
|
|
197068
197079
|
step(generator.next(value));
|
|
@@ -197078,7 +197089,7 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
197078
197089
|
}
|
|
197079
197090
|
}
|
|
197080
197091
|
function step(result) {
|
|
197081
|
-
result.done ?
|
|
197092
|
+
result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
197082
197093
|
}
|
|
197083
197094
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
197084
197095
|
});
|
|
@@ -197269,14 +197280,14 @@ function __asyncValues(o4) {
|
|
|
197269
197280
|
}, i4);
|
|
197270
197281
|
function verb(n4) {
|
|
197271
197282
|
i4[n4] = o4[n4] && function(v4) {
|
|
197272
|
-
return new Promise(function(
|
|
197273
|
-
v4 = o4[n4](v4), settle(
|
|
197283
|
+
return new Promise(function(resolve6, reject2) {
|
|
197284
|
+
v4 = o4[n4](v4), settle(resolve6, reject2, v4.done, v4.value);
|
|
197274
197285
|
});
|
|
197275
197286
|
};
|
|
197276
197287
|
}
|
|
197277
|
-
function settle(
|
|
197288
|
+
function settle(resolve6, reject2, d4, v4) {
|
|
197278
197289
|
Promise.resolve(v4).then(function(v5) {
|
|
197279
|
-
|
|
197290
|
+
resolve6({ value: v5, done: d4 });
|
|
197280
197291
|
}, reject2);
|
|
197281
197292
|
}
|
|
197282
197293
|
}
|
|
@@ -198264,7 +198275,9 @@ var init_HttpBindingProtocol = __esm({
|
|
|
198264
198275
|
const inputMemberValue = input[memberName];
|
|
198265
198276
|
if (inputMemberValue == null && !memberNs.isIdempotencyToken()) {
|
|
198266
198277
|
if (memberTraits.httpLabel) {
|
|
198267
|
-
|
|
198278
|
+
if (request.path.includes(`{${memberName}+}`) || request.path.includes(`{${memberName}}`)) {
|
|
198279
|
+
throw new Error(`No value provided for input HTTP label: ${memberName}.`);
|
|
198280
|
+
}
|
|
198268
198281
|
}
|
|
198269
198282
|
continue;
|
|
198270
198283
|
}
|
|
@@ -207746,7 +207759,7 @@ var require_dist_cjs37 = __commonJS({
|
|
|
207746
207759
|
this.sockets[url] = (this.sockets[url] ?? []).filter((socket) => ![WebSocket.CLOSING, WebSocket.CLOSED].includes(socket.readyState));
|
|
207747
207760
|
}
|
|
207748
207761
|
waitForReady(socket, connectionTimeout) {
|
|
207749
|
-
return new Promise((
|
|
207762
|
+
return new Promise((resolve6, reject2) => {
|
|
207750
207763
|
const timeout = setTimeout(() => {
|
|
207751
207764
|
this.removeNotUsableSockets(socket.url);
|
|
207752
207765
|
reject2({
|
|
@@ -207757,7 +207770,7 @@ var require_dist_cjs37 = __commonJS({
|
|
|
207757
207770
|
}, connectionTimeout);
|
|
207758
207771
|
socket.onopen = () => {
|
|
207759
207772
|
clearTimeout(timeout);
|
|
207760
|
-
|
|
207773
|
+
resolve6();
|
|
207761
207774
|
};
|
|
207762
207775
|
});
|
|
207763
207776
|
}
|
|
@@ -207766,10 +207779,10 @@ var require_dist_cjs37 = __commonJS({
|
|
|
207766
207779
|
let socketErrorOccurred = false;
|
|
207767
207780
|
let reject2 = () => {
|
|
207768
207781
|
};
|
|
207769
|
-
let
|
|
207782
|
+
let resolve6 = () => {
|
|
207770
207783
|
};
|
|
207771
207784
|
socket.onmessage = (event) => {
|
|
207772
|
-
|
|
207785
|
+
resolve6({
|
|
207773
207786
|
done: false,
|
|
207774
207787
|
value: new Uint8Array(event.data)
|
|
207775
207788
|
});
|
|
@@ -207786,7 +207799,7 @@ var require_dist_cjs37 = __commonJS({
|
|
|
207786
207799
|
if (streamError) {
|
|
207787
207800
|
reject2(streamError);
|
|
207788
207801
|
} else {
|
|
207789
|
-
|
|
207802
|
+
resolve6({
|
|
207790
207803
|
done: true,
|
|
207791
207804
|
value: void 0
|
|
207792
207805
|
});
|
|
@@ -207796,7 +207809,7 @@ var require_dist_cjs37 = __commonJS({
|
|
|
207796
207809
|
[Symbol.asyncIterator]: () => ({
|
|
207797
207810
|
next: () => {
|
|
207798
207811
|
return new Promise((_resolve, _reject) => {
|
|
207799
|
-
|
|
207812
|
+
resolve6 = _resolve;
|
|
207800
207813
|
reject2 = _reject;
|
|
207801
207814
|
});
|
|
207802
207815
|
}
|
|
@@ -208834,7 +208847,7 @@ var require_dist_cjs46 = __commonJS({
|
|
|
208834
208847
|
this.refillTokenBucket();
|
|
208835
208848
|
if (amount > this.currentCapacity) {
|
|
208836
208849
|
const delay = (amount - this.currentCapacity) / this.fillRate * 1e3;
|
|
208837
|
-
await new Promise((
|
|
208850
|
+
await new Promise((resolve6) => _DefaultRateLimiter.setTimeoutFn(resolve6, delay));
|
|
208838
208851
|
}
|
|
208839
208852
|
this.currentCapacity = this.currentCapacity - amount;
|
|
208840
208853
|
}
|
|
@@ -209169,7 +209182,7 @@ var require_dist_cjs47 = __commonJS({
|
|
|
209169
209182
|
const delayFromResponse = getDelayFromRetryAfterHeader(err.$response);
|
|
209170
209183
|
const delay = Math.max(delayFromResponse || 0, delayFromDecider);
|
|
209171
209184
|
totalDelay += delay;
|
|
209172
|
-
await new Promise((
|
|
209185
|
+
await new Promise((resolve6) => setTimeout(resolve6, delay));
|
|
209173
209186
|
continue;
|
|
209174
209187
|
}
|
|
209175
209188
|
if (!err.$metadata) {
|
|
@@ -209327,7 +209340,7 @@ var require_dist_cjs47 = __commonJS({
|
|
|
209327
209340
|
attempts = retryToken.getRetryCount();
|
|
209328
209341
|
const delay = retryToken.getRetryDelay();
|
|
209329
209342
|
totalRetryDelay += delay;
|
|
209330
|
-
await new Promise((
|
|
209343
|
+
await new Promise((resolve6) => setTimeout(resolve6, delay));
|
|
209331
209344
|
}
|
|
209332
209345
|
}
|
|
209333
209346
|
} else {
|
|
@@ -209479,7 +209492,7 @@ var require_package2 = __commonJS({
|
|
|
209479
209492
|
module2.exports = {
|
|
209480
209493
|
name: "@aws-sdk/client-bedrock-runtime",
|
|
209481
209494
|
description: "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
|
|
209482
|
-
version: "3.
|
|
209495
|
+
version: "3.972.0",
|
|
209483
209496
|
scripts: {
|
|
209484
209497
|
build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
209485
209498
|
"build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime",
|
|
@@ -209487,7 +209500,7 @@ var require_package2 = __commonJS({
|
|
|
209487
209500
|
"build:include:deps": 'yarn g:turbo run build -F="$npm_package_name"',
|
|
209488
209501
|
"build:types": "tsc -p tsconfig.types.json",
|
|
209489
209502
|
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
|
209490
|
-
clean: "
|
|
209503
|
+
clean: "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
|
|
209491
209504
|
"extract:docs": "api-extractor run --local",
|
|
209492
209505
|
"generate:client": "node ../../scripts/generate-clients/single-service --solo bedrock-runtime",
|
|
209493
209506
|
"test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs"
|
|
@@ -209499,21 +209512,21 @@ var require_package2 = __commonJS({
|
|
|
209499
209512
|
dependencies: {
|
|
209500
209513
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
209501
209514
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
209502
|
-
"@aws-sdk/core": "3.
|
|
209503
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
209504
|
-
"@aws-sdk/eventstream-handler-node": "3.
|
|
209505
|
-
"@aws-sdk/middleware-eventstream": "3.
|
|
209506
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
209507
|
-
"@aws-sdk/middleware-logger": "3.
|
|
209508
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
209509
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
209510
|
-
"@aws-sdk/middleware-websocket": "3.
|
|
209511
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
209512
|
-
"@aws-sdk/token-providers": "3.
|
|
209513
|
-
"@aws-sdk/types": "3.
|
|
209514
|
-
"@aws-sdk/util-endpoints": "3.
|
|
209515
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
209516
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
209515
|
+
"@aws-sdk/core": "3.972.0",
|
|
209516
|
+
"@aws-sdk/credential-provider-node": "3.972.0",
|
|
209517
|
+
"@aws-sdk/eventstream-handler-node": "3.972.0",
|
|
209518
|
+
"@aws-sdk/middleware-eventstream": "3.972.0",
|
|
209519
|
+
"@aws-sdk/middleware-host-header": "3.972.0",
|
|
209520
|
+
"@aws-sdk/middleware-logger": "3.972.0",
|
|
209521
|
+
"@aws-sdk/middleware-recursion-detection": "3.972.0",
|
|
209522
|
+
"@aws-sdk/middleware-user-agent": "3.972.0",
|
|
209523
|
+
"@aws-sdk/middleware-websocket": "3.972.0",
|
|
209524
|
+
"@aws-sdk/region-config-resolver": "3.972.0",
|
|
209525
|
+
"@aws-sdk/token-providers": "3.972.0",
|
|
209526
|
+
"@aws-sdk/types": "3.972.0",
|
|
209527
|
+
"@aws-sdk/util-endpoints": "3.972.0",
|
|
209528
|
+
"@aws-sdk/util-user-agent-browser": "3.972.0",
|
|
209529
|
+
"@aws-sdk/util-user-agent-node": "3.972.0",
|
|
209517
209530
|
"@smithy/config-resolver": "^4.4.6",
|
|
209518
209531
|
"@smithy/core": "^3.20.6",
|
|
209519
209532
|
"@smithy/eventstream-serde-browser": "^4.2.8",
|
|
@@ -209550,7 +209563,7 @@ var require_package2 = __commonJS({
|
|
|
209550
209563
|
"@types/node": "^20.14.8",
|
|
209551
209564
|
concurrently: "7.0.0",
|
|
209552
209565
|
"downlevel-dts": "0.10.1",
|
|
209553
|
-
|
|
209566
|
+
premove: "4.0.0",
|
|
209554
209567
|
typescript: "~5.8.3"
|
|
209555
209568
|
},
|
|
209556
209569
|
engines: {
|
|
@@ -209642,7 +209655,7 @@ var require_dist_cjs49 = __commonJS({
|
|
|
209642
209655
|
var nodeConfigProvider = require_dist_cjs43();
|
|
209643
209656
|
var urlParser = require_dist_cjs22();
|
|
209644
209657
|
function httpRequest(options) {
|
|
209645
|
-
return new Promise((
|
|
209658
|
+
return new Promise((resolve6, reject2) => {
|
|
209646
209659
|
const req = http.request({
|
|
209647
209660
|
method: "GET",
|
|
209648
209661
|
...options,
|
|
@@ -209667,7 +209680,7 @@ var require_dist_cjs49 = __commonJS({
|
|
|
209667
209680
|
chunks.push(chunk);
|
|
209668
209681
|
});
|
|
209669
209682
|
res.on("end", () => {
|
|
209670
|
-
|
|
209683
|
+
resolve6(buffer.Buffer.concat(chunks));
|
|
209671
209684
|
req.destroy();
|
|
209672
209685
|
});
|
|
209673
209686
|
});
|
|
@@ -210087,7 +210100,7 @@ var require_retry_wrapper = __commonJS({
|
|
|
210087
210100
|
try {
|
|
210088
210101
|
return await toRetry();
|
|
210089
210102
|
} catch (e4) {
|
|
210090
|
-
await new Promise((
|
|
210103
|
+
await new Promise((resolve6) => setTimeout(resolve6, delayMs));
|
|
210091
210104
|
}
|
|
210092
210105
|
}
|
|
210093
210106
|
return await toRetry();
|
|
@@ -210260,7 +210273,7 @@ var init_package = __esm({
|
|
|
210260
210273
|
"node_modules/@aws-sdk/nested-clients/package.json"() {
|
|
210261
210274
|
package_default = {
|
|
210262
210275
|
name: "@aws-sdk/nested-clients",
|
|
210263
|
-
version: "3.
|
|
210276
|
+
version: "3.972.0",
|
|
210264
210277
|
description: "Nested clients for AWS SDK packages.",
|
|
210265
210278
|
main: "./dist-cjs/index.js",
|
|
210266
210279
|
module: "./dist-es/index.js",
|
|
@@ -210272,7 +210285,7 @@ var init_package = __esm({
|
|
|
210272
210285
|
"build:include:deps": 'yarn g:turbo run build -F="$npm_package_name"',
|
|
210273
210286
|
"build:types": "tsc -p tsconfig.types.json",
|
|
210274
210287
|
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
|
210275
|
-
clean: "
|
|
210288
|
+
clean: "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
|
|
210276
210289
|
lint: "node ../../scripts/validation/submodules-linter.js --pkg nested-clients",
|
|
210277
210290
|
test: "yarn g:vitest run",
|
|
210278
210291
|
"test:watch": "yarn g:vitest watch"
|
|
@@ -210289,16 +210302,16 @@ var init_package = __esm({
|
|
|
210289
210302
|
dependencies: {
|
|
210290
210303
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
210291
210304
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
210292
|
-
"@aws-sdk/core": "3.
|
|
210293
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
210294
|
-
"@aws-sdk/middleware-logger": "3.
|
|
210295
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
210296
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
210297
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
210298
|
-
"@aws-sdk/types": "3.
|
|
210299
|
-
"@aws-sdk/util-endpoints": "3.
|
|
210300
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
210301
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
210305
|
+
"@aws-sdk/core": "3.972.0",
|
|
210306
|
+
"@aws-sdk/middleware-host-header": "3.972.0",
|
|
210307
|
+
"@aws-sdk/middleware-logger": "3.972.0",
|
|
210308
|
+
"@aws-sdk/middleware-recursion-detection": "3.972.0",
|
|
210309
|
+
"@aws-sdk/middleware-user-agent": "3.972.0",
|
|
210310
|
+
"@aws-sdk/region-config-resolver": "3.972.0",
|
|
210311
|
+
"@aws-sdk/types": "3.972.0",
|
|
210312
|
+
"@aws-sdk/util-endpoints": "3.972.0",
|
|
210313
|
+
"@aws-sdk/util-user-agent-browser": "3.972.0",
|
|
210314
|
+
"@aws-sdk/util-user-agent-node": "3.972.0",
|
|
210302
210315
|
"@smithy/config-resolver": "^4.4.6",
|
|
210303
210316
|
"@smithy/core": "^3.20.6",
|
|
210304
210317
|
"@smithy/fetch-http-handler": "^5.3.9",
|
|
@@ -210329,7 +210342,7 @@ var init_package = __esm({
|
|
|
210329
210342
|
devDependencies: {
|
|
210330
210343
|
concurrently: "7.0.0",
|
|
210331
210344
|
"downlevel-dts": "0.10.1",
|
|
210332
|
-
|
|
210345
|
+
premove: "4.0.0",
|
|
210333
210346
|
typescript: "~5.8.3"
|
|
210334
210347
|
},
|
|
210335
210348
|
typesVersions: {
|
|
@@ -211642,7 +211655,7 @@ var require_package3 = __commonJS({
|
|
|
211642
211655
|
module2.exports = {
|
|
211643
211656
|
name: "@aws-sdk/client-sso",
|
|
211644
211657
|
description: "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",
|
|
211645
|
-
version: "3.
|
|
211658
|
+
version: "3.972.0",
|
|
211646
211659
|
scripts: {
|
|
211647
211660
|
build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
211648
211661
|
"build:cjs": "node ../../scripts/compilation/inline client-sso",
|
|
@@ -211650,7 +211663,7 @@ var require_package3 = __commonJS({
|
|
|
211650
211663
|
"build:include:deps": 'yarn g:turbo run build -F="$npm_package_name"',
|
|
211651
211664
|
"build:types": "tsc -p tsconfig.types.json",
|
|
211652
211665
|
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
|
211653
|
-
clean: "
|
|
211666
|
+
clean: "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
|
|
211654
211667
|
"extract:docs": "api-extractor run --local",
|
|
211655
211668
|
"generate:client": "node ../../scripts/generate-clients/single-service --solo sso",
|
|
211656
211669
|
"test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs"
|
|
@@ -211662,16 +211675,16 @@ var require_package3 = __commonJS({
|
|
|
211662
211675
|
dependencies: {
|
|
211663
211676
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
211664
211677
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
211665
|
-
"@aws-sdk/core": "3.
|
|
211666
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
211667
|
-
"@aws-sdk/middleware-logger": "3.
|
|
211668
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
211669
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
211670
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
211671
|
-
"@aws-sdk/types": "3.
|
|
211672
|
-
"@aws-sdk/util-endpoints": "3.
|
|
211673
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
211674
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
211678
|
+
"@aws-sdk/core": "3.972.0",
|
|
211679
|
+
"@aws-sdk/middleware-host-header": "3.972.0",
|
|
211680
|
+
"@aws-sdk/middleware-logger": "3.972.0",
|
|
211681
|
+
"@aws-sdk/middleware-recursion-detection": "3.972.0",
|
|
211682
|
+
"@aws-sdk/middleware-user-agent": "3.972.0",
|
|
211683
|
+
"@aws-sdk/region-config-resolver": "3.972.0",
|
|
211684
|
+
"@aws-sdk/types": "3.972.0",
|
|
211685
|
+
"@aws-sdk/util-endpoints": "3.972.0",
|
|
211686
|
+
"@aws-sdk/util-user-agent-browser": "3.972.0",
|
|
211687
|
+
"@aws-sdk/util-user-agent-node": "3.972.0",
|
|
211675
211688
|
"@smithy/config-resolver": "^4.4.6",
|
|
211676
211689
|
"@smithy/core": "^3.20.6",
|
|
211677
211690
|
"@smithy/fetch-http-handler": "^5.3.9",
|
|
@@ -211704,7 +211717,7 @@ var require_package3 = __commonJS({
|
|
|
211704
211717
|
"@types/node": "^20.14.8",
|
|
211705
211718
|
concurrently: "7.0.0",
|
|
211706
211719
|
"downlevel-dts": "0.10.1",
|
|
211707
|
-
|
|
211720
|
+
premove: "4.0.0",
|
|
211708
211721
|
typescript: "~5.8.3"
|
|
211709
211722
|
},
|
|
211710
211723
|
engines: {
|
|
@@ -215113,7 +215126,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
215113
215126
|
streamEnded = true;
|
|
215114
215127
|
});
|
|
215115
215128
|
while (!generationEnded) {
|
|
215116
|
-
const value = await new Promise((
|
|
215129
|
+
const value = await new Promise((resolve6) => setTimeout(() => resolve6(records.shift()), 0));
|
|
215117
215130
|
if (value) {
|
|
215118
215131
|
yield value;
|
|
215119
215132
|
}
|
|
@@ -215648,7 +215661,9 @@ var require_dist_cjs66 = __commonJS({
|
|
|
215648
215661
|
var _CBo = "ContentBlock";
|
|
215649
215662
|
var _CC = "CitationsConfig";
|
|
215650
215663
|
var _CCB = "CitationsContentBlock";
|
|
215651
|
-
var _CD = "
|
|
215664
|
+
var _CD = "CacheDetail";
|
|
215665
|
+
var _CDL = "CacheDetailsList";
|
|
215666
|
+
var _CDi = "CitationsDelta";
|
|
215652
215667
|
var _CE = "ConflictException";
|
|
215653
215668
|
var _CGC = "CitationGeneratedContent";
|
|
215654
215669
|
var _CGCL = "CitationGeneratedContentList";
|
|
@@ -215867,6 +215882,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
215867
215882
|
var _cBS = "contentBlockStart";
|
|
215868
215883
|
var _cBSo = "contentBlockStop";
|
|
215869
215884
|
var _cC = "citationsContent";
|
|
215885
|
+
var _cD = "cacheDetails";
|
|
215870
215886
|
var _cFS = "claimsFalseScenario";
|
|
215871
215887
|
var _cGP = "contextualGroundingPolicy";
|
|
215872
215888
|
var _cGPU = "contextualGroundingPolicyUnits";
|
|
@@ -216028,7 +216044,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
216028
216044
|
var _str = "stream";
|
|
216029
216045
|
var _stre = "streaming";
|
|
216030
216046
|
var _sy = "system";
|
|
216031
|
-
var _t = "
|
|
216047
|
+
var _t = "ttl";
|
|
216032
216048
|
var _tA = "translationAmbiguous";
|
|
216033
216049
|
var _tC = "toolConfig";
|
|
216034
216050
|
var _tCe = "textCharacters";
|
|
@@ -216055,6 +216071,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
216055
216071
|
var _tr = "trace";
|
|
216056
216072
|
var _tra = "translation";
|
|
216057
216073
|
var _tran = "translations";
|
|
216074
|
+
var _ty = "type";
|
|
216058
216075
|
var _u = "usage";
|
|
216059
216076
|
var _uC = "untranslatedClaims";
|
|
216060
216077
|
var _uP = "untranslatedPremises";
|
|
@@ -216168,13 +216185,22 @@ var require_dist_cjs66 = __commonJS({
|
|
|
216168
216185
|
[_b],
|
|
216169
216186
|
[[() => PartBody, 0]]
|
|
216170
216187
|
];
|
|
216188
|
+
var CacheDetail$ = [
|
|
216189
|
+
3,
|
|
216190
|
+
n04,
|
|
216191
|
+
_CD,
|
|
216192
|
+
0,
|
|
216193
|
+
[_t, _iT3],
|
|
216194
|
+
[0, 1],
|
|
216195
|
+
2
|
|
216196
|
+
];
|
|
216171
216197
|
var CachePointBlock$ = [
|
|
216172
216198
|
3,
|
|
216173
216199
|
n04,
|
|
216174
216200
|
_CPB,
|
|
216175
216201
|
0,
|
|
216176
|
-
[_t],
|
|
216177
|
-
[0],
|
|
216202
|
+
[_ty, _t],
|
|
216203
|
+
[0, 0],
|
|
216178
216204
|
1
|
|
216179
216205
|
];
|
|
216180
216206
|
var Citation$ = [
|
|
@@ -216205,7 +216231,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
216205
216231
|
var CitationsDelta$ = [
|
|
216206
216232
|
3,
|
|
216207
216233
|
n04,
|
|
216208
|
-
|
|
216234
|
+
_CDi,
|
|
216209
216235
|
0,
|
|
216210
216236
|
[_ti, _s4, _sC, _l],
|
|
216211
216237
|
[0, 0, () => CitationSourceContentListDelta, () => CitationLocation$]
|
|
@@ -216454,7 +216480,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
216454
216480
|
n04,
|
|
216455
216481
|
_GARLW,
|
|
216456
216482
|
0,
|
|
216457
|
-
[
|
|
216483
|
+
[_ty, _p, _cl],
|
|
216458
216484
|
[0, [() => GuardrailAutomatedReasoningStatementList, 0], [() => GuardrailAutomatedReasoningStatementList, 0]]
|
|
216459
216485
|
];
|
|
216460
216486
|
var GuardrailAutomatedReasoningNoTranslationsFinding$ = [
|
|
@@ -216558,7 +216584,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
216558
216584
|
n04,
|
|
216559
216585
|
_GCF,
|
|
216560
216586
|
0,
|
|
216561
|
-
[
|
|
216587
|
+
[_ty, _conf, _a16, _fS, _de],
|
|
216562
216588
|
[0, 0, 0, 0, 2],
|
|
216563
216589
|
3
|
|
216564
216590
|
];
|
|
@@ -216576,7 +216602,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
216576
216602
|
n04,
|
|
216577
216603
|
_GCGF,
|
|
216578
216604
|
0,
|
|
216579
|
-
[
|
|
216605
|
+
[_ty, _th, _sc, _a16, _de],
|
|
216580
216606
|
[0, 1, 1, 0, 2],
|
|
216581
216607
|
4
|
|
216582
216608
|
];
|
|
@@ -216653,7 +216679,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
216653
216679
|
n04,
|
|
216654
216680
|
_GMW,
|
|
216655
216681
|
0,
|
|
216656
|
-
[_ma,
|
|
216682
|
+
[_ma, _ty, _a16, _de],
|
|
216657
216683
|
[0, 0, 0, 2],
|
|
216658
216684
|
3
|
|
216659
216685
|
];
|
|
@@ -216670,7 +216696,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
216670
216696
|
n04,
|
|
216671
216697
|
_GPEF,
|
|
216672
216698
|
0,
|
|
216673
|
-
[_ma,
|
|
216699
|
+
[_ma, _ty, _a16, _de],
|
|
216674
216700
|
[0, 0, 0, 2],
|
|
216675
216701
|
3
|
|
216676
216702
|
];
|
|
@@ -216722,7 +216748,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
216722
216748
|
n04,
|
|
216723
216749
|
_GT,
|
|
216724
216750
|
0,
|
|
216725
|
-
[_n,
|
|
216751
|
+
[_n, _ty, _a16, _de],
|
|
216726
216752
|
[0, 0, 0, 2],
|
|
216727
216753
|
3
|
|
216728
216754
|
];
|
|
@@ -217037,7 +217063,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
217037
217063
|
n04,
|
|
217038
217064
|
_ST2,
|
|
217039
217065
|
0,
|
|
217040
|
-
[
|
|
217066
|
+
[_ty],
|
|
217041
217067
|
[0],
|
|
217042
217068
|
1
|
|
217043
217069
|
];
|
|
@@ -217109,8 +217135,8 @@ var require_dist_cjs66 = __commonJS({
|
|
|
217109
217135
|
n04,
|
|
217110
217136
|
_TU,
|
|
217111
217137
|
0,
|
|
217112
|
-
[_iT3, _oT, _tT3, _cRIT, _cWIT],
|
|
217113
|
-
[1, 1, 1, 1, 1],
|
|
217138
|
+
[_iT3, _oT, _tT3, _cRIT, _cWIT, _cD],
|
|
217139
|
+
[1, 1, 1, 1, 1, () => CacheDetailsList],
|
|
217114
217140
|
3
|
|
217115
217141
|
];
|
|
217116
217142
|
var ToolConfiguration$ = [
|
|
@@ -217127,7 +217153,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
217127
217153
|
n04,
|
|
217128
217154
|
_TRB,
|
|
217129
217155
|
0,
|
|
217130
|
-
[_tUI, _co3, _st,
|
|
217156
|
+
[_tUI, _co3, _st, _ty],
|
|
217131
217157
|
[0, [() => ToolResultContentBlocks, 0], 0, 0],
|
|
217132
217158
|
2
|
|
217133
217159
|
];
|
|
@@ -217136,7 +217162,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
217136
217162
|
n04,
|
|
217137
217163
|
_TRBS,
|
|
217138
217164
|
0,
|
|
217139
|
-
[_tUI,
|
|
217165
|
+
[_tUI, _ty, _st],
|
|
217140
217166
|
[0, 0, 0],
|
|
217141
217167
|
1
|
|
217142
217168
|
];
|
|
@@ -217154,7 +217180,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
217154
217180
|
n04,
|
|
217155
217181
|
_TUB,
|
|
217156
217182
|
0,
|
|
217157
|
-
[_tUI, _n, _i,
|
|
217183
|
+
[_tUI, _n, _i, _ty],
|
|
217158
217184
|
[0, 0, 15, 0],
|
|
217159
217185
|
3
|
|
217160
217186
|
];
|
|
@@ -217172,7 +217198,7 @@ var require_dist_cjs66 = __commonJS({
|
|
|
217172
217198
|
n04,
|
|
217173
217199
|
_TUBS,
|
|
217174
217200
|
0,
|
|
217175
|
-
[_tUI, _n,
|
|
217201
|
+
[_tUI, _n, _ty],
|
|
217176
217202
|
[0, 0, 0],
|
|
217177
217203
|
2
|
|
217178
217204
|
];
|
|
@@ -217214,6 +217240,13 @@ var require_dist_cjs66 = __commonJS({
|
|
|
217214
217240
|
0
|
|
217215
217241
|
]
|
|
217216
217242
|
];
|
|
217243
|
+
var CacheDetailsList = [
|
|
217244
|
+
1,
|
|
217245
|
+
n04,
|
|
217246
|
+
_CDL,
|
|
217247
|
+
0,
|
|
217248
|
+
() => CacheDetail$
|
|
217249
|
+
];
|
|
217217
217250
|
var CitationGeneratedContentList = [
|
|
217218
217251
|
1,
|
|
217219
217252
|
n04,
|
|
@@ -218067,6 +218100,10 @@ var require_dist_cjs66 = __commonJS({
|
|
|
218067
218100
|
WEBM: "webm",
|
|
218068
218101
|
X_AAC: "x-aac"
|
|
218069
218102
|
};
|
|
218103
|
+
var CacheTTL = {
|
|
218104
|
+
FIVE_MINUTES: "5m",
|
|
218105
|
+
ONE_HOUR: "1h"
|
|
218106
|
+
};
|
|
218070
218107
|
var CachePointType = {
|
|
218071
218108
|
DEFAULT: "default"
|
|
218072
218109
|
};
|
|
@@ -218182,8 +218219,10 @@ var require_dist_cjs66 = __commonJS({
|
|
|
218182
218219
|
exports2.BedrockRuntimeServiceException$ = BedrockRuntimeServiceException$;
|
|
218183
218220
|
exports2.BidirectionalInputPayloadPart$ = BidirectionalInputPayloadPart$;
|
|
218184
218221
|
exports2.BidirectionalOutputPayloadPart$ = BidirectionalOutputPayloadPart$;
|
|
218222
|
+
exports2.CacheDetail$ = CacheDetail$;
|
|
218185
218223
|
exports2.CachePointBlock$ = CachePointBlock$;
|
|
218186
218224
|
exports2.CachePointType = CachePointType;
|
|
218225
|
+
exports2.CacheTTL = CacheTTL;
|
|
218187
218226
|
exports2.Citation$ = Citation$;
|
|
218188
218227
|
exports2.CitationGeneratedContent$ = CitationGeneratedContent$;
|
|
218189
218228
|
exports2.CitationLocation$ = CitationLocation$;
|
|
@@ -221068,261 +221107,6 @@ var init_imageConfig = __esm({
|
|
|
221068
221107
|
}
|
|
221069
221108
|
});
|
|
221070
221109
|
|
|
221071
|
-
// src/agent/xmlParsingUtils.js
|
|
221072
|
-
function removeThinkingTags(xmlString) {
|
|
221073
|
-
let result = xmlString;
|
|
221074
|
-
result = result.replace(/<thinking>[\s\S]*?<\/thinking>/g, "");
|
|
221075
|
-
const thinkingIndex = result.indexOf("<thinking>");
|
|
221076
|
-
if (thinkingIndex !== -1) {
|
|
221077
|
-
const afterThinking = result.substring(thinkingIndex + "<thinking>".length);
|
|
221078
|
-
const toolPattern = /<(search|query|extract|listFiles|searchFiles|implement|attempt_completion|attempt_complete)>/;
|
|
221079
|
-
const toolMatch = afterThinking.match(toolPattern);
|
|
221080
|
-
if (toolMatch) {
|
|
221081
|
-
const toolStart = thinkingIndex + "<thinking>".length + toolMatch.index;
|
|
221082
|
-
result = result.substring(0, thinkingIndex) + result.substring(toolStart);
|
|
221083
|
-
} else {
|
|
221084
|
-
result = result.substring(0, thinkingIndex);
|
|
221085
|
-
}
|
|
221086
|
-
}
|
|
221087
|
-
return result.trim();
|
|
221088
|
-
}
|
|
221089
|
-
function extractThinkingContent(xmlString) {
|
|
221090
|
-
const thinkingMatch = xmlString.match(/<thinking>([\s\S]*?)<\/thinking>/);
|
|
221091
|
-
return thinkingMatch ? thinkingMatch[1].trim() : null;
|
|
221092
|
-
}
|
|
221093
|
-
function checkAttemptCompleteRecovery(cleanedXmlString, validTools = []) {
|
|
221094
|
-
const openTagIndex = cleanedXmlString.indexOf("<attempt_completion>");
|
|
221095
|
-
if (openTagIndex !== -1) {
|
|
221096
|
-
const afterOpenTag = cleanedXmlString.substring(openTagIndex + "<attempt_completion>".length);
|
|
221097
|
-
const closeTagIndex = cleanedXmlString.lastIndexOf("</attempt_completion>");
|
|
221098
|
-
let content;
|
|
221099
|
-
let hasClosingTag = false;
|
|
221100
|
-
if (closeTagIndex !== -1 && closeTagIndex >= openTagIndex + "<attempt_completion>".length) {
|
|
221101
|
-
content = cleanedXmlString.substring(
|
|
221102
|
-
openTagIndex + "<attempt_completion>".length,
|
|
221103
|
-
closeTagIndex
|
|
221104
|
-
).trim();
|
|
221105
|
-
hasClosingTag = true;
|
|
221106
|
-
} else {
|
|
221107
|
-
content = afterOpenTag.trim();
|
|
221108
|
-
hasClosingTag = false;
|
|
221109
|
-
}
|
|
221110
|
-
if (content) {
|
|
221111
|
-
return {
|
|
221112
|
-
toolName: "attempt_completion",
|
|
221113
|
-
params: { result: content }
|
|
221114
|
-
};
|
|
221115
|
-
}
|
|
221116
|
-
return {
|
|
221117
|
-
toolName: "attempt_completion",
|
|
221118
|
-
params: { result: hasClosingTag ? "" : "__PREVIOUS_RESPONSE__" }
|
|
221119
|
-
};
|
|
221120
|
-
}
|
|
221121
|
-
const attemptCompletePatterns = [
|
|
221122
|
-
// Standard shorthand with optional whitespace
|
|
221123
|
-
/^<attempt_complete>\s*$/,
|
|
221124
|
-
// Empty with proper closing tag (common case from the logs)
|
|
221125
|
-
/^<attempt_complete>\s*<\/attempt_complete>\s*$/,
|
|
221126
|
-
// Self-closing variant
|
|
221127
|
-
/^<attempt_complete\s*\/>\s*$/,
|
|
221128
|
-
// Incomplete opening tag (missing closing bracket)
|
|
221129
|
-
/^<attempt_complete\s*$/,
|
|
221130
|
-
// With trailing content (extract just the tag part) - must come after empty tag pattern
|
|
221131
|
-
/^<attempt_complete>(.*)$/s,
|
|
221132
|
-
// Self-closing with trailing content
|
|
221133
|
-
/^<attempt_complete\s*\/>(.*)$/s
|
|
221134
|
-
];
|
|
221135
|
-
for (const pattern of attemptCompletePatterns) {
|
|
221136
|
-
const match2 = cleanedXmlString.match(pattern);
|
|
221137
|
-
if (match2) {
|
|
221138
|
-
return {
|
|
221139
|
-
toolName: "attempt_completion",
|
|
221140
|
-
params: { result: "__PREVIOUS_RESPONSE__" }
|
|
221141
|
-
};
|
|
221142
|
-
}
|
|
221143
|
-
}
|
|
221144
|
-
if (cleanedXmlString.includes("<attempt_complete") && !hasOtherToolTags(cleanedXmlString, validTools)) {
|
|
221145
|
-
return {
|
|
221146
|
-
toolName: "attempt_completion",
|
|
221147
|
-
params: { result: "__PREVIOUS_RESPONSE__" }
|
|
221148
|
-
};
|
|
221149
|
-
}
|
|
221150
|
-
return null;
|
|
221151
|
-
}
|
|
221152
|
-
function hasOtherToolTags(xmlString, validTools = []) {
|
|
221153
|
-
const defaultTools = ["search", "query", "extract", "listFiles", "searchFiles", "implement", "attempt_completion"];
|
|
221154
|
-
const toolsToCheck = validTools.length > 0 ? validTools : defaultTools;
|
|
221155
|
-
for (const tool4 of toolsToCheck) {
|
|
221156
|
-
if (tool4 !== "attempt_completion" && xmlString.includes(`<${tool4}`)) {
|
|
221157
|
-
return true;
|
|
221158
|
-
}
|
|
221159
|
-
}
|
|
221160
|
-
return false;
|
|
221161
|
-
}
|
|
221162
|
-
function processXmlWithThinkingAndRecovery(xmlString, validTools = []) {
|
|
221163
|
-
const thinkingContent = extractThinkingContent(xmlString);
|
|
221164
|
-
const cleanedXmlString = removeThinkingTags(xmlString);
|
|
221165
|
-
const recoveryResult = checkAttemptCompleteRecovery(cleanedXmlString, validTools);
|
|
221166
|
-
if (process.env.DEBUG === "1" && thinkingContent) {
|
|
221167
|
-
console.log(`[DEBUG] AI Thinking Process:
|
|
221168
|
-
${thinkingContent}`);
|
|
221169
|
-
}
|
|
221170
|
-
return {
|
|
221171
|
-
cleanedXmlString,
|
|
221172
|
-
thinkingContent,
|
|
221173
|
-
recoveryResult
|
|
221174
|
-
};
|
|
221175
|
-
}
|
|
221176
|
-
var init_xmlParsingUtils = __esm({
|
|
221177
|
-
"src/agent/xmlParsingUtils.js"() {
|
|
221178
|
-
"use strict";
|
|
221179
|
-
}
|
|
221180
|
-
});
|
|
221181
|
-
|
|
221182
|
-
// src/agent/tools.js
|
|
221183
|
-
function createTools(configOptions) {
|
|
221184
|
-
const tools2 = {};
|
|
221185
|
-
const isToolAllowed = configOptions.isToolAllowed || ((toolName) => {
|
|
221186
|
-
if (!configOptions.allowedTools) return true;
|
|
221187
|
-
return configOptions.allowedTools.isEnabled(toolName);
|
|
221188
|
-
});
|
|
221189
|
-
if (isToolAllowed("search")) {
|
|
221190
|
-
tools2.searchTool = searchTool(configOptions);
|
|
221191
|
-
}
|
|
221192
|
-
if (isToolAllowed("query")) {
|
|
221193
|
-
tools2.queryTool = queryTool(configOptions);
|
|
221194
|
-
}
|
|
221195
|
-
if (isToolAllowed("extract")) {
|
|
221196
|
-
tools2.extractTool = extractTool(configOptions);
|
|
221197
|
-
}
|
|
221198
|
-
if (configOptions.enableDelegate && isToolAllowed("delegate")) {
|
|
221199
|
-
tools2.delegateTool = delegateTool(configOptions);
|
|
221200
|
-
}
|
|
221201
|
-
if (configOptions.enableBash && isToolAllowed("bash")) {
|
|
221202
|
-
tools2.bashTool = bashTool(configOptions);
|
|
221203
|
-
}
|
|
221204
|
-
if (configOptions.allowEdit && isToolAllowed("edit")) {
|
|
221205
|
-
tools2.editTool = editTool(configOptions);
|
|
221206
|
-
}
|
|
221207
|
-
if (configOptions.allowEdit && isToolAllowed("create")) {
|
|
221208
|
-
tools2.createTool = createTool(configOptions);
|
|
221209
|
-
}
|
|
221210
|
-
return tools2;
|
|
221211
|
-
}
|
|
221212
|
-
function parseXmlToolCallWithThinking(xmlString, validTools) {
|
|
221213
|
-
const { cleanedXmlString, recoveryResult } = processXmlWithThinkingAndRecovery(xmlString, validTools);
|
|
221214
|
-
if (recoveryResult) {
|
|
221215
|
-
return recoveryResult;
|
|
221216
|
-
}
|
|
221217
|
-
return parseXmlToolCall(cleanedXmlString, validTools);
|
|
221218
|
-
}
|
|
221219
|
-
var import_crypto2, implementToolDefinition, listFilesToolDefinition, searchFilesToolDefinition, readImageToolDefinition;
|
|
221220
|
-
var init_tools = __esm({
|
|
221221
|
-
"src/agent/tools.js"() {
|
|
221222
|
-
"use strict";
|
|
221223
|
-
init_index();
|
|
221224
|
-
import_crypto2 = __nccwpck_require__(76982);
|
|
221225
|
-
init_xmlParsingUtils();
|
|
221226
|
-
implementToolDefinition = `
|
|
221227
|
-
## implement
|
|
221228
|
-
Description: Implement a given task. Can modify files. Can be used ONLY if task explicitly stated that something requires modification or implementation.
|
|
221229
|
-
|
|
221230
|
-
Parameters:
|
|
221231
|
-
- task: (required) The task description. Should be as detailed as possible, ideally pointing to exact files which needs be modified or created.
|
|
221232
|
-
- autoCommits: (optional) Whether to enable auto-commits in aider. Default is false.
|
|
221233
|
-
|
|
221234
|
-
Usage Example:
|
|
221235
|
-
|
|
221236
|
-
<examples>
|
|
221237
|
-
|
|
221238
|
-
User: Can you implement a function to calculate Fibonacci numbers in main.js?
|
|
221239
|
-
<implement>
|
|
221240
|
-
<task>Implement a recursive function to calculate the nth Fibonacci number in main.js</task>
|
|
221241
|
-
</implement>
|
|
221242
|
-
|
|
221243
|
-
User: Can you implement a function to calculate Fibonacci numbers in main.js with auto-commits?
|
|
221244
|
-
<implement>
|
|
221245
|
-
<task>Implement a recursive function to calculate the nth Fibonacci number in main.js</task>
|
|
221246
|
-
<autoCommits>true</autoCommits>
|
|
221247
|
-
</implement>
|
|
221248
|
-
|
|
221249
|
-
</examples>
|
|
221250
|
-
`;
|
|
221251
|
-
listFilesToolDefinition = `
|
|
221252
|
-
## listFiles
|
|
221253
|
-
Description: List files and directories in a specified location.
|
|
221254
|
-
|
|
221255
|
-
Parameters:
|
|
221256
|
-
- directory: (optional) The directory path to list files from. Defaults to current directory if not specified.
|
|
221257
|
-
|
|
221258
|
-
Usage Example:
|
|
221259
|
-
|
|
221260
|
-
<examples>
|
|
221261
|
-
|
|
221262
|
-
User: Can you list the files in the src directory?
|
|
221263
|
-
<listFiles>
|
|
221264
|
-
<directory>src</directory>
|
|
221265
|
-
</listFiles>
|
|
221266
|
-
|
|
221267
|
-
User: What files are in the current directory?
|
|
221268
|
-
<listFiles>
|
|
221269
|
-
</listFiles>
|
|
221270
|
-
|
|
221271
|
-
</examples>
|
|
221272
|
-
`;
|
|
221273
|
-
searchFilesToolDefinition = `
|
|
221274
|
-
## searchFiles
|
|
221275
|
-
Description: Find files with name matching a glob pattern with recursive search capability.
|
|
221276
|
-
|
|
221277
|
-
Parameters:
|
|
221278
|
-
- pattern: (required) The glob pattern to search for (e.g., "**/*.js", "*.md").
|
|
221279
|
-
- directory: (optional) The directory to search in. Defaults to current directory if not specified.
|
|
221280
|
-
- recursive: (optional) Whether to search recursively. Defaults to true.
|
|
221281
|
-
|
|
221282
|
-
Usage Example:
|
|
221283
|
-
|
|
221284
|
-
<examples>
|
|
221285
|
-
|
|
221286
|
-
User: Can you find all JavaScript files in the project?
|
|
221287
|
-
<searchFiles>
|
|
221288
|
-
<pattern>**/*.js</pattern>
|
|
221289
|
-
</searchFiles>
|
|
221290
|
-
|
|
221291
|
-
User: Find all markdown files in the docs directory, but only at the top level.
|
|
221292
|
-
<searchFiles>
|
|
221293
|
-
<pattern>*.md</pattern>
|
|
221294
|
-
<directory>docs</directory>
|
|
221295
|
-
<recursive>false</recursive>
|
|
221296
|
-
</searchFiles>
|
|
221297
|
-
|
|
221298
|
-
</examples>
|
|
221299
|
-
`;
|
|
221300
|
-
readImageToolDefinition = `
|
|
221301
|
-
## readImage
|
|
221302
|
-
Description: Read and load an image file so it can be viewed by the AI. Use this when you need to analyze, describe, or work with image content. Images from user messages are automatically loaded, but use this tool to explicitly read images mentioned in tool outputs or when you need to examine specific image files.
|
|
221303
|
-
|
|
221304
|
-
Parameters:
|
|
221305
|
-
- path: (required) The path to the image file to read. Supports png, jpg, jpeg, webp, bmp, and svg formats.
|
|
221306
|
-
|
|
221307
|
-
Usage Example:
|
|
221308
|
-
|
|
221309
|
-
<examples>
|
|
221310
|
-
|
|
221311
|
-
User: Can you describe what's in screenshot.png?
|
|
221312
|
-
<readImage>
|
|
221313
|
-
<path>screenshot.png</path>
|
|
221314
|
-
</readImage>
|
|
221315
|
-
|
|
221316
|
-
User: Analyze the diagram in docs/architecture.svg
|
|
221317
|
-
<readImage>
|
|
221318
|
-
<path>docs/architecture.svg</path>
|
|
221319
|
-
</readImage>
|
|
221320
|
-
|
|
221321
|
-
</examples>
|
|
221322
|
-
`;
|
|
221323
|
-
}
|
|
221324
|
-
});
|
|
221325
|
-
|
|
221326
221110
|
// node_modules/zod/v3/helpers/util.js
|
|
221327
221111
|
var util, objectUtil, ZodParsedType, getParsedType;
|
|
221328
221112
|
var init_util2 = __esm({
|
|
@@ -225430,6 +225214,14 @@ var init_zod = __esm({
|
|
|
225430
225214
|
});
|
|
225431
225215
|
|
|
225432
225216
|
// src/tools/common.js
|
|
225217
|
+
function buildToolTagPattern(tools2 = DEFAULT_VALID_TOOLS) {
|
|
225218
|
+
const allTools = [...tools2];
|
|
225219
|
+
if (allTools.includes("attempt_completion") && !allTools.includes("attempt_complete")) {
|
|
225220
|
+
allTools.push("attempt_complete");
|
|
225221
|
+
}
|
|
225222
|
+
const escaped = allTools.map((t4) => t4.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
|
225223
|
+
return new RegExp(`<(${escaped.join("|")})>`);
|
|
225224
|
+
}
|
|
225433
225225
|
function getValidParamsForTool(toolName) {
|
|
225434
225226
|
const schemaMap = {
|
|
225435
225227
|
search: searchSchema,
|
|
@@ -225542,13 +225334,44 @@ function parseTargets(targets) {
|
|
|
225542
225334
|
if (!targets || typeof targets !== "string") {
|
|
225543
225335
|
return [];
|
|
225544
225336
|
}
|
|
225545
|
-
return targets.split(
|
|
225337
|
+
return targets.split(/[\s,]+/).filter((f4) => f4.length > 0);
|
|
225338
|
+
}
|
|
225339
|
+
function parseAndResolvePaths(pathStr, cwd) {
|
|
225340
|
+
if (!pathStr) return [];
|
|
225341
|
+
const paths = pathStr.split(",").map((p4) => p4.trim()).filter((p4) => p4.length > 0);
|
|
225342
|
+
return paths.map((p4) => {
|
|
225343
|
+
if ((0, import_path5.isAbsolute)(p4)) {
|
|
225344
|
+
return p4;
|
|
225345
|
+
}
|
|
225346
|
+
return cwd ? (0, import_path5.resolve)(cwd, p4) : p4;
|
|
225347
|
+
});
|
|
225348
|
+
}
|
|
225349
|
+
function resolveTargetPath(target, cwd) {
|
|
225350
|
+
const searchStart = target.length > 2 && target[1] === ":" && /[a-zA-Z]/.test(target[0]) ? 2 : 0;
|
|
225351
|
+
const colonIdx = target.indexOf(":", searchStart);
|
|
225352
|
+
const hashIdx = target.indexOf("#");
|
|
225353
|
+
let filePart, suffix;
|
|
225354
|
+
if (colonIdx !== -1 && (hashIdx === -1 || colonIdx < hashIdx)) {
|
|
225355
|
+
filePart = target.substring(0, colonIdx);
|
|
225356
|
+
suffix = target.substring(colonIdx);
|
|
225357
|
+
} else if (hashIdx !== -1) {
|
|
225358
|
+
filePart = target.substring(0, hashIdx);
|
|
225359
|
+
suffix = target.substring(hashIdx);
|
|
225360
|
+
} else {
|
|
225361
|
+
filePart = target;
|
|
225362
|
+
suffix = "";
|
|
225363
|
+
}
|
|
225364
|
+
if (!(0, import_path5.isAbsolute)(filePart) && cwd) {
|
|
225365
|
+
filePart = (0, import_path5.resolve)(cwd, filePart);
|
|
225366
|
+
}
|
|
225367
|
+
return filePart + suffix;
|
|
225546
225368
|
}
|
|
225547
|
-
var searchSchema, querySchema, extractSchema, delegateSchema, bashSchema, attemptCompletionSchema, searchToolDefinition, queryToolDefinition, extractToolDefinition, delegateToolDefinition, attemptCompletionToolDefinition, bashToolDefinition, searchDescription, queryDescription, extractDescription, delegateDescription, bashDescription, DEFAULT_VALID_TOOLS;
|
|
225369
|
+
var import_path5, searchSchema, querySchema, extractSchema, delegateSchema, bashSchema, attemptCompletionSchema, searchToolDefinition, queryToolDefinition, extractToolDefinition, delegateToolDefinition, attemptCompletionToolDefinition, bashToolDefinition, searchDescription, queryDescription, extractDescription, delegateDescription, bashDescription, DEFAULT_VALID_TOOLS;
|
|
225548
225370
|
var init_common2 = __esm({
|
|
225549
225371
|
"src/tools/common.js"() {
|
|
225550
225372
|
"use strict";
|
|
225551
225373
|
init_zod();
|
|
225374
|
+
import_path5 = __nccwpck_require__(16928);
|
|
225552
225375
|
searchSchema = external_exports.object({
|
|
225553
225376
|
query: external_exports.string().describe("Search query with Elasticsearch syntax. Use quotes for exact matches, AND/OR for boolean logic, - for negation."),
|
|
225554
225377
|
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.')
|
|
@@ -225850,11 +225673,267 @@ User: Check system info
|
|
|
225850
225673
|
"listFiles",
|
|
225851
225674
|
"searchFiles",
|
|
225852
225675
|
"implement",
|
|
225676
|
+
"bash",
|
|
225853
225677
|
"attempt_completion"
|
|
225854
225678
|
];
|
|
225855
225679
|
}
|
|
225856
225680
|
});
|
|
225857
225681
|
|
|
225682
|
+
// src/agent/xmlParsingUtils.js
|
|
225683
|
+
function removeThinkingTags(xmlString) {
|
|
225684
|
+
let result = xmlString;
|
|
225685
|
+
result = result.replace(/<thinking>[\s\S]*?<\/thinking>/g, "");
|
|
225686
|
+
const thinkingIndex = result.indexOf("<thinking>");
|
|
225687
|
+
if (thinkingIndex !== -1) {
|
|
225688
|
+
const afterThinking = result.substring(thinkingIndex + "<thinking>".length);
|
|
225689
|
+
const toolPattern = buildToolTagPattern(DEFAULT_VALID_TOOLS);
|
|
225690
|
+
const toolMatch = afterThinking.match(toolPattern);
|
|
225691
|
+
if (toolMatch) {
|
|
225692
|
+
const toolStart = thinkingIndex + "<thinking>".length + toolMatch.index;
|
|
225693
|
+
result = result.substring(0, thinkingIndex) + result.substring(toolStart);
|
|
225694
|
+
} else {
|
|
225695
|
+
result = result.substring(0, thinkingIndex);
|
|
225696
|
+
}
|
|
225697
|
+
}
|
|
225698
|
+
return result.trim();
|
|
225699
|
+
}
|
|
225700
|
+
function extractThinkingContent(xmlString) {
|
|
225701
|
+
const thinkingMatch = xmlString.match(/<thinking>([\s\S]*?)<\/thinking>/);
|
|
225702
|
+
return thinkingMatch ? thinkingMatch[1].trim() : null;
|
|
225703
|
+
}
|
|
225704
|
+
function checkAttemptCompleteRecovery(cleanedXmlString, validTools = []) {
|
|
225705
|
+
const openTagIndex = cleanedXmlString.indexOf("<attempt_completion>");
|
|
225706
|
+
if (openTagIndex !== -1) {
|
|
225707
|
+
const afterOpenTag = cleanedXmlString.substring(openTagIndex + "<attempt_completion>".length);
|
|
225708
|
+
const closeTagIndex = cleanedXmlString.lastIndexOf("</attempt_completion>");
|
|
225709
|
+
let content;
|
|
225710
|
+
let hasClosingTag = false;
|
|
225711
|
+
if (closeTagIndex !== -1 && closeTagIndex >= openTagIndex + "<attempt_completion>".length) {
|
|
225712
|
+
content = cleanedXmlString.substring(
|
|
225713
|
+
openTagIndex + "<attempt_completion>".length,
|
|
225714
|
+
closeTagIndex
|
|
225715
|
+
).trim();
|
|
225716
|
+
hasClosingTag = true;
|
|
225717
|
+
} else {
|
|
225718
|
+
content = afterOpenTag.trim();
|
|
225719
|
+
hasClosingTag = false;
|
|
225720
|
+
}
|
|
225721
|
+
if (content) {
|
|
225722
|
+
return {
|
|
225723
|
+
toolName: "attempt_completion",
|
|
225724
|
+
params: { result: content }
|
|
225725
|
+
};
|
|
225726
|
+
}
|
|
225727
|
+
return {
|
|
225728
|
+
toolName: "attempt_completion",
|
|
225729
|
+
params: { result: hasClosingTag ? "" : "__PREVIOUS_RESPONSE__" }
|
|
225730
|
+
};
|
|
225731
|
+
}
|
|
225732
|
+
const attemptCompletePatterns = [
|
|
225733
|
+
// Standard shorthand with optional whitespace
|
|
225734
|
+
/^<attempt_complete>\s*$/,
|
|
225735
|
+
// Empty with proper closing tag (common case from the logs)
|
|
225736
|
+
/^<attempt_complete>\s*<\/attempt_complete>\s*$/,
|
|
225737
|
+
// Self-closing variant
|
|
225738
|
+
/^<attempt_complete\s*\/>\s*$/,
|
|
225739
|
+
// Incomplete opening tag (missing closing bracket)
|
|
225740
|
+
/^<attempt_complete\s*$/,
|
|
225741
|
+
// With trailing content (extract just the tag part) - must come after empty tag pattern
|
|
225742
|
+
/^<attempt_complete>(.*)$/s,
|
|
225743
|
+
// Self-closing with trailing content
|
|
225744
|
+
/^<attempt_complete\s*\/>(.*)$/s
|
|
225745
|
+
];
|
|
225746
|
+
for (const pattern of attemptCompletePatterns) {
|
|
225747
|
+
const match2 = cleanedXmlString.match(pattern);
|
|
225748
|
+
if (match2) {
|
|
225749
|
+
return {
|
|
225750
|
+
toolName: "attempt_completion",
|
|
225751
|
+
params: { result: "__PREVIOUS_RESPONSE__" }
|
|
225752
|
+
};
|
|
225753
|
+
}
|
|
225754
|
+
}
|
|
225755
|
+
if (cleanedXmlString.includes("<attempt_complete") && !hasOtherToolTags(cleanedXmlString, validTools)) {
|
|
225756
|
+
return {
|
|
225757
|
+
toolName: "attempt_completion",
|
|
225758
|
+
params: { result: "__PREVIOUS_RESPONSE__" }
|
|
225759
|
+
};
|
|
225760
|
+
}
|
|
225761
|
+
return null;
|
|
225762
|
+
}
|
|
225763
|
+
function hasOtherToolTags(xmlString, validTools = []) {
|
|
225764
|
+
const toolsToCheck = validTools.length > 0 ? validTools : DEFAULT_VALID_TOOLS;
|
|
225765
|
+
for (const tool4 of toolsToCheck) {
|
|
225766
|
+
if (tool4 !== "attempt_completion" && xmlString.includes(`<${tool4}`)) {
|
|
225767
|
+
return true;
|
|
225768
|
+
}
|
|
225769
|
+
}
|
|
225770
|
+
return false;
|
|
225771
|
+
}
|
|
225772
|
+
function processXmlWithThinkingAndRecovery(xmlString, validTools = []) {
|
|
225773
|
+
const thinkingContent = extractThinkingContent(xmlString);
|
|
225774
|
+
const cleanedXmlString = removeThinkingTags(xmlString);
|
|
225775
|
+
const recoveryResult = checkAttemptCompleteRecovery(cleanedXmlString, validTools);
|
|
225776
|
+
if (process.env.DEBUG === "1" && thinkingContent) {
|
|
225777
|
+
console.log(`[DEBUG] AI Thinking Process:
|
|
225778
|
+
${thinkingContent}`);
|
|
225779
|
+
}
|
|
225780
|
+
return {
|
|
225781
|
+
cleanedXmlString,
|
|
225782
|
+
thinkingContent,
|
|
225783
|
+
recoveryResult
|
|
225784
|
+
};
|
|
225785
|
+
}
|
|
225786
|
+
var init_xmlParsingUtils = __esm({
|
|
225787
|
+
"src/agent/xmlParsingUtils.js"() {
|
|
225788
|
+
"use strict";
|
|
225789
|
+
init_common2();
|
|
225790
|
+
}
|
|
225791
|
+
});
|
|
225792
|
+
|
|
225793
|
+
// src/agent/tools.js
|
|
225794
|
+
function createTools(configOptions) {
|
|
225795
|
+
const tools2 = {};
|
|
225796
|
+
const isToolAllowed = configOptions.isToolAllowed || ((toolName) => {
|
|
225797
|
+
if (!configOptions.allowedTools) return true;
|
|
225798
|
+
return configOptions.allowedTools.isEnabled(toolName);
|
|
225799
|
+
});
|
|
225800
|
+
if (isToolAllowed("search")) {
|
|
225801
|
+
tools2.searchTool = searchTool(configOptions);
|
|
225802
|
+
}
|
|
225803
|
+
if (isToolAllowed("query")) {
|
|
225804
|
+
tools2.queryTool = queryTool(configOptions);
|
|
225805
|
+
}
|
|
225806
|
+
if (isToolAllowed("extract")) {
|
|
225807
|
+
tools2.extractTool = extractTool(configOptions);
|
|
225808
|
+
}
|
|
225809
|
+
if (configOptions.enableDelegate && isToolAllowed("delegate")) {
|
|
225810
|
+
tools2.delegateTool = delegateTool(configOptions);
|
|
225811
|
+
}
|
|
225812
|
+
if (configOptions.enableBash && isToolAllowed("bash")) {
|
|
225813
|
+
tools2.bashTool = bashTool(configOptions);
|
|
225814
|
+
}
|
|
225815
|
+
if (configOptions.allowEdit && isToolAllowed("edit")) {
|
|
225816
|
+
tools2.editTool = editTool(configOptions);
|
|
225817
|
+
}
|
|
225818
|
+
if (configOptions.allowEdit && isToolAllowed("create")) {
|
|
225819
|
+
tools2.createTool = createTool(configOptions);
|
|
225820
|
+
}
|
|
225821
|
+
return tools2;
|
|
225822
|
+
}
|
|
225823
|
+
function parseXmlToolCallWithThinking(xmlString, validTools) {
|
|
225824
|
+
const { cleanedXmlString, recoveryResult } = processXmlWithThinkingAndRecovery(xmlString, validTools);
|
|
225825
|
+
if (recoveryResult) {
|
|
225826
|
+
return recoveryResult;
|
|
225827
|
+
}
|
|
225828
|
+
return parseXmlToolCall(cleanedXmlString, validTools);
|
|
225829
|
+
}
|
|
225830
|
+
var import_crypto2, implementToolDefinition, listFilesToolDefinition, searchFilesToolDefinition, readImageToolDefinition;
|
|
225831
|
+
var init_tools = __esm({
|
|
225832
|
+
"src/agent/tools.js"() {
|
|
225833
|
+
"use strict";
|
|
225834
|
+
init_index();
|
|
225835
|
+
import_crypto2 = __nccwpck_require__(76982);
|
|
225836
|
+
init_xmlParsingUtils();
|
|
225837
|
+
implementToolDefinition = `
|
|
225838
|
+
## implement
|
|
225839
|
+
Description: Implement a given task. Can modify files. Can be used ONLY if task explicitly stated that something requires modification or implementation.
|
|
225840
|
+
|
|
225841
|
+
Parameters:
|
|
225842
|
+
- task: (required) The task description. Should be as detailed as possible, ideally pointing to exact files which needs be modified or created.
|
|
225843
|
+
- autoCommits: (optional) Whether to enable auto-commits in aider. Default is false.
|
|
225844
|
+
|
|
225845
|
+
Usage Example:
|
|
225846
|
+
|
|
225847
|
+
<examples>
|
|
225848
|
+
|
|
225849
|
+
User: Can you implement a function to calculate Fibonacci numbers in main.js?
|
|
225850
|
+
<implement>
|
|
225851
|
+
<task>Implement a recursive function to calculate the nth Fibonacci number in main.js</task>
|
|
225852
|
+
</implement>
|
|
225853
|
+
|
|
225854
|
+
User: Can you implement a function to calculate Fibonacci numbers in main.js with auto-commits?
|
|
225855
|
+
<implement>
|
|
225856
|
+
<task>Implement a recursive function to calculate the nth Fibonacci number in main.js</task>
|
|
225857
|
+
<autoCommits>true</autoCommits>
|
|
225858
|
+
</implement>
|
|
225859
|
+
|
|
225860
|
+
</examples>
|
|
225861
|
+
`;
|
|
225862
|
+
listFilesToolDefinition = `
|
|
225863
|
+
## listFiles
|
|
225864
|
+
Description: List files and directories in a specified location.
|
|
225865
|
+
|
|
225866
|
+
Parameters:
|
|
225867
|
+
- directory: (optional) The directory path to list files from. Defaults to current directory if not specified.
|
|
225868
|
+
|
|
225869
|
+
Usage Example:
|
|
225870
|
+
|
|
225871
|
+
<examples>
|
|
225872
|
+
|
|
225873
|
+
User: Can you list the files in the src directory?
|
|
225874
|
+
<listFiles>
|
|
225875
|
+
<directory>src</directory>
|
|
225876
|
+
</listFiles>
|
|
225877
|
+
|
|
225878
|
+
User: What files are in the current directory?
|
|
225879
|
+
<listFiles>
|
|
225880
|
+
</listFiles>
|
|
225881
|
+
|
|
225882
|
+
</examples>
|
|
225883
|
+
`;
|
|
225884
|
+
searchFilesToolDefinition = `
|
|
225885
|
+
## searchFiles
|
|
225886
|
+
Description: Find files with name matching a glob pattern with recursive search capability.
|
|
225887
|
+
|
|
225888
|
+
Parameters:
|
|
225889
|
+
- pattern: (required) The glob pattern to search for (e.g., "**/*.js", "*.md").
|
|
225890
|
+
- directory: (optional) The directory to search in. Defaults to current directory if not specified.
|
|
225891
|
+
- recursive: (optional) Whether to search recursively. Defaults to true.
|
|
225892
|
+
|
|
225893
|
+
Usage Example:
|
|
225894
|
+
|
|
225895
|
+
<examples>
|
|
225896
|
+
|
|
225897
|
+
User: Can you find all JavaScript files in the project?
|
|
225898
|
+
<searchFiles>
|
|
225899
|
+
<pattern>**/*.js</pattern>
|
|
225900
|
+
</searchFiles>
|
|
225901
|
+
|
|
225902
|
+
User: Find all markdown files in the docs directory, but only at the top level.
|
|
225903
|
+
<searchFiles>
|
|
225904
|
+
<pattern>*.md</pattern>
|
|
225905
|
+
<directory>docs</directory>
|
|
225906
|
+
<recursive>false</recursive>
|
|
225907
|
+
</searchFiles>
|
|
225908
|
+
|
|
225909
|
+
</examples>
|
|
225910
|
+
`;
|
|
225911
|
+
readImageToolDefinition = `
|
|
225912
|
+
## readImage
|
|
225913
|
+
Description: Read and load an image file so it can be viewed by the AI. Use this when you need to analyze, describe, or work with image content. Images from user messages are automatically loaded, but use this tool to explicitly read images mentioned in tool outputs or when you need to examine specific image files.
|
|
225914
|
+
|
|
225915
|
+
Parameters:
|
|
225916
|
+
- path: (required) The path to the image file to read. Supports png, jpg, jpeg, webp, bmp, and svg formats.
|
|
225917
|
+
|
|
225918
|
+
Usage Example:
|
|
225919
|
+
|
|
225920
|
+
<examples>
|
|
225921
|
+
|
|
225922
|
+
User: Can you describe what's in screenshot.png?
|
|
225923
|
+
<readImage>
|
|
225924
|
+
<path>screenshot.png</path>
|
|
225925
|
+
</readImage>
|
|
225926
|
+
|
|
225927
|
+
User: Analyze the diagram in docs/architecture.svg
|
|
225928
|
+
<readImage>
|
|
225929
|
+
<path>docs/architecture.svg</path>
|
|
225930
|
+
</readImage>
|
|
225931
|
+
|
|
225932
|
+
</examples>
|
|
225933
|
+
`;
|
|
225934
|
+
}
|
|
225935
|
+
});
|
|
225936
|
+
|
|
225858
225937
|
// node_modules/balanced-match/index.js
|
|
225859
225938
|
var require_balanced_match = __commonJS({
|
|
225860
225939
|
"node_modules/balanced-match/index.js"(exports2, module2) {
|
|
@@ -229536,10 +229615,10 @@ var init_esm3 = __esm({
|
|
|
229536
229615
|
* Return a void Promise that resolves once the stream ends.
|
|
229537
229616
|
*/
|
|
229538
229617
|
async promise() {
|
|
229539
|
-
return new Promise((
|
|
229618
|
+
return new Promise((resolve6, reject2) => {
|
|
229540
229619
|
this.on(DESTROYED, () => reject2(new Error("stream destroyed")));
|
|
229541
229620
|
this.on("error", (er) => reject2(er));
|
|
229542
|
-
this.on("end", () =>
|
|
229621
|
+
this.on("end", () => resolve6());
|
|
229543
229622
|
});
|
|
229544
229623
|
}
|
|
229545
229624
|
/**
|
|
@@ -229563,7 +229642,7 @@ var init_esm3 = __esm({
|
|
|
229563
229642
|
return Promise.resolve({ done: false, value: res });
|
|
229564
229643
|
if (this[EOF])
|
|
229565
229644
|
return stop();
|
|
229566
|
-
let
|
|
229645
|
+
let resolve6;
|
|
229567
229646
|
let reject2;
|
|
229568
229647
|
const onerr = (er) => {
|
|
229569
229648
|
this.off("data", ondata);
|
|
@@ -229577,19 +229656,19 @@ var init_esm3 = __esm({
|
|
|
229577
229656
|
this.off("end", onend);
|
|
229578
229657
|
this.off(DESTROYED, ondestroy);
|
|
229579
229658
|
this.pause();
|
|
229580
|
-
|
|
229659
|
+
resolve6({ value, done: !!this[EOF] });
|
|
229581
229660
|
};
|
|
229582
229661
|
const onend = () => {
|
|
229583
229662
|
this.off("error", onerr);
|
|
229584
229663
|
this.off("data", ondata);
|
|
229585
229664
|
this.off(DESTROYED, ondestroy);
|
|
229586
229665
|
stop();
|
|
229587
|
-
|
|
229666
|
+
resolve6({ done: true, value: void 0 });
|
|
229588
229667
|
};
|
|
229589
229668
|
const ondestroy = () => onerr(new Error("stream destroyed"));
|
|
229590
229669
|
return new Promise((res2, rej) => {
|
|
229591
229670
|
reject2 = rej;
|
|
229592
|
-
|
|
229671
|
+
resolve6 = res2;
|
|
229593
229672
|
this.once(DESTROYED, ondestroy);
|
|
229594
229673
|
this.once("error", onerr);
|
|
229595
229674
|
this.once("end", onend);
|
|
@@ -230569,9 +230648,9 @@ var init_esm4 = __esm({
|
|
|
230569
230648
|
if (this.#asyncReaddirInFlight) {
|
|
230570
230649
|
await this.#asyncReaddirInFlight;
|
|
230571
230650
|
} else {
|
|
230572
|
-
let
|
|
230651
|
+
let resolve6 = () => {
|
|
230573
230652
|
};
|
|
230574
|
-
this.#asyncReaddirInFlight = new Promise((res) =>
|
|
230653
|
+
this.#asyncReaddirInFlight = new Promise((res) => resolve6 = res);
|
|
230575
230654
|
try {
|
|
230576
230655
|
for (const e4 of await this.#fs.promises.readdir(fullpath, {
|
|
230577
230656
|
withFileTypes: true
|
|
@@ -230584,7 +230663,7 @@ var init_esm4 = __esm({
|
|
|
230584
230663
|
children.provisional = 0;
|
|
230585
230664
|
}
|
|
230586
230665
|
this.#asyncReaddirInFlight = void 0;
|
|
230587
|
-
|
|
230666
|
+
resolve6();
|
|
230588
230667
|
}
|
|
230589
230668
|
return children.slice(0, children.provisional);
|
|
230590
230669
|
}
|
|
@@ -230814,7 +230893,7 @@ var init_esm4 = __esm({
|
|
|
230814
230893
|
*
|
|
230815
230894
|
* @internal
|
|
230816
230895
|
*/
|
|
230817
|
-
constructor(cwd = process.cwd(), pathImpl,
|
|
230896
|
+
constructor(cwd = process.cwd(), pathImpl, sep5, { nocase, childrenCacheSize = 16 * 1024, fs: fs10 = defaultFS } = {}) {
|
|
230818
230897
|
this.#fs = fsFromOption(fs10);
|
|
230819
230898
|
if (cwd instanceof URL || cwd.startsWith("file://")) {
|
|
230820
230899
|
cwd = (0, import_node_url.fileURLToPath)(cwd);
|
|
@@ -230825,7 +230904,7 @@ var init_esm4 = __esm({
|
|
|
230825
230904
|
this.#resolveCache = new ResolveCache();
|
|
230826
230905
|
this.#resolvePosixCache = new ResolveCache();
|
|
230827
230906
|
this.#children = new ChildrenCache(childrenCacheSize);
|
|
230828
|
-
const split = cwdPath.substring(this.rootPath.length).split(
|
|
230907
|
+
const split = cwdPath.substring(this.rootPath.length).split(sep5);
|
|
230829
230908
|
if (split.length === 1 && !split[0]) {
|
|
230830
230909
|
split.pop();
|
|
230831
230910
|
}
|
|
@@ -232612,7 +232691,7 @@ function createWrappedTools(baseTools) {
|
|
|
232612
232691
|
}
|
|
232613
232692
|
return wrappedTools;
|
|
232614
232693
|
}
|
|
232615
|
-
var import_child_process6, import_util11, import_crypto3, import_events, import_fs5, import_fs6,
|
|
232694
|
+
var import_child_process6, import_util11, import_crypto3, import_events, import_fs5, import_fs6, import_path6, toolCallEmitter, activeToolExecutions, wrapToolWithEmitter, listFilesTool, searchFilesTool, listFilesToolInstance, searchFilesToolInstance;
|
|
232616
232695
|
var init_probeTool = __esm({
|
|
232617
232696
|
"src/agent/probeTool.js"() {
|
|
232618
232697
|
"use strict";
|
|
@@ -232623,7 +232702,7 @@ var init_probeTool = __esm({
|
|
|
232623
232702
|
import_events = __nccwpck_require__(24434);
|
|
232624
232703
|
import_fs5 = __toESM(__nccwpck_require__(79896), 1);
|
|
232625
232704
|
import_fs6 = __nccwpck_require__(79896);
|
|
232626
|
-
|
|
232705
|
+
import_path6 = __toESM(__nccwpck_require__(16928), 1);
|
|
232627
232706
|
init_esm5();
|
|
232628
232707
|
init_symlink_utils();
|
|
232629
232708
|
toolCallEmitter = new import_events.EventEmitter();
|
|
@@ -232712,17 +232791,17 @@ var init_probeTool = __esm({
|
|
|
232712
232791
|
execute: async (params) => {
|
|
232713
232792
|
const { directory = ".", workingDirectory } = params;
|
|
232714
232793
|
const baseCwd = workingDirectory || process.cwd();
|
|
232715
|
-
const secureBaseDir =
|
|
232794
|
+
const secureBaseDir = import_path6.default.resolve(baseCwd);
|
|
232716
232795
|
const isDependencyPath = directory.startsWith("/dep/") || directory.startsWith("go:") || directory.startsWith("js:") || directory.startsWith("rust:");
|
|
232717
232796
|
let targetDir;
|
|
232718
|
-
if (
|
|
232719
|
-
targetDir =
|
|
232720
|
-
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir +
|
|
232797
|
+
if (import_path6.default.isAbsolute(directory)) {
|
|
232798
|
+
targetDir = import_path6.default.resolve(directory);
|
|
232799
|
+
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir + import_path6.default.sep) && targetDir !== secureBaseDir) {
|
|
232721
232800
|
throw new Error(`Path traversal attempt detected. Cannot access directory outside workspace: ${directory}`);
|
|
232722
232801
|
}
|
|
232723
232802
|
} else {
|
|
232724
|
-
targetDir =
|
|
232725
|
-
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir +
|
|
232803
|
+
targetDir = import_path6.default.resolve(secureBaseDir, directory);
|
|
232804
|
+
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir + import_path6.default.sep) && targetDir !== secureBaseDir) {
|
|
232726
232805
|
throw new Error(`Path traversal attempt detected. Access denied: ${directory}`);
|
|
232727
232806
|
}
|
|
232728
232807
|
}
|
|
@@ -232739,7 +232818,7 @@ var init_probeTool = __esm({
|
|
|
232739
232818
|
return `${(size / (1024 * 1024 * 1024)).toFixed(1)}G`;
|
|
232740
232819
|
};
|
|
232741
232820
|
const entries = await Promise.all(files.map(async (file) => {
|
|
232742
|
-
const fullPath =
|
|
232821
|
+
const fullPath = import_path6.default.join(targetDir, file.name);
|
|
232743
232822
|
const entryType = await getEntryType(file, fullPath);
|
|
232744
232823
|
return {
|
|
232745
232824
|
name: file.name,
|
|
@@ -232776,17 +232855,17 @@ var init_probeTool = __esm({
|
|
|
232776
232855
|
throw new Error("Pattern is required for file search");
|
|
232777
232856
|
}
|
|
232778
232857
|
const baseCwd = workingDirectory || process.cwd();
|
|
232779
|
-
const secureBaseDir =
|
|
232858
|
+
const secureBaseDir = import_path6.default.resolve(baseCwd);
|
|
232780
232859
|
const isDependencyPath = directory.startsWith("/dep/") || directory.startsWith("go:") || directory.startsWith("js:") || directory.startsWith("rust:");
|
|
232781
232860
|
let targetDir;
|
|
232782
|
-
if (
|
|
232783
|
-
targetDir =
|
|
232784
|
-
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir +
|
|
232861
|
+
if (import_path6.default.isAbsolute(directory)) {
|
|
232862
|
+
targetDir = import_path6.default.resolve(directory);
|
|
232863
|
+
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir + import_path6.default.sep) && targetDir !== secureBaseDir) {
|
|
232785
232864
|
throw new Error(`Path traversal attempt detected. Cannot access directory outside workspace: ${directory}`);
|
|
232786
232865
|
}
|
|
232787
232866
|
} else {
|
|
232788
|
-
targetDir =
|
|
232789
|
-
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir +
|
|
232867
|
+
targetDir = import_path6.default.resolve(secureBaseDir, directory);
|
|
232868
|
+
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir + import_path6.default.sep) && targetDir !== secureBaseDir) {
|
|
232790
232869
|
throw new Error(`Path traversal attempt detected. Access denied: ${directory}`);
|
|
232791
232870
|
}
|
|
232792
232871
|
}
|
|
@@ -232832,7 +232911,7 @@ function createMockProvider() {
|
|
|
232832
232911
|
provider: "mock",
|
|
232833
232912
|
// Mock the doGenerate method used by Vercel AI SDK
|
|
232834
232913
|
doGenerate: async ({ messages, tools: tools2 }) => {
|
|
232835
|
-
await new Promise((
|
|
232914
|
+
await new Promise((resolve6) => setTimeout(resolve6, 10));
|
|
232836
232915
|
return {
|
|
232837
232916
|
text: "This is a mock response for testing",
|
|
232838
232917
|
toolCalls: [],
|
|
@@ -258587,7 +258666,7 @@ var require_bk = __commonJS({
|
|
|
258587
258666
|
return xs;
|
|
258588
258667
|
}
|
|
258589
258668
|
function buildBlockGraph(g4, layering, root2, reverseSep) {
|
|
258590
|
-
var blockGraph = new Graph(), graphLabel = g4.graph(), sepFn =
|
|
258669
|
+
var blockGraph = new Graph(), graphLabel = g4.graph(), sepFn = sep5(graphLabel.nodesep, graphLabel.edgesep, reverseSep);
|
|
258591
258670
|
_.forEach(layering, function(layer) {
|
|
258592
258671
|
var u4;
|
|
258593
258672
|
_.forEach(layer, function(v4) {
|
|
@@ -258677,7 +258756,7 @@ var require_bk = __commonJS({
|
|
|
258677
258756
|
alignCoordinates(xss, smallestWidth);
|
|
258678
258757
|
return balance(xss, g4.graph().align);
|
|
258679
258758
|
}
|
|
258680
|
-
function
|
|
258759
|
+
function sep5(nodeSep, edgeSep, reverseSep) {
|
|
258681
258760
|
return function(g4, v4, w4) {
|
|
258682
258761
|
var vLabel = g4.node(v4);
|
|
258683
258762
|
var wLabel = g4.node(w4);
|
|
@@ -265971,7 +266050,7 @@ var require_compile = __commonJS({
|
|
|
265971
266050
|
const schOrFunc = root2.refs[ref];
|
|
265972
266051
|
if (schOrFunc)
|
|
265973
266052
|
return schOrFunc;
|
|
265974
|
-
let _sch =
|
|
266053
|
+
let _sch = resolve6.call(this, root2, ref);
|
|
265975
266054
|
if (_sch === void 0) {
|
|
265976
266055
|
const schema = (_a16 = root2.localRefs) === null || _a16 === void 0 ? void 0 : _a16[ref];
|
|
265977
266056
|
const { schemaId } = this.opts;
|
|
@@ -265998,7 +266077,7 @@ var require_compile = __commonJS({
|
|
|
265998
266077
|
function sameSchemaEnv(s1, s22) {
|
|
265999
266078
|
return s1.schema === s22.schema && s1.root === s22.root && s1.baseId === s22.baseId;
|
|
266000
266079
|
}
|
|
266001
|
-
function
|
|
266080
|
+
function resolve6(root2, ref) {
|
|
266002
266081
|
let sch;
|
|
266003
266082
|
while (typeof (sch = this.refs[ref]) == "string")
|
|
266004
266083
|
ref = sch;
|
|
@@ -266573,7 +266652,7 @@ var require_fast_uri = __commonJS({
|
|
|
266573
266652
|
}
|
|
266574
266653
|
return uri;
|
|
266575
266654
|
}
|
|
266576
|
-
function
|
|
266655
|
+
function resolve6(baseURI, relativeURI, options) {
|
|
266577
266656
|
const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
|
|
266578
266657
|
const resolved = resolveComponent(parse6(baseURI, schemelessOptions), parse6(relativeURI, schemelessOptions), schemelessOptions, true);
|
|
266579
266658
|
schemelessOptions.skipEscape = true;
|
|
@@ -266800,7 +266879,7 @@ var require_fast_uri = __commonJS({
|
|
|
266800
266879
|
var fastUri = {
|
|
266801
266880
|
SCHEMES,
|
|
266802
266881
|
normalize: normalize3,
|
|
266803
|
-
resolve:
|
|
266882
|
+
resolve: resolve6,
|
|
266804
266883
|
resolveComponent,
|
|
266805
266884
|
equal,
|
|
266806
266885
|
serialize,
|
|
@@ -271130,13 +271209,13 @@ function loadMCPConfiguration() {
|
|
|
271130
271209
|
// Environment variable path
|
|
271131
271210
|
process.env.MCP_CONFIG_PATH,
|
|
271132
271211
|
// Local project paths
|
|
271133
|
-
(0,
|
|
271134
|
-
(0,
|
|
271212
|
+
(0, import_path7.join)(process.cwd(), ".mcp", "config.json"),
|
|
271213
|
+
(0, import_path7.join)(process.cwd(), "mcp.config.json"),
|
|
271135
271214
|
// Home directory paths
|
|
271136
|
-
(0,
|
|
271137
|
-
(0,
|
|
271215
|
+
(0, import_path7.join)((0, import_os3.homedir)(), ".config", "probe", "mcp.json"),
|
|
271216
|
+
(0, import_path7.join)((0, import_os3.homedir)(), ".mcp", "config.json"),
|
|
271138
271217
|
// Claude-style config location
|
|
271139
|
-
(0,
|
|
271218
|
+
(0, import_path7.join)((0, import_os3.homedir)(), "Library", "Application Support", "Claude", "mcp_config.json")
|
|
271140
271219
|
].filter(Boolean);
|
|
271141
271220
|
let config = null;
|
|
271142
271221
|
for (const configPath of configPaths) {
|
|
@@ -271254,16 +271333,16 @@ function parseEnabledServers(config) {
|
|
|
271254
271333
|
}
|
|
271255
271334
|
return servers;
|
|
271256
271335
|
}
|
|
271257
|
-
var import_fs7,
|
|
271336
|
+
var import_fs7, import_path7, import_os3, import_url4, __filename4, __dirname4, DEFAULT_TIMEOUT, MAX_TIMEOUT, DEFAULT_CONFIG;
|
|
271258
271337
|
var init_config = __esm({
|
|
271259
271338
|
"src/agent/mcp/config.js"() {
|
|
271260
271339
|
"use strict";
|
|
271261
271340
|
import_fs7 = __nccwpck_require__(79896);
|
|
271262
|
-
|
|
271341
|
+
import_path7 = __nccwpck_require__(16928);
|
|
271263
271342
|
import_os3 = __nccwpck_require__(70857);
|
|
271264
271343
|
import_url4 = __nccwpck_require__(87016);
|
|
271265
271344
|
__filename4 = (0, import_url4.fileURLToPath)("file:///");
|
|
271266
|
-
__dirname4 = (0,
|
|
271345
|
+
__dirname4 = (0, import_path7.dirname)(__filename4);
|
|
271267
271346
|
DEFAULT_TIMEOUT = 3e4;
|
|
271268
271347
|
MAX_TIMEOUT = 6e5;
|
|
271269
271348
|
DEFAULT_CONFIG = {
|
|
@@ -271271,7 +271350,7 @@ var init_config = __esm({
|
|
|
271271
271350
|
// Example probe server configuration
|
|
271272
271351
|
"probe-local": {
|
|
271273
271352
|
command: "node",
|
|
271274
|
-
args: [(0,
|
|
271353
|
+
args: [(0, import_path7.join)(__dirname4, "../../../examples/chat/mcpServer.js")],
|
|
271275
271354
|
transport: "stdio",
|
|
271276
271355
|
enabled: false
|
|
271277
271356
|
},
|
|
@@ -271911,7 +271990,7 @@ function extractErrorInfo(error2) {
|
|
|
271911
271990
|
};
|
|
271912
271991
|
}
|
|
271913
271992
|
function sleep(ms) {
|
|
271914
|
-
return new Promise((
|
|
271993
|
+
return new Promise((resolve6) => setTimeout(resolve6, ms));
|
|
271915
271994
|
}
|
|
271916
271995
|
var DEFAULT_RETRYABLE_ERRORS, RetryManager;
|
|
271917
271996
|
var init_RetryManager = __esm({
|
|
@@ -272745,7 +272824,7 @@ var init_built_in_server = __esm({
|
|
|
272745
272824
|
}
|
|
272746
272825
|
});
|
|
272747
272826
|
this.registerHandlers();
|
|
272748
|
-
return new Promise((
|
|
272827
|
+
return new Promise((resolve6, reject2) => {
|
|
272749
272828
|
this.httpServer.listen(this.port, this.host, async () => {
|
|
272750
272829
|
const address = this.httpServer.address();
|
|
272751
272830
|
this.port = address.port;
|
|
@@ -272755,7 +272834,7 @@ var init_built_in_server = __esm({
|
|
|
272755
272834
|
console.log(`[MCP] Messages endpoint: http://${this.host}:${this.port}/messages`);
|
|
272756
272835
|
}
|
|
272757
272836
|
this.emit("ready", { host: this.host, port: this.port });
|
|
272758
|
-
|
|
272837
|
+
resolve6({ host: this.host, port: this.port });
|
|
272759
272838
|
});
|
|
272760
272839
|
this.httpServer.on("error", reject2);
|
|
272761
272840
|
});
|
|
@@ -272974,7 +273053,7 @@ var init_built_in_server = __esm({
|
|
|
272974
273053
|
* Parse request body as JSON
|
|
272975
273054
|
*/
|
|
272976
273055
|
async parseRequestBody(req) {
|
|
272977
|
-
return new Promise((
|
|
273056
|
+
return new Promise((resolve6, reject2) => {
|
|
272978
273057
|
let body = "";
|
|
272979
273058
|
req.on("data", (chunk) => {
|
|
272980
273059
|
body += chunk.toString();
|
|
@@ -272982,7 +273061,7 @@ var init_built_in_server = __esm({
|
|
|
272982
273061
|
req.on("end", () => {
|
|
272983
273062
|
try {
|
|
272984
273063
|
const parsed = body ? JSON.parse(body) : null;
|
|
272985
|
-
|
|
273064
|
+
resolve6(parsed);
|
|
272986
273065
|
} catch (error2) {
|
|
272987
273066
|
reject2(error2);
|
|
272988
273067
|
}
|
|
@@ -273289,12 +273368,12 @@ data: ${JSON.stringify(data2)}
|
|
|
273289
273368
|
}
|
|
273290
273369
|
this.connections.clear();
|
|
273291
273370
|
if (this.httpServer) {
|
|
273292
|
-
return new Promise((
|
|
273371
|
+
return new Promise((resolve6) => {
|
|
273293
273372
|
this.httpServer.close(() => {
|
|
273294
273373
|
if (this.debug) {
|
|
273295
273374
|
console.log("[MCP] Built-in server stopped");
|
|
273296
273375
|
}
|
|
273297
|
-
|
|
273376
|
+
resolve6();
|
|
273298
273377
|
});
|
|
273299
273378
|
});
|
|
273300
273379
|
}
|
|
@@ -273393,12 +273472,12 @@ async function createEnhancedClaudeCLIEngine(options = {}) {
|
|
|
273393
273472
|
console.log("[DEBUG] Built-in MCP server started");
|
|
273394
273473
|
console.log("[DEBUG] MCP URL:", `http://${host}:${port}/mcp`);
|
|
273395
273474
|
}
|
|
273396
|
-
mcpConfigPath =
|
|
273475
|
+
mcpConfigPath = import_path8.default.join(import_os4.default.tmpdir(), `probe-mcp-${session.id}.json`);
|
|
273397
273476
|
const mcpConfig = {
|
|
273398
273477
|
mcpServers: {
|
|
273399
273478
|
probe: {
|
|
273400
273479
|
command: "node",
|
|
273401
|
-
args: [
|
|
273480
|
+
args: [import_path8.default.join(process.cwd(), "mcp-probe-server.js")],
|
|
273402
273481
|
env: {
|
|
273403
273482
|
PROBE_WORKSPACE: process.cwd(),
|
|
273404
273483
|
DEBUG: debug ? "true" : "false"
|
|
@@ -273567,8 +273646,8 @@ ${opts.schema}`;
|
|
|
273567
273646
|
break;
|
|
273568
273647
|
}
|
|
273569
273648
|
} else if (!processEnded) {
|
|
273570
|
-
await new Promise((
|
|
273571
|
-
resolver =
|
|
273649
|
+
await new Promise((resolve6) => {
|
|
273650
|
+
resolver = resolve6;
|
|
273572
273651
|
});
|
|
273573
273652
|
}
|
|
273574
273653
|
}
|
|
@@ -273767,14 +273846,14 @@ function combinePrompts(systemPrompt, customPrompt, agent) {
|
|
|
273767
273846
|
}
|
|
273768
273847
|
return systemPrompt || "";
|
|
273769
273848
|
}
|
|
273770
|
-
var import_child_process7, import_crypto5, import_promises2,
|
|
273849
|
+
var import_child_process7, import_crypto5, import_promises2, import_path8, import_os4, import_events3;
|
|
273771
273850
|
var init_enhanced_claude_code = __esm({
|
|
273772
273851
|
"src/agent/engines/enhanced-claude-code.js"() {
|
|
273773
273852
|
"use strict";
|
|
273774
273853
|
import_child_process7 = __nccwpck_require__(35317);
|
|
273775
273854
|
import_crypto5 = __nccwpck_require__(76982);
|
|
273776
273855
|
import_promises2 = __toESM(__nccwpck_require__(91943), 1);
|
|
273777
|
-
|
|
273856
|
+
import_path8 = __toESM(__nccwpck_require__(16928), 1);
|
|
273778
273857
|
import_os4 = __toESM(__nccwpck_require__(70857), 1);
|
|
273779
273858
|
import_events3 = __nccwpck_require__(24434);
|
|
273780
273859
|
init_built_in_server();
|
|
@@ -273832,12 +273911,12 @@ async function createCodexEngine(options = {}) {
|
|
|
273832
273911
|
}
|
|
273833
273912
|
}
|
|
273834
273913
|
if (message.id !== void 0 && pendingRequests.has(message.id)) {
|
|
273835
|
-
const { resolve:
|
|
273914
|
+
const { resolve: resolve6, reject: reject2 } = pendingRequests.get(message.id);
|
|
273836
273915
|
pendingRequests.delete(message.id);
|
|
273837
273916
|
if (message.error) {
|
|
273838
273917
|
reject2(new Error(message.error.message || JSON.stringify(message.error)));
|
|
273839
273918
|
} else {
|
|
273840
|
-
|
|
273919
|
+
resolve6(message.result);
|
|
273841
273920
|
}
|
|
273842
273921
|
}
|
|
273843
273922
|
if (message.method === "codex/event" && message.params) {
|
|
@@ -273858,7 +273937,7 @@ async function createCodexEngine(options = {}) {
|
|
|
273858
273937
|
});
|
|
273859
273938
|
}
|
|
273860
273939
|
function sendRequest(method, params = {}) {
|
|
273861
|
-
return new Promise((
|
|
273940
|
+
return new Promise((resolve6, reject2) => {
|
|
273862
273941
|
const id = ++requestId;
|
|
273863
273942
|
const request = {
|
|
273864
273943
|
jsonrpc: "2.0",
|
|
@@ -273866,7 +273945,7 @@ async function createCodexEngine(options = {}) {
|
|
|
273866
273945
|
method,
|
|
273867
273946
|
params
|
|
273868
273947
|
};
|
|
273869
|
-
pendingRequests.set(id, { resolve:
|
|
273948
|
+
pendingRequests.set(id, { resolve: resolve6, reject: reject2 });
|
|
273870
273949
|
setTimeout(() => {
|
|
273871
273950
|
if (pendingRequests.has(id)) {
|
|
273872
273951
|
pendingRequests.delete(id);
|
|
@@ -273929,7 +274008,7 @@ ${prompt}`;
|
|
|
273929
274008
|
const reqId = requestId + 1;
|
|
273930
274009
|
let fullResponse = "";
|
|
273931
274010
|
let gotSessionId = false;
|
|
273932
|
-
const eventPromise = new Promise((
|
|
274011
|
+
const eventPromise = new Promise((resolve6) => {
|
|
273933
274012
|
eventHandlers.set(reqId, (eventParams) => {
|
|
273934
274013
|
const msg = eventParams.msg;
|
|
273935
274014
|
if (msg.type === "session_configured" && msg.session_id && !gotSessionId) {
|
|
@@ -273949,7 +274028,7 @@ ${prompt}`;
|
|
|
273949
274028
|
});
|
|
273950
274029
|
setTimeout(() => {
|
|
273951
274030
|
eventHandlers.delete(reqId);
|
|
273952
|
-
|
|
274031
|
+
resolve6();
|
|
273953
274032
|
}, 6e5);
|
|
273954
274033
|
});
|
|
273955
274034
|
const resultPromise = sendRequest("tools/call", {
|
|
@@ -274131,7 +274210,7 @@ var ProbeAgent_exports = {};
|
|
|
274131
274210
|
__export(ProbeAgent_exports, {
|
|
274132
274211
|
ProbeAgent: () => ProbeAgent
|
|
274133
274212
|
});
|
|
274134
|
-
var import_dotenv, import_anthropic2, import_openai2, import_google2, import_ai2, import_crypto7, import_events4, import_fs8, import_promises3,
|
|
274213
|
+
var import_dotenv, import_anthropic2, import_openai2, import_google2, import_ai2, import_crypto7, import_events4, import_fs8, import_promises3, import_path9, MAX_TOOL_ITERATIONS, MAX_HISTORY_MESSAGES, MAX_IMAGE_FILE_SIZE, ProbeAgent;
|
|
274135
274214
|
var init_ProbeAgent = __esm({
|
|
274136
274215
|
"src/agent/ProbeAgent.js"() {
|
|
274137
274216
|
"use strict";
|
|
@@ -274145,7 +274224,7 @@ var init_ProbeAgent = __esm({
|
|
|
274145
274224
|
import_events4 = __nccwpck_require__(24434);
|
|
274146
274225
|
import_fs8 = __nccwpck_require__(79896);
|
|
274147
274226
|
import_promises3 = __nccwpck_require__(91943);
|
|
274148
|
-
|
|
274227
|
+
import_path9 = __nccwpck_require__(16928);
|
|
274149
274228
|
init_tokenCounter();
|
|
274150
274229
|
init_InMemoryStorageAdapter();
|
|
274151
274230
|
init_HookManager();
|
|
@@ -274472,7 +274551,7 @@ var init_ProbeAgent = __esm({
|
|
|
274472
274551
|
if (!imagePath) {
|
|
274473
274552
|
throw new Error("Image path is required");
|
|
274474
274553
|
}
|
|
274475
|
-
const filename = (0,
|
|
274554
|
+
const filename = (0, import_path9.basename)(imagePath);
|
|
274476
274555
|
const extension = filename.toLowerCase().split(".").pop();
|
|
274477
274556
|
if (!extension || !SUPPORTED_IMAGE_EXTENSIONS.includes(extension)) {
|
|
274478
274557
|
throw new Error(`Invalid or unsupported image extension: ${extension}. Supported formats: ${SUPPORTED_IMAGE_EXTENSIONS.join(", ")}`);
|
|
@@ -275027,7 +275106,7 @@ var init_ProbeAgent = __esm({
|
|
|
275027
275106
|
let resolvedPath2 = imagePath;
|
|
275028
275107
|
if (!imagePath.includes("/") && !imagePath.includes("\\")) {
|
|
275029
275108
|
for (const dir of listFilesDirectories) {
|
|
275030
|
-
const potentialPath = (0,
|
|
275109
|
+
const potentialPath = (0, import_path9.resolve)(dir, imagePath);
|
|
275031
275110
|
const loaded = await this.loadImageIfValid(potentialPath);
|
|
275032
275111
|
if (loaded) {
|
|
275033
275112
|
if (this.debug) {
|
|
@@ -275052,7 +275131,7 @@ var init_ProbeAgent = __esm({
|
|
|
275052
275131
|
let match2;
|
|
275053
275132
|
while ((match2 = fileHeaderPattern.exec(content)) !== null) {
|
|
275054
275133
|
const filePath = match2[1].trim();
|
|
275055
|
-
const dir = (0,
|
|
275134
|
+
const dir = (0, import_path9.dirname)(filePath);
|
|
275056
275135
|
if (dir && dir !== ".") {
|
|
275057
275136
|
directories.push(dir);
|
|
275058
275137
|
if (this.debug) {
|
|
@@ -275097,17 +275176,17 @@ var init_ProbeAgent = __esm({
|
|
|
275097
275176
|
const allowedDirs = this.allowedFolders && this.allowedFolders.length > 0 ? this.allowedFolders : [process.cwd()];
|
|
275098
275177
|
let absolutePath;
|
|
275099
275178
|
let isPathAllowed2 = false;
|
|
275100
|
-
if ((0,
|
|
275101
|
-
absolutePath = (0,
|
|
275179
|
+
if ((0, import_path9.isAbsolute)(imagePath)) {
|
|
275180
|
+
absolutePath = (0, import_path9.normalize)((0, import_path9.resolve)(imagePath));
|
|
275102
275181
|
isPathAllowed2 = allowedDirs.some((dir) => {
|
|
275103
|
-
const normalizedDir = (0,
|
|
275104
|
-
return absolutePath === normalizedDir || absolutePath.startsWith(normalizedDir +
|
|
275182
|
+
const normalizedDir = (0, import_path9.normalize)((0, import_path9.resolve)(dir));
|
|
275183
|
+
return absolutePath === normalizedDir || absolutePath.startsWith(normalizedDir + import_path9.sep);
|
|
275105
275184
|
});
|
|
275106
275185
|
} else {
|
|
275107
275186
|
for (const dir of allowedDirs) {
|
|
275108
|
-
const normalizedDir = (0,
|
|
275109
|
-
const resolvedPath2 = (0,
|
|
275110
|
-
if (resolvedPath2 === normalizedDir || resolvedPath2.startsWith(normalizedDir +
|
|
275187
|
+
const normalizedDir = (0, import_path9.normalize)((0, import_path9.resolve)(dir));
|
|
275188
|
+
const resolvedPath2 = (0, import_path9.normalize)((0, import_path9.resolve)(dir, imagePath));
|
|
275189
|
+
if (resolvedPath2 === normalizedDir || resolvedPath2.startsWith(normalizedDir + import_path9.sep)) {
|
|
275111
275190
|
absolutePath = resolvedPath2;
|
|
275112
275191
|
isPathAllowed2 = true;
|
|
275113
275192
|
break;
|
|
@@ -276037,12 +276116,12 @@ ${toolResultContent}
|
|
|
276037
276116
|
}
|
|
276038
276117
|
} else if (this.toolImplementations[toolName]) {
|
|
276039
276118
|
try {
|
|
276040
|
-
let resolvedWorkingDirectory = this.allowedFolders && this.allowedFolders[0] || process.cwd();
|
|
276119
|
+
let resolvedWorkingDirectory = this.cwd || this.allowedFolders && this.allowedFolders[0] || process.cwd();
|
|
276041
276120
|
if (params.workingDirectory) {
|
|
276042
|
-
const requestedDir = (0,
|
|
276121
|
+
const requestedDir = (0, import_path9.isAbsolute)(params.workingDirectory) ? (0, import_path9.resolve)(params.workingDirectory) : (0, import_path9.resolve)(resolvedWorkingDirectory, params.workingDirectory);
|
|
276043
276122
|
const isWithinAllowed = !this.allowedFolders || this.allowedFolders.length === 0 || this.allowedFolders.some((folder) => {
|
|
276044
|
-
const resolvedFolder = (0,
|
|
276045
|
-
return requestedDir === resolvedFolder || requestedDir.startsWith(resolvedFolder +
|
|
276123
|
+
const resolvedFolder = (0, import_path9.resolve)(folder);
|
|
276124
|
+
return requestedDir === resolvedFolder || requestedDir.startsWith(resolvedFolder + import_path9.sep);
|
|
276046
276125
|
});
|
|
276047
276126
|
if (isWithinAllowed) {
|
|
276048
276127
|
resolvedWorkingDirectory = requestedDir;
|
|
@@ -277222,13 +277301,14 @@ var init_vercel = __esm({
|
|
|
277222
277301
|
execute: async ({ query: searchQuery, path: path9, allow_tests, exact, maxTokens: paramMaxTokens, language }) => {
|
|
277223
277302
|
try {
|
|
277224
277303
|
const effectiveMaxTokens = paramMaxTokens || maxTokens;
|
|
277225
|
-
let
|
|
277226
|
-
if (
|
|
277227
|
-
|
|
277228
|
-
|
|
277229
|
-
|
|
277230
|
-
|
|
277304
|
+
let searchPaths;
|
|
277305
|
+
if (path9) {
|
|
277306
|
+
searchPaths = parseAndResolvePaths(path9, options.cwd);
|
|
277307
|
+
}
|
|
277308
|
+
if (!searchPaths || searchPaths.length === 0) {
|
|
277309
|
+
searchPaths = [options.cwd || "."];
|
|
277231
277310
|
}
|
|
277311
|
+
const searchPath = searchPaths.join(" ");
|
|
277232
277312
|
if (debug) {
|
|
277233
277313
|
console.error(`Executing search with query: "${searchQuery}", path: "${searchPath}", exact: ${exact ? "true" : "false"}, language: ${language || "all"}, session: ${sessionId || "none"}`);
|
|
277234
277314
|
}
|
|
@@ -277266,13 +277346,14 @@ var init_vercel = __esm({
|
|
|
277266
277346
|
inputSchema: querySchema,
|
|
277267
277347
|
execute: async ({ pattern, path: path9, language, allow_tests }) => {
|
|
277268
277348
|
try {
|
|
277269
|
-
let
|
|
277270
|
-
if (
|
|
277271
|
-
|
|
277272
|
-
console.error(`Using cwd "${options.cwd}" instead of "${queryPath}"`);
|
|
277273
|
-
}
|
|
277274
|
-
queryPath = options.cwd;
|
|
277349
|
+
let queryPaths;
|
|
277350
|
+
if (path9) {
|
|
277351
|
+
queryPaths = parseAndResolvePaths(path9, options.cwd);
|
|
277275
277352
|
}
|
|
277353
|
+
if (!queryPaths || queryPaths.length === 0) {
|
|
277354
|
+
queryPaths = [options.cwd || "."];
|
|
277355
|
+
}
|
|
277356
|
+
const queryPath = queryPaths.join(" ");
|
|
277276
277357
|
if (debug) {
|
|
277277
277358
|
console.error(`Executing query with pattern: "${pattern}", path: "${queryPath}", language: ${language || "auto"}`);
|
|
277278
277359
|
}
|
|
@@ -277333,7 +277414,8 @@ var init_vercel = __esm({
|
|
|
277333
277414
|
format: effectiveFormat
|
|
277334
277415
|
};
|
|
277335
277416
|
} else if (targets) {
|
|
277336
|
-
const
|
|
277417
|
+
const parsedTargets = parseTargets(targets);
|
|
277418
|
+
const files = parsedTargets.map((target) => resolveTargetPath(target, effectiveCwd));
|
|
277337
277419
|
let effectiveFormat = format2;
|
|
277338
277420
|
if (outline && format2 === "outline-xml") {
|
|
277339
277421
|
effectiveFormat = "xml";
|
|
@@ -278353,7 +278435,7 @@ async function executeBashCommand(command, options = {}) {
|
|
|
278353
278435
|
} = options;
|
|
278354
278436
|
let cwd = workingDirectory;
|
|
278355
278437
|
try {
|
|
278356
|
-
cwd = (0,
|
|
278438
|
+
cwd = (0, import_path10.resolve)(cwd);
|
|
278357
278439
|
if (!(0, import_fs9.existsSync)(cwd)) {
|
|
278358
278440
|
throw new Error(`Working directory does not exist: ${cwd}`);
|
|
278359
278441
|
}
|
|
@@ -278375,7 +278457,7 @@ async function executeBashCommand(command, options = {}) {
|
|
|
278375
278457
|
console.log(`[BashExecutor] Working directory: "${cwd}"`);
|
|
278376
278458
|
console.log(`[BashExecutor] Timeout: ${timeout}ms`);
|
|
278377
278459
|
}
|
|
278378
|
-
return new Promise((
|
|
278460
|
+
return new Promise((resolve6, reject2) => {
|
|
278379
278461
|
const processEnv = {
|
|
278380
278462
|
...process.env,
|
|
278381
278463
|
...env
|
|
@@ -278392,7 +278474,7 @@ async function executeBashCommand(command, options = {}) {
|
|
|
278392
278474
|
} else {
|
|
278393
278475
|
const args = parseCommandForExecution(command);
|
|
278394
278476
|
if (!args || args.length === 0) {
|
|
278395
|
-
|
|
278477
|
+
resolve6({
|
|
278396
278478
|
success: false,
|
|
278397
278479
|
error: "Failed to parse command",
|
|
278398
278480
|
stdout: "",
|
|
@@ -278477,7 +278559,7 @@ async function executeBashCommand(command, options = {}) {
|
|
|
278477
278559
|
success = false;
|
|
278478
278560
|
error2 = `Command exited with code ${code}`;
|
|
278479
278561
|
}
|
|
278480
|
-
|
|
278562
|
+
resolve6({
|
|
278481
278563
|
success,
|
|
278482
278564
|
error: error2,
|
|
278483
278565
|
stdout: stdout.trim(),
|
|
@@ -278497,7 +278579,7 @@ async function executeBashCommand(command, options = {}) {
|
|
|
278497
278579
|
if (debug) {
|
|
278498
278580
|
console.log(`[BashExecutor] Spawn error:`, error2);
|
|
278499
278581
|
}
|
|
278500
|
-
|
|
278582
|
+
resolve6({
|
|
278501
278583
|
success: false,
|
|
278502
278584
|
error: `Failed to execute command: ${error2.message}`,
|
|
278503
278585
|
stdout: "",
|
|
@@ -278591,24 +278673,24 @@ function validateExecutionOptions(options = {}) {
|
|
|
278591
278673
|
warnings
|
|
278592
278674
|
};
|
|
278593
278675
|
}
|
|
278594
|
-
var import_child_process9,
|
|
278676
|
+
var import_child_process9, import_path10, import_fs9;
|
|
278595
278677
|
var init_bashExecutor = __esm({
|
|
278596
278678
|
"src/agent/bashExecutor.js"() {
|
|
278597
278679
|
"use strict";
|
|
278598
278680
|
import_child_process9 = __nccwpck_require__(35317);
|
|
278599
|
-
|
|
278681
|
+
import_path10 = __nccwpck_require__(16928);
|
|
278600
278682
|
import_fs9 = __nccwpck_require__(79896);
|
|
278601
278683
|
init_bashCommandUtils();
|
|
278602
278684
|
}
|
|
278603
278685
|
});
|
|
278604
278686
|
|
|
278605
278687
|
// src/tools/bash.js
|
|
278606
|
-
var import_ai4,
|
|
278688
|
+
var import_ai4, import_path11, bashTool;
|
|
278607
278689
|
var init_bash = __esm({
|
|
278608
278690
|
"src/tools/bash.js"() {
|
|
278609
278691
|
"use strict";
|
|
278610
278692
|
import_ai4 = __nccwpck_require__(86619);
|
|
278611
|
-
|
|
278693
|
+
import_path11 = __nccwpck_require__(16928);
|
|
278612
278694
|
init_bashPermissions();
|
|
278613
278695
|
init_bashExecutor();
|
|
278614
278696
|
bashTool = (options = {}) => {
|
|
@@ -278716,12 +278798,13 @@ For code exploration, try these safe alternatives:
|
|
|
278716
278798
|
- git status, git log, git show for git operations
|
|
278717
278799
|
- npm list, pip list for package information`;
|
|
278718
278800
|
}
|
|
278719
|
-
const
|
|
278801
|
+
const defaultDir = getDefaultWorkingDirectory();
|
|
278802
|
+
const workingDir = workingDirectory ? (0, import_path11.isAbsolute)(workingDirectory) ? (0, import_path11.resolve)(workingDirectory) : (0, import_path11.resolve)(defaultDir, workingDirectory) : defaultDir;
|
|
278720
278803
|
if (allowedFolders && allowedFolders.length > 0) {
|
|
278721
|
-
const resolvedWorkingDir = (0,
|
|
278804
|
+
const resolvedWorkingDir = (0, import_path11.resolve)(workingDir);
|
|
278722
278805
|
const isAllowed = allowedFolders.some((folder) => {
|
|
278723
|
-
const resolvedFolder = (0,
|
|
278724
|
-
return resolvedWorkingDir.startsWith(resolvedFolder);
|
|
278806
|
+
const resolvedFolder = (0, import_path11.resolve)(folder);
|
|
278807
|
+
return resolvedWorkingDir === resolvedFolder || resolvedWorkingDir.startsWith(resolvedFolder + import_path11.sep);
|
|
278725
278808
|
});
|
|
278726
278809
|
if (!isAllowed) {
|
|
278727
278810
|
return `Error: Working directory "${workingDir}" is not within allowed folders: ${allowedFolders.join(", ")}`;
|
|
@@ -278776,14 +278859,14 @@ Command failed with exit code ${result.exitCode}`;
|
|
|
278776
278859
|
// src/tools/edit.js
|
|
278777
278860
|
function isPathAllowed(filePath, allowedFolders) {
|
|
278778
278861
|
if (!allowedFolders || allowedFolders.length === 0) {
|
|
278779
|
-
const resolvedPath3 = (0,
|
|
278780
|
-
const cwd = (0,
|
|
278781
|
-
return resolvedPath3 === cwd || resolvedPath3.startsWith(cwd +
|
|
278862
|
+
const resolvedPath3 = (0, import_path12.resolve)(filePath);
|
|
278863
|
+
const cwd = (0, import_path12.resolve)(process.cwd());
|
|
278864
|
+
return resolvedPath3 === cwd || resolvedPath3.startsWith(cwd + import_path12.sep);
|
|
278782
278865
|
}
|
|
278783
|
-
const resolvedPath2 = (0,
|
|
278866
|
+
const resolvedPath2 = (0, import_path12.resolve)(filePath);
|
|
278784
278867
|
return allowedFolders.some((folder) => {
|
|
278785
|
-
const allowedPath = (0,
|
|
278786
|
-
return resolvedPath2 === allowedPath || resolvedPath2.startsWith(allowedPath +
|
|
278868
|
+
const allowedPath = (0, import_path12.resolve)(folder);
|
|
278869
|
+
return resolvedPath2 === allowedPath || resolvedPath2.startsWith(allowedPath + import_path12.sep);
|
|
278787
278870
|
});
|
|
278788
278871
|
}
|
|
278789
278872
|
function parseFileToolOptions(options = {}) {
|
|
@@ -278793,13 +278876,13 @@ function parseFileToolOptions(options = {}) {
|
|
|
278793
278876
|
cwd: options.cwd
|
|
278794
278877
|
};
|
|
278795
278878
|
}
|
|
278796
|
-
var import_ai5, import_fs10,
|
|
278879
|
+
var import_ai5, import_fs10, import_path12, import_fs11, editTool, createTool, editSchema, createSchema, editDescription, createDescription, editToolDefinition, createToolDefinition;
|
|
278797
278880
|
var init_edit = __esm({
|
|
278798
278881
|
"src/tools/edit.js"() {
|
|
278799
278882
|
"use strict";
|
|
278800
278883
|
import_ai5 = __nccwpck_require__(86619);
|
|
278801
278884
|
import_fs10 = __nccwpck_require__(79896);
|
|
278802
|
-
|
|
278885
|
+
import_path12 = __nccwpck_require__(16928);
|
|
278803
278886
|
import_fs11 = __nccwpck_require__(79896);
|
|
278804
278887
|
editTool = (options = {}) => {
|
|
278805
278888
|
const { debug, allowedFolders, cwd } = parseFileToolOptions(options);
|
|
@@ -278853,7 +278936,7 @@ Important:
|
|
|
278853
278936
|
if (new_string === void 0 || new_string === null || typeof new_string !== "string") {
|
|
278854
278937
|
return `Error editing file: Invalid new_string - must be a string`;
|
|
278855
278938
|
}
|
|
278856
|
-
const resolvedPath2 = (0,
|
|
278939
|
+
const resolvedPath2 = (0, import_path12.isAbsolute)(file_path) ? file_path : (0, import_path12.resolve)(cwd || process.cwd(), file_path);
|
|
278857
278940
|
if (debug) {
|
|
278858
278941
|
console.error(`[Edit] Attempting to edit file: ${resolvedPath2}`);
|
|
278859
278942
|
}
|
|
@@ -278937,7 +279020,7 @@ Important:
|
|
|
278937
279020
|
if (content === void 0 || content === null || typeof content !== "string") {
|
|
278938
279021
|
return `Error creating file: Invalid content - must be a string`;
|
|
278939
279022
|
}
|
|
278940
|
-
const resolvedPath2 = (0,
|
|
279023
|
+
const resolvedPath2 = (0, import_path12.isAbsolute)(file_path) ? file_path : (0, import_path12.resolve)(cwd || process.cwd(), file_path);
|
|
278941
279024
|
if (debug) {
|
|
278942
279025
|
console.error(`[Create] Attempting to create file: ${resolvedPath2}`);
|
|
278943
279026
|
}
|
|
@@ -278947,7 +279030,7 @@ Important:
|
|
|
278947
279030
|
if ((0, import_fs11.existsSync)(resolvedPath2) && !overwrite) {
|
|
278948
279031
|
return `Error creating file: File already exists - ${file_path}. Use overwrite: true to replace it.`;
|
|
278949
279032
|
}
|
|
278950
|
-
const dir = (0,
|
|
279033
|
+
const dir = (0, import_path12.dirname)(resolvedPath2);
|
|
278951
279034
|
await import_fs10.promises.mkdir(dir, { recursive: true });
|
|
278952
279035
|
await import_fs10.promises.writeFile(resolvedPath2, content, "utf-8");
|
|
278953
279036
|
const action = (0, import_fs11.existsSync)(resolvedPath2) && overwrite ? "overwrote" : "created";
|
|
@@ -279314,12 +279397,14 @@ For GitHub-compatible mermaid diagrams, avoid single quotes and parentheses in n
|
|
|
279314
279397
|
var tools_exports = {};
|
|
279315
279398
|
__export(tools_exports, {
|
|
279316
279399
|
DEFAULT_SYSTEM_MESSAGE: () => DEFAULT_SYSTEM_MESSAGE,
|
|
279400
|
+
DEFAULT_VALID_TOOLS: () => DEFAULT_VALID_TOOLS,
|
|
279317
279401
|
attemptCompletionSchema: () => attemptCompletionSchema,
|
|
279318
279402
|
attemptCompletionToolDefinition: () => attemptCompletionToolDefinition,
|
|
279319
279403
|
bashDescription: () => bashDescription,
|
|
279320
279404
|
bashSchema: () => bashSchema,
|
|
279321
279405
|
bashTool: () => bashTool,
|
|
279322
279406
|
bashToolDefinition: () => bashToolDefinition,
|
|
279407
|
+
buildToolTagPattern: () => buildToolTagPattern,
|
|
279323
279408
|
createDescription: () => createDescription,
|
|
279324
279409
|
createExtractTool: () => createExtractTool,
|
|
279325
279410
|
createQueryTool: () => createQueryTool,
|
|
@@ -279337,8 +279422,10 @@ __export(tools_exports, {
|
|
|
279337
279422
|
editToolDefinition: () => editToolDefinition,
|
|
279338
279423
|
extractSchema: () => extractSchema,
|
|
279339
279424
|
extractTool: () => extractTool,
|
|
279425
|
+
parseAndResolvePaths: () => parseAndResolvePaths,
|
|
279340
279426
|
querySchema: () => querySchema,
|
|
279341
279427
|
queryTool: () => queryTool,
|
|
279428
|
+
resolveTargetPath: () => resolveTargetPath,
|
|
279342
279429
|
searchSchema: () => searchSchema,
|
|
279343
279430
|
searchTool: () => searchTool,
|
|
279344
279431
|
tools: () => tools
|
|
@@ -279378,7 +279465,7 @@ async function listFilesByLevel(options) {
|
|
|
279378
279465
|
if (!import_fs12.default.existsSync(directory)) {
|
|
279379
279466
|
throw new Error(`Directory does not exist: ${directory}`);
|
|
279380
279467
|
}
|
|
279381
|
-
const gitDirExists = import_fs12.default.existsSync(
|
|
279468
|
+
const gitDirExists = import_fs12.default.existsSync(import_path13.default.join(directory, ".git"));
|
|
279382
279469
|
if (gitDirExists && respectGitignore) {
|
|
279383
279470
|
try {
|
|
279384
279471
|
return await listFilesUsingGit(directory, maxFiles);
|
|
@@ -279393,8 +279480,8 @@ async function listFilesUsingGit(directory, maxFiles) {
|
|
|
279393
279480
|
const { stdout } = await execAsync3("git ls-files", { cwd: directory });
|
|
279394
279481
|
const files = stdout.split("\n").filter(Boolean);
|
|
279395
279482
|
const sortedFiles = files.sort((a4, b4) => {
|
|
279396
|
-
const depthA = a4.split(
|
|
279397
|
-
const depthB = b4.split(
|
|
279483
|
+
const depthA = a4.split(import_path13.default.sep).length;
|
|
279484
|
+
const depthB = b4.split(import_path13.default.sep).length;
|
|
279398
279485
|
return depthA - depthB;
|
|
279399
279486
|
});
|
|
279400
279487
|
return sortedFiles.slice(0, maxFiles);
|
|
@@ -279411,23 +279498,23 @@ async function listFilesByLevelManually(directory, maxFiles, respectGitignore) {
|
|
|
279411
279498
|
try {
|
|
279412
279499
|
const entries = import_fs12.default.readdirSync(dir, { withFileTypes: true });
|
|
279413
279500
|
const files = entries.filter((entry) => {
|
|
279414
|
-
const fullPath =
|
|
279501
|
+
const fullPath = import_path13.default.join(dir, entry.name);
|
|
279415
279502
|
return getEntryTypeSync(entry, fullPath).isFile;
|
|
279416
279503
|
});
|
|
279417
279504
|
for (const file of files) {
|
|
279418
279505
|
if (result.length >= maxFiles) break;
|
|
279419
|
-
const filePath =
|
|
279420
|
-
const relativePath =
|
|
279506
|
+
const filePath = import_path13.default.join(dir, file.name);
|
|
279507
|
+
const relativePath = import_path13.default.relative(directory, filePath);
|
|
279421
279508
|
if (shouldIgnore(relativePath, ignorePatterns)) continue;
|
|
279422
279509
|
result.push(relativePath);
|
|
279423
279510
|
}
|
|
279424
279511
|
const dirs = entries.filter((entry) => {
|
|
279425
|
-
const fullPath =
|
|
279512
|
+
const fullPath = import_path13.default.join(dir, entry.name);
|
|
279426
279513
|
return getEntryTypeSync(entry, fullPath).isDirectory;
|
|
279427
279514
|
});
|
|
279428
279515
|
for (const subdir of dirs) {
|
|
279429
|
-
const subdirPath =
|
|
279430
|
-
const relativeSubdirPath =
|
|
279516
|
+
const subdirPath = import_path13.default.join(dir, subdir.name);
|
|
279517
|
+
const relativeSubdirPath = import_path13.default.relative(directory, subdirPath);
|
|
279431
279518
|
if (shouldIgnore(relativeSubdirPath, ignorePatterns)) continue;
|
|
279432
279519
|
if (subdir.name === "node_modules" || subdir.name === ".git") continue;
|
|
279433
279520
|
queue.push({ dir: subdirPath, level: level + 1 });
|
|
@@ -279439,7 +279526,7 @@ async function listFilesByLevelManually(directory, maxFiles, respectGitignore) {
|
|
|
279439
279526
|
return result;
|
|
279440
279527
|
}
|
|
279441
279528
|
function loadGitignorePatterns(directory) {
|
|
279442
|
-
const gitignorePath =
|
|
279529
|
+
const gitignorePath = import_path13.default.join(directory, ".gitignore");
|
|
279443
279530
|
if (!import_fs12.default.existsSync(gitignorePath)) {
|
|
279444
279531
|
return [];
|
|
279445
279532
|
}
|
|
@@ -279462,12 +279549,12 @@ function shouldIgnore(filePath, ignorePatterns) {
|
|
|
279462
279549
|
}
|
|
279463
279550
|
return false;
|
|
279464
279551
|
}
|
|
279465
|
-
var import_fs12,
|
|
279552
|
+
var import_fs12, import_path13, import_util12, import_child_process10, execAsync3;
|
|
279466
279553
|
var init_file_lister = __esm({
|
|
279467
279554
|
"src/utils/file-lister.js"() {
|
|
279468
279555
|
"use strict";
|
|
279469
279556
|
import_fs12 = __toESM(__nccwpck_require__(79896), 1);
|
|
279470
|
-
|
|
279557
|
+
import_path13 = __toESM(__nccwpck_require__(16928), 1);
|
|
279471
279558
|
import_util12 = __nccwpck_require__(39023);
|
|
279472
279559
|
import_child_process10 = __nccwpck_require__(35317);
|
|
279473
279560
|
init_symlink_utils();
|
|
@@ -279485,12 +279572,12 @@ function initializeSimpleTelemetryFromOptions(options) {
|
|
|
279485
279572
|
});
|
|
279486
279573
|
return telemetry;
|
|
279487
279574
|
}
|
|
279488
|
-
var import_fs13,
|
|
279575
|
+
var import_fs13, import_path14, SimpleTelemetry, SimpleAppTracer;
|
|
279489
279576
|
var init_simpleTelemetry = __esm({
|
|
279490
279577
|
"src/agent/simpleTelemetry.js"() {
|
|
279491
279578
|
"use strict";
|
|
279492
279579
|
import_fs13 = __nccwpck_require__(79896);
|
|
279493
|
-
|
|
279580
|
+
import_path14 = __nccwpck_require__(16928);
|
|
279494
279581
|
SimpleTelemetry = class {
|
|
279495
279582
|
constructor(options = {}) {
|
|
279496
279583
|
this.serviceName = options.serviceName || "probe-agent";
|
|
@@ -279504,7 +279591,7 @@ var init_simpleTelemetry = __esm({
|
|
|
279504
279591
|
}
|
|
279505
279592
|
initializeFileExporter() {
|
|
279506
279593
|
try {
|
|
279507
|
-
const dir = (0,
|
|
279594
|
+
const dir = (0, import_path14.dirname)(this.filePath);
|
|
279508
279595
|
if (!(0, import_fs13.existsSync)(dir)) {
|
|
279509
279596
|
(0, import_fs13.mkdirSync)(dir, { recursive: true });
|
|
279510
279597
|
}
|
|
@@ -279569,20 +279656,20 @@ var init_simpleTelemetry = __esm({
|
|
|
279569
279656
|
}
|
|
279570
279657
|
async flush() {
|
|
279571
279658
|
if (this.stream) {
|
|
279572
|
-
return new Promise((
|
|
279573
|
-
this.stream.once("drain",
|
|
279659
|
+
return new Promise((resolve6) => {
|
|
279660
|
+
this.stream.once("drain", resolve6);
|
|
279574
279661
|
if (!this.stream.writableNeedDrain) {
|
|
279575
|
-
|
|
279662
|
+
resolve6();
|
|
279576
279663
|
}
|
|
279577
279664
|
});
|
|
279578
279665
|
}
|
|
279579
279666
|
}
|
|
279580
279667
|
async shutdown() {
|
|
279581
279668
|
if (this.stream) {
|
|
279582
|
-
return new Promise((
|
|
279669
|
+
return new Promise((resolve6) => {
|
|
279583
279670
|
this.stream.end(() => {
|
|
279584
279671
|
console.log(`[SimpleTelemetry] File stream closed: ${this.filePath}`);
|
|
279585
|
-
|
|
279672
|
+
resolve6();
|
|
279586
279673
|
});
|
|
279587
279674
|
});
|
|
279588
279675
|
}
|
|
@@ -311729,7 +311816,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"100":"Continue","101":"Switching Pro
|
|
|
311729
311816
|
/***/ ((module) => {
|
|
311730
311817
|
|
|
311731
311818
|
"use strict";
|
|
311732
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@probelabs/visor","version":"0.1.
|
|
311819
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@probelabs/visor","version":"0.1.114","main":"dist/index.js","bin":{"visor":"./dist/index.js"},"exports":{".":{"require":"./dist/index.js","import":"./dist/index.js"},"./sdk":{"types":"./dist/sdk/sdk.d.ts","import":"./dist/sdk/sdk.mjs","require":"./dist/sdk/sdk.js"},"./cli":{"require":"./dist/index.js"}},"files":["dist/","defaults/","action.yml","README.md","LICENSE"],"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"build:cli":"ncc build src/index.ts -o dist && cp -r defaults dist/ && cp -r output dist/ && cp -r docs dist/ && cp -r examples dist/ && cp -r src/debug-visualizer/ui dist/debug-visualizer/ && node scripts/inject-version.js && echo \'#!/usr/bin/env node\' | cat - dist/index.js > temp && mv temp dist/index.js && chmod +x dist/index.js","build:sdk":"tsup src/sdk.ts --dts --sourcemap --format esm,cjs --out-dir dist/sdk","build":"npm run build:cli && npm run build:sdk","test":"jest && npm run test:yaml","prepublishOnly":"npm run build","test:watch":"jest --watch","test:coverage":"jest --coverage","test:manual:bash":"RUN_MANUAL_TESTS=true jest tests/manual/bash-config-manual.test.ts","lint":"eslint src tests --ext .ts","lint:fix":"eslint src tests --ext .ts --fix","format":"prettier --write src tests","format:check":"prettier --check src tests","clean":"","prebuild":"npm run clean && patch-package && node scripts/generate-config-schema.js","pretest":"patch-package && node scripts/generate-config-schema.js && npm run build:cli","test:with-build":"npm run build:cli && jest","test:yaml":"node dist/index.js test --progress compact","prepare":"husky","pre-commit":"lint-staged","deploy:site":"cd site && npx wrangler pages deploy . --project-name=visor-site --commit-dirty=true","deploy:worker":"npx wrangler deploy","deploy":"npm run deploy:site && npm run deploy:worker","release":"./scripts/release.sh","release:patch":"./scripts/release.sh patch","release:minor":"./scripts/release.sh minor","release:major":"./scripts/release.sh major","release:prerelease":"./scripts/release.sh prerelease","docs:validate":"node scripts/validate-readme-links.js","workshop:setup":"npm install -D reveal-md@6.1.2","workshop:serve":"cd workshop && reveal-md slides.md -w","workshop:export":"reveal-md workshop/slides.md --static workshop/build","workshop:pdf":"reveal-md workshop/slides.md --print workshop/Visor-Workshop.pdf --print-size letter","workshop:pdf:ci":"reveal-md workshop/slides.md --print workshop/Visor-Workshop.pdf --print-size letter --puppeteer-launch-args=\\"--no-sandbox --disable-dev-shm-usage\\"","workshop:pdf:a4":"reveal-md workshop/slides.md --print workshop/Visor-Workshop-A4.pdf --print-size A4","workshop:build":"npm run workshop:export && npm run workshop:pdf","simulate:issue":"TS_NODE_TRANSPILE_ONLY=1 ts-node scripts/simulate-gh-run.ts --event issues --action opened --debug","simulate:comment":"TS_NODE_TRANSPILE_ONLY=1 ts-node scripts/simulate-gh-run.ts --event issue_comment --action created --debug"},"keywords":["code-review","ai","github-action","cli","pr-review","visor"],"author":"Probe Labs","license":"MIT","description":"AI-powered code review tool for GitHub Pull Requests - CLI and GitHub Action","repository":{"type":"git","url":"git+https://github.com/probelabs/visor.git"},"bugs":{"url":"https://github.com/probelabs/visor/issues"},"homepage":"https://github.com/probelabs/visor#readme","dependencies":{"@actions/core":"^1.11.1","@modelcontextprotocol/sdk":"^1.20.1","@nyariv/sandboxjs":"^0.8.25","@octokit/action":"^8.0.2","@octokit/auth-app":"^8.1.0","@octokit/core":"^7.0.3","@octokit/rest":"^22.0.0","@probelabs/probe":"^0.6.0-rc199","@types/commander":"^2.12.0","@types/uuid":"^10.0.0","ajv":"^8.17.1","ajv-formats":"^3.0.1","cli-table3":"^0.6.5","commander":"^14.0.0","dotenv":"^17.2.3","ignore":"^7.0.5","js-yaml":"^4.1.0","liquidjs":"^10.21.1","node-cron":"^3.0.3","open":"^9.1.0","simple-git":"^3.28.0","uuid":"^11.1.0","ws":"^8.18.3"},"optionalDependencies":{"@opentelemetry/api":"^1.9.0","@opentelemetry/core":"^1.30.1","@opentelemetry/exporter-trace-otlp-grpc":"^0.203.0","@opentelemetry/exporter-trace-otlp-http":"^0.203.0","@opentelemetry/instrumentation":"^0.203.0","@opentelemetry/resources":"^1.30.1","@opentelemetry/sdk-metrics":"^1.30.1","@opentelemetry/sdk-node":"^0.203.0","@opentelemetry/sdk-trace-base":"^1.30.1","@opentelemetry/semantic-conventions":"^1.30.1"},"devDependencies":{"@eslint/js":"^9.34.0","@kie/act-js":"^2.6.2","@kie/mock-github":"^2.0.1","@types/jest":"^30.0.0","@types/js-yaml":"^4.0.9","@types/node":"^24.3.0","@types/node-cron":"^3.0.11","@types/ws":"^8.18.1","@typescript-eslint/eslint-plugin":"^8.42.0","@typescript-eslint/parser":"^8.42.0","@vercel/ncc":"^0.38.4","eslint":"^9.34.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","husky":"^9.1.7","jest":"^30.1.3","lint-staged":"^16.1.6","patch-package":"^8.0.0","prettier":"^3.6.2","reveal-md":"^6.1.2","ts-jest":"^29.4.1","ts-json-schema-generator":"^1.5.1","ts-node":"^10.9.2","tsup":"^8.5.0","typescript":"^5.9.2","wrangler":"^3.0.0"},"peerDependencies":{"@anthropic/claude-code-sdk":"^1.0.0"},"peerDependenciesMeta":{"@anthropic/claude-code-sdk":{"optional":true}},"directories":{"test":"tests"},"lint-staged":{"src/**/*.{ts,js}":["eslint --fix","prettier --write"],"tests/**/*.{ts,js}":["eslint --fix","prettier --write"],"*.{json,md,yml,yaml}":["prettier --write"]}}');
|
|
311733
311820
|
|
|
311734
311821
|
/***/ })
|
|
311735
311822
|
|