Phase 12: maxSkills soft warn — SPEC §15.

Optional maxSkills setting sets the warn threshold; when unset, re-injecting more than three tracked skills emits a one-time UI warning without blocking delivery.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-17 13:12:21 +07:00
parent d92c5f827d
commit 66d9a39a18
3 changed files with 69 additions and 0 deletions
+5
View File
@@ -24,6 +24,8 @@ export interface SkillReinjectSettings {
reinjectOnManualCompaction: boolean;
autoCompactIntegration: AutoCompactIntegration;
suffix: string;
/** Soft warn threshold; omit for unlimited with default warn above 3 (SPEC §15). */
maxSkills?: number;
}
/** Defaults from SPEC §7.3 — extension off until explicitly enabled. */
@@ -72,6 +74,9 @@ export function parseSkillReinjectPartial(raw: unknown): PartialSkillReinjectSet
if (typeof obj.suffix === "string") {
result.suffix = obj.suffix;
}
if (typeof obj.maxSkills === "number" && Number.isInteger(obj.maxSkills) && obj.maxSkills > 0) {
result.maxSkills = obj.maxSkills;
}
return result;
}