mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 12:56:01 -06:00
docs: document config runtime helpers
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// Normalizes agent binding config for channels, routes, and ACP sessions.
|
||||
import type { AgentAcpBinding, AgentBinding, AgentRouteBinding } from "./types.agents.js";
|
||||
import type { OpenClawConfig } from "./types.openclaw.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Verifies bundled channel config runtime loading stays lazy and bounded.
|
||||
import { importFreshModule } from "openclaw/plugin-sdk/test-fixtures";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Covers command config normalization and path validation.
|
||||
import path from "node:path";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
import { setActivePluginRegistry } from "../plugins/runtime.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Defines environment-variable config metadata and preservation rules.
|
||||
import {
|
||||
isDangerousHostEnvOverrideVarName,
|
||||
isDangerousHostEnvVarName,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Provides fixture helpers for config backup rotation tests.
|
||||
import path from "node:path";
|
||||
import { expect } from "vitest";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Covers skills entry config parsing and defaults.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { OpenClawSchema } from "./zod-schema.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Resolves context visibility policy for accounts and sessions.
|
||||
import { resolveAccountEntry } from "../routing/account-lookup.js";
|
||||
import { normalizeAccountId } from "../routing/session-key.js";
|
||||
import type { OpenClawConfig } from "./config.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Provides canonical default config values and model/provider defaults.
|
||||
import { normalizeProviderId } from "@openclaw/model-catalog-core/provider-id";
|
||||
import {
|
||||
collectManifestModelIdNormalizationPolicies,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Covers config environment-variable substitution behavior.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
type EnvSubstitutionWarning,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Audits config paths and values for diagnostics and safety checks.
|
||||
import path from "node:path";
|
||||
import { redactSecrets, redactToolPayloadText } from "../logging/redact.js";
|
||||
import { resolveStateDir } from "./paths.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Verifies invalid-config errors include stable codes and details.
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import {
|
||||
createInvalidConfigError,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Provides assertions for legacy config detection tests.
|
||||
import { expect } from "vitest";
|
||||
|
||||
type SchemaParseResult<TData = unknown> =
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Verifies channel config loading surfaces visible plugin settings.
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import type { createJiti as createJitiType } from "jiti";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Normalizes MCP config records into canonical runtime shape.
|
||||
import { isRecord } from "../utils.js";
|
||||
|
||||
type ConfigMcpServers = Record<string, Record<string, unknown>>;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Covers MCP config normalization, validation, and serialization.
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { withTempHome } from "openclaw/plugin-sdk/test-env";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Applies plugin auto-enable decisions to normalized config objects.
|
||||
import type { PluginDiscoveryResult } from "../plugins/discovery.js";
|
||||
import type { PluginManifestRegistry } from "../plugins/manifest-registry.js";
|
||||
import { detectPluginAutoEnableCandidates } from "./plugin-auto-enable.detect.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Covers provider-driven plugin auto-enable decisions.
|
||||
import { afterAll, describe, expect, it } from "vitest";
|
||||
import {
|
||||
applyPluginAutoEnable,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Produces redacted runtime config snapshots for diagnostics and UI surfaces.
|
||||
import { createHash } from "node:crypto";
|
||||
import type { OpenClawConfig } from "./types.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Verifies talk-mode config normalization behavior.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { TALK_TEST_PROVIDER_ID } from "../test-utils/talk-test-provider.js";
|
||||
import { buildTalkConfigResponse, normalizeTalkSection } from "./talk.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Provides config test helpers for temporary homes and fixture writes.
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { withTempHome as withTempHomeBase } from "openclaw/plugin-sdk/test-env";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Defines auth profile configuration types.
|
||||
export type AuthProfileConfig = {
|
||||
/** Provider id this auth profile can satisfy. */
|
||||
provider: string;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Defines Zod schema fragments for channel configuration.
|
||||
import { z } from "zod";
|
||||
import type { ChannelsConfig } from "./types.channels.js";
|
||||
import { ChannelHeartbeatVisibilitySchema } from "./zod-schema.channels.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Verifies logging-level schema parsing and defaults.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { OpenClawSchema } from "./zod-schema.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Defines proxy-related Zod schema fragments for config parsing.
|
||||
import { z } from "zod";
|
||||
import { sensitive } from "./zod-schema.sensitive.js";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user