refactor: update memory skill loader, plugin config, and add privacy docs (#4905)

This commit is contained in:
Kartik
2026-04-22 17:15:19 +05:30
committed by GitHub
parent 32b74e18b7
commit f5dc825d47
21 changed files with 1734 additions and 189 deletions
+5 -10
View File
@@ -192,21 +192,16 @@ function renderCategoriesBlock(
}
function renderTriageKnobs(config: SkillsConfig): string {
const triage = config.triage;
if (!triage) return "";
const lines: string[] = [];
if (triage.importanceThreshold !== undefined) {
if (config.triage?.importanceThreshold !== undefined) {
lines.push(
`- Only store facts with importance >= ${triage.importanceThreshold}`,
`- Only store facts with importance >= ${config.triage.importanceThreshold}`,
);
}
const patterns = resolveCredentialPatterns(config);
if (config.triage?.credentialPatterns) {
lines.push(`- Credential patterns to scan: ${patterns.join(", ")}`);
}
lines.push(`- Credential patterns to scan: ${patterns.map((p) => `\`${p}\``).join(", ")}`);
if (lines.length === 0) return "";
return "\n## Active Configuration Overrides\n\n" + lines.join("\n");
@@ -265,8 +260,8 @@ export function loadSkill(
parts.push(renderCategoriesBlock(mergedCats));
}
// Inject triage knobs (maxFactsPerTurn, importanceThreshold, credentialPatterns)
if (skillName === "memory-triage") {
// Inject triage knobs (importanceThreshold, credentialPatterns)
if (skillName === "memory-triage" || skillName === "memory-dream") {
const knobs = renderTriageKnobs(config);
if (knobs) parts.push(knobs);
}