























@@ -55,6 +55,31 @@ function collectInvalidHookTransformsDirWarnings(
5555];
5656}
575758+function collectUnsupportedInternalHookEntryWarnings(cfg: OpenClawConfig): string[] {
59+const entries = cfg.hooks?.internal?.entries;
60+if (!entries) {
61+return [];
62+}
63+const unsupportedKeysByEntry = Object.entries(entries)
64+.filter(([, entry]) => entry && typeof entry === "object" && !Array.isArray(entry))
65+.map(([hookKey, entry]) => {
66+const unsupportedKeys = ["handler", "module", "extraDirs", "installs"].filter((key) =>
67+Object.hasOwn(entry, key),
68+);
69+return { hookKey, unsupportedKeys };
70+})
71+.filter(({ unsupportedKeys }) => unsupportedKeys.length > 0);
72+73+if (unsupportedKeysByEntry.length === 0) {
74+return [];
75+}
76+77+return unsupportedKeysByEntry.map(
78+({ hookKey, unsupportedKeys }) =>
79+`- hooks.internal.entries.${hookKey}: unsupported loader key${unsupportedKeys.length === 1 ? "" : "s"} ${unsupportedKeys.join(", ")} will not load hook modules. Use bootstrap-extra-files for session bootstrap content, or create a managed/workspace hook directory with HOOK.md + handler.js. Doctor cannot rewrite this automatically because per-hook entry keys are open-ended hook configuration.`,
80+);
81+}
82+5883function collectConfiguredChannelIds(cfg: OpenClawConfig): string[] {
5984const channels =
6085cfg.channels && typeof cfg.channels === "object" && !Array.isArray(cfg.channels)
@@ -190,6 +215,10 @@ export async function loadAndMaybeMigrateDoctorConfig(params: {
190215if (hookTransformsDirWarnings.length > 0) {
191216note(sanitizeDoctorNote(hookTransformsDirWarnings.join("\n")), "Doctor warnings");
192217}
218+const unsupportedInternalHookEntryWarnings = collectUnsupportedInternalHookEntryWarnings(cfg);
219+if (unsupportedInternalHookEntryWarnings.length > 0) {
220+note(sanitizeDoctorNote(unsupportedInternalHookEntryWarnings.join("\n")), "Doctor warnings");
221+}
193222194223const normalized = normalizeCompatibilityConfigValues(candidate);
195224if (normalized.changes.length > 0) {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。