lalph 0.3.98 → 0.3.100

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
@@ -9047,6 +9047,18 @@ const ignore$2 = /* @__PURE__ */ dual((args) => isEffect$1(args[0]), (self, opti
9047
9047
  });
9048
9048
  });
9049
9049
  /** @internal */
9050
+ const ignoreCause$1 = /* @__PURE__ */ dual((args) => isEffect$1(args[0]), (self, options) => {
9051
+ if (!options?.log) return matchCauseEffect$1(self, {
9052
+ onFailure: (_) => void_$4,
9053
+ onSuccess: (_) => void_$4
9054
+ });
9055
+ const logEffect = logWithLevel$1(options.log === true ? void 0 : options.log);
9056
+ return matchCauseEffect$1(self, {
9057
+ onFailure: (cause) => options.message === void 0 ? logEffect(cause) : logEffect(options.message, cause),
9058
+ onSuccess: (_) => void_$4
9059
+ });
9060
+ });
9061
+ /** @internal */
9050
9062
  const option$2 = (self) => match$6(self, {
9051
9063
  onFailure: none$4,
9052
9064
  onSuccess: some$2
@@ -15670,6 +15682,26 @@ const retry$1 = retry$2;
15670
15682
  */
15671
15683
  const ignore$1 = ignore$2;
15672
15684
  /**
15685
+ * Ignores the effect's failure cause, including defects and interruptions.
15686
+ *
15687
+ * Use the `log` option to emit the full {@link Cause} when the effect fails,
15688
+ * and `message` to prepend a custom log message.
15689
+ *
15690
+ * @example
15691
+ * ```ts
15692
+ * import { Effect } from "effect"
15693
+ *
15694
+ * const task = Effect.fail("boom")
15695
+ *
15696
+ * const program = task.pipe(Effect.ignoreCause)
15697
+ * const programLog = task.pipe(Effect.ignoreCause({ log: true, message: "Ignoring failure cause" }))
15698
+ * ```
15699
+ *
15700
+ * @since 4.0.0
15701
+ * @category Error Handling
15702
+ */
15703
+ const ignoreCause = ignoreCause$1;
15704
+ /**
15673
15705
  * Replaces the original failure with a success value, ensuring the effect
15674
15706
  * cannot fail.
15675
15707
  *
@@ -42571,7 +42603,7 @@ var require_toml = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
42571
42603
  } };
42572
42604
  }));
42573
42605
  //#endregion
42574
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/identity.js
42606
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/identity.js
42575
42607
  var require_identity = /* @__PURE__ */ __commonJSMin$1(((exports) => {
42576
42608
  const ALIAS = Symbol.for("yaml.alias");
42577
42609
  const DOC = Symbol.for("yaml.document");
@@ -42621,7 +42653,7 @@ var require_identity = /* @__PURE__ */ __commonJSMin$1(((exports) => {
42621
42653
  exports.isSeq = isSeq;
42622
42654
  }));
42623
42655
  //#endregion
42624
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/visit.js
42656
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/visit.js
42625
42657
  var require_visit = /* @__PURE__ */ __commonJSMin$1(((exports) => {
42626
42658
  var identity = require_identity();
42627
42659
  const BREAK = Symbol("break visit");
@@ -42811,7 +42843,7 @@ var require_visit = /* @__PURE__ */ __commonJSMin$1(((exports) => {
42811
42843
  exports.visitAsync = visitAsync;
42812
42844
  }));
42813
42845
  //#endregion
42814
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/doc/directives.js
42846
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/directives.js
42815
42847
  var require_directives = /* @__PURE__ */ __commonJSMin$1(((exports) => {
42816
42848
  var identity = require_identity();
42817
42849
  var visit = require_visit();
@@ -42976,7 +43008,7 @@ var require_directives = /* @__PURE__ */ __commonJSMin$1(((exports) => {
42976
43008
  exports.Directives = Directives;
42977
43009
  }));
42978
43010
  //#endregion
42979
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/doc/anchors.js
43011
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/anchors.js
42980
43012
  var require_anchors = /* @__PURE__ */ __commonJSMin$1(((exports) => {
42981
43013
  var identity = require_identity();
42982
43014
  var visit = require_visit();
@@ -43038,7 +43070,7 @@ var require_anchors = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43038
43070
  exports.findNewAnchor = findNewAnchor;
43039
43071
  }));
43040
43072
  //#endregion
43041
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/doc/applyReviver.js
43073
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/applyReviver.js
43042
43074
  var require_applyReviver = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43043
43075
  /**
43044
43076
  * Applies the JSON.parse reviver algorithm as defined in the ECMA-262 spec,
@@ -43078,7 +43110,7 @@ var require_applyReviver = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43078
43110
  exports.applyReviver = applyReviver;
43079
43111
  }));
43080
43112
  //#endregion
43081
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/toJS.js
43113
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/toJS.js
43082
43114
  var require_toJS = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43083
43115
  var identity = require_identity();
43084
43116
  /**
@@ -43115,7 +43147,7 @@ var require_toJS = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43115
43147
  exports.toJS = toJS;
43116
43148
  }));
43117
43149
  //#endregion
43118
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/Node.js
43150
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Node.js
43119
43151
  var require_Node$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43120
43152
  var applyReviver = require_applyReviver();
43121
43153
  var identity = require_identity();
@@ -43149,7 +43181,7 @@ var require_Node$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43149
43181
  exports.NodeBase = NodeBase;
43150
43182
  }));
43151
43183
  //#endregion
43152
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/Alias.js
43184
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Alias.js
43153
43185
  var require_Alias = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43154
43186
  var anchors = require_anchors();
43155
43187
  var visit = require_visit();
@@ -43242,7 +43274,7 @@ var require_Alias = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43242
43274
  exports.Alias = Alias;
43243
43275
  }));
43244
43276
  //#endregion
43245
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/Scalar.js
43277
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Scalar.js
43246
43278
  var require_Scalar = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43247
43279
  var identity = require_identity();
43248
43280
  var Node = require_Node$1();
@@ -43269,7 +43301,7 @@ var require_Scalar = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43269
43301
  exports.isScalarValue = isScalarValue;
43270
43302
  }));
43271
43303
  //#endregion
43272
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/doc/createNode.js
43304
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/createNode.js
43273
43305
  var require_createNode = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43274
43306
  var Alias = require_Alias();
43275
43307
  var identity = require_identity();
@@ -43332,7 +43364,7 @@ var require_createNode = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43332
43364
  exports.createNode = createNode;
43333
43365
  }));
43334
43366
  //#endregion
43335
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/Collection.js
43367
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Collection.js
43336
43368
  var require_Collection = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43337
43369
  var createNode = require_createNode();
43338
43370
  var identity = require_identity();
@@ -43453,7 +43485,7 @@ var require_Collection = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43453
43485
  exports.isEmptyPath = isEmptyPath;
43454
43486
  }));
43455
43487
  //#endregion
43456
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyComment.js
43488
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyComment.js
43457
43489
  var require_stringifyComment = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43458
43490
  /**
43459
43491
  * Stringifies a comment.
@@ -43473,7 +43505,7 @@ var require_stringifyComment = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43473
43505
  exports.stringifyComment = stringifyComment;
43474
43506
  }));
43475
43507
  //#endregion
43476
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/foldFlowLines.js
43508
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/foldFlowLines.js
43477
43509
  var require_foldFlowLines = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43478
43510
  const FOLD_FLOW = "flow";
43479
43511
  const FOLD_BLOCK = "block";
@@ -43589,7 +43621,7 @@ var require_foldFlowLines = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43589
43621
  exports.foldFlowLines = foldFlowLines;
43590
43622
  }));
43591
43623
  //#endregion
43592
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyString.js
43624
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyString.js
43593
43625
  var require_stringifyString = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43594
43626
  var Scalar = require_Scalar();
43595
43627
  var foldFlowLines = require_foldFlowLines();
@@ -43813,7 +43845,7 @@ var require_stringifyString = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43813
43845
  exports.stringifyString = stringifyString;
43814
43846
  }));
43815
43847
  //#endregion
43816
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringify.js
43848
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringify.js
43817
43849
  var require_stringify = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43818
43850
  var anchors = require_anchors();
43819
43851
  var identity = require_identity();
@@ -43836,6 +43868,7 @@ var require_stringify = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43836
43868
  nullStr: "null",
43837
43869
  simpleKeys: false,
43838
43870
  singleQuote: null,
43871
+ trailingComma: false,
43839
43872
  trueStr: "true",
43840
43873
  verifyAliasOrder: true
43841
43874
  }, doc.schema.toStringOptions, options);
@@ -43920,7 +43953,7 @@ var require_stringify = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43920
43953
  exports.stringify = stringify;
43921
43954
  }));
43922
43955
  //#endregion
43923
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyPair.js
43956
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyPair.js
43924
43957
  var require_stringifyPair = /* @__PURE__ */ __commonJSMin$1(((exports) => {
43925
43958
  var identity = require_identity();
43926
43959
  var Scalar = require_Scalar();
@@ -44017,7 +44050,7 @@ var require_stringifyPair = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44017
44050
  exports.stringifyPair = stringifyPair;
44018
44051
  }));
44019
44052
  //#endregion
44020
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/log.js
44053
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/log.js
44021
44054
  var require_log = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44022
44055
  var node_process$2 = __require("process");
44023
44056
  function debug(logLevel, ...messages) {
@@ -44031,7 +44064,7 @@ var require_log = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44031
44064
  exports.warn = warn;
44032
44065
  }));
44033
44066
  //#endregion
44034
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/merge.js
44067
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/merge.js
44035
44068
  var require_merge = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44036
44069
  var identity = require_identity();
44037
44070
  var Scalar = require_Scalar();
@@ -44071,7 +44104,7 @@ var require_merge = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44071
44104
  exports.merge = merge;
44072
44105
  }));
44073
44106
  //#endregion
44074
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/addPairToJSMap.js
44107
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/addPairToJSMap.js
44075
44108
  var require_addPairToJSMap = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44076
44109
  var log = require_log();
44077
44110
  var merge = require_merge();
@@ -44122,7 +44155,7 @@ var require_addPairToJSMap = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44122
44155
  exports.addPairToJSMap = addPairToJSMap;
44123
44156
  }));
44124
44157
  //#endregion
44125
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/Pair.js
44158
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Pair.js
44126
44159
  var require_Pair = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44127
44160
  var createNode = require_createNode();
44128
44161
  var stringifyPair = require_stringifyPair();
@@ -44155,7 +44188,7 @@ var require_Pair = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44155
44188
  exports.createPair = createPair;
44156
44189
  }));
