@probelabs/probe 0.6.0-rc257 → 0.6.0-rc258
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/bin/binaries/probe-v0.6.0-rc258-aarch64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc258-aarch64-unknown-linux-musl.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc258-x86_64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc258-x86_64-pc-windows-msvc.zip +0 -0
- package/bin/binaries/probe-v0.6.0-rc258-x86_64-unknown-linux-musl.tar.gz +0 -0
- package/build/agent/index.js +341 -116
- package/build/agent/shared/prompts.js +40 -8
- package/cjs/agent/ProbeAgent.cjs +2685 -4669
- package/cjs/index.cjs +2685 -4669
- package/package.json +1 -1
- package/src/agent/shared/prompts.js +40 -8
- package/bin/binaries/probe-v0.6.0-rc257-aarch64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc257-aarch64-unknown-linux-musl.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc257-x86_64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc257-x86_64-pc-windows-msvc.zip +0 -0
- package/bin/binaries/probe-v0.6.0-rc257-x86_64-unknown-linux-musl.tar.gz +0 -0
package/build/agent/index.js
CHANGED
|
@@ -23500,13 +23500,39 @@ var init_unescape = __esm({
|
|
|
23500
23500
|
});
|
|
23501
23501
|
|
|
23502
23502
|
// node_modules/minimatch/dist/esm/ast.js
|
|
23503
|
-
var types2, isExtglobType, startNoTraversal, startNoDot, addPatternStart, justDots, reSpecials, regExpEscape, qmark, star, starNoEmpty, AST;
|
|
23503
|
+
var _a, types2, isExtglobType, isExtglobAST, adoptionMap, adoptionWithSpaceMap, adoptionAnyMap, usurpMap, startNoTraversal, startNoDot, addPatternStart, justDots, reSpecials, regExpEscape, qmark, star, starNoEmpty, AST;
|
|
23504
23504
|
var init_ast = __esm({
|
|
23505
23505
|
"node_modules/minimatch/dist/esm/ast.js"() {
|
|
23506
23506
|
init_brace_expressions();
|
|
23507
23507
|
init_unescape();
|
|
23508
23508
|
types2 = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
|
|
23509
23509
|
isExtglobType = (c) => types2.has(c);
|
|
23510
|
+
isExtglobAST = (c) => isExtglobType(c.type);
|
|
23511
|
+
adoptionMap = /* @__PURE__ */ new Map([
|
|
23512
|
+
["!", ["@"]],
|
|
23513
|
+
["?", ["?", "@"]],
|
|
23514
|
+
["@", ["@"]],
|
|
23515
|
+
["*", ["*", "+", "?", "@"]],
|
|
23516
|
+
["+", ["+", "@"]]
|
|
23517
|
+
]);
|
|
23518
|
+
adoptionWithSpaceMap = /* @__PURE__ */ new Map([
|
|
23519
|
+
["!", ["?"]],
|
|
23520
|
+
["@", ["?"]],
|
|
23521
|
+
["+", ["?", "*"]]
|
|
23522
|
+
]);
|
|
23523
|
+
adoptionAnyMap = /* @__PURE__ */ new Map([
|
|
23524
|
+
["!", ["?", "@"]],
|
|
23525
|
+
["?", ["?", "@"]],
|
|
23526
|
+
["@", ["?", "@"]],
|
|
23527
|
+
["*", ["*", "+", "?", "@"]],
|
|
23528
|
+
["+", ["+", "@", "?", "*"]]
|
|
23529
|
+
]);
|
|
23530
|
+
usurpMap = /* @__PURE__ */ new Map([
|
|
23531
|
+
["!", /* @__PURE__ */ new Map([["!", "@"]])],
|
|
23532
|
+
["?", /* @__PURE__ */ new Map([["*", "*"], ["+", "*"]])],
|
|
23533
|
+
["@", /* @__PURE__ */ new Map([["!", "!"], ["?", "?"], ["@", "@"], ["*", "*"], ["+", "+"]])],
|
|
23534
|
+
["+", /* @__PURE__ */ new Map([["?", "*"], ["*", "*"]])]
|
|
23535
|
+
]);
|
|
23510
23536
|
startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
|
|
23511
23537
|
startNoDot = "(?!\\.)";
|
|
23512
23538
|
addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
|
|
@@ -23516,7 +23542,7 @@ var init_ast = __esm({
|
|
|
23516
23542
|
qmark = "[^/]";
|
|
23517
23543
|
star = qmark + "*?";
|
|
23518
23544
|
starNoEmpty = qmark + "+?";
|
|
23519
|
-
AST = class
|
|
23545
|
+
AST = class {
|
|
23520
23546
|
type;
|
|
23521
23547
|
#root;
|
|
23522
23548
|
#hasMagic;
|
|
@@ -23596,7 +23622,7 @@ var init_ast = __esm({
|
|
|
23596
23622
|
for (const p of parts) {
|
|
23597
23623
|
if (p === "")
|
|
23598
23624
|
continue;
|
|
23599
|
-
if (typeof p !== "string" && !(p instanceof
|
|
23625
|
+
if (typeof p !== "string" && !(p instanceof _a && p.#parent === this)) {
|
|
23600
23626
|
throw new Error("invalid part: " + p);
|
|
23601
23627
|
}
|
|
23602
23628
|
this.#parts.push(p);
|
|
@@ -23621,7 +23647,7 @@ var init_ast = __esm({
|
|
|
23621
23647
|
const p = this.#parent;
|
|
23622
23648
|
for (let i = 0; i < this.#parentIndex; i++) {
|
|
23623
23649
|
const pp2 = p.#parts[i];
|
|
23624
|
-
if (!(pp2 instanceof
|
|
23650
|
+
if (!(pp2 instanceof _a && pp2.type === "!")) {
|
|
23625
23651
|
return false;
|
|
23626
23652
|
}
|
|
23627
23653
|
}
|
|
@@ -23646,13 +23672,14 @@ var init_ast = __esm({
|
|
|
23646
23672
|
this.push(part.clone(this));
|
|
23647
23673
|
}
|
|
23648
23674
|
clone(parent) {
|
|
23649
|
-
const c = new
|
|
23675
|
+
const c = new _a(this.type, parent);
|
|
23650
23676
|
for (const p of this.#parts) {
|
|
23651
23677
|
c.copyIn(p);
|
|
23652
23678
|
}
|
|
23653
23679
|
return c;
|
|
23654
23680
|
}
|
|
23655
|
-
static #parseAST(str, ast, pos, opt) {
|
|
23681
|
+
static #parseAST(str, ast, pos, opt, extDepth) {
|
|
23682
|
+
const maxDepth = opt.maxExtglobRecursion ?? 2;
|
|
23656
23683
|
let escaping = false;
|
|
23657
23684
|
let inBrace = false;
|
|
23658
23685
|
let braceStart = -1;
|
|
@@ -23684,11 +23711,12 @@ var init_ast = __esm({
|
|
|
23684
23711
|
acc2 += c;
|
|
23685
23712
|
continue;
|
|
23686
23713
|
}
|
|
23687
|
-
|
|
23714
|
+
const doRecurse = !opt.noext && isExtglobType(c) && str.charAt(i2) === "(" && extDepth <= maxDepth;
|
|
23715
|
+
if (doRecurse) {
|
|
23688
23716
|
ast.push(acc2);
|
|
23689
23717
|
acc2 = "";
|
|
23690
|
-
const ext2 = new
|
|
23691
|
-
i2 =
|
|
23718
|
+
const ext2 = new _a(c, ast);
|
|
23719
|
+
i2 = _a.#parseAST(str, ext2, i2, opt, extDepth + 1);
|
|
23692
23720
|
ast.push(ext2);
|
|
23693
23721
|
continue;
|
|
23694
23722
|
}
|
|
@@ -23698,7 +23726,7 @@ var init_ast = __esm({
|
|
|
23698
23726
|
return i2;
|
|
23699
23727
|
}
|
|
23700
23728
|
let i = pos + 1;
|
|
23701
|
-
let part = new
|
|
23729
|
+
let part = new _a(null, ast);
|
|
23702
23730
|
const parts = [];
|
|
23703
23731
|
let acc = "";
|
|
23704
23732
|
while (i < str.length) {
|
|
@@ -23725,19 +23753,22 @@ var init_ast = __esm({
|
|
|
23725
23753
|
acc += c;
|
|
23726
23754
|
continue;
|
|
23727
23755
|
}
|
|
23728
|
-
|
|
23756
|
+
const doRecurse = isExtglobType(c) && str.charAt(i) === "(" && /* c8 ignore start - the maxDepth is sufficient here */
|
|
23757
|
+
(extDepth <= maxDepth || ast && ast.#canAdoptType(c));
|
|
23758
|
+
if (doRecurse) {
|
|
23759
|
+
const depthAdd = ast && ast.#canAdoptType(c) ? 0 : 1;
|
|
23729
23760
|
part.push(acc);
|
|
23730
23761
|
acc = "";
|
|
23731
|
-
const ext2 = new
|
|
23762
|
+
const ext2 = new _a(c, part);
|
|
23732
23763
|
part.push(ext2);
|
|
23733
|
-
i =
|
|
23764
|
+
i = _a.#parseAST(str, ext2, i, opt, extDepth + depthAdd);
|
|
23734
23765
|
continue;
|
|
23735
23766
|
}
|
|
23736
23767
|
if (c === "|") {
|
|
23737
23768
|
part.push(acc);
|
|
23738
23769
|
acc = "";
|
|
23739
23770
|
parts.push(part);
|
|
23740
|
-
part = new
|
|
23771
|
+
part = new _a(null, ast);
|
|
23741
23772
|
continue;
|
|
23742
23773
|
}
|
|
23743
23774
|
if (c === ")") {
|
|
@@ -23756,9 +23787,101 @@ var init_ast = __esm({
|
|
|
23756
23787
|
ast.#parts = [str.substring(pos - 1)];
|
|
23757
23788
|
return i;
|
|
23758
23789
|
}
|
|
23790
|
+
#canAdoptWithSpace(child) {
|
|
23791
|
+
return this.#canAdopt(child, adoptionWithSpaceMap);
|
|
23792
|
+
}
|
|
23793
|
+
#canAdopt(child, map2 = adoptionMap) {
|
|
23794
|
+
if (!child || typeof child !== "object" || child.type !== null || child.#parts.length !== 1 || this.type === null) {
|
|
23795
|
+
return false;
|
|
23796
|
+
}
|
|
23797
|
+
const gc = child.#parts[0];
|
|
23798
|
+
if (!gc || typeof gc !== "object" || gc.type === null) {
|
|
23799
|
+
return false;
|
|
23800
|
+
}
|
|
23801
|
+
return this.#canAdoptType(gc.type, map2);
|
|
23802
|
+
}
|
|
23803
|
+
#canAdoptType(c, map2 = adoptionAnyMap) {
|
|
23804
|
+
return !!map2.get(this.type)?.includes(c);
|
|
23805
|
+
}
|
|
23806
|
+
#adoptWithSpace(child, index) {
|
|
23807
|
+
const gc = child.#parts[0];
|
|
23808
|
+
const blank = new _a(null, gc, this.options);
|
|
23809
|
+
blank.#parts.push("");
|
|
23810
|
+
gc.push(blank);
|
|
23811
|
+
this.#adopt(child, index);
|
|
23812
|
+
}
|
|
23813
|
+
#adopt(child, index) {
|
|
23814
|
+
const gc = child.#parts[0];
|
|
23815
|
+
this.#parts.splice(index, 1, ...gc.#parts);
|
|
23816
|
+
for (const p of gc.#parts) {
|
|
23817
|
+
if (typeof p === "object")
|
|
23818
|
+
p.#parent = this;
|
|
23819
|
+
}
|
|
23820
|
+
this.#toString = void 0;
|
|
23821
|
+
}
|
|
23822
|
+
#canUsurpType(c) {
|
|
23823
|
+
const m = usurpMap.get(this.type);
|
|
23824
|
+
return !!m?.has(c);
|
|
23825
|
+
}
|
|
23826
|
+
#canUsurp(child) {
|
|
23827
|
+
if (!child || typeof child !== "object" || child.type !== null || child.#parts.length !== 1 || this.type === null || this.#parts.length !== 1) {
|
|
23828
|
+
return false;
|
|
23829
|
+
}
|
|
23830
|
+
const gc = child.#parts[0];
|
|
23831
|
+
if (!gc || typeof gc !== "object" || gc.type === null) {
|
|
23832
|
+
return false;
|
|
23833
|
+
}
|
|
23834
|
+
return this.#canUsurpType(gc.type);
|
|
23835
|
+
}
|
|
23836
|
+
#usurp(child) {
|
|
23837
|
+
const m = usurpMap.get(this.type);
|
|
23838
|
+
const gc = child.#parts[0];
|
|
23839
|
+
const nt = m?.get(gc.type);
|
|
23840
|
+
if (!nt)
|
|
23841
|
+
return false;
|
|
23842
|
+
this.#parts = gc.#parts;
|
|
23843
|
+
for (const p of this.#parts) {
|
|
23844
|
+
if (typeof p === "object")
|
|
23845
|
+
p.#parent = this;
|
|
23846
|
+
}
|
|
23847
|
+
this.type = nt;
|
|
23848
|
+
this.#toString = void 0;
|
|
23849
|
+
this.#emptyExt = false;
|
|
23850
|
+
}
|
|
23851
|
+
#flatten() {
|
|
23852
|
+
if (!isExtglobAST(this)) {
|
|
23853
|
+
for (const p of this.#parts) {
|
|
23854
|
+
if (typeof p === "object")
|
|
23855
|
+
p.#flatten();
|
|
23856
|
+
}
|
|
23857
|
+
} else {
|
|
23858
|
+
let iterations = 0;
|
|
23859
|
+
let done = false;
|
|
23860
|
+
do {
|
|
23861
|
+
done = true;
|
|
23862
|
+
for (let i = 0; i < this.#parts.length; i++) {
|
|
23863
|
+
const c = this.#parts[i];
|
|
23864
|
+
if (typeof c === "object") {
|
|
23865
|
+
c.#flatten();
|
|
23866
|
+
if (this.#canAdopt(c)) {
|
|
23867
|
+
done = false;
|
|
23868
|
+
this.#adopt(c, i);
|
|
23869
|
+
} else if (this.#canAdoptWithSpace(c)) {
|
|
23870
|
+
done = false;
|
|
23871
|
+
this.#adoptWithSpace(c, i);
|
|
23872
|
+
} else if (this.#canUsurp(c)) {
|
|
23873
|
+
done = false;
|
|
23874
|
+
this.#usurp(c);
|
|
23875
|
+
}
|
|
23876
|
+
}
|
|
23877
|
+
}
|
|
23878
|
+
} while (!done && ++iterations < 10);
|
|
23879
|
+
}
|
|
23880
|
+
this.#toString = void 0;
|
|
23881
|
+
}
|
|
23759
23882
|
static fromGlob(pattern, options = {}) {
|
|
23760
|
-
const ast = new
|
|
23761
|
-
|
|
23883
|
+
const ast = new _a(null, void 0, options);
|
|
23884
|
+
_a.#parseAST(pattern, ast, 0, options, 0);
|
|
23762
23885
|
return ast;
|
|
23763
23886
|
}
|
|
23764
23887
|
// returns the regular expression if there's magic, or the unescaped
|
|
@@ -23852,12 +23975,14 @@ var init_ast = __esm({
|
|
|
23852
23975
|
// or start or whatever) and prepend ^ or / at the Regexp construction.
|
|
23853
23976
|
toRegExpSource(allowDot) {
|
|
23854
23977
|
const dot = allowDot ?? !!this.#options.dot;
|
|
23855
|
-
if (this.#root === this)
|
|
23978
|
+
if (this.#root === this) {
|
|
23979
|
+
this.#flatten();
|
|
23856
23980
|
this.#fillNegs();
|
|
23857
|
-
|
|
23981
|
+
}
|
|
23982
|
+
if (!isExtglobAST(this)) {
|
|
23858
23983
|
const noEmpty = this.isStart() && this.isEnd();
|
|
23859
23984
|
const src = this.#parts.map((p) => {
|
|
23860
|
-
const [re, _, hasMagic2, uflag] = typeof p === "string" ?
|
|
23985
|
+
const [re, _, hasMagic2, uflag] = typeof p === "string" ? _a.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot);
|
|
23861
23986
|
this.#hasMagic = this.#hasMagic || hasMagic2;
|
|
23862
23987
|
this.#uflag = this.#uflag || uflag;
|
|
23863
23988
|
return re;
|
|
@@ -23896,9 +24021,10 @@ var init_ast = __esm({
|
|
|
23896
24021
|
let body = this.#partsToRegExp(dot);
|
|
23897
24022
|
if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
|
|
23898
24023
|
const s = this.toString();
|
|
23899
|
-
|
|
23900
|
-
|
|
23901
|
-
|
|
24024
|
+
const me = this;
|
|
24025
|
+
me.#parts = [s];
|
|
24026
|
+
me.type = null;
|
|
24027
|
+
me.#hasMagic = void 0;
|
|
23902
24028
|
return [s, unescape2(this.toString()), false, false];
|
|
23903
24029
|
}
|
|
23904
24030
|
let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? "" : this.#partsToRegExp(true);
|
|
@@ -23987,6 +24113,7 @@ var init_ast = __esm({
|
|
|
23987
24113
|
return [re, unescape2(glob2), !!hasMagic2, uflag];
|
|
23988
24114
|
}
|
|
23989
24115
|
};
|
|
24116
|
+
_a = AST;
|
|
23990
24117
|
}
|
|
23991
24118
|
});
|
|
23992
24119
|
|
|
@@ -24160,11 +24287,13 @@ var init_esm3 = __esm({
|
|
|
24160
24287
|
isWindows;
|
|
24161
24288
|
platform;
|
|
24162
24289
|
windowsNoMagicRoot;
|
|
24290
|
+
maxGlobstarRecursion;
|
|
24163
24291
|
regexp;
|
|
24164
24292
|
constructor(pattern, options = {}) {
|
|
24165
24293
|
assertValidPattern(pattern);
|
|
24166
24294
|
options = options || {};
|
|
24167
24295
|
this.options = options;
|
|
24296
|
+
this.maxGlobstarRecursion = options.maxGlobstarRecursion ?? 200;
|
|
24168
24297
|
this.pattern = pattern;
|
|
24169
24298
|
this.platform = options.platform || defaultPlatform;
|
|
24170
24299
|
this.isWindows = this.platform === "win32";
|
|
@@ -24497,7 +24626,8 @@ var init_esm3 = __esm({
|
|
|
24497
24626
|
// out of pattern, then that's fine, as long as all
|
|
24498
24627
|
// the parts match.
|
|
24499
24628
|
matchOne(file, pattern, partial = false) {
|
|
24500
|
-
|
|
24629
|
+
let fileStartIndex = 0;
|
|
24630
|
+
let patternStartIndex = 0;
|
|
24501
24631
|
if (this.isWindows) {
|
|
24502
24632
|
const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
|
|
24503
24633
|
const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
|
|
@@ -24506,14 +24636,14 @@ var init_esm3 = __esm({
|
|
|
24506
24636
|
const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
|
|
24507
24637
|
const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
|
|
24508
24638
|
if (typeof fdi === "number" && typeof pdi === "number") {
|
|
24509
|
-
const [fd, pd] = [
|
|
24639
|
+
const [fd, pd] = [
|
|
24640
|
+
file[fdi],
|
|
24641
|
+
pattern[pdi]
|
|
24642
|
+
];
|
|
24510
24643
|
if (fd.toLowerCase() === pd.toLowerCase()) {
|
|
24511
24644
|
pattern[pdi] = fd;
|
|
24512
|
-
|
|
24513
|
-
|
|
24514
|
-
} else if (fdi > pdi) {
|
|
24515
|
-
file = file.slice(fdi);
|
|
24516
|
-
}
|
|
24645
|
+
patternStartIndex = pdi;
|
|
24646
|
+
fileStartIndex = fdi;
|
|
24517
24647
|
}
|
|
24518
24648
|
}
|
|
24519
24649
|
}
|
|
@@ -24521,51 +24651,114 @@ var init_esm3 = __esm({
|
|
|
24521
24651
|
if (optimizationLevel >= 2) {
|
|
24522
24652
|
file = this.levelTwoFileOptimize(file);
|
|
24523
24653
|
}
|
|
24524
|
-
|
|
24525
|
-
|
|
24526
|
-
|
|
24527
|
-
|
|
24528
|
-
|
|
24529
|
-
|
|
24530
|
-
|
|
24531
|
-
|
|
24654
|
+
if (pattern.includes(GLOBSTAR)) {
|
|
24655
|
+
return this.#matchGlobstar(file, pattern, partial, fileStartIndex, patternStartIndex);
|
|
24656
|
+
}
|
|
24657
|
+
return this.#matchOne(file, pattern, partial, fileStartIndex, patternStartIndex);
|
|
24658
|
+
}
|
|
24659
|
+
#matchGlobstar(file, pattern, partial, fileIndex, patternIndex) {
|
|
24660
|
+
const firstgs = pattern.indexOf(GLOBSTAR, patternIndex);
|
|
24661
|
+
const lastgs = pattern.lastIndexOf(GLOBSTAR);
|
|
24662
|
+
const [head2, body, tail] = [
|
|
24663
|
+
pattern.slice(patternIndex, firstgs),
|
|
24664
|
+
pattern.slice(firstgs + 1, lastgs),
|
|
24665
|
+
pattern.slice(lastgs + 1)
|
|
24666
|
+
];
|
|
24667
|
+
if (head2.length) {
|
|
24668
|
+
const fileHead = file.slice(fileIndex, fileIndex + head2.length);
|
|
24669
|
+
if (!this.#matchOne(fileHead, head2, partial, 0, 0))
|
|
24532
24670
|
return false;
|
|
24533
|
-
|
|
24534
|
-
|
|
24535
|
-
|
|
24536
|
-
|
|
24537
|
-
|
|
24538
|
-
|
|
24539
|
-
|
|
24540
|
-
|
|
24541
|
-
|
|
24542
|
-
|
|
24543
|
-
|
|
24544
|
-
return
|
|
24671
|
+
fileIndex += head2.length;
|
|
24672
|
+
}
|
|
24673
|
+
let fileTailMatch = 0;
|
|
24674
|
+
if (tail.length) {
|
|
24675
|
+
if (tail.length + fileIndex > file.length)
|
|
24676
|
+
return false;
|
|
24677
|
+
let tailStart = file.length - tail.length;
|
|
24678
|
+
if (this.#matchOne(file, tail, partial, tailStart, 0)) {
|
|
24679
|
+
fileTailMatch = tail.length;
|
|
24680
|
+
} else {
|
|
24681
|
+
if (file[file.length - 1] !== "" || fileIndex + tail.length === file.length) {
|
|
24682
|
+
return false;
|
|
24545
24683
|
}
|
|
24546
|
-
|
|
24547
|
-
|
|
24548
|
-
|
|
24549
|
-
|
|
24550
|
-
|
|
24551
|
-
|
|
24552
|
-
|
|
24553
|
-
|
|
24554
|
-
|
|
24555
|
-
|
|
24556
|
-
|
|
24557
|
-
|
|
24558
|
-
|
|
24559
|
-
}
|
|
24684
|
+
tailStart--;
|
|
24685
|
+
if (!this.#matchOne(file, tail, partial, tailStart, 0))
|
|
24686
|
+
return false;
|
|
24687
|
+
fileTailMatch = tail.length + 1;
|
|
24688
|
+
}
|
|
24689
|
+
}
|
|
24690
|
+
if (!body.length) {
|
|
24691
|
+
let sawSome = !!fileTailMatch;
|
|
24692
|
+
for (let i2 = fileIndex; i2 < file.length - fileTailMatch; i2++) {
|
|
24693
|
+
const f = String(file[i2]);
|
|
24694
|
+
sawSome = true;
|
|
24695
|
+
if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
|
|
24696
|
+
return false;
|
|
24560
24697
|
}
|
|
24561
|
-
|
|
24562
|
-
|
|
24563
|
-
|
|
24564
|
-
|
|
24565
|
-
|
|
24698
|
+
}
|
|
24699
|
+
return sawSome;
|
|
24700
|
+
}
|
|
24701
|
+
const bodySegments = [[[], 0]];
|
|
24702
|
+
let currentBody = bodySegments[0];
|
|
24703
|
+
let nonGsParts = 0;
|
|
24704
|
+
const nonGsPartsSums = [0];
|
|
24705
|
+
for (const b of body) {
|
|
24706
|
+
if (b === GLOBSTAR) {
|
|
24707
|
+
nonGsPartsSums.push(nonGsParts);
|
|
24708
|
+
currentBody = [[], 0];
|
|
24709
|
+
bodySegments.push(currentBody);
|
|
24710
|
+
} else {
|
|
24711
|
+
currentBody[0].push(b);
|
|
24712
|
+
nonGsParts++;
|
|
24713
|
+
}
|
|
24714
|
+
}
|
|
24715
|
+
let i = bodySegments.length - 1;
|
|
24716
|
+
const fileLength = file.length - fileTailMatch;
|
|
24717
|
+
for (const b of bodySegments) {
|
|
24718
|
+
b[1] = fileLength - (nonGsPartsSums[i--] + b[0].length);
|
|
24719
|
+
}
|
|
24720
|
+
return !!this.#matchGlobStarBodySections(file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch);
|
|
24721
|
+
}
|
|
24722
|
+
#matchGlobStarBodySections(file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {
|
|
24723
|
+
const bs = bodySegments[bodyIndex];
|
|
24724
|
+
if (!bs) {
|
|
24725
|
+
for (let i = fileIndex; i < file.length; i++) {
|
|
24726
|
+
sawTail = true;
|
|
24727
|
+
const f = file[i];
|
|
24728
|
+
if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
|
|
24729
|
+
return false;
|
|
24566
24730
|
}
|
|
24731
|
+
}
|
|
24732
|
+
return sawTail;
|
|
24733
|
+
}
|
|
24734
|
+
const [body, after] = bs;
|
|
24735
|
+
while (fileIndex <= after) {
|
|
24736
|
+
const m = this.#matchOne(file.slice(0, fileIndex + body.length), body, partial, fileIndex, 0);
|
|
24737
|
+
if (m && globStarDepth < this.maxGlobstarRecursion) {
|
|
24738
|
+
const sub = this.#matchGlobStarBodySections(file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail);
|
|
24739
|
+
if (sub !== false)
|
|
24740
|
+
return sub;
|
|
24741
|
+
}
|
|
24742
|
+
const f = file[fileIndex];
|
|
24743
|
+
if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
|
|
24567
24744
|
return false;
|
|
24568
24745
|
}
|
|
24746
|
+
fileIndex++;
|
|
24747
|
+
}
|
|
24748
|
+
return null;
|
|
24749
|
+
}
|
|
24750
|
+
#matchOne(file, pattern, partial, fileIndex, patternIndex) {
|
|
24751
|
+
let fi;
|
|
24752
|
+
let pi;
|
|
24753
|
+
let pl;
|
|
24754
|
+
let fl;
|
|
24755
|
+
for (fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
|
|
24756
|
+
this.debug("matchOne loop");
|
|
24757
|
+
let p = pattern[pi];
|
|
24758
|
+
let f = file[fi];
|
|
24759
|
+
this.debug(pattern, p, f);
|
|
24760
|
+
if (p === false || p === GLOBSTAR)
|
|
24761
|
+
return false;
|
|
24569
24762
|
let hit;
|
|
24570
24763
|
if (typeof p === "string") {
|
|
24571
24764
|
hit = f === p;
|
|
@@ -42255,8 +42448,8 @@ var init_llk_lookahead = __esm({
|
|
|
42255
42448
|
init_lookahead();
|
|
42256
42449
|
LLkLookaheadStrategy = class {
|
|
42257
42450
|
constructor(options) {
|
|
42258
|
-
var
|
|
42259
|
-
this.maxLookahead = (
|
|
42451
|
+
var _a2;
|
|
42452
|
+
this.maxLookahead = (_a2 = options === null || options === void 0 ? void 0 : options.maxLookahead) !== null && _a2 !== void 0 ? _a2 : DEFAULT_PARSER_CONFIG.maxLookahead;
|
|
42260
42453
|
}
|
|
42261
42454
|
validate(options) {
|
|
42262
42455
|
const leftRecursionErrors = this.validateNoLeftRecursion(options.rules);
|
|
@@ -44125,8 +44318,8 @@ var init_parser = __esm({
|
|
|
44125
44318
|
});
|
|
44126
44319
|
}
|
|
44127
44320
|
this.TRACE_INIT("ComputeLookaheadFunctions", () => {
|
|
44128
|
-
var
|
|
44129
|
-
(_b = (
|
|
44321
|
+
var _a2, _b;
|
|
44322
|
+
(_b = (_a2 = this.lookaheadStrategy).initialize) === null || _b === void 0 ? void 0 : _b.call(_a2, {
|
|
44130
44323
|
rules: values_default(this.gastProductionsCache)
|
|
44131
44324
|
});
|
|
44132
44325
|
this.preComputeLookaheadFunctions(values_default(this.gastProductionsCache));
|
|
@@ -62080,7 +62273,7 @@ function toGraph(model) {
|
|
|
62080
62273
|
return { graph: { nodes, edges, subgraphs, direction: model.direction }, laneGroups };
|
|
62081
62274
|
}
|
|
62082
62275
|
function renderState(model) {
|
|
62083
|
-
var
|
|
62276
|
+
var _a2;
|
|
62084
62277
|
const { graph, laneGroups } = toGraph(model);
|
|
62085
62278
|
const layout = new DagreLayoutEngine().layout(graph);
|
|
62086
62279
|
let svg = new SVGRenderer().render(layout);
|
|
@@ -62095,7 +62288,7 @@ function renderState(model) {
|
|
|
62095
62288
|
const members = lg.nodes.map((id) => byId[id]).filter(Boolean);
|
|
62096
62289
|
if (!members.length)
|
|
62097
62290
|
continue;
|
|
62098
|
-
(groupByParent[
|
|
62291
|
+
(groupByParent[_a2 = lg.parentId] || (groupByParent[_a2] = [])).push({ id: lg.id, nodes: members });
|
|
62099
62292
|
}
|
|
62100
62293
|
const laneIndex = (id) => {
|
|
62101
62294
|
const m = /(.*)__lane(\d+)/.exec(id);
|
|
@@ -63183,12 +63376,12 @@ var require_code = __commonJS({
|
|
|
63183
63376
|
return item === "" || item === '""';
|
|
63184
63377
|
}
|
|
63185
63378
|
get str() {
|
|
63186
|
-
var
|
|
63187
|
-
return (
|
|
63379
|
+
var _a2;
|
|
63380
|
+
return (_a2 = this._str) !== null && _a2 !== void 0 ? _a2 : this._str = this._items.reduce((s, c) => `${s}${c}`, "");
|
|
63188
63381
|
}
|
|
63189
63382
|
get names() {
|
|
63190
|
-
var
|
|
63191
|
-
return (
|
|
63383
|
+
var _a2;
|
|
63384
|
+
return (_a2 = this._names) !== null && _a2 !== void 0 ? _a2 : this._names = this._items.reduce((names, c) => {
|
|
63192
63385
|
if (c instanceof Name)
|
|
63193
63386
|
names[c.str] = (names[c.str] || 0) + 1;
|
|
63194
63387
|
return names;
|
|
@@ -63334,8 +63527,8 @@ var require_scope = __commonJS({
|
|
|
63334
63527
|
return `${prefix}${ng.index++}`;
|
|
63335
63528
|
}
|
|
63336
63529
|
_nameGroup(prefix) {
|
|
63337
|
-
var
|
|
63338
|
-
if (((_b = (
|
|
63530
|
+
var _a2, _b;
|
|
63531
|
+
if (((_b = (_a2 = this._parent) === null || _a2 === void 0 ? void 0 : _a2._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || this._prefixes && !this._prefixes.has(prefix)) {
|
|
63339
63532
|
throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`);
|
|
63340
63533
|
}
|
|
63341
63534
|
return this._names[prefix] = { prefix, index: 0 };
|
|
@@ -63368,12 +63561,12 @@ var require_scope = __commonJS({
|
|
|
63368
63561
|
return new ValueScopeName(prefix, this._newName(prefix));
|
|
63369
63562
|
}
|
|
63370
63563
|
value(nameOrPrefix, value) {
|
|
63371
|
-
var
|
|
63564
|
+
var _a2;
|
|
63372
63565
|
if (value.ref === void 0)
|
|
63373
63566
|
throw new Error("CodeGen: ref must be passed in value");
|
|
63374
63567
|
const name = this.toName(nameOrPrefix);
|
|
63375
63568
|
const { prefix } = name;
|
|
63376
|
-
const valueKey = (
|
|
63569
|
+
const valueKey = (_a2 = value.key) !== null && _a2 !== void 0 ? _a2 : value.ref;
|
|
63377
63570
|
let vs = this._values[prefix];
|
|
63378
63571
|
if (vs) {
|
|
63379
63572
|
const _name = vs.get(valueKey);
|
|
@@ -63691,8 +63884,8 @@ var require_codegen = __commonJS({
|
|
|
63691
63884
|
return this;
|
|
63692
63885
|
}
|
|
63693
63886
|
optimizeNames(names, constants) {
|
|
63694
|
-
var
|
|
63695
|
-
this.else = (
|
|
63887
|
+
var _a2;
|
|
63888
|
+
this.else = (_a2 = this.else) === null || _a2 === void 0 ? void 0 : _a2.optimizeNames(names, constants);
|
|
63696
63889
|
if (!(super.optimizeNames(names, constants) || this.else))
|
|
63697
63890
|
return;
|
|
63698
63891
|
this.condition = optimizeExpr(this.condition, names, constants);
|
|
@@ -63796,16 +63989,16 @@ var require_codegen = __commonJS({
|
|
|
63796
63989
|
return code;
|
|
63797
63990
|
}
|
|
63798
63991
|
optimizeNodes() {
|
|
63799
|
-
var
|
|
63992
|
+
var _a2, _b;
|
|
63800
63993
|
super.optimizeNodes();
|
|
63801
|
-
(
|
|
63994
|
+
(_a2 = this.catch) === null || _a2 === void 0 ? void 0 : _a2.optimizeNodes();
|
|
63802
63995
|
(_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNodes();
|
|
63803
63996
|
return this;
|
|
63804
63997
|
}
|
|
63805
63998
|
optimizeNames(names, constants) {
|
|
63806
|
-
var
|
|
63999
|
+
var _a2, _b;
|
|
63807
64000
|
super.optimizeNames(names, constants);
|
|
63808
|
-
(
|
|
64001
|
+
(_a2 = this.catch) === null || _a2 === void 0 ? void 0 : _a2.optimizeNames(names, constants);
|
|
63809
64002
|
(_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names, constants);
|
|
63810
64003
|
return this;
|
|
63811
64004
|
}
|
|
@@ -64585,8 +64778,8 @@ var require_applicability = __commonJS({
|
|
|
64585
64778
|
}
|
|
64586
64779
|
exports2.shouldUseGroup = shouldUseGroup;
|
|
64587
64780
|
function shouldUseRule(schema, rule) {
|
|
64588
|
-
var
|
|
64589
|
-
return schema[rule.keyword] !== void 0 || ((
|
|
64781
|
+
var _a2;
|
|
64782
|
+
return schema[rule.keyword] !== void 0 || ((_a2 = rule.definition.implements) === null || _a2 === void 0 ? void 0 : _a2.some((kwd) => schema[kwd] !== void 0));
|
|
64590
64783
|
}
|
|
64591
64784
|
exports2.shouldUseRule = shouldUseRule;
|
|
64592
64785
|
}
|
|
@@ -64974,14 +65167,14 @@ var require_keyword = __commonJS({
|
|
|
64974
65167
|
}
|
|
64975
65168
|
exports2.macroKeywordCode = macroKeywordCode;
|
|
64976
65169
|
function funcKeywordCode(cxt, def) {
|
|
64977
|
-
var
|
|
65170
|
+
var _a2;
|
|
64978
65171
|
const { gen, keyword, schema, parentSchema, $data, it } = cxt;
|
|
64979
65172
|
checkAsyncKeyword(it, def);
|
|
64980
65173
|
const validate2 = !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate;
|
|
64981
65174
|
const validateRef = useKeyword(gen, keyword, validate2);
|
|
64982
65175
|
const valid = gen.let("valid");
|
|
64983
65176
|
cxt.block$data(valid, validateKeyword);
|
|
64984
|
-
cxt.ok((
|
|
65177
|
+
cxt.ok((_a2 = def.valid) !== null && _a2 !== void 0 ? _a2 : valid);
|
|
64985
65178
|
function validateKeyword() {
|
|
64986
65179
|
if (def.errors === false) {
|
|
64987
65180
|
assignValid();
|
|
@@ -65012,8 +65205,8 @@ var require_keyword = __commonJS({
|
|
|
65012
65205
|
gen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);
|
|
65013
65206
|
}
|
|
65014
65207
|
function reportErrs(errors) {
|
|
65015
|
-
var
|
|
65016
|
-
gen.if((0, codegen_1.not)((
|
|
65208
|
+
var _a3;
|
|
65209
|
+
gen.if((0, codegen_1.not)((_a3 = def.valid) !== null && _a3 !== void 0 ? _a3 : valid), errors);
|
|
65017
65210
|
}
|
|
65018
65211
|
}
|
|
65019
65212
|
exports2.funcKeywordCode = funcKeywordCode;
|
|
@@ -65981,7 +66174,7 @@ var require_compile = __commonJS({
|
|
|
65981
66174
|
var validate_1 = require_validate();
|
|
65982
66175
|
var SchemaEnv = class {
|
|
65983
66176
|
constructor(env) {
|
|
65984
|
-
var
|
|
66177
|
+
var _a2;
|
|
65985
66178
|
this.refs = {};
|
|
65986
66179
|
this.dynamicAnchors = {};
|
|
65987
66180
|
let schema;
|
|
@@ -65990,7 +66183,7 @@ var require_compile = __commonJS({
|
|
|
65990
66183
|
this.schema = env.schema;
|
|
65991
66184
|
this.schemaId = env.schemaId;
|
|
65992
66185
|
this.root = env.root || this;
|
|
65993
|
-
this.baseId = (
|
|
66186
|
+
this.baseId = (_a2 = env.baseId) !== null && _a2 !== void 0 ? _a2 : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env.schemaId || "$id"]);
|
|
65994
66187
|
this.schemaPath = env.schemaPath;
|
|
65995
66188
|
this.localRefs = env.localRefs;
|
|
65996
66189
|
this.meta = env.meta;
|
|
@@ -66086,14 +66279,14 @@ var require_compile = __commonJS({
|
|
|
66086
66279
|
}
|
|
66087
66280
|
exports2.compileSchema = compileSchema;
|
|
66088
66281
|
function resolveRef(root2, baseId, ref2) {
|
|
66089
|
-
var
|
|
66282
|
+
var _a2;
|
|
66090
66283
|
ref2 = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref2);
|
|
66091
66284
|
const schOrFunc = root2.refs[ref2];
|
|
66092
66285
|
if (schOrFunc)
|
|
66093
66286
|
return schOrFunc;
|
|
66094
66287
|
let _sch = resolve9.call(this, root2, ref2);
|
|
66095
66288
|
if (_sch === void 0) {
|
|
66096
|
-
const schema = (
|
|
66289
|
+
const schema = (_a2 = root2.localRefs) === null || _a2 === void 0 ? void 0 : _a2[ref2];
|
|
66097
66290
|
const { schemaId } = this.opts;
|
|
66098
66291
|
if (schema)
|
|
66099
66292
|
_sch = new SchemaEnv({ schema, schemaId, root: root2, baseId });
|
|
@@ -66162,8 +66355,8 @@ var require_compile = __commonJS({
|
|
|
66162
66355
|
"definitions"
|
|
66163
66356
|
]);
|
|
66164
66357
|
function getJsonPointer(parsedRef, { baseId, schema, root: root2 }) {
|
|
66165
|
-
var
|
|
66166
|
-
if (((
|
|
66358
|
+
var _a2;
|
|
66359
|
+
if (((_a2 = parsedRef.fragment) === null || _a2 === void 0 ? void 0 : _a2[0]) !== "/")
|
|
66167
66360
|
return;
|
|
66168
66361
|
for (const part of parsedRef.fragment.slice(1).split("/")) {
|
|
66169
66362
|
if (typeof schema === "boolean")
|
|
@@ -67024,9 +67217,9 @@ var require_core = __commonJS({
|
|
|
67024
67217
|
};
|
|
67025
67218
|
var MAX_EXPRESSION = 200;
|
|
67026
67219
|
function requiredOptions(o) {
|
|
67027
|
-
var
|
|
67220
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
|
|
67028
67221
|
const s = o.strict;
|
|
67029
|
-
const _optz = (
|
|
67222
|
+
const _optz = (_a2 = o.code) === null || _a2 === void 0 ? void 0 : _a2.optimize;
|
|
67030
67223
|
const optimize = _optz === true || _optz === void 0 ? 1 : _optz || 0;
|
|
67031
67224
|
const regExp = (_c = (_b = o.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp;
|
|
67032
67225
|
const uriResolver = (_d = o.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default;
|
|
@@ -67500,7 +67693,7 @@ var require_core = __commonJS({
|
|
|
67500
67693
|
}
|
|
67501
67694
|
}
|
|
67502
67695
|
function addRule(keyword, definition, dataType) {
|
|
67503
|
-
var
|
|
67696
|
+
var _a2;
|
|
67504
67697
|
const post = definition === null || definition === void 0 ? void 0 : definition.post;
|
|
67505
67698
|
if (dataType && post)
|
|
67506
67699
|
throw new Error('keyword with "post" flag cannot have "type"');
|
|
@@ -67526,7 +67719,7 @@ var require_core = __commonJS({
|
|
|
67526
67719
|
else
|
|
67527
67720
|
ruleGroup.rules.push(rule);
|
|
67528
67721
|
RULES.all[keyword] = rule;
|
|
67529
|
-
(
|
|
67722
|
+
(_a2 = definition.implements) === null || _a2 === void 0 ? void 0 : _a2.forEach((kwd) => this.addKeyword(kwd));
|
|
67530
67723
|
}
|
|
67531
67724
|
function addBeforeRule(ruleGroup, rule, before) {
|
|
67532
67725
|
const i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before);
|
|
@@ -67660,10 +67853,10 @@ var require_ref = __commonJS({
|
|
|
67660
67853
|
gen.assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`);
|
|
67661
67854
|
}
|
|
67662
67855
|
function addEvaluatedFrom(source) {
|
|
67663
|
-
var
|
|
67856
|
+
var _a2;
|
|
67664
67857
|
if (!it.opts.unevaluated)
|
|
67665
67858
|
return;
|
|
67666
|
-
const schEvaluated = (
|
|
67859
|
+
const schEvaluated = (_a2 = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a2 === void 0 ? void 0 : _a2.evaluated;
|
|
67667
67860
|
if (it.props !== true) {
|
|
67668
67861
|
if (schEvaluated && !schEvaluated.dynamicProps) {
|
|
67669
67862
|
if (schEvaluated.props !== void 0) {
|
|
@@ -69314,7 +69507,7 @@ var require_discriminator = __commonJS({
|
|
|
69314
69507
|
return _valid;
|
|
69315
69508
|
}
|
|
69316
69509
|
function getMapping() {
|
|
69317
|
-
var
|
|
69510
|
+
var _a2;
|
|
69318
69511
|
const oneOfMapping = {};
|
|
69319
69512
|
const topRequired = hasRequired(parentSchema);
|
|
69320
69513
|
let tagRequired = true;
|
|
@@ -69328,7 +69521,7 @@ var require_discriminator = __commonJS({
|
|
|
69328
69521
|
if (sch === void 0)
|
|
69329
69522
|
throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref2);
|
|
69330
69523
|
}
|
|
69331
|
-
const propSch = (
|
|
69524
|
+
const propSch = (_a2 = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a2 === void 0 ? void 0 : _a2[tagName];
|
|
69332
69525
|
if (typeof propSch != "object") {
|
|
69333
69526
|
throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`);
|
|
69334
69527
|
}
|
|
@@ -71431,20 +71624,52 @@ When reviewing code:
|
|
|
71431
71624
|
- Evaluate code style and consistency
|
|
71432
71625
|
- Provide specific, actionable suggestions with code examples where appropriate`,
|
|
71433
71626
|
"code-review-template": `You are going to perform code review according to provided user rules. Ensure to review only code provided in diff and latest commit, if provided. However you still need to fully understand how modified code works, and read dependencies if something is not clear.`,
|
|
71434
|
-
"engineer": `You are senior engineer focused on software architecture and design.
|
|
71435
|
-
Before jumping on the task you first
|
|
71436
|
-
If solution is clear, you can jump to implementation right away
|
|
71627
|
+
"engineer": `You are a senior engineer focused on software architecture and design.
|
|
71628
|
+
Before jumping on the task you first analyse the user request in detail, and try to provide an elegant and concise solution.
|
|
71629
|
+
If the solution is clear, you can jump to implementation right away. If not, ask the user a clarification question by calling the attempt_completion tool with the required details.
|
|
71630
|
+
|
|
71631
|
+
# Tone and Style
|
|
71632
|
+
- Be concise and direct. Explain your approach briefly before implementing, then let the code speak for itself.
|
|
71633
|
+
- Do not add unnecessary preamble or postamble. Skip "Here is what I will do" or "Here is a summary of changes" unless the user asks.
|
|
71634
|
+
- Do not add code comments unless the logic is genuinely complex and non-obvious.
|
|
71437
71635
|
|
|
71438
|
-
Before
|
|
71636
|
+
# Before Implementation
|
|
71439
71637
|
- Focus on high-level design patterns and system organization
|
|
71440
71638
|
- Identify architectural patterns and component relationships
|
|
71441
71639
|
- Evaluate system structure and suggest architectural improvements
|
|
71442
|
-
- Focus on backward compatibility
|
|
71640
|
+
- Focus on backward compatibility
|
|
71443
71641
|
- Consider scalability, maintainability, and extensibility in your analysis
|
|
71444
71642
|
|
|
71445
|
-
|
|
71446
|
-
-
|
|
71447
|
-
-
|
|
71643
|
+
# Following Conventions
|
|
71644
|
+
- NEVER assume a library or dependency is available. Before using any library, check the project's dependency file (package.json, Cargo.toml, go.mod, requirements.txt, etc.) to confirm it exists in the project.
|
|
71645
|
+
- Before writing new code, look at neighboring files and existing implementations to understand the project's code style, naming conventions, and patterns. Mimic them.
|
|
71646
|
+
- Check imports and existing utilities before creating new helpers \u2014 the project may already have what you need.
|
|
71647
|
+
|
|
71648
|
+
# Task Planning
|
|
71649
|
+
- If the task tool is available, use it to break complex work into milestones before starting implementation.
|
|
71650
|
+
- Stay flexible \u2014 if your understanding changes mid-task, add, remove, or reorganize tasks as needed. The plan should serve you, not constrain you.
|
|
71651
|
+
|
|
71652
|
+
# During Implementation
|
|
71653
|
+
- Always create a new branch before making changes to the codebase.
|
|
71654
|
+
- Fix problems at the root cause, not with surface-level patches. Prefer general solutions over special cases.
|
|
71655
|
+
- Avoid implementing special cases when a general approach works
|
|
71656
|
+
- Never expose secrets, API keys, or credentials in generated code. Never log sensitive information.
|
|
71657
|
+
- Do not surprise the user with unrequested changes. Do what was asked, including reasonable follow-up actions, but do not refactor surrounding code or add features that were not requested.
|
|
71658
|
+
- After every significant change, verify the project still builds and passes linting. Do not wait until the end to discover breakage.
|
|
71659
|
+
|
|
71660
|
+
# After Implementation
|
|
71661
|
+
- Always run the project's tests before considering the task complete. If tests fail, fix them.
|
|
71662
|
+
- Run lint and typecheck commands if known for the project.
|
|
71663
|
+
- If a build, lint, or test fails, fix the issue before finishing.
|
|
71664
|
+
- When the task is done, respond to the user with a concise summary of what was implemented, what files were changed, and any relevant details. Include links (e.g. pull request URL) so the user has everything they need.
|
|
71665
|
+
|
|
71666
|
+
# GitHub Integration
|
|
71667
|
+
- Use the \`gh\` CLI for all GitHub operations: issues, pull requests, checks, releases.
|
|
71668
|
+
- To create a pull request: commit your changes, push the branch, then use \`gh pr create --title "..." --body "..."\`.
|
|
71669
|
+
- To view issues or PRs: \`gh issue view <number>\`, \`gh pr view <number>\`.
|
|
71670
|
+
- If given a GitHub URL, use \`gh\` to fetch the relevant information rather than guessing.
|
|
71671
|
+
- Always return the pull request URL to the user after creating one.
|
|
71672
|
+
- When checking GitHub Actions, only read logs of failed jobs \u2014 do not waste time on successful ones. Use \`gh run view <run-id> --log-failed\` to fetch only the relevant output.`,
|
|
71448
71673
|
"support": `You are ProbeChat Support, a specialized AI assistant focused on helping developers troubleshoot issues and solve problems. Your primary function is to help users diagnose errors, understand unexpected behaviors, and find solutions using the provided code analysis tools.
|
|
71449
71674
|
|
|
71450
71675
|
When troubleshooting:
|