lalph 0.3.98 → 0.3.99

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/cli.mjs CHANGED
@@ -42571,7 +42571,7 @@ var require_toml = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
42571
42571
  } };
42572
42572
  }));
42573
42573
  //#endregion
42574
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/identity.js
42574
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/identity.js
42575
42575
  var require_identity = /* @__PURE__ */ __commonJSMin$1(((exports) => {
42576
42576
  const ALIAS = Symbol.for("yaml.alias");
42577
42577
  const DOC = Symbol.for("yaml.document");
@@ -42621,7 +42621,7 @@ var require_identity = /* @__PURE__ */ __commonJSMin$1(((exports) => {
42621
42621
  exports.isSeq = isSeq;
42622
42622
  }));
42623
42623
  //#endregion
42624
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/visit.js
42624
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/visit.js
42625
42625
  var require_visit = /* @__PURE__ */ __commonJSMin$1(((exports) => {
42626
42626
  var identity = require_identity();
42627
42627
  const BREAK = Symbol("break visit");
@@ -42811,7 +42811,7 @@ var require_visit = /* @__PURE__ */ __commonJSMin$1(((exports) => {
42811
42811
  exports.visitAsync = visitAsync;
42812
42812
  }));
42813
42813
  //#endregion
42814
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/doc/directives.js
42814
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/directives.js
42815
42815
  var require_directives = /* @__PURE__ */ __commonJSMin$1(((exports) => {
42816
42816
  var identity = require_identity();
42817
42817
  var visit = require_visit();
@@ -42976,7 +42976,7 @@ var require_directives = /* @__PURE__ */ __commonJSMin$1(((exports) => {
42976
42976
  exports.Directives = Directives;
42977
42977
  }));
42978
42978
  //#endregion
42979
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/doc/anchors.js
42979
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/anchors.js
42980
42980
  var require_anchors = /* @__PURE__ */ __commonJSMin$1(((exports) => {
42981
42981
  var identity = require_identity();
42982
42982
  var visit = require_visit();
@@ -43038,7 +43038,7 @@ var require_anchors = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43038
43038
  exports.findNewAnchor = findNewAnchor;
43039
43039
  }));
43040
43040
  //#endregion
43041
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/doc/applyReviver.js
43041
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/applyReviver.js
43042
43042
  var require_applyReviver = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43043
43043
  /**
43044
43044
  * Applies the JSON.parse reviver algorithm as defined in the ECMA-262 spec,
@@ -43078,7 +43078,7 @@ var require_applyReviver = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43078
43078
  exports.applyReviver = applyReviver;
43079
43079
  }));
43080
43080
  //#endregion
43081
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/toJS.js
43081
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/toJS.js
43082
43082
  var require_toJS = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43083
43083
  var identity = require_identity();
43084
43084
  /**
@@ -43115,7 +43115,7 @@ var require_toJS = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43115
43115
  exports.toJS = toJS;
43116
43116
  }));
43117
43117
  //#endregion
43118
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/Node.js
43118
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Node.js
43119
43119
  var require_Node$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43120
43120
  var applyReviver = require_applyReviver();
43121
43121
  var identity = require_identity();
@@ -43149,7 +43149,7 @@ var require_Node$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43149
43149
  exports.NodeBase = NodeBase;
43150
43150
  }));
43151
43151
  //#endregion
43152
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/Alias.js
43152
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Alias.js
43153
43153
  var require_Alias = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43154
43154
  var anchors = require_anchors();
43155
43155
  var visit = require_visit();
@@ -43242,7 +43242,7 @@ var require_Alias = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43242
43242
  exports.Alias = Alias;
43243
43243
  }));
43244
43244
  //#endregion
43245
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/Scalar.js
43245
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Scalar.js
43246
43246
  var require_Scalar = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43247
43247
  var identity = require_identity();
43248
43248
  var Node = require_Node$1();
@@ -43269,7 +43269,7 @@ var require_Scalar = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43269
43269
  exports.isScalarValue = isScalarValue;
43270
43270
  }));
43271
43271
  //#endregion
43272
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/doc/createNode.js
43272
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/createNode.js
43273
43273
  var require_createNode = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43274
43274
  var Alias = require_Alias();
43275
43275
  var identity = require_identity();
@@ -43332,7 +43332,7 @@ var require_createNode = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43332
43332
  exports.createNode = createNode;
43333
43333
  }));
43334
43334
  //#endregion
43335
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/Collection.js
43335
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Collection.js
43336
43336
  var require_Collection = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43337
43337
  var createNode = require_createNode();
43338
43338
  var identity = require_identity();
@@ -43453,7 +43453,7 @@ var require_Collection = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43453
43453
  exports.isEmptyPath = isEmptyPath;
43454
43454
  }));
43455
43455
  //#endregion
43456
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyComment.js
43456
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyComment.js
43457
43457
  var require_stringifyComment = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43458
43458
  /**
43459
43459
  * Stringifies a comment.
@@ -43473,7 +43473,7 @@ var require_stringifyComment = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43473
43473
  exports.stringifyComment = stringifyComment;
43474
43474
  }));
43475
43475
  //#endregion
43476
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/foldFlowLines.js
43476
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/foldFlowLines.js
43477
43477
  var require_foldFlowLines = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43478
43478
  const FOLD_FLOW = "flow";
43479
43479
  const FOLD_BLOCK = "block";
@@ -43589,7 +43589,7 @@ var require_foldFlowLines = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43589
43589
  exports.foldFlowLines = foldFlowLines;
43590
43590
  }));
43591
43591
  //#endregion
43592
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyString.js
43592
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyString.js
43593
43593
  var require_stringifyString = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43594
43594
  var Scalar = require_Scalar();
43595
43595
  var foldFlowLines = require_foldFlowLines();
@@ -43813,7 +43813,7 @@ var require_stringifyString = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43813
43813
  exports.stringifyString = stringifyString;
43814
43814
  }));
43815
43815
  //#endregion
43816
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringify.js
43816
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringify.js
43817
43817
  var require_stringify = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43818
43818
  var anchors = require_anchors();
43819
43819
  var identity = require_identity();
@@ -43836,6 +43836,7 @@ var require_stringify = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43836
43836
  nullStr: "null",
43837
43837
  simpleKeys: false,
43838
43838
  singleQuote: null,
43839
+ trailingComma: false,
43839
43840
  trueStr: "true",
43840
43841
  verifyAliasOrder: true
43841
43842
  }, doc.schema.toStringOptions, options);
@@ -43920,7 +43921,7 @@ var require_stringify = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43920
43921
  exports.stringify = stringify;
43921
43922
  }));
43922
43923
  //#endregion
43923
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyPair.js
43924
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyPair.js
43924
43925
  var require_stringifyPair = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43925
43926
  var identity = require_identity();
43926
43927
  var Scalar = require_Scalar();
@@ -44017,7 +44018,7 @@ var require_stringifyPair = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44017
44018
  exports.stringifyPair = stringifyPair;
44018
44019
  }));
44019
44020
  //#endregion
44020
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/log.js
44021
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/log.js
44021
44022
  var require_log = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44022
44023
  var node_process$2 = __require("process");
44023
44024
  function debug(logLevel, ...messages) {
@@ -44031,7 +44032,7 @@ var require_log = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44031
44032
  exports.warn = warn;
44032
44033
  }));
44033
44034
  //#endregion
44034
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/merge.js
44035
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/merge.js
44035
44036
  var require_merge = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44036
44037
  var identity = require_identity();
44037
44038
  var Scalar = require_Scalar();
@@ -44071,7 +44072,7 @@ var require_merge = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44071
44072
  exports.merge = merge;
44072
44073
  }));
44073
44074
  //#endregion
44074
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/addPairToJSMap.js
44075
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/addPairToJSMap.js
44075
44076
  var require_addPairToJSMap = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44076
44077
  var log = require_log();
44077
44078
  var merge = require_merge();
@@ -44122,7 +44123,7 @@ var require_addPairToJSMap = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44122
44123
  exports.addPairToJSMap = addPairToJSMap;
44123
44124
  }));
44124
44125
  //#endregion
44125
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/Pair.js
44126
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Pair.js
44126
44127
  var require_Pair = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44127
44128
  var createNode = require_createNode();
44128
44129
  var stringifyPair = require_stringifyPair();
@@ -44155,7 +44156,7 @@ var require_Pair = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44155
44156
  exports.createPair = createPair;
44156
44157
  }));
44157
44158
  //#endregion
44158
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyCollection.js
44159
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyCollection.js
44159
44160
  var require_stringifyCollection = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44160
44161
  var identity = require_identity();
44161
44162
  var stringify = require_stringify();
@@ -44239,9 +44240,13 @@ var require_stringifyCollection = /* @__PURE__ */ __commonJSMin$1(((exports) =>
44239
44240
  }
44240
44241
  if (comment) reqNewline = true;
44241
44242
  let str = stringify.stringify(item, itemCtx, () => comment = null);
44243
+ reqNewline || (reqNewline = lines.length > linesAtValue || str.includes("\n"));
44242
44244
  if (i < items.length - 1) str += ",";
44245
+ else if (ctx.options.trailingComma) {
44246
+ if (ctx.options.lineWidth > 0) reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (str.length + 2) > ctx.options.lineWidth);
44247
+ if (reqNewline) str += ",";
44248
+ }
44243
44249
  if (comment) str += stringifyComment.lineComment(str, itemIndent, commentString(comment));
44244
- if (!reqNewline && (lines.length > linesAtValue || str.includes("\n"))) reqNewline = true;
44245
44250
  lines.push(str);
44246
44251
  linesAtValue = lines.length;
44247
44252
  }
@@ -44269,7 +44274,7 @@ var require_stringifyCollection = /* @__PURE__ */ __commonJSMin$1(((exports) =>
44269
44274
  exports.stringifyCollection = stringifyCollection;
44270
44275
  }));
44271
44276
  //#endregion
44272
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/YAMLMap.js
44277
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLMap.js
44273
44278
  var require_YAMLMap = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44274
44279
  var stringifyCollection = require_stringifyCollection();
44275
44280
  var addPairToJSMap = require_addPairToJSMap();
@@ -44378,7 +44383,7 @@ var require_YAMLMap = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44378
44383
  exports.findPair = findPair;
44379
44384
  }));
44380
44385
  //#endregion
44381
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/common/map.js
44386
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/map.js
44382
44387
  var require_map = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44383
44388
  var identity = require_identity();
44384
44389
  var YAMLMap = require_YAMLMap();
@@ -44395,7 +44400,7 @@ var require_map = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44395
44400
  };
44396
44401
  }));
