lalph 0.3.97 → 0.3.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +453 -363
- package/package.json +4 -4
- package/src/Agents/planner.ts +10 -0
- package/src/Clanka.ts +50 -0
- package/src/CurrentIssueSource.ts +1 -20
- package/src/commands/root.ts +31 -33
- package/src/domain/CliAgent.ts +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -31501,6 +31501,42 @@ const takeUntil = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, predi
|
|
|
31501
31501
|
});
|
|
31502
31502
|
})));
|
|
31503
31503
|
/**
|
|
31504
|
+
* Effectful predicate version of `takeUntil`.
|
|
31505
|
+
*
|
|
31506
|
+
* @example
|
|
31507
|
+
* ```ts
|
|
31508
|
+
* import { Console, Effect, Stream } from "effect"
|
|
31509
|
+
*
|
|
31510
|
+
* const program = Effect.gen(function*() {
|
|
31511
|
+
* const result = yield* Stream.range(1, 5).pipe(
|
|
31512
|
+
* Stream.takeUntilEffect((n) => Effect.succeed(n % 3 === 0)),
|
|
31513
|
+
* Stream.runCollect
|
|
31514
|
+
* )
|
|
31515
|
+
* yield* Console.log(result)
|
|
31516
|
+
* })
|
|
31517
|
+
*
|
|
31518
|
+
* Effect.runPromise(program)
|
|
31519
|
+
* // Output: [ 1, 2, 3 ]
|
|
31520
|
+
* ```
|
|
31521
|
+
*
|
|
31522
|
+
* @since 2.0.0
|
|
31523
|
+
* @category Filtering
|
|
31524
|
+
*/
|
|
31525
|
+
const takeUntilEffect = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, predicate, options) => transformPull(self, (pull, _scope) => sync(() => {
|
|
31526
|
+
let i = 0;
|
|
31527
|
+
let done$6 = false;
|
|
31528
|
+
return gen(function* () {
|
|
31529
|
+
if (done$6) return yield* done();
|
|
31530
|
+
const chunk = yield* pull;
|
|
31531
|
+
for (let j = 0; j < chunk.length; j++) if (yield* predicate(chunk[j], i++)) {
|
|
31532
|
+
done$6 = true;
|
|
31533
|
+
const arr = chunk.slice(0, options?.excludeLast ? j : j + 1);
|
|
31534
|
+
return isReadonlyArrayNonEmpty(arr) ? arr : yield* done();
|
|
31535
|
+
}
|
|
31536
|
+
return chunk;
|
|
31537
|
+
});
|
|
31538
|
+
})));
|
|
31539
|
+
/**
|
|
31504
31540
|
* Drops the first `n` elements from this stream.
|
|
31505
31541
|
*
|
|
31506
31542
|
* @example
|
|
@@ -42535,7 +42571,7 @@ var require_toml = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
|
|
|
42535
42571
|
} };
|
|
42536
42572
|
}));
|
|
42537
42573
|
//#endregion
|
|
42538
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
42574
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/identity.js
|
|
42539
42575
|
var require_identity = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
42540
42576
|
const ALIAS = Symbol.for("yaml.alias");
|
|
42541
42577
|
const DOC = Symbol.for("yaml.document");
|
|
@@ -42585,7 +42621,7 @@ var require_identity = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
42585
42621
|
exports.isSeq = isSeq;
|
|
42586
42622
|
}));
|
|
42587
42623
|
//#endregion
|
|
42588
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
42624
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/visit.js
|
|
42589
42625
|
var require_visit = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
42590
42626
|
var identity = require_identity();
|
|
42591
42627
|
const BREAK = Symbol("break visit");
|
|
@@ -42775,7 +42811,7 @@ var require_visit = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
42775
42811
|
exports.visitAsync = visitAsync;
|
|
42776
42812
|
}));
|
|
42777
42813
|
//#endregion
|
|
42778
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
42814
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/directives.js
|
|
42779
42815
|
var require_directives = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
42780
42816
|
var identity = require_identity();
|
|
42781
42817
|
var visit = require_visit();
|
|
@@ -42940,7 +42976,7 @@ var require_directives = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
42940
42976
|
exports.Directives = Directives;
|
|
42941
42977
|
}));
|
|
42942
42978
|
//#endregion
|
|
42943
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
42979
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/anchors.js
|
|
42944
42980
|
var require_anchors = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
42945
42981
|
var identity = require_identity();
|
|
42946
42982
|
var visit = require_visit();
|
|
@@ -43002,7 +43038,7 @@ var require_anchors = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
43002
43038
|
exports.findNewAnchor = findNewAnchor;
|
|
43003
43039
|
}));
|
|
43004
43040
|
//#endregion
|
|
43005
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
43041
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/applyReviver.js
|
|
43006
43042
|
var require_applyReviver = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
43007
43043
|
/**
|
|
43008
43044
|
* Applies the JSON.parse reviver algorithm as defined in the ECMA-262 spec,
|
|
@@ -43042,7 +43078,7 @@ var require_applyReviver = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
43042
43078
|
exports.applyReviver = applyReviver;
|
|
43043
43079
|
}));
|
|
43044
43080
|
//#endregion
|
|
43045
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
43081
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/toJS.js
|
|
43046
43082
|
var require_toJS = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
43047
43083
|
var identity = require_identity();
|
|
43048
43084
|
/**
|
|
@@ -43079,7 +43115,7 @@ var require_toJS = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
43079
43115
|
exports.toJS = toJS;
|
|
43080
43116
|
}));
|
|
43081
43117
|
//#endregion
|
|
43082
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
43118
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Node.js
|
|
43083
43119
|
var require_Node$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
43084
43120
|
var applyReviver = require_applyReviver();
|
|
43085
43121
|
var identity = require_identity();
|
|
@@ -43113,7 +43149,7 @@ var require_Node$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
43113
43149
|
exports.NodeBase = NodeBase;
|
|
43114
43150
|
}));
|
|
43115
43151
|
//#endregion
|
|
43116
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
43152
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Alias.js
|
|
43117
43153
|
var require_Alias = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
43118
43154
|
var anchors = require_anchors();
|
|
43119
43155
|
var visit = require_visit();
|
|
@@ -43206,7 +43242,7 @@ var require_Alias = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
43206
43242
|
exports.Alias = Alias;
|
|
43207
43243
|
}));
|
|
43208
43244
|
//#endregion
|
|
43209
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
43245
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Scalar.js
|
|
43210
43246
|
var require_Scalar = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
43211
43247
|
var identity = require_identity();
|
|
43212
43248
|
var Node = require_Node$1();
|
|
@@ -43233,7 +43269,7 @@ var require_Scalar = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
43233
43269
|
exports.isScalarValue = isScalarValue;
|
|
43234
43270
|
}));
|
|
43235
43271
|
//#endregion
|
|
43236
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
43272
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/createNode.js
|
|
43237
43273
|
var require_createNode = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
43238
43274
|
var Alias = require_Alias();
|
|
43239
43275
|
var identity = require_identity();
|
|
@@ -43296,7 +43332,7 @@ var require_createNode = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
43296
43332
|
exports.createNode = createNode;
|
|
43297
43333
|
}));
|
|
43298
43334
|
//#endregion
|
|
43299
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
43335
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Collection.js
|
|
43300
43336
|
var require_Collection = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
43301
43337
|
var createNode = require_createNode();
|
|
43302
43338
|
var identity = require_identity();
|
|
@@ -43417,7 +43453,7 @@ var require_Collection = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
43417
43453
|
exports.isEmptyPath = isEmptyPath;
|
|
43418
43454
|
}));
|
|
43419
43455
|
//#endregion
|
|
43420
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
43456
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyComment.js
|
|
43421
43457
|
var require_stringifyComment = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
43422
43458
|
/**
|
|
43423
43459
|
* Stringifies a comment.
|
|
@@ -43437,7 +43473,7 @@ var require_stringifyComment = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
43437
43473
|
exports.stringifyComment = stringifyComment;
|
|
43438
43474
|
}));
|
|
43439
43475
|
//#endregion
|
|
43440
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
43476
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/foldFlowLines.js
|
|
43441
43477
|
var require_foldFlowLines = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
43442
43478
|
const FOLD_FLOW = "flow";
|
|
43443
43479
|
const FOLD_BLOCK = "block";
|
|
@@ -43553,7 +43589,7 @@ var require_foldFlowLines = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
43553
43589
|
exports.foldFlowLines = foldFlowLines;
|
|
43554
43590
|
}));
|
|
43555
43591
|
//#endregion
|
|
43556
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
43592
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyString.js
|
|
43557
43593
|
var require_stringifyString = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
43558
43594
|
var Scalar = require_Scalar();
|
|
43559
43595
|
var foldFlowLines = require_foldFlowLines();
|
|
@@ -43777,7 +43813,7 @@ var require_stringifyString = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
43777
43813
|
exports.stringifyString = stringifyString;
|
|
43778
43814
|
}));
|
|
43779
43815
|
//#endregion
|
|
43780
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
43816
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringify.js
|
|
43781
43817
|
var require_stringify = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
43782
43818
|
var anchors = require_anchors();
|
|
43783
43819
|
var identity = require_identity();
|
|
@@ -43800,6 +43836,7 @@ var require_stringify = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
43800
43836
|
nullStr: "null",
|
|
43801
43837
|
simpleKeys: false,
|
|
43802
43838
|
singleQuote: null,
|
|
43839
|
+
trailingComma: false,
|
|
43803
43840
|
trueStr: "true",
|
|
43804
43841
|
verifyAliasOrder: true
|
|
43805
43842
|
}, doc.schema.toStringOptions, options);
|
|
@@ -43884,7 +43921,7 @@ var require_stringify = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
43884
43921
|
exports.stringify = stringify;
|
|
43885
43922
|
}));
|
|
43886
43923
|
//#endregion
|
|
43887
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
43924
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyPair.js
|
|
43888
43925
|
var require_stringifyPair = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
43889
43926
|
var identity = require_identity();
|
|
43890
43927
|
var Scalar = require_Scalar();
|
|
@@ -43981,7 +44018,7 @@ var require_stringifyPair = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
43981
44018
|
exports.stringifyPair = stringifyPair;
|
|
43982
44019
|
}));
|
|
43983
44020
|
//#endregion
|
|
43984
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
44021
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/log.js
|
|
43985
44022
|
var require_log = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
43986
44023
|
var node_process$2 = __require("process");
|
|
43987
44024
|
function debug(logLevel, ...messages) {
|
|
@@ -43995,7 +44032,7 @@ var require_log = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
43995
44032
|
exports.warn = warn;
|
|
43996
44033
|
}));
|
|
43997
44034
|
//#endregion
|
|
43998
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
44035
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/merge.js
|
|
43999
44036
|
var require_merge = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
44000
44037
|
var identity = require_identity();
|
|
44001
44038
|
var Scalar = require_Scalar();
|
|
@@ -44035,7 +44072,7 @@ var require_merge = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
44035
44072
|
exports.merge = merge;
|
|
44036
44073
|
}));
|
|
44037
44074
|
//#endregion
|
|
44038
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
44075
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/addPairToJSMap.js
|
|
44039
44076
|
var require_addPairToJSMap = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
44040
44077
|
var log = require_log();
|
|
44041
44078
|
var merge = require_merge();
|
|
@@ -44086,7 +44123,7 @@ var require_addPairToJSMap = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
44086
44123
|
exports.addPairToJSMap = addPairToJSMap;
|
|
44087
44124
|
}));
|
|
44088
44125
|
//#endregion
|
|
44089
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
44126
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Pair.js
|
|
44090
44127
|
var require_Pair = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
44091
44128
|
var createNode = require_createNode();
|
|
44092
44129
|
var stringifyPair = require_stringifyPair();
|
|
@@ -44119,7 +44156,7 @@ var require_Pair = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
44119
44156
|
exports.createPair = createPair;
|
|
44120
44157
|
}));
|
|
44121
44158
|
//#endregion
|
|
44122
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
44159
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyCollection.js
|
|
44123
44160
|
var require_stringifyCollection = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
44124
44161
|
var identity = require_identity();
|
|
44125
44162
|
var stringify = require_stringify();
|
|
@@ -44203,9 +44240,13 @@ var require_stringifyCollection = /* @__PURE__ */ __commonJSMin$1(((exports) =>
|
|
|
44203
44240
|
}
|
|
44204
44241
|
if (comment) reqNewline = true;
|
|
44205
44242
|
let str = stringify.stringify(item, itemCtx, () => comment = null);
|
|
44243
|
+
reqNewline || (reqNewline = lines.length > linesAtValue || str.includes("\n"));
|
|
44206
44244
|
if (i < items.length - 1) str += ",";
|
|
44245
|
+
else if (ctx.options.trailingComma) {
|
|
44246
|
+
if (ctx.options.lineWidth > 0) reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (str.length + 2) > ctx.options.lineWidth);
|
|
44247
|
+
if (reqNewline) str += ",";
|
|
44248
|
+
}
|
|
44207
44249
|
if (comment) str += stringifyComment.lineComment(str, itemIndent, commentString(comment));
|
|
44208
|
-
if (!reqNewline && (lines.length > linesAtValue || str.includes("\n"))) reqNewline = true;
|
|
44209
44250
|
lines.push(str);
|
|
44210
44251
|
linesAtValue = lines.length;
|
|
44211
44252
|
}
|
|
@@ -44233,7 +44274,7 @@ var require_stringifyCollection = /* @__PURE__ */ __commonJSMin$1(((exports) =>
|
|
|
44233
44274
|
exports.stringifyCollection = stringifyCollection;
|
|
44234
44275
|
}));
|
|
44235
44276
|
//#endregion
|
|
44236
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
44277
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLMap.js
|
|
44237
44278
|
var require_YAMLMap = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
44238
44279
|
var stringifyCollection = require_stringifyCollection();
|
|
44239
44280
|
var addPairToJSMap = require_addPairToJSMap();
|
|
@@ -44342,7 +44383,7 @@ var require_YAMLMap = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
44342
44383
|
exports.findPair = findPair;
|
|
44343
44384
|
}));
|
|
44344
44385
|
//#endregion
|
|
44345
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
44386
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/map.js
|
|
44346
44387
|
var require_map = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
44347
44388
|
var identity = require_identity();
|
|
44348
44389
|
var YAMLMap = require_YAMLMap();
|
|
@@ -44359,7 +44400,7 @@ var require_map = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
44359
44400
|
};
|
|
44360
44401
|
}));
|
|
44361
44402
|
//#endregion
|
|
44362
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
44403
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLSeq.js
|
|
44363
44404
|
var require_YAMLSeq = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
44364
44405
|
var createNode = require_createNode();
|
|
44365
44406
|
var stringifyCollection = require_stringifyCollection();
|
|
@@ -44465,7 +44506,7 @@ var require_YAMLSeq = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
44465
44506
|
exports.YAMLSeq = YAMLSeq;
|
|
44466
44507
|
}));
|
|
44467
44508
|
//#endregion
|
|
44468
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
44509
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/seq.js
|
|
44469
44510
|
var require_seq = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
44470
44511
|
var identity = require_identity();
|
|
44471
44512
|
var YAMLSeq = require_YAMLSeq();
|
|
@@ -44482,7 +44523,7 @@ var require_seq = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
44482
44523
|
};
|
|
44483
44524
|
}));
|
|
44484
44525
|
//#endregion
|
|
44485
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
44526
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/string.js
|
|
44486
44527
|
var require_string = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
44487
44528
|
var stringifyString = require_stringifyString();
|
|
44488
44529
|
exports.string = {
|
|
@@ -44497,7 +44538,7 @@ var require_string = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
44497
44538
|
};
|
|
44498
44539
|
}));
|
|
44499
44540
|
//#endregion
|
|
44500
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
44541
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/null.js
|
|
44501
44542
|
var require_null = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
44502
44543
|
var Scalar = require_Scalar();
|
|
44503
44544
|
const nullTag = {
|
|
@@ -44512,7 +44553,7 @@ var require_null = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
44512
44553
|
exports.nullTag = nullTag;
|
|
44513
44554
|
}));
|
|
44514
44555
|
//#endregion
|
|
44515
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
44556
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/bool.js
|
|
44516
44557
|
var require_bool$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
44517
44558
|
var Scalar = require_Scalar();
|
|
44518
44559
|
const boolTag = {
|
|
@@ -44531,7 +44572,7 @@ var require_bool$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
44531
44572
|
exports.boolTag = boolTag;
|
|
44532
44573
|
}));
|
|
44533
44574
|
//#endregion
|
|
44534
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
44575
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyNumber.js
|
|
44535
44576
|
var require_stringifyNumber = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
44536
44577
|
function stringifyNumber({ format, minFractionDigits, tag, value }) {
|
|
44537
44578
|
if (typeof value === "bigint") return String(value);
|
|
@@ -44552,7 +44593,7 @@ var require_stringifyNumber = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
44552
44593
|
exports.stringifyNumber = stringifyNumber;
|
|
44553
44594
|
}));
|
|
44554
44595
|
//#endregion
|
|
44555
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
44596
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/float.js
|
|
44556
44597
|
var require_float$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
44557
44598
|
var Scalar = require_Scalar();
|
|
44558
44599
|
var stringifyNumber = require_stringifyNumber();
|
|
@@ -44593,7 +44634,7 @@ var require_float$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
44593
44634
|
exports.floatNaN = floatNaN;
|
|
44594
44635
|
}));
|
|
44595
44636
|
//#endregion
|
|
44596
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
44637
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/int.js
|
|
44597
44638
|
var require_int$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
44598
44639
|
var stringifyNumber = require_stringifyNumber();
|
|
44599
44640
|
const intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
@@ -44634,7 +44675,7 @@ var require_int$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
44634
44675
|
exports.intOct = intOct;
|
|
44635
44676
|
}));
|
|
44636
44677
|
//#endregion
|
|
44637
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
44678
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/schema.js
|
|
44638
44679
|
var require_schema$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
44639
44680
|
var map = require_map();
|
|
44640
44681
|
var _null = require_null();
|
|
@@ -44658,7 +44699,7 @@ var require_schema$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
44658
44699
|
];
|
|
44659
44700
|
}));
|
|
44660
44701
|
//#endregion
|
|
44661
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
44702
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/json/schema.js
|
|
44662
44703
|
var require_schema$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
44663
44704
|
var Scalar = require_Scalar();
|
|
44664
44705
|
var map = require_map();
|
|
@@ -44720,7 +44761,7 @@ var require_schema$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
44720
44761
|
});
|
|
44721
44762
|
}));
|
|
44722
44763
|
//#endregion
|
|
44723
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
44764
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/binary.js
|
|
44724
44765
|
var require_binary = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
44725
44766
|
var node_buffer = __require("buffer");
|
|
44726
44767
|
var Scalar = require_Scalar();
|
|
@@ -44768,7 +44809,7 @@ var require_binary = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
44768
44809
|
};
|
|
44769
44810
|
}));
|
|
44770
44811
|
//#endregion
|
|
44771
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
44812
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/pairs.js
|
|
44772
44813
|
var require_pairs = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
44773
44814
|
var identity = require_identity();
|
|
44774
44815
|
var Pair = require_Pair();
|
|
@@ -44828,7 +44869,7 @@ var require_pairs = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
44828
44869
|
exports.resolvePairs = resolvePairs;
|
|
44829
44870
|
}));
|
|
44830
44871
|
//#endregion
|
|
44831
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
44872
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/omap.js
|
|
44832
44873
|
var require_omap = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
44833
44874
|
var identity = require_identity();
|
|
44834
44875
|
var toJS = require_toJS();
|
|
@@ -44891,7 +44932,7 @@ var require_omap = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
44891
44932
|
exports.omap = omap;
|
|
44892
44933
|
}));
|
|
44893
44934
|
//#endregion
|
|
44894
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
44935
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/bool.js
|
|
44895
44936
|
var require_bool = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
44896
44937
|
var Scalar = require_Scalar();
|
|
44897
44938
|
function boolStringify({ value, source }, ctx) {
|
|
@@ -44918,7 +44959,7 @@ var require_bool = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
44918
44959
|
exports.trueTag = trueTag;
|
|
44919
44960
|
}));
|
|
44920
44961
|
//#endregion
|
|
44921
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
44962
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/float.js
|
|
44922
44963
|
var require_float = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
44923
44964
|
var Scalar = require_Scalar();
|
|
44924
44965
|
var stringifyNumber = require_stringifyNumber();
|
|
@@ -44962,7 +45003,7 @@ var require_float = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
44962
45003
|
exports.floatNaN = floatNaN;
|
|
44963
45004
|
}));
|
|
44964
45005
|
//#endregion
|
|
44965
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
45006
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/int.js
|
|
44966
45007
|
var require_int = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
44967
45008
|
var stringifyNumber = require_stringifyNumber();
|
|
44968
45009
|
const intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
@@ -45037,7 +45078,7 @@ var require_int = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
45037
45078
|
exports.intOct = intOct;
|
|
45038
45079
|
}));
|
|
45039
45080
|
//#endregion
|
|
45040
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
45081
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/set.js
|
|
45041
45082
|
var require_set = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
45042
45083
|
var identity = require_identity();
|
|
45043
45084
|
var Pair = require_Pair();
|
|
@@ -45105,7 +45146,7 @@ var require_set = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
45105
45146
|
exports.set = set;
|
|
45106
45147
|
}));
|
|
45107
45148
|
//#endregion
|
|
45108
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
45149
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
|
|
45109
45150
|
var require_timestamp = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
45110
45151
|
var stringifyNumber = require_stringifyNumber();
|
|
45111
45152
|
/** Internal types handle bigint as number, because TS can't figure it out. */
|
|
@@ -45188,7 +45229,7 @@ var require_timestamp = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
45188
45229
|
exports.timestamp = timestamp;
|
|
45189
45230
|
}));
|
|
45190
45231
|
//#endregion
|
|
45191
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
45232
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/schema.js
|
|
45192
45233
|
var require_schema = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
45193
45234
|
var map = require_map();
|
|
45194
45235
|
var _null = require_null();
|
|
@@ -45228,7 +45269,7 @@ var require_schema = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
45228
45269
|
];
|
|
45229
45270
|
}));
|
|
45230
45271
|
//#endregion
|
|
45231
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
45272
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/tags.js
|
|
45232
45273
|
var require_tags = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
45233
45274
|
var map = require_map();
|
|
45234
45275
|
var _null = require_null();
|
|
@@ -45312,7 +45353,7 @@ var require_tags = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
45312
45353
|
exports.getTags = getTags;
|
|
45313
45354
|
}));
|
|
45314
45355
|
//#endregion
|
|
45315
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
45356
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/Schema.js
|
|
45316
45357
|
var require_Schema = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
45317
45358
|
var identity = require_identity();
|
|
45318
45359
|
var map = require_map();
|
|
@@ -45340,7 +45381,7 @@ var require_Schema = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
45340
45381
|
};
|
|
45341
45382
|
}));
|
|
45342
45383
|
//#endregion
|
|
45343
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
45384
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyDocument.js
|
|
45344
45385
|
var require_stringifyDocument = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
45345
45386
|
var identity = require_identity();
|
|
45346
45387
|
var stringify = require_stringify();
|
|
@@ -45401,7 +45442,7 @@ var require_stringifyDocument = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
45401
45442
|
exports.stringifyDocument = stringifyDocument;
|
|
45402
45443
|
}));
|
|
45403
45444
|
//#endregion
|
|
45404
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
45445
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/Document.js
|
|
45405
45446
|
var require_Document$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
45406
45447
|
var Alias = require_Alias();
|
|
45407
45448
|
var Collection = require_Collection();
|
|
@@ -45682,7 +45723,7 @@ var require_Document$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
45682
45723
|
exports.Document = Document;
|
|
45683
45724
|
}));
|
|
45684
45725
|
//#endregion
|
|
45685
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
45726
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/errors.js
|
|
45686
45727
|
var require_errors$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
45687
45728
|
var YAMLError = class extends Error {
|
|
45688
45729
|
constructor(name, pos, code, message) {
|
|
@@ -45735,7 +45776,7 @@ var require_errors$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
45735
45776
|
exports.prettifyError = prettifyError;
|
|
45736
45777
|
}));
|
|
45737
45778
|
//#endregion
|
|
45738
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
45779
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-props.js
|
|
45739
45780
|
var require_resolve_props = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
45740
45781
|
function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {
|
|
45741
45782
|
let spaceBefore = false;
|
|
@@ -45842,7 +45883,7 @@ var require_resolve_props = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
45842
45883
|
exports.resolveProps = resolveProps;
|
|
45843
45884
|
}));
|
|
45844
45885
|
//#endregion
|
|
45845
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
45886
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-contains-newline.js
|
|
45846
45887
|
var require_util_contains_newline = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
45847
45888
|
function containsNewline(key) {
|
|
45848
45889
|
if (!key) return null;
|
|
@@ -45871,7 +45912,7 @@ var require_util_contains_newline = /* @__PURE__ */ __commonJSMin$1(((exports) =
|
|
|
45871
45912
|
exports.containsNewline = containsNewline;
|
|
45872
45913
|
}));
|
|
45873
45914
|
//#endregion
|
|
45874
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
45915
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-flow-indent-check.js
|
|
45875
45916
|
var require_util_flow_indent_check = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
45876
45917
|
var utilContainsNewline = require_util_contains_newline();
|
|
45877
45918
|
function flowIndentCheck(indent, fc, onError) {
|
|
@@ -45883,7 +45924,7 @@ var require_util_flow_indent_check = /* @__PURE__ */ __commonJSMin$1(((exports)
|
|
|
45883
45924
|
exports.flowIndentCheck = flowIndentCheck;
|
|
45884
45925
|
}));
|
|
45885
45926
|
//#endregion
|
|
45886
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
45927
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-map-includes.js
|
|
45887
45928
|
var require_util_map_includes = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
45888
45929
|
var identity = require_identity();
|
|
45889
45930
|
function mapIncludes(ctx, items, search) {
|
|
@@ -45895,7 +45936,7 @@ var require_util_map_includes = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
45895
45936
|
exports.mapIncludes = mapIncludes;
|
|
45896
45937
|
}));
|
|
45897
45938
|
//#endregion
|
|
45898
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
45939
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-map.js
|
|
45899
45940
|
var require_resolve_block_map = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
45900
45941
|
var Pair = require_Pair();
|
|
45901
45942
|
var YAMLMap = require_YAMLMap();
|
|
@@ -45979,7 +46020,7 @@ var require_resolve_block_map = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
45979
46020
|
exports.resolveBlockMap = resolveBlockMap;
|
|
45980
46021
|
}));
|
|
45981
46022
|
//#endregion
|
|
45982
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
46023
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-seq.js
|
|
45983
46024
|
var require_resolve_block_seq = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
45984
46025
|
var YAMLSeq = require_YAMLSeq();
|
|
45985
46026
|
var resolveProps = require_resolve_props();
|
|
@@ -46021,7 +46062,7 @@ var require_resolve_block_seq = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
46021
46062
|
exports.resolveBlockSeq = resolveBlockSeq;
|
|
46022
46063
|
}));
|
|
46023
46064
|
//#endregion
|
|
46024
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
46065
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-end.js
|
|
46025
46066
|
var require_resolve_end = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
46026
46067
|
function resolveEnd(end, offset, reqSpace, onError) {
|
|
46027
46068
|
let comment = "";
|
|
@@ -46059,7 +46100,7 @@ var require_resolve_end = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
46059
46100
|
exports.resolveEnd = resolveEnd;
|
|
46060
46101
|
}));
|
|
46061
46102
|
//#endregion
|
|
46062
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
46103
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-collection.js
|
|
46063
46104
|
var require_resolve_flow_collection = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
46064
46105
|
var identity = require_identity();
|
|
46065
46106
|
var Pair = require_Pair();
|
|
@@ -46214,7 +46255,7 @@ var require_resolve_flow_collection = /* @__PURE__ */ __commonJSMin$1(((exports)
|
|
|
46214
46255
|
exports.resolveFlowCollection = resolveFlowCollection;
|
|
46215
46256
|
}));
|
|
46216
46257
|
//#endregion
|
|
46217
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
46258
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-collection.js
|
|
46218
46259
|
var require_compose_collection = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
46219
46260
|
var identity = require_identity();
|
|
46220
46261
|
var Scalar = require_Scalar();
|
|
@@ -46266,7 +46307,7 @@ var require_compose_collection = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
46266
46307
|
exports.composeCollection = composeCollection;
|
|
46267
46308
|
}));
|
|
46268
46309
|
//#endregion
|
|
46269
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
46310
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-scalar.js
|
|
46270
46311
|
var require_resolve_block_scalar = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
46271
46312
|
var Scalar = require_Scalar();
|
|
46272
46313
|
function resolveBlockScalar(ctx, scalar, onError) {
|
|
@@ -46441,7 +46482,7 @@ var require_resolve_block_scalar = /* @__PURE__ */ __commonJSMin$1(((exports) =>
|
|
|
46441
46482
|
exports.resolveBlockScalar = resolveBlockScalar;
|
|
46442
46483
|
}));
|
|
46443
46484
|
//#endregion
|
|
46444
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
46485
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-scalar.js
|
|
46445
46486
|
var require_resolve_flow_scalar = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
46446
46487
|
var Scalar = require_Scalar();
|
|
46447
46488
|
var resolveEnd = require_resolve_end();
|
|
@@ -46647,7 +46688,7 @@ var require_resolve_flow_scalar = /* @__PURE__ */ __commonJSMin$1(((exports) =>
|
|
|
46647
46688
|
exports.resolveFlowScalar = resolveFlowScalar;
|
|
46648
46689
|
}));
|
|
46649
46690
|
//#endregion
|
|
46650
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
46691
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-scalar.js
|
|
46651
46692
|
var require_compose_scalar = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
46652
46693
|
var identity = require_identity();
|
|
46653
46694
|
var Scalar = require_Scalar();
|
|
@@ -46706,7 +46747,7 @@ var require_compose_scalar = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
46706
46747
|
exports.composeScalar = composeScalar;
|
|
46707
46748
|
}));
|
|
46708
46749
|
//#endregion
|
|
46709
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
46750
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-empty-scalar-position.js
|
|
46710
46751
|
var require_util_empty_scalar_position = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
46711
46752
|
function emptyScalarPosition(offset, before, pos) {
|
|
46712
46753
|
if (before) {
|
|
@@ -46733,7 +46774,7 @@ var require_util_empty_scalar_position = /* @__PURE__ */ __commonJSMin$1(((expor
|
|
|
46733
46774
|
exports.emptyScalarPosition = emptyScalarPosition;
|
|
46734
46775
|
}));
|
|
46735
46776
|
//#endregion
|
|
46736
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
46777
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-node.js
|
|
46737
46778
|
var require_compose_node = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
46738
46779
|
var Alias = require_Alias();
|
|
46739
46780
|
var identity = require_identity();
|
|
@@ -46765,14 +46806,18 @@ var require_compose_node = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
46765
46806
|
case "block-map":
|
|
46766
46807
|
case "block-seq":
|
|
46767
46808
|
case "flow-collection":
|
|
46768
|
-
|
|
46769
|
-
|
|
46809
|
+
try {
|
|
46810
|
+
node = composeCollection.composeCollection(CN, ctx, token, props, onError);
|
|
46811
|
+
if (anchor) node.anchor = anchor.source.substring(1);
|
|
46812
|
+
} catch (error) {
|
|
46813
|
+
onError(token, "RESOURCE_EXHAUSTION", error instanceof Error ? error.message : String(error));
|
|
46814
|
+
}
|
|
46770
46815
|
break;
|
|
46771
46816
|
default:
|
|
46772
46817
|
onError(token, "UNEXPECTED_TOKEN", token.type === "error" ? token.message : `Unsupported token (type: ${token.type})`);
|
|
46773
|
-
node = composeEmptyNode(ctx, token.offset, void 0, null, props, onError);
|
|
46774
46818
|
isSrcToken = false;
|
|
46775
46819
|
}
|
|
46820
|
+
node ?? (node = composeEmptyNode(ctx, token.offset, void 0, null, props, onError));
|
|
46776
46821
|
if (anchor && node.anchor === "") onError(anchor, "BAD_ALIAS", "Anchor cannot be an empty string");
|
|
46777
46822
|
if (atKey && ctx.options.stringKeys && (!identity.isScalar(node) || typeof node.value !== "string" || node.tag && node.tag !== "tag:yaml.org,2002:str")) onError(tag ?? token, "NON_STRING_KEY", "With stringKeys, all keys must be strings");
|
|
46778
46823
|
if (spaceBefore) node.spaceBefore = true;
|
|
@@ -46818,7 +46863,7 @@ var require_compose_node = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
46818
46863
|
exports.composeNode = composeNode;
|
|
46819
46864
|
}));
|
|
46820
46865
|
//#endregion
|
|
46821
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
46866
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-doc.js
|
|
46822
46867
|
var require_compose_doc = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
46823
46868
|
var Document = require_Document$1();
|
|
46824
46869
|
var composeNode = require_compose_node();
|
|
@@ -46860,7 +46905,7 @@ var require_compose_doc = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
46860
46905
|
exports.composeDoc = composeDoc;
|
|
46861
46906
|
}));
|
|
46862
46907
|
//#endregion
|
|
46863
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
46908
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/composer.js
|
|
46864
46909
|
var require_composer = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
46865
46910
|
var node_process$1 = __require("process");
|
|
46866
46911
|
var directives = require_directives();
|
|
@@ -47058,7 +47103,7 @@ var require_composer = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
47058
47103
|
exports.Composer = Composer;
|
|
47059
47104
|
}));
|
|
47060
47105
|
//#endregion
|
|
47061
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
47106
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst-scalar.js
|
|
47062
47107
|
var require_cst_scalar = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
47063
47108
|
var resolveBlockScalar = require_resolve_block_scalar();
|
|
47064
47109
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
|
@@ -47325,7 +47370,7 @@ var require_cst_scalar = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
47325
47370
|
exports.setScalarValue = setScalarValue;
|
|
47326
47371
|
}));
|
|
47327
47372
|
//#endregion
|
|
47328
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
47373
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst-stringify.js
|
|
47329
47374
|
var require_cst_stringify = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
47330
47375
|
/**
|
|
47331
47376
|
* Stringify a CST document, token, or collection item
|
|
@@ -47376,7 +47421,7 @@ var require_cst_stringify = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
47376
47421
|
exports.stringify = stringify;
|
|
47377
47422
|
}));
|
|
47378
47423
|
//#endregion
|
|
47379
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
47424
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst-visit.js
|
|
47380
47425
|
var require_cst_visit = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
47381
47426
|
const BREAK = Symbol("break visit");
|
|
47382
47427
|
const SKIP = Symbol("skip children");
|
|
@@ -47467,7 +47512,7 @@ var require_cst_visit = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
47467
47512
|
exports.visit = visit;
|
|
47468
47513
|
}));
|
|
47469
47514
|
//#endregion
|
|
47470
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
47515
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst.js
|
|
47471
47516
|
var require_cst = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
47472
47517
|
var cstScalar = require_cst_scalar();
|
|
47473
47518
|
var cstStringify = require_cst_stringify();
|
|
@@ -47546,7 +47591,7 @@ var require_cst = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
47546
47591
|
exports.tokenType = tokenType;
|
|
47547
47592
|
}));
|
|
47548
47593
|
//#endregion
|
|
47549
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
47594
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/lexer.js
|
|
47550
47595
|
var require_lexer = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
47551
47596
|
var cst = require_cst();
|
|
47552
47597
|
function isEmpty(ch) {
|
|
@@ -48065,7 +48110,7 @@ var require_lexer = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
48065
48110
|
exports.Lexer = Lexer;
|
|
48066
48111
|
}));
|
|
48067
48112
|
//#endregion
|
|
48068
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
48113
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/line-counter.js
|
|
48069
48114
|
var require_line_counter = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
48070
48115
|
/**
|
|
48071
48116
|
* Tracks newlines during parsing in order to provide an efficient API for
|
|
@@ -48112,7 +48157,7 @@ var require_line_counter = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
48112
48157
|
exports.LineCounter = LineCounter;
|
|
48113
48158
|
}));
|
|
48114
48159
|
//#endregion
|
|
48115
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
48160
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/parser.js
|
|
48116
48161
|
var require_parser = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
48117
48162
|
var node_process = __require("process");
|
|
48118
48163
|
var cst = require_cst();
|
|
@@ -48968,7 +49013,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
48968
49013
|
exports.Parser = Parser;
|
|
48969
49014
|
}));
|
|
48970
49015
|
//#endregion
|
|
48971
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
49016
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/public-api.js
|
|
48972
49017
|
var require_public_api = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
48973
49018
|
var composer = require_composer();
|
|
48974
49019
|
var Document = require_Document$1();
|
|
@@ -49055,7 +49100,7 @@ var require_public_api = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
49055
49100
|
exports.stringify = stringify;
|
|
49056
49101
|
}));
|
|
49057
49102
|
//#endregion
|
|
49058
|
-
//#region node_modules/.pnpm/yaml@2.8.
|
|
49103
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/index.js
|
|
49059
49104
|
var require_dist$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
49060
49105
|
var composer = require_composer();
|
|
49061
49106
|
var Document = require_Document$1();
|
|
@@ -91422,7 +91467,7 @@ const allCliAgents = [
|
|
|
91422
91467
|
new CliAgent({
|
|
91423
91468
|
id: "clanka",
|
|
91424
91469
|
name: "clanka",
|
|
91425
|
-
commandPlan: ({ prompt, prdFilePath, dangerous }) => make$45("
|
|
91470
|
+
commandPlan: ({ prompt, prdFilePath, dangerous }) => make$45("clanka", ["--prompt", prdFilePath ? `@${prdFilePath}
|
|
91426
91471
|
|
|
91427
91472
|
${prompt}` : prompt], {
|
|
91428
91473
|
extendEnv: true,
|
|
@@ -181540,7 +181585,7 @@ var ji = Bt, Ii = Object.assign(Qe, { sync: Bt }), zi = Ut, Bi = Object.assign(e
|
|
|
181540
181585
|
});
|
|
181541
181586
|
Ze.glob = Ze;
|
|
181542
181587
|
//#endregion
|
|
181543
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
181588
|
+
//#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/ApplyPatch.js
|
|
181544
181589
|
/**
|
|
181545
181590
|
* @since 1.0.0
|
|
181546
181591
|
*/
|
|
@@ -196413,7 +196458,7 @@ var StreamableHTTPClientTransport = class {
|
|
|
196413
196458
|
}
|
|
196414
196459
|
};
|
|
196415
196460
|
//#endregion
|
|
196416
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
196461
|
+
//#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/McpClient.js
|
|
196417
196462
|
/**
|
|
196418
196463
|
* @since 1.0.0
|
|
196419
196464
|
*/
|
|
@@ -196458,7 +196503,7 @@ const layer$13 = effect$1(McpClient, gen(function* () {
|
|
|
196458
196503
|
});
|
|
196459
196504
|
}));
|
|
196460
196505
|
//#endregion
|
|
196461
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
196506
|
+
//#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/ExaSearch.js
|
|
196462
196507
|
/**
|
|
196463
196508
|
* @since 1.0.0
|
|
196464
196509
|
*/
|
|
@@ -211408,7 +211453,7 @@ var require_lib = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
211408
211453
|
exports.impl = impl;
|
|
211409
211454
|
}));
|
|
211410
211455
|
//#endregion
|
|
211411
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
211456
|
+
//#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/WebToMarkdown.js
|
|
211412
211457
|
/**
|
|
211413
211458
|
* @since 1.0.0
|
|
211414
211459
|
*/
|
|
@@ -214547,7 +214592,7 @@ function isEmptyParamsRecord(indexSignature) {
|
|
|
214547
214592
|
return indexSignature.parameter === string$3 && isNever(indexSignature.type);
|
|
214548
214593
|
}
|
|
214549
214594
|
//#endregion
|
|
214550
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
214595
|
+
//#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/SemanticSearch/Service.js
|
|
214551
214596
|
/**
|
|
214552
214597
|
* @since 1.0.0
|
|
214553
214598
|
*/
|
|
@@ -214573,7 +214618,7 @@ const maybeRemoveFile = (path) => serviceOption(SemanticSearch).pipe(flatMap$4(m
|
|
|
214573
214618
|
onSome: (service) => service.removeFile(path)
|
|
214574
214619
|
})));
|
|
214575
214620
|
//#endregion
|
|
214576
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
214621
|
+
//#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/AgentTools.js
|
|
214577
214622
|
/**
|
|
214578
214623
|
* @since 1.0.0
|
|
214579
214624
|
*/
|
|
@@ -214924,7 +214969,7 @@ const AgentToolHandlers = AgentToolHandlersNoDeps.pipe(provide$3([layer$12, laye
|
|
|
214924
214969
|
AgentToolHandlersNoDeps.pipe(provide$3([mock(ExaSearch)({}), mock(WebToMarkdown)({})]));
|
|
214925
214970
|
var ApplyPatchError = class extends TaggedClass$2("ApplyPatchError") {};
|
|
214926
214971
|
//#endregion
|
|
214927
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
214972
|
+
//#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/TypeBuilder.js
|
|
214928
214973
|
const resolveDocumentation = resolveAt("documentation");
|
|
214929
214974
|
const identifierPattern = /^[$A-Z_a-z][$0-9A-Z_a-z]*$/u;
|
|
214930
214975
|
const Precedence = {
|
|
@@ -215197,7 +215242,7 @@ const render = (schema, options) => {
|
|
|
215197
215242
|
return printNode({ text: documentation === void 0 ? rendered.text : `${renderJsDoc(documentation, 0, printerOptions)}${printerOptions.newLine}${rendered.text}` }, printerOptions);
|
|
215198
215243
|
};
|
|
215199
215244
|
//#endregion
|
|
215200
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
215245
|
+
//#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/ToolkitRenderer.js
|
|
215201
215246
|
/**
|
|
215202
215247
|
* @since 1.0.0
|
|
215203
215248
|
*/
|
|
@@ -215219,7 +215264,15 @@ declare function ${name}(${params}): Promise<${render(tool.successSchema)}>`);
|
|
|
215219
215264
|
}) });
|
|
215220
215265
|
};
|
|
215221
215266
|
//#endregion
|
|
215222
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
215267
|
+
//#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/ScriptPreprocessing.js
|
|
215268
|
+
const callTemplateTargets = ["applyPatch", "taskComplete"];
|
|
215269
|
+
const objectPropertyTargets = [{
|
|
215270
|
+
functionName: "writeFile",
|
|
215271
|
+
propertyName: "content"
|
|
215272
|
+
}, {
|
|
215273
|
+
functionName: "updateTask",
|
|
215274
|
+
propertyName: "description"
|
|
215275
|
+
}];
|
|
215223
215276
|
const isIdentifierChar = (char) => char !== void 0 && /[A-Za-z0-9_$]/.test(char);
|
|
215224
215277
|
const isIdentifierStartChar = (char) => char !== void 0 && /[A-Za-z_$]/.test(char);
|
|
215225
215278
|
const hasIdentifierBoundary = (text, index, length) => !isIdentifierChar(text[index - 1]) && !isIdentifierChar(text[index + length]);
|
|
@@ -215232,9 +215285,9 @@ const findNextIdentifier = (text, identifier, from) => {
|
|
|
215232
215285
|
return -1;
|
|
215233
215286
|
};
|
|
215234
215287
|
const skipWhitespace = (text, start) => {
|
|
215235
|
-
let
|
|
215236
|
-
while (
|
|
215237
|
-
return
|
|
215288
|
+
let index = start;
|
|
215289
|
+
while (index < text.length && /\s/.test(text[index])) index++;
|
|
215290
|
+
return index;
|
|
215238
215291
|
};
|
|
215239
215292
|
const parseIdentifier = (text, start) => {
|
|
215240
215293
|
if (!isIdentifierStartChar(text[start])) return;
|
|
@@ -215246,24 +215299,102 @@ const parseIdentifier = (text, start) => {
|
|
|
215246
215299
|
};
|
|
215247
215300
|
};
|
|
215248
215301
|
const findPreviousNonWhitespace = (text, from) => {
|
|
215249
|
-
let
|
|
215250
|
-
while (
|
|
215251
|
-
return
|
|
215302
|
+
let index = from;
|
|
215303
|
+
while (index >= 0 && /\s/.test(text[index])) index--;
|
|
215304
|
+
return index;
|
|
215252
215305
|
};
|
|
215253
215306
|
const findNextNonWhitespace = (text, from) => {
|
|
215254
|
-
let
|
|
215255
|
-
while (
|
|
215256
|
-
return
|
|
215307
|
+
let index = from;
|
|
215308
|
+
while (index < text.length && /\s/.test(text[index])) index++;
|
|
215309
|
+
return index;
|
|
215310
|
+
};
|
|
215311
|
+
const isEscaped = (text, index) => {
|
|
215312
|
+
let slashCount = 0;
|
|
215313
|
+
let cursor = index - 1;
|
|
215314
|
+
while (cursor >= 0 && text[cursor] === "\\") {
|
|
215315
|
+
slashCount++;
|
|
215316
|
+
cursor--;
|
|
215317
|
+
}
|
|
215318
|
+
return slashCount % 2 === 1;
|
|
215319
|
+
};
|
|
215320
|
+
const needsTemplateEscaping = (text) => {
|
|
215321
|
+
for (let index = 0; index < text.length; index++) {
|
|
215322
|
+
const char = text[index];
|
|
215323
|
+
if (char === "`" && !isEscaped(text, index)) return true;
|
|
215324
|
+
if (char === "$" && text[index + 1] === "{" && !isEscaped(text, index)) return true;
|
|
215325
|
+
}
|
|
215326
|
+
return false;
|
|
215327
|
+
};
|
|
215328
|
+
const findTemplateEnd = (text, start, isTerminator) => {
|
|
215329
|
+
let end = -1;
|
|
215330
|
+
for (let index = start + 1; index < text.length; index++) {
|
|
215331
|
+
if (text[index] !== "`" || isEscaped(text, index)) continue;
|
|
215332
|
+
if (isTerminator(text[index + 1])) {
|
|
215333
|
+
end = index;
|
|
215334
|
+
continue;
|
|
215335
|
+
}
|
|
215336
|
+
if (isTerminator(text[skipWhitespace(text, index + 1)])) end = index;
|
|
215337
|
+
}
|
|
215338
|
+
return end;
|
|
215339
|
+
};
|
|
215340
|
+
const findTypeAnnotationAssignment = (text, start) => {
|
|
215341
|
+
let index = start;
|
|
215342
|
+
while (index < text.length) {
|
|
215343
|
+
const char = text[index];
|
|
215344
|
+
if (char === "=") return index;
|
|
215345
|
+
if (char === "\n" || char === ";") return -1;
|
|
215346
|
+
index++;
|
|
215347
|
+
}
|
|
215348
|
+
return -1;
|
|
215349
|
+
};
|
|
215350
|
+
const findClosingParen = (text, openParen) => {
|
|
215351
|
+
let depth = 1;
|
|
215352
|
+
for (let index = openParen + 1; index < text.length; index++) {
|
|
215353
|
+
const char = text[index];
|
|
215354
|
+
if (char === "(") {
|
|
215355
|
+
depth++;
|
|
215356
|
+
continue;
|
|
215357
|
+
}
|
|
215358
|
+
if (char === ")") {
|
|
215359
|
+
depth--;
|
|
215360
|
+
if (depth === 0) return index;
|
|
215361
|
+
}
|
|
215362
|
+
}
|
|
215363
|
+
return -1;
|
|
215364
|
+
};
|
|
215365
|
+
const findClosingBrace = (text, openBrace) => {
|
|
215366
|
+
let depth = 1;
|
|
215367
|
+
let stringDelimiter;
|
|
215368
|
+
for (let index = openBrace + 1; index < text.length; index++) {
|
|
215369
|
+
const char = text[index];
|
|
215370
|
+
if (stringDelimiter !== void 0) {
|
|
215371
|
+
if (char === stringDelimiter && !isEscaped(text, index)) stringDelimiter = void 0;
|
|
215372
|
+
continue;
|
|
215373
|
+
}
|
|
215374
|
+
if (char === "\"" || char === "'" || char === "`") {
|
|
215375
|
+
stringDelimiter = char;
|
|
215376
|
+
continue;
|
|
215377
|
+
}
|
|
215378
|
+
if (char === "{") {
|
|
215379
|
+
depth++;
|
|
215380
|
+
continue;
|
|
215381
|
+
}
|
|
215382
|
+
if (char === "}") {
|
|
215383
|
+
depth--;
|
|
215384
|
+
if (depth === 0) return index;
|
|
215385
|
+
}
|
|
215386
|
+
}
|
|
215387
|
+
return -1;
|
|
215257
215388
|
};
|
|
215258
215389
|
const findObjectValueTerminator = (text, start) => {
|
|
215259
215390
|
let parenDepth = 0;
|
|
215260
215391
|
let bracketDepth = 0;
|
|
215261
215392
|
let braceDepth = 0;
|
|
215262
215393
|
let stringDelimiter;
|
|
215263
|
-
for (let
|
|
215264
|
-
const char = text[
|
|
215394
|
+
for (let index = start; index < text.length; index++) {
|
|
215395
|
+
const char = text[index];
|
|
215265
215396
|
if (stringDelimiter !== void 0) {
|
|
215266
|
-
if (char === stringDelimiter && !isEscaped(text,
|
|
215397
|
+
if (char === stringDelimiter && !isEscaped(text, index)) stringDelimiter = void 0;
|
|
215267
215398
|
continue;
|
|
215268
215399
|
}
|
|
215269
215400
|
if (char === "\"" || char === "'" || char === "`") {
|
|
@@ -215291,16 +215422,16 @@ const findObjectValueTerminator = (text, start) => {
|
|
|
215291
215422
|
continue;
|
|
215292
215423
|
}
|
|
215293
215424
|
if (char === "}") {
|
|
215294
|
-
if (parenDepth === 0 && bracketDepth === 0 && braceDepth === 0) return
|
|
215425
|
+
if (parenDepth === 0 && bracketDepth === 0 && braceDepth === 0) return index;
|
|
215295
215426
|
if (braceDepth > 0) braceDepth--;
|
|
215296
215427
|
continue;
|
|
215297
215428
|
}
|
|
215298
|
-
if (char === "," && parenDepth === 0 && bracketDepth === 0 && braceDepth === 0) return
|
|
215429
|
+
if (char === "," && parenDepth === 0 && bracketDepth === 0 && braceDepth === 0) return index;
|
|
215299
215430
|
}
|
|
215300
215431
|
return -1;
|
|
215301
215432
|
};
|
|
215302
215433
|
const collectExpressionIdentifiers = (text, start, end) => {
|
|
215303
|
-
const
|
|
215434
|
+
const identifiers = /* @__PURE__ */ new Set();
|
|
215304
215435
|
let cursor = start;
|
|
215305
215436
|
while (cursor < end) {
|
|
215306
215437
|
const identifier = parseIdentifier(text, cursor);
|
|
@@ -215308,29 +215439,12 @@ const collectExpressionIdentifiers = (text, start, end) => {
|
|
|
215308
215439
|
cursor++;
|
|
215309
215440
|
continue;
|
|
215310
215441
|
}
|
|
215311
|
-
const
|
|
215312
|
-
const
|
|
215313
|
-
if (text[
|
|
215442
|
+
const previous = findPreviousNonWhitespace(text, cursor - 1);
|
|
215443
|
+
const next = findNextNonWhitespace(text, identifier.end);
|
|
215444
|
+
if (text[previous] !== "." && text[next] !== "." && text[next] !== "(") identifiers.add(identifier.name);
|
|
215314
215445
|
cursor = identifier.end;
|
|
215315
215446
|
}
|
|
215316
|
-
return
|
|
215317
|
-
};
|
|
215318
|
-
const isEscaped = (text, index) => {
|
|
215319
|
-
let slashCount = 0;
|
|
215320
|
-
let i = index - 1;
|
|
215321
|
-
while (i >= 0 && text[i] === "\\") {
|
|
215322
|
-
slashCount++;
|
|
215323
|
-
i--;
|
|
215324
|
-
}
|
|
215325
|
-
return slashCount % 2 === 1;
|
|
215326
|
-
};
|
|
215327
|
-
const needsTemplateEscaping = (text) => {
|
|
215328
|
-
for (let i = 0; i < text.length; i++) {
|
|
215329
|
-
const char = text[i];
|
|
215330
|
-
if (char === "`" && !isEscaped(text, i)) return true;
|
|
215331
|
-
if (char === "$" && text[i + 1] === "{" && !isEscaped(text, i)) return true;
|
|
215332
|
-
}
|
|
215333
|
-
return false;
|
|
215447
|
+
return identifiers;
|
|
215334
215448
|
};
|
|
215335
215449
|
const normalizePatchEscapedQuotes = (text) => text.includes("*** Begin Patch") ? text.replace(/\\"([A-Za-z0-9_$.-]+)\\"/g, (match, content, index) => {
|
|
215336
215450
|
const previous = text[findPreviousNonWhitespace(text, index - 1)];
|
|
@@ -215340,26 +215454,26 @@ const normalizePatchEscapedQuotes = (text) => text.includes("*** Begin Patch") ?
|
|
|
215340
215454
|
}) : text;
|
|
215341
215455
|
const normalizeNonPatchEscapedTemplateMarkers = (text) => text.replace(/\\{2,}(?=`|\$\{)/g, "\\").replace(/(^|\s)\\+(?=\.[A-Za-z0-9_-]+\/)/g, "$1");
|
|
215342
215456
|
const escapeTemplateLiteralContent = (text) => {
|
|
215343
|
-
const
|
|
215344
|
-
const isPatchContent =
|
|
215345
|
-
const normalized = isPatchContent ?
|
|
215346
|
-
if (!needsTemplateEscaping(normalized) && !(isPatchContent && normalized.includes("
|
|
215457
|
+
const patchNormalized = normalizePatchEscapedQuotes(text);
|
|
215458
|
+
const isPatchContent = patchNormalized.includes("*** Begin Patch");
|
|
215459
|
+
const normalized = isPatchContent ? patchNormalized : normalizeNonPatchEscapedTemplateMarkers(patchNormalized);
|
|
215460
|
+
if (!needsTemplateEscaping(normalized) && !(isPatchContent && normalized.includes("\\\""))) return normalized;
|
|
215347
215461
|
let out = "";
|
|
215348
|
-
for (let
|
|
215349
|
-
const char = normalized[
|
|
215462
|
+
for (let index = 0; index < normalized.length; index++) {
|
|
215463
|
+
const char = normalized[index];
|
|
215350
215464
|
if (char === "\\") {
|
|
215351
|
-
if (
|
|
215465
|
+
if (normalized[index + 1] === "`" && isEscaped(normalized, index + 1) || normalized[index + 1] === "$" && normalized[index + 2] === "{" && isEscaped(normalized, index + 1)) {
|
|
215352
215466
|
out += "\\";
|
|
215353
215467
|
continue;
|
|
215354
215468
|
}
|
|
215355
215469
|
out += "\\\\";
|
|
215356
215470
|
continue;
|
|
215357
215471
|
}
|
|
215358
|
-
if (char === "`" && !isEscaped(normalized,
|
|
215472
|
+
if (char === "`" && !isEscaped(normalized, index)) {
|
|
215359
215473
|
out += "\\`";
|
|
215360
215474
|
continue;
|
|
215361
215475
|
}
|
|
215362
|
-
if (char === "$" && normalized[
|
|
215476
|
+
if (char === "$" && normalized[index + 1] === "{" && !isEscaped(normalized, index)) {
|
|
215363
215477
|
out += "\\$";
|
|
215364
215478
|
continue;
|
|
215365
215479
|
}
|
|
@@ -215367,199 +215481,108 @@ const escapeTemplateLiteralContent = (text) => {
|
|
|
215367
215481
|
}
|
|
215368
215482
|
return out;
|
|
215369
215483
|
};
|
|
215370
|
-
const
|
|
215371
|
-
|
|
215372
|
-
|
|
215373
|
-
if (text[i] !== "`" || isEscaped(text, i)) continue;
|
|
215374
|
-
if (isTerminator(text[i + 1])) {
|
|
215375
|
-
end = i;
|
|
215376
|
-
continue;
|
|
215377
|
-
}
|
|
215378
|
-
if (isTerminator(text[skipWhitespace(text, i + 1)])) end = i;
|
|
215379
|
-
}
|
|
215380
|
-
return end;
|
|
215381
|
-
};
|
|
215382
|
-
const findTypeAnnotationAssignment = (text, start) => {
|
|
215383
|
-
let i = start;
|
|
215384
|
-
while (i < text.length) {
|
|
215385
|
-
const char = text[i];
|
|
215386
|
-
if (char === "=") return i;
|
|
215387
|
-
if (char === "\n" || char === ";") return -1;
|
|
215388
|
-
i++;
|
|
215389
|
-
}
|
|
215390
|
-
return -1;
|
|
215391
|
-
};
|
|
215392
|
-
const findClosingParen = (text, openParen) => {
|
|
215393
|
-
let depth = 1;
|
|
215394
|
-
for (let i = openParen + 1; i < text.length; i++) {
|
|
215395
|
-
const char = text[i];
|
|
215396
|
-
if (char === "(") {
|
|
215397
|
-
depth++;
|
|
215398
|
-
continue;
|
|
215399
|
-
}
|
|
215400
|
-
if (char === ")") {
|
|
215401
|
-
depth--;
|
|
215402
|
-
if (depth === 0) return i;
|
|
215403
|
-
}
|
|
215404
|
-
}
|
|
215405
|
-
return -1;
|
|
215406
|
-
};
|
|
215407
|
-
const findClosingBrace = (text, openBrace) => {
|
|
215408
|
-
let depth = 1;
|
|
215409
|
-
let stringDelimiter;
|
|
215410
|
-
for (let i = openBrace + 1; i < text.length; i++) {
|
|
215411
|
-
const char = text[i];
|
|
215412
|
-
if (stringDelimiter !== void 0) {
|
|
215413
|
-
if (char === stringDelimiter && !isEscaped(text, i)) stringDelimiter = void 0;
|
|
215414
|
-
continue;
|
|
215415
|
-
}
|
|
215416
|
-
if (char === "\"" || char === "'" || char === "`") {
|
|
215417
|
-
stringDelimiter = char;
|
|
215418
|
-
continue;
|
|
215419
|
-
}
|
|
215420
|
-
if (char === "{") {
|
|
215421
|
-
depth++;
|
|
215422
|
-
continue;
|
|
215423
|
-
}
|
|
215424
|
-
if (char === "}") {
|
|
215425
|
-
depth--;
|
|
215426
|
-
if (depth === 0) return i;
|
|
215427
|
-
}
|
|
215428
|
-
}
|
|
215429
|
-
return -1;
|
|
215430
|
-
};
|
|
215431
|
-
const fixObjectLiteralTemplateValues = (text) => text.replace(/\\{2,}(?=`|\$\{)/g, "\\");
|
|
215432
|
-
const fixAssignedObjectTemplateValues = (script, variableName) => {
|
|
215484
|
+
const normalizeObjectLiteralTemplateMarkers = (text) => text.replace(/\\{2,}(?=`|\$\{)/g, "\\");
|
|
215485
|
+
const replaceSlice = (text, start, end, replacement) => `${text.slice(0, start)}${replacement}${text.slice(end)}`;
|
|
215486
|
+
const rewriteTemplateContents = (script, findNext, rewrite) => {
|
|
215433
215487
|
let out = script;
|
|
215434
215488
|
let cursor = 0;
|
|
215435
215489
|
while (cursor < out.length) {
|
|
215436
|
-
const
|
|
215437
|
-
if (
|
|
215438
|
-
|
|
215439
|
-
|
|
215440
|
-
|
|
215441
|
-
|
|
215442
|
-
|
|
215443
|
-
continue;
|
|
215444
|
-
}
|
|
215445
|
-
}
|
|
215446
|
-
if (out[assignmentStart] !== "=" || out[assignmentStart + 1] === "=" || out[assignmentStart + 1] === ">") {
|
|
215447
|
-
cursor = variableStart + variableName.length;
|
|
215490
|
+
const range = findNext(out, cursor);
|
|
215491
|
+
if (range === void 0) break;
|
|
215492
|
+
const original = out.slice(range.contentStart, range.contentEnd);
|
|
215493
|
+
const updated = rewrite(original);
|
|
215494
|
+
if (updated !== original) {
|
|
215495
|
+
out = replaceSlice(out, range.contentStart, range.contentEnd, updated);
|
|
215496
|
+
cursor = range.nextCursor + (updated.length - original.length);
|
|
215448
215497
|
continue;
|
|
215449
215498
|
}
|
|
215450
|
-
|
|
215451
|
-
if (out[objectStart] !== "{") {
|
|
215452
|
-
cursor = objectStart + 1;
|
|
215453
|
-
continue;
|
|
215454
|
-
}
|
|
215455
|
-
const objectEnd = findClosingBrace(out, objectStart);
|
|
215456
|
-
if (objectEnd === -1) {
|
|
215457
|
-
cursor = objectStart + 1;
|
|
215458
|
-
continue;
|
|
215459
|
-
}
|
|
215460
|
-
const original = out.slice(objectStart, objectEnd + 1);
|
|
215461
|
-
const escaped = fixObjectLiteralTemplateValues(original);
|
|
215462
|
-
if (escaped !== original) {
|
|
215463
|
-
out = `${out.slice(0, objectStart)}${escaped}${out.slice(objectEnd + 1)}`;
|
|
215464
|
-
cursor = objectEnd + (escaped.length - original.length) + 1;
|
|
215465
|
-
continue;
|
|
215466
|
-
}
|
|
215467
|
-
cursor = objectEnd + 1;
|
|
215499
|
+
cursor = range.nextCursor;
|
|
215468
215500
|
}
|
|
215469
215501
|
return out;
|
|
215470
215502
|
};
|
|
215471
|
-
const
|
|
215472
|
-
|
|
215473
|
-
|
|
215474
|
-
|
|
215475
|
-
|
|
215476
|
-
const
|
|
215477
|
-
if (
|
|
215478
|
-
}
|
|
215479
|
-
return out;
|
|
215480
|
-
};
|
|
215481
|
-
const findCallTemplateEnd = (text, templateStart, openParen) => {
|
|
215482
|
-
const closeParen = findClosingParen(text, openParen);
|
|
215483
|
-
if (closeParen === -1) return -1;
|
|
215484
|
-
for (let i = closeParen - 1; i > templateStart; i--) if (text[i] === "`" && !isEscaped(text, i)) return i;
|
|
215485
|
-
return -1;
|
|
215486
|
-
};
|
|
215487
|
-
const fixCallTemplateArgument = (script, functionName) => {
|
|
215488
|
-
let out = script;
|
|
215489
|
-
let cursor = 0;
|
|
215490
|
-
while (cursor < out.length) {
|
|
215491
|
-
const callStart = findNextIdentifier(out, functionName, cursor);
|
|
215492
|
-
if (callStart === -1) break;
|
|
215493
|
-
const openParen = skipWhitespace(out, callStart + functionName.length);
|
|
215494
|
-
if (out[openParen] !== "(") {
|
|
215503
|
+
const findDirectCallTemplate = (text, functionName, from) => {
|
|
215504
|
+
let cursor = from;
|
|
215505
|
+
while (cursor < text.length) {
|
|
215506
|
+
const callStart = findNextIdentifier(text, functionName, cursor);
|
|
215507
|
+
if (callStart === -1) return;
|
|
215508
|
+
const openParen = skipWhitespace(text, callStart + functionName.length);
|
|
215509
|
+
if (text[openParen] !== "(") {
|
|
215495
215510
|
cursor = callStart + functionName.length;
|
|
215496
215511
|
continue;
|
|
215497
215512
|
}
|
|
215498
|
-
const templateStart = skipWhitespace(
|
|
215499
|
-
if (
|
|
215513
|
+
const templateStart = skipWhitespace(text, openParen + 1);
|
|
215514
|
+
if (text[templateStart] !== "`") {
|
|
215500
215515
|
cursor = openParen + 1;
|
|
215501
215516
|
continue;
|
|
215502
215517
|
}
|
|
215503
|
-
const
|
|
215518
|
+
const closeParen = findClosingParen(text, openParen);
|
|
215519
|
+
let templateEnd = -1;
|
|
215520
|
+
if (closeParen !== -1) {
|
|
215521
|
+
for (let index = closeParen - 1; index > templateStart; index--) if (text[index] === "`" && !isEscaped(text, index)) {
|
|
215522
|
+
templateEnd = index;
|
|
215523
|
+
break;
|
|
215524
|
+
}
|
|
215525
|
+
} else {
|
|
215526
|
+
const patchEnd = text.indexOf("*** End Patch", templateStart);
|
|
215527
|
+
const searchStart = patchEnd === -1 ? templateStart + 1 : patchEnd + 1;
|
|
215528
|
+
for (let index = searchStart; index < text.length; index++) {
|
|
215529
|
+
if (text[index] !== "`" || isEscaped(text, index)) continue;
|
|
215530
|
+
if (text[skipWhitespace(text, index + 1)] === ")") {
|
|
215531
|
+
templateEnd = index;
|
|
215532
|
+
break;
|
|
215533
|
+
}
|
|
215534
|
+
}
|
|
215535
|
+
}
|
|
215504
215536
|
if (templateEnd === -1) {
|
|
215505
215537
|
cursor = templateStart + 1;
|
|
215506
215538
|
continue;
|
|
215507
215539
|
}
|
|
215508
|
-
|
|
215509
|
-
|
|
215510
|
-
|
|
215511
|
-
|
|
215512
|
-
|
|
215513
|
-
continue;
|
|
215514
|
-
}
|
|
215515
|
-
cursor = templateEnd + 1;
|
|
215540
|
+
return {
|
|
215541
|
+
contentStart: templateStart + 1,
|
|
215542
|
+
contentEnd: templateEnd,
|
|
215543
|
+
nextCursor: templateEnd + 1
|
|
215544
|
+
};
|
|
215516
215545
|
}
|
|
215517
|
-
return out;
|
|
215518
215546
|
};
|
|
215519
|
-
const
|
|
215520
|
-
let
|
|
215521
|
-
|
|
215522
|
-
|
|
215523
|
-
|
|
215524
|
-
|
|
215525
|
-
|
|
215526
|
-
|
|
215527
|
-
cursor = callStart + functionName.length;
|
|
215547
|
+
const findObjectPropertyTemplate = (text, target, from) => {
|
|
215548
|
+
let cursor = from;
|
|
215549
|
+
while (cursor < text.length) {
|
|
215550
|
+
const callStart = findNextIdentifier(text, target.functionName, cursor);
|
|
215551
|
+
if (callStart === -1) return;
|
|
215552
|
+
const openParen = skipWhitespace(text, callStart + target.functionName.length);
|
|
215553
|
+
if (text[openParen] !== "(") {
|
|
215554
|
+
cursor = callStart + target.functionName.length;
|
|
215528
215555
|
continue;
|
|
215529
215556
|
}
|
|
215530
|
-
const propertyKey = findNextIdentifier(
|
|
215557
|
+
const propertyKey = findNextIdentifier(text, target.propertyName, openParen + 1);
|
|
215531
215558
|
if (propertyKey === -1) {
|
|
215532
215559
|
cursor = openParen + 1;
|
|
215533
215560
|
continue;
|
|
215534
215561
|
}
|
|
215535
|
-
const colon = skipWhitespace(
|
|
215536
|
-
if (
|
|
215537
|
-
cursor = propertyKey + propertyName.length;
|
|
215562
|
+
const colon = skipWhitespace(text, propertyKey + target.propertyName.length);
|
|
215563
|
+
if (text[colon] !== ":") {
|
|
215564
|
+
cursor = propertyKey + target.propertyName.length;
|
|
215538
215565
|
continue;
|
|
215539
215566
|
}
|
|
215540
|
-
const templateStart = skipWhitespace(
|
|
215541
|
-
if (
|
|
215567
|
+
const templateStart = skipWhitespace(text, colon + 1);
|
|
215568
|
+
if (text[templateStart] !== "`") {
|
|
215542
215569
|
cursor = templateStart + 1;
|
|
215543
215570
|
continue;
|
|
215544
215571
|
}
|
|
215545
|
-
const templateEnd = findTemplateEnd(
|
|
215572
|
+
const templateEnd = findTemplateEnd(text, templateStart, (char) => char === "}" || char === ",");
|
|
215546
215573
|
if (templateEnd === -1) {
|
|
215547
215574
|
cursor = templateStart + 1;
|
|
215548
215575
|
continue;
|
|
215549
215576
|
}
|
|
215550
|
-
|
|
215551
|
-
|
|
215552
|
-
|
|
215553
|
-
|
|
215554
|
-
|
|
215555
|
-
continue;
|
|
215556
|
-
}
|
|
215557
|
-
cursor = templateEnd + 1;
|
|
215577
|
+
return {
|
|
215578
|
+
contentStart: templateStart + 1,
|
|
215579
|
+
contentEnd: templateEnd,
|
|
215580
|
+
nextCursor: templateEnd + 1
|
|
215581
|
+
};
|
|
215558
215582
|
}
|
|
215559
|
-
return out;
|
|
215560
215583
|
};
|
|
215561
215584
|
const collectCallArgumentIdentifiers = (script, functionName) => {
|
|
215562
|
-
const
|
|
215585
|
+
const identifiers = /* @__PURE__ */ new Set();
|
|
215563
215586
|
let cursor = 0;
|
|
215564
215587
|
while (cursor < script.length) {
|
|
215565
215588
|
const callStart = findNextIdentifier(script, functionName, cursor);
|
|
@@ -215575,47 +215598,79 @@ const collectCallArgumentIdentifiers = (script, functionName) => {
|
|
|
215575
215598
|
continue;
|
|
215576
215599
|
}
|
|
215577
215600
|
const argumentEnd = skipWhitespace(script, identifier.end);
|
|
215578
|
-
if (script[argumentEnd] === ")" || script[argumentEnd] === ",")
|
|
215601
|
+
if (script[argumentEnd] === ")" || script[argumentEnd] === ",") identifiers.add(identifier.name);
|
|
215579
215602
|
cursor = identifier.end;
|
|
215580
215603
|
}
|
|
215581
|
-
return
|
|
215604
|
+
return identifiers;
|
|
215582
215605
|
};
|
|
215583
|
-
const
|
|
215584
|
-
const
|
|
215606
|
+
const collectObjectPropertyIdentifiers = (script, target) => {
|
|
215607
|
+
const identifiers = /* @__PURE__ */ new Set();
|
|
215585
215608
|
let cursor = 0;
|
|
215586
215609
|
while (cursor < script.length) {
|
|
215587
|
-
const callStart = findNextIdentifier(script, functionName, cursor);
|
|
215610
|
+
const callStart = findNextIdentifier(script, target.functionName, cursor);
|
|
215588
215611
|
if (callStart === -1) break;
|
|
215589
|
-
const openParen = skipWhitespace(script, callStart + functionName.length);
|
|
215612
|
+
const openParen = skipWhitespace(script, callStart + target.functionName.length);
|
|
215590
215613
|
if (script[openParen] !== "(") {
|
|
215591
|
-
cursor = callStart + functionName.length;
|
|
215614
|
+
cursor = callStart + target.functionName.length;
|
|
215592
215615
|
continue;
|
|
215593
215616
|
}
|
|
215594
|
-
const propertyKey = findNextIdentifier(script, propertyName, openParen + 1);
|
|
215617
|
+
const propertyKey = findNextIdentifier(script, target.propertyName, openParen + 1);
|
|
215595
215618
|
if (propertyKey === -1) {
|
|
215596
215619
|
cursor = openParen + 1;
|
|
215597
215620
|
continue;
|
|
215598
215621
|
}
|
|
215599
|
-
const afterProperty = skipWhitespace(script, propertyKey + propertyName.length);
|
|
215622
|
+
const afterProperty = skipWhitespace(script, propertyKey + target.propertyName.length);
|
|
215600
215623
|
if (script[afterProperty] === ":") {
|
|
215601
215624
|
const valueStart = skipWhitespace(script, afterProperty + 1);
|
|
215602
215625
|
const valueEnd = findObjectValueTerminator(script, valueStart);
|
|
215603
|
-
if (valueEnd !== -1) for (const identifier of collectExpressionIdentifiers(script, valueStart, valueEnd))
|
|
215626
|
+
if (valueEnd !== -1) for (const identifier of collectExpressionIdentifiers(script, valueStart, valueEnd)) identifiers.add(identifier);
|
|
215604
215627
|
cursor = valueStart + 1;
|
|
215605
215628
|
continue;
|
|
215606
215629
|
}
|
|
215607
215630
|
if (script[afterProperty] === "}" || script[afterProperty] === ",") {
|
|
215608
|
-
|
|
215631
|
+
identifiers.add(target.propertyName);
|
|
215609
215632
|
cursor = afterProperty + 1;
|
|
215610
215633
|
continue;
|
|
215611
215634
|
}
|
|
215612
215635
|
cursor = afterProperty + 1;
|
|
215613
215636
|
}
|
|
215614
|
-
return
|
|
215637
|
+
return identifiers;
|
|
215615
215638
|
};
|
|
215616
|
-
const
|
|
215617
|
-
|
|
215618
|
-
|
|
215639
|
+
const rewriteAssignedTemplate = (script, variableName) => rewriteTemplateContents(script, (text, from) => {
|
|
215640
|
+
let cursor = from;
|
|
215641
|
+
while (cursor < text.length) {
|
|
215642
|
+
const variableStart = findNextIdentifier(text, variableName, cursor);
|
|
215643
|
+
if (variableStart === -1) return;
|
|
215644
|
+
let assignmentStart = skipWhitespace(text, variableStart + variableName.length);
|
|
215645
|
+
if (text[assignmentStart] === ":") {
|
|
215646
|
+
assignmentStart = findTypeAnnotationAssignment(text, assignmentStart + 1);
|
|
215647
|
+
if (assignmentStart === -1) {
|
|
215648
|
+
cursor = variableStart + variableName.length;
|
|
215649
|
+
continue;
|
|
215650
|
+
}
|
|
215651
|
+
}
|
|
215652
|
+
if (text[assignmentStart] !== "=" || text[assignmentStart + 1] === "=" || text[assignmentStart + 1] === ">") {
|
|
215653
|
+
cursor = variableStart + variableName.length;
|
|
215654
|
+
continue;
|
|
215655
|
+
}
|
|
215656
|
+
const templateStart = skipWhitespace(text, assignmentStart + 1);
|
|
215657
|
+
if (text[templateStart] !== "`") {
|
|
215658
|
+
cursor = templateStart + 1;
|
|
215659
|
+
continue;
|
|
215660
|
+
}
|
|
215661
|
+
const templateEnd = findTemplateEnd(text, templateStart, (char) => char === void 0 || char === "\n" || char === "\r" || char === ";" || char === "," || char === ")" || char === "}" || char === "]");
|
|
215662
|
+
if (templateEnd === -1) {
|
|
215663
|
+
cursor = templateStart + 1;
|
|
215664
|
+
continue;
|
|
215665
|
+
}
|
|
215666
|
+
return {
|
|
215667
|
+
contentStart: templateStart + 1,
|
|
215668
|
+
contentEnd: templateEnd,
|
|
215669
|
+
nextCursor: templateEnd + 1
|
|
215670
|
+
};
|
|
215671
|
+
}
|
|
215672
|
+
}, escapeTemplateLiteralContent);
|
|
215673
|
+
const rewriteAssignedObjectLiteral = (script, variableName) => {
|
|
215619
215674
|
let out = script;
|
|
215620
215675
|
let cursor = 0;
|
|
215621
215676
|
while (cursor < out.length) {
|
|
@@ -215633,42 +215688,62 @@ const fixAssignedTemplate = (script, variableName) => {
|
|
|
215633
215688
|
cursor = variableStart + variableName.length;
|
|
215634
215689
|
continue;
|
|
215635
215690
|
}
|
|
215636
|
-
const
|
|
215637
|
-
if (out[
|
|
215638
|
-
cursor =
|
|
215691
|
+
const objectStart = skipWhitespace(out, assignmentStart + 1);
|
|
215692
|
+
if (out[objectStart] !== "{") {
|
|
215693
|
+
cursor = objectStart + 1;
|
|
215639
215694
|
continue;
|
|
215640
215695
|
}
|
|
215641
|
-
const
|
|
215642
|
-
if (
|
|
215643
|
-
cursor =
|
|
215696
|
+
const objectEnd = findClosingBrace(out, objectStart);
|
|
215697
|
+
if (objectEnd === -1) {
|
|
215698
|
+
cursor = objectStart + 1;
|
|
215644
215699
|
continue;
|
|
215645
215700
|
}
|
|
215646
|
-
const original = out.slice(
|
|
215647
|
-
const
|
|
215648
|
-
if (
|
|
215649
|
-
out =
|
|
215650
|
-
cursor =
|
|
215701
|
+
const original = out.slice(objectStart, objectEnd + 1);
|
|
215702
|
+
const updated = normalizeObjectLiteralTemplateMarkers(original);
|
|
215703
|
+
if (updated !== original) {
|
|
215704
|
+
out = replaceSlice(out, objectStart, objectEnd + 1, updated);
|
|
215705
|
+
cursor = objectEnd + 1 + (updated.length - original.length);
|
|
215651
215706
|
continue;
|
|
215652
215707
|
}
|
|
215653
|
-
cursor =
|
|
215708
|
+
cursor = objectEnd + 1;
|
|
215654
215709
|
}
|
|
215655
215710
|
return out;
|
|
215656
215711
|
};
|
|
215657
|
-
const
|
|
215712
|
+
const escapeRegExp = (text) => text.replace(/[.*+?^${}()|[\\]\\]/g, "\\$&");
|
|
215713
|
+
const collectObjectEntryMapSources = (script, valueIdentifier) => {
|
|
215658
215714
|
const identifiers = /* @__PURE__ */ new Set();
|
|
215659
|
-
|
|
215660
|
-
for (const
|
|
215661
|
-
|
|
215662
|
-
|
|
215663
|
-
|
|
215715
|
+
const pattern = new RegExp(`Object\\.entries\\(\\s*([A-Za-z_$][A-Za-z0-9_$]*)\\s*\\)\\s*\\.map\\(\\s*(?:async\\s*)?\\(\\s*\\[\\s*[A-Za-z_$][A-Za-z0-9_$]*\\s*,\\s*${escapeRegExp(valueIdentifier)}\\s*\\]\\s*\\)\\s*=>`, "g");
|
|
215716
|
+
for (const match of script.matchAll(pattern)) if (match[1] !== void 0) identifiers.add(match[1]);
|
|
215717
|
+
return identifiers;
|
|
215718
|
+
};
|
|
215719
|
+
const rewriteDirectTemplates = (script) => {
|
|
215664
215720
|
let out = script;
|
|
215665
|
-
for (const
|
|
215666
|
-
for (const
|
|
215721
|
+
for (const target of objectPropertyTargets) out = rewriteTemplateContents(out, (text, from) => findObjectPropertyTemplate(text, target, from), escapeTemplateLiteralContent);
|
|
215722
|
+
for (const functionName of callTemplateTargets) out = rewriteTemplateContents(out, (text, from) => findDirectCallTemplate(text, functionName, from), escapeTemplateLiteralContent);
|
|
215667
215723
|
return out;
|
|
215668
215724
|
};
|
|
215669
|
-
const
|
|
215725
|
+
const collectReferencedTemplateIdentifiers = (script) => {
|
|
215726
|
+
const templateIdentifiers = /* @__PURE__ */ new Set();
|
|
215727
|
+
for (const functionName of callTemplateTargets) for (const identifier of collectCallArgumentIdentifiers(script, functionName)) templateIdentifiers.add(identifier);
|
|
215728
|
+
for (const target of objectPropertyTargets) for (const identifier of collectObjectPropertyIdentifiers(script, target)) templateIdentifiers.add(identifier);
|
|
215729
|
+
if (script.includes("*** Begin Patch")) templateIdentifiers.add("patch");
|
|
215730
|
+
const objectIdentifiers = /* @__PURE__ */ new Set();
|
|
215731
|
+
for (const identifier of templateIdentifiers) for (const source of collectObjectEntryMapSources(script, identifier)) objectIdentifiers.add(source);
|
|
215732
|
+
return {
|
|
215733
|
+
templateIdentifiers,
|
|
215734
|
+
objectIdentifiers
|
|
215735
|
+
};
|
|
215736
|
+
};
|
|
215737
|
+
const rewriteAssignedTargets = (script) => {
|
|
215738
|
+
const { templateIdentifiers, objectIdentifiers } = collectReferencedTemplateIdentifiers(script);
|
|
215739
|
+
let out = script;
|
|
215740
|
+
for (const identifier of templateIdentifiers) out = rewriteAssignedTemplate(out, identifier);
|
|
215741
|
+
for (const identifier of objectIdentifiers) out = rewriteAssignedObjectLiteral(out, identifier);
|
|
215742
|
+
return out;
|
|
215743
|
+
};
|
|
215744
|
+
const preprocessScript = (script) => rewriteAssignedTargets(rewriteDirectTemplates(script));
|
|
215670
215745
|
//#endregion
|
|
215671
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
215746
|
+
//#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/AgentExecutor.js
|
|
215672
215747
|
/**
|
|
215673
215748
|
* @since 1.0.0
|
|
215674
215749
|
*/
|
|
@@ -215853,7 +215928,7 @@ var QueueWriteStream = class extends Writable {
|
|
|
215853
215928
|
}
|
|
215854
215929
|
};
|
|
215855
215930
|
//#endregion
|
|
215856
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
215931
|
+
//#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/ScriptExtraction.js
|
|
215857
215932
|
const stripWrappingCodeFence = (script) => {
|
|
215858
215933
|
const lines = script.split(/\r?\n/);
|
|
215859
215934
|
if (lines.length < 2) return script;
|
|
@@ -217402,7 +217477,7 @@ const applySpanTransformer = (transformer, response, options) => {
|
|
|
217402
217477
|
});
|
|
217403
217478
|
};
|
|
217404
217479
|
//#endregion
|
|
217405
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
217480
|
+
//#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/Agent.js
|
|
217406
217481
|
/**
|
|
217407
217482
|
* @since 1.0.0
|
|
217408
217483
|
*/
|
|
@@ -217452,7 +217527,7 @@ ${content}
|
|
|
217452
217527
|
const prompt = opts.disableHistory ? make$77(empty) : history;
|
|
217453
217528
|
update(prompt, concat(opts.prompt));
|
|
217454
217529
|
let system = (typeof opts.system === "function" ? opts.system : defaultSystem)({
|
|
217455
|
-
toolInstructions: generateSystemTools(capabilities),
|
|
217530
|
+
toolInstructions: generateSystemTools(capabilities, conversationMode),
|
|
217456
217531
|
agentsMd: getOrElse$2(agentsMd, () => "")
|
|
217457
217532
|
});
|
|
217458
217533
|
if (typeof opts.system === "string") system += `\n${opts.system}\n`;
|
|
@@ -217692,7 +217767,7 @@ ${options.toolInstructions}
|
|
|
217692
217767
|
|
|
217693
217768
|
${options.agentsMd}
|
|
217694
217769
|
`;
|
|
217695
|
-
const generateSystemTools = (capabilities) => `**YOU ONLY HAVE ACCESS TO ONE TOOL** "execute", to run javascript code to do your work.
|
|
217770
|
+
const generateSystemTools = (capabilities, conversationMode) => `**YOU ONLY HAVE ACCESS TO ONE TOOL** "execute", to run javascript code to do your work.
|
|
217696
217771
|
|
|
217697
217772
|
- Use \`console.log\` to print any output you need.
|
|
217698
217773
|
- Top level await is supported.${capabilities.supportsSearch ? `
|
|
@@ -217701,11 +217776,11 @@ const generateSystemTools = (capabilities) => `**YOU ONLY HAVE ACCESS TO ONE TOO
|
|
|
217701
217776
|
- You can add / update / remove multiple files in one go with "applyPatch".
|
|
217702
217777
|
- AVOID passing scripts into the "bash" function, and instead write javascript.
|
|
217703
217778
|
- **Variables are not shared** between executions, so you must include all necessary code in each script you execute.
|
|
217704
|
-
- DO NOT use \`require\`, \`import\`, \`process\`, or any other node.js apis
|
|
217779
|
+
- DO NOT use \`require\`, \`import\`, \`process\`, or any other node.js apis.${conversationMode ? "" : `
|
|
217705
217780
|
|
|
217706
217781
|
When you have fully completed your task, call the "taskComplete" function with the final output.
|
|
217707
217782
|
DO NOT output the final result without wrapping it with "taskComplete".
|
|
217708
|
-
Make sure every detail of the task is done before calling "taskComplete"
|
|
217783
|
+
Make sure every detail of the task is done before calling "taskComplete".`}
|
|
217709
217784
|
|
|
217710
217785
|
You have these functions available to you:
|
|
217711
217786
|
|
|
@@ -217791,7 +217866,7 @@ const responseToSummary = (response) => {
|
|
|
217791
217866
|
let parts = empty$17();
|
|
217792
217867
|
for (const message of prompt.content) {
|
|
217793
217868
|
if (message.role !== "assistant") continue;
|
|
217794
|
-
for (const part of message.content) if (part.type === "text"
|
|
217869
|
+
for (const part of message.content) if (part.type === "text") parts.push(part.text);
|
|
217795
217870
|
}
|
|
217796
217871
|
return parts.join("\n\n");
|
|
217797
217872
|
};
|
|
@@ -228907,7 +228982,7 @@ const transformToolCallParams = /* @__PURE__ */ fnUntraced(function* (tools, too
|
|
|
228907
228982
|
})));
|
|
228908
228983
|
});
|
|
228909
228984
|
//#endregion
|
|
228910
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
228985
|
+
//#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/CodexAuth.js
|
|
228911
228986
|
/**
|
|
228912
228987
|
* @since 1.0.0
|
|
228913
228988
|
*/
|
|
@@ -229127,7 +229202,7 @@ var CodexAuth = class CodexAuth extends Service$1()("clanka/CodexAuth") {
|
|
|
229127
229202
|
static layerClient = this.layerClientNoDeps.pipe(provide$3(CodexAuth.layer));
|
|
229128
229203
|
};
|
|
229129
229204
|
//#endregion
|
|
229130
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
229205
|
+
//#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/Codex.js
|
|
229131
229206
|
/**
|
|
229132
229207
|
* @since 1.0.0
|
|
229133
229208
|
*/
|
|
@@ -229153,7 +229228,7 @@ const layerModel = (model, options) => layer$7({
|
|
|
229153
229228
|
}
|
|
229154
229229
|
}).pipe(merge$6(AgentModelConfig.layer({ systemPromptTransform: (system, effect) => withConfigOverride(effect, { instructions: system }) })));
|
|
229155
229230
|
//#endregion
|
|
229156
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
229231
|
+
//#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/CodeChunker.js
|
|
229157
229232
|
/**
|
|
229158
229233
|
* @since 1.0.0
|
|
229159
229234
|
*/
|
|
@@ -230913,7 +230988,7 @@ const getUsageDetailNumber = (details, field) => {
|
|
|
230913
230988
|
return typeof value === "number" ? value : void 0;
|
|
230914
230989
|
};
|
|
230915
230990
|
//#endregion
|
|
230916
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
230991
|
+
//#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/CopilotAuth.js
|
|
230917
230992
|
/**
|
|
230918
230993
|
* @since 1.0.0
|
|
230919
230994
|
*/
|
|
@@ -231104,7 +231179,7 @@ var GithubCopilotAuth = class GithubCopilotAuth extends Service$1()("clanka/Gith
|
|
|
231104
231179
|
static layerClient = this.layerClientNoDeps.pipe(provide$3(GithubCopilotAuth.layer));
|
|
231105
231180
|
};
|
|
231106
231181
|
//#endregion
|
|
231107
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
231182
|
+
//#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/Copilot.js
|
|
231108
231183
|
/**
|
|
231109
231184
|
* @since 1.0.0
|
|
231110
231185
|
*/
|
|
@@ -231524,7 +231599,7 @@ Object.defineProperties(createChalk.prototype, styles);
|
|
|
231524
231599
|
const chalk = createChalk();
|
|
231525
231600
|
createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
231526
231601
|
//#endregion
|
|
231527
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
231602
|
+
//#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/OutputFormatter.js
|
|
231528
231603
|
/**
|
|
231529
231604
|
* @since 1.0.0
|
|
231530
231605
|
*/
|
|
@@ -232010,7 +232085,7 @@ select * from ${sql(options.tableName)} where ${sql(idColumn)} = LAST_INSERT_ID(
|
|
|
232010
232085
|
};
|
|
232011
232086
|
});
|
|
232012
232087
|
//#endregion
|
|
232013
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
232088
|
+
//#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/ChunkRepo.js
|
|
232014
232089
|
/**
|
|
232015
232090
|
* @since 1.0.0
|
|
232016
232091
|
* @category Models
|
|
@@ -232290,7 +232365,7 @@ const run$1 = /* @__PURE__ */ make$25({});
|
|
|
232290
232365
|
*/
|
|
232291
232366
|
const layer$1 = (options) => effectDiscard(run$1(options));
|
|
232292
232367
|
//#endregion
|
|
232293
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
232368
|
+
//#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/internal/sqlite-vector.js
|
|
232294
232369
|
/**
|
|
232295
232370
|
* Binary extension for each platform
|
|
232296
232371
|
*/
|
|
@@ -232407,7 +232482,7 @@ function getExtensionPath() {
|
|
|
232407
232482
|
throw new ExtensionNotFoundError(`SQLite Vector extension not found for platform: ${getCurrentPlatform()}\n\nThe platform-specific package "${getPlatformPackageName()}" is not installed.\nThis usually happens when:\n 1. Your platform is not supported\n 2. npm failed to install optional dependencies\n 3. You're installing with --no-optional flag\n\nTry running: npm install --force`);
|
|
232408
232483
|
}
|
|
232409
232484
|
//#endregion
|
|
232410
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
232485
|
+
//#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/Sqlite.js
|
|
232411
232486
|
/**
|
|
232412
232487
|
* @since 1.0.0
|
|
232413
232488
|
*/
|
|
@@ -232435,7 +232510,7 @@ const SqliteLayer = (database) => layer$1({ loader: fromRecord({ "0001_create_ch
|
|
|
232435
232510
|
yield* fs.makeDirectory(directory, { recursive: true });
|
|
232436
232511
|
}))));
|
|
232437
232512
|
//#endregion
|
|
232438
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
232513
|
+
//#region node_modules/.pnpm/clanka@0.2.29_@effect+ai-openai-compat@4.0.0-beta.36_effect@4.0.0-beta.36__@effect+ai-o_c7bf3ff73fb714904da6f1876bc52310/node_modules/clanka/dist/SemanticSearch.js
|
|
232439
232514
|
/**
|
|
232440
232515
|
* @since 1.0.0
|
|
232441
232516
|
*/
|
|
@@ -240005,11 +240080,6 @@ var CurrentIssueSource = class CurrentIssueSource extends Service$1()("lalph/Cur
|
|
|
240005
240080
|
};
|
|
240006
240081
|
const refreshSchedule = exponential(100, 1.5).pipe(either(spaced("30 seconds")));
|
|
240007
240082
|
const getCurrentIssues = (projectId) => IssueSource.use((s) => pipe$1(s.ref(projectId), flatMap$4(get$5)));
|
|
240008
|
-
const checkForWork = fnUntraced(function* (project) {
|
|
240009
|
-
if (project.gitFlow === "ralph") return;
|
|
240010
|
-
const { issues } = yield* getCurrentIssues(project.id);
|
|
240011
|
-
if (!issues.some((issue) => issue.state === "todo" && issue.blockedBy.length === 0)) return yield* new NoMoreWork({});
|
|
240012
|
-
});
|
|
240013
240083
|
const resetInProgress = gen(function* () {
|
|
240014
240084
|
const source = yield* IssueSource;
|
|
240015
240085
|
const projectId = yield* CurrentProjectId;
|
|
@@ -240025,9 +240095,6 @@ const resetInProgress = gen(function* () {
|
|
|
240025
240095
|
discard: true
|
|
240026
240096
|
});
|
|
240027
240097
|
});
|
|
240028
|
-
var NoMoreWork = class extends ErrorClass("lalph/Prd/NoMoreWork")({ _tag: tag("NoMoreWork") }) {
|
|
240029
|
-
message = "No more work to be done!";
|
|
240030
|
-
};
|
|
240031
240098
|
//#endregion
|
|
240032
240099
|
//#region src/PromptGen.ts
|
|
240033
240100
|
var PromptGen = class extends Service$1()("lalph/PromptGen", { make: gen(function* () {
|
|
@@ -241107,6 +241174,23 @@ const runClanka = fnUntraced(function* (options) {
|
|
|
241107
241174
|
directory: options.directory,
|
|
241108
241175
|
tools: options.mode === "ralph" ? void 0 : options.mode === "choose" ? TaskChooseTools : TaskTools
|
|
241109
241176
|
}).pipe(merge$6(layerClankaModel(options.model))), { local: true }), provide$1([ModelServices, TaskToolsHandlers]));
|
|
241177
|
+
const runClankaPlan = fnUntraced(function* (options) {
|
|
241178
|
+
const stdio = yield* Stdio;
|
|
241179
|
+
const agent = yield* Agent;
|
|
241180
|
+
let nextPrompt = options.prompt;
|
|
241181
|
+
while (true) {
|
|
241182
|
+
yield* (yield* agent.send({
|
|
241183
|
+
prompt: nextPrompt,
|
|
241184
|
+
system: `ONLY call taskComplete by itself. NEVER call taskComplete alongside other functions, to ensure you first read output before deciding a task is done.`
|
|
241185
|
+
})).pipe(pretty({ outputTruncation: 20 }), run$8(stdio.stdout()));
|
|
241186
|
+
console.log("");
|
|
241187
|
+
nextPrompt = yield* text$2({ message: ">" });
|
|
241188
|
+
}
|
|
241189
|
+
}, scoped$1, (effect, options) => provide$1(effect, layerLocal({ directory: options.directory }).pipe(provide$3(SemanticSearchLayer), merge$6(layerClankaModel(options.model))), { local: true }), provide$1([
|
|
241190
|
+
ModelServices,
|
|
241191
|
+
TaskToolsHandlers,
|
|
241192
|
+
ConversationMode.layer(true)
|
|
241193
|
+
]), ignore$1());
|
|
241110
241194
|
//#endregion
|
|
241111
241195
|
//#region src/domain/CurrentTask.ts
|
|
241112
241196
|
const CurrentTask = taggedEnum();
|
|
@@ -241697,6 +241781,7 @@ const runProject = fnUntraced(function* (options) {
|
|
|
241697
241781
|
const iterationsDisplay = isFinite ? options.iterations : "unlimited";
|
|
241698
241782
|
const semaphore = makeUnsafe$9(options.project.concurrency);
|
|
241699
241783
|
const fibers = yield* make$56();
|
|
241784
|
+
const issuesRef = yield* (yield* IssueSource).ref(options.project.id);
|
|
241700
241785
|
let executionMode;
|
|
241701
241786
|
if (options.project.gitFlow === "ralph") {
|
|
241702
241787
|
if (!options.project.ralphSpec) return yield* new RalphSpecMissing({ projectId: options.project.id });
|
|
@@ -241733,20 +241818,22 @@ const runProject = fnUntraced(function* (options) {
|
|
|
241733
241818
|
research: options.project.researchAgent
|
|
241734
241819
|
});
|
|
241735
241820
|
};
|
|
241736
|
-
const handleNoMoreWork = (currentIteration, setIterations) => {
|
|
241737
|
-
if (executionMode._tag === "ralph") return void_$2;
|
|
241738
|
-
if (isFinite) {
|
|
241739
|
-
setIterations(currentIteration);
|
|
241740
|
-
return log$1(`No more work to process, ending after ${currentIteration} iteration(s).`);
|
|
241741
|
-
}
|
|
241742
|
-
return andThen(size$3(fibers) <= 1 ? log$1("No more work to process, waiting 30 seconds...") : void_$2, sleep(seconds(30)));
|
|
241743
|
-
};
|
|
241744
241821
|
yield* resetInProgress.pipe(withSpan$1("Main.resetInProgress"));
|
|
241745
241822
|
yield* log$1(`Executing ${iterationsDisplay} iteration(s) with concurrency ${options.project.concurrency}`);
|
|
241746
241823
|
let iterations = options.iterations;
|
|
241747
241824
|
let iteration = 0;
|
|
241748
241825
|
let quit = false;
|
|
241749
241826
|
yield* mount(activeWorkerLoggingAtom);
|
|
241827
|
+
const waitForWork = executionMode._tag === "ralph" ? void_$2 : changes(issuesRef).pipe(takeUntilEffect(fnUntraced(function* ({ issues }) {
|
|
241828
|
+
if (issues.some((issue) => issue.state === "todo" && issue.blockedBy.length === 0)) return true;
|
|
241829
|
+
if (isFinite) {
|
|
241830
|
+
quit = true;
|
|
241831
|
+
yield* log$1(`No more work to process, ending after ${iteration} iteration(s).`);
|
|
241832
|
+
return yield* interrupt$1;
|
|
241833
|
+
}
|
|
241834
|
+
if (size$3(fibers) <= 1) yield* log$1("No more work to process");
|
|
241835
|
+
return false;
|
|
241836
|
+
})), runDrain);
|
|
241750
241837
|
while (true) {
|
|
241751
241838
|
yield* semaphore.take(1);
|
|
241752
241839
|
if (quit || isFinite && iteration >= iterations) break;
|
|
@@ -241754,17 +241841,12 @@ const runProject = fnUntraced(function* (options) {
|
|
|
241754
241841
|
const startedDeferred = yield* make$87();
|
|
241755
241842
|
let ralphDone = false;
|
|
241756
241843
|
const gitFlowLayer = resolveGitFlowLayer();
|
|
241757
|
-
const fiber = yield*
|
|
241844
|
+
const fiber = yield* waitForWork.pipe(andThen(resolveRunEffect(startedDeferred).pipe(provide$1(gitFlowLayer, { local: true }), withWorkerState(options.project.id))), catchTags$1({
|
|
241758
241845
|
ChosenTaskNotFound(_error) {
|
|
241759
241846
|
if (executionMode._tag !== "ralph") return void_$2;
|
|
241760
241847
|
ralphDone = true;
|
|
241761
241848
|
return log$1(`No more work to process for Ralph, ending after ${currentIteration + 1} iteration(s).`);
|
|
241762
241849
|
},
|
|
241763
|
-
NoMoreWork(_error) {
|
|
241764
|
-
return handleNoMoreWork(currentIteration, (newIterations) => {
|
|
241765
|
-
iterations = newIterations;
|
|
241766
|
-
});
|
|
241767
|
-
},
|
|
241768
241850
|
QuitError(_error) {
|
|
241769
241851
|
quit = true;
|
|
241770
241852
|
return void_$2;
|
|
@@ -241863,6 +241945,14 @@ const agentPlanner = fnUntraced(function* (options) {
|
|
|
241863
241945
|
const worktree = yield* Worktree;
|
|
241864
241946
|
const promptGen = yield* PromptGen;
|
|
241865
241947
|
const spawner = yield* ChildProcessSpawner;
|
|
241948
|
+
if (options.preset.cliAgent.id === "clanka") {
|
|
241949
|
+
yield* runClankaPlan({
|
|
241950
|
+
directory: worktree.directory,
|
|
241951
|
+
model: options.preset.extraArgs.join(" "),
|
|
241952
|
+
prompt: promptGen.planPrompt(options)
|
|
241953
|
+
});
|
|
241954
|
+
return;
|
|
241955
|
+
}
|
|
241866
241956
|
yield* pipe$1(options.preset.cliAgent.commandPlan({
|
|
241867
241957
|
prompt: promptGen.planPrompt(options),
|
|
241868
241958
|
prdFilePath: options.ralph ? void 0 : pathService.join(".lalph", "prd.yml"),
|
|
@@ -242133,7 +242223,7 @@ const commandEdit = make$60("edit").pipe(withDescription("Open the selected proj
|
|
|
242133
242223
|
const commandSource = make$60("source").pipe(withDescription("Select the issue source to use (e.g. GitHub Issues or Linear). This applies to all projects."), withHandler(() => selectIssueSource), provide(Settings.layer));
|
|
242134
242224
|
//#endregion
|
|
242135
242225
|
//#region package.json
|
|
242136
|
-
var version = "0.3.
|
|
242226
|
+
var version = "0.3.99";
|
|
242137
242227
|
//#endregion
|
|
242138
242228
|
//#region src/Tracing.ts
|
|
242139
242229
|
const TracingLayer = unwrap$3(gen(function* () {
|