@probelabs/probe 0.6.0-rc127 → 0.6.0-rc129
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 +179 -5
- package/build/agent/index.js +269 -12
- package/cjs/agent/ProbeAgent.cjs +379 -185
- package/cjs/index.cjs +379 -185
- package/package.json +2 -2
- package/src/agent/ProbeAgent.js +179 -5
package/cjs/index.cjs
CHANGED
|
@@ -22326,37 +22326,15 @@ var require_dist_cjs36 = __commonJS({
|
|
|
22326
22326
|
|
|
22327
22327
|
// node_modules/@aws-sdk/middleware-websocket/dist-cjs/index.js
|
|
22328
22328
|
var require_dist_cjs37 = __commonJS({
|
|
22329
|
-
"node_modules/@aws-sdk/middleware-websocket/dist-cjs/index.js"(exports2
|
|
22329
|
+
"node_modules/@aws-sdk/middleware-websocket/dist-cjs/index.js"(exports2) {
|
|
22330
22330
|
"use strict";
|
|
22331
|
-
var
|
|
22332
|
-
var
|
|
22333
|
-
var
|
|
22334
|
-
var
|
|
22335
|
-
var
|
|
22336
|
-
var
|
|
22337
|
-
|
|
22338
|
-
__defProp2(target, name14, { get: all[name14], enumerable: true });
|
|
22339
|
-
};
|
|
22340
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
22341
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
22342
|
-
for (let key of __getOwnPropNames2(from))
|
|
22343
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
22344
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
22345
|
-
}
|
|
22346
|
-
return to;
|
|
22347
|
-
};
|
|
22348
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
22349
|
-
var index_exports2 = {};
|
|
22350
|
-
__export2(index_exports2, {
|
|
22351
|
-
WebSocketFetchHandler: () => WebSocketFetchHandler,
|
|
22352
|
-
eventStreamPayloadHandlerProvider: () => eventStreamPayloadHandlerProvider,
|
|
22353
|
-
getWebSocketPlugin: () => getWebSocketPlugin,
|
|
22354
|
-
resolveWebSocketConfig: () => resolveWebSocketConfig
|
|
22355
|
-
});
|
|
22356
|
-
module2.exports = __toCommonJS2(index_exports2);
|
|
22357
|
-
var import_eventstream_codec = require_dist_cjs33();
|
|
22358
|
-
var import_util_hex_encoding = require_dist_cjs17();
|
|
22359
|
-
var getEventSigningTransformStream = /* @__PURE__ */ __name((initialSignature, messageSigner, eventStreamCodec, systemClockOffsetProvider) => {
|
|
22331
|
+
var eventstreamCodec = require_dist_cjs33();
|
|
22332
|
+
var utilHexEncoding = require_dist_cjs17();
|
|
22333
|
+
var protocolHttp = require_dist_cjs2();
|
|
22334
|
+
var utilFormatUrl = require_dist_cjs34();
|
|
22335
|
+
var eventstreamSerdeBrowser = require_dist_cjs36();
|
|
22336
|
+
var fetchHttpHandler = require_dist_cjs16();
|
|
22337
|
+
var getEventSigningTransformStream = (initialSignature, messageSigner, eventStreamCodec, systemClockOffsetProvider) => {
|
|
22360
22338
|
let priorSignature = initialSignature;
|
|
22361
22339
|
const transformer = {
|
|
22362
22340
|
start() {
|
|
@@ -22367,25 +22345,22 @@ var require_dist_cjs37 = __commonJS({
|
|
|
22367
22345
|
const dateHeader = {
|
|
22368
22346
|
":date": { type: "timestamp", value: now }
|
|
22369
22347
|
};
|
|
22370
|
-
const signedMessage = await messageSigner.sign(
|
|
22371
|
-
{
|
|
22372
|
-
|
|
22373
|
-
|
|
22374
|
-
headers: dateHeader
|
|
22375
|
-
},
|
|
22376
|
-
priorSignature
|
|
22348
|
+
const signedMessage = await messageSigner.sign({
|
|
22349
|
+
message: {
|
|
22350
|
+
body: chunk,
|
|
22351
|
+
headers: dateHeader
|
|
22377
22352
|
},
|
|
22378
|
-
|
|
22379
|
-
|
|
22380
|
-
|
|
22381
|
-
);
|
|
22353
|
+
priorSignature
|
|
22354
|
+
}, {
|
|
22355
|
+
signingDate: now
|
|
22356
|
+
});
|
|
22382
22357
|
priorSignature = signedMessage.signature;
|
|
22383
22358
|
const serializedSigned = eventStreamCodec.encode({
|
|
22384
22359
|
headers: {
|
|
22385
22360
|
...dateHeader,
|
|
22386
22361
|
":chunk-signature": {
|
|
22387
22362
|
type: "binary",
|
|
22388
|
-
value:
|
|
22363
|
+
value: utilHexEncoding.fromHex(signedMessage.signature)
|
|
22389
22364
|
}
|
|
22390
22365
|
},
|
|
22391
22366
|
body: chunk
|
|
@@ -22397,17 +22372,14 @@ var require_dist_cjs37 = __commonJS({
|
|
|
22397
22372
|
}
|
|
22398
22373
|
};
|
|
22399
22374
|
return new TransformStream({ ...transformer });
|
|
22400
|
-
}
|
|
22375
|
+
};
|
|
22401
22376
|
var EventStreamPayloadHandler = class {
|
|
22402
|
-
static {
|
|
22403
|
-
__name(this, "EventStreamPayloadHandler");
|
|
22404
|
-
}
|
|
22405
22377
|
messageSigner;
|
|
22406
22378
|
eventStreamCodec;
|
|
22407
22379
|
systemClockOffsetProvider;
|
|
22408
22380
|
constructor(options) {
|
|
22409
22381
|
this.messageSigner = options.messageSigner;
|
|
22410
|
-
this.eventStreamCodec = new
|
|
22382
|
+
this.eventStreamCodec = new eventstreamCodec.EventStreamCodec(options.utf8Encoder, options.utf8Decoder);
|
|
22411
22383
|
this.systemClockOffsetProvider = async () => options.systemClockOffset ?? 0;
|
|
22412
22384
|
}
|
|
22413
22385
|
async handle(next, args, context = {}) {
|
|
@@ -22427,19 +22399,14 @@ var require_dist_cjs37 = __commonJS({
|
|
|
22427
22399
|
}
|
|
22428
22400
|
const match2 = (headers["authorization"] || "").match(/Signature=([\w]+)$/);
|
|
22429
22401
|
const priorSignature = (match2 || [])[1] || query2 && query2["X-Amz-Signature"] || "";
|
|
22430
|
-
const signingStream = getEventSigningTransformStream(
|
|
22431
|
-
priorSignature,
|
|
22432
|
-
await this.messageSigner(),
|
|
22433
|
-
this.eventStreamCodec,
|
|
22434
|
-
this.systemClockOffsetProvider
|
|
22435
|
-
);
|
|
22402
|
+
const signingStream = getEventSigningTransformStream(priorSignature, await this.messageSigner(), this.eventStreamCodec, this.systemClockOffsetProvider);
|
|
22436
22403
|
const signedPayload = payload2.pipeThrough(signingStream);
|
|
22437
22404
|
signedPayload.pipeThrough(placeHolderStream);
|
|
22438
22405
|
return result;
|
|
22439
22406
|
}
|
|
22440
22407
|
};
|
|
22441
|
-
var eventStreamPayloadHandlerProvider =
|
|
22442
|
-
var injectSessionIdMiddleware =
|
|
22408
|
+
var eventStreamPayloadHandlerProvider = (options) => new EventStreamPayloadHandler(options);
|
|
22409
|
+
var injectSessionIdMiddleware = () => (next) => async (args) => {
|
|
22443
22410
|
const requestParams = {
|
|
22444
22411
|
...args.input
|
|
22445
22412
|
};
|
|
@@ -22449,17 +22416,16 @@ var require_dist_cjs37 = __commonJS({
|
|
|
22449
22416
|
output.SessionId = requestParams.SessionId;
|
|
22450
22417
|
}
|
|
22451
22418
|
return response;
|
|
22452
|
-
}
|
|
22419
|
+
};
|
|
22453
22420
|
var injectSessionIdMiddlewareOptions = {
|
|
22454
22421
|
step: "initialize",
|
|
22455
22422
|
name: "injectSessionIdMiddleware",
|
|
22456
22423
|
tags: ["WEBSOCKET", "EVENT_STREAM"],
|
|
22457
22424
|
override: true
|
|
22458
22425
|
};
|
|
22459
|
-
var
|
|
22460
|
-
var websocketEndpointMiddleware = /* @__PURE__ */ __name((config, options) => (next) => (args) => {
|
|
22426
|
+
var websocketEndpointMiddleware = (config, options) => (next) => (args) => {
|
|
22461
22427
|
const { request } = args;
|
|
22462
|
-
if (
|
|
22428
|
+
if (protocolHttp.HttpRequest.isInstance(request) && config.requestHandler.metadata?.handlerProtocol?.toLowerCase().includes("websocket")) {
|
|
22463
22429
|
request.protocol = "wss:";
|
|
22464
22430
|
request.method = "GET";
|
|
22465
22431
|
request.path = `${request.path}-websocket`;
|
|
@@ -22478,7 +22444,7 @@ var require_dist_cjs37 = __commonJS({
|
|
|
22478
22444
|
request.headers = { host: headers.host ?? request.hostname };
|
|
22479
22445
|
}
|
|
22480
22446
|
return next(args);
|
|
22481
|
-
}
|
|
22447
|
+
};
|
|
22482
22448
|
var websocketEndpointMiddlewareOptions = {
|
|
22483
22449
|
name: "websocketEndpointMiddleware",
|
|
22484
22450
|
tags: ["WEBSOCKET", "EVENT_STREAM"],
|
|
@@ -22486,17 +22452,14 @@ var require_dist_cjs37 = __commonJS({
|
|
|
22486
22452
|
toMiddleware: "eventStreamHeaderMiddleware",
|
|
22487
22453
|
override: true
|
|
22488
22454
|
};
|
|
22489
|
-
var getWebSocketPlugin =
|
|
22490
|
-
applyToStack:
|
|
22455
|
+
var getWebSocketPlugin = (config, options) => ({
|
|
22456
|
+
applyToStack: (clientStack) => {
|
|
22491
22457
|
clientStack.addRelativeTo(websocketEndpointMiddleware(config, options), websocketEndpointMiddlewareOptions);
|
|
22492
22458
|
clientStack.add(injectSessionIdMiddleware(), injectSessionIdMiddlewareOptions);
|
|
22493
|
-
}, "applyToStack")
|
|
22494
|
-
}), "getWebSocketPlugin");
|
|
22495
|
-
var isWebSocketRequest = /* @__PURE__ */ __name((request) => request.protocol === "ws:" || request.protocol === "wss:", "isWebSocketRequest");
|
|
22496
|
-
var WebsocketSignatureV4 = class {
|
|
22497
|
-
static {
|
|
22498
|
-
__name(this, "WebsocketSignatureV4");
|
|
22499
22459
|
}
|
|
22460
|
+
});
|
|
22461
|
+
var isWebSocketRequest = (request) => request.protocol === "ws:" || request.protocol === "wss:";
|
|
22462
|
+
var WebsocketSignatureV4 = class {
|
|
22500
22463
|
signer;
|
|
22501
22464
|
constructor(options) {
|
|
22502
22465
|
this.signer = options.signer;
|
|
@@ -22505,19 +22468,12 @@ var require_dist_cjs37 = __commonJS({
|
|
|
22505
22468
|
return this.signer.presign(originalRequest, options);
|
|
22506
22469
|
}
|
|
22507
22470
|
async sign(toSign, options) {
|
|
22508
|
-
if (
|
|
22509
|
-
const signedRequest = await this.signer.presign(
|
|
22510
|
-
|
|
22511
|
-
|
|
22512
|
-
|
|
22513
|
-
|
|
22514
|
-
expiresIn: 60,
|
|
22515
|
-
// Not to sign headers. Transcribe-streaming WebSocket
|
|
22516
|
-
// request omits headers except for required 'host' header. If we sign
|
|
22517
|
-
// the other headers, the signature could be mismatch.
|
|
22518
|
-
unsignableHeaders: new Set(Object.keys(toSign.headers).filter((header) => header !== "host"))
|
|
22519
|
-
}
|
|
22520
|
-
);
|
|
22471
|
+
if (protocolHttp.HttpRequest.isInstance(toSign) && isWebSocketRequest(toSign)) {
|
|
22472
|
+
const signedRequest = await this.signer.presign({ ...toSign, body: "" }, {
|
|
22473
|
+
...options,
|
|
22474
|
+
expiresIn: 60,
|
|
22475
|
+
unsignableHeaders: new Set(Object.keys(toSign.headers).filter((header) => header !== "host"))
|
|
22476
|
+
});
|
|
22521
22477
|
return {
|
|
22522
22478
|
...signedRequest,
|
|
22523
22479
|
body: toSign.body
|
|
@@ -22527,27 +22483,21 @@ var require_dist_cjs37 = __commonJS({
|
|
|
22527
22483
|
}
|
|
22528
22484
|
}
|
|
22529
22485
|
};
|
|
22530
|
-
var resolveWebSocketConfig =
|
|
22486
|
+
var resolveWebSocketConfig = (input) => {
|
|
22531
22487
|
const { signer } = input;
|
|
22532
22488
|
return Object.assign(input, {
|
|
22533
|
-
signer:
|
|
22489
|
+
signer: async (authScheme) => {
|
|
22534
22490
|
const signerObj = await signer(authScheme);
|
|
22535
22491
|
if (validateSigner(signerObj)) {
|
|
22536
22492
|
return new WebsocketSignatureV4({ signer: signerObj });
|
|
22537
22493
|
}
|
|
22538
22494
|
throw new Error("Expected WebsocketSignatureV4 signer, please check the client constructor.");
|
|
22539
|
-
}
|
|
22495
|
+
}
|
|
22540
22496
|
});
|
|
22541
|
-
}
|
|
22542
|
-
var validateSigner =
|
|
22543
|
-
var import_util_format_url = require_dist_cjs34();
|
|
22544
|
-
var import_eventstream_serde_browser = require_dist_cjs36();
|
|
22545
|
-
var import_fetch_http_handler = require_dist_cjs16();
|
|
22497
|
+
};
|
|
22498
|
+
var validateSigner = (signer) => !!signer;
|
|
22546
22499
|
var DEFAULT_WS_CONNECTION_TIMEOUT_MS = 2e3;
|
|
22547
22500
|
var WebSocketFetchHandler = class _WebSocketFetchHandler {
|
|
22548
|
-
static {
|
|
22549
|
-
__name(this, "WebSocketFetchHandler");
|
|
22550
|
-
}
|
|
22551
22501
|
metadata = {
|
|
22552
22502
|
handlerProtocol: "websocket/h1.1"
|
|
22553
22503
|
};
|
|
@@ -22555,20 +22505,13 @@ var require_dist_cjs37 = __commonJS({
|
|
|
22555
22505
|
configPromise;
|
|
22556
22506
|
httpHandler;
|
|
22557
22507
|
sockets = {};
|
|
22558
|
-
|
|
22559
|
-
* @returns the input if it is an HttpHandler of any class,
|
|
22560
|
-
* or instantiates a new instance of this handler.
|
|
22561
|
-
*/
|
|
22562
|
-
static create(instanceOrOptions, httpHandler = new import_fetch_http_handler.FetchHttpHandler()) {
|
|
22508
|
+
static create(instanceOrOptions, httpHandler = new fetchHttpHandler.FetchHttpHandler()) {
|
|
22563
22509
|
if (typeof instanceOrOptions?.handle === "function") {
|
|
22564
22510
|
return instanceOrOptions;
|
|
22565
22511
|
}
|
|
22566
|
-
return new _WebSocketFetchHandler(
|
|
22567
|
-
instanceOrOptions,
|
|
22568
|
-
httpHandler
|
|
22569
|
-
);
|
|
22512
|
+
return new _WebSocketFetchHandler(instanceOrOptions, httpHandler);
|
|
22570
22513
|
}
|
|
22571
|
-
constructor(options, httpHandler = new
|
|
22514
|
+
constructor(options, httpHandler = new fetchHttpHandler.FetchHttpHandler()) {
|
|
22572
22515
|
this.httpHandler = httpHandler;
|
|
22573
22516
|
if (typeof options === "function") {
|
|
22574
22517
|
this.config = {};
|
|
@@ -22578,10 +22521,6 @@ var require_dist_cjs37 = __commonJS({
|
|
|
22578
22521
|
this.configPromise = Promise.resolve(this.config);
|
|
22579
22522
|
}
|
|
22580
22523
|
}
|
|
22581
|
-
/**
|
|
22582
|
-
* Destroys the WebSocketHandler.
|
|
22583
|
-
* Closes all sockets from the socket pool.
|
|
22584
|
-
*/
|
|
22585
22524
|
destroy() {
|
|
22586
22525
|
for (const [key, sockets] of Object.entries(this.sockets)) {
|
|
22587
22526
|
for (const socket of sockets) {
|
|
@@ -22594,7 +22533,7 @@ var require_dist_cjs37 = __commonJS({
|
|
|
22594
22533
|
if (!isWebSocketRequest(request)) {
|
|
22595
22534
|
return this.httpHandler.handle(request);
|
|
22596
22535
|
}
|
|
22597
|
-
const url =
|
|
22536
|
+
const url = utilFormatUrl.formatUrl(request);
|
|
22598
22537
|
const socket = new WebSocket(url);
|
|
22599
22538
|
if (!this.sockets[url]) {
|
|
22600
22539
|
this.sockets[url] = [];
|
|
@@ -22609,9 +22548,8 @@ var require_dist_cjs37 = __commonJS({
|
|
|
22609
22548
|
const asyncIterable = this.connect(socket, bodyStream);
|
|
22610
22549
|
const outputPayload = toReadableStream(asyncIterable);
|
|
22611
22550
|
return {
|
|
22612
|
-
response: new
|
|
22551
|
+
response: new protocolHttp.HttpResponse({
|
|
22613
22552
|
statusCode: 200,
|
|
22614
|
-
// indicates connection success
|
|
22615
22553
|
body: outputPayload
|
|
22616
22554
|
})
|
|
22617
22555
|
};
|
|
@@ -22625,13 +22563,8 @@ var require_dist_cjs37 = __commonJS({
|
|
|
22625
22563
|
httpHandlerConfigs() {
|
|
22626
22564
|
return this.config ?? {};
|
|
22627
22565
|
}
|
|
22628
|
-
/**
|
|
22629
|
-
* Removes all closing/closed sockets from the socket pool for URL.
|
|
22630
|
-
*/
|
|
22631
22566
|
removeNotUsableSockets(url) {
|
|
22632
|
-
this.sockets[url] = (this.sockets[url] ?? []).filter(
|
|
22633
|
-
(socket) => ![WebSocket.CLOSING, WebSocket.CLOSED].includes(socket.readyState)
|
|
22634
|
-
);
|
|
22567
|
+
this.sockets[url] = (this.sockets[url] ?? []).filter((socket) => ![WebSocket.CLOSING, WebSocket.CLOSED].includes(socket.readyState));
|
|
22635
22568
|
}
|
|
22636
22569
|
waitForReady(socket, connectionTimeout) {
|
|
22637
22570
|
return new Promise((resolve4, reject2) => {
|
|
@@ -22652,10 +22585,10 @@ var require_dist_cjs37 = __commonJS({
|
|
|
22652
22585
|
connect(socket, data2) {
|
|
22653
22586
|
let streamError = void 0;
|
|
22654
22587
|
let socketErrorOccurred = false;
|
|
22655
|
-
let reject2 =
|
|
22656
|
-
}
|
|
22657
|
-
let resolve4 =
|
|
22658
|
-
}
|
|
22588
|
+
let reject2 = () => {
|
|
22589
|
+
};
|
|
22590
|
+
let resolve4 = () => {
|
|
22591
|
+
};
|
|
22659
22592
|
socket.onmessage = (event) => {
|
|
22660
22593
|
resolve4({
|
|
22661
22594
|
done: false,
|
|
@@ -22669,28 +22602,28 @@ var require_dist_cjs37 = __commonJS({
|
|
|
22669
22602
|
};
|
|
22670
22603
|
socket.onclose = () => {
|
|
22671
22604
|
this.removeNotUsableSockets(socket.url);
|
|
22672
|
-
if (socketErrorOccurred)
|
|
22605
|
+
if (socketErrorOccurred)
|
|
22606
|
+
return;
|
|
22673
22607
|
if (streamError) {
|
|
22674
22608
|
reject2(streamError);
|
|
22675
22609
|
} else {
|
|
22676
22610
|
resolve4({
|
|
22677
22611
|
done: true,
|
|
22678
22612
|
value: void 0
|
|
22679
|
-
// unchecked because done=true.
|
|
22680
22613
|
});
|
|
22681
22614
|
}
|
|
22682
22615
|
};
|
|
22683
22616
|
const outputStream = {
|
|
22684
22617
|
[Symbol.asyncIterator]: () => ({
|
|
22685
|
-
next:
|
|
22618
|
+
next: () => {
|
|
22686
22619
|
return new Promise((_resolve, _reject) => {
|
|
22687
22620
|
resolve4 = _resolve;
|
|
22688
22621
|
reject2 = _reject;
|
|
22689
22622
|
});
|
|
22690
|
-
}
|
|
22623
|
+
}
|
|
22691
22624
|
})
|
|
22692
22625
|
};
|
|
22693
|
-
const send =
|
|
22626
|
+
const send = async () => {
|
|
22694
22627
|
try {
|
|
22695
22628
|
for await (const inputChunk of data2) {
|
|
22696
22629
|
socket.send(inputChunk);
|
|
@@ -22700,26 +22633,30 @@ var require_dist_cjs37 = __commonJS({
|
|
|
22700
22633
|
} finally {
|
|
22701
22634
|
socket.close(1e3);
|
|
22702
22635
|
}
|
|
22703
|
-
}
|
|
22636
|
+
};
|
|
22704
22637
|
send();
|
|
22705
22638
|
return outputStream;
|
|
22706
22639
|
}
|
|
22707
22640
|
};
|
|
22708
|
-
var getIterator =
|
|
22641
|
+
var getIterator = (stream2) => {
|
|
22709
22642
|
if (stream2[Symbol.asyncIterator]) {
|
|
22710
22643
|
return stream2;
|
|
22711
22644
|
}
|
|
22712
22645
|
if (isReadableStream(stream2)) {
|
|
22713
|
-
return
|
|
22646
|
+
return eventstreamSerdeBrowser.readableStreamtoIterable(stream2);
|
|
22714
22647
|
}
|
|
22715
22648
|
return {
|
|
22716
22649
|
[Symbol.asyncIterator]: async function* () {
|
|
22717
22650
|
yield stream2;
|
|
22718
22651
|
}
|
|
22719
22652
|
};
|
|
22720
|
-
}
|
|
22721
|
-
var toReadableStream =
|
|
22722
|
-
var isReadableStream =
|
|
22653
|
+
};
|
|
22654
|
+
var toReadableStream = (asyncIterable) => typeof ReadableStream === "function" ? eventstreamSerdeBrowser.iterableToReadableStream(asyncIterable) : asyncIterable;
|
|
22655
|
+
var isReadableStream = (payload2) => typeof ReadableStream === "function" && payload2 instanceof ReadableStream;
|
|
22656
|
+
exports2.WebSocketFetchHandler = WebSocketFetchHandler;
|
|
22657
|
+
exports2.eventStreamPayloadHandlerProvider = eventStreamPayloadHandlerProvider;
|
|
22658
|
+
exports2.getWebSocketPlugin = getWebSocketPlugin;
|
|
22659
|
+
exports2.resolveWebSocketConfig = resolveWebSocketConfig;
|
|
22723
22660
|
}
|
|
22724
22661
|
});
|
|
22725
22662
|
|
|
@@ -24340,7 +24277,7 @@ var require_package = __commonJS({
|
|
|
24340
24277
|
module2.exports = {
|
|
24341
24278
|
name: "@aws-sdk/client-bedrock-runtime",
|
|
24342
24279
|
description: "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
|
|
24343
|
-
version: "3.
|
|
24280
|
+
version: "3.908.0",
|
|
24344
24281
|
scripts: {
|
|
24345
24282
|
build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
24346
24283
|
"build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime",
|
|
@@ -24359,49 +24296,49 @@ var require_package = __commonJS({
|
|
|
24359
24296
|
dependencies: {
|
|
24360
24297
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
24361
24298
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
24362
|
-
"@aws-sdk/core": "3.
|
|
24363
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
24299
|
+
"@aws-sdk/core": "3.908.0",
|
|
24300
|
+
"@aws-sdk/credential-provider-node": "3.908.0",
|
|
24364
24301
|
"@aws-sdk/eventstream-handler-node": "3.901.0",
|
|
24365
24302
|
"@aws-sdk/middleware-eventstream": "3.901.0",
|
|
24366
24303
|
"@aws-sdk/middleware-host-header": "3.901.0",
|
|
24367
24304
|
"@aws-sdk/middleware-logger": "3.901.0",
|
|
24368
24305
|
"@aws-sdk/middleware-recursion-detection": "3.901.0",
|
|
24369
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
24370
|
-
"@aws-sdk/middleware-websocket": "3.
|
|
24306
|
+
"@aws-sdk/middleware-user-agent": "3.908.0",
|
|
24307
|
+
"@aws-sdk/middleware-websocket": "3.908.0",
|
|
24371
24308
|
"@aws-sdk/region-config-resolver": "3.901.0",
|
|
24372
|
-
"@aws-sdk/token-providers": "3.
|
|
24309
|
+
"@aws-sdk/token-providers": "3.908.0",
|
|
24373
24310
|
"@aws-sdk/types": "3.901.0",
|
|
24374
24311
|
"@aws-sdk/util-endpoints": "3.901.0",
|
|
24375
24312
|
"@aws-sdk/util-user-agent-browser": "3.907.0",
|
|
24376
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
24313
|
+
"@aws-sdk/util-user-agent-node": "3.908.0",
|
|
24377
24314
|
"@smithy/config-resolver": "^4.3.0",
|
|
24378
|
-
"@smithy/core": "^3.
|
|
24315
|
+
"@smithy/core": "^3.15.0",
|
|
24379
24316
|
"@smithy/eventstream-serde-browser": "^4.2.0",
|
|
24380
24317
|
"@smithy/eventstream-serde-config-resolver": "^4.3.0",
|
|
24381
24318
|
"@smithy/eventstream-serde-node": "^4.2.0",
|
|
24382
|
-
"@smithy/fetch-http-handler": "^5.3.
|
|
24319
|
+
"@smithy/fetch-http-handler": "^5.3.1",
|
|
24383
24320
|
"@smithy/hash-node": "^4.2.0",
|
|
24384
24321
|
"@smithy/invalid-dependency": "^4.2.0",
|
|
24385
24322
|
"@smithy/middleware-content-length": "^4.2.0",
|
|
24386
|
-
"@smithy/middleware-endpoint": "^4.3.
|
|
24387
|
-
"@smithy/middleware-retry": "^4.4.
|
|
24323
|
+
"@smithy/middleware-endpoint": "^4.3.1",
|
|
24324
|
+
"@smithy/middleware-retry": "^4.4.1",
|
|
24388
24325
|
"@smithy/middleware-serde": "^4.2.0",
|
|
24389
24326
|
"@smithy/middleware-stack": "^4.2.0",
|
|
24390
24327
|
"@smithy/node-config-provider": "^4.3.0",
|
|
24391
24328
|
"@smithy/node-http-handler": "^4.3.0",
|
|
24392
24329
|
"@smithy/protocol-http": "^5.3.0",
|
|
24393
|
-
"@smithy/smithy-client": "^4.7.
|
|
24330
|
+
"@smithy/smithy-client": "^4.7.1",
|
|
24394
24331
|
"@smithy/types": "^4.6.0",
|
|
24395
24332
|
"@smithy/url-parser": "^4.2.0",
|
|
24396
|
-
"@smithy/util-base64": "^4.
|
|
24333
|
+
"@smithy/util-base64": "^4.3.0",
|
|
24397
24334
|
"@smithy/util-body-length-browser": "^4.2.0",
|
|
24398
|
-
"@smithy/util-body-length-node": "^4.2.
|
|
24399
|
-
"@smithy/util-defaults-mode-browser": "^4.
|
|
24400
|
-
"@smithy/util-defaults-mode-node": "^4.2.
|
|
24335
|
+
"@smithy/util-body-length-node": "^4.2.1",
|
|
24336
|
+
"@smithy/util-defaults-mode-browser": "^4.3.0",
|
|
24337
|
+
"@smithy/util-defaults-mode-node": "^4.2.1",
|
|
24401
24338
|
"@smithy/util-endpoints": "^3.2.0",
|
|
24402
24339
|
"@smithy/util-middleware": "^4.2.0",
|
|
24403
24340
|
"@smithy/util-retry": "^4.2.0",
|
|
24404
|
-
"@smithy/util-stream": "^4.
|
|
24341
|
+
"@smithy/util-stream": "^4.5.0",
|
|
24405
24342
|
"@smithy/util-utf8": "^4.2.0",
|
|
24406
24343
|
"@smithy/uuid": "^1.1.0",
|
|
24407
24344
|
tslib: "^2.6.2"
|
|
@@ -25121,7 +25058,7 @@ var init_package = __esm({
|
|
|
25121
25058
|
"node_modules/@aws-sdk/nested-clients/package.json"() {
|
|
25122
25059
|
package_default = {
|
|
25123
25060
|
name: "@aws-sdk/nested-clients",
|
|
25124
|
-
version: "3.
|
|
25061
|
+
version: "3.908.0",
|
|
25125
25062
|
description: "Nested clients for AWS SDK packages.",
|
|
25126
25063
|
main: "./dist-cjs/index.js",
|
|
25127
25064
|
module: "./dist-es/index.js",
|
|
@@ -25150,37 +25087,37 @@ var init_package = __esm({
|
|
|
25150
25087
|
dependencies: {
|
|
25151
25088
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
25152
25089
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
25153
|
-
"@aws-sdk/core": "3.
|
|
25090
|
+
"@aws-sdk/core": "3.908.0",
|
|
25154
25091
|
"@aws-sdk/middleware-host-header": "3.901.0",
|
|
25155
25092
|
"@aws-sdk/middleware-logger": "3.901.0",
|
|
25156
25093
|
"@aws-sdk/middleware-recursion-detection": "3.901.0",
|
|
25157
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
25094
|
+
"@aws-sdk/middleware-user-agent": "3.908.0",
|
|
25158
25095
|
"@aws-sdk/region-config-resolver": "3.901.0",
|
|
25159
25096
|
"@aws-sdk/types": "3.901.0",
|
|
25160
25097
|
"@aws-sdk/util-endpoints": "3.901.0",
|
|
25161
25098
|
"@aws-sdk/util-user-agent-browser": "3.907.0",
|
|
25162
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
25099
|
+
"@aws-sdk/util-user-agent-node": "3.908.0",
|
|
25163
25100
|
"@smithy/config-resolver": "^4.3.0",
|
|
25164
|
-
"@smithy/core": "^3.
|
|
25165
|
-
"@smithy/fetch-http-handler": "^5.3.
|
|
25101
|
+
"@smithy/core": "^3.15.0",
|
|
25102
|
+
"@smithy/fetch-http-handler": "^5.3.1",
|
|
25166
25103
|
"@smithy/hash-node": "^4.2.0",
|
|
25167
25104
|
"@smithy/invalid-dependency": "^4.2.0",
|
|
25168
25105
|
"@smithy/middleware-content-length": "^4.2.0",
|
|
25169
|
-
"@smithy/middleware-endpoint": "^4.3.
|
|
25170
|
-
"@smithy/middleware-retry": "^4.4.
|
|
25106
|
+
"@smithy/middleware-endpoint": "^4.3.1",
|
|
25107
|
+
"@smithy/middleware-retry": "^4.4.1",
|
|
25171
25108
|
"@smithy/middleware-serde": "^4.2.0",
|
|
25172
25109
|
"@smithy/middleware-stack": "^4.2.0",
|
|
25173
25110
|
"@smithy/node-config-provider": "^4.3.0",
|
|
25174
25111
|
"@smithy/node-http-handler": "^4.3.0",
|
|
25175
25112
|
"@smithy/protocol-http": "^5.3.0",
|
|
25176
|
-
"@smithy/smithy-client": "^4.7.
|
|
25113
|
+
"@smithy/smithy-client": "^4.7.1",
|
|
25177
25114
|
"@smithy/types": "^4.6.0",
|
|
25178
25115
|
"@smithy/url-parser": "^4.2.0",
|
|
25179
|
-
"@smithy/util-base64": "^4.
|
|
25116
|
+
"@smithy/util-base64": "^4.3.0",
|
|
25180
25117
|
"@smithy/util-body-length-browser": "^4.2.0",
|
|
25181
|
-
"@smithy/util-body-length-node": "^4.2.
|
|
25182
|
-
"@smithy/util-defaults-mode-browser": "^4.
|
|
25183
|
-
"@smithy/util-defaults-mode-node": "^4.2.
|
|
25118
|
+
"@smithy/util-body-length-node": "^4.2.1",
|
|
25119
|
+
"@smithy/util-defaults-mode-browser": "^4.3.0",
|
|
25120
|
+
"@smithy/util-defaults-mode-node": "^4.2.1",
|
|
25184
25121
|
"@smithy/util-endpoints": "^3.2.0",
|
|
25185
25122
|
"@smithy/util-middleware": "^4.2.0",
|
|
25186
25123
|
"@smithy/util-retry": "^4.2.0",
|
|
@@ -26596,7 +26533,7 @@ var require_package2 = __commonJS({
|
|
|
26596
26533
|
module2.exports = {
|
|
26597
26534
|
name: "@aws-sdk/client-sso",
|
|
26598
26535
|
description: "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",
|
|
26599
|
-
version: "3.
|
|
26536
|
+
version: "3.908.0",
|
|
26600
26537
|
scripts: {
|
|
26601
26538
|
build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
26602
26539
|
"build:cjs": "node ../../scripts/compilation/inline client-sso",
|
|
@@ -26615,37 +26552,37 @@ var require_package2 = __commonJS({
|
|
|
26615
26552
|
dependencies: {
|
|
26616
26553
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
26617
26554
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
26618
|
-
"@aws-sdk/core": "3.
|
|
26555
|
+
"@aws-sdk/core": "3.908.0",
|
|
26619
26556
|
"@aws-sdk/middleware-host-header": "3.901.0",
|
|
26620
26557
|
"@aws-sdk/middleware-logger": "3.901.0",
|
|
26621
26558
|
"@aws-sdk/middleware-recursion-detection": "3.901.0",
|
|
26622
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
26559
|
+
"@aws-sdk/middleware-user-agent": "3.908.0",
|
|
26623
26560
|
"@aws-sdk/region-config-resolver": "3.901.0",
|
|
26624
26561
|
"@aws-sdk/types": "3.901.0",
|
|
26625
26562
|
"@aws-sdk/util-endpoints": "3.901.0",
|
|
26626
26563
|
"@aws-sdk/util-user-agent-browser": "3.907.0",
|
|
26627
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
26564
|
+
"@aws-sdk/util-user-agent-node": "3.908.0",
|
|
26628
26565
|
"@smithy/config-resolver": "^4.3.0",
|
|
26629
|
-
"@smithy/core": "^3.
|
|
26630
|
-
"@smithy/fetch-http-handler": "^5.3.
|
|
26566
|
+
"@smithy/core": "^3.15.0",
|
|
26567
|
+
"@smithy/fetch-http-handler": "^5.3.1",
|
|
26631
26568
|
"@smithy/hash-node": "^4.2.0",
|
|
26632
26569
|
"@smithy/invalid-dependency": "^4.2.0",
|
|
26633
26570
|
"@smithy/middleware-content-length": "^4.2.0",
|
|
26634
|
-
"@smithy/middleware-endpoint": "^4.3.
|
|
26635
|
-
"@smithy/middleware-retry": "^4.4.
|
|
26571
|
+
"@smithy/middleware-endpoint": "^4.3.1",
|
|
26572
|
+
"@smithy/middleware-retry": "^4.4.1",
|
|
26636
26573
|
"@smithy/middleware-serde": "^4.2.0",
|
|
26637
26574
|
"@smithy/middleware-stack": "^4.2.0",
|
|
26638
26575
|
"@smithy/node-config-provider": "^4.3.0",
|
|
26639
26576
|
"@smithy/node-http-handler": "^4.3.0",
|
|
26640
26577
|
"@smithy/protocol-http": "^5.3.0",
|
|
26641
|
-
"@smithy/smithy-client": "^4.7.
|
|
26578
|
+
"@smithy/smithy-client": "^4.7.1",
|
|
26642
26579
|
"@smithy/types": "^4.6.0",
|
|
26643
26580
|
"@smithy/url-parser": "^4.2.0",
|
|
26644
|
-
"@smithy/util-base64": "^4.
|
|
26581
|
+
"@smithy/util-base64": "^4.3.0",
|
|
26645
26582
|
"@smithy/util-body-length-browser": "^4.2.0",
|
|
26646
|
-
"@smithy/util-body-length-node": "^4.2.
|
|
26647
|
-
"@smithy/util-defaults-mode-browser": "^4.
|
|
26648
|
-
"@smithy/util-defaults-mode-node": "^4.2.
|
|
26583
|
+
"@smithy/util-body-length-node": "^4.2.1",
|
|
26584
|
+
"@smithy/util-defaults-mode-browser": "^4.3.0",
|
|
26585
|
+
"@smithy/util-defaults-mode-node": "^4.2.1",
|
|
26649
26586
|
"@smithy/util-endpoints": "^3.2.0",
|
|
26650
26587
|
"@smithy/util-middleware": "^4.2.0",
|
|
26651
26588
|
"@smithy/util-retry": "^4.2.0",
|
|
@@ -54875,7 +54812,7 @@ var init_semantics = __esm({
|
|
|
54875
54812
|
return;
|
|
54876
54813
|
for (const cn of contentNodes) {
|
|
54877
54814
|
const ch = cn.children || {};
|
|
54878
|
-
const inspectTok = (tk) => {
|
|
54815
|
+
const inspectTok = (tk, inQuoted = false) => {
|
|
54879
54816
|
if (!tk)
|
|
54880
54817
|
return false;
|
|
54881
54818
|
const img = String(tk.image || "");
|
|
@@ -54885,7 +54822,7 @@ var init_semantics = __esm({
|
|
|
54885
54822
|
this.ctx.errors.push({
|
|
54886
54823
|
line: tk.startLine ?? 1,
|
|
54887
54824
|
column: col,
|
|
54888
|
-
severity: "warning",
|
|
54825
|
+
severity: inQuoted ? "error" : "warning",
|
|
54889
54826
|
code: "FL-LABEL-BACKTICK",
|
|
54890
54827
|
message: "Backticks (`\u2026`) inside node labels are not supported by Mermaid.",
|
|
54891
54828
|
hint: 'Remove the backticks or use quotes instead, e.g., "GITHUB_ACTIONS" and "--cli".',
|
|
@@ -54897,12 +54834,12 @@ var init_semantics = __esm({
|
|
|
54897
54834
|
};
|
|
54898
54835
|
const texts = ch.Text || [];
|
|
54899
54836
|
for (const tk of texts) {
|
|
54900
|
-
if (inspectTok(tk))
|
|
54837
|
+
if (inspectTok(tk, false))
|
|
54901
54838
|
return;
|
|
54902
54839
|
}
|
|
54903
54840
|
const qs = ch.QuotedString || [];
|
|
54904
54841
|
for (const tk of qs) {
|
|
54905
|
-
if (inspectTok(tk))
|
|
54842
|
+
if (inspectTok(tk, true))
|
|
54906
54843
|
return;
|
|
54907
54844
|
}
|
|
54908
54845
|
}
|
|
@@ -55303,6 +55240,36 @@ function mapFlowchartParserError(err, text) {
|
|
|
55303
55240
|
length: len
|
|
55304
55241
|
};
|
|
55305
55242
|
}
|
|
55243
|
+
{
|
|
55244
|
+
const caret0 = Math.max(0, column - 1);
|
|
55245
|
+
const openIdx = lineStr.lastIndexOf("[", caret0);
|
|
55246
|
+
if (openIdx !== -1) {
|
|
55247
|
+
const closeIdx = lineStr.indexOf("]", openIdx + 1);
|
|
55248
|
+
const seg = closeIdx !== -1 ? lineStr.slice(openIdx + 1, closeIdx) : lineStr.slice(openIdx + 1);
|
|
55249
|
+
if (seg.includes('"')) {
|
|
55250
|
+
return {
|
|
55251
|
+
line,
|
|
55252
|
+
column,
|
|
55253
|
+
severity: "error",
|
|
55254
|
+
code: "FL-LABEL-QUOTE-IN-UNQUOTED",
|
|
55255
|
+
message: "Quotes are not allowed inside unquoted node labels. Use " for quotes or wrap the entire label in quotes.",
|
|
55256
|
+
hint: 'Example: I[Log "processing N items"] or I["Log \\"processing N items\\""]',
|
|
55257
|
+
length: len
|
|
55258
|
+
};
|
|
55259
|
+
}
|
|
55260
|
+
if (seg.includes("(") || seg.includes(")")) {
|
|
55261
|
+
return {
|
|
55262
|
+
line,
|
|
55263
|
+
column,
|
|
55264
|
+
severity: "error",
|
|
55265
|
+
code: "FL-LABEL-PARENS-UNQUOTED",
|
|
55266
|
+
message: "Parentheses inside an unquoted label are not supported by Mermaid.",
|
|
55267
|
+
hint: 'Wrap the label in quotes, e.g., A["Mark (X)"] \u2014 or replace ( and ) with HTML entities: ( and ).',
|
|
55268
|
+
length: len
|
|
55269
|
+
};
|
|
55270
|
+
}
|
|
55271
|
+
}
|
|
55272
|
+
}
|
|
55306
55273
|
if (tokType === "QuotedString") {
|
|
55307
55274
|
return {
|
|
55308
55275
|
line,
|
|
@@ -55335,6 +55302,24 @@ function mapFlowchartParserError(err, text) {
|
|
|
55335
55302
|
length: len
|
|
55336
55303
|
};
|
|
55337
55304
|
}
|
|
55305
|
+
{
|
|
55306
|
+
const caret0 = Math.max(0, column - 1);
|
|
55307
|
+
const openIdx = lineStr.lastIndexOf("(", caret0);
|
|
55308
|
+
if (openIdx !== -1) {
|
|
55309
|
+
const seg = lineStr.slice(openIdx + 1);
|
|
55310
|
+
if (seg.includes("(") || seg.includes(")")) {
|
|
55311
|
+
return {
|
|
55312
|
+
line,
|
|
55313
|
+
column,
|
|
55314
|
+
severity: "error",
|
|
55315
|
+
code: "FL-LABEL-PARENS-UNQUOTED",
|
|
55316
|
+
message: "Parentheses inside an unquoted label are not supported by Mermaid.",
|
|
55317
|
+
hint: 'Wrap the label in quotes, e.g., A["Mark (X)"] \u2014 or replace ( and ) with HTML entities: ( and ).',
|
|
55318
|
+
length: len
|
|
55319
|
+
};
|
|
55320
|
+
}
|
|
55321
|
+
}
|
|
55322
|
+
}
|
|
55338
55323
|
const q3 = findInnerQuoteIssue("(");
|
|
55339
55324
|
if (q3?.kind === "escaped") {
|
|
55340
55325
|
return { line, column: q3.column, severity: "error", code: "FL-LABEL-ESCAPED-QUOTE", message: 'Escaped quotes (\\") in node labels are not supported by Mermaid. Use " instead.', hint: 'Prefer "He said "Hi"".', length: 2 };
|
|
@@ -55356,6 +55341,25 @@ function mapFlowchartParserError(err, text) {
|
|
|
55356
55341
|
length: len
|
|
55357
55342
|
};
|
|
55358
55343
|
}
|
|
55344
|
+
{
|
|
55345
|
+
const caret0 = Math.max(0, column - 1);
|
|
55346
|
+
const openIdx = lineStr.lastIndexOf("{", caret0);
|
|
55347
|
+
if (openIdx !== -1) {
|
|
55348
|
+
const closeIdx = lineStr.indexOf("}", openIdx + 1);
|
|
55349
|
+
const seg = closeIdx !== -1 ? lineStr.slice(openIdx + 1, closeIdx) : lineStr.slice(openIdx + 1);
|
|
55350
|
+
if (seg.includes("(") || seg.includes(")")) {
|
|
55351
|
+
return {
|
|
55352
|
+
line,
|
|
55353
|
+
column,
|
|
55354
|
+
severity: "error",
|
|
55355
|
+
code: "FL-LABEL-PARENS-UNQUOTED",
|
|
55356
|
+
message: "Parentheses inside an unquoted label are not supported by Mermaid.",
|
|
55357
|
+
hint: 'Wrap the label in quotes, e.g., A["Mark (X)"] \u2014 or replace ( and ) with HTML entities: ( and ).',
|
|
55358
|
+
length: len
|
|
55359
|
+
};
|
|
55360
|
+
}
|
|
55361
|
+
}
|
|
55362
|
+
}
|
|
55359
55363
|
const q3 = findInnerQuoteIssue("{");
|
|
55360
55364
|
if (q3?.kind === "escaped") {
|
|
55361
55365
|
return {
|
|
@@ -55694,6 +55698,17 @@ ${br.example}`,
|
|
|
55694
55698
|
if (inRule("arrow") && err.name === "NoViableAltException") {
|
|
55695
55699
|
return { line, column, severity: "error", code: "SE-ARROW-INVALID", message: `Invalid sequence arrow near '${found}'.`, hint: "Use ->, -->, ->>, -->>, -x, --x, -), --), <<->>, or <<-->>", length: len };
|
|
55696
55700
|
}
|
|
55701
|
+
if ((err.name === "NoViableAltException" || err.name === "MismatchedTokenException") && tokType === "Minus") {
|
|
55702
|
+
return {
|
|
55703
|
+
line,
|
|
55704
|
+
column,
|
|
55705
|
+
severity: "error",
|
|
55706
|
+
code: "SE-BULLET-LINE-UNSUPPORTED",
|
|
55707
|
+
message: "Bullet list lines starting with '-' are not supported in sequence diagrams.",
|
|
55708
|
+
hint: "Wrap free\u2011form text in a note block instead, for example:\nNote over A : Item 1\nNote over A\n - Item 1\n - Item 2\nend note",
|
|
55709
|
+
length: len
|
|
55710
|
+
};
|
|
55711
|
+
}
|
|
55697
55712
|
if (inRule("noteStmt")) {
|
|
55698
55713
|
if (err.name === "MismatchedTokenException" && exp("Colon")) {
|
|
55699
55714
|
return { line, column, severity: "error", code: "SE-NOTE-MALFORMED", message: "Malformed note: missing colon before the note text.", hint: "Example: Note right of Alice: Hello", length: len };
|
|
@@ -55851,6 +55866,17 @@ ${br.example}`,
|
|
|
55851
55866
|
};
|
|
55852
55867
|
}
|
|
55853
55868
|
}
|
|
55869
|
+
if ((err.name === "NotAllInputParsedException" || err.name === "NoViableAltException") && found === "-") {
|
|
55870
|
+
return {
|
|
55871
|
+
line,
|
|
55872
|
+
column,
|
|
55873
|
+
severity: "error",
|
|
55874
|
+
code: "SE-BULLET-LINE-UNSUPPORTED",
|
|
55875
|
+
message: "Bullet list lines starting with '-' are not supported in sequence diagrams.",
|
|
55876
|
+
hint: "Wrap free\u2011form text in a note block, for example:\nNote over A : Item 1\nNote over A\n - Item 1\n - Item 2\nend note",
|
|
55877
|
+
length: len
|
|
55878
|
+
};
|
|
55879
|
+
}
|
|
55854
55880
|
if ((err.name === "NoViableAltException" || err.name === "NotAllInputParsedException") && tokType === "ElseKeyword") {
|
|
55855
55881
|
return { line, column, severity: "error", code: "SE-ELSE-OUTSIDE-ALT", message: "'else' is only allowed inside 'alt' blocks.", hint: "Use: alt Condition \u2026 else \u2026 end", length: len };
|
|
55856
55882
|
}
|
|
@@ -56052,6 +56078,30 @@ function validateFlowchart(text, options = {}) {
|
|
|
56052
56078
|
return errs;
|
|
56053
56079
|
},
|
|
56054
56080
|
postParse: (text2, tokens, _cst, prevErrors) => {
|
|
56081
|
+
{
|
|
56082
|
+
const tks = tokens;
|
|
56083
|
+
const firstByLine = /* @__PURE__ */ new Map();
|
|
56084
|
+
for (const tk of tks) {
|
|
56085
|
+
const ln = tk.startLine ?? 1;
|
|
56086
|
+
const col = tk.startColumn ?? 1;
|
|
56087
|
+
const prev = firstByLine.get(ln);
|
|
56088
|
+
if (!prev || (prev.startColumn ?? Infinity) > col)
|
|
56089
|
+
firstByLine.set(ln, tk);
|
|
56090
|
+
}
|
|
56091
|
+
for (const tk of tks) {
|
|
56092
|
+
if (tk.image === "title" && firstByLine.get(tk.startLine ?? 1) === tk) {
|
|
56093
|
+
prevErrors.push({
|
|
56094
|
+
line: tk.startLine ?? 1,
|
|
56095
|
+
column: tk.startColumn ?? 1,
|
|
56096
|
+
severity: "error",
|
|
56097
|
+
code: "FL-META-UNSUPPORTED",
|
|
56098
|
+
message: "'title' is not supported in flowcharts by the current Mermaid CLI.",
|
|
56099
|
+
hint: 'Use a Markdown heading above the code block, or draw a labeled node at the top (e.g., T["Dependency Relationship"]).',
|
|
56100
|
+
length: tk.image?.length ?? 5
|
|
56101
|
+
});
|
|
56102
|
+
}
|
|
56103
|
+
}
|
|
56104
|
+
}
|
|
56055
56105
|
const escWarn = detectEscapedQuotes(tokens, {
|
|
56056
56106
|
code: "FL-LABEL-ESCAPED-QUOTE",
|
|
56057
56107
|
message: 'Escaped quotes (\\") in node labels are accepted by Mermaid, but using " is preferred for portability.',
|
|
@@ -58470,6 +58520,13 @@ function computeFixes(text, errors, level = "safe") {
|
|
|
58470
58520
|
const replaced = inner.split('\\"').join(""");
|
|
58471
58521
|
edits.push({ start: { line: e3.line, column: q1 + 2 }, end: { line: e3.line, column: q22 + 1 }, newText: replaced });
|
|
58472
58522
|
continue;
|
|
58523
|
+
if (is("FL-META-UNSUPPORTED", e3)) {
|
|
58524
|
+
if (level === "all") {
|
|
58525
|
+
const lineText2 = lineTextAt(text, e3.line);
|
|
58526
|
+
edits.push({ start: { line: e3.line, column: 1 }, end: { line: e3.line + 1, column: 1 }, newText: "" });
|
|
58527
|
+
}
|
|
58528
|
+
continue;
|
|
58529
|
+
}
|
|
58473
58530
|
}
|
|
58474
58531
|
}
|
|
58475
58532
|
}
|
|
@@ -58477,6 +58534,12 @@ function computeFixes(text, errors, level = "safe") {
|
|
|
58477
58534
|
edits.push(replaceRange(text, at(e3), e3.length ?? 2, """));
|
|
58478
58535
|
continue;
|
|
58479
58536
|
}
|
|
58537
|
+
if (is("FL-META-UNSUPPORTED", e3)) {
|
|
58538
|
+
if (level === "all") {
|
|
58539
|
+
edits.push({ start: { line: e3.line, column: 1 }, end: { line: e3.line + 1, column: 1 }, newText: "" });
|
|
58540
|
+
}
|
|
58541
|
+
continue;
|
|
58542
|
+
}
|
|
58480
58543
|
if (is("FL-LABEL-BACKTICK", e3)) {
|
|
58481
58544
|
edits.push(replaceRange(text, at(e3), e3.length ?? 1, ""));
|
|
58482
58545
|
continue;
|
|
@@ -58526,6 +58589,12 @@ function computeFixes(text, errors, level = "safe") {
|
|
|
58526
58589
|
edits.push(replaceRange(text, at(e3), e3.length ?? 1, rep));
|
|
58527
58590
|
continue;
|
|
58528
58591
|
}
|
|
58592
|
+
if (is("FL-END-WITHOUT-SUBGRAPH", e3)) {
|
|
58593
|
+
if (level === "all") {
|
|
58594
|
+
edits.push({ start: { line: e3.line, column: 1 }, end: { line: e3.line + 1, column: 1 }, newText: "" });
|
|
58595
|
+
}
|
|
58596
|
+
continue;
|
|
58597
|
+
}
|
|
58529
58598
|
if (is("FL-LABEL-DOUBLE-IN-DOUBLE", e3)) {
|
|
58530
58599
|
const lineText = lineTextAt(text, e3.line);
|
|
58531
58600
|
const caret0 = Math.max(0, e3.column - 1);
|
|
@@ -58862,6 +58931,9 @@ function computeFixes(text, errors, level = "safe") {
|
|
|
58862
58931
|
continue;
|
|
58863
58932
|
}
|
|
58864
58933
|
if (is("FL-QUOTE-UNCLOSED", e3)) {
|
|
58934
|
+
if (patchedLines.has(e3.line)) {
|
|
58935
|
+
continue;
|
|
58936
|
+
}
|
|
58865
58937
|
if (level === "all") {
|
|
58866
58938
|
const lineText = lineTextAt(text, e3.line);
|
|
58867
58939
|
const caret0 = Math.max(0, e3.column - 1);
|
|
@@ -58936,7 +59008,7 @@ function computeFixes(text, errors, level = "safe") {
|
|
|
58936
59008
|
newInner = ltrim + left + replacedMid + right + rtrim;
|
|
58937
59009
|
} else {
|
|
58938
59010
|
const replaced = inner.split(""").join("\0").split('"').join(""").split("\0").join(""");
|
|
58939
|
-
newInner =
|
|
59011
|
+
newInner = replaced;
|
|
58940
59012
|
}
|
|
58941
59013
|
edits.push({ start: { line: e3.line, column: contentStart + 1 }, end: { line: e3.line, column: closeIdx + 1 }, newText: newInner });
|
|
58942
59014
|
patchedLines.add(e3.line);
|
|
@@ -73485,7 +73557,7 @@ var init_ProbeAgent = __esm({
|
|
|
73485
73557
|
MAX_HISTORY_MESSAGES = 100;
|
|
73486
73558
|
SUPPORTED_IMAGE_EXTENSIONS = ["png", "jpg", "jpeg", "webp", "gif", "bmp", "svg"];
|
|
73487
73559
|
MAX_IMAGE_FILE_SIZE = 20 * 1024 * 1024;
|
|
73488
|
-
ProbeAgent = class {
|
|
73560
|
+
ProbeAgent = class _ProbeAgent {
|
|
73489
73561
|
/**
|
|
73490
73562
|
* Create a new ProbeAgent instance
|
|
73491
73563
|
* @param {Object} options - Configuration options
|
|
@@ -74367,12 +74439,24 @@ You are working with a repository located at: ${searchDirectory}
|
|
|
74367
74439
|
}))
|
|
74368
74440
|
];
|
|
74369
74441
|
}
|
|
74370
|
-
|
|
74371
|
-
|
|
74372
|
-
|
|
74373
|
-
|
|
74374
|
-
|
|
74375
|
-
|
|
74442
|
+
const hasSystemMessage = this.history.length > 0 && this.history[0].role === "system";
|
|
74443
|
+
let currentMessages;
|
|
74444
|
+
if (hasSystemMessage) {
|
|
74445
|
+
currentMessages = [
|
|
74446
|
+
...this.history,
|
|
74447
|
+
userMessage
|
|
74448
|
+
];
|
|
74449
|
+
if (this.debug) {
|
|
74450
|
+
console.log("[DEBUG] Reusing existing system message from history for cache efficiency");
|
|
74451
|
+
}
|
|
74452
|
+
} else {
|
|
74453
|
+
currentMessages = [
|
|
74454
|
+
{ role: "system", content: systemMessage },
|
|
74455
|
+
...this.history,
|
|
74456
|
+
// Include previous conversation history
|
|
74457
|
+
userMessage
|
|
74458
|
+
];
|
|
74459
|
+
}
|
|
74376
74460
|
let currentIteration = 0;
|
|
74377
74461
|
let completionAttempted = false;
|
|
74378
74462
|
let finalResult = "I was unable to complete your request due to reaching the maximum number of tool iterations.";
|
|
@@ -75167,6 +75251,116 @@ Convert your previous response content into actual JSON data that follows this s
|
|
|
75167
75251
|
console.log(`[DEBUG] Cleared conversation history and reset counters for session ${this.sessionId}`);
|
|
75168
75252
|
}
|
|
75169
75253
|
}
|
|
75254
|
+
/**
|
|
75255
|
+
* Clone this agent's session to create a new agent with shared conversation history
|
|
75256
|
+
* @param {Object} options - Clone options
|
|
75257
|
+
* @param {string} [options.sessionId] - Session ID for the cloned agent (defaults to new UUID)
|
|
75258
|
+
* @param {boolean} [options.stripInternalMessages=true] - Remove internal messages (schema reminders, mermaid fixes, etc.)
|
|
75259
|
+
* @param {boolean} [options.keepSystemMessage=true] - Keep the system message in cloned history
|
|
75260
|
+
* @param {boolean} [options.deepCopy=true] - Deep copy messages to prevent mutations
|
|
75261
|
+
* @param {Object} [options.overrides] - Override any ProbeAgent constructor options
|
|
75262
|
+
* @returns {ProbeAgent} New agent instance with cloned history
|
|
75263
|
+
*/
|
|
75264
|
+
clone(options = {}) {
|
|
75265
|
+
const {
|
|
75266
|
+
sessionId = (0, import_crypto5.randomUUID)(),
|
|
75267
|
+
stripInternalMessages = true,
|
|
75268
|
+
keepSystemMessage = true,
|
|
75269
|
+
deepCopy = true,
|
|
75270
|
+
overrides = {}
|
|
75271
|
+
} = options;
|
|
75272
|
+
let clonedHistory = deepCopy ? JSON.parse(JSON.stringify(this.history)) : [...this.history];
|
|
75273
|
+
if (stripInternalMessages) {
|
|
75274
|
+
clonedHistory = this._stripInternalMessages(clonedHistory, keepSystemMessage);
|
|
75275
|
+
}
|
|
75276
|
+
const clonedAgent = new _ProbeAgent({
|
|
75277
|
+
// Copy current agent's config
|
|
75278
|
+
customPrompt: this.customPrompt,
|
|
75279
|
+
promptType: this.promptType,
|
|
75280
|
+
allowEdit: this.allowEdit,
|
|
75281
|
+
path: this.allowedFolders[0],
|
|
75282
|
+
// Use first allowed folder as primary path
|
|
75283
|
+
allowedFolders: [...this.allowedFolders],
|
|
75284
|
+
provider: this.clientApiProvider,
|
|
75285
|
+
model: this.modelName,
|
|
75286
|
+
debug: this.debug,
|
|
75287
|
+
outline: this.outline,
|
|
75288
|
+
maxResponseTokens: this.maxResponseTokens,
|
|
75289
|
+
maxIterations: this.maxIterations,
|
|
75290
|
+
disableMermaidValidation: this.disableMermaidValidation,
|
|
75291
|
+
enableMcp: !!this.mcpBridge,
|
|
75292
|
+
mcpConfig: this.mcpConfig,
|
|
75293
|
+
enableBash: this.enableBash,
|
|
75294
|
+
bashConfig: this.bashConfig,
|
|
75295
|
+
storageAdapter: this.storageAdapter,
|
|
75296
|
+
// Override with any provided options
|
|
75297
|
+
sessionId,
|
|
75298
|
+
...overrides
|
|
75299
|
+
});
|
|
75300
|
+
clonedAgent.history = clonedHistory;
|
|
75301
|
+
if (this.debug) {
|
|
75302
|
+
console.log(`[DEBUG] Cloned session ${this.sessionId} -> ${sessionId}`);
|
|
75303
|
+
console.log(`[DEBUG] Cloned ${clonedHistory.length} messages (stripInternal: ${stripInternalMessages})`);
|
|
75304
|
+
}
|
|
75305
|
+
return clonedAgent;
|
|
75306
|
+
}
|
|
75307
|
+
/**
|
|
75308
|
+
* Internal method to strip internal/temporary messages from history
|
|
75309
|
+
* Removes: schema reminders, mermaid fix prompts, tool use reminders, etc.
|
|
75310
|
+
* Keeps: system message, user messages, assistant responses, tool results
|
|
75311
|
+
* @private
|
|
75312
|
+
*/
|
|
75313
|
+
_stripInternalMessages(history, keepSystemMessage = true) {
|
|
75314
|
+
const filtered = [];
|
|
75315
|
+
for (let i3 = 0; i3 < history.length; i3++) {
|
|
75316
|
+
const message = history[i3];
|
|
75317
|
+
if (message.role === "system") {
|
|
75318
|
+
if (keepSystemMessage) {
|
|
75319
|
+
filtered.push(message);
|
|
75320
|
+
} else if (this.debug) {
|
|
75321
|
+
console.log(`[DEBUG] Removing system message at index ${i3}`);
|
|
75322
|
+
}
|
|
75323
|
+
continue;
|
|
75324
|
+
}
|
|
75325
|
+
if (this._isInternalMessage(message, i3, history)) {
|
|
75326
|
+
if (this.debug) {
|
|
75327
|
+
console.log(`[DEBUG] Stripping internal message at index ${i3}: ${message.role}`);
|
|
75328
|
+
}
|
|
75329
|
+
continue;
|
|
75330
|
+
}
|
|
75331
|
+
filtered.push(message);
|
|
75332
|
+
}
|
|
75333
|
+
return filtered;
|
|
75334
|
+
}
|
|
75335
|
+
/**
|
|
75336
|
+
* Determine if a message is an internal/temporary message
|
|
75337
|
+
* @private
|
|
75338
|
+
*/
|
|
75339
|
+
_isInternalMessage(message, index, history) {
|
|
75340
|
+
if (message.role !== "user") {
|
|
75341
|
+
return false;
|
|
75342
|
+
}
|
|
75343
|
+
if (!message.content) {
|
|
75344
|
+
return false;
|
|
75345
|
+
}
|
|
75346
|
+
const content = typeof message.content === "string" ? message.content : JSON.stringify(message.content);
|
|
75347
|
+
if (content.includes("IMPORTANT: A schema was provided") || content.includes("You MUST respond with data that matches this schema") || content.includes("Your response must conform to this schema:")) {
|
|
75348
|
+
return true;
|
|
75349
|
+
}
|
|
75350
|
+
if (content.includes("Please use one of the available tools") && content.includes("or use attempt_completion") && content.includes("Remember: Use proper XML format")) {
|
|
75351
|
+
return true;
|
|
75352
|
+
}
|
|
75353
|
+
if (content.includes("The mermaid diagram in your response has syntax errors") || content.includes("Please fix the mermaid syntax errors") || content.includes("Here is the corrected version:")) {
|
|
75354
|
+
return true;
|
|
75355
|
+
}
|
|
75356
|
+
if (content.includes("Your response does not match the expected JSON schema") || content.includes("Please provide a valid JSON response") || content.includes("Schema validation error:")) {
|
|
75357
|
+
return true;
|
|
75358
|
+
}
|
|
75359
|
+
if (content.includes("When using <attempt_complete>") && content.includes("this must be the ONLY content in your response")) {
|
|
75360
|
+
return true;
|
|
75361
|
+
}
|
|
75362
|
+
return false;
|
|
75363
|
+
}
|
|
75170
75364
|
/**
|
|
75171
75365
|
* Clean up resources (including MCP connections)
|
|
75172
75366
|
*/
|