44157
44190
  //#endregion
44158
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyCollection.js
44191
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyCollection.js
44159
44192
  var require_stringifyCollection = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44160
44193
  var identity = require_identity();
44161
44194
  var stringify = require_stringify();
@@ -44239,9 +44272,13 @@ var require_stringifyCollection = /* @__PURE__ */ __commonJSMin$1(((exports) =>
44239
44272
  }
44240
44273
  if (comment) reqNewline = true;
44241
44274
  let str = stringify.stringify(item, itemCtx, () => comment = null);
44275
+ reqNewline || (reqNewline = lines.length > linesAtValue || str.includes("\n"));
44242
44276
  if (i < items.length - 1) str += ",";
44277
+ else if (ctx.options.trailingComma) {
44278
+ if (ctx.options.lineWidth > 0) reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (str.length + 2) > ctx.options.lineWidth);
44279
+ if (reqNewline) str += ",";
44280
+ }
44243
44281
  if (comment) str += stringifyComment.lineComment(str, itemIndent, commentString(comment));
44244
- if (!reqNewline && (lines.length > linesAtValue || str.includes("\n"))) reqNewline = true;
44245
44282
  lines.push(str);
44246
44283
  linesAtValue = lines.length;
44247
44284
  }
@@ -44269,7 +44306,7 @@ var require_stringifyCollection = /* @__PURE__ */ __commonJSMin$1(((exports) =>
44269
44306
  exports.stringifyCollection = stringifyCollection;
44270
44307
  }));
44271
44308
  //#endregion
44272
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/YAMLMap.js
44309
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLMap.js
44273
44310
  var require_YAMLMap = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44274
44311
  var stringifyCollection = require_stringifyCollection();
44275
44312
  var addPairToJSMap = require_addPairToJSMap();
@@ -44378,7 +44415,7 @@ var require_YAMLMap = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44378
44415
  exports.findPair = findPair;
44379
44416
  }));
44380
44417
  //#endregion
44381
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/common/map.js
44418
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/map.js
44382
44419
  var require_map = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44383
44420
  var identity = require_identity();
44384
44421
  var YAMLMap = require_YAMLMap();
@@ -44395,7 +44432,7 @@ var require_map = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44395
44432
  };
44396
44433
  }));
44397
44434
  //#endregion
44398
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/YAMLSeq.js
44435
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLSeq.js
44399
44436
  var require_YAMLSeq = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44400
44437
  var createNode = require_createNode();
44401
44438
  var stringifyCollection = require_stringifyCollection();
@@ -44501,7 +44538,7 @@ var require_YAMLSeq = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44501
44538
  exports.YAMLSeq = YAMLSeq;
44502
44539
  }));
44503
44540
  //#endregion
44504
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/common/seq.js
44541
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/seq.js
44505
44542
  var require_seq = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44506
44543
  var identity = require_identity();
44507
44544
  var YAMLSeq = require_YAMLSeq();
@@ -44518,7 +44555,7 @@ var require_seq = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44518
44555
  };
44519
44556
  }));
44520
44557
  //#endregion
44521
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/common/string.js
44558
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/string.js
44522
44559
  var require_string = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44523
44560
  var stringifyString = require_stringifyString();
44524
44561
  exports.string = {
@@ -44533,7 +44570,7 @@ var require_string = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44533
44570
  };
44534
44571
  }));
44535
44572
  //#endregion
44536
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/common/null.js
44573
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/null.js
44537
44574
  var require_null = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44538
44575
  var Scalar = require_Scalar();
44539
44576
  const nullTag = {
@@ -44548,7 +44585,7 @@ var require_null = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44548
44585
  exports.nullTag = nullTag;
44549
44586
  }));
44550
44587
  //#endregion
44551
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/core/bool.js
44588
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/bool.js
44552
44589
  var require_bool$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44553
44590
  var Scalar = require_Scalar();
44554
44591
  const boolTag = {
@@ -44567,7 +44604,7 @@ var require_bool$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44567
44604
  exports.boolTag = boolTag;
44568
44605
  }));
44569
44606
  //#endregion
44570
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyNumber.js
44607
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyNumber.js
44571
44608
  var require_stringifyNumber = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44572
44609
  function stringifyNumber({ format, minFractionDigits, tag, value }) {
44573
44610
  if (typeof value === "bigint") return String(value);
@@ -44588,7 +44625,7 @@ var require_stringifyNumber = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44588
44625
  exports.stringifyNumber = stringifyNumber;
44589
44626
  }));
44590
44627
  //#endregion
44591
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/core/float.js
44628
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/float.js
44592
44629
  var require_float$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44593
44630
  var Scalar = require_Scalar();
44594
44631
  var stringifyNumber = require_stringifyNumber();
@@ -44629,7 +44666,7 @@ var require_float$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44629
44666
  exports.floatNaN = floatNaN;
44630
44667
  }));
44631
44668
  //#endregion
44632
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/core/int.js
44669
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/int.js
44633
44670
  var require_int$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44634
44671
  var stringifyNumber = require_stringifyNumber();
44635
44672
  const intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
@@ -44670,7 +44707,7 @@ var require_int$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44670
44707
  exports.intOct = intOct;
44671
44708
  }));
44672
44709
  //#endregion
44673
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/core/schema.js
44710
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/schema.js
44674
44711
  var require_schema$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44675
44712
  var map = require_map();
44676
44713
  var _null = require_null();
@@ -44694,7 +44731,7 @@ var require_schema$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44694
44731
  ];
44695
44732
  }));
44696
44733
  //#endregion
44697
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/json/schema.js
44734
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/json/schema.js
44698
44735
  var require_schema$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44699
44736
  var Scalar = require_Scalar();
44700
44737
  var map = require_map();
@@ -44756,7 +44793,7 @@ var require_schema$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44756
44793
  });
44757
44794
  }));
44758
44795
  //#endregion
44759
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/binary.js
44796
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/binary.js
44760
44797
  var require_binary = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44761
44798
  var node_buffer = __require("buffer");
44762
44799
  var Scalar = require_Scalar();
@@ -44804,7 +44841,7 @@ var require_binary = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44804
44841
  };
44805
44842
  }));
44806
44843
  //#endregion
44807
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/pairs.js
44844
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/pairs.js
44808
44845
  var require_pairs = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44809
44846
  var identity = require_identity();
44810
44847
  var Pair = require_Pair();
@@ -44864,7 +44901,7 @@ var require_pairs = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44864
44901
  exports.resolvePairs = resolvePairs;
44865
44902
  }));
44866
44903
  //#endregion
44867
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/omap.js
44904
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/omap.js
44868
44905
  var require_omap = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44869
44906
  var identity = require_identity();
44870
44907
  var toJS = require_toJS();
@@ -44927,7 +44964,7 @@ var require_omap = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44927
44964
  exports.omap = omap;
44928
44965
  }));
44929
44966
  //#endregion
44930
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/bool.js
44967
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/bool.js
44931
44968
  var require_bool = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44932
44969
  var Scalar = require_Scalar();
44933
44970
  function boolStringify({ value, source }, ctx) {
@@ -44954,7 +44991,7 @@ var require_bool = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44954
44991
  exports.trueTag = trueTag;
44955
44992
  }));
44956
44993
  //#endregion
44957
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/float.js
44994
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/float.js
44958
44995
  var require_float = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44959
44996
  var Scalar = require_Scalar();
44960
44997
  var stringifyNumber = require_stringifyNumber();
@@ -44998,7 +45035,7 @@ var require_float = /* @__PURE__ */ __commonJSMin$1(((exports) => {
44998
45035
  exports.floatNaN = floatNaN;
44999
45036
  }));
45000
45037
  //#endregion
45001
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/int.js
45038
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/int.js
45002
45039
  var require_int = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45003
45040
  var stringifyNumber = require_stringifyNumber();
45004
45041
  const intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
