mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:20:43 +00:00
refactor: trim config runtime helper types
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { sanitizeTerminalText } from "../terminal/safe-text.js";
|
||||
|
||||
export type ConfigValidationIssueLike = {
|
||||
type ConfigValidationIssueLike = {
|
||||
path: string;
|
||||
message: string;
|
||||
};
|
||||
|
||||
@@ -12,7 +12,7 @@ import { normalizeExecSafeBinProfilesInConfig } from "./normalize-exec-safe-bin.
|
||||
import { normalizeConfigPaths } from "./normalize-paths.js";
|
||||
import type { OpenClawConfig, ResolvedSourceConfig, RuntimeConfig } from "./types.js";
|
||||
|
||||
export type ConfigMaterializationMode = "load" | "missing" | "snapshot";
|
||||
type ConfigMaterializationMode = "load" | "missing" | "snapshot";
|
||||
|
||||
type MaterializationProfile = {
|
||||
includeCompactionDefaults: boolean;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { isRecord } from "../utils.js";
|
||||
|
||||
export type ConfigMcpServers = Record<string, Record<string, unknown>>;
|
||||
export type OpenClawMcpHttpTransport = "sse" | "streamable-http";
|
||||
type OpenClawMcpHttpTransport = "sse" | "streamable-http";
|
||||
|
||||
const CLI_MCP_TYPE_TO_OPENCLAW_TRANSPORT: Record<string, OpenClawMcpHttpTransport | "stdio"> = {
|
||||
http: "streamable-http",
|
||||
|
||||
@@ -471,7 +471,7 @@ export function redactConfigSnapshot(
|
||||
};
|
||||
}
|
||||
|
||||
export type RedactionResult = {
|
||||
type RedactionResult = {
|
||||
ok: boolean;
|
||||
result?: unknown;
|
||||
error?: unknown;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { normalizeOptionalString } from "../shared/string-coerce.js";
|
||||
import type { GroupPolicy } from "./types.base.js";
|
||||
|
||||
export type RuntimeGroupPolicyResolution = {
|
||||
type RuntimeGroupPolicyResolution = {
|
||||
groupPolicy: GroupPolicy;
|
||||
providerMissingFallbackApplied: boolean;
|
||||
};
|
||||
|
||||
export type RuntimeGroupPolicyParams = {
|
||||
type RuntimeGroupPolicyParams = {
|
||||
providerConfigPresent: boolean;
|
||||
groupPolicy?: GroupPolicy;
|
||||
defaultGroupPolicy?: GroupPolicy;
|
||||
@@ -27,13 +27,13 @@ export function resolveRuntimeGroupPolicy(
|
||||
return { groupPolicy, providerMissingFallbackApplied };
|
||||
}
|
||||
|
||||
export type ResolveProviderRuntimeGroupPolicyParams = {
|
||||
type ResolveProviderRuntimeGroupPolicyParams = {
|
||||
providerConfigPresent: boolean;
|
||||
groupPolicy?: GroupPolicy;
|
||||
defaultGroupPolicy?: GroupPolicy;
|
||||
};
|
||||
|
||||
export type GroupPolicyDefaultsConfig = {
|
||||
type GroupPolicyDefaultsConfig = {
|
||||
channels?: {
|
||||
defaults?: {
|
||||
groupPolicy?: GroupPolicy;
|
||||
|
||||
Reference in New Issue
Block a user