@codedrifters/configulator 0.0.254 → 0.0.255
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/lib/index.d.mts +72 -1
- package/lib/index.d.ts +73 -2
- package/lib/index.js +55 -0
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +54 -0
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -14488,6 +14488,45 @@ var vitestBundle = {
|
|
|
14488
14488
|
}
|
|
14489
14489
|
};
|
|
14490
14490
|
|
|
14491
|
+
// src/agent/bundles/priority-rules.ts
|
|
14492
|
+
function renderPriorityRulesSection(rules) {
|
|
14493
|
+
if (rules.length === 0) {
|
|
14494
|
+
return "";
|
|
14495
|
+
}
|
|
14496
|
+
const lines = [
|
|
14497
|
+
"## Project-specific priority rules",
|
|
14498
|
+
"",
|
|
14499
|
+
"These rules are supplied by this project through",
|
|
14500
|
+
"`AgentConfigOptions.priorityRules` and override the generic inference",
|
|
14501
|
+
"heuristics above. Rules evaluate in the order listed; **first match",
|
|
14502
|
+
"wins**. The bundle's default heuristics apply only when no rule below",
|
|
14503
|
+
"matches.",
|
|
14504
|
+
""
|
|
14505
|
+
];
|
|
14506
|
+
rules.forEach((rule, index) => {
|
|
14507
|
+
const matchDetails = [];
|
|
14508
|
+
if (rule.match.labels && rule.match.labels.length > 0) {
|
|
14509
|
+
const labelList = rule.match.labels.map((l) => `\`${l}\``).join(", ");
|
|
14510
|
+
matchDetails.push(`labels: ${labelList}`);
|
|
14511
|
+
}
|
|
14512
|
+
if (rule.match.titleRegex) {
|
|
14513
|
+
matchDetails.push(`title regex: \`${rule.match.titleRegex}\``);
|
|
14514
|
+
}
|
|
14515
|
+
if (rule.match.bodyRegex) {
|
|
14516
|
+
matchDetails.push(`body regex: \`${rule.match.bodyRegex}\``);
|
|
14517
|
+
}
|
|
14518
|
+
if (rule.match.issueNumbers && rule.match.issueNumbers.length > 0) {
|
|
14519
|
+
const numberList = rule.match.issueNumbers.map((n) => `#${n}`).join(", ");
|
|
14520
|
+
matchDetails.push(`issue numbers: ${numberList}`);
|
|
14521
|
+
}
|
|
14522
|
+
const matchSummary = matchDetails.length > 0 ? matchDetails.join("; ") : "(no match fields)";
|
|
14523
|
+
lines.push(
|
|
14524
|
+
`${index + 1}. **\`priority:${rule.priority}\`** when ${matchSummary} \u2014 ${rule.rationale}`
|
|
14525
|
+
);
|
|
14526
|
+
});
|
|
14527
|
+
return lines.join("\n");
|
|
14528
|
+
}
|
|
14529
|
+
|
|
14491
14530
|
// src/agent/bundles/index.ts
|
|
14492
14531
|
var BUILT_IN_BUNDLES = [
|
|
14493
14532
|
baseBundle,
|
|
@@ -15408,6 +15447,20 @@ ${extra}`
|
|
|
15408
15447
|
}
|
|
15409
15448
|
}
|
|
15410
15449
|
}
|
|
15450
|
+
if (this.options.priorityRules && this.options.priorityRules.length > 0) {
|
|
15451
|
+
const issueLabelRule = ruleMap.get("issue-label-conventions");
|
|
15452
|
+
if (issueLabelRule) {
|
|
15453
|
+
const section = renderPriorityRulesSection(this.options.priorityRules);
|
|
15454
|
+
ruleMap.set("issue-label-conventions", {
|
|
15455
|
+
...issueLabelRule,
|
|
15456
|
+
content: `${issueLabelRule.content}
|
|
15457
|
+
|
|
15458
|
+
---
|
|
15459
|
+
|
|
15460
|
+
${section}`
|
|
15461
|
+
});
|
|
15462
|
+
}
|
|
15463
|
+
}
|
|
15411
15464
|
return [...ruleMap.values()].sort((a, b) => {
|
|
15412
15465
|
if (a.name === "project-overview") return -1;
|
|
15413
15466
|
if (b.name === "project-overview") return 1;
|
|
@@ -18231,6 +18284,7 @@ export {
|
|
|
18231
18284
|
pnpmBundle,
|
|
18232
18285
|
prReviewBundle,
|
|
18233
18286
|
projenBundle,
|
|
18287
|
+
renderPriorityRulesSection,
|
|
18234
18288
|
requirementsAnalystBundle,
|
|
18235
18289
|
requirementsReviewerBundle,
|
|
18236
18290
|
requirementsWriterBundle,
|