@@ -45073,7 +45110,7 @@ var require_int = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45073
45110
  exports.intOct = intOct;
45074
45111
  }));
45075
45112
  //#endregion
45076
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/set.js
45113
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/set.js
45077
45114
  var require_set = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45078
45115
  var identity = require_identity();
45079
45116
  var Pair = require_Pair();
@@ -45141,7 +45178,7 @@ var require_set = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45141
45178
  exports.set = set;
45142
45179
  }));
45143
45180
  //#endregion
45144
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
45181
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
45145
45182
  var require_timestamp = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45146
45183
  var stringifyNumber = require_stringifyNumber();
45147
45184
  /** Internal types handle bigint as number, because TS can't figure it out. */
@@ -45224,7 +45261,7 @@ var require_timestamp = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45224
45261
  exports.timestamp = timestamp;
45225
45262
  }));
45226
45263
  //#endregion
45227
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/schema.js
45264
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/schema.js
45228
45265
  var require_schema = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45229
45266
  var map = require_map();
45230
45267
  var _null = require_null();
@@ -45264,7 +45301,7 @@ var require_schema = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45264
45301
  ];
45265
45302
  }));
45266
45303
  //#endregion
45267
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/tags.js
45304
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/tags.js
45268
45305
  var require_tags = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45269
45306
  var map = require_map();
45270
45307
  var _null = require_null();
@@ -45348,7 +45385,7 @@ var require_tags = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45348
45385
  exports.getTags = getTags;
45349
45386
  }));
45350
45387
  //#endregion
45351
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/Schema.js
45388
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/Schema.js
45352
45389
  var require_Schema = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45353
45390
  var identity = require_identity();
45354
45391
  var map = require_map();
@@ -45376,7 +45413,7 @@ var require_Schema = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45376
45413
  };
45377
45414
  }));
45378
45415
  //#endregion
45379
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyDocument.js
45416
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyDocument.js
45380
45417
  var require_stringifyDocument = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45381
45418
  var identity = require_identity();
45382
45419
  var stringify = require_stringify();
@@ -45437,7 +45474,7 @@ var require_stringifyDocument = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45437
45474
  exports.stringifyDocument = stringifyDocument;
45438
45475
  }));
45439
45476
  //#endregion
45440
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/doc/Document.js
45477
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/Document.js
45441
45478
  var require_Document$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45442
45479
  var Alias = require_Alias();
45443
45480
  var Collection = require_Collection();
@@ -45718,7 +45755,7 @@ var require_Document$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45718
45755
  exports.Document = Document;
45719
45756
  }));
45720
45757
  //#endregion
45721
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/errors.js
45758
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/errors.js
45722
45759
  var require_errors$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45723
45760
  var YAMLError = class extends Error {
45724
45761
  constructor(name, pos, code, message) {
@@ -45771,7 +45808,7 @@ var require_errors$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45771
45808
  exports.prettifyError = prettifyError;
45772
45809
  }));
45773
45810
  //#endregion
45774
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-props.js
45811
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-props.js
45775
45812
  var require_resolve_props = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45776
45813
  function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {
45777
45814
  let spaceBefore = false;
@@ -45878,7 +45915,7 @@ var require_resolve_props = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45878
45915
  exports.resolveProps = resolveProps;
45879
45916
  }));
45880
45917
  //#endregion
45881
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/util-contains-newline.js
45918
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-contains-newline.js
45882
45919
  var require_util_contains_newline = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45883
45920
  function containsNewline(key) {
45884
45921
  if (!key) return null;
@@ -45907,7 +45944,7 @@ var require_util_contains_newline = /* @__PURE__ */ __commonJSMin$1(((exports) =
45907
45944
  exports.containsNewline = containsNewline;
45908
45945
  }));
45909
45946
  //#endregion
45910
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/util-flow-indent-check.js
45947
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-flow-indent-check.js
45911
45948
  var require_util_flow_indent_check = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45912
45949
  var utilContainsNewline = require_util_contains_newline();
45913
45950
  function flowIndentCheck(indent, fc, onError) {
@@ -45919,7 +45956,7 @@ var require_util_flow_indent_check = /* @__PURE__ */ __commonJSMin$1(((exports)
45919
45956
  exports.flowIndentCheck = flowIndentCheck;
45920
45957
  }));
45921
45958
  //#endregion
45922
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/util-map-includes.js
45959
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-map-includes.js
45923
45960
  var require_util_map_includes = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45924
45961
  var identity = require_identity();
45925
45962
  function mapIncludes(ctx, items, search) {
@@ -45931,7 +45968,7 @@ var require_util_map_includes = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45931
45968
  exports.mapIncludes = mapIncludes;
45932
45969
  }));
45933
45970
  //#endregion
45934
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-block-map.js
45971
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-map.js
45935
45972
  var require_resolve_block_map = /* @__PURE__ */ __commonJSMin$1(((exports) => {
45936
45973
  var Pair = require_Pair();
45937
45974
  var YAMLMap = require_YAMLMap();
@@ -46015,7 +46052,7 @@ var require_resolve_block_map = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46015
46052
  exports.resolveBlockMap = resolveBlockMap;
46016
46053
  }));
46017
46054
  //#endregion
46018
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-block-seq.js
46055
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-seq.js
46019
46056
  var require_resolve_block_seq = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46020
46057
  var YAMLSeq = require_YAMLSeq();
46021
46058
  var resolveProps = require_resolve_props();
@@ -46057,7 +46094,7 @@ var require_resolve_block_seq = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46057
46094
  exports.resolveBlockSeq = resolveBlockSeq;
46058
46095
  }));
46059
46096
  //#endregion
46060
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-end.js
46097
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-end.js
46061
46098
  var require_resolve_end = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46062
46099
  function resolveEnd(end, offset, reqSpace, onError) {
46063
46100
  let comment = "";
@@ -46095,7 +46132,7 @@ var require_resolve_end = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46095
46132
  exports.resolveEnd = resolveEnd;
46096
46133
  }));
46097
46134
  //#endregion
46098
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-flow-collection.js
46135
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-collection.js
46099
46136
  var require_resolve_flow_collection = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46100
46137
  var identity = require_identity();
46101
46138
  var Pair = require_Pair();
@@ -46250,7 +46287,7 @@ var require_resolve_flow_collection = /* @__PURE__ */ __commonJSMin$1(((exports)
46250
46287
  exports.resolveFlowCollection = resolveFlowCollection;
46251
46288
  }));
46252
46289
  //#endregion
46253
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/compose-collection.js
46290
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-collection.js
46254
46291
  var require_compose_collection = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46255
46292
  var identity = require_identity();
46256
46293
  var Scalar = require_Scalar();
@@ -46302,7 +46339,7 @@ var require_compose_collection = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46302
46339
  exports.composeCollection = composeCollection;
46303
46340
  }));
46304
46341
  //#endregion
46305
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-block-scalar.js
46342
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-scalar.js
46306
46343
  var require_resolve_block_scalar = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46307
46344
  var Scalar = require_Scalar();
46308
46345
  function resolveBlockScalar(ctx, scalar, onError) {
@@ -46477,7 +46514,7 @@ var require_resolve_block_scalar = /* @__PURE__ */ __commonJSMin$1(((exports) =>
46477
46514
  exports.resolveBlockScalar = resolveBlockScalar;
46478
46515
  }));
46479
46516
  //#endregion
46480
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-flow-scalar.js
46517
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-scalar.js
46481
46518
  var require_resolve_flow_scalar = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46482
46519
  var Scalar = require_Scalar();
46483
46520
  var resolveEnd = require_resolve_end();
@@ -46683,7 +46720,7 @@ var require_resolve_flow_scalar = /* @__PURE__ */ __commonJSMin$1(((exports) =>
46683
46720
  exports.resolveFlowScalar = resolveFlowScalar;
46684
46721
  }));
46685
46722
  //#endregion
46686
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/compose-scalar.js
46723
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-scalar.js
46687
46724
  var require_compose_scalar = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46688
46725
  var identity = require_identity();
46689
46726
  var Scalar = require_Scalar();
@@ -46742,7 +46779,7 @@ var require_compose_scalar = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46742
46779
  exports.composeScalar = composeScalar;
46743
46780
  }));
46744
46781
  //#endregion
46745
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/util-empty-scalar-position.js
46782
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-empty-scalar-position.js
46746
46783
  var require_util_empty_scalar_position = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46747
46784
  function emptyScalarPosition(offset, before, pos) {
46748
46785
  if (before) {
@@ -46769,7 +46806,7 @@ var require_util_empty_scalar_position = /* @__PURE__ */ __commonJSMin$1(((expor
46769
46806
  exports.emptyScalarPosition = emptyScalarPosition;
46770
46807
  }));
46771
46808
  //#endregion
46772
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/compose-node.js
46809
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-node.js
46773
46810
  var require_compose_node = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46774
46811
  var Alias = require_Alias();
46775
46812
  var identity = require_identity();
@@ -46801,14 +46838,18 @@ var require_compose_node = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46801
46838
  case "block-map":
46802
46839
  case "block-seq":
46803
46840
  case "flow-collection":
46804
- node = composeCollection.composeCollection(CN, ctx, token, props, onError);
46805
- if (anchor) node.anchor = anchor.source.substring(1);
46841
+ try {
46842
+ node = composeCollection.composeCollection(CN, ctx, token, props, onError);
46843
+ if (anchor) node.anchor = anchor.source.substring(1);
46844
+ } catch (error) {
46845
+ onError(token, "RESOURCE_EXHAUSTION", error instanceof Error ? error.message : String(error));
46846
+ }
46806
46847
  break;
46807
46848
  default:
46808
46849
  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
46850
  isSrcToken = false;
46811
46851
  }
46852
+ node ?? (node = composeEmptyNode(ctx, token.offset, void 0, null, props, onError));
46812
46853
  if (anchor && node.anchor === "") onError(anchor, "BAD_ALIAS", "Anchor cannot be an empty string");
46813
46854
  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
46855
  if (spaceBefore) node.spaceBefore = true;
@@ -46854,7 +46895,7 @@ var require_compose_node = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46854
46895
  exports.composeNode = composeNode;
46855
46896
  }));
