docs: document config schema runtime helpers

This commit is contained in:
Peter Steinberger
2026-06-04 03:58:46 -04:00
parent 1f1ce8a1fe
commit 0796e992e4
24 changed files with 24 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
// Resolves per-agent runtime limits from config.
import type { OpenClawConfig } from "./types.js";
/** Default maximum concurrent top-level agent runs. */

View File

@@ -1,3 +1,4 @@
// Covers channel capability config normalization and lookup behavior.
import { afterEach, beforeEach, describe, expect, it } from "vitest";
import type { ChannelPlugin } from "../channels/plugins/types.js";
import { setActivePluginRegistry } from "../plugins/runtime.js";

View File

@@ -1,3 +1,4 @@
// Covers miscellaneous config schema defaults and validation cases.
import { describe, expect, it } from "vitest";
import {
getConfigValueAtPath,

View File

@@ -1,3 +1,4 @@
// Regresses legacy provider config shapes accepted by config loading.
import { describe, expect, it } from "vitest";
import { normalizeLegacyTalkConfig } from "../commands/doctor/shared/legacy-talk-config-normalizer.js";
import type { OpenClawConfig } from "./types.js";

View File

@@ -1,3 +1,4 @@
// Covers gateway dispatch config loading and fallback behavior.
import fs from "node:fs";
import os from "node:os";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Normalizes group-policy config for channel and runtime decisions.
import {
normalizeLowercaseStringOrEmpty,
normalizeOptionalString,

View File

@@ -1,3 +1,4 @@
// Scans included config files and resolves include graphs.
import * as fs from "node:fs/promises";
import path from "node:path";
import { parseJsonWithJson5Fallback } from "../utils/parse-json-compat.js";

View File

@@ -1,3 +1,4 @@
// Covers shell environment fallback handling in config IO.
import fs from "node:fs/promises";
import os from "node:os";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Loads, validates, migrates, snapshots, and writes OpenClaw config files.
import crypto from "node:crypto";
import fs from "node:fs";
import os from "node:os";

View File

@@ -1,3 +1,4 @@
// Covers config write preparation diffs and metadata preservation.
import { describe, expect, it } from "vitest";
import {
collectChangedPaths,

View File

@@ -1,3 +1,4 @@
// Verifies model-support based plugin auto-enable decisions.
import { describe, expect, it } from "vitest";
import type { PluginManifestRegistry } from "../plugins/manifest-registry.js";
import { applyPluginAutoEnable } from "./plugin-auto-enable.js";

View File

@@ -1,3 +1,4 @@
// Verifies default port config values and overrides.
import { describe, expect, it } from "vitest";
import {
DEFAULT_BROWSER_CDP_PORT_RANGE_END,

View File

@@ -1,3 +1,4 @@
// Covers runtime group-policy resolution from config and context.
import { beforeEach, describe, expect, it } from "vitest";
import {
GROUP_POLICY_BLOCKED_LABEL,

View File

@@ -1,3 +1,4 @@
// Resolves runtime group-policy settings for channels and sessions.
import { normalizeOptionalString } from "@openclaw/normalization-core/string-coerce";
import type { GroupPolicy } from "./types.base.js";

View File

@@ -1,3 +1,4 @@
// Applies runtime-only config overrides without mutating persisted config.
import { isPlainObject } from "../utils.js";
import { parseConfigPath, setConfigValueAtPath, unsetConfigValueAtPath } from "./config-paths.js";
import { isBlockedObjectKey } from "./prototype-keys.js";

View File

@@ -1,3 +1,4 @@
// Defines user-facing config field help text for docs and UI surfaces.
import { MEDIA_AUDIO_FIELD_HELP } from "./media-audio-field-metadata.js";
import { describeTalkSilenceTimeoutDefaults } from "./talk-defaults.js";

View File

@@ -1,3 +1,4 @@
// Provides shared JSON schema helpers for generated config metadata.
type JsonSchemaObject = {
type?: string | string[];
properties?: Record<string, JsonSchemaObject>;

View File

@@ -1,3 +1,4 @@
// Classifies sensitive config paths for redaction and validation.
import { normalizeLowercaseStringOrEmpty } from "@openclaw/normalization-core/string-coerce";
/**

View File

@@ -1,3 +1,4 @@
// Verifies generated talk default config stays aligned with schema.
import { execFileSync } from "node:child_process";
import fs from "node:fs";
import path from "node:path";

View File

@@ -1,3 +1,4 @@
// Defines agent routing, model, and runtime configuration types.
import type { ChatType } from "../channels/chat-type.js";
import type {
AgentContextLimitsConfig,

View File

@@ -1,3 +1,4 @@
// Defines WhatsApp channel configuration types.
import type { ReactionLevel } from "../utils/reaction-level.js";
import type {
BlockStreamingCoalesceConfig,

View File

@@ -1,3 +1,4 @@
// Covers agent default schema parsing and compatibility behavior.
import { describe, expect, it } from "vitest";
import { validateConfigObject } from "./validation.js";
import { AgentDefaultsSchema } from "./zod-schema.agent-defaults.js";

View File

@@ -1,3 +1,4 @@
// Verifies markdown table config schema parsing and defaults.
import { describe, expect, it } from "vitest";
import { MarkdownTableModeSchema } from "./zod-schema.core.js";

View File

@@ -1,3 +1,4 @@
// Defines session-related Zod schema fragments for config parsing.
import { normalizeStringifiedOptionalString } from "@openclaw/normalization-core/string-coerce";
import { z } from "zod";
import { parseByteSize } from "../cli/parse-bytes.js";