refactor(config): remove prototype key facade · openclaw/openclaw@a3ae453
vincentkoc
·
2026-06-18
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -23,7 +23,7 @@ import {
|
23 | 23 | normalizeAgentModelRefForConfig, |
24 | 24 | } from "../config/model-input.js"; |
25 | 25 | import { CONFIG_PATH } from "../config/paths.js"; |
26 | | -import { isBlockedObjectKey } from "../config/prototype-keys.js"; |
| 26 | +import { isBlockedObjectKey } from "../infra/prototype-keys.js"; |
27 | 27 | import { isPluginPackagingRuntimeOutputInvalidConfigSnapshot } from "../config/recovery-policy.js"; |
28 | 28 | import { redactConfigObject } from "../config/redact-snapshot.js"; |
29 | 29 | import { readBestEffortRuntimeConfigSchema } from "../config/runtime-schema.js"; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -4,7 +4,7 @@ import { sanitizeTerminalText } from "../../packages/terminal-core/src/safe-text
|
4 | 4 | import { listChatChannels } from "../channels/chat-meta.js"; |
5 | 5 | import { formatCliCommand } from "../cli/command-format.js"; |
6 | 6 | import { CONFIG_PATH } from "../config/config.js"; |
7 | | -import { isBlockedObjectKey } from "../config/prototype-keys.js"; |
| 7 | +import { isBlockedObjectKey } from "../infra/prototype-keys.js"; |
8 | 8 | import type { OpenClawConfig } from "../config/types.openclaw.js"; |
9 | 9 | import type { RuntimeEnv } from "../runtime.js"; |
10 | 10 | import { shortenHomePath } from "../utils.js"; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -13,7 +13,7 @@ import {
|
13 | 13 | type LegacyConfigMigrationSpec, |
14 | 14 | type LegacyConfigRule, |
15 | 15 | } from "../../../config/legacy.shared.js"; |
16 | | -import { isBlockedObjectKey } from "../../../config/prototype-keys.js"; |
| 16 | +import { isBlockedObjectKey } from "../../../infra/prototype-keys.js"; |
17 | 17 | import { listLegacyRuntimeModelProviderAliases } from "./legacy-runtime-model-providers.js"; |
18 | 18 | |
19 | 19 | const AGENT_HEARTBEAT_KEYS = new Set([ |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -6,7 +6,7 @@ import {
|
6 | 6 | type LegacyConfigMigrationSpec, |
7 | 7 | type LegacyConfigRule, |
8 | 8 | } from "../../../config/legacy.shared.js"; |
9 | | -import { isBlockedObjectKey } from "../../../config/prototype-keys.js"; |
| 9 | +import { isBlockedObjectKey } from "../../../infra/prototype-keys.js"; |
10 | 10 | |
11 | 11 | const LEGACY_TTS_PROVIDER_KEYS = ["openai", "elevenlabs", "microsoft", "edge"] as const; |
12 | 12 | const LEGACY_TTS_PLUGIN_IDS = new Set(["voice-call"]); |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | // Resolves and classifies config paths for reads, writes, and metadata. |
2 | 2 | import { isPlainObject } from "../utils.js"; |
3 | | -import { isBlockedObjectKey } from "./prototype-keys.js"; |
| 3 | +import { isBlockedObjectKey } from "../infra/prototype-keys.js"; |
4 | 4 | |
5 | 5 | type PathNode = Record<string, unknown>; |
6 | 6 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -18,7 +18,7 @@ import { resolvePathViaExistingAncestorSync } from "../infra/boundary-path.js";
|
18 | 18 | import { isPathInside } from "../security/scan-paths.js"; |
19 | 19 | import { isPlainObject } from "../utils.js"; |
20 | 20 | import { parseJsonWithJson5Fallback } from "../utils/parse-json-compat.js"; |
21 | | -import { isBlockedObjectKey } from "./prototype-keys.js"; |
| 21 | +import { isBlockedObjectKey } from "../infra/prototype-keys.js"; |
22 | 22 | |
23 | 23 | export const INCLUDE_KEY = "$include"; |
24 | 24 | export const MAX_INCLUDE_DEPTH = 10; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -5,7 +5,7 @@ import { parseConfigPathArrayIndex } from "../shared/path-array-index.js";
|
5 | 5 | import { isRecord } from "../utils.js"; |
6 | 6 | import { applyMergePatch } from "./merge-patch.js"; |
7 | 7 | import { normalizeAgentModelMapForConfig, normalizeAgentModelRefForConfig } from "./model-input.js"; |
8 | | -import { isBlockedObjectKey } from "./prototype-keys.js"; |
| 8 | +import { isBlockedObjectKey } from "../infra/prototype-keys.js"; |
9 | 9 | import type { OpenClawConfig } from "./types.js"; |
10 | 10 | |
11 | 11 | const OPEN_DM_POLICY_ALLOW_FROM_RE = |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -20,7 +20,7 @@ export type LegacyConfigMigrationSpec = LegacyConfigMigration & {
|
20 | 20 | |
21 | 21 | import { isSafeExecutableValue } from "../infra/exec-safety.js"; |
22 | 22 | import { isRecord } from "../utils.js"; |
23 | | -import { isBlockedObjectKey } from "./prototype-keys.js"; |
| 23 | +import { isBlockedObjectKey } from "../infra/prototype-keys.js"; |
24 | 24 | |
25 | 25 | export const getRecord = (value: unknown): Record<string, unknown> | null => |
26 | 26 | isRecord(value) ? value : null; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | // Applies JSON merge-patch updates to config-like objects. |
2 | 2 | import { isPlainObject } from "../infra/plain-object.js"; |
3 | | -import { isBlockedObjectKey } from "./prototype-keys.js"; |
| 3 | +import { isBlockedObjectKey } from "../infra/prototype-keys.js"; |
4 | 4 | |
5 | 5 | type PlainObject = Record<string, unknown>; |
6 | 6 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -28,7 +28,7 @@ import type {
|
28 | 28 | PluginAutoEnableResult, |
29 | 29 | } from "./plugin-auto-enable.types.js"; |
30 | 30 | import { ensurePluginAllowlisted } from "./plugins-allowlist.js"; |
31 | | -import { isBlockedObjectKey } from "./prototype-keys.js"; |
| 31 | +import { isBlockedObjectKey } from "../infra/prototype-keys.js"; |
32 | 32 | import type { OpenClawConfig } from "./types.openclaw.js"; |
33 | 33 | export type { |
34 | 34 | PluginAutoEnableCandidate, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。