@probelabs/probe 0.6.0-rc169 → 0.6.0-rc170
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/build/agent/ProbeAgent.js +41 -14
- package/build/agent/imageConfig.js +57 -0
- package/build/agent/index.js +58 -25
- package/cjs/agent/ProbeAgent.cjs +124 -43
- package/cjs/index.cjs +124 -43
- package/package.json +1 -1
- package/src/agent/ProbeAgent.js +41 -14
- package/src/agent/imageConfig.js +57 -0
package/cjs/agent/ProbeAgent.cjs
CHANGED
|
@@ -11080,6 +11080,50 @@ var init_ConfigurableSerdeContext = __esm({
|
|
|
11080
11080
|
}
|
|
11081
11081
|
});
|
|
11082
11082
|
|
|
11083
|
+
// node_modules/@aws-sdk/core/dist-es/submodules/protocols/structIterator.js
|
|
11084
|
+
function* serializingStructIterator(ns, sourceObject) {
|
|
11085
|
+
if (ns.isUnitSchema()) {
|
|
11086
|
+
return;
|
|
11087
|
+
}
|
|
11088
|
+
const struct2 = ns.getSchema();
|
|
11089
|
+
for (let i4 = 0; i4 < struct2[4].length; ++i4) {
|
|
11090
|
+
const key = struct2[4][i4];
|
|
11091
|
+
const memberNs = new NormalizedSchema([struct2[5][i4], 0], key);
|
|
11092
|
+
if (!(key in sourceObject) && !memberNs.isIdempotencyToken()) {
|
|
11093
|
+
continue;
|
|
11094
|
+
}
|
|
11095
|
+
yield [key, memberNs];
|
|
11096
|
+
}
|
|
11097
|
+
}
|
|
11098
|
+
function* deserializingStructIterator(ns, sourceObject, nameTrait) {
|
|
11099
|
+
if (ns.isUnitSchema()) {
|
|
11100
|
+
return;
|
|
11101
|
+
}
|
|
11102
|
+
const struct2 = ns.getSchema();
|
|
11103
|
+
let keysRemaining = Object.keys(sourceObject).length;
|
|
11104
|
+
for (let i4 = 0; i4 < struct2[4].length; ++i4) {
|
|
11105
|
+
if (keysRemaining === 0) {
|
|
11106
|
+
break;
|
|
11107
|
+
}
|
|
11108
|
+
const key = struct2[4][i4];
|
|
11109
|
+
const memberNs = new NormalizedSchema([struct2[5][i4], 0], key);
|
|
11110
|
+
let serializationKey = key;
|
|
11111
|
+
if (nameTrait) {
|
|
11112
|
+
serializationKey = memberNs.getMergedTraits()[nameTrait] ?? key;
|
|
11113
|
+
}
|
|
11114
|
+
if (!(serializationKey in sourceObject)) {
|
|
11115
|
+
continue;
|
|
11116
|
+
}
|
|
11117
|
+
yield [key, memberNs];
|
|
11118
|
+
keysRemaining -= 1;
|
|
11119
|
+
}
|
|
11120
|
+
}
|
|
11121
|
+
var init_structIterator = __esm({
|
|
11122
|
+
"node_modules/@aws-sdk/core/dist-es/submodules/protocols/structIterator.js"() {
|
|
11123
|
+
init_schema();
|
|
11124
|
+
}
|
|
11125
|
+
});
|
|
11126
|
+
|
|
11083
11127
|
// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js
|
|
11084
11128
|
function jsonReviver(key, value, context) {
|
|
11085
11129
|
if (context?.source) {
|
|
@@ -11182,6 +11226,7 @@ var init_JsonShapeDeserializer = __esm({
|
|
|
11182
11226
|
init_serde();
|
|
11183
11227
|
import_util_base644 = __toESM(require_dist_cjs12());
|
|
11184
11228
|
init_ConfigurableSerdeContext();
|
|
11229
|
+
init_structIterator();
|
|
11185
11230
|
init_jsonReviver();
|
|
11186
11231
|
init_parseJsonBody();
|
|
11187
11232
|
JsonShapeDeserializer = class extends SerdeContextConfig {
|
|
@@ -11221,7 +11266,7 @@ var init_JsonShapeDeserializer = __esm({
|
|
|
11221
11266
|
return out;
|
|
11222
11267
|
} else if (ns.isStructSchema() && isObject2) {
|
|
11223
11268
|
const out = {};
|
|
11224
|
-
for (const [memberName, memberSchema] of ns.
|
|
11269
|
+
for (const [memberName, memberSchema] of deserializingStructIterator(ns, value, this.settings.jsonName ? "jsonName" : false)) {
|
|
11225
11270
|
const fromKey = this.settings.jsonName ? memberSchema.getMergedTraits().jsonName ?? memberName : memberName;
|
|
11226
11271
|
const deserializedValue = this._read(memberSchema, value[fromKey]);
|
|
11227
11272
|
if (deserializedValue != null) {
|
|
@@ -11360,6 +11405,7 @@ var init_JsonShapeSerializer = __esm({
|
|
|
11360
11405
|
init_serde();
|
|
11361
11406
|
import_util_base645 = __toESM(require_dist_cjs12());
|
|
11362
11407
|
init_ConfigurableSerdeContext();
|
|
11408
|
+
init_structIterator();
|
|
11363
11409
|
init_jsonReplacer();
|
|
11364
11410
|
JsonShapeSerializer = class extends SerdeContextConfig {
|
|
11365
11411
|
settings;
|
|
@@ -11413,10 +11459,10 @@ var init_JsonShapeSerializer = __esm({
|
|
|
11413
11459
|
return out;
|
|
11414
11460
|
} else if (ns.isStructSchema() && isObject2) {
|
|
11415
11461
|
const out = {};
|
|
11416
|
-
for (const [memberName, memberSchema] of ns
|
|
11417
|
-
const targetKey = this.settings.jsonName ? memberSchema.getMergedTraits().jsonName ?? memberName : memberName;
|
|
11462
|
+
for (const [memberName, memberSchema] of serializingStructIterator(ns, value)) {
|
|
11418
11463
|
const serializableValue = this._write(memberSchema, value[memberName], ns);
|
|
11419
11464
|
if (serializableValue !== void 0) {
|
|
11465
|
+
const targetKey = this.settings.jsonName ? memberSchema.getMergedTraits().jsonName ?? memberName : memberName;
|
|
11420
11466
|
out[targetKey] = serializableValue;
|
|
11421
11467
|
}
|
|
11422
11468
|
}
|
|
@@ -12833,6 +12879,7 @@ var init_QueryShapeSerializer = __esm({
|
|
|
12833
12879
|
import_smithy_client5 = __toESM(require_dist_cjs27());
|
|
12834
12880
|
import_util_base646 = __toESM(require_dist_cjs12());
|
|
12835
12881
|
init_ConfigurableSerdeContext();
|
|
12882
|
+
init_structIterator();
|
|
12836
12883
|
QueryShapeSerializer = class extends SerdeContextConfig {
|
|
12837
12884
|
settings;
|
|
12838
12885
|
buffer;
|
|
@@ -12932,7 +12979,7 @@ var init_QueryShapeSerializer = __esm({
|
|
|
12932
12979
|
}
|
|
12933
12980
|
} else if (ns.isStructSchema()) {
|
|
12934
12981
|
if (value && typeof value === "object") {
|
|
12935
|
-
for (const [memberName, member2] of ns
|
|
12982
|
+
for (const [memberName, member2] of serializingStructIterator(ns, value)) {
|
|
12936
12983
|
if (value[memberName] == null && !member2.isIdempotencyToken()) {
|
|
12937
12984
|
continue;
|
|
12938
12985
|
}
|
|
@@ -13208,6 +13255,7 @@ var init_XmlShapeSerializer = __esm({
|
|
|
13208
13255
|
import_smithy_client7 = __toESM(require_dist_cjs27());
|
|
13209
13256
|
import_util_base647 = __toESM(require_dist_cjs12());
|
|
13210
13257
|
init_ConfigurableSerdeContext();
|
|
13258
|
+
init_structIterator();
|
|
13211
13259
|
XmlShapeSerializer = class extends SerdeContextConfig {
|
|
13212
13260
|
settings;
|
|
13213
13261
|
stringBuffer;
|
|
@@ -13259,7 +13307,7 @@ var init_XmlShapeSerializer = __esm({
|
|
|
13259
13307
|
}
|
|
13260
13308
|
const structXmlNode = import_xml_builder3.XmlNode.of(name14);
|
|
13261
13309
|
const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns);
|
|
13262
|
-
for (const [memberName, memberSchema] of ns
|
|
13310
|
+
for (const [memberName, memberSchema] of serializingStructIterator(ns, value)) {
|
|
13263
13311
|
const val = value[memberName];
|
|
13264
13312
|
if (val != null || memberSchema.isIdempotencyToken()) {
|
|
13265
13313
|
if (memberSchema.getMergedTraits().xmlAttribute) {
|
|
@@ -17003,7 +17051,7 @@ var require_package2 = __commonJS({
|
|
|
17003
17051
|
module2.exports = {
|
|
17004
17052
|
name: "@aws-sdk/client-bedrock-runtime",
|
|
17005
17053
|
description: "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
|
|
17006
|
-
version: "3.
|
|
17054
|
+
version: "3.940.0",
|
|
17007
17055
|
scripts: {
|
|
17008
17056
|
build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
17009
17057
|
"build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime",
|
|
@@ -17022,21 +17070,21 @@ var require_package2 = __commonJS({
|
|
|
17022
17070
|
dependencies: {
|
|
17023
17071
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
17024
17072
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
17025
|
-
"@aws-sdk/core": "3.
|
|
17026
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
17073
|
+
"@aws-sdk/core": "3.940.0",
|
|
17074
|
+
"@aws-sdk/credential-provider-node": "3.940.0",
|
|
17027
17075
|
"@aws-sdk/eventstream-handler-node": "3.936.0",
|
|
17028
17076
|
"@aws-sdk/middleware-eventstream": "3.936.0",
|
|
17029
17077
|
"@aws-sdk/middleware-host-header": "3.936.0",
|
|
17030
17078
|
"@aws-sdk/middleware-logger": "3.936.0",
|
|
17031
17079
|
"@aws-sdk/middleware-recursion-detection": "3.936.0",
|
|
17032
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
17080
|
+
"@aws-sdk/middleware-user-agent": "3.940.0",
|
|
17033
17081
|
"@aws-sdk/middleware-websocket": "3.936.0",
|
|
17034
17082
|
"@aws-sdk/region-config-resolver": "3.936.0",
|
|
17035
|
-
"@aws-sdk/token-providers": "3.
|
|
17083
|
+
"@aws-sdk/token-providers": "3.940.0",
|
|
17036
17084
|
"@aws-sdk/types": "3.936.0",
|
|
17037
17085
|
"@aws-sdk/util-endpoints": "3.936.0",
|
|
17038
17086
|
"@aws-sdk/util-user-agent-browser": "3.936.0",
|
|
17039
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
17087
|
+
"@aws-sdk/util-user-agent-node": "3.940.0",
|
|
17040
17088
|
"@smithy/config-resolver": "^4.4.3",
|
|
17041
17089
|
"@smithy/core": "^3.18.5",
|
|
17042
17090
|
"@smithy/eventstream-serde-browser": "^4.2.5",
|
|
@@ -17783,7 +17831,7 @@ var init_package = __esm({
|
|
|
17783
17831
|
"node_modules/@aws-sdk/nested-clients/package.json"() {
|
|
17784
17832
|
package_default = {
|
|
17785
17833
|
name: "@aws-sdk/nested-clients",
|
|
17786
|
-
version: "3.
|
|
17834
|
+
version: "3.940.0",
|
|
17787
17835
|
description: "Nested clients for AWS SDK packages.",
|
|
17788
17836
|
main: "./dist-cjs/index.js",
|
|
17789
17837
|
module: "./dist-es/index.js",
|
|
@@ -17812,16 +17860,16 @@ var init_package = __esm({
|
|
|
17812
17860
|
dependencies: {
|
|
17813
17861
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
17814
17862
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
17815
|
-
"@aws-sdk/core": "3.
|
|
17863
|
+
"@aws-sdk/core": "3.940.0",
|
|
17816
17864
|
"@aws-sdk/middleware-host-header": "3.936.0",
|
|
17817
17865
|
"@aws-sdk/middleware-logger": "3.936.0",
|
|
17818
17866
|
"@aws-sdk/middleware-recursion-detection": "3.936.0",
|
|
17819
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
17867
|
+
"@aws-sdk/middleware-user-agent": "3.940.0",
|
|
17820
17868
|
"@aws-sdk/region-config-resolver": "3.936.0",
|
|
17821
17869
|
"@aws-sdk/types": "3.936.0",
|
|
17822
17870
|
"@aws-sdk/util-endpoints": "3.936.0",
|
|
17823
17871
|
"@aws-sdk/util-user-agent-browser": "3.936.0",
|
|
17824
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
17872
|
+
"@aws-sdk/util-user-agent-node": "3.940.0",
|
|
17825
17873
|
"@smithy/config-resolver": "^4.4.3",
|
|
17826
17874
|
"@smithy/core": "^3.18.5",
|
|
17827
17875
|
"@smithy/fetch-http-handler": "^5.3.6",
|
|
@@ -19213,7 +19261,7 @@ var require_package3 = __commonJS({
|
|
|
19213
19261
|
module2.exports = {
|
|
19214
19262
|
name: "@aws-sdk/client-sso",
|
|
19215
19263
|
description: "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",
|
|
19216
|
-
version: "3.
|
|
19264
|
+
version: "3.940.0",
|
|
19217
19265
|
scripts: {
|
|
19218
19266
|
build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
19219
19267
|
"build:cjs": "node ../../scripts/compilation/inline client-sso",
|
|
@@ -19232,16 +19280,16 @@ var require_package3 = __commonJS({
|
|
|
19232
19280
|
dependencies: {
|
|
19233
19281
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
19234
19282
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
19235
|
-
"@aws-sdk/core": "3.
|
|
19283
|
+
"@aws-sdk/core": "3.940.0",
|
|
19236
19284
|
"@aws-sdk/middleware-host-header": "3.936.0",
|
|
19237
19285
|
"@aws-sdk/middleware-logger": "3.936.0",
|
|
19238
19286
|
"@aws-sdk/middleware-recursion-detection": "3.936.0",
|
|
19239
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
19287
|
+
"@aws-sdk/middleware-user-agent": "3.940.0",
|
|
19240
19288
|
"@aws-sdk/region-config-resolver": "3.936.0",
|
|
19241
19289
|
"@aws-sdk/types": "3.936.0",
|
|
19242
19290
|
"@aws-sdk/util-endpoints": "3.936.0",
|
|
19243
19291
|
"@aws-sdk/util-user-agent-browser": "3.936.0",
|
|
19244
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
19292
|
+
"@aws-sdk/util-user-agent-node": "3.940.0",
|
|
19245
19293
|
"@smithy/config-resolver": "^4.4.3",
|
|
19246
19294
|
"@smithy/core": "^3.18.5",
|
|
19247
19295
|
"@smithy/fetch-http-handler": "^5.3.6",
|
|
@@ -28051,7 +28099,27 @@ var init_HookManager = __esm({
|
|
|
28051
28099
|
});
|
|
28052
28100
|
|
|
28053
28101
|
// src/agent/imageConfig.js
|
|
28054
|
-
|
|
28102
|
+
function isFormatSupportedByProvider(extension, provider) {
|
|
28103
|
+
if (!extension || typeof extension !== "string") {
|
|
28104
|
+
return false;
|
|
28105
|
+
}
|
|
28106
|
+
if (extension.includes("/") || extension.includes("\\") || extension.includes("..")) {
|
|
28107
|
+
return false;
|
|
28108
|
+
}
|
|
28109
|
+
const ext2 = extension.toLowerCase();
|
|
28110
|
+
if (!SUPPORTED_IMAGE_EXTENSIONS.includes(ext2)) {
|
|
28111
|
+
return false;
|
|
28112
|
+
}
|
|
28113
|
+
if (!provider || typeof provider !== "string") {
|
|
28114
|
+
return true;
|
|
28115
|
+
}
|
|
28116
|
+
const unsupportedFormats = PROVIDER_UNSUPPORTED_FORMATS[provider];
|
|
28117
|
+
if (unsupportedFormats && unsupportedFormats.includes(ext2)) {
|
|
28118
|
+
return false;
|
|
28119
|
+
}
|
|
28120
|
+
return true;
|
|
28121
|
+
}
|
|
28122
|
+
var SUPPORTED_IMAGE_EXTENSIONS, IMAGE_MIME_TYPES, PROVIDER_UNSUPPORTED_FORMATS;
|
|
28055
28123
|
var init_imageConfig = __esm({
|
|
28056
28124
|
"src/agent/imageConfig.js"() {
|
|
28057
28125
|
"use strict";
|
|
@@ -28064,6 +28132,10 @@ var init_imageConfig = __esm({
|
|
|
28064
28132
|
"bmp": "image/bmp",
|
|
28065
28133
|
"svg": "image/svg+xml"
|
|
28066
28134
|
};
|
|
28135
|
+
PROVIDER_UNSUPPORTED_FORMATS = {
|
|
28136
|
+
"google": ["svg"]
|
|
28137
|
+
// Google Gemini doesn't support image/svg+xml
|
|
28138
|
+
};
|
|
28067
28139
|
}
|
|
28068
28140
|
});
|
|
28069
28141
|
|
|
@@ -41212,7 +41284,7 @@ var init_esm4 = __esm({
|
|
|
41212
41284
|
*
|
|
41213
41285
|
* @internal
|
|
41214
41286
|
*/
|
|
41215
|
-
constructor(cwd = process.cwd(), pathImpl,
|
|
41287
|
+
constructor(cwd = process.cwd(), pathImpl, sep4, { nocase, childrenCacheSize = 16 * 1024, fs: fs8 = defaultFS } = {}) {
|
|
41216
41288
|
this.#fs = fsFromOption(fs8);
|
|
41217
41289
|
if (cwd instanceof URL || cwd.startsWith("file://")) {
|
|
41218
41290
|
cwd = (0, import_node_url.fileURLToPath)(cwd);
|
|
@@ -41223,7 +41295,7 @@ var init_esm4 = __esm({
|
|
|
41223
41295
|
this.#resolveCache = new ResolveCache();
|
|
41224
41296
|
this.#resolvePosixCache = new ResolveCache();
|
|
41225
41297
|
this.#children = new ChildrenCache(childrenCacheSize);
|
|
41226
|
-
const split = cwdPath.substring(this.rootPath.length).split(
|
|
41298
|
+
const split = cwdPath.substring(this.rootPath.length).split(sep4);
|
|
41227
41299
|
if (split.length === 1 && !split[0]) {
|
|
41228
41300
|
split.pop();
|
|
41229
41301
|
}
|
|
@@ -62140,7 +62212,7 @@ var init_graph_builder = __esm({
|
|
|
62140
62212
|
applyLinkStyles() {
|
|
62141
62213
|
if (!this.pendingLinkStyles.length || !this.edges.length)
|
|
62142
62214
|
return;
|
|
62143
|
-
const
|
|
62215
|
+
const normalize3 = (s4) => {
|
|
62144
62216
|
const out = {};
|
|
62145
62217
|
for (const [kRaw, vRaw] of Object.entries(s4)) {
|
|
62146
62218
|
const k4 = kRaw.trim().toLowerCase();
|
|
@@ -62161,7 +62233,7 @@ var init_graph_builder = __esm({
|
|
|
62161
62233
|
return out;
|
|
62162
62234
|
};
|
|
62163
62235
|
for (const cmd of this.pendingLinkStyles) {
|
|
62164
|
-
const style =
|
|
62236
|
+
const style = normalize3(cmd.props);
|
|
62165
62237
|
for (const idx of cmd.indices) {
|
|
62166
62238
|
if (idx >= 0 && idx < this.edges.length) {
|
|
62167
62239
|
const e4 = this.edges[idx];
|
|
@@ -69253,7 +69325,7 @@ var require_bk = __commonJS({
|
|
|
69253
69325
|
return xs;
|
|
69254
69326
|
}
|
|
69255
69327
|
function buildBlockGraph(g4, layering, root2, reverseSep) {
|
|
69256
|
-
var blockGraph = new Graph(), graphLabel = g4.graph(), sepFn =
|
|
69328
|
+
var blockGraph = new Graph(), graphLabel = g4.graph(), sepFn = sep4(graphLabel.nodesep, graphLabel.edgesep, reverseSep);
|
|
69257
69329
|
_.forEach(layering, function(layer) {
|
|
69258
69330
|
var u4;
|
|
69259
69331
|
_.forEach(layer, function(v4) {
|
|
@@ -69343,7 +69415,7 @@ var require_bk = __commonJS({
|
|
|
69343
69415
|
alignCoordinates(xss, smallestWidth);
|
|
69344
69416
|
return balance(xss, g4.graph().align);
|
|
69345
69417
|
}
|
|
69346
|
-
function
|
|
69418
|
+
function sep4(nodeSep, edgeSep, reverseSep) {
|
|
69347
69419
|
return function(g4, v4, w4) {
|
|
69348
69420
|
var vLabel = g4.node(v4);
|
|
69349
69421
|
var wLabel = g4.node(w4);
|
|
@@ -69428,7 +69500,7 @@ var require_layout = __commonJS({
|
|
|
69428
69500
|
"use strict";
|
|
69429
69501
|
var _ = require_lodash2();
|
|
69430
69502
|
var acyclic = require_acyclic();
|
|
69431
|
-
var
|
|
69503
|
+
var normalize3 = require_normalize();
|
|
69432
69504
|
var rank = require_rank();
|
|
69433
69505
|
var normalizeRanks = require_util().normalizeRanks;
|
|
69434
69506
|
var parentDummyChains = require_parent_dummy_chains();
|
|
@@ -69490,7 +69562,7 @@ var require_layout = __commonJS({
|
|
|
69490
69562
|
removeEdgeLabelProxies(g4);
|
|
69491
69563
|
});
|
|
69492
69564
|
time2(" normalize.run", function() {
|
|
69493
|
-
|
|
69565
|
+
normalize3.run(g4);
|
|
69494
69566
|
});
|
|
69495
69567
|
time2(" parentDummyChains", function() {
|
|
69496
69568
|
parentDummyChains(g4);
|
|
@@ -69517,7 +69589,7 @@ var require_layout = __commonJS({
|
|
|
69517
69589
|
removeBorderNodes(g4);
|
|
69518
69590
|
});
|
|
69519
69591
|
time2(" normalize.undo", function() {
|
|
69520
|
-
|
|
69592
|
+
normalize3.undo(g4);
|
|
69521
69593
|
});
|
|
69522
69594
|
time2(" fixupEdgeLabelCoords", function() {
|
|
69523
69595
|
fixupEdgeLabelCoords(g4);
|
|
@@ -75888,8 +75960,8 @@ var require_resolve = __commonJS({
|
|
|
75888
75960
|
}
|
|
75889
75961
|
return count;
|
|
75890
75962
|
}
|
|
75891
|
-
function getFullPath(resolver, id = "",
|
|
75892
|
-
if (
|
|
75963
|
+
function getFullPath(resolver, id = "", normalize3) {
|
|
75964
|
+
if (normalize3 !== false)
|
|
75893
75965
|
id = normalizeId(id);
|
|
75894
75966
|
const p4 = resolver.parse(id);
|
|
75895
75967
|
return _getFullPath(resolver, p4);
|
|
@@ -77229,7 +77301,7 @@ var require_fast_uri = __commonJS({
|
|
|
77229
77301
|
"use strict";
|
|
77230
77302
|
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils();
|
|
77231
77303
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
77232
|
-
function
|
|
77304
|
+
function normalize3(uri, options) {
|
|
77233
77305
|
if (typeof uri === "string") {
|
|
77234
77306
|
uri = /** @type {T} */
|
|
77235
77307
|
serialize(parse6(uri, options), options);
|
|
@@ -77465,7 +77537,7 @@ var require_fast_uri = __commonJS({
|
|
|
77465
77537
|
}
|
|
77466
77538
|
var fastUri = {
|
|
77467
77539
|
SCHEMES,
|
|
77468
|
-
normalize:
|
|
77540
|
+
normalize: normalize3,
|
|
77469
77541
|
resolve: resolve5,
|
|
77470
77542
|
resolveComponent,
|
|
77471
77543
|
equal,
|
|
@@ -85158,6 +85230,14 @@ var init_ProbeAgent = __esm({
|
|
|
85158
85230
|
if (!imagePath) {
|
|
85159
85231
|
throw new Error("Image path is required");
|
|
85160
85232
|
}
|
|
85233
|
+
const filename = (0, import_path12.basename)(imagePath);
|
|
85234
|
+
const extension = filename.toLowerCase().split(".").pop();
|
|
85235
|
+
if (!extension || !SUPPORTED_IMAGE_EXTENSIONS.includes(extension)) {
|
|
85236
|
+
throw new Error(`Invalid or unsupported image extension: ${extension}. Supported formats: ${SUPPORTED_IMAGE_EXTENSIONS.join(", ")}`);
|
|
85237
|
+
}
|
|
85238
|
+
if (this.apiType && !isFormatSupportedByProvider(extension, this.apiType)) {
|
|
85239
|
+
throw new Error(`Image format '${extension}' is not supported by the current AI provider (${this.apiType}). Try using a different image format like PNG or JPEG.`);
|
|
85240
|
+
}
|
|
85161
85241
|
const loaded = await this.loadImageIfValid(imagePath);
|
|
85162
85242
|
if (!loaded) {
|
|
85163
85243
|
throw new Error(`Failed to load image: ${imagePath}. The file may not exist, be too large, have an unsupported format, or be outside allowed directories.`);
|
|
@@ -85776,12 +85856,16 @@ var init_ProbeAgent = __esm({
|
|
|
85776
85856
|
let absolutePath;
|
|
85777
85857
|
let isPathAllowed2 = false;
|
|
85778
85858
|
if ((0, import_path12.isAbsolute)(imagePath)) {
|
|
85779
|
-
absolutePath = imagePath;
|
|
85780
|
-
isPathAllowed2 = allowedDirs.some((dir) =>
|
|
85859
|
+
absolutePath = (0, import_path12.normalize)((0, import_path12.resolve)(imagePath));
|
|
85860
|
+
isPathAllowed2 = allowedDirs.some((dir) => {
|
|
85861
|
+
const normalizedDir = (0, import_path12.normalize)((0, import_path12.resolve)(dir));
|
|
85862
|
+
return absolutePath === normalizedDir || absolutePath.startsWith(normalizedDir + import_path12.sep);
|
|
85863
|
+
});
|
|
85781
85864
|
} else {
|
|
85782
85865
|
for (const dir of allowedDirs) {
|
|
85783
|
-
const
|
|
85784
|
-
|
|
85866
|
+
const normalizedDir = (0, import_path12.normalize)((0, import_path12.resolve)(dir));
|
|
85867
|
+
const resolvedPath2 = (0, import_path12.normalize)((0, import_path12.resolve)(dir, imagePath));
|
|
85868
|
+
if (resolvedPath2 === normalizedDir || resolvedPath2.startsWith(normalizedDir + import_path12.sep)) {
|
|
85785
85869
|
absolutePath = resolvedPath2;
|
|
85786
85870
|
isPathAllowed2 = true;
|
|
85787
85871
|
break;
|
|
@@ -86789,8 +86873,8 @@ ${toolResultContent}
|
|
|
86789
86873
|
// Pass parent session ID for tracking
|
|
86790
86874
|
path: this.searchPath,
|
|
86791
86875
|
// Inherit search path
|
|
86792
|
-
provider: this.
|
|
86793
|
-
// Inherit AI provider
|
|
86876
|
+
provider: this.apiType,
|
|
86877
|
+
// Inherit AI provider (string identifier)
|
|
86794
86878
|
model: this.model,
|
|
86795
86879
|
// Inherit model
|
|
86796
86880
|
debug: this.debug,
|
|
@@ -86799,7 +86883,7 @@ ${toolResultContent}
|
|
|
86799
86883
|
if (this.debug) {
|
|
86800
86884
|
console.log(`[DEBUG] Executing delegate tool at iteration ${currentIteration}/${maxIterations}`);
|
|
86801
86885
|
console.log(`[DEBUG] Parent session: ${this.sessionId}`);
|
|
86802
|
-
console.log(`[DEBUG] Inherited config: path=${this.searchPath}, provider=${this.
|
|
86886
|
+
console.log(`[DEBUG] Inherited config: path=${this.searchPath}, provider=${this.apiType}, model=${this.model}`);
|
|
86803
86887
|
console.log(`[DEBUG] Delegate task: ${toolParams.task?.substring(0, 100)}...`);
|
|
86804
86888
|
}
|
|
86805
86889
|
if (this.tracer) {
|
|
@@ -86866,9 +86950,6 @@ ${toolResultContent}
|
|
|
86866
86950
|
role: "user",
|
|
86867
86951
|
content: toolResultMessage
|
|
86868
86952
|
});
|
|
86869
|
-
if (toolResultContent) {
|
|
86870
|
-
await this.processImageReferences(toolResultContent);
|
|
86871
|
-
}
|
|
86872
86953
|
if (this.debug) {
|
|
86873
86954
|
console.log(`[DEBUG] Tool ${toolName} executed successfully. Result length: ${typeof toolResult === "string" ? toolResult.length : JSON.stringify(toolResult).length}`);
|
|
86874
86955
|
}
|