44397
44402
  //#endregion
44398
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/YAMLSeq.js
44403
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLSeq.js
44399
44404
  var require_YAMLSeq = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44400
44405
  var createNode = require_createNode();
44401
44406
  var stringifyCollection = require_stringifyCollection();
@@ -44501,7 +44506,7 @@ var require_YAMLSeq = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44501
44506
  exports.YAMLSeq = YAMLSeq;
44502
44507
  }));
44503
44508
  //#endregion
44504
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/common/seq.js
44509
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/seq.js
44505
44510
  var require_seq = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44506
44511
  var identity = require_identity();
44507
44512
  var YAMLSeq = require_YAMLSeq();
@@ -44518,7 +44523,7 @@ var require_seq = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44518
44523
  };
44519
44524
  }));
44520
44525
  //#endregion
44521
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/common/string.js
44526
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/string.js
44522
44527
  var require_string = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44523
44528
  var stringifyString = require_stringifyString();
44524
44529
  exports.string = {
@@ -44533,7 +44538,7 @@ var require_string = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44533
44538
  };
44534
44539
  }));
44535
44540
  //#endregion
44536
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/common/null.js
44541
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/null.js
44537
44542
  var require_null = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44538
44543
  var Scalar = require_Scalar();
44539
44544
  const nullTag = {
@@ -44548,7 +44553,7 @@ var require_null = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44548
44553
  exports.nullTag = nullTag;
44549
44554
  }));
44550
44555
  //#endregion
44551
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/core/bool.js
44556
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/bool.js
44552
44557
  var require_bool$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44553
44558
  var Scalar = require_Scalar();
44554
44559
  const boolTag = {
@@ -44567,7 +44572,7 @@ var require_bool$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44567
44572
  exports.boolTag = boolTag;
44568
44573
  }));
44569
44574
  //#endregion
44570
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyNumber.js
44575
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyNumber.js
44571
44576
  var require_stringifyNumber = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44572
44577
  function stringifyNumber({ format, minFractionDigits, tag, value }) {
44573
44578
  if (typeof value === "bigint") return String(value);
@@ -44588,7 +44593,7 @@ var require_stringifyNumber = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44588
44593
  exports.stringifyNumber = stringifyNumber;
44589
44594
  }));
44590
44595
  //#endregion
44591
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/core/float.js
44596
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/float.js
44592
44597
  var require_float$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44593
44598
  var Scalar = require_Scalar();
44594
44599
  var stringifyNumber = require_stringifyNumber();
@@ -44629,7 +44634,7 @@ var require_float$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44629
44634
  exports.floatNaN = floatNaN;
44630
44635
  }));
44631
44636
  //#endregion
44632
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/core/int.js
44637
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/int.js
44633
44638
  var require_int$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44634
44639
  var stringifyNumber = require_stringifyNumber();
44635
44640
  const intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
@@ -44670,7 +44675,7 @@ var require_int$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44670
44675
  exports.intOct = intOct;
44671
44676
  }));
44672
44677
  //#endregion
44673
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/core/schema.js
44678
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/schema.js
44674
44679
  var require_schema$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44675
44680
  var map = require_map();
44676
44681
  var _null = require_null();
@@ -44694,7 +44699,7 @@ var require_schema$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44694
44699
  ];
44695
44700
  }));
44696
44701
  //#endregion
44697
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/json/schema.js
44702
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/json/schema.js
44698
44703
  var require_schema$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44699
44704
  var Scalar = require_Scalar();
44700
44705
  var map = require_map();
@@ -44756,7 +44761,7 @@ var require_schema$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44756
44761
  });
44757
44762
  }));
44758
44763
  //#endregion
44759
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/binary.js
44764
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/binary.js
44760
44765
  var require_binary = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44761
44766
  var node_buffer = __require("buffer");
44762
44767
  var Scalar = require_Scalar();
@@ -44804,7 +44809,7 @@ var require_binary = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44804
44809
  };
44805
44810
  }));
44806
44811
  //#endregion
44807
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/pairs.js
44812
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/pairs.js
44808
44813
  var require_pairs = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44809
44814
  var identity = require_identity();
44810
44815
  var Pair = require_Pair();
@@ -44864,7 +44869,7 @@ var require_pairs = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44864
44869
  exports.resolvePairs = resolvePairs;
44865
44870
  }));
44866
44871
  //#endregion
44867
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/omap.js
44872
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/omap.js
44868
44873
  var require_omap = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44869
44874
  var identity = require_identity();
44870
44875
  var toJS = require_toJS();
@@ -44927,7 +44932,7 @@ var require_omap = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44927
44932
  exports.omap = omap;
44928
44933
  }));
44929
44934
  //#endregion
44930
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/bool.js
44935
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/bool.js
44931
44936
  var require_bool = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44932
44937
  var Scalar = require_Scalar();
44933
44938
  function boolStringify({ value, source }, ctx) {
@@ -44954,7 +44959,7 @@ var require_bool = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44954
44959
  exports.trueTag = trueTag;
44955
44960
  }));
44956
44961
  //#endregion
44957
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/float.js
44962
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/float.js
44958
44963
  var require_float = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44959
44964
  var Scalar = require_Scalar();
44960
44965
  var stringifyNumber = require_stringifyNumber();
@@ -44998,7 +45003,7 @@ var require_float = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44998
45003
  exports.floatNaN = floatNaN;
44999
45004
  }));
45000
45005
  //#endregion
45001
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/int.js
45006
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/int.js
45002
45007
  var require_int = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45003
45008
  var stringifyNumber = require_stringifyNumber();
45004
45009
  const intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
@@ -45073,7 +45078,7 @@ var require_int = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45073
45078
  exports.intOct = intOct;
45074
45079
  }));
45075
45080
  //#endregion
45076
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/set.js
45081
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/set.js
45077
45082
  var require_set = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45078
45083
  var identity = require_identity();
45079
45084
  var Pair = require_Pair();
@@ -45141,7 +45146,7 @@ var require_set = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45141
45146
  exports.set = set;
45142
45147
  }));
45143
45148
  //#endregion
45144
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
45149
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
45145
45150
  var require_timestamp = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45146
45151
  var stringifyNumber = require_stringifyNumber();
45147
45152
  /** Internal types handle bigint as number, because TS can't figure it out. */
@@ -45224,7 +45229,7 @@ var require_timestamp = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45224
45229
  exports.timestamp = timestamp;
45225
45230
  }));
45226
45231
  //#endregion
45227
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/schema.js
45232
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/schema.js
45228
45233
  var require_schema = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45229
45234
  var map = require_map();
45230
45235
  var _null = require_null();
@@ -45264,7 +45269,7 @@ var require_schema = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45264
45269
  ];
45265
45270
  }));
45266
45271
  //#endregion
45267
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/tags.js
45272
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/tags.js
45268
45273
  var require_tags = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45269
45274
  var map = require_map();
45270
45275
  var _null = require_null();
@@ -45348,7 +45353,7 @@ var require_tags = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45348
45353
  exports.getTags = getTags;
45349
45354
  }));
45350
45355
  //#endregion
45351
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/Schema.js
45356
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/Schema.js
45352
45357
  var require_Schema = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45353
45358
  var identity = require_identity();
45354
45359
  var map = require_map();
@@ -45376,7 +45381,7 @@ var require_Schema = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45376
45381
  };
45377
45382
  }));
45378
45383
  //#endregion
45379
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyDocument.js
45384
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyDocument.js
45380
45385
  var require_stringifyDocument = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45381
45386
  var identity = require_identity();
45382
45387
  var stringify = require_stringify();
@@ -45437,7 +45442,7 @@ var require_stringifyDocument = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45437
45442
  exports.stringifyDocument = stringifyDocument;
45438
45443
  }));
45439
45444
  //#endregion
45440
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/doc/Document.js
45445
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/Document.js
45441
45446
  var require_Document$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45442
45447
  var Alias = require_Alias();
45443
45448
  var Collection = require_Collection();
@@ -45718,7 +45723,7 @@ var require_Document$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45718
45723
  exports.Document = Document;
45719
45724
  }));
45720
45725
  //#endregion
45721
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/errors.js
45726
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/errors.js
45722
45727
  var require_errors$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45723
45728
  var YAMLError = class extends Error {
45724
45729
  constructor(name, pos, code, message) {
@@ -45771,7 +45776,7 @@ var require_errors$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45771
45776
  exports.prettifyError = prettifyError;
45772
45777
  }));
45773
45778
  //#endregion
45774
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-props.js
45779
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-props.js
45775
45780
  var require_resolve_props = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45776
45781
  function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {
45777
45782
  let spaceBefore = false;
@@ -45878,7 +45883,7 @@ var require_resolve_props = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45878
45883
  exports.resolveProps = resolveProps;
45879
45884
  }));
45880
45885
  //#endregion
45881
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/util-contains-newline.js
45886
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-contains-newline.js
45882
45887
  var require_util_contains_newline = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45883
45888
  function containsNewline(key) {
45884
45889
  if (!key) return null;
@@ -45907,7 +45912,7 @@ var require_util_contains_newline = /* @__PURE__ */ __commonJSMin$1(((exports) =
45907
45912
  exports.containsNewline = containsNewline;
45908
45913
  }));
45909
45914
  //#endregion
45910
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/util-flow-indent-check.js
45915
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-flow-indent-check.js
45911
45916
  var require_util_flow_indent_check = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45912
45917
  var utilContainsNewline = require_util_contains_newline();
45913
45918
  function flowIndentCheck(indent, fc, onError) {
@@ -45919,7 +45924,7 @@ var require_util_flow_indent_check = /* @__PURE__ */ __commonJSMin$1(((exports)
45919
45924
  exports.flowIndentCheck = flowIndentCheck;
45920
45925
  }));
45921
45926
  //#endregion
45922
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/util-map-includes.js
45927
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-map-includes.js
45923
45928
  var require_util_map_includes = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45924
45929
  var identity = require_identity();
45925
45930
  function mapIncludes(ctx, items, search) {
@@ -45931,7 +45936,7 @@ var require_util_map_includes = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45931
45936
  exports.mapIncludes = mapIncludes;
45932
45937
  }));
45933
45938
  //#endregion
45934
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-block-map.js
45939
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-map.js
45935
45940
  var require_resolve_block_map = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45936
45941
  var Pair = require_Pair();
