refactor: trim config runtime helper types · openclaw/openclaw@8c8cf79
steipete
·
2026-05-02
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { sanitizeTerminalText } from "../terminal/safe-text.js"; |
2 | 2 | |
3 | | -export type ConfigValidationIssueLike = { |
| 3 | +type ConfigValidationIssueLike = { |
4 | 4 | path: string; |
5 | 5 | message: string; |
6 | 6 | }; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -12,7 +12,7 @@ import { normalizeExecSafeBinProfilesInConfig } from "./normalize-exec-safe-bin.
|
12 | 12 | import { normalizeConfigPaths } from "./normalize-paths.js"; |
13 | 13 | import type { OpenClawConfig, ResolvedSourceConfig, RuntimeConfig } from "./types.js"; |
14 | 14 | |
15 | | -export type ConfigMaterializationMode = "load" | "missing" | "snapshot"; |
| 15 | +type ConfigMaterializationMode = "load" | "missing" | "snapshot"; |
16 | 16 | |
17 | 17 | type MaterializationProfile = { |
18 | 18 | includeCompactionDefaults: boolean; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { isRecord } from "../utils.js"; |
2 | 2 | |
3 | 3 | export type ConfigMcpServers = Record<string, Record<string, unknown>>; |
4 | | -export type OpenClawMcpHttpTransport = "sse" | "streamable-http"; |
| 4 | +type OpenClawMcpHttpTransport = "sse" | "streamable-http"; |
5 | 5 | |
6 | 6 | const CLI_MCP_TYPE_TO_OPENCLAW_TRANSPORT: Record<string, OpenClawMcpHttpTransport | "stdio"> = { |
7 | 7 | http: "streamable-http", |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -471,7 +471,7 @@ export function redactConfigSnapshot(
|
471 | 471 | }; |
472 | 472 | } |
473 | 473 | |
474 | | -export type RedactionResult = { |
| 474 | +type RedactionResult = { |
475 | 475 | ok: boolean; |
476 | 476 | result?: unknown; |
477 | 477 | error?: unknown; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { normalizeOptionalString } from "../shared/string-coerce.js"; |
2 | 2 | import type { GroupPolicy } from "./types.base.js"; |
3 | 3 | |
4 | | -export type RuntimeGroupPolicyResolution = { |
| 4 | +type RuntimeGroupPolicyResolution = { |
5 | 5 | groupPolicy: GroupPolicy; |
6 | 6 | providerMissingFallbackApplied: boolean; |
7 | 7 | }; |
8 | 8 | |
9 | | -export type RuntimeGroupPolicyParams = { |
| 9 | +type RuntimeGroupPolicyParams = { |
10 | 10 | providerConfigPresent: boolean; |
11 | 11 | groupPolicy?: GroupPolicy; |
12 | 12 | defaultGroupPolicy?: GroupPolicy; |
@@ -27,13 +27,13 @@ export function resolveRuntimeGroupPolicy(
|
27 | 27 | return { groupPolicy, providerMissingFallbackApplied }; |
28 | 28 | } |
29 | 29 | |
30 | | -export type ResolveProviderRuntimeGroupPolicyParams = { |
| 30 | +type ResolveProviderRuntimeGroupPolicyParams = { |
31 | 31 | providerConfigPresent: boolean; |
32 | 32 | groupPolicy?: GroupPolicy; |
33 | 33 | defaultGroupPolicy?: GroupPolicy; |
34 | 34 | }; |
35 | 35 | |
36 | | -export type GroupPolicyDefaultsConfig = { |
| 36 | +type GroupPolicyDefaultsConfig = { |
37 | 37 | channels?: { |
38 | 38 | defaults?: { |
39 | 39 | groupPolicy?: GroupPolicy; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。