@kyo-so/cli 0.16.7 → 0.16.9

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/dist/index.js CHANGED
@@ -184182,7 +184182,7 @@ var defaultConfig = {
184182
184182
  enabled: true,
184183
184183
  type: "acp",
184184
184184
  command: "npx",
184185
- args: ["-y", "@agentclientprotocol/codex-acp@1.1.14"],
184185
+ args: ["-y", "@agentclientprotocol/codex-acp@1.4.0"],
184186
184186
  role: "implementation_reviewer",
184187
184187
  timeoutMs: DEFAULT_AGENT_TIMEOUT_MS,
184188
184188
  allowProjectProvider: [],
@@ -184207,7 +184207,7 @@ var defaultConfig = {
184207
184207
  enabled: true,
184208
184208
  type: "acp",
184209
184209
  command: "npx",
184210
- args: ["-y", "@agentclientprotocol/claude-agent-acp@0.66.0"],
184210
+ args: ["-y", "@agentclientprotocol/claude-agent-acp@0.69.0"],
184211
184211
  role: "architecture_security_reviewer",
184212
184212
  timeoutMs: DEFAULT_AGENT_TIMEOUT_MS,
184213
184213
  env: {
@@ -184746,6 +184746,89 @@ ${codeblock}`, options);
184746
184746
  }
184747
184747
  }
184748
184748
 
184749
+ // node_modules/smol-toml/dist/util.js
184750
+ /*!
184751
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
184752
+ * SPDX-License-Identifier: BSD-3-Clause
184753
+ *
184754
+ * Redistribution and use in source and binary forms, with or without
184755
+ * modification, are permitted provided that the following conditions are met:
184756
+ *
184757
+ * 1. Redistributions of source code must retain the above copyright notice, this
184758
+ * list of conditions and the following disclaimer.
184759
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
184760
+ * this list of conditions and the following disclaimer in the
184761
+ * documentation and/or other materials provided with the distribution.
184762
+ * 3. Neither the name of the copyright holder nor the names of its contributors
184763
+ * may be used to endorse or promote products derived from this software without
184764
+ * specific prior written permission.
184765
+ *
184766
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
184767
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
184768
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
184769
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
184770
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
184771
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
184772
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
184773
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
184774
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
184775
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
184776
+ */
184777
+ function indexOfNewline(str, start = 0) {
184778
+ let idx = str.indexOf(`
184779
+ `, start);
184780
+ if (str.charCodeAt(idx - 1) === 13)
184781
+ idx--;
184782
+ return idx;
184783
+ }
184784
+ function skipComment(ctx) {
184785
+ for (;ctx.p < ctx.s.length; ctx.p++) {
184786
+ let c = ctx.s.charCodeAt(ctx.p);
184787
+ if (c === 10)
184788
+ break;
184789
+ if (c === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10) {
184790
+ ctx.p++;
184791
+ break;
184792
+ }
184793
+ if (c < 32 && c !== 9 || c === 127) {
184794
+ throw new TomlError("control characters are not allowed in comments", {
184795
+ toml: ctx.s,
184796
+ ptr: ctx.p
184797
+ });
184798
+ }
184799
+ }
184800
+ }
184801
+ function skipVoid(ctx, banNewLines, banComments) {
184802
+ let c;
184803
+ while (true) {
184804
+ while ((c = ctx.s.charCodeAt(ctx.p)) === 32 || c === 9 || !banNewLines && (c === 10 || c === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10))
184805
+ ctx.p++;
184806
+ if (banComments || c !== 35)
184807
+ break;
184808
+ skipComment(ctx);
184809
+ }
184810
+ }
184811
+ function skipUntil(ctx, sep, end) {
184812
+ let ptr = ctx.p;
184813
+ if (!end) {
184814
+ ptr = indexOfNewline(ctx.s, ptr);
184815
+ ctx.p = ptr < 0 ? ctx.s.length : ptr;
184816
+ return;
184817
+ }
184818
+ for (;ctx.p < ctx.s.length; ctx.p++) {
184819
+ let c = ctx.s.charCodeAt(ctx.p);
184820
+ if (c === 35) {
184821
+ skipComment(ctx);
184822
+ } else if (c === end || c === sep) {
184823
+ return;
184824
+ }
184825
+ }
184826
+ throw new TomlError("cannot find end of structure", {
184827
+ toml: ctx.s,
184828
+ ptr
184829
+ });
184830
+ }
184831
+
184749
184832
  // node_modules/smol-toml/dist/primitive.js
184750
184833
  /*!
184751
184834
  * Copyright (c) Squirrel Chat et al., All rights reserved.
@@ -184777,109 +184860,117 @@ ${codeblock}`, options);
184777
184860
  var INT_REGEX = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/;
184778
184861
  var FLOAT_REGEX = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/;
184779
184862
  var LEADING_ZERO = /^[+-]?0[0-9_]/;
184780
- function parseString(str, ptr) {
184781
- let c = str[ptr++];
184863
+ function parseString(ctx) {
184864
+ let start = ctx.p;
184865
+ let c = ctx.s.charCodeAt(ctx.p++);
184782
184866
  let first = c;
184783
- let isLiteral = c === "'";
184784
- let isMultiline = c === str[ptr] && c === str[ptr + 1];
184867
+ let isLiteral = c === 39;
184868
+ let isMultiline = c === ctx.s.charCodeAt(ctx.p) && c === ctx.s.charCodeAt(ctx.p + 1);
184785
184869
  if (isMultiline) {
184786
- if (str[ptr += 2] === `
184787
- `)
184788
- ptr++;
184789
- else if (str[ptr] === "\r" && str[ptr + 1] === `
184790
- `)
184791
- ptr += 2;
184870
+ if ((c = ctx.s.charCodeAt(ctx.p += 2)) === 10)
184871
+ ctx.p++;
184872
+ else if (c === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10)
184873
+ ctx.p += 2;
184792
184874
  }
184793
184875
  let parsed = "";
184794
- let sliceStart = ptr;
184876
+ let sliceStart = ctx.p;
184795
184877
  let state = 0;
184796
- for (let i = ptr;i < str.length; i++) {
184797
- c = str[i];
184798
- if (isMultiline && (c === `
184799
- ` || c === "\r" && str[i + 1] === `
184800
- `)) {
184878
+ for (;ctx.p < ctx.s.length; ctx.p++) {
184879
+ c = ctx.s.charCodeAt(ctx.p);
184880
+ if (isMultiline && (c === 10 || c === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10)) {
184801
184881
  state = state && 3;
184802
- } else if (c < " " && c !== "\t" || c === "") {
184882
+ } else if (c < 32 && c !== 9 || c === 127) {
184803
184883
  throw new TomlError("control characters are not allowed in strings", {
184804
- toml: str,
184805
- ptr: i
184884
+ toml: ctx.s,
184885
+ ptr: ctx.p
184806
184886
  });
184807
- } else if ((!state || state === 3) && c === first && (!isMultiline || str[i + 1] === first && str[i + 2] === first)) {
184887
+ } else if ((!state || state === 3) && c === first && (!isMultiline || ctx.s.charCodeAt(ctx.p + 1) === first && ctx.s.charCodeAt(ctx.p + 2) === first)) {
184808
184888
  if (isMultiline) {
184809
- if (str[i + 3] === first)
184810
- i++;
184811
- if (str[i + 3] === first)
184812
- i++;
184813
- }
184814
- return [
184815
- state ? parsed : parsed + str.slice(sliceStart, i),
184816
- i + (isMultiline ? 3 : 1)
184817
- ];
184889
+ if (ctx.s.charCodeAt(ctx.p + 3) === first)
184890
+ ctx.p++;
184891
+ if (ctx.s.charCodeAt(ctx.p + 3) === first)
184892
+ ctx.p++;
184893
+ }
184894
+ if (!state)
184895
+ parsed += ctx.s.slice(sliceStart, ctx.p);
184896
+ ctx.p += isMultiline ? 3 : 1;
184897
+ return parsed;
184818
184898
  } else if (!state) {
184819
- if (!isLiteral && c === "\\") {
184820
- parsed += str.slice(sliceStart, sliceStart = i);
184899
+ if (!isLiteral && c === 92) {
184900
+ parsed += ctx.s.slice(sliceStart, sliceStart = ctx.p);
184821
184901
  state = 1;
184822
184902
  }
184823
184903
  } else if (state === 1) {
184824
- if (c === "x" || c === "u" || c === "U") {
184904
+ if (c === 120 || c === 117 || c === 85) {
184825
184905
  let value = 0;
184826
- let len = c === "x" ? 2 : c === "u" ? 4 : 8;
184827
- for (let j = 0;j < len; j++, i++) {
184828
- let hex3 = str.charCodeAt(i + 1);
184906
+ let len = c === 120 ? 2 : c === 117 ? 4 : 8;
184907
+ for (let j = 0;j < len; j++, ctx.p++) {
184908
+ let hex3 = ctx.s.charCodeAt(ctx.p + 1);
184829
184909
  let digit = hex3 >= 48 && hex3 <= 57 ? hex3 - 48 : hex3 >= 65 && hex3 <= 70 ? hex3 - 65 + 10 : hex3 >= 97 && hex3 <= 102 ? hex3 - 97 + 10 : -1;
184830
184910
  if (digit < 0)
184831
- throw new TomlError("invalid non-hex character in unicode escape", { toml: str, ptr: i + 1 });
184911
+ throw new TomlError("invalid non-hex character in unicode escape", { toml: ctx.s, ptr: ctx.p + 1 });
184832
184912
  value = value << 4 | digit;
184833
184913
  }
184834
184914
  if (value < 0 || value > 1114111 || value >= 55296 && value <= 57343) {
184835
- throw new TomlError("invalid unicode escape", { toml: str, ptr: i });
184915
+ throw new TomlError("invalid unicode escape", { toml: ctx.s, ptr: ctx.p });
184836
184916
  }
184837
184917
  parsed += String.fromCodePoint(value);
184838
- sliceStart = i + 1;
184918
+ sliceStart = ctx.p + 1;
184839
184919
  state = 0;
184840
- } else if (c === " " || c === "\t") {
184920
+ } else if (c === 32 || c === 9) {
184841
184921
  state = 2;
184842
184922
  } else {
184843
- if (c === "b")
184923
+ if (c === 98)
184844
184924
  parsed += "\b";
184845
- else if (c === "t")
184925
+ else if (c === 116)
184846
184926
  parsed += "\t";
184847
- else if (c === "n")
184927
+ else if (c === 110)
184848
184928
  parsed += `
184849
184929
  `;
184850
- else if (c === "f")
184930
+ else if (c === 102)
184851
184931
  parsed += "\f";
184852
- else if (c === "r")
184932
+ else if (c === 114)
184853
184933
  parsed += "\r";
184854
- else if (c === "e")
184934
+ else if (c === 101)
184855
184935
  parsed += "\x1B";
184856
- else if (c === '"')
184936
+ else if (c === 34)
184857
184937
  parsed += '"';
184858
- else if (c === "\\")
184938
+ else if (c === 92)
184859
184939
  parsed += "\\";
184860
184940
  else
184861
- throw new TomlError("unrecognized escape sequence", { toml: str, ptr: i });
184862
- sliceStart = i + 1;
184941
+ throw new TomlError("unrecognized escape sequence", { toml: ctx.s, ptr: ctx.p });
184942
+ sliceStart = ctx.p + 1;
184863
184943
  state = 0;
184864
184944
  }
184865
- } else if (c !== " " && c !== "\t") {
184945
+ } else if (c !== 32 && c !== 9) {
184866
184946
  if (state === 2) {
184867
184947
  throw new TomlError("invalid escape: only line-ending whitespace may be escaped", {
184868
- toml: str,
184948
+ toml: ctx.s,
184869
184949
  ptr: sliceStart
184870
184950
  });
184871
184951
  }
184872
- state = !isLiteral && c === "\\" ? 1 : 0;
184873
- sliceStart = i;
184952
+ state = !isLiteral && c === 92 ? 1 : 0;
184953
+ sliceStart = ctx.p;
184874
184954
  }
184875
184955
  }
184876
- throw new TomlError("unfinished string", { toml: str, ptr });
184956
+ throw new TomlError("unfinished string", { toml: ctx.s, ptr: start });
184877
184957
  }
184878
- function parseValue(value, toml, ptr, integersAsBigInt) {
184879
- if (value === "true")
184880
- return true;
184881
- if (value === "false")
184882
- return false;
184958
+ function sliceAndTrimEndOf(ctx, start, end) {
184959
+ let value = ctx.s.slice(start, end);
184960
+ let commentIdx = value.indexOf("#");
184961
+ if (commentIdx > 0) {
184962
+ skipComment({ s: value, p: commentIdx, d: 0 });
184963
+ value = value.slice(0, commentIdx);
184964
+ }
184965
+ return value.trimEnd();
184966
+ }
184967
+ function parseValue(ctx, integersAsBigInt, end) {
184968
+ let ptr = ctx.p;
184969
+ let err = { toml: ctx.s, ptr };
184970
+ skipUntil(ctx, 44, end);
184971
+ let value = sliceAndTrimEndOf(ctx, ptr, ctx.p);
184972
+ if (!value)
184973
+ throw new TomlError("incomplete declaration: value expected", err);
184883
184974
  if (value === "-inf")
184884
184975
  return -Infinity;
184885
184976
  if (value === "inf" || value === "+inf")
@@ -184891,25 +184982,16 @@ function parseValue(value, toml, ptr, integersAsBigInt) {
184891
184982
  let isInt = INT_REGEX.test(value);
184892
184983
  if (isInt || FLOAT_REGEX.test(value)) {
184893
184984
  if (LEADING_ZERO.test(value)) {
184894
- throw new TomlError("leading zeroes are not allowed", {
184895
- toml,
184896
- ptr
184897
- });
184985
+ throw new TomlError("leading zeroes are not allowed", err);
184898
184986
  }
184899
184987
  value = value.replace(/_/g, "");
184900
184988
  let numeric = +value;
184901
184989
  if (isNaN(numeric)) {
184902
- throw new TomlError("invalid number", {
184903
- toml,
184904
- ptr
184905
- });
184990
+ throw new TomlError("invalid number", err);
184906
184991
  }
184907
184992
  if (isInt) {
184908
184993
  if ((isInt = !Number.isSafeInteger(numeric)) && !integersAsBigInt) {
184909
- throw new TomlError("integer value cannot be represented losslessly", {
184910
- toml,
184911
- ptr
184912
- });
184994
+ throw new TomlError("integer value cannot be represented losslessly", err);
184913
184995
  }
184914
184996
  if (isInt || integersAsBigInt === true)
184915
184997
  numeric = BigInt(value);
@@ -184917,16 +184999,12 @@ function parseValue(value, toml, ptr, integersAsBigInt) {
184917
184999
  return numeric;
184918
185000
  }
184919
185001
  const date5 = new TomlDate(value);
184920
- if (!date5.isValid()) {
184921
- throw new TomlError("invalid value", {
184922
- toml,
184923
- ptr
184924
- });
184925
- }
185002
+ if (!date5.isValid())
185003
+ throw new TomlError("invalid value", err);
184926
185004
  return date5;
184927
185005
  }
184928
185006
 
184929
- // node_modules/smol-toml/dist/util.js
185007
+ // node_modules/smol-toml/dist/extract.js
184930
185008
  /*!
184931
185009
  * Copyright (c) Squirrel Chat et al., All rights reserved.
184932
185010
  * SPDX-License-Identifier: BSD-3-Clause
@@ -184954,162 +185032,36 @@ function parseValue(value, toml, ptr, integersAsBigInt) {
184954
185032
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
184955
185033
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
184956
185034
  */
184957
- function indexOfNewline(str, start = 0, end = str.length) {
184958
- let idx = str.indexOf(`
184959
- `, start);
184960
- if (str[idx - 1] === "\r")
184961
- idx--;
184962
- return idx <= end ? idx : -1;
184963
- }
184964
- function skipComment(str, ptr) {
184965
- for (let i = ptr;i < str.length; i++) {
184966
- let c = str[i];
184967
- if (c === `
184968
- `)
184969
- return i;
184970
- if (c === "\r" && str[i + 1] === `
184971
- `)
184972
- return i + 1;
184973
- if (c < " " && c !== "\t" || c === "") {
184974
- throw new TomlError("control characters are not allowed in comments", {
184975
- toml: str,
185035
+ function extractValue(ctx, end, integersAsBigInt) {
185036
+ let ptr = ctx.p;
185037
+ let c = ctx.s.charCodeAt(ptr);
185038
+ if (c === 91 || c === 123) {
185039
+ if (!ctx.d--) {
185040
+ throw new TomlError("document contains excessively nested structures. aborting.", {
185041
+ toml: ctx.s,
184976
185042
  ptr
184977
185043
  });
184978
185044
  }
185045
+ let value = c === 91 ? parseArray(ctx, integersAsBigInt) : parseInlineTable(ctx, integersAsBigInt);
185046
+ ctx.d++;
185047
+ return value;
184979
185048
  }
184980
- return str.length;
184981
- }
184982
- function skipVoid(str, ptr, banNewLines, banComments) {
184983
- let c;
184984
- while (true) {
184985
- while ((c = str[ptr]) === " " || c === "\t" || !banNewLines && (c === `
184986
- ` || c === "\r" && str[ptr + 1] === `
184987
- `))
184988
- ptr++;
184989
- if (banComments || c !== "#")
184990
- break;
184991
- ptr = skipComment(str, ptr);
184992
- }
184993
- return ptr;
184994
- }
184995
- function skipUntil(str, ptr, sep, end, banNewLines = false) {
184996
- if (!end) {
184997
- ptr = indexOfNewline(str, ptr);
184998
- return ptr < 0 ? str.length : ptr;
184999
- }
185000
- for (let i = ptr;i < str.length; i++) {
185001
- let c = str[i];
185002
- if (c === "#") {
185003
- i = indexOfNewline(str, i);
185004
- if (i < 0)
185005
- break;
185006
- } else if (c === sep) {
185007
- return i + 1;
185008
- } else if (c === end || banNewLines && (c === `
185009
- ` || c === "\r" && str[i + 1] === `
185010
- `)) {
185011
- return i;
185012
- }
185013
- }
185014
- throw new TomlError("cannot find end of structure", {
185015
- toml: str,
185016
- ptr
185017
- });
185018
- }
185019
-
185020
- // node_modules/smol-toml/dist/extract.js
185021
- /*!
185022
- * Copyright (c) Squirrel Chat et al., All rights reserved.
185023
- * SPDX-License-Identifier: BSD-3-Clause
185024
- *
185025
- * Redistribution and use in source and binary forms, with or without
185026
- * modification, are permitted provided that the following conditions are met:
185027
- *
185028
- * 1. Redistributions of source code must retain the above copyright notice, this
185029
- * list of conditions and the following disclaimer.
185030
- * 2. Redistributions in binary form must reproduce the above copyright notice,
185031
- * this list of conditions and the following disclaimer in the
185032
- * documentation and/or other materials provided with the distribution.
185033
- * 3. Neither the name of the copyright holder nor the names of its contributors
185034
- * may be used to endorse or promote products derived from this software without
185035
- * specific prior written permission.
185036
- *
185037
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
185038
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
185039
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
185040
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
185041
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
185042
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
185043
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
185044
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
185045
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
185046
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
185047
- */
185048
- function sliceAndTrimEndOf(str, startPtr, endPtr) {
185049
- let value = str.slice(startPtr, endPtr);
185050
- let commentIdx = value.indexOf("#");
185051
- if (commentIdx > -1) {
185052
- skipComment(str, commentIdx);
185053
- value = value.slice(0, commentIdx);
185054
- }
185055
- return [value.trimEnd(), commentIdx];
185056
- }
185057
- function extractValue(str, ptr, end, depth, integersAsBigInt) {
185058
- if (depth === 0) {
185059
- throw new TomlError("document contains excessively nested structures. aborting.", {
185060
- toml: str,
185061
- ptr
185062
- });
185063
- }
185064
- let c = str[ptr];
185065
- if (c === "[" || c === "{") {
185066
- let [value, endPtr2] = c === "[" ? parseArray(str, ptr, depth, integersAsBigInt) : parseInlineTable(str, ptr, depth, integersAsBigInt);
185067
- if (end) {
185068
- endPtr2 = skipVoid(str, endPtr2);
185069
- if (str[endPtr2] === ",")
185070
- endPtr2++;
185071
- else if (str[endPtr2] !== end) {
185072
- throw new TomlError("expected comma or end of structure", {
185073
- toml: str,
185074
- ptr: endPtr2
185075
- });
185076
- }
185077
- }
185078
- return [value, endPtr2];
185049
+ if (c === 34 || c === 39) {
185050
+ return parseString(ctx);
185079
185051
  }
185080
- if (c === '"' || c === "'") {
185081
- let [parsed, endPtr2] = parseString(str, ptr);
185082
- if (end) {
185083
- endPtr2 = skipVoid(str, endPtr2);
185084
- if (str[endPtr2] && str[endPtr2] !== "," && str[endPtr2] !== end && str[endPtr2] !== `
185085
- ` && str[endPtr2] !== "\r") {
185086
- throw new TomlError("unexpected character encountered", {
185087
- toml: str,
185088
- ptr: endPtr2
185089
- });
185090
- }
185091
- if (str[endPtr2] === ",")
185092
- endPtr2++;
185093
- }
185094
- return [parsed, endPtr2];
185095
- }
185096
- let endPtr = skipUntil(str, ptr, ",", end);
185097
- let slice = sliceAndTrimEndOf(str, ptr, endPtr - (str[endPtr - 1] === "," ? 1 : 0));
185098
- if (!slice[0]) {
185099
- throw new TomlError("incomplete key-value declaration: no value specified", {
185100
- toml: str,
185101
- ptr
185102
- });
185052
+ if (c === 116) {
185053
+ if (ctx.s.charCodeAt(++ctx.p) !== 114 || ctx.s.charCodeAt(++ctx.p) !== 117 || ctx.s.charCodeAt(++ctx.p) !== 101)
185054
+ throw new TomlError("invalid value", { toml: ctx.s, ptr });
185055
+ ctx.p++;
185056
+ return true;
185103
185057
  }
185104
- if (end && slice[1] > -1) {
185105
- endPtr = skipVoid(str, ptr + slice[1]);
185106
- if (str[endPtr] === ",")
185107
- endPtr++;
185058
+ if (c === 102) {
185059
+ if (ctx.s.charCodeAt(++ctx.p) !== 97 || ctx.s.charCodeAt(++ctx.p) !== 108 || ctx.s.charCodeAt(++ctx.p) !== 115 || ctx.s.charCodeAt(++ctx.p) !== 101)
185060
+ throw new TomlError("invalid value", { toml: ctx.s, ptr });
185061
+ ctx.p++;
185062
+ return false;
185108
185063
  }
185109
- return [
185110
- parseValue(slice[0], str, ptr, integersAsBigInt),
185111
- endPtr
185112
- ];
185064
+ return parseValue(ctx, integersAsBigInt, end);
185113
185065
  }
185114
185066
 
185115
185067
  // node_modules/smol-toml/dist/struct.js
@@ -185141,146 +185093,144 @@ function extractValue(str, ptr, end, depth, integersAsBigInt) {
185141
185093
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
185142
185094
  */
185143
185095
  var KEY_PART_RE = /^[a-zA-Z0-9-_]+[ \t]*$/;
185144
- function parseKey(str, ptr, end = "=") {
185145
- let dot = ptr - 1;
185096
+ function parseKey(ctx, end = "=") {
185097
+ let start = ctx.p;
185098
+ let dot = start - 1;
185146
185099
  let parsed = [];
185147
- let endPtr = str.indexOf(end, ptr);
185100
+ let endPtr = ctx.s.indexOf(end, start);
185148
185101
  if (endPtr < 0) {
185149
185102
  throw new TomlError("incomplete key-value: cannot find end of key", {
185150
- toml: str,
185151
- ptr
185103
+ toml: ctx.s,
185104
+ ptr: start
185152
185105
  });
185153
185106
  }
185154
185107
  do {
185155
- let c = str[ptr = ++dot];
185156
- if (c !== " " && c !== "\t") {
185157
- if (c === '"' || c === "'") {
185158
- if (c === str[ptr + 1] && c === str[ptr + 2]) {
185108
+ let c = ctx.s.charCodeAt(ctx.p = ++dot);
185109
+ if (c !== 32 && c !== 9) {
185110
+ if (c === 34 || c === 39) {
185111
+ if (c === ctx.s.charCodeAt(ctx.p + 1) && c === ctx.s.charCodeAt(ctx.p + 2)) {
185159
185112
  throw new TomlError("multiline strings are not allowed in keys", {
185160
- toml: str,
185161
- ptr
185113
+ toml: ctx.s,
185114
+ ptr: ctx.p
185162
185115
  });
185163
185116
  }
185164
- let [part, eos] = parseString(str, ptr);
185165
- dot = str.indexOf(".", eos);
185166
- let strEnd = str.slice(eos, dot < 0 || dot > endPtr ? endPtr : dot);
185117
+ let part = parseString(ctx);
185118
+ dot = ctx.s.indexOf(".", ctx.p);
185119
+ let strEnd = ctx.s.slice(ctx.p, dot < 0 || dot > endPtr ? endPtr : dot);
185167
185120
  let newLine = indexOfNewline(strEnd);
185168
185121
  if (newLine > -1) {
185169
185122
  throw new TomlError("newlines are not allowed in keys", {
185170
- toml: str,
185171
- ptr: ptr + dot + newLine
185123
+ toml: ctx.s,
185124
+ ptr: newLine
185172
185125
  });
185173
185126
  }
185174
185127
  if (strEnd.trimStart()) {
185175
185128
  throw new TomlError("found extra tokens after the string part", {
185176
- toml: str,
185177
- ptr: eos
185129
+ toml: ctx.s,
185130
+ ptr: ctx.p
185178
185131
  });
185179
185132
  }
185180
- if (endPtr < eos) {
185181
- endPtr = str.indexOf(end, eos);
185133
+ if (endPtr < ctx.p) {
185134
+ endPtr = ctx.s.indexOf(end, ctx.p);
185182
185135
  if (endPtr < 0) {
185183
185136
  throw new TomlError("incomplete key-value: cannot find end of key", {
185184
- toml: str,
185185
- ptr
185137
+ toml: ctx.s,
185138
+ ptr: start
185186
185139
  });
185187
185140
  }
185188
185141
  }
185189
185142
  parsed.push(part);
185190
185143
  } else {
185191
- dot = str.indexOf(".", ptr);
185192
- let part = str.slice(ptr, dot < 0 || dot > endPtr ? endPtr : dot);
185144
+ dot = ctx.s.indexOf(".", ctx.p);
185145
+ let part = ctx.s.slice(ctx.p, dot < 0 || dot > endPtr ? endPtr : dot);
185193
185146
  if (!KEY_PART_RE.test(part)) {
185194
185147
  throw new TomlError("only letter, numbers, dashes and underscores are allowed in keys", {
185195
- toml: str,
185196
- ptr
185148
+ toml: ctx.s,
185149
+ ptr: ctx.p
185197
185150
  });
185198
185151
  }
185199
185152
  parsed.push(part.trimEnd());
185200
185153
  }
185201
185154
  }
185202
185155
  } while (dot + 1 && dot < endPtr);
185203
- return [parsed, skipVoid(str, endPtr + 1, true, true)];
185156
+ ctx.p = endPtr + 1;
185157
+ skipVoid(ctx, true, true);
185158
+ return parsed;
185204
185159
  }
185205
- function parseInlineTable(str, ptr, depth, integersAsBigInt) {
185160
+ function parseInlineTable(ctx, integersAsBigInt) {
185206
185161
  let res = {};
185207
185162
  let seen = new Set;
185208
185163
  let c;
185209
- ptr++;
185210
- while ((c = str[ptr++]) !== "}" && c) {
185211
- if (c === ",") {
185212
- throw new TomlError("expected value, found comma", {
185213
- toml: str,
185214
- ptr: ptr - 1
185215
- });
185216
- } else if (c === "#")
185217
- ptr = skipComment(str, ptr);
185218
- else if (c !== " " && c !== "\t" && c !== `
185219
- ` && c !== "\r") {
185220
- let k;
185221
- let t = res;
185222
- let hasOwn = false;
185223
- let [key, keyEndPtr] = parseKey(str, ptr - 1);
185224
- for (let i = 0;i < key.length; i++) {
185225
- if (i)
185226
- t = hasOwn ? t[k] : t[k] = {};
185227
- k = key[i];
185228
- if ((hasOwn = Object.hasOwn(t, k)) && (typeof t[k] !== "object" || seen.has(t[k]))) {
185229
- throw new TomlError("trying to redefine an already defined value", {
185230
- toml: str,
185231
- ptr
185232
- });
185233
- }
185234
- if (!hasOwn && k === "__proto__") {
185235
- Object.defineProperty(t, k, { enumerable: true, configurable: true, writable: true });
185236
- }
185237
- }
185238
- if (hasOwn) {
185164
+ ctx.p++;
185165
+ while (ctx.p < ctx.s.length) {
185166
+ skipVoid(ctx);
185167
+ if ((c = ctx.s.charCodeAt(ctx.p)) === 125) {
185168
+ ctx.p++;
185169
+ return res;
185170
+ }
185171
+ let k;
185172
+ let t = res;
185173
+ let hasOwn = false;
185174
+ let p = ctx.p;
185175
+ let key = parseKey(ctx);
185176
+ for (let i = 0;i < key.length; i++) {
185177
+ if (i)
185178
+ t = hasOwn ? t[k] : t[k] = {};
185179
+ k = key[i];
185180
+ if ((hasOwn = Object.hasOwn(t, k)) && (typeof t[k] !== "object" || seen.has(t[k]))) {
185239
185181
  throw new TomlError("trying to redefine an already defined value", {
185240
- toml: str,
185241
- ptr
185182
+ toml: ctx.s,
185183
+ ptr: p
185242
185184
  });
185243
185185
  }
185244
- let [value, valueEndPtr] = extractValue(str, keyEndPtr, "}", depth - 1, integersAsBigInt);
185245
- seen.add(value);
185246
- t[k] = value;
185247
- ptr = valueEndPtr;
185186
+ if (!hasOwn && k === "__proto__") {
185187
+ Object.defineProperty(t, k, { enumerable: true, configurable: true, writable: true });
185188
+ }
185189
+ }
185190
+ if (hasOwn) {
185191
+ throw new TomlError("trying to redefine an already defined value", {
185192
+ toml: ctx.s,
185193
+ ptr: ctx.p
185194
+ });
185195
+ }
185196
+ let value = extractValue(ctx, 125, integersAsBigInt);
185197
+ seen.add(t[k] = value);
185198
+ skipVoid(ctx);
185199
+ if ((c = ctx.s.charCodeAt(ctx.p++)) === 125) {
185200
+ return res;
185201
+ }
185202
+ if (c !== 44) {
185203
+ throw new TomlError("expected comma or end of structure", { toml: ctx.s, ptr: ctx.p - 1 });
185248
185204
  }
185249
185205
  }
185250
- if (!c) {
185251
- throw new TomlError("unfinished table encountered", {
185252
- toml: str,
185253
- ptr
185254
- });
185255
- }
185256
- return [res, ptr];
185206
+ throw new TomlError("unfinished table encountered", {
185207
+ toml: ctx.s,
185208
+ ptr: ctx.p
185209
+ });
185257
185210
  }
185258
- function parseArray(str, ptr, depth, integersAsBigInt) {
185211
+ function parseArray(ctx, integersAsBigInt) {
185259
185212
  let res = [];
185260
185213
  let c;
185261
- ptr++;
185262
- while ((c = str[ptr++]) !== "]" && c) {
185263
- if (c === ",") {
185264
- throw new TomlError("expected value, found comma", {
185265
- toml: str,
185266
- ptr: ptr - 1
185267
- });
185268
- } else if (c === "#")
185269
- ptr = skipComment(str, ptr);
185270
- else if (c !== " " && c !== "\t" && c !== `
185271
- ` && c !== "\r") {
185272
- let e = extractValue(str, ptr - 1, "]", depth - 1, integersAsBigInt);
185273
- res.push(e[0]);
185274
- ptr = e[1];
185275
- }
185276
- }
185277
- if (!c) {
185278
- throw new TomlError("unfinished array encountered", {
185279
- toml: str,
185280
- ptr
185281
- });
185214
+ ctx.p++;
185215
+ while (ctx.p < ctx.s.length) {
185216
+ skipVoid(ctx);
185217
+ if ((c = ctx.s.charCodeAt(ctx.p)) === 93) {
185218
+ ctx.p++;
185219
+ return res;
185220
+ }
185221
+ res.push(extractValue(ctx, 93, integersAsBigInt));
185222
+ skipVoid(ctx);
185223
+ if ((c = ctx.s.charCodeAt(ctx.p++)) === 93) {
185224
+ return res;
185225
+ }
185226
+ if (c !== 44) {
185227
+ throw new TomlError("expected comma or end of structure", { toml: ctx.s, ptr: ctx.p - 1 });
185228
+ }
185282
185229
  }
185283
- return [res, ptr];
185230
+ throw new TomlError("unfinished array encountered", {
185231
+ toml: ctx.s,
185232
+ ptr: ctx.p
185233
+ });
185284
185234
  }
185285
185235
 
185286
185236
  // node_modules/smol-toml/dist/parse.js
@@ -185371,55 +185321,56 @@ function peekTable(key, table, meta3, type) {
185371
185321
  return [k, t, state.c];
185372
185322
  }
185373
185323
  function parse5(toml, { maxDepth = 1000, integersAsBigInt } = {}) {
185324
+ let ctx = { s: toml, p: 0, d: maxDepth };
185374
185325
  let res = {};
185375
185326
  let meta3 = {};
185327
+ let tmp;
185376
185328
  let tbl = res;
185377
185329
  let m = meta3;
185378
- for (let ptr = skipVoid(toml, 0);ptr < toml.length; ) {
185379
- if (toml[ptr] === "[") {
185380
- let isTableArray = toml[++ptr] === "[";
185381
- let k = parseKey(toml, ptr += +isTableArray, "]");
185330
+ skipVoid(ctx);
185331
+ while (ctx.p < toml.length) {
185332
+ if (toml.charCodeAt(ctx.p) === 91) {
185333
+ let isTableArray = toml.charCodeAt(++ctx.p) === 91;
185334
+ tmp = ctx.p += +isTableArray;
185335
+ let k = parseKey(ctx, "]");
185382
185336
  if (isTableArray) {
185383
- if (toml[k[1] - 1] !== "]") {
185337
+ if (toml.charCodeAt(ctx.p - 1) !== 93) {
185384
185338
  throw new TomlError("expected end of table declaration", {
185385
185339
  toml,
185386
- ptr: k[1] - 1
185340
+ ptr: ctx.p - 1
185387
185341
  });
185388
185342
  }
185389
- k[1]++;
185343
+ ctx.p++;
185390
185344
  }
185391
- let p = peekTable(k[0], res, meta3, isTableArray ? 2 : 1);
185345
+ let p = peekTable(k, res, meta3, isTableArray ? 2 : 1);
185392
185346
  if (!p) {
185393
185347
  throw new TomlError("trying to redefine an already defined table or value", {
185394
185348
  toml,
185395
- ptr
185349
+ ptr: tmp
185396
185350
  });
185397
185351
  }
185398
185352
  m = p[2];
185399
185353
  tbl = p[1];
185400
- ptr = k[1];
185401
185354
  } else {
185402
- let k = parseKey(toml, ptr);
185403
- let p = peekTable(k[0], tbl, m, 0);
185355
+ tmp = ctx.p;
185356
+ let k = parseKey(ctx);
185357
+ let p = peekTable(k, tbl, m, 0);
185404
185358
  if (!p) {
185405
185359
  throw new TomlError("trying to redefine an already defined table or value", {
185406
185360
  toml,
185407
- ptr
185361
+ ptr: tmp
185408
185362
  });
185409
185363
  }
185410
- let v = extractValue(toml, k[1], undefined, maxDepth, integersAsBigInt);
185411
- p[1][p[0]] = v[0];
185412
- ptr = v[1];
185364
+ p[1][p[0]] = extractValue(ctx, undefined, integersAsBigInt);
185413
185365
  }
185414
- ptr = skipVoid(toml, ptr, true);
185415
- if (toml[ptr] && toml[ptr] !== `
185416
- ` && toml[ptr] !== "\r") {
185366
+ skipVoid(ctx, true);
185367
+ if (ctx.p < toml.length && (tmp = toml.charCodeAt(ctx.p)) !== 10 && tmp !== 13) {
185417
185368
  throw new TomlError("each key-value declaration must be followed by an end-of-line", {
185418
185369
  toml,
185419
- ptr
185370
+ ptr: ctx.p
185420
185371
  });
185421
185372
  }
185422
- ptr = skipVoid(toml, ptr);
185373
+ skipVoid(ctx);
185423
185374
  }
185424
185375
  return res;
185425
185376
  }