@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/agent/ProbeAgent.cjs
CHANGED
|
@@ -14626,37 +14626,15 @@ var require_dist_cjs36 = __commonJS({
|
|
|
14626
14626
|
|
|
14627
14627
|
// node_modules/@aws-sdk/middleware-websocket/dist-cjs/index.js
|
|
14628
14628
|
var require_dist_cjs37 = __commonJS({
|
|
14629
|
-
"node_modules/@aws-sdk/middleware-websocket/dist-cjs/index.js"(exports2
|
|
14629
|
+
"node_modules/@aws-sdk/middleware-websocket/dist-cjs/index.js"(exports2) {
|
|
14630
14630
|
"use strict";
|
|
14631
|
-
var
|
|
14632
|
-
var
|
|
14633
|
-
var
|
|
14634
|
-
var
|
|
14635
|
-
var
|
|
14636
|
-
var
|
|
14637
|
-
|
|
14638
|
-
__defProp2(target, name14, { get: all[name14], enumerable: true });
|
|
14639
|
-
};
|
|
14640
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
14641
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14642
|
-
for (let key of __getOwnPropNames2(from))
|
|
14643
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
14644
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
14645
|
-
}
|
|
14646
|
-
return to;
|
|
14647
|
-
};
|
|
14648
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
14649
|
-
var index_exports = {};
|
|
14650
|
-
__export2(index_exports, {
|
|
14651
|
-
WebSocketFetchHandler: () => WebSocketFetchHandler,
|
|
14652
|
-
eventStreamPayloadHandlerProvider: () => eventStreamPayloadHandlerProvider,
|
|
14653
|
-
getWebSocketPlugin: () => getWebSocketPlugin,
|
|
14654
|
-
resolveWebSocketConfig: () => resolveWebSocketConfig
|
|
14655
|
-
});
|
|
14656
|
-
module2.exports = __toCommonJS2(index_exports);
|
|
14657
|
-
var import_eventstream_codec = require_dist_cjs33();
|
|
14658
|
-
var import_util_hex_encoding = require_dist_cjs17();
|
|
14659
|
-
var getEventSigningTransformStream = /* @__PURE__ */ __name((initialSignature, messageSigner, eventStreamCodec, systemClockOffsetProvider) => {
|
|
14631
|
+
var eventstreamCodec = require_dist_cjs33();
|
|
14632
|
+
var utilHexEncoding = require_dist_cjs17();
|
|
14633
|
+
var protocolHttp = require_dist_cjs2();
|
|
14634
|
+
var utilFormatUrl = require_dist_cjs34();
|
|
14635
|
+
var eventstreamSerdeBrowser = require_dist_cjs36();
|
|
14636
|
+
var fetchHttpHandler = require_dist_cjs16();
|
|
14637
|
+
var getEventSigningTransformStream = (initialSignature, messageSigner, eventStreamCodec, systemClockOffsetProvider) => {
|
|
14660
14638
|
let priorSignature = initialSignature;
|
|
14661
14639
|
const transformer = {
|
|
14662
14640
|
start() {
|
|
@@ -14667,25 +14645,22 @@ var require_dist_cjs37 = __commonJS({
|
|
|
14667
14645
|
const dateHeader = {
|
|
14668
14646
|
":date": { type: "timestamp", value: now }
|
|
14669
14647
|
};
|
|
14670
|
-
const signedMessage = await messageSigner.sign(
|
|
14671
|
-
{
|
|
14672
|
-
|
|
14673
|
-
|
|
14674
|
-
headers: dateHeader
|
|
14675
|
-
},
|
|
14676
|
-
priorSignature
|
|
14648
|
+
const signedMessage = await messageSigner.sign({
|
|
14649
|
+
message: {
|
|
14650
|
+
body: chunk,
|
|
14651
|
+
headers: dateHeader
|
|
14677
14652
|
},
|
|
14678
|
-
|
|
14679
|
-
|
|
14680
|
-
|
|
14681
|
-
);
|
|
14653
|
+
priorSignature
|
|
14654
|
+
}, {
|
|
14655
|
+
signingDate: now
|
|
14656
|
+
});
|
|
14682
14657
|
priorSignature = signedMessage.signature;
|
|
14683
14658
|
const serializedSigned = eventStreamCodec.encode({
|
|
14684
14659
|
headers: {
|
|
14685
14660
|
...dateHeader,
|
|
14686
14661
|
":chunk-signature": {
|
|
14687
14662
|
type: "binary",
|
|
14688
|
-
value:
|
|
14663
|
+
value: utilHexEncoding.fromHex(signedMessage.signature)
|
|
14689
14664
|
}
|
|
14690
14665
|
},
|
|
14691
14666
|
body: chunk
|
|
@@ -14697,17 +14672,14 @@ var require_dist_cjs37 = __commonJS({
|
|
|
14697
14672
|
}
|
|
14698
14673
|
};
|
|
14699
14674
|
return new TransformStream({ ...transformer });
|
|
14700
|
-
}
|
|
14675
|
+
};
|
|
14701
14676
|
var EventStreamPayloadHandler = class {
|
|
14702
|
-
static {
|
|
14703
|
-
__name(this, "EventStreamPayloadHandler");
|
|
14704
|
-
}
|
|
14705
14677
|
messageSigner;
|
|
14706
14678
|
eventStreamCodec;
|
|
14707
14679
|
systemClockOffsetProvider;
|
|
14708
14680
|
constructor(options) {
|
|
14709
14681
|
this.messageSigner = options.messageSigner;
|
|
14710
|
-
this.eventStreamCodec = new
|
|
14682
|
+
this.eventStreamCodec = new eventstreamCodec.EventStreamCodec(options.utf8Encoder, options.utf8Decoder);
|
|
14711
14683
|
this.systemClockOffsetProvider = async () => options.systemClockOffset ?? 0;
|
|
14712
14684
|
}
|
|
14713
14685
|
async handle(next, args, context = {}) {
|
|
@@ -14727,19 +14699,14 @@ var require_dist_cjs37 = __commonJS({
|
|
|
14727
14699
|
}
|
|
14728
14700
|
const match2 = (headers["authorization"] || "").match(/Signature=([\w]+)$/);
|
|
14729
14701
|
const priorSignature = (match2 || [])[1] || query2 && query2["X-Amz-Signature"] || "";
|
|
14730
|
-
const signingStream = getEventSigningTransformStream(
|
|
14731
|
-
priorSignature,
|
|
14732
|
-
await this.messageSigner(),
|
|
14733
|
-
this.eventStreamCodec,
|
|
14734
|
-
this.systemClockOffsetProvider
|
|
14735
|
-
);
|
|
14702
|
+
const signingStream = getEventSigningTransformStream(priorSignature, await this.messageSigner(), this.eventStreamCodec, this.systemClockOffsetProvider);
|
|
14736
14703
|
const signedPayload = payload2.pipeThrough(signingStream);
|
|
14737
14704
|
signedPayload.pipeThrough(placeHolderStream);
|
|
14738
14705
|
return result;
|
|
14739
14706
|
}
|
|
14740
14707
|
};
|
|
14741
|
-
var eventStreamPayloadHandlerProvider =
|
|
14742
|
-
var injectSessionIdMiddleware =
|
|
14708
|
+
var eventStreamPayloadHandlerProvider = (options) => new EventStreamPayloadHandler(options);
|
|
14709
|
+
var injectSessionIdMiddleware = () => (next) => async (args) => {
|
|
14743
14710
|
const requestParams = {
|
|
14744
14711
|
...args.input
|
|
14745
14712
|
};
|
|
@@ -14749,17 +14716,16 @@ var require_dist_cjs37 = __commonJS({
|
|
|
14749
14716
|
output.SessionId = requestParams.SessionId;
|
|
14750
14717
|
}
|
|
14751
14718
|
return response;
|
|
14752
|
-
}
|
|
14719
|
+
};
|
|
14753
14720
|
var injectSessionIdMiddlewareOptions = {
|
|
14754
14721
|
step: "initialize",
|
|
14755
14722
|
name: "injectSessionIdMiddleware",
|
|
14756
14723
|
tags: ["WEBSOCKET", "EVENT_STREAM"],
|
|
14757
14724
|
override: true
|
|
14758
14725
|
};
|
|
14759
|
-
var
|
|
14760
|
-
var websocketEndpointMiddleware = /* @__PURE__ */ __name((config, options) => (next) => (args) => {
|
|
14726
|
+
var websocketEndpointMiddleware = (config, options) => (next) => (args) => {
|
|
14761
14727
|
const { request } = args;
|
|
14762
|
-
if (
|
|
14728
|
+
if (protocolHttp.HttpRequest.isInstance(request) && config.requestHandler.metadata?.handlerProtocol?.toLowerCase().includes("websocket")) {
|
|
14763
14729
|
request.protocol = "wss:";
|
|
14764
14730
|
request.method = "GET";
|
|
14765
14731
|
request.path = `${request.path}-websocket`;
|
|
@@ -14778,7 +14744,7 @@ var require_dist_cjs37 = __commonJS({
|
|
|
14778
14744
|
request.headers = { host: headers.host ?? request.hostname };
|
|
14779
14745
|
}
|
|
14780
14746
|
return next(args);
|
|
14781
|
-
}
|
|
14747
|
+
};
|
|
14782
14748
|
var websocketEndpointMiddlewareOptions = {
|
|
14783
14749
|
name: "websocketEndpointMiddleware",
|
|
14784
14750
|
tags: ["WEBSOCKET", "EVENT_STREAM"],
|
|
@@ -14786,17 +14752,14 @@ var require_dist_cjs37 = __commonJS({
|
|
|
14786
14752
|
toMiddleware: "eventStreamHeaderMiddleware",
|
|
14787
14753
|
override: true
|
|
14788
14754
|
};
|
|
14789
|
-
var getWebSocketPlugin =
|
|
14790
|
-
applyToStack:
|
|
14755
|
+
var getWebSocketPlugin = (config, options) => ({
|
|
14756
|
+
applyToStack: (clientStack) => {
|
|
14791
14757
|
clientStack.addRelativeTo(websocketEndpointMiddleware(config, options), websocketEndpointMiddlewareOptions);
|
|
14792
14758
|
clientStack.add(injectSessionIdMiddleware(), injectSessionIdMiddlewareOptions);
|
|
14793
|
-
}, "applyToStack")
|
|
14794
|
-
}), "getWebSocketPlugin");
|
|
14795
|
-
var isWebSocketRequest = /* @__PURE__ */ __name((request) => request.protocol === "ws:" || request.protocol === "wss:", "isWebSocketRequest");
|
|
14796
|
-
var WebsocketSignatureV4 = class {
|
|
14797
|
-
static {
|
|
14798
|
-
__name(this, "WebsocketSignatureV4");
|
|
14799
14759
|
}
|
|
14760
|
+
});
|
|
14761
|
+
var isWebSocketRequest = (request) => request.protocol === "ws:" || request.protocol === "wss:";
|
|
14762
|
+
var WebsocketSignatureV4 = class {
|
|
14800
14763
|
signer;
|
|
14801
14764
|
constructor(options) {
|
|
14802
14765
|
this.signer = options.signer;
|
|
@@ -14805,19 +14768,12 @@ var require_dist_cjs37 = __commonJS({
|
|
|
14805
14768
|
return this.signer.presign(originalRequest, options);
|
|
14806
14769
|
}
|
|
14807
14770
|
async sign(toSign, options) {
|
|
14808
|
-
if (
|
|
14809
|
-
const signedRequest = await this.signer.presign(
|
|
14810
|
-
|
|
14811
|
-
|
|
14812
|
-
|
|
14813
|
-
|
|
14814
|
-
expiresIn: 60,
|
|
14815
|
-
// Not to sign headers. Transcribe-streaming WebSocket
|
|
14816
|
-
// request omits headers except for required 'host' header. If we sign
|
|
14817
|
-
// the other headers, the signature could be mismatch.
|
|
14818
|
-
unsignableHeaders: new Set(Object.keys(toSign.headers).filter((header) => header !== "host"))
|
|
14819
|
-
}
|
|
14820
|
-
);
|
|
14771
|
+
if (protocolHttp.HttpRequest.isInstance(toSign) && isWebSocketRequest(toSign)) {
|
|
14772
|
+
const signedRequest = await this.signer.presign({ ...toSign, body: "" }, {
|
|
14773
|
+
...options,
|
|
14774
|
+
expiresIn: 60,
|
|
14775
|
+
unsignableHeaders: new Set(Object.keys(toSign.headers).filter((header) => header !== "host"))
|
|
14776
|
+
});
|
|
14821
14777
|
return {
|
|
14822
14778
|
...signedRequest,
|
|
14823
14779
|
body: toSign.body
|
|
@@ -14827,27 +14783,21 @@ var require_dist_cjs37 = __commonJS({
|
|
|
14827
14783
|
}
|
|
14828
14784
|
}
|
|
14829
14785
|
};
|
|
14830
|
-
var resolveWebSocketConfig =
|
|
14786
|
+
var resolveWebSocketConfig = (input) => {
|
|
14831
14787
|
const { signer } = input;
|
|
14832
14788
|
return Object.assign(input, {
|
|
14833
|
-
signer:
|
|
14789
|
+
signer: async (authScheme) => {
|
|
14834
14790
|
const signerObj = await signer(authScheme);
|
|
14835
14791
|
if (validateSigner(signerObj)) {
|
|
14836
14792
|
return new WebsocketSignatureV4({ signer: signerObj });
|
|
14837
14793
|
}
|
|
14838
14794
|
throw new Error("Expected WebsocketSignatureV4 signer, please check the client constructor.");
|
|
14839
|
-
}
|
|
14795
|
+
}
|
|
14840
14796
|
});
|
|
14841
|
-
}
|
|
14842
|
-
var validateSigner =
|
|
14843
|
-
var import_util_format_url = require_dist_cjs34();
|
|
14844
|
-
var import_eventstream_serde_browser = require_dist_cjs36();
|
|
14845
|
-
var import_fetch_http_handler = require_dist_cjs16();
|
|
14797
|
+
};
|
|
14798
|
+
var validateSigner = (signer) => !!signer;
|
|
14846
14799
|
var DEFAULT_WS_CONNECTION_TIMEOUT_MS = 2e3;
|
|
14847
14800
|
var WebSocketFetchHandler = class _WebSocketFetchHandler {
|
|
14848
|
-
static {
|
|
14849
|
-
__name(this, "WebSocketFetchHandler");
|
|
14850
|
-
}
|
|
14851
14801
|
metadata = {
|
|
14852
14802
|
handlerProtocol: "websocket/h1.1"
|
|
14853
14803
|
};
|
|
@@ -14855,20 +14805,13 @@ var require_dist_cjs37 = __commonJS({
|
|
|
14855
14805
|
configPromise;
|
|
14856
14806
|
httpHandler;
|
|
14857
14807
|
sockets = {};
|
|
14858
|
-
|
|
14859
|
-
* @returns the input if it is an HttpHandler of any class,
|
|
14860
|
-
* or instantiates a new instance of this handler.
|
|
14861
|
-
*/
|
|
14862
|
-
static create(instanceOrOptions, httpHandler = new import_fetch_http_handler.FetchHttpHandler()) {
|
|
14808
|
+
static create(instanceOrOptions, httpHandler = new fetchHttpHandler.FetchHttpHandler()) {
|
|
14863
14809
|
if (typeof instanceOrOptions?.handle === "function") {
|
|
14864
14810
|
return instanceOrOptions;
|
|
14865
14811
|
}
|
|
14866
|
-
return new _WebSocketFetchHandler(
|
|
14867
|
-
instanceOrOptions,
|
|
14868
|
-
httpHandler
|
|
14869
|
-
);
|
|
14812
|
+
return new _WebSocketFetchHandler(instanceOrOptions, httpHandler);
|
|
14870
14813
|
}
|
|
14871
|
-
constructor(options, httpHandler = new
|
|
14814
|
+
constructor(options, httpHandler = new fetchHttpHandler.FetchHttpHandler()) {
|
|
14872
14815
|
this.httpHandler = httpHandler;
|
|
14873
14816
|
if (typeof options === "function") {
|
|
14874
14817
|
this.config = {};
|
|
@@ -14878,10 +14821,6 @@ var require_dist_cjs37 = __commonJS({
|
|
|
14878
14821
|
this.configPromise = Promise.resolve(this.config);
|
|
14879
14822
|
}
|
|
14880
14823
|
}
|
|
14881
|
-
/**
|
|
14882
|
-
* Destroys the WebSocketHandler.
|
|
14883
|
-
* Closes all sockets from the socket pool.
|
|
14884
|
-
*/
|
|
14885
14824
|
destroy() {
|
|
14886
14825
|
for (const [key, sockets] of Object.entries(this.sockets)) {
|
|
14887
14826
|
for (const socket of sockets) {
|
|
@@ -14894,7 +14833,7 @@ var require_dist_cjs37 = __commonJS({
|
|
|
14894
14833
|
if (!isWebSocketRequest(request)) {
|
|
14895
14834
|
return this.httpHandler.handle(request);
|
|
14896
14835
|
}
|
|
14897
|
-
const url =
|
|
14836
|
+
const url = utilFormatUrl.formatUrl(request);
|
|
14898
14837
|
const socket = new WebSocket(url);
|
|
14899
14838
|
if (!this.sockets[url]) {
|
|
14900
14839
|
this.sockets[url] = [];
|
|
@@ -14909,9 +14848,8 @@ var require_dist_cjs37 = __commonJS({
|
|
|
14909
14848
|
const asyncIterable = this.connect(socket, bodyStream);
|
|
14910
14849
|
const outputPayload = toReadableStream(asyncIterable);
|
|
14911
14850
|
return {
|
|
14912
|
-
response: new
|
|
14851
|
+
response: new protocolHttp.HttpResponse({
|
|
14913
14852
|
statusCode: 200,
|
|
14914
|
-
// indicates connection success
|
|
14915
14853
|
body: outputPayload
|
|
14916
14854
|
})
|
|
14917
14855
|
};
|
|
@@ -14925,13 +14863,8 @@ var require_dist_cjs37 = __commonJS({
|
|
|
14925
14863
|
httpHandlerConfigs() {
|
|
14926
14864
|
return this.config ?? {};
|
|
14927
14865
|
}
|
|
14928
|
-
/**
|
|
14929
|
-
* Removes all closing/closed sockets from the socket pool for URL.
|
|
14930
|
-
*/
|
|
14931
14866
|
removeNotUsableSockets(url) {
|
|
14932
|
-
this.sockets[url] = (this.sockets[url] ?? []).filter(
|
|
14933
|
-
(socket) => ![WebSocket.CLOSING, WebSocket.CLOSED].includes(socket.readyState)
|
|
14934
|
-
);
|
|
14867
|
+
this.sockets[url] = (this.sockets[url] ?? []).filter((socket) => ![WebSocket.CLOSING, WebSocket.CLOSED].includes(socket.readyState));
|
|
14935
14868
|
}
|
|
14936
14869
|
waitForReady(socket, connectionTimeout) {
|
|
14937
14870
|
return new Promise((resolve4, reject2) => {
|
|
@@ -14952,10 +14885,10 @@ var require_dist_cjs37 = __commonJS({
|
|
|
14952
14885
|
connect(socket, data2) {
|
|
14953
14886
|
let streamError = void 0;
|
|
14954
14887
|
let socketErrorOccurred = false;
|
|
14955
|
-
let reject2 =
|
|
14956
|
-
}
|
|
14957
|
-
let resolve4 =
|
|
14958
|
-
}
|
|
14888
|
+
let reject2 = () => {
|
|
14889
|
+
};
|
|
14890
|
+
let resolve4 = () => {
|
|
14891
|
+
};
|
|
14959
14892
|
socket.onmessage = (event) => {
|
|
14960
14893
|
resolve4({
|
|
14961
14894
|
done: false,
|
|
@@ -14969,28 +14902,28 @@ var require_dist_cjs37 = __commonJS({
|
|
|
14969
14902
|
};
|
|
14970
14903
|
socket.onclose = () => {
|
|
14971
14904
|
this.removeNotUsableSockets(socket.url);
|
|
14972
|
-
if (socketErrorOccurred)
|
|
14905
|
+
if (socketErrorOccurred)
|
|
14906
|
+
return;
|
|
14973
14907
|
if (streamError) {
|
|
14974
14908
|
reject2(streamError);
|
|
14975
14909
|
} else {
|
|
14976
14910
|
resolve4({
|
|
14977
14911
|
done: true,
|
|
14978
14912
|
value: void 0
|
|
14979
|
-
// unchecked because done=true.
|
|
14980
14913
|
});
|
|
14981
14914
|
}
|
|
14982
14915
|
};
|
|
14983
14916
|
const outputStream = {
|
|
14984
14917
|
[Symbol.asyncIterator]: () => ({
|
|
14985
|
-
next:
|
|
14918
|
+
next: () => {
|
|
14986
14919
|
return new Promise((_resolve, _reject) => {
|
|
14987
14920
|
resolve4 = _resolve;
|
|
14988
14921
|
reject2 = _reject;
|
|
14989
14922
|
});
|
|
14990
|
-
}
|
|
14923
|
+
}
|
|
14991
14924
|
})
|
|
14992
14925
|
};
|
|
14993
|
-
const send =
|
|
14926
|
+
const send = async () => {
|
|
14994
14927
|
try {
|
|
14995
14928
|
for await (const inputChunk of data2) {
|
|
14996
14929
|
socket.send(inputChunk);
|
|
@@ -15000,26 +14933,30 @@ var require_dist_cjs37 = __commonJS({
|
|
|
15000
14933
|
} finally {
|
|
15001
14934
|
socket.close(1e3);
|
|
15002
14935
|
}
|
|
15003
|
-
}
|
|
14936
|
+
};
|
|
15004
14937
|
send();
|
|
15005
14938
|
return outputStream;
|
|
15006
14939
|
}
|
|
15007
14940
|
};
|
|
15008
|
-
var getIterator =
|
|
14941
|
+
var getIterator = (stream2) => {
|
|
15009
14942
|
if (stream2[Symbol.asyncIterator]) {
|
|
15010
14943
|
return stream2;
|
|
15011
14944
|
}
|
|
15012
14945
|
if (isReadableStream(stream2)) {
|
|
15013
|
-
return
|
|
14946
|
+
return eventstreamSerdeBrowser.readableStreamtoIterable(stream2);
|
|
15014
14947
|
}
|
|
15015
14948
|
return {
|
|
15016
14949
|
[Symbol.asyncIterator]: async function* () {
|
|
15017
14950
|
yield stream2;
|
|
15018
14951
|
}
|
|
15019
14952
|
};
|
|
15020
|
-
}
|
|
15021
|
-
var toReadableStream =
|
|
15022
|
-
var isReadableStream =
|
|
14953
|
+
};
|
|
14954
|
+
var toReadableStream = (asyncIterable) => typeof ReadableStream === "function" ? eventstreamSerdeBrowser.iterableToReadableStream(asyncIterable) : asyncIterable;
|
|
14955
|
+
var isReadableStream = (payload2) => typeof ReadableStream === "function" && payload2 instanceof ReadableStream;
|
|
14956
|
+
exports2.WebSocketFetchHandler = WebSocketFetchHandler;
|
|
14957
|
+
exports2.eventStreamPayloadHandlerProvider = eventStreamPayloadHandlerProvider;
|
|
14958
|
+
exports2.getWebSocketPlugin = getWebSocketPlugin;
|
|
14959
|
+
exports2.resolveWebSocketConfig = resolveWebSocketConfig;
|
|
15023
14960
|
}
|
|
15024
14961
|
});
|
|
15025
14962
|
|
|
@@ -16640,7 +16577,7 @@ var require_package = __commonJS({
|
|
|
16640
16577
|
module2.exports = {
|
|
16641
16578
|
name: "@aws-sdk/client-bedrock-runtime",
|
|
16642
16579
|
description: "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
|
|
16643
|
-
version: "3.
|
|
16580
|
+
version: "3.908.0",
|
|
16644
16581
|
scripts: {
|
|
16645
16582
|
build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
16646
16583
|
"build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime",
|
|
@@ -16659,49 +16596,49 @@ var require_package = __commonJS({
|
|
|
16659
16596
|
dependencies: {
|
|
16660
16597
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
16661
16598
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
16662
|
-
"@aws-sdk/core": "3.
|
|
16663
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
16599
|
+
"@aws-sdk/core": "3.908.0",
|
|
16600
|
+
"@aws-sdk/credential-provider-node": "3.908.0",
|
|
16664
16601
|
"@aws-sdk/eventstream-handler-node": "3.901.0",
|
|
16665
16602
|
"@aws-sdk/middleware-eventstream": "3.901.0",
|
|
16666
16603
|
"@aws-sdk/middleware-host-header": "3.901.0",
|
|
16667
16604
|
"@aws-sdk/middleware-logger": "3.901.0",
|
|
16668
16605
|
"@aws-sdk/middleware-recursion-detection": "3.901.0",
|
|
16669
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
16670
|
-
"@aws-sdk/middleware-websocket": "3.
|
|
16606
|
+
"@aws-sdk/middleware-user-agent": "3.908.0",
|
|
16607
|
+
"@aws-sdk/middleware-websocket": "3.908.0",
|
|
16671
16608
|
"@aws-sdk/region-config-resolver": "3.901.0",
|
|
16672
|
-
"@aws-sdk/token-providers": "3.
|
|
16609
|
+
"@aws-sdk/token-providers": "3.908.0",
|
|
16673
16610
|
"@aws-sdk/types": "3.901.0",
|
|
16674
16611
|
"@aws-sdk/util-endpoints": "3.901.0",
|
|
16675
16612
|
"@aws-sdk/util-user-agent-browser": "3.907.0",
|
|
16676
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
16613
|
+
"@aws-sdk/util-user-agent-node": "3.908.0",
|
|
16677
16614
|
"@smithy/config-resolver": "^4.3.0",
|
|
16678
|
-
"@smithy/core": "^3.
|
|
16615
|
+
"@smithy/core": "^3.15.0",
|
|
16679
16616
|
"@smithy/eventstream-serde-browser": "^4.2.0",
|
|
16680
16617
|
"@smithy/eventstream-serde-config-resolver": "^4.3.0",
|
|
16681
16618
|
"@smithy/eventstream-serde-node": "^4.2.0",
|
|
16682
|
-
"@smithy/fetch-http-handler": "^5.3.
|
|
16619
|
+
"@smithy/fetch-http-handler": "^5.3.1",
|
|
16683
16620
|
"@smithy/hash-node": "^4.2.0",
|
|
16684
16621
|
"@smithy/invalid-dependency": "^4.2.0",
|
|
16685
16622
|
"@smithy/middleware-content-length": "^4.2.0",
|
|
16686
|
-
"@smithy/middleware-endpoint": "^4.3.
|
|
16687
|
-
"@smithy/middleware-retry": "^4.4.
|
|
16623
|
+
"@smithy/middleware-endpoint": "^4.3.1",
|
|
16624
|
+
"@smithy/middleware-retry": "^4.4.1",
|
|
16688
16625
|
"@smithy/middleware-serde": "^4.2.0",
|
|
16689
16626
|
"@smithy/middleware-stack": "^4.2.0",
|
|
16690
16627
|
"@smithy/node-config-provider": "^4.3.0",
|
|
16691
16628
|
"@smithy/node-http-handler": "^4.3.0",
|
|
16692
16629
|
"@smithy/protocol-http": "^5.3.0",
|
|
16693
|
-
"@smithy/smithy-client": "^4.7.
|
|
16630
|
+
"@smithy/smithy-client": "^4.7.1",
|
|
16694
16631
|
"@smithy/types": "^4.6.0",
|
|
16695
16632
|
"@smithy/url-parser": "^4.2.0",
|
|
16696
|
-
"@smithy/util-base64": "^4.
|
|
16633
|
+
"@smithy/util-base64": "^4.3.0",
|
|
16697
16634
|
"@smithy/util-body-length-browser": "^4.2.0",
|
|
16698
|
-
"@smithy/util-body-length-node": "^4.2.
|
|
16699
|
-
"@smithy/util-defaults-mode-browser": "^4.
|
|
16700
|
-
"@smithy/util-defaults-mode-node": "^4.2.
|
|
16635
|
+
"@smithy/util-body-length-node": "^4.2.1",
|
|
16636
|
+
"@smithy/util-defaults-mode-browser": "^4.3.0",
|
|
16637
|
+
"@smithy/util-defaults-mode-node": "^4.2.1",
|
|
16701
16638
|
"@smithy/util-endpoints": "^3.2.0",
|
|
16702
16639
|
"@smithy/util-middleware": "^4.2.0",
|
|
16703
16640
|
"@smithy/util-retry": "^4.2.0",
|
|
16704
|
-
"@smithy/util-stream": "^4.
|
|
16641
|
+
"@smithy/util-stream": "^4.5.0",
|
|
16705
16642
|
"@smithy/util-utf8": "^4.2.0",
|
|
16706
16643
|
"@smithy/uuid": "^1.1.0",
|
|
16707
16644
|
tslib: "^2.6.2"
|
|
@@ -17421,7 +17358,7 @@ var init_package = __esm({
|
|
|
17421
17358
|
"node_modules/@aws-sdk/nested-clients/package.json"() {
|
|
17422
17359
|
package_default = {
|
|
17423
17360
|
name: "@aws-sdk/nested-clients",
|
|
17424
|
-
version: "3.
|
|
17361
|
+
version: "3.908.0",
|
|
17425
17362
|
description: "Nested clients for AWS SDK packages.",
|
|
17426
17363
|
main: "./dist-cjs/index.js",
|
|
17427
17364
|
module: "./dist-es/index.js",
|
|
@@ -17450,37 +17387,37 @@ var init_package = __esm({
|
|
|
17450
17387
|
dependencies: {
|
|
17451
17388
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
17452
17389
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
17453
|
-
"@aws-sdk/core": "3.
|
|
17390
|
+
"@aws-sdk/core": "3.908.0",
|
|
17454
17391
|
"@aws-sdk/middleware-host-header": "3.901.0",
|
|
17455
17392
|
"@aws-sdk/middleware-logger": "3.901.0",
|
|
17456
17393
|
"@aws-sdk/middleware-recursion-detection": "3.901.0",
|
|
17457
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
17394
|
+
"@aws-sdk/middleware-user-agent": "3.908.0",
|
|
17458
17395
|
"@aws-sdk/region-config-resolver": "3.901.0",
|
|
17459
17396
|
"@aws-sdk/types": "3.901.0",
|
|
17460
17397
|
"@aws-sdk/util-endpoints": "3.901.0",
|
|
17461
17398
|
"@aws-sdk/util-user-agent-browser": "3.907.0",
|
|
17462
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
17399
|
+
"@aws-sdk/util-user-agent-node": "3.908.0",
|
|
17463
17400
|
"@smithy/config-resolver": "^4.3.0",
|
|
17464
|
-
"@smithy/core": "^3.
|
|
17465
|
-
"@smithy/fetch-http-handler": "^5.3.
|
|
17401
|
+
"@smithy/core": "^3.15.0",
|
|
17402
|
+
"@smithy/fetch-http-handler": "^5.3.1",
|
|
17466
17403
|
"@smithy/hash-node": "^4.2.0",
|
|
17467
17404
|
"@smithy/invalid-dependency": "^4.2.0",
|
|
17468
17405
|
"@smithy/middleware-content-length": "^4.2.0",
|
|
17469
|
-
"@smithy/middleware-endpoint": "^4.3.
|
|
17470
|
-
"@smithy/middleware-retry": "^4.4.
|
|
17406
|
+
"@smithy/middleware-endpoint": "^4.3.1",
|
|
17407
|
+
"@smithy/middleware-retry": "^4.4.1",
|
|
17471
17408
|
"@smithy/middleware-serde": "^4.2.0",
|
|
17472
17409
|
"@smithy/middleware-stack": "^4.2.0",
|
|
17473
17410
|
"@smithy/node-config-provider": "^4.3.0",
|
|
17474
17411
|
"@smithy/node-http-handler": "^4.3.0",
|
|
17475
17412
|
"@smithy/protocol-http": "^5.3.0",
|
|
17476
|
-
"@smithy/smithy-client": "^4.7.
|
|
17413
|
+
"@smithy/smithy-client": "^4.7.1",
|
|
17477
17414
|
"@smithy/types": "^4.6.0",
|
|
17478
17415
|
"@smithy/url-parser": "^4.2.0",
|
|
17479
|
-
"@smithy/util-base64": "^4.
|
|
17416
|
+
"@smithy/util-base64": "^4.3.0",
|
|
17480
17417
|
"@smithy/util-body-length-browser": "^4.2.0",
|
|
17481
|
-
"@smithy/util-body-length-node": "^4.2.
|
|
17482
|
-
"@smithy/util-defaults-mode-browser": "^4.
|
|
17483
|
-
"@smithy/util-defaults-mode-node": "^4.2.
|
|
17418
|
+
"@smithy/util-body-length-node": "^4.2.1",
|
|
17419
|
+
"@smithy/util-defaults-mode-browser": "^4.3.0",
|
|
17420
|
+
"@smithy/util-defaults-mode-node": "^4.2.1",
|
|
17484
17421
|
"@smithy/util-endpoints": "^3.2.0",
|
|
17485
17422
|
"@smithy/util-middleware": "^4.2.0",
|
|
17486
17423
|
"@smithy/util-retry": "^4.2.0",
|
|
@@ -18896,7 +18833,7 @@ var require_package2 = __commonJS({
|
|
|
18896
18833
|
module2.exports = {
|
|
18897
18834
|
name: "@aws-sdk/client-sso",
|
|
18898
18835
|
description: "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",
|
|
18899
|
-
version: "3.
|
|
18836
|
+
version: "3.908.0",
|
|
18900
18837
|
scripts: {
|
|
18901
18838
|
build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
18902
18839
|
"build:cjs": "node ../../scripts/compilation/inline client-sso",
|
|
@@ -18915,37 +18852,37 @@ var require_package2 = __commonJS({
|
|
|
18915
18852
|
dependencies: {
|
|
18916
18853
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
18917
18854
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
18918
|
-
"@aws-sdk/core": "3.
|
|
18855
|
+
"@aws-sdk/core": "3.908.0",
|
|
18919
18856
|
"@aws-sdk/middleware-host-header": "3.901.0",
|
|
18920
18857
|
"@aws-sdk/middleware-logger": "3.901.0",
|
|
18921
18858
|
"@aws-sdk/middleware-recursion-detection": "3.901.0",
|
|
18922
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
18859
|
+
"@aws-sdk/middleware-user-agent": "3.908.0",
|
|
18923
18860
|
"@aws-sdk/region-config-resolver": "3.901.0",
|
|
18924
18861
|
"@aws-sdk/types": "3.901.0",
|
|
18925
18862
|
"@aws-sdk/util-endpoints": "3.901.0",
|
|
18926
18863
|
"@aws-sdk/util-user-agent-browser": "3.907.0",
|
|
18927
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
18864
|
+
"@aws-sdk/util-user-agent-node": "3.908.0",
|
|
18928
18865
|
"@smithy/config-resolver": "^4.3.0",
|
|
18929
|
-
"@smithy/core": "^3.
|
|
18930
|
-
"@smithy/fetch-http-handler": "^5.3.
|
|
18866
|
+
"@smithy/core": "^3.15.0",
|
|
18867
|
+
"@smithy/fetch-http-handler": "^5.3.1",
|
|
18931
18868
|
"@smithy/hash-node": "^4.2.0",
|
|
18932
18869
|
"@smithy/invalid-dependency": "^4.2.0",
|
|
18933
18870
|
"@smithy/middleware-content-length": "^4.2.0",
|
|
18934
|
-
"@smithy/middleware-endpoint": "^4.3.
|
|
18935
|
-
"@smithy/middleware-retry": "^4.4.
|
|
18871
|
+
"@smithy/middleware-endpoint": "^4.3.1",
|
|
18872
|
+
"@smithy/middleware-retry": "^4.4.1",
|
|
18936
18873
|
"@smithy/middleware-serde": "^4.2.0",
|
|
18937
18874
|
"@smithy/middleware-stack": "^4.2.0",
|
|
18938
18875
|
"@smithy/node-config-provider": "^4.3.0",
|
|
18939
18876
|
"@smithy/node-http-handler": "^4.3.0",
|
|
18940
18877
|
"@smithy/protocol-http": "^5.3.0",
|
|
18941
|
-
"@smithy/smithy-client": "^4.7.
|
|
18878
|
+
"@smithy/smithy-client": "^4.7.1",
|
|
18942
18879
|
"@smithy/types": "^4.6.0",
|
|
18943
18880
|
"@smithy/url-parser": "^4.2.0",
|
|
18944
|
-
"@smithy/util-base64": "^4.
|
|
18881
|
+
"@smithy/util-base64": "^4.3.0",
|
|
18945
18882
|
"@smithy/util-body-length-browser": "^4.2.0",
|
|
18946
|
-
"@smithy/util-body-length-node": "^4.2.
|
|
18947
|
-
"@smithy/util-defaults-mode-browser": "^4.
|
|
18948
|
-
"@smithy/util-defaults-mode-node": "^4.2.
|
|
18883
|
+
"@smithy/util-body-length-node": "^4.2.1",
|
|
18884
|
+
"@smithy/util-defaults-mode-browser": "^4.3.0",
|
|
18885
|
+
"@smithy/util-defaults-mode-node": "^4.2.1",
|
|
18949
18886
|
"@smithy/util-endpoints": "^3.2.0",
|
|
18950
18887
|
"@smithy/util-middleware": "^4.2.0",
|
|
18951
18888
|
"@smithy/util-retry": "^4.2.0",
|
|
@@ -54695,7 +54632,7 @@ var init_semantics = __esm({
|
|
|
54695
54632
|
return;
|
|
54696
54633
|
for (const cn of contentNodes) {
|
|
54697
54634
|
const ch = cn.children || {};
|
|
54698
|
-
const inspectTok = (tk) => {
|
|
54635
|
+
const inspectTok = (tk, inQuoted = false) => {
|
|
54699
54636
|
if (!tk)
|
|
54700
54637
|
return false;
|
|
54701
54638
|
const img = String(tk.image || "");
|
|
@@ -54705,7 +54642,7 @@ var init_semantics = __esm({
|
|
|
54705
54642
|
this.ctx.errors.push({
|
|
54706
54643
|
line: tk.startLine ?? 1,
|
|
54707
54644
|
column: col,
|
|
54708
|
-
severity: "warning",
|
|
54645
|
+
severity: inQuoted ? "error" : "warning",
|
|
54709
54646
|
code: "FL-LABEL-BACKTICK",
|
|
54710
54647
|
message: "Backticks (`\u2026`) inside node labels are not supported by Mermaid.",
|
|
54711
54648
|
hint: 'Remove the backticks or use quotes instead, e.g., "GITHUB_ACTIONS" and "--cli".',
|
|
@@ -54717,12 +54654,12 @@ var init_semantics = __esm({
|
|
|
54717
54654
|
};
|
|
54718
54655
|
const texts = ch.Text || [];
|
|
54719
54656
|
for (const tk of texts) {
|
|
54720
|
-
if (inspectTok(tk))
|
|
54657
|
+
if (inspectTok(tk, false))
|
|
54721
54658
|
return;
|
|
54722
54659
|
}
|
|
54723
54660
|
const qs = ch.QuotedString || [];
|
|
54724
54661
|
for (const tk of qs) {
|
|
54725
|
-
if (inspectTok(tk))
|
|
54662
|
+
if (inspectTok(tk, true))
|
|
54726
54663
|
return;
|
|
54727
54664
|
}
|
|
54728
54665
|
}
|
|
@@ -55123,6 +55060,36 @@ function mapFlowchartParserError(err, text) {
|
|
|
55123
55060
|
length: len
|
|
55124
55061
|
};
|
|
55125
55062
|
}
|
|
55063
|
+
{
|
|
55064
|
+
const caret0 = Math.max(0, column - 1);
|
|
55065
|
+
const openIdx = lineStr.lastIndexOf("[", caret0);
|
|
55066
|
+
if (openIdx !== -1) {
|
|
55067
|
+
const closeIdx = lineStr.indexOf("]", openIdx + 1);
|
|
55068
|
+
const seg = closeIdx !== -1 ? lineStr.slice(openIdx + 1, closeIdx) : lineStr.slice(openIdx + 1);
|
|
55069
|
+
if (seg.includes('"')) {
|
|
55070
|
+
return {
|
|
55071
|
+
line,
|
|
55072
|
+
column,
|
|
55073
|
+
severity: "error",
|
|
55074
|
+
code: "FL-LABEL-QUOTE-IN-UNQUOTED",
|
|
55075
|
+
message: "Quotes are not allowed inside unquoted node labels. Use " for quotes or wrap the entire label in quotes.",
|
|
55076
|
+
hint: 'Example: I[Log "processing N items"] or I["Log \\"processing N items\\""]',
|
|
55077
|
+
length: len
|
|
55078
|
+
};
|
|
55079
|
+
}
|
|
55080
|
+
if (seg.includes("(") || seg.includes(")")) {
|
|
55081
|
+
return {
|
|
55082
|
+
line,
|
|
55083
|
+
column,
|
|
55084
|
+
severity: "error",
|
|
55085
|
+
code: "FL-LABEL-PARENS-UNQUOTED",
|
|
55086
|
+
message: "Parentheses inside an unquoted label are not supported by Mermaid.",
|
|
55087
|
+
hint: 'Wrap the label in quotes, e.g., A["Mark (X)"] \u2014 or replace ( and ) with HTML entities: ( and ).',
|
|
55088
|
+
length: len
|
|
55089
|
+
};
|
|
55090
|
+
}
|
|
55091
|
+
}
|
|
55092
|
+
}
|
|
55126
55093
|
if (tokType === "QuotedString") {
|
|
55127
55094
|
return {
|
|
55128
55095
|
line,
|
|
@@ -55155,6 +55122,24 @@ function mapFlowchartParserError(err, text) {
|
|
|
55155
55122
|
length: len
|
|
55156
55123
|
};
|
|
55157
55124
|
}
|
|
55125
|
+
{
|
|
55126
|
+
const caret0 = Math.max(0, column - 1);
|
|
55127
|
+
const openIdx = lineStr.lastIndexOf("(", caret0);
|
|
55128
|
+
if (openIdx !== -1) {
|
|
55129
|
+
const seg = lineStr.slice(openIdx + 1);
|
|
55130
|
+
if (seg.includes("(") || seg.includes(")")) {
|
|
55131
|
+
return {
|
|
55132
|
+
line,
|
|
55133
|
+
column,
|
|
55134
|
+
severity: "error",
|
|
55135
|
+
code: "FL-LABEL-PARENS-UNQUOTED",
|
|
55136
|
+
message: "Parentheses inside an unquoted label are not supported by Mermaid.",
|
|
55137
|
+
hint: 'Wrap the label in quotes, e.g., A["Mark (X)"] \u2014 or replace ( and ) with HTML entities: ( and ).',
|
|
55138
|
+
length: len
|
|
55139
|
+
};
|
|
55140
|
+
}
|
|
55141
|
+
}
|
|
55142
|
+
}
|
|
55158
55143
|
const q3 = findInnerQuoteIssue("(");
|
|
55159
55144
|
if (q3?.kind === "escaped") {
|
|
55160
55145
|
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 };
|
|
@@ -55176,6 +55161,25 @@ function mapFlowchartParserError(err, text) {
|
|
|
55176
55161
|
length: len
|
|
55177
55162
|
};
|
|
55178
55163
|
}
|
|
55164
|
+
{
|
|
55165
|
+
const caret0 = Math.max(0, column - 1);
|
|
55166
|
+
const openIdx = lineStr.lastIndexOf("{", caret0);
|
|
55167
|
+
if (openIdx !== -1) {
|
|
55168
|
+
const closeIdx = lineStr.indexOf("}", openIdx + 1);
|
|
55169
|
+
const seg = closeIdx !== -1 ? lineStr.slice(openIdx + 1, closeIdx) : lineStr.slice(openIdx + 1);
|
|
55170
|
+
if (seg.includes("(") || seg.includes(")")) {
|
|
55171
|
+
return {
|
|
55172
|
+
line,
|
|
55173
|
+
column,
|
|
55174
|
+
severity: "error",
|
|
55175
|
+
code: "FL-LABEL-PARENS-UNQUOTED",
|
|
55176
|
+
message: "Parentheses inside an unquoted label are not supported by Mermaid.",
|
|
55177
|
+
hint: 'Wrap the label in quotes, e.g., A["Mark (X)"] \u2014 or replace ( and ) with HTML entities: ( and ).',
|
|
55178
|
+
length: len
|
|
55179
|
+
};
|
|
55180
|
+
}
|
|
55181
|
+
}
|
|
55182
|
+
}
|
|
55179
55183
|
const q3 = findInnerQuoteIssue("{");
|
|
55180
55184
|
if (q3?.kind === "escaped") {
|
|
55181
55185
|
return {
|
|
@@ -55514,6 +55518,17 @@ ${br.example}`,
|
|
|
55514
55518
|
if (inRule("arrow") && err.name === "NoViableAltException") {
|
|
55515
55519
|
return { line, column, severity: "error", code: "SE-ARROW-INVALID", message: `Invalid sequence arrow near '${found}'.`, hint: "Use ->, -->, ->>, -->>, -x, --x, -), --), <<->>, or <<-->>", length: len };
|
|
55516
55520
|
}
|
|
55521
|
+
if ((err.name === "NoViableAltException" || err.name === "MismatchedTokenException") && tokType === "Minus") {
|
|
55522
|
+
return {
|
|
55523
|
+
line,
|
|
55524
|
+
column,
|
|
55525
|
+
severity: "error",
|
|
55526
|
+
code: "SE-BULLET-LINE-UNSUPPORTED",
|
|
55527
|
+
message: "Bullet list lines starting with '-' are not supported in sequence diagrams.",
|
|
55528
|
+
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",
|
|
55529
|
+
length: len
|
|
55530
|
+
};
|
|
55531
|
+
}
|
|
55517
55532
|
if (inRule("noteStmt")) {
|
|
55518
55533
|
if (err.name === "MismatchedTokenException" && exp("Colon")) {
|
|
55519
55534
|
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 };
|
|
@@ -55671,6 +55686,17 @@ ${br.example}`,
|
|
|
55671
55686
|
};
|
|
55672
55687
|
}
|
|
55673
55688
|
}
|
|
55689
|
+
if ((err.name === "NotAllInputParsedException" || err.name === "NoViableAltException") && found === "-") {
|
|
55690
|
+
return {
|
|
55691
|
+
line,
|
|
55692
|
+
column,
|
|
55693
|
+
severity: "error",
|
|
55694
|
+
code: "SE-BULLET-LINE-UNSUPPORTED",
|
|
55695
|
+
message: "Bullet list lines starting with '-' are not supported in sequence diagrams.",
|
|
55696
|
+
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",
|
|
55697
|
+
length: len
|
|
55698
|
+
};
|
|
55699
|
+
}
|
|
55674
55700
|
if ((err.name === "NoViableAltException" || err.name === "NotAllInputParsedException") && tokType === "ElseKeyword") {
|
|
55675
55701
|
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 };
|
|
55676
55702
|
}
|
|
@@ -55872,6 +55898,30 @@ function validateFlowchart(text, options = {}) {
|
|
|
55872
55898
|
return errs;
|
|
55873
55899
|
},
|
|
55874
55900
|
postParse: (text2, tokens, _cst, prevErrors) => {
|
|
55901
|
+
{
|
|
55902
|
+
const tks = tokens;
|
|
55903
|
+
const firstByLine = /* @__PURE__ */ new Map();
|
|
55904
|
+
for (const tk of tks) {
|
|
55905
|
+
const ln = tk.startLine ?? 1;
|
|
55906
|
+
const col = tk.startColumn ?? 1;
|
|
55907
|
+
const prev = firstByLine.get(ln);
|
|
55908
|
+
if (!prev || (prev.startColumn ?? Infinity) > col)
|
|
55909
|
+
firstByLine.set(ln, tk);
|
|
55910
|
+
}
|
|
55911
|
+
for (const tk of tks) {
|
|
55912
|
+
if (tk.image === "title" && firstByLine.get(tk.startLine ?? 1) === tk) {
|
|
55913
|
+
prevErrors.push({
|
|
55914
|
+
line: tk.startLine ?? 1,
|
|
55915
|
+
column: tk.startColumn ?? 1,
|
|
55916
|
+
severity: "error",
|
|
55917
|
+
code: "FL-META-UNSUPPORTED",
|
|
55918
|
+
message: "'title' is not supported in flowcharts by the current Mermaid CLI.",
|
|
55919
|
+
hint: 'Use a Markdown heading above the code block, or draw a labeled node at the top (e.g., T["Dependency Relationship"]).',
|
|
55920
|
+
length: tk.image?.length ?? 5
|
|
55921
|
+
});
|
|
55922
|
+
}
|
|
55923
|
+
}
|
|
55924
|
+
}
|
|
55875
55925
|
const escWarn = detectEscapedQuotes(tokens, {
|
|
55876
55926
|
code: "FL-LABEL-ESCAPED-QUOTE",
|
|
55877
55927
|
message: 'Escaped quotes (\\") in node labels are accepted by Mermaid, but using " is preferred for portability.',
|
|
@@ -58290,6 +58340,13 @@ function computeFixes(text, errors, level = "safe") {
|
|
|
58290
58340
|
const replaced = inner.split('\\"').join(""");
|
|
58291
58341
|
edits.push({ start: { line: e3.line, column: q1 + 2 }, end: { line: e3.line, column: q22 + 1 }, newText: replaced });
|
|
58292
58342
|
continue;
|
|
58343
|
+
if (is("FL-META-UNSUPPORTED", e3)) {
|
|
58344
|
+
if (level === "all") {
|
|
58345
|
+
const lineText2 = lineTextAt(text, e3.line);
|
|
58346
|
+
edits.push({ start: { line: e3.line, column: 1 }, end: { line: e3.line + 1, column: 1 }, newText: "" });
|
|
58347
|
+
}
|
|
58348
|
+
continue;
|
|
58349
|
+
}
|
|
58293
58350
|
}
|
|
58294
58351
|
}
|
|
58295
58352
|
}
|
|
@@ -58297,6 +58354,12 @@ function computeFixes(text, errors, level = "safe") {
|
|
|
58297
58354
|
edits.push(replaceRange(text, at(e3), e3.length ?? 2, """));
|
|
58298
58355
|
continue;
|
|
58299
58356
|
}
|
|
58357
|
+
if (is("FL-META-UNSUPPORTED", e3)) {
|
|
58358
|
+
if (level === "all") {
|
|
58359
|
+
edits.push({ start: { line: e3.line, column: 1 }, end: { line: e3.line + 1, column: 1 }, newText: "" });
|
|
58360
|
+
}
|
|
58361
|
+
continue;
|
|
58362
|
+
}
|
|
58300
58363
|
if (is("FL-LABEL-BACKTICK", e3)) {
|
|
58301
58364
|
edits.push(replaceRange(text, at(e3), e3.length ?? 1, ""));
|
|
58302
58365
|
continue;
|
|
@@ -58346,6 +58409,12 @@ function computeFixes(text, errors, level = "safe") {
|
|
|
58346
58409
|
edits.push(replaceRange(text, at(e3), e3.length ?? 1, rep));
|
|
58347
58410
|
continue;
|
|
58348
58411
|
}
|
|
58412
|
+
if (is("FL-END-WITHOUT-SUBGRAPH", e3)) {
|
|
58413
|
+
if (level === "all") {
|
|
58414
|
+
edits.push({ start: { line: e3.line, column: 1 }, end: { line: e3.line + 1, column: 1 }, newText: "" });
|
|
58415
|
+
}
|
|
58416
|
+
continue;
|
|
58417
|
+
}
|
|
58349
58418
|
if (is("FL-LABEL-DOUBLE-IN-DOUBLE", e3)) {
|
|
58350
58419
|
const lineText = lineTextAt(text, e3.line);
|
|
58351
58420
|
const caret0 = Math.max(0, e3.column - 1);
|
|
@@ -58682,6 +58751,9 @@ function computeFixes(text, errors, level = "safe") {
|
|
|
58682
58751
|
continue;
|
|
58683
58752
|
}
|
|
58684
58753
|
if (is("FL-QUOTE-UNCLOSED", e3)) {
|
|
58754
|
+
if (patchedLines.has(e3.line)) {
|
|
58755
|
+
continue;
|
|
58756
|
+
}
|
|
58685
58757
|
if (level === "all") {
|
|
58686
58758
|
const lineText = lineTextAt(text, e3.line);
|
|
58687
58759
|
const caret0 = Math.max(0, e3.column - 1);
|
|
@@ -58756,7 +58828,7 @@ function computeFixes(text, errors, level = "safe") {
|
|
|
58756
58828
|
newInner = ltrim + left + replacedMid + right + rtrim;
|
|
58757
58829
|
} else {
|
|
58758
58830
|
const replaced = inner.split(""").join("\0").split('"').join(""").split("\0").join(""");
|
|
58759
|
-
newInner =
|
|
58831
|
+
newInner = replaced;
|
|
58760
58832
|
}
|
|
58761
58833
|
edits.push({ start: { line: e3.line, column: contentStart + 1 }, end: { line: e3.line, column: closeIdx + 1 }, newText: newInner });
|
|
58762
58834
|
patchedLines.add(e3.line);
|
|
@@ -73305,7 +73377,7 @@ var init_ProbeAgent = __esm({
|
|
|
73305
73377
|
MAX_HISTORY_MESSAGES = 100;
|
|
73306
73378
|
SUPPORTED_IMAGE_EXTENSIONS = ["png", "jpg", "jpeg", "webp", "gif", "bmp", "svg"];
|
|
73307
73379
|
MAX_IMAGE_FILE_SIZE = 20 * 1024 * 1024;
|
|
73308
|
-
ProbeAgent = class {
|
|
73380
|
+
ProbeAgent = class _ProbeAgent {
|
|
73309
73381
|
/**
|
|
73310
73382
|
* Create a new ProbeAgent instance
|
|
73311
73383
|
* @param {Object} options - Configuration options
|
|
@@ -74187,12 +74259,24 @@ You are working with a repository located at: ${searchDirectory}
|
|
|
74187
74259
|
}))
|
|
74188
74260
|
];
|
|
74189
74261
|
}
|
|
74190
|
-
|
|
74191
|
-
|
|
74192
|
-
|
|
74193
|
-
|
|
74194
|
-
|
|
74195
|
-
|
|
74262
|
+
const hasSystemMessage = this.history.length > 0 && this.history[0].role === "system";
|
|
74263
|
+
let currentMessages;
|
|
74264
|
+
if (hasSystemMessage) {
|
|
74265
|
+
currentMessages = [
|
|
74266
|
+
...this.history,
|
|
74267
|
+
userMessage
|
|
74268
|
+
];
|
|
74269
|
+
if (this.debug) {
|
|
74270
|
+
console.log("[DEBUG] Reusing existing system message from history for cache efficiency");
|
|
74271
|
+
}
|
|
74272
|
+
} else {
|
|
74273
|
+
currentMessages = [
|
|
74274
|
+
{ role: "system", content: systemMessage },
|
|
74275
|
+
...this.history,
|
|
74276
|
+
// Include previous conversation history
|
|
74277
|
+
userMessage
|
|
74278
|
+
];
|
|
74279
|
+
}
|
|
74196
74280
|
let currentIteration = 0;
|
|
74197
74281
|
let completionAttempted = false;
|
|
74198
74282
|
let finalResult = "I was unable to complete your request due to reaching the maximum number of tool iterations.";
|
|
@@ -74987,6 +75071,116 @@ Convert your previous response content into actual JSON data that follows this s
|
|
|
74987
75071
|
console.log(`[DEBUG] Cleared conversation history and reset counters for session ${this.sessionId}`);
|
|
74988
75072
|
}
|
|
74989
75073
|
}
|
|
75074
|
+
/**
|
|
75075
|
+
* Clone this agent's session to create a new agent with shared conversation history
|
|
75076
|
+
* @param {Object} options - Clone options
|
|
75077
|
+
* @param {string} [options.sessionId] - Session ID for the cloned agent (defaults to new UUID)
|
|
75078
|
+
* @param {boolean} [options.stripInternalMessages=true] - Remove internal messages (schema reminders, mermaid fixes, etc.)
|
|
75079
|
+
* @param {boolean} [options.keepSystemMessage=true] - Keep the system message in cloned history
|
|
75080
|
+
* @param {boolean} [options.deepCopy=true] - Deep copy messages to prevent mutations
|
|
75081
|
+
* @param {Object} [options.overrides] - Override any ProbeAgent constructor options
|
|
75082
|
+
* @returns {ProbeAgent} New agent instance with cloned history
|
|
75083
|
+
*/
|
|
75084
|
+
clone(options = {}) {
|
|
75085
|
+
const {
|
|
75086
|
+
sessionId = (0, import_crypto5.randomUUID)(),
|
|
75087
|
+
stripInternalMessages = true,
|
|
75088
|
+
keepSystemMessage = true,
|
|
75089
|
+
deepCopy = true,
|
|
75090
|
+
overrides = {}
|
|
75091
|
+
} = options;
|
|
75092
|
+
let clonedHistory = deepCopy ? JSON.parse(JSON.stringify(this.history)) : [...this.history];
|
|
75093
|
+
if (stripInternalMessages) {
|
|
75094
|
+
clonedHistory = this._stripInternalMessages(clonedHistory, keepSystemMessage);
|
|
75095
|
+
}
|
|
75096
|
+
const clonedAgent = new _ProbeAgent({
|
|
75097
|
+
// Copy current agent's config
|
|
75098
|
+
customPrompt: this.customPrompt,
|
|
75099
|
+
promptType: this.promptType,
|
|
75100
|
+
allowEdit: this.allowEdit,
|
|
75101
|
+
path: this.allowedFolders[0],
|
|
75102
|
+
// Use first allowed folder as primary path
|
|
75103
|
+
allowedFolders: [...this.allowedFolders],
|
|
75104
|
+
provider: this.clientApiProvider,
|
|
75105
|
+
model: this.modelName,
|
|
75106
|
+
debug: this.debug,
|
|
75107
|
+
outline: this.outline,
|
|
75108
|
+
maxResponseTokens: this.maxResponseTokens,
|
|
75109
|
+
maxIterations: this.maxIterations,
|
|
75110
|
+
disableMermaidValidation: this.disableMermaidValidation,
|
|
75111
|
+
enableMcp: !!this.mcpBridge,
|
|
75112
|
+
mcpConfig: this.mcpConfig,
|
|
75113
|
+
enableBash: this.enableBash,
|
|
75114
|
+
bashConfig: this.bashConfig,
|
|
75115
|
+
storageAdapter: this.storageAdapter,
|
|
75116
|
+
// Override with any provided options
|
|
75117
|
+
sessionId,
|
|
75118
|
+
...overrides
|
|
75119
|
+
});
|
|
75120
|
+
clonedAgent.history = clonedHistory;
|
|
75121
|
+
if (this.debug) {
|
|
75122
|
+
console.log(`[DEBUG] Cloned session ${this.sessionId} -> ${sessionId}`);
|
|
75123
|
+
console.log(`[DEBUG] Cloned ${clonedHistory.length} messages (stripInternal: ${stripInternalMessages})`);
|
|
75124
|
+
}
|
|
75125
|
+
return clonedAgent;
|
|
75126
|
+
}
|
|
75127
|
+
/**
|
|
75128
|
+
* Internal method to strip internal/temporary messages from history
|
|
75129
|
+
* Removes: schema reminders, mermaid fix prompts, tool use reminders, etc.
|
|
75130
|
+
* Keeps: system message, user messages, assistant responses, tool results
|
|
75131
|
+
* @private
|
|
75132
|
+
*/
|
|
75133
|
+
_stripInternalMessages(history, keepSystemMessage = true) {
|
|
75134
|
+
const filtered = [];
|
|
75135
|
+
for (let i3 = 0; i3 < history.length; i3++) {
|
|
75136
|
+
const message = history[i3];
|
|
75137
|
+
if (message.role === "system") {
|
|
75138
|
+
if (keepSystemMessage) {
|
|
75139
|
+
filtered.push(message);
|
|
75140
|
+
} else if (this.debug) {
|
|
75141
|
+
console.log(`[DEBUG] Removing system message at index ${i3}`);
|
|
75142
|
+
}
|
|
75143
|
+
continue;
|
|
75144
|
+
}
|
|
75145
|
+
if (this._isInternalMessage(message, i3, history)) {
|
|
75146
|
+
if (this.debug) {
|
|
75147
|
+
console.log(`[DEBUG] Stripping internal message at index ${i3}: ${message.role}`);
|
|
75148
|
+
}
|
|
75149
|
+
continue;
|
|
75150
|
+
}
|
|
75151
|
+
filtered.push(message);
|
|
75152
|
+
}
|
|
75153
|
+
return filtered;
|
|
75154
|
+
}
|
|
75155
|
+
/**
|
|
75156
|
+
* Determine if a message is an internal/temporary message
|
|
75157
|
+
* @private
|
|
75158
|
+
*/
|
|
75159
|
+
_isInternalMessage(message, index, history) {
|
|
75160
|
+
if (message.role !== "user") {
|
|
75161
|
+
return false;
|
|
75162
|
+
}
|
|
75163
|
+
if (!message.content) {
|
|
75164
|
+
return false;
|
|
75165
|
+
}
|
|
75166
|
+
const content = typeof message.content === "string" ? message.content : JSON.stringify(message.content);
|
|
75167
|
+
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:")) {
|
|
75168
|
+
return true;
|
|
75169
|
+
}
|
|
75170
|
+
if (content.includes("Please use one of the available tools") && content.includes("or use attempt_completion") && content.includes("Remember: Use proper XML format")) {
|
|
75171
|
+
return true;
|
|
75172
|
+
}
|
|
75173
|
+
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:")) {
|
|
75174
|
+
return true;
|
|
75175
|
+
}
|
|
75176
|
+
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:")) {
|
|
75177
|
+
return true;
|
|
75178
|
+
}
|
|
75179
|
+
if (content.includes("When using <attempt_complete>") && content.includes("this must be the ONLY content in your response")) {
|
|
75180
|
+
return true;
|
|
75181
|
+
}
|
|
75182
|
+
return false;
|
|
75183
|
+
}
|
|
74990
75184
|
/**
|
|
74991
75185
|
* Clean up resources (including MCP connections)
|
|
74992
75186
|
*/
|