principles-disciple 1.206.0 → 1.207.1
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.
|
@@ -37,5 +37,9 @@ export declare function recordInjectionPresence(workspaceDir: string, principleI
|
|
|
37
37
|
warn?: (message: string) => void;
|
|
38
38
|
info?: (message: string) => void;
|
|
39
39
|
}): number;
|
|
40
|
+
export declare function recordSelfReportFromText(workspaceDir: string, text: unknown, sessionId: string | undefined, logger?: {
|
|
41
|
+
warn?: (message: string) => void;
|
|
42
|
+
info?: (message: string) => void;
|
|
43
|
+
}): number;
|
|
40
44
|
/** Test hook: close cached connections and reset the retention sweep clock. */
|
|
41
45
|
export declare function clearPrincipleApplicationLedgerCache(): void;
|
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
"id": "principles-disciple",
|
|
3
3
|
"name": "Principles Disciple",
|
|
4
4
|
"description": "Turn repeated Agent corrections into Owner-approved, observable, reversible behavior principles. Stop correcting the same AI behavior across sessions.",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.207.1",
|
|
6
6
|
"activation": {
|
|
7
7
|
"onCapabilities": [
|
|
8
8
|
"hook"
|
|
9
9
|
]
|
|
10
10
|
},
|
|
11
11
|
"skills": [
|
|
12
|
-
"templates/langs/en/skills",
|
|
13
12
|
"templates/langs/zh/skills"
|
|
14
13
|
],
|
|
15
14
|
"configSchema": {
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
"id": "principles-disciple",
|
|
3
3
|
"name": "Principles Disciple",
|
|
4
4
|
"description": "Turn repeated Agent corrections into Owner-approved, observable, reversible behavior principles. Stop correcting the same AI behavior across sessions.",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.207.1",
|
|
6
6
|
"activation": {
|
|
7
7
|
"onCapabilities": [
|
|
8
8
|
"hook"
|
|
9
9
|
]
|
|
10
10
|
},
|
|
11
11
|
"skills": [
|
|
12
|
-
"templates/langs/en/skills",
|
|
13
12
|
"templates/langs/zh/skills"
|
|
14
13
|
],
|
|
15
14
|
"configSchema": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "principles-disciple",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.207.1",
|
|
4
4
|
"description": "Turn repeated Agent corrections into Owner-approved, observable, reversible behavior principles. Stop correcting the same AI behavior across sessions.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
package/scripts/sync-plugin.mjs
CHANGED
|
@@ -686,24 +686,33 @@ function syncFilteredManifest(lang) {
|
|
|
686
686
|
process.exit(1);
|
|
687
687
|
}
|
|
688
688
|
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
689
|
+
// PR #1332 companion: the source manifest declares exactly one root
|
|
690
|
+
// (zh, product default). REPLACE language roots with the selected one
|
|
691
|
+
// instead of only filtering, so `--lang en` works against a zh-default
|
|
692
|
+
// source manifest. Mirrors the production transform in
|
|
693
|
+
// create-principles-disciple/src/skill-language.ts.
|
|
694
|
+
const langRoots = {
|
|
695
|
+
zh: 'templates/langs/zh/skills',
|
|
696
|
+
en: 'templates/langs/en/skills',
|
|
697
|
+
};
|
|
698
|
+
const isLangRoot = (sp) =>
|
|
699
|
+
typeof sp === 'string' &&
|
|
700
|
+
(sp.replaceAll('\\', '/') === langRoots.zh || sp.replaceAll('\\', '/') === langRoots.en);
|
|
693
701
|
|
|
694
|
-
if (
|
|
695
|
-
console.error(`❌
|
|
702
|
+
if (!existsSync(join(SOURCE_DIR, langRoots[selectedLang]))) {
|
|
703
|
+
console.error(`❌ Skill templates missing for language "${selectedLang}": ${langRoots[selectedLang]}`);
|
|
696
704
|
process.exit(1);
|
|
697
705
|
}
|
|
698
706
|
|
|
699
|
-
manifest.skills
|
|
707
|
+
const kept = manifest.skills.filter((sp) => !isLangRoot(sp));
|
|
708
|
+
manifest.skills = [...kept, langRoots[selectedLang]];
|
|
700
709
|
|
|
701
710
|
// Use syncItem semantics: remove target, then write freshly
|
|
702
711
|
if (existsSync(targetPath)) {
|
|
703
712
|
rmSync(targetPath, { force: true });
|
|
704
713
|
}
|
|
705
714
|
writeFileSync(targetPath, JSON.stringify(manifest, null, 2) + '\n', 'utf-8');
|
|
706
|
-
console.log(` ✅ skills filtered to lang: ${selectedLang} (${
|
|
715
|
+
console.log(` ✅ skills filtered to lang: ${selectedLang} (${manifest.skills.length} path(s))`);
|
|
707
716
|
}
|
|
708
717
|
|
|
709
718
|
/**
|
package/scripts/verify-build.mjs
CHANGED
|
@@ -94,14 +94,25 @@ for (const [path, config] of Object.entries(expectedCounts)) {
|
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
// 3.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
97
|
+
// 3. Verify skill template roots for BOTH languages ship in dist — the
|
|
98
|
+
// installer rewrites the installed manifest per --lang (PR #1332 companion),
|
|
99
|
+
// so a missing root breaks install-time language selection. A "publishable"
|
|
100
|
+
// skill is an immediate child directory containing SKILL.md (what OpenClaw
|
|
101
|
+
// links into ~/.openclaw/plugin-skills).
|
|
102
|
+
for (const lang of ['zh', 'en']) {
|
|
103
|
+
const skillsDir = join(rootDir, 'dist/templates/langs', lang, 'skills');
|
|
104
|
+
if (!existsSync(skillsDir)) {
|
|
105
|
+
console.error(`❌ Missing skill templates: dist/templates/langs/${lang}/skills`);
|
|
106
|
+
hasError = true;
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
const publishable = readdirSync(skillsDir, { withFileTypes: true })
|
|
110
|
+
.filter((e) => e.isDirectory() && existsSync(join(skillsDir, e.name, 'SKILL.md')));
|
|
111
|
+
if (publishable.length < 20) {
|
|
112
|
+
console.error(`❌ dist/templates/langs/${lang}/skills has only ${publishable.length} publishable skills (expected at least 20)`);
|
|
113
|
+
hasError = true;
|
|
114
|
+
} else {
|
|
115
|
+
console.log(`✅ ${lang} skills: ${publishable.length} (dist/templates/langs/${lang}/skills/)`);
|
|
105
116
|
}
|
|
106
117
|
}
|
|
107
118
|
|