@probelabs/probe 0.6.0-rc126 → 0.6.0-rc128

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.
@@ -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, module2) {
14629
+ "node_modules/@aws-sdk/middleware-websocket/dist-cjs/index.js"(exports2) {
14630
14630
  "use strict";
14631
- var __defProp2 = Object.defineProperty;
14632
- var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
14633
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
14634
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
14635
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
14636
- var __export2 = (target, all) => {
14637
- for (var name14 in all)
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
- message: {
14673
- body: chunk,
14674
- headers: dateHeader
14675
- },
14676
- priorSignature
14648
+ const signedMessage = await messageSigner.sign({
14649
+ message: {
14650
+ body: chunk,
14651
+ headers: dateHeader
14677
14652
  },
14678
- {
14679
- signingDate: now
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: (0, import_util_hex_encoding.fromHex)(signedMessage.signature)
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
- }, "getEventSigningTransformStream");
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 import_eventstream_codec.EventStreamCodec(options.utf8Encoder, options.utf8Decoder);
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 = /* @__PURE__ */ __name((options) => new EventStreamPayloadHandler(options), "eventStreamPayloadHandlerProvider");
14742
- var injectSessionIdMiddleware = /* @__PURE__ */ __name(() => (next) => async (args) => {
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
- }, "injectSessionIdMiddleware");
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 import_protocol_http15 = require_dist_cjs2();
14760
- var websocketEndpointMiddleware = /* @__PURE__ */ __name((config, options) => (next) => (args) => {
14726
+ var websocketEndpointMiddleware = (config, options) => (next) => (args) => {
14761
14727
  const { request } = args;
14762
- if (import_protocol_http15.HttpRequest.isInstance(request) && config.requestHandler.metadata?.handlerProtocol?.toLowerCase().includes("websocket")) {
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
- }, "websocketEndpointMiddleware");
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 = /* @__PURE__ */ __name((config, options) => ({
14790
- applyToStack: /* @__PURE__ */ __name((clientStack) => {
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 (import_protocol_http15.HttpRequest.isInstance(toSign) && isWebSocketRequest(toSign)) {
14809
- const signedRequest = await this.signer.presign(
14810
- { ...toSign, body: "" },
14811
- {
14812
- ...options,
14813
- // presigned url must be expired within 1 min.
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 = /* @__PURE__ */ __name((input) => {
14786
+ var resolveWebSocketConfig = (input) => {
14831
14787
  const { signer } = input;
14832
14788
  return Object.assign(input, {
14833
- signer: /* @__PURE__ */ __name(async (authScheme) => {
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
- }, "signer")
14795
+ }
14840
14796
  });
14841
- }, "resolveWebSocketConfig");
14842
- var validateSigner = /* @__PURE__ */ __name((signer) => !!signer, "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 import_fetch_http_handler.FetchHttpHandler()) {
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 = (0, import_util_format_url.formatUrl)(request);
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 import_protocol_http15.HttpResponse({
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 = /* @__PURE__ */ __name(() => {
14956
- }, "reject");
14957
- let resolve4 = /* @__PURE__ */ __name(() => {
14958
- }, "resolve");
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) return;
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: /* @__PURE__ */ __name(() => {
14918
+ next: () => {
14986
14919
  return new Promise((_resolve, _reject) => {
14987
14920
  resolve4 = _resolve;
14988
14921
  reject2 = _reject;
14989
14922
  });
14990
- }, "next")
14923
+ }
14991
14924
  })
14992
14925
  };
14993
- const send = /* @__PURE__ */ __name(async () => {
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
- }, "send");
14936
+ };
15004
14937
  send();
15005
14938
  return outputStream;
15006
14939
  }
15007
14940
  };
15008
- var getIterator = /* @__PURE__ */ __name((stream2) => {
14941
+ var getIterator = (stream2) => {
15009
14942
  if (stream2[Symbol.asyncIterator]) {
15010
14943
  return stream2;
15011
14944
  }
15012
14945
  if (isReadableStream(stream2)) {
15013
- return (0, import_eventstream_serde_browser.readableStreamtoIterable)(stream2);
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
- }, "getIterator");
15021
- var toReadableStream = /* @__PURE__ */ __name((asyncIterable) => typeof ReadableStream === "function" ? (0, import_eventstream_serde_browser.iterableToReadableStream)(asyncIterable) : asyncIterable, "toReadableStream");
15022
- var isReadableStream = /* @__PURE__ */ __name((payload2) => typeof ReadableStream === "function" && payload2 instanceof ReadableStream, "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.907.0",
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.907.0",
16663
- "@aws-sdk/credential-provider-node": "3.907.0",
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.907.0",
16670
- "@aws-sdk/middleware-websocket": "3.901.0",
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.907.0",
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.907.0",
16613
+ "@aws-sdk/util-user-agent-node": "3.908.0",
16677
16614
  "@smithy/config-resolver": "^4.3.0",
16678
- "@smithy/core": "^3.14.0",
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.0",
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.0",
16687
- "@smithy/middleware-retry": "^4.4.0",
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.0",
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.2.0",
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.0",
16699
- "@smithy/util-defaults-mode-browser": "^4.2.0",
16700
- "@smithy/util-defaults-mode-node": "^4.2.0",
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.4.0",
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.907.0",
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.907.0",
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.907.0",
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.907.0",
17399
+ "@aws-sdk/util-user-agent-node": "3.908.0",
17463
17400
  "@smithy/config-resolver": "^4.3.0",
17464
- "@smithy/core": "^3.14.0",
17465
- "@smithy/fetch-http-handler": "^5.3.0",
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.0",
17470
- "@smithy/middleware-retry": "^4.4.0",
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.0",
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.2.0",
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.0",
17482
- "@smithy/util-defaults-mode-browser": "^4.2.0",
17483
- "@smithy/util-defaults-mode-node": "^4.2.0",
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.907.0",
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.907.0",
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.907.0",
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.907.0",
18864
+ "@aws-sdk/util-user-agent-node": "3.908.0",
18928
18865
  "@smithy/config-resolver": "^4.3.0",
18929
- "@smithy/core": "^3.14.0",
18930
- "@smithy/fetch-http-handler": "^5.3.0",
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.0",
18935
- "@smithy/middleware-retry": "^4.4.0",
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.0",
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.2.0",
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.0",
18947
- "@smithy/util-defaults-mode-browser": "^4.2.0",
18948
- "@smithy/util-defaults-mode-node": "^4.2.0",
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",
@@ -53754,7 +53691,6 @@ var init_parser2 = __esm({
53754
53691
  this.linkStyleStatement = this.RULE("linkStyleStatement", () => {
53755
53692
  this.CONSUME(LinkStyleKeyword);
53756
53693
  this.SUBRULE(this.linkStyleIndexList);
53757
- this.OPTION1(() => this.CONSUME1(Newline));
53758
53694
  this.SUBRULE(this.linkStylePairs);
53759
53695
  this.OPTION2(() => this.CONSUME2(Newline));
53760
53696
  });
@@ -54218,7 +54154,7 @@ var init_semantics = __esm({
54218
54154
  }
54219
54155
  const fnTok = ch.fn?.[0];
54220
54156
  if (!fnTok) {
54221
- this.ctx.errors.push({ line: modeTok2?.startLine ?? 1, column: modeTok2?.startColumn ?? 1, severity: "error", code: "FL-CLICK-CALL-NAME-MISSING", message: "'click \u2026 call' requires a function name.", hint: 'Example: click A call doThing() "Tooltip"' });
54157
+ this.ctx.errors.push({ line: modeTok2?.startLine ?? 1, column: modeTok2?.startColumn ?? 1, severity: "error", code: "FL-CLICK-CALL-NAME-MISSING", message: "'click \u2026 call' requires a function name.", hint: "Example: click A call doThing()" });
54222
54158
  }
54223
54159
  const tipTok = ch.tooltip?.[0];
54224
54160
  if (tipTok) {
@@ -54275,7 +54211,7 @@ var init_semantics = __esm({
54275
54211
  severity: "error",
54276
54212
  code: "FL-CLICK-CALL-NAME-MISSING",
54277
54213
  message: "'click \u2026 call' requires a function name.",
54278
- hint: 'Example: click A call doThing() "Tooltip"'
54214
+ hint: "Example: click A call doThing()"
54279
54215
  });
54280
54216
  }
54281
54217
  return;
@@ -54356,6 +54292,8 @@ var init_semantics = __esm({
54356
54292
  const linksHere = Array.isArray(ctx.link) ? ctx.link.length : 0;
54357
54293
  if (linksHere > 0)
54358
54294
  this.edgeCount += linksHere;
54295
+ if (ctx.link)
54296
+ ctx.link.forEach((ln) => this.visit(ln));
54359
54297
  }
54360
54298
  // Edge attribute object statements must target a known edge id
54361
54299
  // Edge attribute statements are parsed as nodeStatements with a typed attrObject and no links.
@@ -54415,7 +54353,7 @@ var init_semantics = __esm({
54415
54353
  severity: "error",
54416
54354
  code: "FL-TYPED-SHAPE-UNKNOWN",
54417
54355
  message: `Unknown shape '${v3}' in '@{ shape: \u2026 }'.`,
54418
- hint: "Use one of: rect, round, stadium, subroutine, circle, cylinder, diamond, trapezoid, parallelogram, hexagon, lean-l, lean-r, icon, image"
54356
+ hint: 'Use one of: rect, rounded, stadium, subroutine, circle, cylinder, diamond, trapezoid, parallelogram, hexagon, "lean-l", "lean-r", icon, image'
54419
54357
  });
54420
54358
  } else {
54421
54359
  const supportedByCli = /* @__PURE__ */ new Set(["rect", "round", "rounded", "diamond", "circle", "cylinder", "stadium", "subroutine", "lean-l", "lean-r"]);
@@ -54617,8 +54555,8 @@ var init_semantics = __esm({
54617
54555
  column: t3.startColumn ?? 1,
54618
54556
  severity: "error",
54619
54557
  code: "FL-LABEL-PARENS-UNQUOTED",
54620
- message: "Parentheses inside an unquoted label are not supported by Mermaid. Wrap the label in quotes.",
54621
- hint: 'Example: A["Calls func(arg)"]'
54558
+ message: "Parentheses inside an unquoted label are not supported by Mermaid.",
54559
+ hint: 'Wrap the label in quotes, e.g., A["Mark (X)"] \u2014 or replace ( and ) with HTML entities: ( and )'
54622
54560
  });
54623
54561
  }
54624
54562
  }
@@ -54666,6 +54604,29 @@ var init_semantics = __esm({
54666
54604
  }
54667
54605
  }
54668
54606
  }
54607
+ // Validate link specifics that Mermaid CLI enforces but our grammar may parse loosely
54608
+ link(ctx) {
54609
+ const inline = ctx.linkTextInline?.[0];
54610
+ if (inline) {
54611
+ const ch = inline.children || {};
54612
+ const parts = [].concat(ch.Identifier || []).concat(ch.Text || []).concat(ch.NumberLiteral || []).concat(ch.Pipe || []);
54613
+ if (parts.length) {
54614
+ const raw = parts.map((t3) => String(t3.image || "")).join("").trim();
54615
+ if (raw === "x" || raw === "o") {
54616
+ const p3 = parts[0];
54617
+ this.ctx.errors.push({
54618
+ line: p3.startLine ?? 1,
54619
+ column: p3.startColumn ?? 1,
54620
+ severity: "error",
54621
+ code: "FL-LINK-UNSUPPORTED-MARKER",
54622
+ message: `Unsupported one-sided link marker '${raw}'. Use symmetric '${raw}--${raw}' or a plain arrow with a label.`,
54623
+ hint: raw === "x" ? "Example: A x--x B (or) A --> B and label it: A --|Skipped|--> B" : "Example: A o--o B (or) A --> B",
54624
+ length: p3.image?.length ?? 1
54625
+ });
54626
+ }
54627
+ }
54628
+ }
54629
+ }
54669
54630
  checkBackticksInContent(contentNodes) {
54670
54631
  if (!contentNodes)
54671
54632
  return;
@@ -55017,6 +54978,31 @@ function mapFlowchartParserError(err, text) {
55017
54978
  }
55018
54979
  }
55019
54980
  }
54981
+ if (isInRule(err, "linkStylePairs") && tokType === "Newline") {
54982
+ const nextLine = Math.min(allLines.length, line + 1);
54983
+ const nxt = allLines[nextLine - 1] || "";
54984
+ const first2 = (nxt.match(/\S/) || { index: 0 }).index || 0;
54985
+ return {
54986
+ line: nextLine,
54987
+ column: Math.max(1, first2 + 1),
54988
+ severity: "error",
54989
+ code: "FL-LINKSTYLE-MULTILINE",
54990
+ message: "'linkStyle' styles must be on the same line as the indices.",
54991
+ hint: "Example: linkStyle 0,1 stroke:#f00,stroke-width:2px",
54992
+ length: 1
54993
+ };
54994
+ }
54995
+ if ((isInRule(err, "linkStyleIndexList") || isInRule(err, "linkStyleStatement")) && tokType === "Colon") {
54996
+ return {
54997
+ line,
54998
+ column,
54999
+ severity: "error",
55000
+ code: "FL-LINKSTYLE-RANGE-NOT-SUPPORTED",
55001
+ message: "Ranges in 'linkStyle' indices are not supported. Use comma-separated indices.",
55002
+ hint: "Example: linkStyle 0,1 stroke:#f00,stroke-width:2px",
55003
+ length: len
55004
+ };
55005
+ }
55020
55006
  if (tokType === "QuotedString") {
55021
55007
  const context = err?.context;
55022
55008
  const inLinkRule = context?.ruleStack?.includes("linkTextInline") || context?.ruleStack?.includes("link") || false;
@@ -55063,6 +55049,17 @@ function mapFlowchartParserError(err, text) {
55063
55049
  }
55064
55050
  if (isInRule(err, "nodeShape") && err.name === "MismatchedTokenException") {
55065
55051
  if (expecting(err, "SquareClose")) {
55052
+ if (tokType === "RoundOpen" || tokType === "RoundClose") {
55053
+ return {
55054
+ line,
55055
+ column,
55056
+ severity: "error",
55057
+ code: "FL-LABEL-PARENS-UNQUOTED",
55058
+ message: "Parentheses inside an unquoted label are not supported by Mermaid.",
55059
+ hint: 'Wrap the label in quotes, e.g., A["Mark (X)"] \u2014 or replace ( and ) with HTML entities: ( and ).',
55060
+ length: len
55061
+ };
55062
+ }
55066
55063
  if (tokType === "QuotedString") {
55067
55064
  return {
55068
55065
  line,
@@ -55558,6 +55555,32 @@ ${br.example}`,
55558
55555
  break;
55559
55556
  }
55560
55557
  }
55558
+ if (blk.label === "box" && openIdx !== -1) {
55559
+ let endIdx = -1;
55560
+ for (let i3 = openIdx + 1; i3 < lines2.length; i3++) {
55561
+ const raw = lines2[i3] || "";
55562
+ const ind = raw.match(/^(\s*)/)?.[1] || "";
55563
+ if (/^\s*end\s*$/.test(raw) && ind.length <= openIndent.length) {
55564
+ endIdx = i3;
55565
+ break;
55566
+ }
55567
+ }
55568
+ if (endIdx !== -1) {
55569
+ const body = lines2.slice(openIdx + 1, endIdx).map((s3) => (s3 || "").trim());
55570
+ const hasMsgWithActivation = body.some((s3) => /->/.test(s3) && /[+-]/.test(s3));
55571
+ if (hasMsgWithActivation) {
55572
+ return {
55573
+ line: openIdx + 1,
55574
+ column: 1,
55575
+ severity: "error",
55576
+ code: "SE-BOX-EMPTY",
55577
+ message: "Box block has no participant/actor declarations. Use 'rect' to group messages visually.",
55578
+ hint: "Replace 'box' with 'rect' if you want to group messages:\nrect rgb(240, 240, 255)\n A->>B: Message\n Note over A: Info\nend",
55579
+ length: 3
55580
+ };
55581
+ }
55582
+ }
55583
+ }
55561
55584
  let caretLine = line;
55562
55585
  if (openIdx !== -1) {
55563
55586
  caretLine = lines2.length;
@@ -56897,7 +56920,7 @@ var init_validate3 = __esm({
56897
56920
  function tokenize4(text) {
56898
56921
  return ClassLexer.tokenize(text);
56899
56922
  }
56900
- var Identifier3, NumberLiteral4, ClassDiagramKeyword, DirectionKw, Direction2, ClassKw, AsKw, NoteKw, ForKw, RelCompToAgg, RelAggToComp, RelCompBoth, RelAggBoth, LollipopLeft, LollipopRight, RelExtends, RelComposition, RelAggregation, RelDependency, RelRealization, RelAssociation, RelDependencyLeft, RelRealizationLeft, RelExtendsRight, InvalidRelArrow, LCurly, RCurly, LParen2, RParen2, Colon4, Comma3, Visibility, LTlt, GTgt, GenericAngle, QuotedString4, BacktickName, SquareOpen2, SquareClose2, Comment4, WhiteSpace4, Newline4, allTokens4, ClassLexer;
56923
+ var Identifier3, NumberLiteral4, ClassDiagramKeyword, DirectionKw, Direction2, TitleKw, NamespaceKw, ClassKw, InterfaceKw, AsKw, NoteKw, ForKw, RelCompToAgg, RelAggToComp, RelCompBoth, RelAggBoth, LollipopLeft, LollipopRight, RelExtends, RelComposition, RelAggregation, RelDependency, RelRealization, RelAssociation, RelDependencyLeft, RelRealizationLeft, RelExtendsRight, InvalidRelArrow, LCurly, RCurly, LParen2, RParen2, Colon4, Comma3, Visibility, LTlt, GTgt, GenericAngle, QuotedString4, BacktickName, SquareOpen2, SquareClose2, Comment4, WhiteSpace4, Newline4, allTokens4, ClassLexer;
56901
56924
  var init_lexer5 = __esm({
56902
56925
  "node_modules/@probelabs/maid/out/diagrams/class/lexer.js"() {
56903
56926
  init_api5();
@@ -56906,7 +56929,10 @@ var init_lexer5 = __esm({
56906
56929
  ClassDiagramKeyword = createToken({ name: "ClassDiagramKeyword", pattern: /classDiagram/, longer_alt: Identifier3 });
56907
56930
  DirectionKw = createToken({ name: "DirectionKw", pattern: /direction/, longer_alt: Identifier3 });
56908
56931
  Direction2 = createToken({ name: "Direction", pattern: /LR|RL|TB|BT|TD/, longer_alt: Identifier3 });
56932
+ TitleKw = createToken({ name: "TitleKw", pattern: /title/, longer_alt: Identifier3 });
56933
+ NamespaceKw = createToken({ name: "NamespaceKw", pattern: /namespace/, longer_alt: Identifier3 });
56909
56934
  ClassKw = createToken({ name: "ClassKw", pattern: /class/, longer_alt: Identifier3 });
56935
+ InterfaceKw = createToken({ name: "InterfaceKw", pattern: /interface\b/, longer_alt: Identifier3 });
56910
56936
  AsKw = createToken({ name: "AsKw", pattern: /as/, longer_alt: Identifier3 });
56911
56937
  NoteKw = createToken({ name: "NoteKw", pattern: /note/, longer_alt: Identifier3 });
56912
56938
  ForKw = createToken({ name: "ForKw", pattern: /for/, longer_alt: Identifier3 });
@@ -56949,6 +56975,9 @@ var init_lexer5 = __esm({
56949
56975
  // Keywords
56950
56976
  ClassDiagramKeyword,
56951
56977
  DirectionKw,
56978
+ TitleKw,
56979
+ NamespaceKw,
56980
+ InterfaceKw,
56952
56981
  ClassKw,
56953
56982
  AsKw,
56954
56983
  NoteKw,
@@ -57017,8 +57046,11 @@ var init_parser5 = __esm({
57017
57046
  });
57018
57047
  this.statement = this.RULE("statement", () => {
57019
57048
  this.OR([
57049
+ { ALT: () => this.SUBRULE(this.titleStmt) },
57020
57050
  { ALT: () => this.SUBRULE(this.directionStmt) },
57051
+ { ALT: () => this.SUBRULE(this.namespaceStmt) },
57021
57052
  { ALT: () => this.SUBRULE(this.classLine) },
57053
+ { ALT: () => this.SUBRULE(this.interfaceLine) },
57022
57054
  { ALT: () => this.SUBRULE(this.relationStmt) },
57023
57055
  { ALT: () => this.SUBRULE(this.noteStmt) },
57024
57056
  { ALT: () => this.SUBRULE(this.memberAssignStmt) },
@@ -57030,6 +57062,43 @@ var init_parser5 = __esm({
57030
57062
  this.CONSUME(Direction2);
57031
57063
  this.OPTION(() => this.CONSUME(Newline4));
57032
57064
  });
57065
+ this.titleStmt = this.RULE("titleStmt", () => {
57066
+ this.CONSUME(TitleKw);
57067
+ this.OR([
57068
+ { ALT: () => this.CONSUME(QuotedString4) },
57069
+ {
57070
+ ALT: () => {
57071
+ this.AT_LEAST_ONE(() => {
57072
+ this.OR2([
57073
+ { ALT: () => this.CONSUME(Identifier3) },
57074
+ { ALT: () => this.CONSUME(NumberLiteral4) }
57075
+ ]);
57076
+ });
57077
+ }
57078
+ }
57079
+ ]);
57080
+ this.OPTION(() => this.CONSUME(Newline4));
57081
+ });
57082
+ this.namespaceStmt = this.RULE("namespaceStmt", () => {
57083
+ this.CONSUME(NamespaceKw);
57084
+ this.OR([
57085
+ { ALT: () => this.CONSUME(QuotedString4) },
57086
+ { ALT: () => this.CONSUME(Identifier3) }
57087
+ ]);
57088
+ this.CONSUME(LCurly);
57089
+ this.MANY(() => {
57090
+ this.OR2([
57091
+ { ALT: () => this.CONSUME(Newline4) },
57092
+ { ALT: () => this.SUBRULE(this.classLine) },
57093
+ { ALT: () => this.SUBRULE(this.interfaceLine) },
57094
+ { ALT: () => this.SUBRULE(this.relationStmt) },
57095
+ { ALT: () => this.SUBRULE(this.noteStmt) },
57096
+ { ALT: () => this.SUBRULE(this.memberAssignStmt) }
57097
+ ]);
57098
+ });
57099
+ this.CONSUME(RCurly);
57100
+ this.OPTION(() => this.CONSUME2(Newline4));
57101
+ });
57033
57102
  this.classLine = this.RULE("classLine", () => {
57034
57103
  this.CONSUME(ClassKw);
57035
57104
  this.SUBRULE(this.classRef);
@@ -57068,6 +57137,44 @@ var init_parser5 = __esm({
57068
57137
  }
57069
57138
  ]);
57070
57139
  });
57140
+ this.interfaceLine = this.RULE("interfaceLine", () => {
57141
+ this.CONSUME(InterfaceKw);
57142
+ this.SUBRULE(this.classRef);
57143
+ this.OR([
57144
+ {
57145
+ ALT: () => {
57146
+ this.CONSUME(LCurly);
57147
+ this.MANY(() => {
57148
+ this.OR2([
57149
+ { ALT: () => this.CONSUME3(Newline4) },
57150
+ { ALT: () => this.SUBRULE(this.memberLineStmt) }
57151
+ ]);
57152
+ });
57153
+ this.CONSUME(RCurly);
57154
+ this.OPTION(() => this.CONSUME(Newline4));
57155
+ }
57156
+ },
57157
+ {
57158
+ ALT: () => {
57159
+ this.OPTION1(() => {
57160
+ this.CONSUME(SquareOpen2);
57161
+ this.CONSUME(QuotedString4);
57162
+ this.CONSUME(SquareClose2);
57163
+ });
57164
+ this.OPTION2(() => {
57165
+ this.CONSUME(LTlt);
57166
+ this.CONSUME2(Identifier3);
57167
+ this.CONSUME(GTgt);
57168
+ });
57169
+ this.OPTION3(() => {
57170
+ this.CONSUME(AsKw);
57171
+ this.CONSUME3(Identifier3);
57172
+ });
57173
+ this.OPTION4(() => this.CONSUME2(Newline4));
57174
+ }
57175
+ }
57176
+ ]);
57177
+ });
57071
57178
  this.memberAssignStmt = this.RULE("memberAssignStmt", () => {
57072
57179
  this.SUBRULE(this.classRef);
57073
57180
  this.CONSUME(Colon4);
@@ -57237,6 +57344,31 @@ function validateClass(text, _options = {}) {
57237
57344
  length: b3.image?.length ?? 1
57238
57345
  });
57239
57346
  }
57347
+ if (a3.tokenType === NamespaceKw && b3.tokenType === QuotedString4) {
57348
+ errs.push({
57349
+ line: b3.startLine ?? 1,
57350
+ column: b3.startColumn ?? 1,
57351
+ severity: "error",
57352
+ code: "CL-NAMESPACE-NAME-QUOTED",
57353
+ message: "Quoted namespace names are not supported by mermaid.js. Use an unquoted identifier.",
57354
+ hint: 'Change: namespace "ProbeAgent Core" { ... } \u2192 namespace ProbeAgentCore { ... }',
57355
+ length: b3.image?.length ?? 1
57356
+ });
57357
+ }
57358
+ if (a3.tokenType === InterfaceKw) {
57359
+ const prevToken = i3 > 0 ? tokList[i3 - 1] : null;
57360
+ if (!prevToken || prevToken.tokenType !== LTlt) {
57361
+ errs.push({
57362
+ line: a3.startLine ?? 1,
57363
+ column: a3.startColumn ?? 1,
57364
+ severity: "error",
57365
+ code: "CL-INTERFACE-KEYWORD-UNSUPPORTED",
57366
+ message: 'The "interface" keyword is not supported by mermaid.js. Use the <<interface>> annotation instead.',
57367
+ hint: 'Auto-fix converts to "class". Then manually add: <<interface>> ClassName after the class definition',
57368
+ length: a3.image?.length ?? 9
57369
+ });
57370
+ }
57371
+ }
57240
57372
  }
57241
57373
  for (const tk of tokList) {
57242
57374
  if (tk.tokenType === InvalidRelArrow) {
@@ -57293,10 +57425,13 @@ function validateClass(text, _options = {}) {
57293
57425
  const has2 = (code, line) => (prev || []).some((e3) => e3.code === code && e3.line === line && e3.severity === "error");
57294
57426
  const lines = src.split(/\r?\n/);
57295
57427
  const classDeclOpen = [];
57428
+ const namespaceDeclOpen = [];
57296
57429
  for (let i3 = 0; i3 < lines.length; i3++) {
57297
57430
  const raw = lines[i3] || "";
57298
57431
  if (/^\s*class\b.*\{\s*$/.test(raw))
57299
57432
  classDeclOpen.push(i3 + 1);
57433
+ if (/^\s*namespace\b.*\{\s*$/.test(raw))
57434
+ namespaceDeclOpen.push(i3 + 1);
57300
57435
  }
57301
57436
  if (classDeclOpen.length > 0) {
57302
57437
  const hasClose = lines.some((l3) => /\}/.test(l3));
@@ -57305,6 +57440,13 @@ function validateClass(text, _options = {}) {
57305
57440
  errors.push({ line: Math.max(1, lines.length), column: 1, severity: "error", code: "CL-BLOCK-MISSING-RBRACE", message: "Missing '}' to close class block.", hint: "Close the block: class Foo { ... }" });
57306
57441
  }
57307
57442
  }
57443
+ if (namespaceDeclOpen.length > 0) {
57444
+ const hasClose = lines.some((l3) => /\}/.test(l3));
57445
+ if (!hasClose && !has2("CL-NAMESPACE-MISSING-RBRACE", Math.max(1, lines.length))) {
57446
+ const last2 = namespaceDeclOpen[namespaceDeclOpen.length - 1];
57447
+ errors.push({ line: Math.max(1, lines.length), column: 1, severity: "error", code: "CL-NAMESPACE-MISSING-RBRACE", message: "Missing '}' to close namespace block.", hint: 'Close the block: namespace "Name" { ... }' });
57448
+ }
57449
+ }
57308
57450
  return errors;
57309
57451
  }
57310
57452
  });
@@ -57959,6 +58101,10 @@ function computeFixes(text, errors, level = "safe") {
57959
58101
  edits.push(replaceRange(text, at(e3), e3.length ?? 2, "-->"));
57960
58102
  continue;
57961
58103
  }
58104
+ if (is("FL-LINK-UNSUPPORTED-MARKER", e3)) {
58105
+ edits.push(replaceRange(text, at(e3), e3.length ?? 1, ""));
58106
+ continue;
58107
+ }
57962
58108
  if (is("FL-EDGE-LABEL-QUOTED", e3)) {
57963
58109
  const lineText = lineTextAt(text, e3.line);
57964
58110
  const col = Math.max(0, e3.column - 1);
@@ -58031,6 +58177,29 @@ function computeFixes(text, errors, level = "safe") {
58031
58177
  }
58032
58178
  continue;
58033
58179
  }
58180
+ if (is("CL-NAMESPACE-NAME-QUOTED", e3)) {
58181
+ const lineText = lineTextAt(text, e3.line);
58182
+ const nsIdx = lineText.indexOf("namespace");
58183
+ const startSearch = nsIdx >= 0 ? nsIdx + 9 : 0;
58184
+ const q1 = lineText.indexOf('"', startSearch);
58185
+ if (q1 !== -1) {
58186
+ const q22 = lineText.indexOf('"', q1 + 1);
58187
+ if (q22 > q1) {
58188
+ const namespaceName = lineText.slice(q1 + 1, q22);
58189
+ const validIdentifier = namespaceName.replace(/[^A-Za-z0-9_]/g, "");
58190
+ edits.push(replaceRange(text, { line: e3.line, column: q1 + 1 }, q22 - q1 + 1, validIdentifier));
58191
+ }
58192
+ }
58193
+ continue;
58194
+ }
58195
+ if (is("CL-INTERFACE-KEYWORD-UNSUPPORTED", e3)) {
58196
+ const lineText = lineTextAt(text, e3.line);
58197
+ const ifIdx = lineText.indexOf("interface");
58198
+ if (ifIdx !== -1) {
58199
+ edits.push(replaceRange(text, { line: e3.line, column: ifIdx + 1 }, 9, "class"));
58200
+ }
58201
+ continue;
58202
+ }
58034
58203
  if (is("FL-LABEL-ESCAPED-QUOTE", e3)) {
58035
58204
  const lineText = lineTextAt(text, e3.line);
58036
58205
  const caret0 = Math.max(0, e3.column - 1);
@@ -58178,6 +58347,42 @@ function computeFixes(text, errors, level = "safe") {
58178
58347
  const msg = e3.message || "";
58179
58348
  const lineText = lineTextAt(text, e3.line);
58180
58349
  const caret0 = Math.max(0, e3.column - 1);
58350
+ {
58351
+ const openIdx = lineText.indexOf("([");
58352
+ if (openIdx !== -1) {
58353
+ const badClose = lineText.indexOf("})", openIdx + 2);
58354
+ if (badClose !== -1) {
58355
+ edits.push({ start: { line: e3.line, column: badClose + 1 }, end: { line: e3.line, column: badClose + 2 }, newText: "]" });
58356
+ patchedLines.add(e3.line);
58357
+ continue;
58358
+ }
58359
+ }
58360
+ }
58361
+ {
58362
+ const openIdx = lineText.indexOf("[(");
58363
+ if (openIdx !== -1) {
58364
+ const closePair = lineText.indexOf("))", openIdx + 2);
58365
+ if (closePair !== -1) {
58366
+ edits.push({ start: { line: e3.line, column: closePair + 2 }, end: { line: e3.line, column: closePair + 3 }, newText: "]" });
58367
+ patchedLines.add(e3.line);
58368
+ continue;
58369
+ }
58370
+ }
58371
+ }
58372
+ {
58373
+ const openPair = lineText.indexOf("([");
58374
+ if (openPair !== -1) {
58375
+ const badClose = lineText.indexOf("})", openPair + 2);
58376
+ if (badClose !== -1) {
58377
+ edits.push({ start: { line: e3.line, column: badClose + 1 }, end: { line: e3.line, column: badClose + 2 }, newText: "]" });
58378
+ continue;
58379
+ }
58380
+ }
58381
+ }
58382
+ if (/\(\[/.test(lineText) && lineText.indexOf("})", Math.max(0, caret0 - 1)) !== -1) {
58383
+ edits.push(replaceRange(text, at(e3), e3.length ?? 1, "]"));
58384
+ continue;
58385
+ }
58181
58386
  if (msg.includes("opened '('") && msg.includes("closed with ']'")) {
58182
58387
  const openIdx = lineText.lastIndexOf("(", caret0);
58183
58388
  if (openIdx !== -1) {
@@ -58250,7 +58455,36 @@ function computeFixes(text, errors, level = "safe") {
58250
58455
  const caret0 = Math.max(0, e3.column - 1);
58251
58456
  const msg = e3.message || "";
58252
58457
  const bracketMatch = msg.match(/Unclosed '(.+?)'/);
58253
- const expectedOpener = bracketMatch ? bracketMatch[1] : null;
58458
+ const expectedOpener = bracketMatch ? (bracketMatch[1] || "").trim() : null;
58459
+ if (expectedOpener === "((") {
58460
+ if (level === "all") {
58461
+ const openIdx = lineText.lastIndexOf("((", caret0);
58462
+ if (openIdx !== -1) {
58463
+ const contentStart = openIdx + 2;
58464
+ const picks = [];
58465
+ const pushIdx2 = (i3) => {
58466
+ if (i3 >= 0)
58467
+ picks.push(i3);
58468
+ };
58469
+ pushIdx2(lineText.indexOf("-", contentStart));
58470
+ pushIdx2(lineText.indexOf("=", contentStart));
58471
+ pushIdx2(lineText.indexOf(".", contentStart));
58472
+ pushIdx2(lineText.indexOf("|", contentStart));
58473
+ let insertIdx = picks.length ? Math.min(...picks) : lineText.length;
58474
+ const before = lineText.slice(0, openIdx);
58475
+ const m3 = before.match(/([A-Za-z0-9_]+)\s*$/);
58476
+ const inferred = m3 ? m3[1] : "";
58477
+ if (inferred) {
58478
+ edits.push({ start: { line: e3.line, column: contentStart + 1 }, end: { line: e3.line, column: insertIdx + 1 }, newText: inferred + "))" });
58479
+ patchedLines.add(e3.line);
58480
+ continue;
58481
+ }
58482
+ patchedLines.add(e3.line);
58483
+ continue;
58484
+ }
58485
+ }
58486
+ continue;
58487
+ }
58254
58488
  const bracketMap = {
58255
58489
  "[": "]",
58256
58490
  "{": "}",
@@ -58336,6 +58570,14 @@ function computeFixes(text, errors, level = "safe") {
58336
58570
  patchedLines.add(e3.line);
58337
58571
  continue;
58338
58572
  }
58573
+ if (innerSeg.includes("(") || innerSeg.includes(")")) {
58574
+ const replaced = innerSeg.replace(/\(/g, "&#40;").replace(/\)/g, "&#41;");
58575
+ if (replaced !== innerSeg) {
58576
+ edits.push({ start: { line: e3.line, column: opened.idx + opened.len + 1 }, end: { line: e3.line, column: closerIdx + 1 }, newText: replaced });
58577
+ patchedLines.add(e3.line);
58578
+ continue;
58579
+ }
58580
+ }
58339
58581
  }
58340
58582
  }
58341
58583
  if (patchedLines.has(e3.line)) {
@@ -58344,9 +58586,35 @@ function computeFixes(text, errors, level = "safe") {
58344
58586
  let closer = "]";
58345
58587
  if (opened)
58346
58588
  closer = opened.close;
58347
- const avail = lineText.slice(caret0);
58348
- const replaceLen = Math.min(closer.length, Math.max(1, avail.length));
58349
- edits.push({ start: { line: e3.line, column: caret0 + 1 }, end: { line: e3.line, column: caret0 + 1 + replaceLen }, newText: closer });
58589
+ if (closer === "]") {
58590
+ const openIdxSq = lineText.lastIndexOf("[", caret0);
58591
+ if (openIdxSq !== -1) {
58592
+ const picks = [];
58593
+ const pushIdx2 = (i3) => {
58594
+ if (i3 >= 0)
58595
+ picks.push(i3);
58596
+ };
58597
+ pushIdx2(lineText.indexOf("-", openIdxSq + 1));
58598
+ pushIdx2(lineText.indexOf("=", openIdxSq + 1));
58599
+ pushIdx2(lineText.indexOf(".", openIdxSq + 1));
58600
+ pushIdx2(lineText.indexOf("|", openIdxSq + 1));
58601
+ let ins = picks.length ? Math.min(...picks) : lineText.length;
58602
+ let tl = ins - 1;
58603
+ while (tl >= 0 && /\s/.test(lineText[tl]))
58604
+ tl--;
58605
+ const startCol2 = tl + 1 + 1;
58606
+ const endCol2 = ins + 1;
58607
+ edits.push({ start: { line: e3.line, column: startCol2 }, end: { line: e3.line, column: endCol2 }, newText: closer });
58608
+ } else {
58609
+ const avail = lineText.slice(caret0);
58610
+ const replaceLen = Math.min(closer.length, Math.max(1, avail.length));
58611
+ edits.push({ start: { line: e3.line, column: caret0 + 1 }, end: { line: e3.line, column: caret0 + 1 + replaceLen }, newText: closer });
58612
+ }
58613
+ } else {
58614
+ const avail = lineText.slice(caret0);
58615
+ const replaceLen = Math.min(closer.length, Math.max(1, avail.length));
58616
+ edits.push({ start: { line: e3.line, column: caret0 + 1 }, end: { line: e3.line, column: caret0 + 1 + replaceLen }, newText: closer });
58617
+ }
58350
58618
  }
58351
58619
  continue;
58352
58620
  }
@@ -58478,9 +58746,11 @@ function computeFixes(text, errors, level = "safe") {
58478
58746
  if (core.length >= 2 && isSlashPair(left, right)) {
58479
58747
  break;
58480
58748
  }
58481
- const newInner = '"' + inner + '"';
58482
- edits.push({ start: { line: e3.line, column: contentStart + 1 }, end: { line: e3.line, column: closeIdx + 1 }, newText: newInner });
58483
- patchedLines.add(e3.line);
58749
+ const replaced = inner.replace(/\(/g, "&#40;").replace(/\)/g, "&#41;");
58750
+ if (replaced !== inner) {
58751
+ edits.push({ start: { line: e3.line, column: contentStart + 1 }, end: { line: e3.line, column: closeIdx + 1 }, newText: replaced });
58752
+ patchedLines.add(e3.line);
58753
+ }
58484
58754
  break;
58485
58755
  }
58486
58756
  searchStart = openIdx + 1;
@@ -58637,14 +58907,33 @@ function computeFixes(text, errors, level = "safe") {
58637
58907
  continue;
58638
58908
  }
58639
58909
  if (is("SE-BOX-EMPTY", e3)) {
58640
- const lines = text.split(/\r?\n/);
58641
- const boxIdx = Math.max(0, e3.line - 1);
58642
- const boxLine = lines[boxIdx] || "";
58643
- const labelMatch = /^\s*box\s+(.+)$/.exec(boxLine);
58644
- if (labelMatch) {
58645
- const indent = boxLine.match(/^\s*/)?.[0] || "";
58646
- const newLine = `${indent}rect rgb(240, 240, 255)`;
58647
- edits.push({ start: { line: e3.line, column: 1 }, end: { line: e3.line, column: boxLine.length + 1 }, newText: newLine });
58910
+ if (level === "all") {
58911
+ const lines = text.split(/\r?\n/);
58912
+ const boxIdx = Math.max(0, e3.line - 1);
58913
+ const boxLine = lines[boxIdx] || "";
58914
+ const openIndent = (boxLine.match(/^(\s*)/)?.[1] || "").length;
58915
+ let endIdx = -1;
58916
+ for (let i3 = boxIdx + 1; i3 < lines.length; i3++) {
58917
+ const raw = lines[i3] || "";
58918
+ const ind = (raw.match(/^(\s*)/)?.[1] || "").length;
58919
+ if (/^\s*end\s*$/.test(raw) && ind <= openIndent) {
58920
+ endIdx = i3;
58921
+ break;
58922
+ }
58923
+ }
58924
+ let hasMsgWithAct = false;
58925
+ if (endIdx !== -1) {
58926
+ const body = lines.slice(boxIdx + 1, endIdx).map((s3) => (s3 || "").trim());
58927
+ hasMsgWithAct = body.some((s3) => /->/.test(s3) && /[+-]/.test(s3));
58928
+ }
58929
+ if (!hasMsgWithAct) {
58930
+ const labelMatch = /^\s*box\s+(.+)$/.exec(boxLine);
58931
+ if (labelMatch) {
58932
+ const indent = boxLine.match(/^\s*/)?.[0] || "";
58933
+ const newLine = `${indent}rect rgb(240, 240, 255)`;
58934
+ edits.push({ start: { line: e3.line, column: 1 }, end: { line: e3.line, column: boxLine.length + 1 }, newText: newLine });
58935
+ }
58936
+ }
58648
58937
  }
58649
58938
  continue;
58650
58939
  }
@@ -58920,6 +59209,41 @@ ${indent}${tail}` });
58920
59209
  }
58921
59210
  }
58922
59211
  edits.push(insertAt(text, { line: insIdx + 1, column: 1 }, `${openIndent}}
59212
+ `));
59213
+ continue;
59214
+ }
59215
+ if (is("CL-NAMESPACE-MISSING-RBRACE", e3)) {
59216
+ const lines = text.split(/\r?\n/);
59217
+ const curIdx = Math.max(0, e3.line - 1);
59218
+ const openerRe = /^(\s*)namespace\b.*\{\s*$/;
59219
+ let openIdx = -1;
59220
+ let openIndent = "";
59221
+ for (let i3 = curIdx; i3 >= 0; i3--) {
59222
+ const m3 = openerRe.exec(lines[i3] || "");
59223
+ if (m3) {
59224
+ openIdx = i3;
59225
+ openIndent = m3[1] || "";
59226
+ break;
59227
+ }
59228
+ }
59229
+ if (openIdx === -1) {
59230
+ const indent = inferIndentFromLine(lines[curIdx] || "");
59231
+ edits.push(insertAt(text, { line: curIdx + 1, column: 1 }, `${indent}}
59232
+ `));
59233
+ continue;
59234
+ }
59235
+ let insIdx = lines.length;
59236
+ for (let i3 = openIdx + 1; i3 < lines.length; i3++) {
59237
+ const raw = lines[i3] || "";
59238
+ if (raw.trim() === "")
59239
+ continue;
59240
+ const ind = inferIndentFromLine(raw);
59241
+ if (ind.length <= openIndent.length) {
59242
+ insIdx = i3;
59243
+ break;
59244
+ }
59245
+ }
59246
+ edits.push(insertAt(text, { line: insIdx + 1, column: 1 }, `${openIndent}}
58923
59247
  `));
58924
59248
  continue;
58925
59249
  }