@probelabs/probe 0.6.0-rc221 → 0.6.0-rc223
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/binaries/probe-v0.6.0-rc223-aarch64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc223-aarch64-unknown-linux-musl.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc223-x86_64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc223-x86_64-pc-windows-msvc.zip +0 -0
- package/bin/binaries/probe-v0.6.0-rc223-x86_64-unknown-linux-musl.tar.gz +0 -0
- package/build/agent/acp/tools.js +12 -0
- package/build/agent/index.js +30 -8
- package/build/delegate.js +26 -4
- package/build/tools/common.js +7 -1
- package/build/tools/langchain.js +4 -2
- package/build/tools/vercel.js +3 -2
- package/cjs/agent/ProbeAgent.cjs +138 -51
- package/cjs/index.cjs +142 -53
- package/package.json +1 -1
- package/src/agent/acp/tools.js +12 -0
- package/src/delegate.js +26 -4
- package/src/tools/common.js +7 -1
- package/src/tools/langchain.js +4 -2
- package/src/tools/vercel.js +3 -2
- package/bin/binaries/probe-v0.6.0-rc221-aarch64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc221-aarch64-unknown-linux-musl.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc221-x86_64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc221-x86_64-pc-windows-msvc.zip +0 -0
- package/bin/binaries/probe-v0.6.0-rc221-x86_64-unknown-linux-musl.tar.gz +0 -0
package/cjs/agent/ProbeAgent.cjs
CHANGED
|
@@ -15497,18 +15497,21 @@ var require_dist_cjs37 = __commonJS({
|
|
|
15497
15497
|
}
|
|
15498
15498
|
const placeHolderStream = new TransformStream();
|
|
15499
15499
|
request.body = placeHolderStream.readable;
|
|
15500
|
+
const match2 = (headers?.authorization ?? "").match(/Signature=(\w+)$/);
|
|
15501
|
+
const priorSignature = (match2 ?? [])[1] ?? (query2 && query2["X-Amz-Signature"]) ?? "";
|
|
15502
|
+
const signingStream = getEventSigningTransformStream(priorSignature, await this.messageSigner(), this.eventStreamCodec, this.systemClockOffsetProvider);
|
|
15503
|
+
payload2.pipeThrough(signingStream).pipeThrough(placeHolderStream);
|
|
15500
15504
|
let result;
|
|
15501
15505
|
try {
|
|
15502
15506
|
result = await next(args);
|
|
15503
15507
|
} catch (e5) {
|
|
15504
|
-
|
|
15508
|
+
const p5 = payload2.cancel?.();
|
|
15509
|
+
if (p5 instanceof Promise) {
|
|
15510
|
+
p5.catch(() => {
|
|
15511
|
+
});
|
|
15512
|
+
}
|
|
15505
15513
|
throw e5;
|
|
15506
15514
|
}
|
|
15507
|
-
const match2 = (headers["authorization"] || "").match(/Signature=([\w]+)$/);
|
|
15508
|
-
const priorSignature = (match2 || [])[1] || query2 && query2["X-Amz-Signature"] || "";
|
|
15509
|
-
const signingStream = getEventSigningTransformStream(priorSignature, await this.messageSigner(), this.eventStreamCodec, this.systemClockOffsetProvider);
|
|
15510
|
-
const signedPayload = payload2.pipeThrough(signingStream);
|
|
15511
|
-
signedPayload.pipeThrough(placeHolderStream);
|
|
15512
15515
|
return result;
|
|
15513
15516
|
}
|
|
15514
15517
|
};
|
|
@@ -15732,8 +15735,12 @@ var require_dist_cjs37 = __commonJS({
|
|
|
15732
15735
|
};
|
|
15733
15736
|
const send = async () => {
|
|
15734
15737
|
try {
|
|
15735
|
-
for await (const
|
|
15736
|
-
socket.
|
|
15738
|
+
for await (const chunk of data2) {
|
|
15739
|
+
if (socket.readyState >= WebSocket.CLOSING) {
|
|
15740
|
+
break;
|
|
15741
|
+
} else {
|
|
15742
|
+
socket.send(chunk);
|
|
15743
|
+
}
|
|
15737
15744
|
}
|
|
15738
15745
|
} catch (err) {
|
|
15739
15746
|
streamError = err;
|
|
@@ -17407,7 +17414,7 @@ var require_package2 = __commonJS({
|
|
|
17407
17414
|
module2.exports = {
|
|
17408
17415
|
name: "@aws-sdk/client-bedrock-runtime",
|
|
17409
17416
|
description: "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
|
|
17410
|
-
version: "3.
|
|
17417
|
+
version: "3.983.0",
|
|
17411
17418
|
scripts: {
|
|
17412
17419
|
build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
17413
17420
|
"build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime",
|
|
@@ -17427,21 +17434,21 @@ var require_package2 = __commonJS({
|
|
|
17427
17434
|
dependencies: {
|
|
17428
17435
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
17429
17436
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
17430
|
-
"@aws-sdk/core": "^3.973.
|
|
17431
|
-
"@aws-sdk/credential-provider-node": "^3.972.
|
|
17432
|
-
"@aws-sdk/eventstream-handler-node": "^3.972.
|
|
17437
|
+
"@aws-sdk/core": "^3.973.6",
|
|
17438
|
+
"@aws-sdk/credential-provider-node": "^3.972.5",
|
|
17439
|
+
"@aws-sdk/eventstream-handler-node": "^3.972.4",
|
|
17433
17440
|
"@aws-sdk/middleware-eventstream": "^3.972.3",
|
|
17434
17441
|
"@aws-sdk/middleware-host-header": "^3.972.3",
|
|
17435
17442
|
"@aws-sdk/middleware-logger": "^3.972.3",
|
|
17436
17443
|
"@aws-sdk/middleware-recursion-detection": "^3.972.3",
|
|
17437
|
-
"@aws-sdk/middleware-user-agent": "^3.972.
|
|
17438
|
-
"@aws-sdk/middleware-websocket": "^3.972.
|
|
17444
|
+
"@aws-sdk/middleware-user-agent": "^3.972.6",
|
|
17445
|
+
"@aws-sdk/middleware-websocket": "^3.972.4",
|
|
17439
17446
|
"@aws-sdk/region-config-resolver": "^3.972.3",
|
|
17440
|
-
"@aws-sdk/token-providers": "3.
|
|
17447
|
+
"@aws-sdk/token-providers": "3.983.0",
|
|
17441
17448
|
"@aws-sdk/types": "^3.973.1",
|
|
17442
|
-
"@aws-sdk/util-endpoints": "3.
|
|
17449
|
+
"@aws-sdk/util-endpoints": "3.983.0",
|
|
17443
17450
|
"@aws-sdk/util-user-agent-browser": "^3.972.3",
|
|
17444
|
-
"@aws-sdk/util-user-agent-node": "^3.972.
|
|
17451
|
+
"@aws-sdk/util-user-agent-node": "^3.972.4",
|
|
17445
17452
|
"@smithy/config-resolver": "^4.4.6",
|
|
17446
17453
|
"@smithy/core": "^3.22.0",
|
|
17447
17454
|
"@smithy/eventstream-serde-browser": "^4.2.8",
|
|
@@ -18188,7 +18195,7 @@ var init_package = __esm({
|
|
|
18188
18195
|
"node_modules/@aws-sdk/nested-clients/package.json"() {
|
|
18189
18196
|
package_default = {
|
|
18190
18197
|
name: "@aws-sdk/nested-clients",
|
|
18191
|
-
version: "3.
|
|
18198
|
+
version: "3.982.0",
|
|
18192
18199
|
description: "Nested clients for AWS SDK packages.",
|
|
18193
18200
|
main: "./dist-cjs/index.js",
|
|
18194
18201
|
module: "./dist-es/index.js",
|
|
@@ -18217,16 +18224,16 @@ var init_package = __esm({
|
|
|
18217
18224
|
dependencies: {
|
|
18218
18225
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
18219
18226
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
18220
|
-
"@aws-sdk/core": "^3.973.
|
|
18227
|
+
"@aws-sdk/core": "^3.973.6",
|
|
18221
18228
|
"@aws-sdk/middleware-host-header": "^3.972.3",
|
|
18222
18229
|
"@aws-sdk/middleware-logger": "^3.972.3",
|
|
18223
18230
|
"@aws-sdk/middleware-recursion-detection": "^3.972.3",
|
|
18224
|
-
"@aws-sdk/middleware-user-agent": "^3.972.
|
|
18231
|
+
"@aws-sdk/middleware-user-agent": "^3.972.6",
|
|
18225
18232
|
"@aws-sdk/region-config-resolver": "^3.972.3",
|
|
18226
18233
|
"@aws-sdk/types": "^3.973.1",
|
|
18227
|
-
"@aws-sdk/util-endpoints": "3.
|
|
18234
|
+
"@aws-sdk/util-endpoints": "3.982.0",
|
|
18228
18235
|
"@aws-sdk/util-user-agent-browser": "^3.972.3",
|
|
18229
|
-
"@aws-sdk/util-user-agent-node": "^3.972.
|
|
18236
|
+
"@aws-sdk/util-user-agent-node": "^3.972.4",
|
|
18230
18237
|
"@smithy/config-resolver": "^4.4.6",
|
|
18231
18238
|
"@smithy/core": "^3.22.0",
|
|
18232
18239
|
"@smithy/fetch-http-handler": "^5.3.9",
|
|
@@ -19986,7 +19993,7 @@ var require_package3 = __commonJS({
|
|
|
19986
19993
|
module2.exports = {
|
|
19987
19994
|
name: "@aws-sdk/client-sso",
|
|
19988
19995
|
description: "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",
|
|
19989
|
-
version: "3.
|
|
19996
|
+
version: "3.982.0",
|
|
19990
19997
|
scripts: {
|
|
19991
19998
|
build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
19992
19999
|
"build:cjs": "node ../../scripts/compilation/inline client-sso",
|
|
@@ -20006,16 +20013,16 @@ var require_package3 = __commonJS({
|
|
|
20006
20013
|
dependencies: {
|
|
20007
20014
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
20008
20015
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
20009
|
-
"@aws-sdk/core": "^3.973.
|
|
20016
|
+
"@aws-sdk/core": "^3.973.6",
|
|
20010
20017
|
"@aws-sdk/middleware-host-header": "^3.972.3",
|
|
20011
20018
|
"@aws-sdk/middleware-logger": "^3.972.3",
|
|
20012
20019
|
"@aws-sdk/middleware-recursion-detection": "^3.972.3",
|
|
20013
|
-
"@aws-sdk/middleware-user-agent": "^3.972.
|
|
20020
|
+
"@aws-sdk/middleware-user-agent": "^3.972.6",
|
|
20014
20021
|
"@aws-sdk/region-config-resolver": "^3.972.3",
|
|
20015
20022
|
"@aws-sdk/types": "^3.973.1",
|
|
20016
|
-
"@aws-sdk/util-endpoints": "3.
|
|
20023
|
+
"@aws-sdk/util-endpoints": "3.982.0",
|
|
20017
20024
|
"@aws-sdk/util-user-agent-browser": "^3.972.3",
|
|
20018
|
-
"@aws-sdk/util-user-agent-node": "^3.972.
|
|
20025
|
+
"@aws-sdk/util-user-agent-node": "^3.972.4",
|
|
20019
20026
|
"@smithy/config-resolver": "^4.4.6",
|
|
20020
20027
|
"@smithy/core": "^3.22.0",
|
|
20021
20028
|
"@smithy/fetch-http-handler": "^5.3.9",
|
|
@@ -23834,17 +23841,23 @@ var require_dist_cjs66 = __commonJS({
|
|
|
23834
23841
|
messageSigner: await this.messageSigner(),
|
|
23835
23842
|
systemClockOffsetProvider: this.systemClockOffsetProvider
|
|
23836
23843
|
});
|
|
23837
|
-
|
|
23838
|
-
|
|
23839
|
-
|
|
23840
|
-
|
|
23844
|
+
let resolvePipeline;
|
|
23845
|
+
const pipelineError = new Promise((resolve7, reject2) => {
|
|
23846
|
+
resolvePipeline = () => resolve7(void 0);
|
|
23847
|
+
stream2.pipeline(payloadStream, signingStream, request.body, (err) => {
|
|
23848
|
+
if (err) {
|
|
23849
|
+
reject2(new Error(`Pipeline error in @aws-sdk/eventstream-handler-node: ${err.message}`, { cause: err }));
|
|
23850
|
+
}
|
|
23851
|
+
});
|
|
23841
23852
|
});
|
|
23842
23853
|
let result;
|
|
23843
23854
|
try {
|
|
23844
|
-
result = await next(args);
|
|
23855
|
+
result = await Promise.race([next(args), pipelineError]);
|
|
23845
23856
|
} catch (e5) {
|
|
23846
23857
|
request.body.end();
|
|
23847
23858
|
throw e5;
|
|
23859
|
+
} finally {
|
|
23860
|
+
resolvePipeline();
|
|
23848
23861
|
}
|
|
23849
23862
|
return result;
|
|
23850
23863
|
}
|
|
@@ -23936,7 +23949,7 @@ var init_package2 = __esm({
|
|
|
23936
23949
|
"node_modules/@aws-sdk/token-providers/node_modules/@aws-sdk/nested-clients/package.json"() {
|
|
23937
23950
|
package_default2 = {
|
|
23938
23951
|
name: "@aws-sdk/nested-clients",
|
|
23939
|
-
version: "3.
|
|
23952
|
+
version: "3.983.0",
|
|
23940
23953
|
description: "Nested clients for AWS SDK packages.",
|
|
23941
23954
|
main: "./dist-cjs/index.js",
|
|
23942
23955
|
module: "./dist-es/index.js",
|
|
@@ -23965,16 +23978,16 @@ var init_package2 = __esm({
|
|
|
23965
23978
|
dependencies: {
|
|
23966
23979
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
23967
23980
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
23968
|
-
"@aws-sdk/core": "^3.973.
|
|
23981
|
+
"@aws-sdk/core": "^3.973.6",
|
|
23969
23982
|
"@aws-sdk/middleware-host-header": "^3.972.3",
|
|
23970
23983
|
"@aws-sdk/middleware-logger": "^3.972.3",
|
|
23971
23984
|
"@aws-sdk/middleware-recursion-detection": "^3.972.3",
|
|
23972
|
-
"@aws-sdk/middleware-user-agent": "^3.972.
|
|
23985
|
+
"@aws-sdk/middleware-user-agent": "^3.972.6",
|
|
23973
23986
|
"@aws-sdk/region-config-resolver": "^3.972.3",
|
|
23974
23987
|
"@aws-sdk/types": "^3.973.1",
|
|
23975
|
-
"@aws-sdk/util-endpoints": "3.
|
|
23988
|
+
"@aws-sdk/util-endpoints": "3.983.0",
|
|
23976
23989
|
"@aws-sdk/util-user-agent-browser": "^3.972.3",
|
|
23977
|
-
"@aws-sdk/util-user-agent-node": "^3.972.
|
|
23990
|
+
"@aws-sdk/util-user-agent-node": "^3.972.4",
|
|
23978
23991
|
"@smithy/config-resolver": "^4.4.6",
|
|
23979
23992
|
"@smithy/core": "^3.22.0",
|
|
23980
23993
|
"@smithy/fetch-http-handler": "^5.3.9",
|
|
@@ -26041,6 +26054,7 @@ var require_dist_cjs70 = __commonJS({
|
|
|
26041
26054
|
var _IMWRSRn = "InvokeModelWithResponseStreamResponse";
|
|
26042
26055
|
var _IS = "ImageSource";
|
|
26043
26056
|
var _ISE4 = "InternalServerException";
|
|
26057
|
+
var _JSD = "JsonSchemaDefinition";
|
|
26044
26058
|
var _LAI = "ListAsyncInvokes";
|
|
26045
26059
|
var _LAIR = "ListAsyncInvokesRequest";
|
|
26046
26060
|
var _LAIRi = "ListAsyncInvokesResponse";
|
|
@@ -26053,6 +26067,9 @@ var require_dist_cjs70 = __commonJS({
|
|
|
26053
26067
|
var _MSEe = "MessageStopEvent";
|
|
26054
26068
|
var _MTE = "ModelTimeoutException";
|
|
26055
26069
|
var _Me = "Messages";
|
|
26070
|
+
var _OC = "OutputConfig";
|
|
26071
|
+
var _OF = "OutputFormat";
|
|
26072
|
+
var _OFS = "OutputFormatStructure";
|
|
26056
26073
|
var _PB = "PartBody";
|
|
26057
26074
|
var _PC2 = "PerformanceConfiguration";
|
|
26058
26075
|
var _PP = "PayloadPart";
|
|
@@ -26208,6 +26225,7 @@ var require_dist_cjs70 = __commonJS({
|
|
|
26208
26225
|
var _imp = "impossible";
|
|
26209
26226
|
var _in = "invalid";
|
|
26210
26227
|
var _j = "json";
|
|
26228
|
+
var _jS = "jsonSchema";
|
|
26211
26229
|
var _k = "key";
|
|
26212
26230
|
var _kKI = "kmsKeyId";
|
|
26213
26231
|
var _l = "location";
|
|
@@ -26238,6 +26256,7 @@ var require_dist_cjs70 = __commonJS({
|
|
|
26238
26256
|
var _nTo = "noTranslations";
|
|
26239
26257
|
var _o = "outputs";
|
|
26240
26258
|
var _oA = "outputAssessments";
|
|
26259
|
+
var _oC = "outputConfig";
|
|
26241
26260
|
var _oDC = "outputDataConfig";
|
|
26242
26261
|
var _oM = "originalMessage";
|
|
26243
26262
|
var _oS = "outputScope";
|
|
@@ -26287,6 +26306,7 @@ var require_dist_cjs70 = __commonJS({
|
|
|
26287
26306
|
var _sUE = "serviceUnavailableException";
|
|
26288
26307
|
var _sa = "satisfiable";
|
|
26289
26308
|
var _sc = "score";
|
|
26309
|
+
var _sch = "schema";
|
|
26290
26310
|
var _se3 = "server";
|
|
26291
26311
|
var _si = "signature";
|
|
26292
26312
|
var _sm4 = "smithy.ts.sdk.synthetic.com.amazonaws.bedrockruntime";
|
|
@@ -26295,6 +26315,8 @@ var require_dist_cjs70 = __commonJS({
|
|
|
26295
26315
|
var _stat = "statements";
|
|
26296
26316
|
var _str = "stream";
|
|
26297
26317
|
var _stre = "streaming";
|
|
26318
|
+
var _stri = "strict";
|
|
26319
|
+
var _stru = "structure";
|
|
26298
26320
|
var _sy = "system";
|
|
26299
26321
|
var _t = "ttl";
|
|
26300
26322
|
var _tA = "translationAmbiguous";
|
|
@@ -26303,6 +26325,7 @@ var require_dist_cjs70 = __commonJS({
|
|
|
26303
26325
|
var _tCo = "toolChoice";
|
|
26304
26326
|
var _tCoo = "tooComplex";
|
|
26305
26327
|
var _tE = "throttlingException";
|
|
26328
|
+
var _tF = "textFormat";
|
|
26306
26329
|
var _tP = "topicPolicy";
|
|
26307
26330
|
var _tPU = "topicPolicyUnits";
|
|
26308
26331
|
var _tPo = "topP";
|
|
@@ -26546,8 +26569,8 @@ var require_dist_cjs70 = __commonJS({
|
|
|
26546
26569
|
n05,
|
|
26547
26570
|
_CR,
|
|
26548
26571
|
0,
|
|
26549
|
-
[_mI, _me, _sy, _iC, _tC, _gCu, _aMRF, _pV, _aMRFP, _rM, _pC, _sTe],
|
|
26550
|
-
[[0, 1], [() => Messages, 0], [() => SystemContentBlocks, 0], () => InferenceConfiguration$, () => ToolConfiguration$, () => GuardrailConfiguration$, 15, [() => PromptVariableMap, 0], 64 | 0, [() => RequestMetadata, 0], () => PerformanceConfiguration$, () => ServiceTier
|
|
26572
|
+
[_mI, _me, _sy, _iC, _tC, _gCu, _aMRF, _pV, _aMRFP, _rM, _pC, _sTe, _oC],
|
|
26573
|
+
[[0, 1], [() => Messages, 0], [() => SystemContentBlocks, 0], () => InferenceConfiguration$, () => ToolConfiguration$, () => GuardrailConfiguration$, 15, [() => PromptVariableMap, 0], 64 | 0, [() => RequestMetadata, 0], () => PerformanceConfiguration$, () => ServiceTier$, [() => OutputConfig$, 0]],
|
|
26551
26574
|
1
|
|
26552
26575
|
];
|
|
26553
26576
|
var ConverseResponse$ = [
|
|
@@ -26582,8 +26605,8 @@ var require_dist_cjs70 = __commonJS({
|
|
|
26582
26605
|
n05,
|
|
26583
26606
|
_CSR,
|
|
26584
26607
|
0,
|
|
26585
|
-
[_mI, _me, _sy, _iC, _tC, _gCu, _aMRF, _pV, _aMRFP, _rM, _pC, _sTe],
|
|
26586
|
-
[[0, 1], [() => Messages, 0], [() => SystemContentBlocks, 0], () => InferenceConfiguration$, () => ToolConfiguration$, () => GuardrailStreamConfiguration$, 15, [() => PromptVariableMap, 0], 64 | 0, [() => RequestMetadata, 0], () => PerformanceConfiguration$, () => ServiceTier
|
|
26608
|
+
[_mI, _me, _sy, _iC, _tC, _gCu, _aMRF, _pV, _aMRFP, _rM, _pC, _sTe, _oC],
|
|
26609
|
+
[[0, 1], [() => Messages, 0], [() => SystemContentBlocks, 0], () => InferenceConfiguration$, () => ToolConfiguration$, () => GuardrailStreamConfiguration$, 15, [() => PromptVariableMap, 0], 64 | 0, [() => RequestMetadata, 0], () => PerformanceConfiguration$, () => ServiceTier$, [() => OutputConfig$, 0]],
|
|
26587
26610
|
1
|
|
26588
26611
|
];
|
|
26589
26612
|
var ConverseStreamResponse$ = [
|
|
@@ -27145,6 +27168,15 @@ var require_dist_cjs70 = __commonJS({
|
|
|
27145
27168
|
[[() => ResponseStream$, 16], [0, { [_hH]: _XABCT }], [0, { [_hH]: _XABPL }], [0, { [_hH]: _XABST }]],
|
|
27146
27169
|
2
|
|
27147
27170
|
];
|
|
27171
|
+
var JsonSchemaDefinition$ = [
|
|
27172
|
+
3,
|
|
27173
|
+
n05,
|
|
27174
|
+
_JSD,
|
|
27175
|
+
0,
|
|
27176
|
+
[_sch, _n, _des],
|
|
27177
|
+
[0, 0, 0],
|
|
27178
|
+
1
|
|
27179
|
+
];
|
|
27148
27180
|
var ListAsyncInvokesRequest$ = [
|
|
27149
27181
|
3,
|
|
27150
27182
|
n05,
|
|
@@ -27224,6 +27256,23 @@ var require_dist_cjs70 = __commonJS({
|
|
|
27224
27256
|
[0]
|
|
27225
27257
|
];
|
|
27226
27258
|
schema.TypeRegistry.for(n05).registerError(ModelTimeoutException$, ModelTimeoutException);
|
|
27259
|
+
var OutputConfig$ = [
|
|
27260
|
+
3,
|
|
27261
|
+
n05,
|
|
27262
|
+
_OC,
|
|
27263
|
+
0,
|
|
27264
|
+
[_tF],
|
|
27265
|
+
[[() => OutputFormat$, 0]]
|
|
27266
|
+
];
|
|
27267
|
+
var OutputFormat$ = [
|
|
27268
|
+
3,
|
|
27269
|
+
n05,
|
|
27270
|
+
_OF,
|
|
27271
|
+
0,
|
|
27272
|
+
[_ty, _stru],
|
|
27273
|
+
[0, [() => OutputFormatStructure$, 0]],
|
|
27274
|
+
2
|
|
27275
|
+
];
|
|
27227
27276
|
var PayloadPart$ = [
|
|
27228
27277
|
3,
|
|
27229
27278
|
n05,
|
|
@@ -27423,8 +27472,8 @@ var require_dist_cjs70 = __commonJS({
|
|
|
27423
27472
|
n05,
|
|
27424
27473
|
_TS,
|
|
27425
27474
|
0,
|
|
27426
|
-
[_n, _iS, _des],
|
|
27427
|
-
[0, () => ToolInputSchema$, 0],
|
|
27475
|
+
[_n, _iS, _des, _stri],
|
|
27476
|
+
[0, () => ToolInputSchema$, 0, 2],
|
|
27428
27477
|
2
|
|
27429
27478
|
];
|
|
27430
27479
|
var ToolUseBlock$ = [
|
|
@@ -27957,6 +28006,14 @@ var require_dist_cjs70 = __commonJS({
|
|
|
27957
28006
|
[_ch, _iSE, _mSEE, _vE, _tE, _mTE, _sUE],
|
|
27958
28007
|
[[() => BidirectionalOutputPayloadPart$, 0], [() => InternalServerException$4, 0], [() => ModelStreamErrorException$, 0], [() => ValidationException$2, 0], [() => ThrottlingException$, 0], [() => ModelTimeoutException$, 0], [() => ServiceUnavailableException$, 0]]
|
|
27959
28008
|
];
|
|
28009
|
+
var OutputFormatStructure$ = [
|
|
28010
|
+
4,
|
|
28011
|
+
n05,
|
|
28012
|
+
_OFS,
|
|
28013
|
+
8,
|
|
28014
|
+
[_jS],
|
|
28015
|
+
[() => JsonSchemaDefinition$]
|
|
28016
|
+
];
|
|
27960
28017
|
var PromptVariableValues$ = [
|
|
27961
28018
|
4,
|
|
27962
28019
|
n05,
|
|
@@ -28410,6 +28467,9 @@ var require_dist_cjs70 = __commonJS({
|
|
|
28410
28467
|
ASSISTANT: "assistant",
|
|
28411
28468
|
USER: "user"
|
|
28412
28469
|
};
|
|
28470
|
+
var OutputFormatType = {
|
|
28471
|
+
JSON_SCHEMA: "json_schema"
|
|
28472
|
+
};
|
|
28413
28473
|
var PerformanceConfigLatency = {
|
|
28414
28474
|
OPTIMIZED: "optimized",
|
|
28415
28475
|
STANDARD: "standard"
|
|
@@ -28621,6 +28681,7 @@ var require_dist_cjs70 = __commonJS({
|
|
|
28621
28681
|
exports2.InvokeModelWithResponseStreamCommand = InvokeModelWithResponseStreamCommand;
|
|
28622
28682
|
exports2.InvokeModelWithResponseStreamRequest$ = InvokeModelWithResponseStreamRequest$;
|
|
28623
28683
|
exports2.InvokeModelWithResponseStreamResponse$ = InvokeModelWithResponseStreamResponse$;
|
|
28684
|
+
exports2.JsonSchemaDefinition$ = JsonSchemaDefinition$;
|
|
28624
28685
|
exports2.ListAsyncInvokes$ = ListAsyncInvokes$;
|
|
28625
28686
|
exports2.ListAsyncInvokesCommand = ListAsyncInvokesCommand;
|
|
28626
28687
|
exports2.ListAsyncInvokesRequest$ = ListAsyncInvokesRequest$;
|
|
@@ -28636,6 +28697,10 @@ var require_dist_cjs70 = __commonJS({
|
|
|
28636
28697
|
exports2.ModelStreamErrorException$ = ModelStreamErrorException$;
|
|
28637
28698
|
exports2.ModelTimeoutException = ModelTimeoutException;
|
|
28638
28699
|
exports2.ModelTimeoutException$ = ModelTimeoutException$;
|
|
28700
|
+
exports2.OutputConfig$ = OutputConfig$;
|
|
28701
|
+
exports2.OutputFormat$ = OutputFormat$;
|
|
28702
|
+
exports2.OutputFormatStructure$ = OutputFormatStructure$;
|
|
28703
|
+
exports2.OutputFormatType = OutputFormatType;
|
|
28639
28704
|
exports2.PayloadPart$ = PayloadPart$;
|
|
28640
28705
|
exports2.PerformanceConfigLatency = PerformanceConfigLatency;
|
|
28641
28706
|
exports2.PerformanceConfiguration$ = PerformanceConfiguration$;
|
|
@@ -33071,7 +33136,7 @@ var init_grep = __esm({
|
|
|
33071
33136
|
// src/delegate.js
|
|
33072
33137
|
async function delegate({
|
|
33073
33138
|
task,
|
|
33074
|
-
timeout =
|
|
33139
|
+
timeout = DEFAULT_DELEGATE_TIMEOUT,
|
|
33075
33140
|
debug = false,
|
|
33076
33141
|
currentIteration = 0,
|
|
33077
33142
|
maxIterations = 30,
|
|
@@ -33249,7 +33314,7 @@ async function delegate({
|
|
|
33249
33314
|
throw new Error(`Delegation failed: ${error2.message}`);
|
|
33250
33315
|
}
|
|
33251
33316
|
}
|
|
33252
|
-
var import_crypto2, DelegationManager, defaultDelegationManager;
|
|
33317
|
+
var import_crypto2, DelegationManager, defaultDelegationManager, DEFAULT_DELEGATE_TIMEOUT;
|
|
33253
33318
|
var init_delegate = __esm({
|
|
33254
33319
|
"src/delegate.js"() {
|
|
33255
33320
|
"use strict";
|
|
@@ -33387,9 +33452,12 @@ var init_delegate = __esm({
|
|
|
33387
33452
|
}
|
|
33388
33453
|
/**
|
|
33389
33454
|
* Process the wait queue - grant slot to next waiting delegation
|
|
33455
|
+
* Uses setImmediate to avoid blocking the event loop when resolving promises.
|
|
33390
33456
|
* @private
|
|
33391
33457
|
*/
|
|
33392
33458
|
_processQueue(debug = false) {
|
|
33459
|
+
const toResolve = [];
|
|
33460
|
+
const toReject = [];
|
|
33393
33461
|
while (this.waitQueue.length > 0 && this.globalActive < this.maxConcurrent) {
|
|
33394
33462
|
const next = this.waitQueue.shift();
|
|
33395
33463
|
if (!next) break;
|
|
@@ -33401,7 +33469,7 @@ var init_delegate = __esm({
|
|
|
33401
33469
|
if (debug) {
|
|
33402
33470
|
console.error(`[DelegationManager] Session limit (${this.maxPerSession}) reached for queued item, rejecting`);
|
|
33403
33471
|
}
|
|
33404
|
-
reject2
|
|
33472
|
+
toReject.push({ reject: reject2, error: new Error(`Maximum delegations per session (${this.maxPerSession}) reached for session ${parentSessionId}`) });
|
|
33405
33473
|
continue;
|
|
33406
33474
|
}
|
|
33407
33475
|
}
|
|
@@ -33410,7 +33478,17 @@ var init_delegate = __esm({
|
|
|
33410
33478
|
const waitTime = Date.now() - queuedAt;
|
|
33411
33479
|
console.error(`[DelegationManager] Granted slot from queue (waited ${waitTime}ms). Active: ${this.globalActive}/${this.maxConcurrent}`);
|
|
33412
33480
|
}
|
|
33413
|
-
resolve7
|
|
33481
|
+
toResolve.push(resolve7);
|
|
33482
|
+
}
|
|
33483
|
+
if (toResolve.length > 0 || toReject.length > 0) {
|
|
33484
|
+
setImmediate(() => {
|
|
33485
|
+
for (const resolve7 of toResolve) {
|
|
33486
|
+
resolve7(true);
|
|
33487
|
+
}
|
|
33488
|
+
for (const { reject: reject2, error: error2 } of toReject) {
|
|
33489
|
+
reject2(error2);
|
|
33490
|
+
}
|
|
33491
|
+
});
|
|
33414
33492
|
}
|
|
33415
33493
|
}
|
|
33416
33494
|
/**
|
|
@@ -33459,6 +33537,7 @@ var init_delegate = __esm({
|
|
|
33459
33537
|
}
|
|
33460
33538
|
};
|
|
33461
33539
|
defaultDelegationManager = new DelegationManager();
|
|
33540
|
+
DEFAULT_DELEGATE_TIMEOUT = parseInt(process.env.DELEGATE_TIMEOUT, 10) || 300;
|
|
33462
33541
|
}
|
|
33463
33542
|
});
|
|
33464
33543
|
|
|
@@ -39039,7 +39118,10 @@ var init_common2 = __esm({
|
|
|
39039
39118
|
init_taskTool();
|
|
39040
39119
|
searchSchema = external_exports.object({
|
|
39041
39120
|
query: external_exports.string().describe("Search query with Elasticsearch syntax. Use quotes for exact matches, AND/OR for boolean logic, - for negation."),
|
|
39042
|
-
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.')
|
|
39121
|
+
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.'),
|
|
39122
|
+
exact: external_exports.boolean().optional().default(false).describe('Default (false) enables stemming and keyword splitting for exploratory search - "getUserData" matches "get", "user", "data", etc. Set true for precise symbol lookup where "getUserData" matches only "getUserData". Use true when you know the exact symbol name.'),
|
|
39123
|
+
session: external_exports.string().optional().describe("Session ID for result caching and pagination. Pass the session ID from a previous search to get additional results (next page). Results already shown in a session are automatically excluded. Omit for a fresh search."),
|
|
39124
|
+
nextPage: external_exports.boolean().optional().default(false).describe("Set to true when requesting the next page of results. Requires passing the same session ID from the previous search output.")
|
|
39043
39125
|
});
|
|
39044
39126
|
querySchema = external_exports.object({
|
|
39045
39127
|
pattern: external_exports.string().describe("AST pattern to search for. Use $NAME for variable names, $$$PARAMS for parameter lists, etc."),
|
|
@@ -39138,6 +39220,9 @@ You need to focus on main keywords when constructing the query, and always use e
|
|
|
39138
39220
|
Parameters:
|
|
39139
39221
|
- query: (required) Search query. Free-form questions are accepted, but for best results prefer Elasticsearch-style syntax with quotes for exact matches ("functionName"), AND/OR for boolean logic, - for negation, + for important terms.
|
|
39140
39222
|
- path: (optional, default: '.') Path to search in. All dependencies located in /dep folder, under language sub folders, like this: "/dep/go/github.com/owner/repo", "/dep/js/package_name", or "/dep/rust/cargo_name" etc.
|
|
39223
|
+
- exact: (optional, default: false) Set to true for precise symbol lookup without stemming/tokenization. Use when you know the exact symbol name (e.g., "getUserData" matches only "getUserData", not "get", "user", "data").
|
|
39224
|
+
- session: (optional) Session ID for pagination. Pass the session ID returned from a previous search to get the next page of results. Results already shown are automatically excluded.
|
|
39225
|
+
- nextPage: (optional, default: false) Set to true when requesting the next page of results. Requires passing the same session ID from the previous search.
|
|
39141
39226
|
|
|
39142
39227
|
**Workflow:** Always start with search, then use extract for detailed context when needed.
|
|
39143
39228
|
|
|
@@ -39544,7 +39629,7 @@ var init_vercel = __esm({
|
|
|
39544
39629
|
name: "search",
|
|
39545
39630
|
description: searchDelegate ? `${searchDescription} (delegates code search to a subagent and returns extracted code blocks)` : searchDescription,
|
|
39546
39631
|
inputSchema: searchSchema,
|
|
39547
|
-
execute: async ({ query: searchQuery, path: path9, allow_tests, exact, maxTokens: paramMaxTokens, language }) => {
|
|
39632
|
+
execute: async ({ query: searchQuery, path: path9, allow_tests, exact, maxTokens: paramMaxTokens, language, session, nextPage }) => {
|
|
39548
39633
|
const effectiveMaxTokens = paramMaxTokens || maxTokens;
|
|
39549
39634
|
let searchPaths;
|
|
39550
39635
|
if (path9) {
|
|
@@ -39563,8 +39648,10 @@ var init_vercel = __esm({
|
|
|
39563
39648
|
exact,
|
|
39564
39649
|
json: false,
|
|
39565
39650
|
maxTokens: effectiveMaxTokens,
|
|
39566
|
-
session: sessionId,
|
|
39567
|
-
//
|
|
39651
|
+
session: session || sessionId,
|
|
39652
|
+
// Use explicit session param, or fall back to options sessionId
|
|
39653
|
+
nextPage,
|
|
39654
|
+
// Pass nextPage parameter for pagination
|
|
39568
39655
|
language
|
|
39569
39656
|
// Pass language parameter if provided
|
|
39570
39657
|
};
|