45937
45942
  var YAMLMap = require_YAMLMap();
@@ -46015,7 +46020,7 @@ var require_resolve_block_map = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46015
46020
  exports.resolveBlockMap = resolveBlockMap;
46016
46021
  }));
46017
46022
  //#endregion
46018
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-block-seq.js
46023
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-seq.js
46019
46024
  var require_resolve_block_seq = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46020
46025
  var YAMLSeq = require_YAMLSeq();
46021
46026
  var resolveProps = require_resolve_props();
@@ -46057,7 +46062,7 @@ var require_resolve_block_seq = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46057
46062
  exports.resolveBlockSeq = resolveBlockSeq;
46058
46063
  }));
46059
46064
  //#endregion
46060
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-end.js
46065
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-end.js
46061
46066
  var require_resolve_end = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46062
46067
  function resolveEnd(end, offset, reqSpace, onError) {
46063
46068
  let comment = "";
@@ -46095,7 +46100,7 @@ var require_resolve_end = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46095
46100
  exports.resolveEnd = resolveEnd;
46096
46101
  }));
46097
46102
  //#endregion
46098
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-flow-collection.js
46103
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-collection.js
46099
46104
  var require_resolve_flow_collection = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46100
46105
  var identity = require_identity();
46101
46106
  var Pair = require_Pair();
@@ -46250,7 +46255,7 @@ var require_resolve_flow_collection = /* @__PURE__ */ __commonJSMin$1(((exports)
46250
46255
  exports.resolveFlowCollection = resolveFlowCollection;
46251
46256
  }));
46252
46257
  //#endregion
46253
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/compose-collection.js
46258
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-collection.js
46254
46259
  var require_compose_collection = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46255
46260
  var identity = require_identity();
46256
46261
  var Scalar = require_Scalar();
@@ -46302,7 +46307,7 @@ var require_compose_collection = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46302
46307
  exports.composeCollection = composeCollection;
46303
46308
  }));
46304
46309
  //#endregion
46305
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-block-scalar.js
46310
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-scalar.js
46306
46311
  var require_resolve_block_scalar = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46307
46312
  var Scalar = require_Scalar();
46308
46313
  function resolveBlockScalar(ctx, scalar, onError) {
@@ -46477,7 +46482,7 @@ var require_resolve_block_scalar = /* @__PURE__ */ __commonJSMin$1(((exports) =>
46477
46482
  exports.resolveBlockScalar = resolveBlockScalar;
46478
46483
  }));
46479
46484
  //#endregion
46480
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-flow-scalar.js
46485
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-scalar.js
46481
46486
  var require_resolve_flow_scalar = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46482
46487
  var Scalar = require_Scalar();
46483
46488
  var resolveEnd = require_resolve_end();
@@ -46683,7 +46688,7 @@ var require_resolve_flow_scalar = /* @__PURE__ */ __commonJSMin$1(((exports) =>
46683
46688
  exports.resolveFlowScalar = resolveFlowScalar;
46684
46689
  }));
46685
46690
  //#endregion
46686
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/compose-scalar.js
46691
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-scalar.js
46687
46692
  var require_compose_scalar = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46688
46693
  var identity = require_identity();
46689
46694
  var Scalar = require_Scalar();
@@ -46742,7 +46747,7 @@ var require_compose_scalar = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46742
46747
  exports.composeScalar = composeScalar;
46743
46748
  }));
46744
46749
  //#endregion
46745
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/util-empty-scalar-position.js
46750
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-empty-scalar-position.js
46746
46751
  var require_util_empty_scalar_position = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46747
46752
  function emptyScalarPosition(offset, before, pos) {
46748
46753
  if (before) {
@@ -46769,7 +46774,7 @@ var require_util_empty_scalar_position = /* @__PURE__ */ __commonJSMin$1(((expor
46769
46774
  exports.emptyScalarPosition = emptyScalarPosition;
46770
46775
  }));
46771
46776
  //#endregion
46772
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/compose-node.js
46777
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-node.js
46773
46778
  var require_compose_node = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46774
46779
  var Alias = require_Alias();
46775
46780
  var identity = require_identity();
@@ -46801,14 +46806,18 @@ var require_compose_node = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46801
46806
  case "block-map":
46802
46807
  case "block-seq":
46803
46808
  case "flow-collection":
46804
- node = composeCollection.composeCollection(CN, ctx, token, props, onError);
46805
- if (anchor) node.anchor = anchor.source.substring(1);
46809
+ try {
46810
+ node = composeCollection.composeCollection(CN, ctx, token, props, onError);
46811
+ if (anchor) node.anchor = anchor.source.substring(1);
46812
+ } catch (error) {
46813
+ onError(token, "RESOURCE_EXHAUSTION", error instanceof Error ? error.message : String(error));
46814
+ }
46806
46815
  break;
46807
46816
  default:
46808
46817
  onError(token, "UNEXPECTED_TOKEN", token.type === "error" ? token.message : `Unsupported token (type: ${token.type})`);
46809
- node = composeEmptyNode(ctx, token.offset, void 0, null, props, onError);
46810
46818
  isSrcToken = false;
46811
46819
  }
46820
+ node ?? (node = composeEmptyNode(ctx, token.offset, void 0, null, props, onError));
46812
46821
  if (anchor && node.anchor === "") onError(anchor, "BAD_ALIAS", "Anchor cannot be an empty string");
46813
46822
  if (atKey && ctx.options.stringKeys && (!identity.isScalar(node) || typeof node.value !== "string" || node.tag && node.tag !== "tag:yaml.org,2002:str")) onError(tag ?? token, "NON_STRING_KEY", "With stringKeys, all keys must be strings");
46814
46823
  if (spaceBefore) node.spaceBefore = true;
@@ -46854,7 +46863,7 @@ var require_compose_node = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46854
46863
  exports.composeNode = composeNode;
46855
46864
  }));
46856
46865
  //#endregion
46857
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/compose-doc.js
46866
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-doc.js
46858
46867
  var require_compose_doc = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46859
46868
  var Document = require_Document$1();
46860
46869
  var composeNode = require_compose_node();
@@ -46896,7 +46905,7 @@ var require_compose_doc = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46896
46905
  exports.composeDoc = composeDoc;
46897
46906
  }));
46898
46907
  //#endregion
46899
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/composer.js
46908
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/composer.js
46900
46909
  var require_composer = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46901
46910
  var node_process$1 = __require("process");
46902
46911
  var directives = require_directives();
@@ -47094,7 +47103,7 @@ var require_composer = /* @__PURE__ */ __commonJSMin$1(((exports) => {
47094
47103
  exports.Composer = Composer;
47095
47104
  }));
47096
47105
  //#endregion
