mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
docs: document config schema runtime helpers
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// Resolves per-agent runtime limits from config.
|
||||
import type { OpenClawConfig } from "./types.js";
|
||||
|
||||
/** Default maximum concurrent top-level agent runs. */
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Covers miscellaneous config schema defaults and validation cases.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
getConfigValueAtPath,
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Normalizes group-policy config for channel and runtime decisions.
|
||||
import {
|
||||
normalizeLowercaseStringOrEmpty,
|
||||
normalizeOptionalString,
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Covers config write preparation diffs and metadata preservation.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
collectChangedPaths,
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Verifies default port config values and overrides.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
DEFAULT_BROWSER_CDP_PORT_RANGE_END,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Provides shared JSON schema helpers for generated config metadata.
|
||||
type JsonSchemaObject = {
|
||||
type?: string | string[];
|
||||
properties?: Record<string, JsonSchemaObject>;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Classifies sensitive config paths for redaction and validation.
|
||||
import { normalizeLowercaseStringOrEmpty } from "@openclaw/normalization-core/string-coerce";
|
||||
|
||||
/**
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Defines agent routing, model, and runtime configuration types.
|
||||
import type { ChatType } from "../channels/chat-type.js";
|
||||
import type {
|
||||
AgentContextLimitsConfig,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Defines WhatsApp channel configuration types.
|
||||
import type { ReactionLevel } from "../utils/reaction-level.js";
|
||||
import type {
|
||||
BlockStreamingCoalesceConfig,
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user