create-principles-disciple 1.109.0 → 1.111.0
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/console/dist/server/config/pd-config-store.d.ts +29 -0
- package/console/dist/server/config/pd-config-store.js +55 -0
- package/console/dist/server/feedback/channels.d.ts +36 -0
- package/console/dist/server/feedback/channels.js +89 -0
- package/console/dist/server/feedback/github-adapter.d.ts +44 -0
- package/console/dist/server/feedback/github-adapter.js +125 -0
- package/console/dist/server/feedback/ingest-adapter.d.ts +45 -0
- package/console/dist/server/feedback/ingest-adapter.js +129 -0
- package/console/dist/server/feedback/submit-service.d.ts +44 -0
- package/console/dist/server/feedback/submit-service.js +177 -0
- package/console/dist/server/index.js +23 -7
- package/console/dist/server/models/FeedbackReportConsoleModel.d.ts +8 -0
- package/console/dist/server/models/FeedbackReportConsoleModel.js +45 -0
- package/console/dist/server/routes/feedback-reports.d.ts +24 -0
- package/console/dist/server/routes/feedback-reports.js +151 -0
- package/console/dist/ui/api.d.ts +11 -3
- package/console/dist/ui/api.js +25 -2
- package/console/dist/ui/i18n/en.json +48 -2
- package/console/dist/ui/i18n/zh-CN.json +48 -2
- package/console/dist/ui/pages/ReportProblemValidators.d.ts +30 -0
- package/console/dist/ui/pages/ReportProblemValidators.js +66 -0
- package/console/dist/ui/pages/activation/ActivationPage.js +14 -3
- package/console/dist/ui/pages/pain/PainPage.js +6 -1
- package/console/dist/ui/pages/principles/PrincipleDetailPage.js +4 -1
- package/console/dist/ui/pages/report-problem/ReportProblemPage.js +263 -70
- package/console/dist/ui/utils/validators.d.ts +22 -0
- package/console/dist/ui/utils/validators.js +66 -0
- package/console/dist/web/assets/app.css +42 -0
- package/console/dist/web/assets/app.js +699 -127
- package/console/package.json +4 -4
- package/core/dist/runtime-v2/__tests__/architecture-regression.test.js +4 -0
- package/core/dist/runtime-v2/__tests__/architecture-regression.test.js.map +1 -1
- package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js +1 -1
- package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js.map +1 -1
- package/core/dist/runtime-v2/feedback/__tests__/fingerprint.test.d.ts +2 -0
- package/core/dist/runtime-v2/feedback/__tests__/fingerprint.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/feedback/__tests__/fingerprint.test.js +126 -0
- package/core/dist/runtime-v2/feedback/__tests__/fingerprint.test.js.map +1 -0
- package/core/dist/runtime-v2/feedback/__tests__/slice1-typed-fields.test.d.ts +2 -0
- package/core/dist/runtime-v2/feedback/__tests__/slice1-typed-fields.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/feedback/__tests__/slice1-typed-fields.test.js +278 -0
- package/core/dist/runtime-v2/feedback/__tests__/slice1-typed-fields.test.js.map +1 -0
- package/core/dist/runtime-v2/feedback/create-report.d.ts.map +1 -1
- package/core/dist/runtime-v2/feedback/create-report.js +38 -1
- package/core/dist/runtime-v2/feedback/create-report.js.map +1 -1
- package/core/dist/runtime-v2/feedback/feedback-types.d.ts +60 -0
- package/core/dist/runtime-v2/feedback/feedback-types.d.ts.map +1 -1
- package/core/dist/runtime-v2/feedback/feedback-types.js +58 -0
- package/core/dist/runtime-v2/feedback/feedback-types.js.map +1 -1
- package/core/dist/runtime-v2/feedback/fingerprint.d.ts +31 -0
- package/core/dist/runtime-v2/feedback/fingerprint.d.ts.map +1 -0
- package/core/dist/runtime-v2/feedback/fingerprint.js +51 -0
- package/core/dist/runtime-v2/feedback/fingerprint.js.map +1 -0
- package/core/dist/runtime-v2/feedback/index.d.ts +3 -2
- package/core/dist/runtime-v2/feedback/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/feedback/index.js +2 -1
- package/core/dist/runtime-v2/feedback/index.js.map +1 -1
- package/core/dist/runtime-v2/feedback/privacy-preview.d.ts.map +1 -1
- package/core/dist/runtime-v2/feedback/privacy-preview.js +43 -0
- package/core/dist/runtime-v2/feedback/privacy-preview.js.map +1 -1
- package/core/dist/runtime-v2/feedback/render-markdown.d.ts.map +1 -1
- package/core/dist/runtime-v2/feedback/render-markdown.js +33 -0
- package/core/dist/runtime-v2/feedback/render-markdown.js.map +1 -1
- package/core/dist/runtime-v2/index.d.ts +2 -2
- package/core/dist/runtime-v2/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/index.js +1 -1
- package/core/dist/runtime-v2/index.js.map +1 -1
- package/dist/installer.d.ts.map +1 -1
- package/dist/installer.js.map +1 -1
- package/dist/mvp-config.d.ts +22 -1
- package/dist/mvp-config.d.ts.map +1 -1
- package/dist/mvp-config.js +36 -1
- package/dist/mvp-config.js.map +1 -1
- package/package.json +1 -1
- package/plugin/dist/bundle.js +302 -302
- package/plugin/dist/openclaw.plugin.json +1 -18
- package/plugin/openclaw.plugin.json +2 -19
- package/plugin/package.json +3 -3
- package/plugin/scripts/sync-plugin.mjs +34 -33
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "principles-disciple",
|
|
3
3
|
"name": "Principles Disciple",
|
|
4
|
-
"description": "Turn repeated Agent corrections into Owner-approved, observable, reversible behavior principles.
|
|
4
|
+
"description": "Stop correcting the same AI behavior across sessions. Turn repeated Agent corrections into Owner-approved, observable, reversible behavior principles.",
|
|
5
5
|
"version": "1.198.1",
|
|
6
6
|
"activation": {
|
|
7
7
|
"onCapabilities": [
|
|
@@ -43,22 +43,5 @@
|
|
|
43
43
|
"description": "自定义高危目录(例如 .git/, prod_db/)。AI 试图修改这些目录前,将被强制拦截并要求出具安全计划。"
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
},
|
|
47
|
-
"uiHints": {
|
|
48
|
-
"language": {
|
|
49
|
-
"label": "交互语言"
|
|
50
|
-
},
|
|
51
|
-
"auditLevel": {
|
|
52
|
-
"label": "防爆拦截级别",
|
|
53
|
-
"placeholder": "medium"
|
|
54
|
-
},
|
|
55
|
-
"riskPaths": {
|
|
56
|
-
"label": "⚠️ 绝对高危目录 (空表示不设限)"
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
"buildFingerprint": {
|
|
60
|
-
"gitSha": "f9dc8b9f7aec",
|
|
61
|
-
"bundleMd5": "5e78aea084b9afac6f064b13f4137ebb",
|
|
62
|
-
"builtAt": "2026-07-04T22:43:12.642Z"
|
|
63
46
|
}
|
|
64
47
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "principles-disciple",
|
|
3
3
|
"name": "Principles Disciple",
|
|
4
|
-
"description": "Turn repeated Agent corrections into Owner-approved, observable, reversible behavior principles.
|
|
5
|
-
"version": "1.
|
|
4
|
+
"description": "Stop correcting the same AI behavior across sessions. Turn repeated Agent corrections into Owner-approved, observable, reversible behavior principles.",
|
|
5
|
+
"version": "1.209.0",
|
|
6
6
|
"activation": {
|
|
7
7
|
"onCapabilities": [
|
|
8
8
|
"hook"
|
|
@@ -43,22 +43,5 @@
|
|
|
43
43
|
"description": "自定义高危目录(例如 .git/, prod_db/)。AI 试图修改这些目录前,将被强制拦截并要求出具安全计划。"
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
},
|
|
47
|
-
"uiHints": {
|
|
48
|
-
"language": {
|
|
49
|
-
"label": "交互语言"
|
|
50
|
-
},
|
|
51
|
-
"auditLevel": {
|
|
52
|
-
"label": "防爆拦截级别",
|
|
53
|
-
"placeholder": "medium"
|
|
54
|
-
},
|
|
55
|
-
"riskPaths": {
|
|
56
|
-
"label": "⚠️ 绝对高危目录 (空表示不设限)"
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
"buildFingerprint": {
|
|
60
|
-
"gitSha": "f9dc8b9f7aec",
|
|
61
|
-
"bundleMd5": "5e78aea084b9afac6f064b13f4137ebb",
|
|
62
|
-
"builtAt": "2026-07-04T22:43:12.642Z"
|
|
63
46
|
}
|
|
64
47
|
}
|
package/plugin/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "principles-disciple",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Turn repeated Agent corrections into Owner-approved, observable, reversible behavior principles.
|
|
3
|
+
"version": "1.209.0",
|
|
4
|
+
"description": "Stop correcting the same AI behavior across sessions. Turn repeated Agent corrections into Owner-approved, observable, reversible behavior principles.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"@typescript-eslint/parser": "^8.58.0",
|
|
81
81
|
"@vitest/coverage-v8": "^4.1.9",
|
|
82
82
|
"esbuild": "^0.28.1",
|
|
83
|
-
"eslint": "^10.
|
|
83
|
+
"eslint": "^10.8.1",
|
|
84
84
|
"jsdom": "^30.0.1",
|
|
85
85
|
"typescript": "^7.0.2",
|
|
86
86
|
"vite": "^8.0.16",
|
|
@@ -464,11 +464,15 @@ function verifyBundleContents() {
|
|
|
464
464
|
|
|
465
465
|
/**
|
|
466
466
|
* Write a build fingerprint.
|
|
467
|
+
*
|
|
468
|
+
* The fingerprint is PD-internal metadata and lives in
|
|
469
|
+
* dist/build-fingerprint.json — NOT inside openclaw.plugin.json. Unknown
|
|
470
|
+
* top-level manifest fields are rejected by ClawHub / OpenClaw manifest
|
|
471
|
+
* validation (manifest-unknown-fields warning).
|
|
467
472
|
*/
|
|
468
473
|
function writeBuildFingerprint() {
|
|
469
474
|
const bundleJs = join(SOURCE_DIR, 'dist', 'bundle.js');
|
|
470
|
-
const
|
|
471
|
-
const manifestDist = join(SOURCE_DIR, 'dist', 'openclaw.plugin.json');
|
|
475
|
+
const fingerprintPath = join(SOURCE_DIR, 'dist', 'build-fingerprint.json');
|
|
472
476
|
|
|
473
477
|
let gitSha = 'unknown';
|
|
474
478
|
try {
|
|
@@ -489,19 +493,8 @@ function writeBuildFingerprint() {
|
|
|
489
493
|
console.warn('⚠️ Could not compute bundle MD5');
|
|
490
494
|
}
|
|
491
495
|
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
manifest = JSON.parse(readFileSync(manifestDist, 'utf-8'));
|
|
495
|
-
} catch {
|
|
496
|
-
try {
|
|
497
|
-
manifest = JSON.parse(readFileSync(manifestSrc, 'utf-8'));
|
|
498
|
-
} catch {
|
|
499
|
-
console.warn('⚠️ Could not read openclaw.plugin.json');
|
|
500
|
-
return;
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
manifest.buildFingerprint = {
|
|
496
|
+
const fingerprint = {
|
|
497
|
+
pluginId: 'principles-disciple',
|
|
505
498
|
gitSha,
|
|
506
499
|
bundleMd5,
|
|
507
500
|
builtAt: new Date().toISOString(),
|
|
@@ -509,7 +502,7 @@ function writeBuildFingerprint() {
|
|
|
509
502
|
|
|
510
503
|
try {
|
|
511
504
|
mkdirSync(join(SOURCE_DIR, 'dist'), { recursive: true });
|
|
512
|
-
writeFileAtomic(
|
|
505
|
+
writeFileAtomic(fingerprintPath, JSON.stringify(fingerprint, null, 2) + '\n');
|
|
513
506
|
console.log(`✅ Build fingerprint: git=${gitSha} bundleMd5=${bundleMd5}`);
|
|
514
507
|
} catch (err) {
|
|
515
508
|
console.warn(`⚠️ Could not write fingerprint: ${err.message}`);
|
|
@@ -530,33 +523,41 @@ function writeFileAtomic(filePath, content) {
|
|
|
530
523
|
|
|
531
524
|
/**
|
|
532
525
|
* Verify installed fingerprint.
|
|
526
|
+
*
|
|
527
|
+
* Compares the PD-internal sidecars dist/build-fingerprint.json in source
|
|
528
|
+
* and install dirs. The sidecar travels with the dist/ sync item, so after
|
|
529
|
+
* a full sync both sides exist and must match; a mismatch means the
|
|
530
|
+
* installed copy is stale.
|
|
533
531
|
*/
|
|
534
532
|
function verifyInstalledFingerprint() {
|
|
535
|
-
const
|
|
536
|
-
const
|
|
533
|
+
const sourceFpPath = join(SOURCE_DIR, 'dist', 'build-fingerprint.json');
|
|
534
|
+
const installedFpPath = join(INSTALL_DIR, 'dist', 'build-fingerprint.json');
|
|
537
535
|
|
|
538
|
-
if (!existsSync(
|
|
539
|
-
console.error('\n❌ Installed
|
|
536
|
+
if (!existsSync(installedFpPath)) {
|
|
537
|
+
console.error('\n❌ Installed fingerprint not found — dist sync incomplete.');
|
|
540
538
|
process.exit(1);
|
|
541
539
|
}
|
|
542
540
|
|
|
541
|
+
if (!existsSync(sourceFpPath)) {
|
|
542
|
+
console.warn('⚠️ Source build fingerprint missing — staleness check skipped.');
|
|
543
|
+
console.warn(' Run a full build (drop --skip-build) to regenerate dist/build-fingerprint.json.');
|
|
544
|
+
return;
|
|
545
|
+
}
|
|
546
|
+
|
|
543
547
|
try {
|
|
544
|
-
const
|
|
545
|
-
const
|
|
546
|
-
const sourceFp = sm.buildFingerprint;
|
|
547
|
-
const installedFp = im.buildFingerprint;
|
|
548
|
+
const sourceFp = JSON.parse(readFileSync(sourceFpPath, 'utf-8'));
|
|
549
|
+
const installedFp = JSON.parse(readFileSync(installedFpPath, 'utf-8'));
|
|
548
550
|
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
const md5Mismatch = sourceFp.bundleMd5 !== installedFp.bundleMd5;
|
|
551
|
+
const gitMismatch = sourceFp.gitSha !== installedFp.gitSha;
|
|
552
|
+
const md5Mismatch = sourceFp.bundleMd5 !== installedFp.bundleMd5;
|
|
552
553
|
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
}
|
|
554
|
+
if (gitMismatch || md5Mismatch) {
|
|
555
|
+
console.error('\n❌ INSTALLED PLUGIN IS STALE — FINGERPRINT MISMATCH');
|
|
556
|
+
process.exit(1);
|
|
557
557
|
}
|
|
558
|
-
} catch {
|
|
559
|
-
console.warn(
|
|
558
|
+
} catch (err) {
|
|
559
|
+
console.warn(`⚠️ Fingerprint verification skipped: ${err.message}`);
|
|
560
|
+
return;
|
|
560
561
|
}
|
|
561
562
|
|
|
562
563
|
console.log('✅ Installed fingerprint verified');
|