47097
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/cst-scalar.js
47106
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst-scalar.js
47098
47107
  var require_cst_scalar = /* @__PURE__ */ __commonJSMin$1(((exports) => {
47099
47108
  var resolveBlockScalar = require_resolve_block_scalar();
47100
47109
  var resolveFlowScalar = require_resolve_flow_scalar();
@@ -47361,7 +47370,7 @@ var require_cst_scalar = /* @__PURE__ */ __commonJSMin$1(((exports) => {
47361
47370
  exports.setScalarValue = setScalarValue;
47362
47371
  }));
47363
47372
  //#endregion
47364
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/cst-stringify.js
47373
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst-stringify.js
47365
47374
  var require_cst_stringify = /* @__PURE__ */ __commonJSMin$1(((exports) => {
47366
47375
  /**
47367
47376
  * Stringify a CST document, token, or collection item
@@ -47412,7 +47421,7 @@ var require_cst_stringify = /* @__PURE__ */ __commonJSMin$1(((exports) => {
47412
47421
  exports.stringify = stringify;
47413
47422
  }));
47414
47423
  //#endregion
47415
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/cst-visit.js
47424
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst-visit.js
47416
47425
  var require_cst_visit = /* @__PURE__ */ __commonJSMin$1(((exports) => {
47417
47426
  const BREAK = Symbol("break visit");
47418
47427
  const SKIP = Symbol("skip children");
@@ -47503,7 +47512,7 @@ var require_cst_visit = /* @__PURE__ */ __commonJSMin$1(((exports) => {
47503
47512
  exports.visit = visit;
47504
47513
  }));
47505
47514
  //#endregion
47506
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/cst.js
47515
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst.js
47507
47516
  var require_cst = /* @__PURE__ */ __commonJSMin$1(((exports) => {
47508
47517
  var cstScalar = require_cst_scalar();
47509
47518
  var cstStringify = require_cst_stringify();
@@ -47582,7 +47591,7 @@ var require_cst = /* @__PURE__ */ __commonJSMin$1(((exports) => {
47582
47591
  exports.tokenType = tokenType;
47583
47592
  }));
47584
47593
  //#endregion
47585
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/lexer.js
47594
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/lexer.js
47586
47595
  var require_lexer = /* @__PURE__ */ __commonJSMin$1(((exports) => {
47587
47596
  var cst = require_cst();
47588
47597
  function isEmpty(ch) {
@@ -48101,7 +48110,7 @@ var require_lexer = /* @__PURE__ */ __commonJSMin$1(((exports) => {
48101
48110
  exports.Lexer = Lexer;
48102
48111
  }));
48103
48112
  //#endregion
48104
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/line-counter.js
48113
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/line-counter.js
48105
48114
  var require_line_counter = /* @__PURE__ */ __commonJSMin$1(((exports) => {
48106
48115
  /**
48107
48116
  * Tracks newlines during parsing in order to provide an efficient API for
@@ -48148,7 +48157,7 @@ var require_line_counter = /* @__PURE__ */ __commonJSMin$1(((exports) => {
48148
48157
  exports.LineCounter = LineCounter;
48149
48158
  }));
48150
48159
  //#endregion
48151
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/parser.js
48160
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/parser.js
48152
48161
  var require_parser = /* @__PURE__ */ __commonJSMin$1(((exports) => {
48153
48162
  var node_process = __require("process");
48154
48163
  var cst = require_cst();
@@ -49004,7 +49013,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin$1(((exports) => {
49004
49013
  exports.Parser = Parser;
49005
49014
  }));
49006
49015
  //#endregion
49007
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/public-api.js
49016
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/public-api.js
49008
49017
  var require_public_api = /* @__PURE__ */ __commonJSMin$1(((exports) => {
49009
49018
  var composer = require_composer();
49010
49019
  var Document = require_Document$1();
@@ -49091,7 +49100,7 @@ var require_public_api = /* @__PURE__ */ __commonJSMin$1(((exports) => {
49091
49100
  exports.stringify = stringify;
49092
49101
  }));
49093
49102
  //#endregion
49094
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/index.js
49103
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/index.js
49095
49104
  var require_dist$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
49096
49105
  var composer = require_composer();
49097
49106
  var Document = require_Document$1();
@@ -91458,7 +91467,7 @@ const allCliAgents = [
91458
91467
  new CliAgent({
91459
91468
  id: "clanka",
91460
91469
  name: "clanka",
91461
- commandPlan: ({ prompt, prdFilePath, dangerous }) => make$45("opencode", ["--prompt", prdFilePath ? `@${prdFilePath}
91470
+ commandPlan: ({ prompt, prdFilePath, dangerous }) => make$45("clanka", ["--prompt", prdFilePath ? `@${prdFilePath}
91462
91471
 
91463
91472
  ${prompt}` : prompt], {
91464
91473
  extendEnv: true,
@@ -181576,7 +181585,7 @@ var ji = Bt, Ii = Object.assign(Qe, { sync: Bt }), zi = Ut, Bi = Object.assign(e
181576
181585
  });
181577
181586
  Ze.glob = Ze;
181578
181587
  //#endregion
181579
- //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/ApplyPatch.js
181588
+ //#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/ApplyPatch.js
181580
181589
  /**
181581
181590
  * @since 1.0.0
181582
181591
  */
@@ -196449,7 +196458,7 @@ var StreamableHTTPClientTransport = class {
196449
196458
  }
196450
196459
  };
196451
196460
  //#endregion
196452
- //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/McpClient.js
196461
+ //#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/McpClient.js
196453
196462
  /**
196454
196463
  * @since 1.0.0
196455
196464
  */
@@ -196494,7 +196503,7 @@ const layer$13 = effect$1(McpClient, gen(function* () {
196494
196503
  });
196495
196504
  }));
196496
196505
  //#endregion
196497
- //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/ExaSearch.js
196506
+ //#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/ExaSearch.js
196498
196507
  /**
196499
196508
  * @since 1.0.0
196500
196509
  */
@@ -211444,7 +211453,7 @@ var require_lib = /* @__PURE__ */ __commonJSMin$1(((exports) => {
211444
211453
  exports.impl = impl;
211445
211454
  }));
211446
211455
  //#endregion
211447
- //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/WebToMarkdown.js
211456
+ //#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/WebToMarkdown.js
211448
211457
  /**
211449
211458
  * @since 1.0.0
211450
211459
  */
@@ -214583,7 +214592,7 @@ function isEmptyParamsRecord(indexSignature) {
214583
214592
  return indexSignature.parameter === string$3 && isNever(indexSignature.type);
214584
214593
  }
214585
214594
  //#endregion
214586
- //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/SemanticSearch/Service.js
214595
+ //#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/SemanticSearch/Service.js
214587
214596
  /**
214588
214597
  * @since 1.0.0
214589
214598
  */
@@ -214609,7 +214618,7 @@ const maybeRemoveFile = (path) => serviceOption(SemanticSearch).pipe(flatMap$4(m
214609
214618
  onSome: (service) => service.removeFile(path)
214610
214619
  })));
214611
214620
  //#endregion
214612
- //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/AgentTools.js
214621
+ //#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/AgentTools.js
214613
214622
  /**
214614
214623
  * @since 1.0.0
214615
214624
  */
@@ -214960,7 +214969,7 @@ const AgentToolHandlers = AgentToolHandlersNoDeps.pipe(provide$3([layer$12, laye
214960
214969
  AgentToolHandlersNoDeps.pipe(provide$3([mock(ExaSearch)({}), mock(WebToMarkdown)({})]));
214961
214970
  var ApplyPatchError = class extends TaggedClass$2("ApplyPatchError") {};
214962
214971
  //#endregion
214963
- //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/TypeBuilder.js
214972
+ //#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/TypeBuilder.js
214964
214973
  const resolveDocumentation = resolveAt("documentation");
214965
214974
  const identifierPattern = /^[$A-Z_a-z][$0-9A-Z_a-z]*$/u;
214966
214975
  const Precedence = {
@@ -215233,7 +215242,7 @@ const render = (schema, options) => {
215233
215242
  return printNode({ text: documentation === void 0 ? rendered.text : `${renderJsDoc(documentation, 0, printerOptions)}${printerOptions.newLine}${rendered.text}` }, printerOptions);
215234
215243
  };
215235
215244
  //#endregion
215236
- //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/ToolkitRenderer.js
215245
+ //#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/ToolkitRenderer.js
215237
215246
  /**
215238
215247
  * @since 1.0.0
215239
215248
  */
@@ -215255,7 +215264,15 @@ declare function ${name}(${params}): Promise<${render(tool.successSchema)}>`);
215255
215264
  }) });
215256
215265
  };
215257
215266
  //#endregion
215258
- //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/ScriptPreprocessing.js
215267
+ //#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/ScriptPreprocessing.js
215268
+ const callTemplateTargets = ["applyPatch", "taskComplete"];
215269
+ const objectPropertyTargets = [{
215270
+ functionName: "writeFile",
215271
+ propertyName: "content"
215272
+ }, {
215273
+ functionName: "updateTask",
215274
+ propertyName: "description"
215275
+ }];
215259
215276
  const isIdentifierChar = (char) => char !== void 0 && /[A-Za-z0-9_$]/.test(char);
215260
215277
  const isIdentifierStartChar = (char) => char !== void 0 && /[A-Za-z_$]/.test(char);
215261
215278
  const hasIdentifierBoundary = (text, index, length) => !isIdentifierChar(text[index - 1]) && !isIdentifierChar(text[index + length]);
@@ -215268,9 +215285,9 @@ const findNextIdentifier = (text, identifier, from) => {
215268
215285
  return -1;
215269
215286
  };
215270
215287
  const skipWhitespace = (text, start) => {
215271
- let i = start;
215272
- while (i < text.length && /\s/.test(text[i])) i++;
215273
- return i;
215288
+ let index = start;
215289
+ while (index < text.length && /\s/.test(text[index])) index++;
215290
+ return index;
215274
215291
  };
215275
215292
  const parseIdentifier = (text, start) => {
215276
215293
  if (!isIdentifierStartChar(text[start])) return;
@@ -215282,24 +215299,102 @@ const parseIdentifier = (text, start) => {
215282
215299
  };
215283
215300
  };
215284
215301
  const findPreviousNonWhitespace = (text, from) => {
215285
- let i = from;
215286
- while (i >= 0 && /\s/.test(text[i])) i--;
215287
- return i;
215302
+ let index = from;
215303
+ while (index >= 0 && /\s/.test(text[index])) index--;
215304
+ return index;
215288
215305
  };
215289
215306
  const findNextNonWhitespace = (text, from) => {
215290
- let i = from;
215291
- while (i < text.length && /\s/.test(text[i])) i++;
215292
- return i;
215307
+ let index = from;
215308
+ while (index < text.length && /\s/.test(text[index])) index++;
215309
+ return index;
215310
+ };
215311
+ const isEscaped = (text, index) => {
215312
+ let slashCount = 0;
215313
+ let cursor = index - 1;
215314
+ while (cursor >= 0 && text[cursor] === "\\") {
215315
+ slashCount++;
215316
+ cursor--;
215317
+ }
215318
+ return slashCount % 2 === 1;
215319
+ };
215320
+ const needsTemplateEscaping = (text) => {
215321
+ for (let index = 0; index < text.length; index++) {
215322
+ const char = text[index];
215323
+ if (char === "`" && !isEscaped(text, index)) return true;
215324
+ if (char === "$" && text[index + 1] === "{" && !isEscaped(text, index)) return true;
215325
+ }
215326
+ return false;
215327
+ };
215328
+ const findTemplateEnd = (text, start, isTerminator) => {
215329
+ let end = -1;
215330
+ for (let index = start + 1; index < text.length; index++) {
215331
+ if (text[index] !== "`" || isEscaped(text, index)) continue;
215332
+ if (isTerminator(text[index + 1])) {
215333
+ end = index;
215334
+ continue;
215335
+ }
215336
+ if (isTerminator(text[skipWhitespace(text, index + 1)])) end = index;
215337
+ }
215338
+ return end;
215339
+ };
215340
+ const findTypeAnnotationAssignment = (text, start) => {
215341
+ let index = start;
215342
+ while (index < text.length) {
215343
+ const char = text[index];
215344
+ if (char === "=") return index;
215345
+ if (char === "\n" || char === ";") return -1;
215346
+ index++;
215347
+ }
215348
+ return -1;
215349
+ };
215350
+ const findClosingParen = (text, openParen) => {
215351
+ let depth = 1;
215352
+ for (let index = openParen + 1; index < text.length; index++) {
215353
+ const char = text[index];
215354
+ if (char === "(") {
215355
+ depth++;
215356
+ continue;
215357
+ }
215358
+ if (char === ")") {
215359
+ depth--;
215360
+ if (depth === 0) return index;
215361
+ }
215362
+ }
215363
+ return -1;
215364
+ };
215365
+ const findClosingBrace = (text, openBrace) => {
215366
+ let depth = 1;
215367
+ let stringDelimiter;
215368
+ for (let index = openBrace + 1; index < text.length; index++) {
215369
+ const char = text[index];
215370
+ if (stringDelimiter !== void 0) {
215371
+ if (char === stringDelimiter && !isEscaped(text, index)) stringDelimiter = void 0;
215372
+ continue;
215373
+ }
215374
+ if (char === "\"" || char === "'" || char === "`") {
215375
+ stringDelimiter = char;
215376
+ continue;
215377
+ }
215378
+ if (char === "{") {
215379
+ depth++;
215380
+ continue;
215381
+ }
215382
+ if (char === "}") {
215383
+ depth--;
215384
+ if (depth === 0) return index;
215385
+ }
215386
+ }
215387
+ return -1;
215293
215388
  };
215294
215389
  const findObjectValueTerminator = (text, start) => {
215295
215390
  let parenDepth = 0;
215296
215391
  let bracketDepth = 0;
215297
215392
  let braceDepth = 0;
215298
215393
  let stringDelimiter;
215299
- for (let i = start; i < text.length; i++) {
215300
- const char = text[i];
215394
+ for (let index = start; index < text.length; index++) {
215395
+ const char = text[index];
215301
215396
  if (stringDelimiter !== void 0) {
215302
- if (char === stringDelimiter && !isEscaped(text, i)) stringDelimiter = void 0;
215397
+ if (char === stringDelimiter && !isEscaped(text, index)) stringDelimiter = void 0;
215303
215398
  continue;
215304
215399
  }
215305
215400
  if (char === "\"" || char === "'" || char === "`") {
@@ -215327,16 +215422,16 @@ const findObjectValueTerminator = (text, start) => {
215327
215422
  continue;
215328
215423
  }
215329
215424
  if (char === "}") {
215330
- if (parenDepth === 0 && bracketDepth === 0 && braceDepth === 0) return i;
215425
+ if (parenDepth === 0 && bracketDepth === 0 && braceDepth === 0) return index;
215331
215426
  if (braceDepth > 0) braceDepth--;
215332
215427
  continue;
215333
215428
  }
215334
- if (char === "," && parenDepth === 0 && bracketDepth === 0 && braceDepth === 0) return i;
215429
+ if (char === "," && parenDepth === 0 && bracketDepth === 0 && braceDepth === 0) return index;
215335
215430
  }
215336
215431
  return -1;
215337
215432
  };
215338
215433
  const collectExpressionIdentifiers = (text, start, end) => {
215339
- const out = /* @__PURE__ */ new Set();
215434
+ const identifiers = /* @__PURE__ */ new Set();
215340
215435
  let cursor = start;
215341
215436
  while (cursor < end) {
215342
215437
  const identifier = parseIdentifier(text, cursor);
@@ -215344,29 +215439,12 @@ const collectExpressionIdentifiers = (text, start, end) => {
215344
215439
  cursor++;
215345
215440
  continue;
215346
215441
  }
215347
- const previousNonWhitespace = findPreviousNonWhitespace(text, cursor - 1);
215348
- const nextNonWhitespace = findNextNonWhitespace(text, identifier.end);
215349
- if (text[previousNonWhitespace] !== "." && text[nextNonWhitespace] !== "." && text[nextNonWhitespace] !== "(") out.add(identifier.name);
215442
+ const previous = findPreviousNonWhitespace(text, cursor - 1);
215443
+ const next = findNextNonWhitespace(text, identifier.end);
215444
+ if (text[previous] !== "." && text[next] !== "." && text[next] !== "(") identifiers.add(identifier.name);
215350
215445
  cursor = identifier.end;
215351
215446
  }
215352
- return out;
215353
- };
215354
- const isEscaped = (text, index) => {
215355
- let slashCount = 0;
215356
- let i = index - 1;
215357
- while (i >= 0 && text[i] === "\\") {
215358
- slashCount++;
215359
- i--;
215360
- }
215361
- return slashCount % 2 === 1;
215362
- };
215363
- const needsTemplateEscaping = (text) => {
215364
- for (let i = 0; i < text.length; i++) {
215365
- const char = text[i];
215366
- if (char === "`" && !isEscaped(text, i)) return true;
215367
- if (char === "$" && text[i + 1] === "{" && !isEscaped(text, i)) return true;
215368
- }
215369
- return false;
215447
+ return identifiers;
215370
215448
  };
215371
215449
  const normalizePatchEscapedQuotes = (text) => text.includes("*** Begin Patch") ? text.replace(/\\"([A-Za-z0-9_$.-]+)\\"/g, (match, content, index) => {
215372
215450
  const previous = text[findPreviousNonWhitespace(text, index - 1)];
@@ -215376,26 +215454,26 @@ const normalizePatchEscapedQuotes = (text) => text.includes("*** Begin Patch") ?
215376
215454
  }) : text;
215377
215455
  const normalizeNonPatchEscapedTemplateMarkers = (text) => text.replace(/\\{2,}(?=`|\$\{)/g, "\\").replace(/(^|\s)\\+(?=\.[A-Za-z0-9_-]+\/)/g, "$1");
215378
215456
  const escapeTemplateLiteralContent = (text) => {
215379
- const normalizedPatchQuotes = normalizePatchEscapedQuotes(text);
215380
- const isPatchContent = normalizedPatchQuotes.includes("*** Begin Patch");
215381
- const normalized = isPatchContent ? normalizedPatchQuotes : normalizeNonPatchEscapedTemplateMarkers(normalizedPatchQuotes);
215382
- if (!needsTemplateEscaping(normalized) && !(isPatchContent && normalized.includes("\\"))) return normalized;
215457
+ const patchNormalized = normalizePatchEscapedQuotes(text);
215458
+ const isPatchContent = patchNormalized.includes("*** Begin Patch");
215459
+ const normalized = isPatchContent ? patchNormalized : normalizeNonPatchEscapedTemplateMarkers(patchNormalized);
215460
+ if (!needsTemplateEscaping(normalized) && !(isPatchContent && normalized.includes("\\\""))) return normalized;
215383
215461
  let out = "";
215384
- for (let i = 0; i < normalized.length; i++) {
215385
- const char = normalized[i];
215462
+ for (let index = 0; index < normalized.length; index++) {
215463
+ const char = normalized[index];
215386
215464
  if (char === "\\") {
215387
- if (!isPatchContent && (normalized[i + 1] === "`" || normalized[i + 1] === "$" && normalized[i + 2] === "{")) {
215465
+ if (normalized[index + 1] === "`" && isEscaped(normalized, index + 1) || normalized[index + 1] === "$" && normalized[index + 2] === "{" && isEscaped(normalized, index + 1)) {
215388
215466
  out += "\\";
215389
215467
  continue;
215390
215468
  }
215391
215469
  out += "\\\\";
215392
215470
  continue;
215393
215471
  }
215394
- if (char === "`" && !isEscaped(normalized, i)) {
215472
+ if (char === "`" && !isEscaped(normalized, index)) {
215395
215473
  out += "\\`";
215396
215474
  continue;
215397
215475
  }
215398
- if (char === "$" && normalized[i + 1] === "{" && !isEscaped(normalized, i)) {
215476
+ if (char === "$" && normalized[index + 1] === "{" && !isEscaped(normalized, index)) {
215399
215477
  out += "\\$";
215400
215478
  continue;
215401
215479
  }
@@ -215403,199 +215481,108 @@ const escapeTemplateLiteralContent = (text) => {
215403
215481
  }
215404
215482
  return out;
215405
215483
  };
215406
- const findTemplateEnd = (text, start, isTerminator) => {
215407
- let end = -1;
215408
- for (let i = start + 1; i < text.length; i++) {
215409
- if (text[i] !== "`" || isEscaped(text, i)) continue;
215410
- if (isTerminator(text[i + 1])) {
215411
- end = i;
215412
- continue;
215413
- }
215414
- if (isTerminator(text[skipWhitespace(text, i + 1)])) end = i;
215415
- }
215416
- return end;
215417
- };
215418
- const findTypeAnnotationAssignment = (text, start) => {
215419
- let i = start;
215420
- while (i < text.length) {
215421
- const char = text[i];
215422
- if (char === "=") return i;
215423
- if (char === "\n" || char === ";") return -1;
215424
- i++;
215425
- }
215426
- return -1;
215427
- };
215428
- const findClosingParen = (text, openParen) => {
215429
- let depth = 1;
215430
- for (let i = openParen + 1; i < text.length; i++) {
215431
- const char = text[i];
215432
- if (char === "(") {
215433
- depth++;
215434
- continue;
215435
- }
215436
- if (char === ")") {
215437
- depth--;
215438
- if (depth === 0) return i;
215439
- }
215440
- }
215441
- return -1;
215442
- };
215443
- const findClosingBrace = (text, openBrace) => {
215444
- let depth = 1;
215445
- let stringDelimiter;
215446
- for (let i = openBrace + 1; i < text.length; i++) {
215447
- const char = text[i];
215448
- if (stringDelimiter !== void 0) {
215449
- if (char === stringDelimiter && !isEscaped(text, i)) stringDelimiter = void 0;
215450
- continue;
215451
- }
215452
- if (char === "\"" || char === "'" || char === "`") {
215453
- stringDelimiter = char;
215454
- continue;
215455
- }
215456
- if (char === "{") {
215457
- depth++;
215458
- continue;
215459
- }
215460
- if (char === "}") {
215461
- depth--;
215462
- if (depth === 0) return i;
215463
- }
215464
- }
215465
- return -1;
215466
- };
215467
- const fixObjectLiteralTemplateValues = (text) => text.replace(/\\{2,}(?=`|\$\{)/g, "\\");
215468
- const fixAssignedObjectTemplateValues = (script, variableName) => {
215484
+ const normalizeObjectLiteralTemplateMarkers = (text) => text.replace(/\\{2,}(?=`|\$\{)/g, "\\");
215485
+ const replaceSlice = (text, start, end, replacement) => `${text.slice(0, start)}${replacement}${text.slice(end)}`;
215486
+ const rewriteTemplateContents = (script, findNext, rewrite) => {
215469
215487
  let out = script;
215470
215488
  let cursor = 0;
215471
215489
  while (cursor < out.length) {
215472
- const variableStart = findNextIdentifier(out, variableName, cursor);
215473
- if (variableStart === -1) break;
215474
- let assignmentStart = skipWhitespace(out, variableStart + variableName.length);
215475
- if (out[assignmentStart] === ":") {
215476
- assignmentStart = findTypeAnnotationAssignment(out, assignmentStart + 1);
215477
- if (assignmentStart === -1) {
215478
- cursor = variableStart + variableName.length;
215479
- continue;
215480
- }
215481
- }
215482
- if (out[assignmentStart] !== "=" || out[assignmentStart + 1] === "=" || out[assignmentStart + 1] === ">") {
215483
- cursor = variableStart + variableName.length;
215484
- continue;
215485
- }
215486
- const objectStart = skipWhitespace(out, assignmentStart + 1);
215487
- if (out[objectStart] !== "{") {
215488
- cursor = objectStart + 1;
215490
+ const range = findNext(out, cursor);
215491
+ if (range === void 0) break;
215492
+ const original = out.slice(range.contentStart, range.contentEnd);
215493
+ const updated = rewrite(original);
215494
+ if (updated !== original) {
215495
+ out = replaceSlice(out, range.contentStart, range.contentEnd, updated);
215496
+ cursor = range.nextCursor + (updated.length - original.length);
215489
215497
  continue;
215490
215498
  }
215491
- const objectEnd = findClosingBrace(out, objectStart);
215492
- if (objectEnd === -1) {
215493
- cursor = objectStart + 1;
215494
- continue;
215495
- }
215496
- const original = out.slice(objectStart, objectEnd + 1);
215497
- const escaped = fixObjectLiteralTemplateValues(original);
215498
- if (escaped !== original) {
215499
- out = `${out.slice(0, objectStart)}${escaped}${out.slice(objectEnd + 1)}`;
215500
- cursor = objectEnd + (escaped.length - original.length) + 1;
215501
- continue;
215502
- }
215503
- cursor = objectEnd + 1;
215499
+ cursor = range.nextCursor;
215504
215500
  }
215505
215501
  return out;
215506
215502
  };
215507
- const escapeRegExp = (text) => text.replace(/[.*+?^${}()|[\\]\\]/g, "\\$&");
215508
- const collectObjectEntryMapSources = (script, valueIdentifier) => {
215509
- const out = /* @__PURE__ */ new Set();
215510
- const pattern = new RegExp(`Object\\.entries\\(\\s*([A-Za-z_$][A-Za-z0-9_$]*)\\s*\\)\\s*\\.map\\(\\s*(?:async\\s*)?\\(\\s*\\[\\s*[A-Za-z_$][A-Za-z0-9_$]*\\s*,\\s*${escapeRegExp(valueIdentifier)}\\s*\\]\\s*\\)\\s*=>`, "g");
215511
- for (const match of script.matchAll(pattern)) {
215512
- const sourceIdentifier = match[1];
215513
- if (sourceIdentifier !== void 0) out.add(sourceIdentifier);
215514
- }
215515
- return out;
215516
- };
215517
- const findCallTemplateEnd = (text, templateStart, openParen) => {
215518
- const closeParen = findClosingParen(text, openParen);
215519
- if (closeParen === -1) return -1;
215520
- for (let i = closeParen - 1; i > templateStart; i--) if (text[i] === "`" && !isEscaped(text, i)) return i;
215521
- return -1;
215522
- };
215523
- const fixCallTemplateArgument = (script, functionName) => {
215524
- let out = script;
215525
- let cursor = 0;
215526
- while (cursor < out.length) {
215527
- const callStart = findNextIdentifier(out, functionName, cursor);
215528
- if (callStart === -1) break;
215529
- const openParen = skipWhitespace(out, callStart + functionName.length);
215530
- if (out[openParen] !== "(") {
215503
+ const findDirectCallTemplate = (text, functionName, from) => {
215504
+ let cursor = from;
215505
+ while (cursor < text.length) {
215506
+ const callStart = findNextIdentifier(text, functionName, cursor);
215507
+ if (callStart === -1) return;
215508
+ const openParen = skipWhitespace(text, callStart + functionName.length);
215509
+ if (text[openParen] !== "(") {
215531
215510
  cursor = callStart + functionName.length;
215532
215511
  continue;
215533
215512
  }
215534
- const templateStart = skipWhitespace(out, openParen + 1);
215535
- if (out[templateStart] !== "`") {
215513
+ const templateStart = skipWhitespace(text, openParen + 1);
215514
+ if (text[templateStart] !== "`") {
215536
215515
  cursor = openParen + 1;
215537
215516
  continue;
215538
215517
  }
215539
- const templateEnd = findCallTemplateEnd(out, templateStart, openParen);
215518
+ const closeParen = findClosingParen(text, openParen);
215519
+ let templateEnd = -1;
215520
+ if (closeParen !== -1) {
215521
+ for (let index = closeParen - 1; index > templateStart; index--) if (text[index] === "`" && !isEscaped(text, index)) {
215522
+ templateEnd = index;
215523
+ break;
215524
+ }
215525
+ } else {
215526
+ const patchEnd = text.indexOf("*** End Patch", templateStart);
215527
+ const searchStart = patchEnd === -1 ? templateStart + 1 : patchEnd + 1;
215528
+ for (let index = searchStart; index < text.length; index++) {
215529
+ if (text[index] !== "`" || isEscaped(text, index)) continue;
215530
+ if (text[skipWhitespace(text, index + 1)] === ")") {
215531
+ templateEnd = index;
215532
+ break;
215533
+ }
215534
+ }
215535
+ }
215540
215536
  if (templateEnd === -1) {
215541
215537
  cursor = templateStart + 1;
215542
215538
  continue;
215543
215539
  }
215544
- const original = out.slice(templateStart + 1, templateEnd);
215545
- const escaped = escapeTemplateLiteralContent(original);
215546
- if (escaped !== original) {
215547
- out = `${out.slice(0, templateStart + 1)}${escaped}${out.slice(templateEnd)}`;
215548
- cursor = templateEnd + (escaped.length - original.length) + 1;
215549
- continue;
215550
- }
215551
- cursor = templateEnd + 1;
215540
+ return {
215541
+ contentStart: templateStart + 1,
215542
+ contentEnd: templateEnd,
215543
+ nextCursor: templateEnd + 1
215544
+ };
215552
215545
  }
215553
- return out;
215554
215546
  };
215555
- const fixCallObjectPropertyTemplate = (script, functionName, propertyName) => {
215556
- let out = script;
215557
- let cursor = 0;
215558
- while (cursor < out.length) {
215559
- const callStart = findNextIdentifier(out, functionName, cursor);
215560
- if (callStart === -1) break;
215561
- const openParen = skipWhitespace(out, callStart + functionName.length);
215562
- if (out[openParen] !== "(") {
215563
- cursor = callStart + functionName.length;
215547
+ const findObjectPropertyTemplate = (text, target, from) => {
215548
+ let cursor = from;
215549
+ while (cursor < text.length) {
215550
+ const callStart = findNextIdentifier(text, target.functionName, cursor);
215551
+ if (callStart === -1) return;
215552
+ const openParen = skipWhitespace(text, callStart + target.functionName.length);
215553
+ if (text[openParen] !== "(") {
215554
+ cursor = callStart + target.functionName.length;
215564
215555
  continue;
215565
215556
  }
215566
- const propertyKey = findNextIdentifier(out, propertyName, openParen + 1);
215557
+ const propertyKey = findNextIdentifier(text, target.propertyName, openParen + 1);
215567
215558
  if (propertyKey === -1) {
215568
215559
  cursor = openParen + 1;
215569
215560
  continue;
215570
215561
  }
215571
- const colon = skipWhitespace(out, propertyKey + propertyName.length);
215572
- if (out[colon] !== ":") {
215573
- cursor = propertyKey + propertyName.length;
215562
+ const colon = skipWhitespace(text, propertyKey + target.propertyName.length);
215563
+ if (text[colon] !== ":") {
215564
+ cursor = propertyKey + target.propertyName.length;
215574
215565
  continue;
215575
215566
  }
215576
- const templateStart = skipWhitespace(out, colon + 1);
215577
- if (out[templateStart] !== "`") {
215567
+ const templateStart = skipWhitespace(text, colon + 1);
215568
+ if (text[templateStart] !== "`") {
215578
215569
  cursor = templateStart + 1;
215579
215570
  continue;
215580
215571
  }
215581
- const templateEnd = findTemplateEnd(out, templateStart, (char) => char === "}" || char === ",");
215572
+ const templateEnd = findTemplateEnd(text, templateStart, (char) => char === "}" || char === ",");
215582
215573
  if (templateEnd === -1) {
215583
215574
  cursor = templateStart + 1;
215584
215575
  continue;
215585
215576
  }
215586
- const original = out.slice(templateStart + 1, templateEnd);
215587
- const escaped = escapeTemplateLiteralContent(original);
215588
- if (escaped !== original) {
215589
- out = `${out.slice(0, templateStart + 1)}${escaped}${out.slice(templateEnd)}`;
215590
- cursor = templateEnd + (escaped.length - original.length) + 1;
215591
- continue;
215592
- }
215593
- cursor = templateEnd + 1;
215577
+ return {
215578
+ contentStart: templateStart + 1,
215579
+ contentEnd: templateEnd,
215580
+ nextCursor: templateEnd + 1
215581
+ };
215594
215582
  }
215595
- return out;
215596
215583
  };
215597
215584
  const collectCallArgumentIdentifiers = (script, functionName) => {
215598
- const out = /* @__PURE__ */ new Set();
215585
+ const identifiers = /* @__PURE__ */ new Set();
215599
215586
  let cursor = 0;
215600
215587
  while (cursor < script.length) {
215601
215588
  const callStart = findNextIdentifier(script, functionName, cursor);
@@ -215611,47 +215598,79 @@ const collectCallArgumentIdentifiers = (script, functionName) => {
215611
215598
  continue;
215612
215599
  }
215613
215600
  const argumentEnd = skipWhitespace(script, identifier.end);
215614
- if (script[argumentEnd] === ")" || script[argumentEnd] === ",") out.add(identifier.name);
215601
+ if (script[argumentEnd] === ")" || script[argumentEnd] === ",") identifiers.add(identifier.name);
215615
215602
  cursor = identifier.end;
215616
215603
  }
215617
- return out;
215604
+ return identifiers;
215618
215605
  };
215619
- const collectCallObjectPropertyIdentifiers = (script, functionName, propertyName) => {
215620
- const out = /* @__PURE__ */ new Set();
215606
+ const collectObjectPropertyIdentifiers = (script, target) => {
215607
+ const identifiers = /* @__PURE__ */ new Set();
215621
215608
  let cursor = 0;
215622
215609
  while (cursor < script.length) {
215623
- const callStart = findNextIdentifier(script, functionName, cursor);
215610
+ const callStart = findNextIdentifier(script, target.functionName, cursor);
215624
215611
  if (callStart === -1) break;
215625
- const openParen = skipWhitespace(script, callStart + functionName.length);
215612
+ const openParen = skipWhitespace(script, callStart + target.functionName.length);
215626
215613
  if (script[openParen] !== "(") {
215627
- cursor = callStart + functionName.length;
215614
+ cursor = callStart + target.functionName.length;
215628
215615
  continue;
215629
215616
  }
215630
- const propertyKey = findNextIdentifier(script, propertyName, openParen + 1);
215617
+ const propertyKey = findNextIdentifier(script, target.propertyName, openParen + 1);
215631
215618
  if (propertyKey === -1) {
215632
215619
  cursor = openParen + 1;
215633
215620
  continue;
215634
215621
  }
215635
- const afterProperty = skipWhitespace(script, propertyKey + propertyName.length);
215622
+ const afterProperty = skipWhitespace(script, propertyKey + target.propertyName.length);
215636
215623
  if (script[afterProperty] === ":") {
215637
215624
  const valueStart = skipWhitespace(script, afterProperty + 1);
215638
215625
  const valueEnd = findObjectValueTerminator(script, valueStart);
215639
- if (valueEnd !== -1) for (const identifier of collectExpressionIdentifiers(script, valueStart, valueEnd)) out.add(identifier);
215626
+ if (valueEnd !== -1) for (const identifier of collectExpressionIdentifiers(script, valueStart, valueEnd)) identifiers.add(identifier);
215640
215627
  cursor = valueStart + 1;
215641
215628
  continue;
215642
215629
  }
215643
215630
  if (script[afterProperty] === "}" || script[afterProperty] === ",") {
215644
- out.add(propertyName);
215631
+ identifiers.add(target.propertyName);
215645
215632
  cursor = afterProperty + 1;
215646
215633
  continue;
215647
215634
  }
215648
215635
  cursor = afterProperty + 1;
215649
215636
  }
215650
- return out;
215637
+ return identifiers;
215651
215638
  };
215652
- const callObjectPropertyTargets = [["writeFile", "content"], ["updateTask", "description"]];
215653
- const fixTargetCallObjectPropertyTemplates = (script) => callObjectPropertyTargets.reduce((current, [functionName, propertyName]) => fixCallObjectPropertyTemplate(current, functionName, propertyName), script);
215654
- const fixAssignedTemplate = (script, variableName) => {
215639
+ const rewriteAssignedTemplate = (script, variableName) => rewriteTemplateContents(script, (text, from) => {
215640
+ let cursor = from;
215641
+ while (cursor < text.length) {
215642
+ const variableStart = findNextIdentifier(text, variableName, cursor);
215643
+ if (variableStart === -1) return;
215644
+ let assignmentStart = skipWhitespace(text, variableStart + variableName.length);
215645
+ if (text[assignmentStart] === ":") {
215646
+ assignmentStart = findTypeAnnotationAssignment(text, assignmentStart + 1);
215647
+ if (assignmentStart === -1) {
215648
+ cursor = variableStart + variableName.length;
215649
+ continue;
215650
+ }
215651
+ }
215652
+ if (text[assignmentStart] !== "=" || text[assignmentStart + 1] === "=" || text[assignmentStart + 1] === ">") {
215653
+ cursor = variableStart + variableName.length;
215654
+ continue;
215655
+ }
215656
+ const templateStart = skipWhitespace(text, assignmentStart + 1);
215657
+ if (text[templateStart] !== "`") {
215658
+ cursor = templateStart + 1;
215659
+ continue;
215660
+ }
215661
+ const templateEnd = findTemplateEnd(text, templateStart, (char) => char === void 0 || char === "\n" || char === "\r" || char === ";" || char === "," || char === ")" || char === "}" || char === "]");
215662
+ if (templateEnd === -1) {
215663
+ cursor = templateStart + 1;
215664
+ continue;
215665
+ }
215666
+ return {
215667
+ contentStart: templateStart + 1,
215668
+ contentEnd: templateEnd,
215669
+ nextCursor: templateEnd + 1
215670
+ };
215671
+ }
215672
+ }, escapeTemplateLiteralContent);
215673
+ const rewriteAssignedObjectLiteral = (script, variableName) => {
215655
215674
  let out = script;
215656
215675
  let cursor = 0;
215657
215676
  while (cursor < out.length) {
@@ -215669,42 +215688,62 @@ const fixAssignedTemplate = (script, variableName) => {
215669
215688
  cursor = variableStart + variableName.length;
215670
215689
  continue;
215671
215690
  }
215672
- const templateStart = skipWhitespace(out, assignmentStart + 1);
215673
- if (out[templateStart] !== "`") {
215674
- cursor = templateStart + 1;
215691
+ const objectStart = skipWhitespace(out, assignmentStart + 1);
215692
+ if (out[objectStart] !== "{") {
215693
+ cursor = objectStart + 1;
215675
215694
  continue;
215676
215695
  }
215677
- const templateEnd = findTemplateEnd(out, templateStart, (char) => char === void 0 || char === "\n" || char === "\r" || char === ";" || char === "," || char === ")" || char === "}" || char === "]");
215678
- if (templateEnd === -1) {
215679
- cursor = templateStart + 1;
215696
+ const objectEnd = findClosingBrace(out, objectStart);
215697
+ if (objectEnd === -1) {
215698
+ cursor = objectStart + 1;
215680
215699
  continue;
215681
215700
  }
215682
- const original = out.slice(templateStart + 1, templateEnd);
215683
- const escaped = escapeTemplateLiteralContent(original);
215684
- if (escaped !== original) {
215685
- out = `${out.slice(0, templateStart + 1)}${escaped}${out.slice(templateEnd)}`;
215686
- cursor = templateEnd + (escaped.length - original.length) + 1;
215701
+ const original = out.slice(objectStart, objectEnd + 1);
215702
+ const updated = normalizeObjectLiteralTemplateMarkers(original);
215703
+ if (updated !== original) {
215704
+ out = replaceSlice(out, objectStart, objectEnd + 1, updated);
215705
+ cursor = objectEnd + 1 + (updated.length - original.length);
215687
215706
  continue;
215688
215707
  }
215689
- cursor = templateEnd + 1;
215708
+ cursor = objectEnd + 1;
215690
215709
  }
215691
215710
  return out;
215692
215711
  };
215693
- const fixAssignedTemplatesForToolCalls = (script) => {
215712
+ const escapeRegExp = (text) => text.replace(/[.*+?^${}()|[\\]\\]/g, "\\$&");
215713
+ const collectObjectEntryMapSources = (script, valueIdentifier) => {
215694
215714
  const identifiers = /* @__PURE__ */ new Set();
215695
- for (const functionName of ["applyPatch", "taskComplete"]) for (const identifier of collectCallArgumentIdentifiers(script, functionName)) identifiers.add(identifier);
215696
- for (const [functionName, propertyName] of callObjectPropertyTargets) for (const identifier of collectCallObjectPropertyIdentifiers(script, functionName, propertyName)) identifiers.add(identifier);
215697
- if (script.includes("*** Begin Patch")) identifiers.add("patch");
215698
- const objectTemplateIdentifiers = /* @__PURE__ */ new Set();
215699
- for (const identifier of identifiers) for (const sourceIdentifier of collectObjectEntryMapSources(script, identifier)) objectTemplateIdentifiers.add(sourceIdentifier);
215715
+ const pattern = new RegExp(`Object\\.entries\\(\\s*([A-Za-z_$][A-Za-z0-9_$]*)\\s*\\)\\s*\\.map\\(\\s*(?:async\\s*)?\\(\\s*\\[\\s*[A-Za-z_$][A-Za-z0-9_$]*\\s*,\\s*${escapeRegExp(valueIdentifier)}\\s*\\]\\s*\\)\\s*=>`, "g");
215716
+ for (const match of script.matchAll(pattern)) if (match[1] !== void 0) identifiers.add(match[1]);
215717
+ return identifiers;
215718
+ };
215719
+ const rewriteDirectTemplates = (script) => {
215720
+ let out = script;
215721
+ for (const target of objectPropertyTargets) out = rewriteTemplateContents(out, (text, from) => findObjectPropertyTemplate(text, target, from), escapeTemplateLiteralContent);
215722
+ for (const functionName of callTemplateTargets) out = rewriteTemplateContents(out, (text, from) => findDirectCallTemplate(text, functionName, from), escapeTemplateLiteralContent);
215723
+ return out;
215724
+ };
215725
+ const collectReferencedTemplateIdentifiers = (script) => {
215726
+ const templateIdentifiers = /* @__PURE__ */ new Set();
215727
+ for (const functionName of callTemplateTargets) for (const identifier of collectCallArgumentIdentifiers(script, functionName)) templateIdentifiers.add(identifier);
215728
+ for (const target of objectPropertyTargets) for (const identifier of collectObjectPropertyIdentifiers(script, target)) templateIdentifiers.add(identifier);
215729
+ if (script.includes("*** Begin Patch")) templateIdentifiers.add("patch");
215730
+ const objectIdentifiers = /* @__PURE__ */ new Set();
215731
+ for (const identifier of templateIdentifiers) for (const source of collectObjectEntryMapSources(script, identifier)) objectIdentifiers.add(source);
215732
+ return {
215733
+ templateIdentifiers,
215734
+ objectIdentifiers
215735
+ };
215736
+ };
215737
+ const rewriteAssignedTargets = (script) => {
215738
+ const { templateIdentifiers, objectIdentifiers } = collectReferencedTemplateIdentifiers(script);
215700
215739
  let out = script;
215701
- for (const identifier of identifiers) out = fixAssignedTemplate(out, identifier);
215702
- for (const identifier of objectTemplateIdentifiers) out = fixAssignedObjectTemplateValues(out, identifier);
215740
+ for (const identifier of templateIdentifiers) out = rewriteAssignedTemplate(out, identifier);
215741
+ for (const identifier of objectIdentifiers) out = rewriteAssignedObjectLiteral(out, identifier);
215703
215742
  return out;
215704
215743
  };
215705
- const preprocessScript = (script) => fixAssignedTemplatesForToolCalls(["applyPatch", "taskComplete"].reduce((current, functionName) => fixCallTemplateArgument(current, functionName), fixTargetCallObjectPropertyTemplates(script)));
215744
+ const preprocessScript = (script) => rewriteAssignedTargets(rewriteDirectTemplates(script));
215706
215745
  //#endregion
215707
- //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/AgentExecutor.js
215746
+ //#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/AgentExecutor.js
215708
215747
  /**
215709
215748
  * @since 1.0.0
215710
215749
  */
@@ -215889,7 +215928,7 @@ var QueueWriteStream = class extends Writable {
215889
215928
  }
215890
215929
  };
215891
215930
  //#endregion
215892
- //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/ScriptExtraction.js
215931
+ //#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/ScriptExtraction.js
215893
215932
  const stripWrappingCodeFence = (script) => {
215894
215933
  const lines = script.split(/\r?\n/);
215895
215934
  if (lines.length < 2) return script;
@@ -217438,7 +217477,7 @@ const applySpanTransformer = (transformer, response, options) => {
217438
217477
  });
217439
217478
  };
217440
217479
  //#endregion
217441
- //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/Agent.js
217480
+ //#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/Agent.js
217442
217481
  /**
217443
217482
  * @since 1.0.0
217444
217483
  */
@@ -217488,7 +217527,7 @@ ${content}
217488
217527
  const prompt = opts.disableHistory ? make$77(empty) : history;
217489
217528
  update(prompt, concat(opts.prompt));
217490
217529
  let system = (typeof opts.system === "function" ? opts.system : defaultSystem)({
217491
- toolInstructions: generateSystemTools(capabilities),
217530
+ toolInstructions: generateSystemTools(capabilities, conversationMode),
217492
217531
  agentsMd: getOrElse$2(agentsMd, () => "")
217493
217532
  });
217494
217533
  if (typeof opts.system === "string") system += `\n${opts.system}\n`;
@@ -217728,7 +217767,7 @@ ${options.toolInstructions}
217728
217767
 
217729
217768
  ${options.agentsMd}
217730
217769
  `;
217731
- const generateSystemTools = (capabilities) => `**YOU ONLY HAVE ACCESS TO ONE TOOL** "execute", to run javascript code to do your work.
217770
+ const generateSystemTools = (capabilities, conversationMode) => `**YOU ONLY HAVE ACCESS TO ONE TOOL** "execute", to run javascript code to do your work.
217732
217771
 
217733
217772
  - Use \`console.log\` to print any output you need.
217734
217773
  - Top level await is supported.${capabilities.supportsSearch ? `
@@ -217737,11 +217776,11 @@ const generateSystemTools = (capabilities) => `**YOU ONLY HAVE ACCESS TO ONE TOO
217737
217776
  - You can add / update / remove multiple files in one go with "applyPatch".
217738
217777
  - AVOID passing scripts into the "bash" function, and instead write javascript.
217739
217778
  - **Variables are not shared** between executions, so you must include all necessary code in each script you execute.
217740
- - DO NOT use \`require\`, \`import\`, \`process\`, or any other node.js apis.
217779
+ - DO NOT use \`require\`, \`import\`, \`process\`, or any other node.js apis.${conversationMode ? "" : `
217741
217780
 
217742
217781
  When you have fully completed your task, call the "taskComplete" function with the final output.
217743
217782
  DO NOT output the final result without wrapping it with "taskComplete".
217744
- Make sure every detail of the task is done before calling "taskComplete".
217783
+ Make sure every detail of the task is done before calling "taskComplete".`}
217745
217784
 
217746
217785
  You have these functions available to you:
217747
217786
 
@@ -217827,7 +217866,7 @@ const responseToSummary = (response) => {
217827
217866
  let parts = empty$17();
217828
217867
  for (const message of prompt.content) {
217829
217868
  if (message.role !== "assistant") continue;
217830
- for (const part of message.content) if (part.type === "text" || part.type === "reasoning") parts.push(part.text);
217869
+ for (const part of message.content) if (part.type === "text") parts.push(part.text);
217831
217870
  }
217832
217871
  return parts.join("\n\n");
217833
217872
  };
@@ -228943,7 +228982,7 @@ const transformToolCallParams = /* @__PURE__ */ fnUntraced(function* (tools, too
228943
228982
  })));
228944
228983
  });
228945
228984
  //#endregion
228946
- //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/CodexAuth.js
228985
+ //#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/CodexAuth.js
228947
228986
  /**
228948
228987
  * @since 1.0.0
228949
228988
  */
@@ -229163,7 +229202,7 @@ var CodexAuth = class CodexAuth extends Service$1()("clanka/CodexAuth") {
229163
229202
  static layerClient = this.layerClientNoDeps.pipe(provide$3(CodexAuth.layer));
229164
229203
  };
229165
229204
  //#endregion
229166
- //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/Codex.js
229205
+ //#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/Codex.js
229167
229206
  /**
229168
229207
  * @since 1.0.0
229169
229208
  */
@@ -229189,7 +229228,7 @@ const layerModel = (model, options) => layer$7({
229189
229228
  }
229190
229229
  }).pipe(merge$6(AgentModelConfig.layer({ systemPromptTransform: (system, effect) => withConfigOverride(effect, { instructions: system }) })));
229191
229230
  //#endregion
229192
- //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/CodeChunker.js
229231
+ //#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/CodeChunker.js
229193
229232
  /**
229194
229233
  * @since 1.0.0
229195
229234
  */
@@ -230949,7 +230988,7 @@ const getUsageDetailNumber = (details, field) => {
230949
230988
  return typeof value === "number" ? value : void 0;
230950
230989
  };
230951
230990
  //#endregion
230952
- //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/CopilotAuth.js
230991
+ //#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/CopilotAuth.js
230953
230992
  /**
230954
230993
  * @since 1.0.0
230955
230994
  */
@@ -231140,7 +231179,7 @@ var GithubCopilotAuth = class GithubCopilotAuth extends Service$1()("clanka/Gith
231140
231179
  static layerClient = this.layerClientNoDeps.pipe(provide$3(GithubCopilotAuth.layer));
231141
231180
  };
231142
231181
  //#endregion
231143
- //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/Copilot.js
231182
+ //#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/Copilot.js
231144
231183
  /**
231145
231184
  * @since 1.0.0
231146
231185
  */
@@ -231560,7 +231599,7 @@ Object.defineProperties(createChalk.prototype, styles);
231560
231599
  const chalk = createChalk();
231561
231600
  createChalk({ level: stderrColor ? stderrColor.level : 0 });
231562
231601
  //#endregion
231563
- //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/OutputFormatter.js
231602
+ //#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/OutputFormatter.js
231564
231603
  /**
231565
231604
  * @since 1.0.0
231566
231605
  */
@@ -232046,7 +232085,7 @@ select * from ${sql(options.tableName)} where ${sql(idColumn)} = LAST_INSERT_ID(
232046
232085
  };
232047
232086
  });
232048
232087
  //#endregion
232049
- //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/ChunkRepo.js
232088
+ //#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/ChunkRepo.js
232050
232089
  /**
232051
232090
  * @since 1.0.0
232052
232091
  * @category Models
@@ -232326,7 +232365,7 @@ const run$1 = /* @__PURE__ */ make$25({});
232326
232365
  */
232327
232366
  const layer$1 = (options) => effectDiscard(run$1(options));
232328
232367
  //#endregion
232329
- //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/internal/sqlite-vector.js
232368
+ //#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/internal/sqlite-vector.js
232330
232369
  /**
232331
232370
  * Binary extension for each platform
232332
232371
  */
@@ -232443,7 +232482,7 @@ function getExtensionPath() {
232443
232482
  throw new ExtensionNotFoundError(`SQLite Vector extension not found for platform: ${getCurrentPlatform()}\n\nThe platform-specific package "${getPlatformPackageName()}" is not installed.\nThis usually happens when:\n 1. Your platform is not supported\n 2. npm failed to install optional dependencies\n 3. You're installing with --no-optional flag\n\nTry running: npm install --force`);
232444
232483
  }
232445
232484
  //#endregion
232446
- //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/Sqlite.js
232485
+ //#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/Sqlite.js
232447
232486
  /**
232448
232487
  * @since 1.0.0
232449
232488
  */
@@ -232471,7 +232510,7 @@ const SqliteLayer = (database) => layer$1({ loader: fromRecord({ "0001_create_ch
232471
232510
  yield* fs.makeDirectory(directory, { recursive: true });
232472
232511
  }))));
232473
232512
  //#endregion
232474
- //#region node_modules/.pnpm/clanka@0.2.26_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_e2c2eb248d6de2b9b16a8912ac5ed9e5/node_modules/clanka/dist/SemanticSearch.js
232513
+ //#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/SemanticSearch.js
232475
232514
  /**
232476
232515
  * @since 1.0.0
232477
232516
  */
@@ -241135,6 +241174,23 @@ const runClanka = fnUntraced(function* (options) {
241135
241174
  directory: options.directory,
241136
241175
  tools: options.mode === "ralph" ? void 0 : options.mode === "choose" ? TaskChooseTools : TaskTools
241137
241176
  }).pipe(merge$6(layerClankaModel(options.model))), { local: true }), provide$1([ModelServices, TaskToolsHandlers]));
241177
+ const runClankaPlan = fnUntraced(function* (options) {
241178
+ const stdio = yield* Stdio;
241179
+ const agent = yield* Agent;
241180
+ let nextPrompt = options.prompt;
241181
+ while (true) {
241182
+ yield* (yield* agent.send({
241183
+ prompt: nextPrompt,
241184
+ system: `ONLY call taskComplete by itself. NEVER call taskComplete alongside other functions, to ensure you first read output before deciding a task is done.`
241185
+ })).pipe(pretty({ outputTruncation: 20 }), run$8(stdio.stdout()));
241186
+ console.log("");
241187
+ nextPrompt = yield* text$2({ message: ">" });
241188
+ }
241189
+ }, scoped$1, (effect, options) => provide$1(effect, layerLocal({ directory: options.directory }).pipe(provide$3(SemanticSearchLayer), merge$6(layerClankaModel(options.model))), { local: true }), provide$1([
241190
+ ModelServices,
241191
+ TaskToolsHandlers,
241192
+ ConversationMode.layer(true)
241193
+ ]), ignore$1());
241138
241194
  //#endregion
241139
241195
  //#region src/domain/CurrentTask.ts
241140
241196
  const CurrentTask = taggedEnum();
@@ -241889,6 +241945,14 @@ const agentPlanner = fnUntraced(function* (options) {
241889
241945
  const worktree = yield* Worktree;
241890
241946
  const promptGen = yield* PromptGen;
241891
241947
  const spawner = yield* ChildProcessSpawner;
241948
+ if (options.preset.cliAgent.id === "clanka") {
241949
+ yield* runClankaPlan({
241950
+ directory: worktree.directory,
241951
+ model: options.preset.extraArgs.join(" "),
241952
+ prompt: promptGen.planPrompt(options)
241953
+ });
241954
+ return;
241955
+ }
241892
241956
  yield* pipe$1(options.preset.cliAgent.commandPlan({
241893
241957
  prompt: promptGen.planPrompt(options),
241894
241958
  prdFilePath: options.ralph ? void 0 : pathService.join(".lalph", "prd.yml"),
@@ -242159,7 +242223,7 @@ const commandEdit = make$60("edit").pipe(withDescription("Open the selected proj
242159
242223
  const commandSource = make$60("source").pipe(withDescription("Select the issue source to use (e.g. GitHub Issues or Linear). This applies to all projects."), withHandler(() => selectIssueSource), provide(Settings.layer));
242160
242224
  //#endregion
242161
242225
  //#region package.json
242162
- var version = "0.3.98";
242226
+ var version = "0.3.99";
242163
242227
  //#endregion
242164
242228
  //#region src/Tracing.ts
242165
242229
  const TracingLayer = unwrap$3(gen(function* () {