46856
46897
  //#endregion
46857
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/compose-doc.js
46898
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-doc.js
46858
46899
  var require_compose_doc = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46859
46900
  var Document = require_Document$1();
46860
46901
  var composeNode = require_compose_node();
@@ -46896,7 +46937,7 @@ var require_compose_doc = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46896
46937
  exports.composeDoc = composeDoc;
46897
46938
  }));
46898
46939
  //#endregion
46899
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/composer.js
46940
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/composer.js
46900
46941
  var require_composer = /* @__PURE__ */ __commonJSMin$1(((exports) => {
46901
46942
  var node_process$1 = __require("process");
46902
46943
  var directives = require_directives();
@@ -47094,7 +47135,7 @@ var require_composer = /* @__PURE__ */ __commonJSMin$1(((exports) => {
47094
47135
  exports.Composer = Composer;
47095
47136
  }));
47096
47137
  //#endregion
47097
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/cst-scalar.js
47138
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst-scalar.js
47098
47139
  var require_cst_scalar = /* @__PURE__ */ __commonJSMin$1(((exports) => {
47099
47140
  var resolveBlockScalar = require_resolve_block_scalar();
47100
47141
  var resolveFlowScalar = require_resolve_flow_scalar();
@@ -47361,7 +47402,7 @@ var require_cst_scalar = /* @__PURE__ */ __commonJSMin$1(((exports) => {
47361
47402
  exports.setScalarValue = setScalarValue;
47362
47403
  }));
47363
47404
  //#endregion
47364
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/cst-stringify.js
47405
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst-stringify.js
47365
47406
  var require_cst_stringify = /* @__PURE__ */ __commonJSMin$1(((exports) => {
47366
47407
  /**
47367
47408
  * Stringify a CST document, token, or collection item
@@ -47412,7 +47453,7 @@ var require_cst_stringify = /* @__PURE__ */ __commonJSMin$1(((exports) => {
47412
47453
  exports.stringify = stringify;
47413
47454
  }));
47414
47455
  //#endregion
47415
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/cst-visit.js
47456
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst-visit.js
47416
47457
  var require_cst_visit = /* @__PURE__ */ __commonJSMin$1(((exports) => {
47417
47458
  const BREAK = Symbol("break visit");
47418
47459
  const SKIP = Symbol("skip children");
@@ -47503,7 +47544,7 @@ var require_cst_visit = /* @__PURE__ */ __commonJSMin$1(((exports) => {
47503
47544
  exports.visit = visit;
47504
47545
  }));
47505
47546
  //#endregion
47506
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/cst.js
47547
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst.js
47507
47548
  var require_cst = /* @__PURE__ */ __commonJSMin$1(((exports) => {
47508
47549
  var cstScalar = require_cst_scalar();
47509
47550
  var cstStringify = require_cst_stringify();
@@ -47582,7 +47623,7 @@ var require_cst = /* @__PURE__ */ __commonJSMin$1(((exports) => {
47582
47623
  exports.tokenType = tokenType;
47583
47624
  }));
47584
47625
  //#endregion
47585
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/lexer.js
47626
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/lexer.js
47586
47627
  var require_lexer = /* @__PURE__ */ __commonJSMin$1(((exports) => {
47587
47628
  var cst = require_cst();
47588
47629
  function isEmpty(ch) {
@@ -48101,7 +48142,7 @@ var require_lexer = /* @__PURE__ */ __commonJSMin$1(((exports) => {
48101
48142
  exports.Lexer = Lexer;
48102
48143
  }));
48103
48144
  //#endregion
48104
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/line-counter.js
48145
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/line-counter.js
48105
48146
  var require_line_counter = /* @__PURE__ */ __commonJSMin$1(((exports) => {
48106
48147
  /**
48107
48148
  * Tracks newlines during parsing in order to provide an efficient API for
@@ -48148,7 +48189,7 @@ var require_line_counter = /* @__PURE__ */ __commonJSMin$1(((exports) => {
48148
48189
  exports.LineCounter = LineCounter;
48149
48190
  }));
48150
48191
  //#endregion
48151
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/parse/parser.js
48192
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/parser.js
48152
48193
  var require_parser = /* @__PURE__ */ __commonJSMin$1(((exports) => {
48153
48194
  var node_process = __require("process");
48154
48195
  var cst = require_cst();
@@ -49004,7 +49045,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin$1(((exports) => {
49004
49045
  exports.Parser = Parser;
49005
49046
  }));
49006
49047
  //#endregion
49007
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/public-api.js
49048
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/public-api.js
49008
49049
  var require_public_api = /* @__PURE__ */ __commonJSMin$1(((exports) => {
49009
49050
  var composer = require_composer();
49010
49051
  var Document = require_Document$1();
@@ -49091,7 +49132,7 @@ var require_public_api = /* @__PURE__ */ __commonJSMin$1(((exports) => {
49091
49132
  exports.stringify = stringify;
49092
49133
  }));
49093
49134
  //#endregion
49094
- //#region node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/index.js
49135
+ //#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/index.js
49095
49136
  var require_dist$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
49096
49137
  var composer = require_composer();
49097
49138
  var Document = require_Document$1();
@@ -91458,7 +91499,7 @@ const allCliAgents = [
91458
91499
  new CliAgent({
91459
91500
  id: "clanka",
91460
91501
  name: "clanka",
91461
- commandPlan: ({ prompt, prdFilePath, dangerous }) => make$45("opencode", ["--prompt", prdFilePath ? `@${prdFilePath}
91502
+ commandPlan: ({ prompt, prdFilePath, dangerous }) => make$45("clanka", ["--prompt", prdFilePath ? `@${prdFilePath}
91462
91503
 
91463
91504
  ${prompt}` : prompt], {
91464
91505
  extendEnv: true,
@@ -178227,7 +178268,7 @@ var IssueSource = class IssueSource extends Service$1()("lalph/IssueSource") {
178227
178268
  const refs = yield* make$48({
178228
178269
  lookup: fnUntraced(function* (projectId) {
178229
178270
  const ref = yield* make$47(IssuesChange.Internal({ issues: yield* pipe$1(impl.issues(projectId), orElseSucceed(empty$17)) }));
178230
- yield* changes(ref).pipe(switchMap((_) => impl.issues(projectId).pipe(tap$1((issues) => set$3(ref, IssuesChange.External({ issues }))), delay(seconds(30)), fromEffectDrain)), runDrain, forkScoped);
178271
+ yield* changes(ref).pipe(switchMap((_) => impl.issues(projectId).pipe(tap$1((issues) => set$3(ref, IssuesChange.External({ issues }))), ignoreCause, delay(seconds(30)), fromEffectDrain)), runDrain, forkScoped);
178231
178272
  return ref;
178232
178273
  }),
178233
178274
  capacity: Number.MAX_SAFE_INTEGER
@@ -181576,7 +181617,7 @@ var ji = Bt, Ii = Object.assign(Qe, { sync: Bt }), zi = Ut, Bi = Object.assign(e
181576
181617
  });
181577
181618
  Ze.glob = Ze;
181578
181619
  //#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
181620
+ //#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
181621
  /**
181581
181622
  * @since 1.0.0
181582
181623
  */
@@ -196449,7 +196490,7 @@ var StreamableHTTPClientTransport = class {
196449
196490
  }
196450
196491
  };
196451
196492
  //#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
196493
+ //#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
196494
  /**
196454
196495
  * @since 1.0.0
196455
196496
  */
@@ -196494,7 +196535,7 @@ const layer$13 = effect$1(McpClient, gen(function* () {
196494
196535
  });
196495
196536
  }));
196496
196537
  //#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
196538
+ //#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
196539
  /**
196499
196540
  * @since 1.0.0
196500
196541
  */
@@ -211444,7 +211485,7 @@ var require_lib = /* @__PURE__ */ __commonJSMin$1(((exports) => {
211444
211485
  exports.impl = impl;
211445
211486
  }));
211446
211487
  //#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
211488
+ //#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
211489
  /**
211449
211490
  * @since 1.0.0
211450
211491
  */
@@ -214583,7 +214624,7 @@ function isEmptyParamsRecord(indexSignature) {
214583
214624
  return indexSignature.parameter === string$3 && isNever(indexSignature.type);
214584
214625
  }
214585
214626
  //#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
214627
+ //#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
214628
  /**
214588
214629
  * @since 1.0.0
214589
214630
  */
@@ -214609,7 +214650,7 @@ const maybeRemoveFile = (path) => serviceOption(SemanticSearch).pipe(flatMap$4(m
214609
214650
  onSome: (service) => service.removeFile(path)
214610
214651
  })));
214611
214652
  //#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
214653
+ //#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
214654
  /**
214614
214655
  * @since 1.0.0
214615
214656
  */
@@ -214960,7 +215001,7 @@ const AgentToolHandlers = AgentToolHandlersNoDeps.pipe(provide$3([layer$12, laye
214960
215001
  AgentToolHandlersNoDeps.pipe(provide$3([mock(ExaSearch)({}), mock(WebToMarkdown)({})]));
214961
215002
  var ApplyPatchError = class extends TaggedClass$2("ApplyPatchError") {};
214962
215003
  //#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
215004
+ //#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
215005
  const resolveDocumentation = resolveAt("documentation");
214965
215006
  const identifierPattern = /^[$A-Z_a-z][$0-9A-Z_a-z]*$/u;
214966
215007
  const Precedence = {
@@ -215233,7 +215274,7 @@ const render = (schema, options) => {
215233
215274
  return printNode({ text: documentation === void 0 ? rendered.text : `${renderJsDoc(documentation, 0, printerOptions)}${printerOptions.newLine}${rendered.text}` }, printerOptions);
215234
215275
  };
215235
215276
  //#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
215277
+ //#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
215278
  /**
215238
215279
  * @since 1.0.0
215239
215280
  */
@@ -215255,7 +215296,15 @@ declare function ${name}(${params}): Promise<${render(tool.successSchema)}>`);
215255
215296
  }) });
215256
215297
  };
215257
215298
  //#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
215299
+ //#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
215300
+ const callTemplateTargets = ["applyPatch", "taskComplete"];
215301
+ const objectPropertyTargets = [{
215302
+ functionName: "writeFile",
215303
+ propertyName: "content"
215304
+ }, {
215305
+ functionName: "updateTask",
215306
+ propertyName: "description"
215307
+ }];
215259
215308
  const isIdentifierChar = (char) => char !== void 0 && /[A-Za-z0-9_$]/.test(char);
215260
215309
  const isIdentifierStartChar = (char) => char !== void 0 && /[A-Za-z_$]/.test(char);
215261
215310
  const hasIdentifierBoundary = (text, index, length) => !isIdentifierChar(text[index - 1]) && !isIdentifierChar(text[index + length]);
@@ -215268,9 +215317,9 @@ const findNextIdentifier = (text, identifier, from) => {
215268
215317
  return -1;
215269
215318
  };
215270
215319
  const skipWhitespace = (text, start) => {
215271
- let i = start;
215272
- while (i < text.length && /\s/.test(text[i])) i++;
215273
- return i;
215320
+ let index = start;
215321
+ while (index < text.length && /\s/.test(text[index])) index++;
215322
+ return index;
215274
215323
  };
215275
215324
  const parseIdentifier = (text, start) => {
215276
215325
  if (!isIdentifierStartChar(text[start])) return;
@@ -215282,24 +215331,102 @@ const parseIdentifier = (text, start) => {
215282
215331
  };
215283
215332
  };
215284
215333
  const findPreviousNonWhitespace = (text, from) => {
215285
- let i = from;
215286
- while (i >= 0 && /\s/.test(text[i])) i--;
215287
- return i;
215334
+ let index = from;
215335
+ while (index >= 0 && /\s/.test(text[index])) index--;
215336
+ return index;
215288
215337
  };
215289
215338
  const findNextNonWhitespace = (text, from) => {
215290
- let i = from;
215291
- while (i < text.length && /\s/.test(text[i])) i++;
215292
- return i;
215339
+ let index = from;
215340
+ while (index < text.length && /\s/.test(text[index])) index++;
215341
+ return index;
215342
+ };
215343
+ const isEscaped = (text, index) => {
215344
+ let slashCount = 0;
215345
+ let cursor = index - 1;
215346
+ while (cursor >= 0 && text[cursor] === "\\") {
215347
+ slashCount++;
215348
+ cursor--;
215349
+ }
215350
+ return slashCount % 2 === 1;
215351
+ };
215352
+ const needsTemplateEscaping = (text) => {
215353
+ for (let index = 0; index < text.length; index++) {
215354
+ const char = text[index];
215355
+ if (char === "`" && !isEscaped(text, index)) return true;
215356
+ if (char === "$" && text[index + 1] === "{" && !isEscaped(text, index)) return true;
215357
+ }
215358
+ return false;
215359
+ };
215360
+ const findTemplateEnd = (text, start, isTerminator) => {
215361
+ let end = -1;
215362
+ for (let index = start + 1; index < text.length; index++) {
215363
+ if (text[index] !== "`" || isEscaped(text, index)) continue;
215364
+ if (isTerminator(text[index + 1])) {
215365
+ end = index;
215366
+ continue;
215367
+ }
215368
+ if (isTerminator(text[skipWhitespace(text, index + 1)])) end = index;
215369
+ }
215370
+ return end;
215371
+ };
215372
+ const findTypeAnnotationAssignment = (text, start) => {
215373
+ let index = start;
215374
+ while (index < text.length) {
215375
+ const char = text[index];
215376
+ if (char === "=") return index;
215377
+ if (char === "\n" || char === ";") return -1;
215378
+ index++;
215379
+ }
215380
+ return -1;
215381
+ };
215382
+ const findClosingParen = (text, openParen) => {
215383
+ let depth = 1;
215384
+ for (let index = openParen + 1; index < text.length; index++) {
215385
+ const char = text[index];
215386
+ if (char === "(") {
215387
+ depth++;
215388
+ continue;
215389
+ }
215390
+ if (char === ")") {
215391
+ depth--;
215392
+ if (depth === 0) return index;
215393
+ }
215394
+ }
215395
+ return -1;
215396
+ };
215397
+ const findClosingBrace = (text, openBrace) => {
215398
+ let depth = 1;
215399
+ let stringDelimiter;
215400
+ for (let index = openBrace + 1; index < text.length; index++) {
215401
+ const char = text[index];
215402
+ if (stringDelimiter !== void 0) {
215403
+ if (char === stringDelimiter && !isEscaped(text, index)) stringDelimiter = void 0;
215404
+ continue;
215405
+ }
215406
+ if (char === "\"" || char === "'" || char === "`") {
215407
+ stringDelimiter = char;
215408
+ continue;
215409
+ }
215410
+ if (char === "{") {
215411
+ depth++;
215412
+ continue;
215413
+ }
215414
+ if (char === "}") {
215415
+ depth--;
215416
+ if (depth === 0) return index;
215417
+ }
215418
+ }
215419
+ return -1;
215293
215420
  };
215294
215421
  const findObjectValueTerminator = (text, start) => {
215295
215422
  let parenDepth = 0;
215296
215423
  let bracketDepth = 0;
215297
215424
  let braceDepth = 0;
215298
215425
  let stringDelimiter;
215299
- for (let i = start; i < text.length; i++) {
215300
- const char = text[i];
215426
+ for (let index = start; index < text.length; index++) {
215427
+ const char = text[index];
215301
215428
  if (stringDelimiter !== void 0) {
215302
- if (char === stringDelimiter && !isEscaped(text, i)) stringDelimiter = void 0;
215429
+ if (char === stringDelimiter && !isEscaped(text, index)) stringDelimiter = void 0;
215303
215430
  continue;
215304
215431
  }
215305
215432
  if (char === "\"" || char === "'" || char === "`") {
@@ -215327,16 +215454,16 @@ const findObjectValueTerminator = (text, start) => {
215327
215454
  continue;
215328
215455
  }
215329
215456
  if (char === "}") {
215330
- if (parenDepth === 0 && bracketDepth === 0 && braceDepth === 0) return i;
215457
+ if (parenDepth === 0 && bracketDepth === 0 && braceDepth === 0) return index;
215331
215458
  if (braceDepth > 0) braceDepth--;
215332
215459
  continue;
215333
215460
  }
215334
- if (char === "," && parenDepth === 0 && bracketDepth === 0 && braceDepth === 0) return i;
215461
+ if (char === "," && parenDepth === 0 && bracketDepth === 0 && braceDepth === 0) return index;
215335
215462
  }
215336
215463
  return -1;
215337
215464
  };
215338
215465
  const collectExpressionIdentifiers = (text, start, end) => {
215339
- const out = /* @__PURE__ */ new Set();
215466
+ const identifiers = /* @__PURE__ */ new Set();
215340
215467
  let cursor = start;
215341
215468
  while (cursor < end) {
215342
215469
  const identifier = parseIdentifier(text, cursor);
@@ -215344,29 +215471,12 @@ const collectExpressionIdentifiers = (text, start, end) => {
215344
215471
  cursor++;
215345
215472
  continue;
215346
215473
  }
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);
215474
+ const previous = findPreviousNonWhitespace(text, cursor - 1);
215475
+ const next = findNextNonWhitespace(text, identifier.end);
215476
+ if (text[previous] !== "." && text[next] !== "." && text[next] !== "(") identifiers.add(identifier.name);
215350
215477
  cursor = identifier.end;
215351
215478
  }
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;
215479
+ return identifiers;
215370
215480
  };
215371
215481
  const normalizePatchEscapedQuotes = (text) => text.includes("*** Begin Patch") ? text.replace(/\\"([A-Za-z0-9_$.-]+)\\"/g, (match, content, index) => {
215372
215482
  const previous = text[findPreviousNonWhitespace(text, index - 1)];
@@ -215376,26 +215486,26 @@ const normalizePatchEscapedQuotes = (text) => text.includes("*** Begin Patch") ?
215376
215486
  }) : text;
215377
215487
  const normalizeNonPatchEscapedTemplateMarkers = (text) => text.replace(/\\{2,}(?=`|\$\{)/g, "\\").replace(/(^|\s)\\+(?=\.[A-Za-z0-9_-]+\/)/g, "$1");
215378
215488
  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;
215489
+ const patchNormalized = normalizePatchEscapedQuotes(text);
215490
+ const isPatchContent = patchNormalized.includes("*** Begin Patch");
215491
+ const normalized = isPatchContent ? patchNormalized : normalizeNonPatchEscapedTemplateMarkers(patchNormalized);
215492
+ if (!needsTemplateEscaping(normalized) && !(isPatchContent && normalized.includes("\\\""))) return normalized;
215383
215493
  let out = "";
215384
- for (let i = 0; i < normalized.length; i++) {
215385
- const char = normalized[i];
215494
+ for (let index = 0; index < normalized.length; index++) {
215495
+ const char = normalized[index];
215386
215496
  if (char === "\\") {
215387
- if (!isPatchContent && (normalized[i + 1] === "`" || normalized[i + 1] === "$" && normalized[i + 2] === "{")) {
215497
+ if (normalized[index + 1] === "`" && isEscaped(normalized, index + 1) || normalized[index + 1] === "$" && normalized[index + 2] === "{" && isEscaped(normalized, index + 1)) {
215388
215498
  out += "\\";
215389
215499
  continue;
215390
215500
  }
215391
215501
  out += "\\\\";
215392
215502
  continue;
215393
215503
  }
215394
- if (char === "`" && !isEscaped(normalized, i)) {
215504
+ if (char === "`" && !isEscaped(normalized, index)) {
215395
215505
  out += "\\`";
215396
215506
  continue;
215397
215507
  }
215398
- if (char === "$" && normalized[i + 1] === "{" && !isEscaped(normalized, i)) {
215508
+ if (char === "$" && normalized[index + 1] === "{" && !isEscaped(normalized, index)) {
215399
215509
  out += "\\$";
215400
215510
  continue;
215401
215511
  }
@@ -215403,199 +215513,108 @@ const escapeTemplateLiteralContent = (text) => {
215403
215513
  }
215404
215514
  return out;
215405
215515
  };
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) => {
215516
+ const normalizeObjectLiteralTemplateMarkers = (text) => text.replace(/\\{2,}(?=`|\$\{)/g, "\\");
215517
+ const replaceSlice = (text, start, end, replacement) => `${text.slice(0, start)}${replacement}${text.slice(end)}`;
215518
+ const rewriteTemplateContents = (script, findNext, rewrite) => {
215469
215519
  let out = script;
215470
215520
  let cursor = 0;
215471
215521
  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;
215522
+ const range = findNext(out, cursor);
215523
+ if (range === void 0) break;
215524
+ const original = out.slice(range.contentStart, range.contentEnd);
215525
+ const updated = rewrite(original);
215526
+ if (updated !== original) {
215527
+ out = replaceSlice(out, range.contentStart, range.contentEnd, updated);
215528
+ cursor = range.nextCursor + (updated.length - original.length);
215489
215529
  continue;
215490
215530
  }
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;
215531
+ cursor = range.nextCursor;
215504
215532
  }
215505
215533
  return out;
215506
215534
  };
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] !== "(") {
215535
+ const findDirectCallTemplate = (text, functionName, from) => {
215536
+ let cursor = from;
215537
+ while (cursor < text.length) {
215538
+ const callStart = findNextIdentifier(text, functionName, cursor);
215539
+ if (callStart === -1) return;
215540
+ const openParen = skipWhitespace(text, callStart + functionName.length);
215541
+ if (text[openParen] !== "(") {
215531
215542
  cursor = callStart + functionName.length;
215532
215543
  continue;
215533
215544
  }
215534
- const templateStart = skipWhitespace(out, openParen + 1);
215535
- if (out[templateStart] !== "`") {
215545
+ const templateStart = skipWhitespace(text, openParen + 1);
215546
+ if (text[templateStart] !== "`") {
215536
215547
  cursor = openParen + 1;
215537
215548
  continue;
215538
215549
  }
215539
- const templateEnd = findCallTemplateEnd(out, templateStart, openParen);
215550
+ const closeParen = findClosingParen(text, openParen);
215551
+ let templateEnd = -1;
215552
+ if (closeParen !== -1) {
215553
+ for (let index = closeParen - 1; index > templateStart; index--) if (text[index] === "`" && !isEscaped(text, index)) {
215554
+ templateEnd = index;
215555
+ break;
215556
+ }
215557
+ } else {
215558
+ const patchEnd = text.indexOf("*** End Patch", templateStart);
215559
+ const searchStart = patchEnd === -1 ? templateStart + 1 : patchEnd + 1;
215560
+ for (let index = searchStart; index < text.length; index++) {
215561
+ if (text[index] !== "`" || isEscaped(text, index)) continue;
215562
+ if (text[skipWhitespace(text, index + 1)] === ")") {
215563
+ templateEnd = index;
215564
+ break;
215565
+ }
215566
+ }
215567
+ }
215540
215568
  if (templateEnd === -1) {
215541
215569
  cursor = templateStart + 1;
215542
215570
  continue;
215543
215571
  }
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;
215572
+ return {
215573
+ contentStart: templateStart + 1,
215574
+ contentEnd: templateEnd,
215575
+ nextCursor: templateEnd + 1
215576
+ };
215552
215577
  }
215553
- return out;
215554
215578
  };
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;
215579
+ const findObjectPropertyTemplate = (text, target, from) => {
215580
+ let cursor = from;
215581
+ while (cursor < text.length) {
215582
+ const callStart = findNextIdentifier(text, target.functionName, cursor);
215583
+ if (callStart === -1) return;
215584
+ const openParen = skipWhitespace(text, callStart + target.functionName.length);
215585
+ if (text[openParen] !== "(") {
215586
+ cursor = callStart + target.functionName.length;
215564
215587
  continue;
215565
215588
  }
215566
- const propertyKey = findNextIdentifier(out, propertyName, openParen + 1);
215589
+ const propertyKey = findNextIdentifier(text, target.propertyName, openParen + 1);
215567
215590
  if (propertyKey === -1) {
215568
215591
  cursor = openParen + 1;
215569
215592
  continue;
215570
215593
  }
215571
- const colon = skipWhitespace(out, propertyKey + propertyName.length);
215572
- if (out[colon] !== ":") {
215573
- cursor = propertyKey + propertyName.length;
215594
+ const colon = skipWhitespace(text, propertyKey + target.propertyName.length);
215595
+ if (text[colon] !== ":") {
215596
+ cursor = propertyKey + target.propertyName.length;
215574
215597
  continue;
215575
215598
  }
215576
- const templateStart = skipWhitespace(out, colon + 1);
215577
- if (out[templateStart] !== "`") {
215599
+ const templateStart = skipWhitespace(text, colon + 1);
215600
+ if (text[templateStart] !== "`") {
215578
215601
  cursor = templateStart + 1;
215579
215602
  continue;
215580
215603
  }
215581
- const templateEnd = findTemplateEnd(out, templateStart, (char) => char === "}" || char === ",");
215604
+ const templateEnd = findTemplateEnd(text, templateStart, (char) => char === "}" || char === ",");
215582
215605
  if (templateEnd === -1) {
215583
215606
  cursor = templateStart + 1;
215584
215607
  continue;
215585
215608
  }
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;
215609
+ return {
215610
+ contentStart: templateStart + 1,
215611
+ contentEnd: templateEnd,
215612
+ nextCursor: templateEnd + 1
215613
+ };
215594
215614
  }
215595
- return out;
215596
215615
  };
215597
215616
  const collectCallArgumentIdentifiers = (script, functionName) => {
215598
- const out = /* @__PURE__ */ new Set();
215617
+ const identifiers = /* @__PURE__ */ new Set();
215599
215618
  let cursor = 0;
215600
215619
  while (cursor < script.length) {
215601
215620
  const callStart = findNextIdentifier(script, functionName, cursor);
@@ -215611,47 +215630,79 @@ const collectCallArgumentIdentifiers = (script, functionName) => {
215611
215630
  continue;
215612
215631
  }
215613
215632
  const argumentEnd = skipWhitespace(script, identifier.end);
215614
- if (script[argumentEnd] === ")" || script[argumentEnd] === ",") out.add(identifier.name);
215633
+ if (script[argumentEnd] === ")" || script[argumentEnd] === ",") identifiers.add(identifier.name);
215615
215634
  cursor = identifier.end;
215616
215635
  }
215617
- return out;
215636
+ return identifiers;
215618
215637
  };
215619
- const collectCallObjectPropertyIdentifiers = (script, functionName, propertyName) => {
215620
- const out = /* @__PURE__ */ new Set();
215638
+ const collectObjectPropertyIdentifiers = (script, target) => {
215639
+ const identifiers = /* @__PURE__ */ new Set();
215621
215640
  let cursor = 0;
215622
215641
  while (cursor < script.length) {
215623
- const callStart = findNextIdentifier(script, functionName, cursor);
215642
+ const callStart = findNextIdentifier(script, target.functionName, cursor);
215624
215643
  if (callStart === -1) break;
215625
- const openParen = skipWhitespace(script, callStart + functionName.length);
215644
+ const openParen = skipWhitespace(script, callStart + target.functionName.length);
215626
215645
  if (script[openParen] !== "(") {
215627
- cursor = callStart + functionName.length;
215646
+ cursor = callStart + target.functionName.length;
215628
215647
  continue;
215629
215648
  }
215630
- const propertyKey = findNextIdentifier(script, propertyName, openParen + 1);
215649
+ const propertyKey = findNextIdentifier(script, target.propertyName, openParen + 1);
215631
215650
  if (propertyKey === -1) {
215632
215651
  cursor = openParen + 1;
215633
215652
  continue;
215634
215653
  }
215635
- const afterProperty = skipWhitespace(script, propertyKey + propertyName.length);
215654
+ const afterProperty = skipWhitespace(script, propertyKey + target.propertyName.length);
215636
215655
  if (script[afterProperty] === ":") {
215637
215656
  const valueStart = skipWhitespace(script, afterProperty + 1);
215638
215657
  const valueEnd = findObjectValueTerminator(script, valueStart);
215639
- if (valueEnd !== -1) for (const identifier of collectExpressionIdentifiers(script, valueStart, valueEnd)) out.add(identifier);
215658
+ if (valueEnd !== -1) for (const identifier of collectExpressionIdentifiers(script, valueStart, valueEnd)) identifiers.add(identifier);
215640
215659
  cursor = valueStart + 1;
215641
215660
  continue;
215642
215661
  }
215643
215662
  if (script[afterProperty] === "}" || script[afterProperty] === ",") {
215644
- out.add(propertyName);
215663
+ identifiers.add(target.propertyName);
215645
215664
  cursor = afterProperty + 1;
215646
215665
  continue;
215647
215666
  }
215648
215667
  cursor = afterProperty + 1;
215649
215668
  }
215650
- return out;
215669
+ return identifiers;
215651
215670
  };
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) => {
215671
+ const rewriteAssignedTemplate = (script, variableName) => rewriteTemplateContents(script, (text, from) => {
215672
+ let cursor = from;
215673
+ while (cursor < text.length) {
215674
+ const variableStart = findNextIdentifier(text, variableName, cursor);
215675
+ if (variableStart === -1) return;
215676
+ let assignmentStart = skipWhitespace(text, variableStart + variableName.length);
215677
+ if (text[assignmentStart] === ":") {
215678
+ assignmentStart = findTypeAnnotationAssignment(text, assignmentStart + 1);
215679
+ if (assignmentStart === -1) {
215680
+ cursor = variableStart + variableName.length;
215681
+ continue;
215682
+ }
215683
+ }
215684
+ if (text[assignmentStart] !== "=" || text[assignmentStart + 1] === "=" || text[assignmentStart + 1] === ">") {
215685
+ cursor = variableStart + variableName.length;
215686
+ continue;
215687
+ }
215688
+ const templateStart = skipWhitespace(text, assignmentStart + 1);
215689
+ if (text[templateStart] !== "`") {
215690
+ cursor = templateStart + 1;
215691
+ continue;
215692
+ }
215693
+ const templateEnd = findTemplateEnd(text, templateStart, (char) => char === void 0 || char === "\n" || char === "\r" || char === ";" || char === "," || char === ")" || char === "}" || char === "]");
215694
+ if (templateEnd === -1) {
215695
+ cursor = templateStart + 1;
215696
+ continue;
215697
+ }
215698
+ return {
215699
+ contentStart: templateStart + 1,
215700
+ contentEnd: templateEnd,
215701
+ nextCursor: templateEnd + 1
215702
+ };
215703
+ }
215704
+ }, escapeTemplateLiteralContent);
215705
+ const rewriteAssignedObjectLiteral = (script, variableName) => {
215655
215706
  let out = script;
215656
215707
  let cursor = 0;
215657
215708
  while (cursor < out.length) {
@@ -215669,42 +215720,62 @@ const fixAssignedTemplate = (script, variableName) => {
215669
215720
  cursor = variableStart + variableName.length;
215670
215721
  continue;
215671
215722
  }
215672
- const templateStart = skipWhitespace(out, assignmentStart + 1);
215673
- if (out[templateStart] !== "`") {
215674
- cursor = templateStart + 1;
215723
+ const objectStart = skipWhitespace(out, assignmentStart + 1);
215724
+ if (out[objectStart] !== "{") {
215725
+ cursor = objectStart + 1;
215675
215726
  continue;
215676
215727
  }
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;
215728
+ const objectEnd = findClosingBrace(out, objectStart);
215729
+ if (objectEnd === -1) {
215730
+ cursor = objectStart + 1;
215680
215731
  continue;
215681
215732
  }
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;
215733
+ const original = out.slice(objectStart, objectEnd + 1);
215734
+ const updated = normalizeObjectLiteralTemplateMarkers(original);
215735
+ if (updated !== original) {
215736
+ out = replaceSlice(out, objectStart, objectEnd + 1, updated);
215737
+ cursor = objectEnd + 1 + (updated.length - original.length);
215687
215738
  continue;
215688
215739
  }
215689
- cursor = templateEnd + 1;
215740
+ cursor = objectEnd + 1;
215690
215741
  }
215691
215742
  return out;
215692
215743
  };
215693
- const fixAssignedTemplatesForToolCalls = (script) => {
215744
+ const escapeRegExp = (text) => text.replace(/[.*+?^${}()|[\\]\\]/g, "\\$&");
215745
+ const collectObjectEntryMapSources = (script, valueIdentifier) => {
215694
215746
  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);
215747
+ 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");
215748
+ for (const match of script.matchAll(pattern)) if (match[1] !== void 0) identifiers.add(match[1]);
215749
+ return identifiers;
215750
+ };
215751
+ const rewriteDirectTemplates = (script) => {
215700
215752
  let out = script;
215701
- for (const identifier of identifiers) out = fixAssignedTemplate(out, identifier);
215702
- for (const identifier of objectTemplateIdentifiers) out = fixAssignedObjectTemplateValues(out, identifier);
215753
+ for (const target of objectPropertyTargets) out = rewriteTemplateContents(out, (text, from) => findObjectPropertyTemplate(text, target, from), escapeTemplateLiteralContent);
215754
+ for (const functionName of callTemplateTargets) out = rewriteTemplateContents(out, (text, from) => findDirectCallTemplate(text, functionName, from), escapeTemplateLiteralContent);
215703
215755
  return out;
215704
215756
  };
215705
- const preprocessScript = (script) => fixAssignedTemplatesForToolCalls(["applyPatch", "taskComplete"].reduce((current, functionName) => fixCallTemplateArgument(current, functionName), fixTargetCallObjectPropertyTemplates(script)));
215757
+ const collectReferencedTemplateIdentifiers = (script) => {
215758
+ const templateIdentifiers = /* @__PURE__ */ new Set();
215759
+ for (const functionName of callTemplateTargets) for (const identifier of collectCallArgumentIdentifiers(script, functionName)) templateIdentifiers.add(identifier);
215760
+ for (const target of objectPropertyTargets) for (const identifier of collectObjectPropertyIdentifiers(script, target)) templateIdentifiers.add(identifier);
215761
+ if (script.includes("*** Begin Patch")) templateIdentifiers.add("patch");
215762
+ const objectIdentifiers = /* @__PURE__ */ new Set();
215763
+ for (const identifier of templateIdentifiers) for (const source of collectObjectEntryMapSources(script, identifier)) objectIdentifiers.add(source);
215764
+ return {
215765
+ templateIdentifiers,
215766
+ objectIdentifiers
215767
+ };
215768
+ };
215769
+ const rewriteAssignedTargets = (script) => {
215770
+ const { templateIdentifiers, objectIdentifiers } = collectReferencedTemplateIdentifiers(script);
215771
+ let out = script;
215772
+ for (const identifier of templateIdentifiers) out = rewriteAssignedTemplate(out, identifier);
215773
+ for (const identifier of objectIdentifiers) out = rewriteAssignedObjectLiteral(out, identifier);
215774
+ return out;
215775
+ };
215776
+ const preprocessScript = (script) => rewriteAssignedTargets(rewriteDirectTemplates(script));
215706
215777
  //#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
215778
+ //#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
215779
  /**
215709
215780
  * @since 1.0.0
215710
215781
  */
@@ -215889,7 +215960,7 @@ var QueueWriteStream = class extends Writable {
215889
215960
  }
215890
215961
  };
215891
215962
  //#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
215963
+ //#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
215964
  const stripWrappingCodeFence = (script) => {
215894
215965
  const lines = script.split(/\r?\n/);
215895
215966
  if (lines.length < 2) return script;
@@ -217438,7 +217509,7 @@ const applySpanTransformer = (transformer, response, options) => {
217438
217509
  });
217439
217510
  };
217440
217511
  //#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
217512
+ //#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
217513
  /**
217443
217514
  * @since 1.0.0
217444
217515
  */
@@ -217488,7 +217559,7 @@ ${content}
217488
217559
  const prompt = opts.disableHistory ? make$77(empty) : history;
217489
217560
  update(prompt, concat(opts.prompt));
217490
217561
  let system = (typeof opts.system === "function" ? opts.system : defaultSystem)({
217491
- toolInstructions: generateSystemTools(capabilities),
217562
+ toolInstructions: generateSystemTools(capabilities, conversationMode),
217492
217563
  agentsMd: getOrElse$2(agentsMd, () => "")
217493
217564
  });
217494
217565
  if (typeof opts.system === "string") system += `\n${opts.system}\n`;
@@ -217728,7 +217799,7 @@ ${options.toolInstructions}
217728
217799
 
217729
217800
  ${options.agentsMd}
217730
217801
  `;
217731
- const generateSystemTools = (capabilities) => `**YOU ONLY HAVE ACCESS TO ONE TOOL** "execute", to run javascript code to do your work.
217802
+ const generateSystemTools = (capabilities, conversationMode) => `**YOU ONLY HAVE ACCESS TO ONE TOOL** "execute", to run javascript code to do your work.
217732
217803
 
217733
217804
  - Use \`console.log\` to print any output you need.
217734
217805
  - Top level await is supported.${capabilities.supportsSearch ? `
@@ -217737,11 +217808,11 @@ const generateSystemTools = (capabilities) => `**YOU ONLY HAVE ACCESS TO ONE TOO
217737
217808
  - You can add / update / remove multiple files in one go with "applyPatch".
217738
217809
  - AVOID passing scripts into the "bash" function, and instead write javascript.
217739
217810
  - **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.
217811
+ - DO NOT use \`require\`, \`import\`, \`process\`, or any other node.js apis.${conversationMode ? "" : `
217741
217812
 
217742
217813
  When you have fully completed your task, call the "taskComplete" function with the final output.
217743
217814
  DO NOT output the final result without wrapping it with "taskComplete".
217744
- Make sure every detail of the task is done before calling "taskComplete".
217815
+ Make sure every detail of the task is done before calling "taskComplete".`}
217745
217816
 
217746
217817
  You have these functions available to you:
217747
217818
 
@@ -217827,7 +217898,7 @@ const responseToSummary = (response) => {
217827
217898
  let parts = empty$17();
217828
217899
  for (const message of prompt.content) {
217829
217900
  if (message.role !== "assistant") continue;
217830
- for (const part of message.content) if (part.type === "text" || part.type === "reasoning") parts.push(part.text);
217901
+ for (const part of message.content) if (part.type === "text") parts.push(part.text);
217831
217902
  }
217832
217903
  return parts.join("\n\n");
217833
217904
  };
@@ -228943,7 +229014,7 @@ const transformToolCallParams = /* @__PURE__ */ fnUntraced(function* (tools, too
228943
229014
  })));
228944
229015
  });
228945
229016
  //#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
229017
+ //#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
229018
  /**
228948
229019
  * @since 1.0.0
228949
229020
  */
@@ -229163,7 +229234,7 @@ var CodexAuth = class CodexAuth extends Service$1()("clanka/CodexAuth") {
229163
229234
  static layerClient = this.layerClientNoDeps.pipe(provide$3(CodexAuth.layer));
229164
229235
  };
229165
229236
  //#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
229237
+ //#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
229238
  /**
229168
229239
  * @since 1.0.0
229169
229240
  */
@@ -229189,7 +229260,7 @@ const layerModel = (model, options) => layer$7({
229189
229260
  }
229190
229261
  }).pipe(merge$6(AgentModelConfig.layer({ systemPromptTransform: (system, effect) => withConfigOverride(effect, { instructions: system }) })));
229191
229262
  //#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
229263
+ //#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
229264
  /**
229194
229265
  * @since 1.0.0
229195
229266
  */
@@ -230949,7 +231020,7 @@ const getUsageDetailNumber = (details, field) => {
230949
231020
  return typeof value === "number" ? value : void 0;
230950
231021
  };
230951
231022
  //#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
231023
+ //#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
231024
  /**
230954
231025
  * @since 1.0.0
230955
231026
  */
@@ -231140,7 +231211,7 @@ var GithubCopilotAuth = class GithubCopilotAuth extends Service$1()("clanka/Gith
231140
231211
  static layerClient = this.layerClientNoDeps.pipe(provide$3(GithubCopilotAuth.layer));
231141
231212
  };
231142
231213
  //#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
231214
+ //#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
231215
  /**
231145
231216
  * @since 1.0.0
231146
231217
  */
@@ -231560,7 +231631,7 @@ Object.defineProperties(createChalk.prototype, styles);
231560
231631
  const chalk = createChalk();
231561
231632
  createChalk({ level: stderrColor ? stderrColor.level : 0 });
231562
231633
  //#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
231634
+ //#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
231635
  /**
231565
231636
  * @since 1.0.0
231566
231637
  */
@@ -232046,7 +232117,7 @@ select * from ${sql(options.tableName)} where ${sql(idColumn)} = LAST_INSERT_ID(
232046
232117
  };
232047
232118
  });
232048
232119
  //#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
232120
+ //#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
232121
  /**
232051
232122
  * @since 1.0.0
232052
232123
  * @category Models
@@ -232326,7 +232397,7 @@ const run$1 = /* @__PURE__ */ make$25({});
232326
232397
  */
232327
232398
  const layer$1 = (options) => effectDiscard(run$1(options));
232328
232399
  //#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
232400
+ //#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
232401
  /**
232331
232402
  * Binary extension for each platform
232332
232403
  */
@@ -232443,7 +232514,7 @@ function getExtensionPath() {
232443
232514
  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
232515
  }
232445
232516
  //#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
232517
+ //#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
232518
  /**
232448
232519
  * @since 1.0.0
232449
232520
  */
@@ -232471,7 +232542,7 @@ const SqliteLayer = (database) => layer$1({ loader: fromRecord({ "0001_create_ch
232471
232542
  yield* fs.makeDirectory(directory, { recursive: true });
232472
232543
  }))));
232473
232544
  //#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
232545
+ //#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
232546
  /**
232476
232547
  * @since 1.0.0
232477
232548
  */
@@ -241135,6 +241206,23 @@ const runClanka = fnUntraced(function* (options) {
241135
241206
  directory: options.directory,
241136
241207
  tools: options.mode === "ralph" ? void 0 : options.mode === "choose" ? TaskChooseTools : TaskTools
241137
241208
  }).pipe(merge$6(layerClankaModel(options.model))), { local: true }), provide$1([ModelServices, TaskToolsHandlers]));
241209
+ const runClankaPlan = fnUntraced(function* (options) {
241210
+ const stdio = yield* Stdio;
241211
+ const agent = yield* Agent;
241212
+ let nextPrompt = options.prompt;
241213
+ while (true) {
241214
+ yield* (yield* agent.send({
241215
+ prompt: nextPrompt,
241216
+ system: `ONLY call taskComplete by itself. NEVER call taskComplete alongside other functions, to ensure you first read output before deciding a task is done.`
241217
+ })).pipe(pretty({ outputTruncation: 20 }), run$8(stdio.stdout()));
241218
+ console.log("");
241219
+ nextPrompt = yield* text$2({ message: ">" });
241220
+ }
241221
+ }, scoped$1, (effect, options) => provide$1(effect, layerLocal({ directory: options.directory }).pipe(provide$3(SemanticSearchLayer), merge$6(layerClankaModel(options.model))), { local: true }), provide$1([
241222
+ ModelServices,
241223
+ TaskToolsHandlers,
241224
+ ConversationMode.layer(true)
241225
+ ]), ignore$1());
241138
241226
  //#endregion
241139
241227
  //#region src/domain/CurrentTask.ts
241140
241228
  const CurrentTask = taggedEnum();
@@ -241889,6 +241977,14 @@ const agentPlanner = fnUntraced(function* (options) {
241889
241977
  const worktree = yield* Worktree;
241890
241978
  const promptGen = yield* PromptGen;
241891
241979
  const spawner = yield* ChildProcessSpawner;
241980
+ if (options.preset.cliAgent.id === "clanka") {
241981
+ yield* runClankaPlan({
241982
+ directory: worktree.directory,
241983
+ model: options.preset.extraArgs.join(" "),
241984
+ prompt: promptGen.planPrompt(options)
241985
+ });
241986
+ return;
241987
+ }
241892
241988
  yield* pipe$1(options.preset.cliAgent.commandPlan({
241893
241989
  prompt: promptGen.planPrompt(options),
241894
241990
  prdFilePath: options.ralph ? void 0 : pathService.join(".lalph", "prd.yml"),
@@ -242159,7 +242255,7 @@ const commandEdit = make$60("edit").pipe(withDescription("Open the selected proj
242159
242255
  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
242256
  //#endregion
242161
242257
  //#region package.json
242162
- var version = "0.3.98";
242258
+ var version = "0.3.100";
242163
242259
  //#endregion
242164
242260
  //#region src/Tracing.ts
242165
242261
  const TracingLayer = unwrap$3(gen(function* () {