refactor(agents): hide sandbox helper types · openclaw/openclaw@53ff308
vincentkoc
·
2026-06-17
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -6,7 +6,7 @@
|
6 | 6 | import { normalizeOptionalLowercaseString } from "@openclaw/normalization-core/string-coerce"; |
7 | 7 | |
8 | 8 | /** Reason a requested network mode is blocked by sandbox policy. */ |
9 | | -export type NetworkModeBlockReason = "host" | "container_namespace_join"; |
| 9 | +type NetworkModeBlockReason = "host" | "container_namespace_join"; |
10 | 10 | |
11 | 11 | /** Normalizes optional Docker network mode strings for policy checks. */ |
12 | 12 | export function normalizeNetworkMode(network: string | undefined): string | undefined { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -36,7 +36,7 @@ const ALLOWED_ENV_VAR_PATTERNS: ReadonlyArray<RegExp> = [
|
36 | 36 | /^NODE_ENV$/i, |
37 | 37 | ]; |
38 | 38 | |
39 | | -export type EnvVarSanitizationResult = { |
| 39 | +type EnvVarSanitizationResult = { |
40 | 40 | allowed: Record<string, string>; |
41 | 41 | blocked: string[]; |
42 | 42 | warnings: string[]; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -58,17 +58,17 @@ let blockedHostPathsCache:
|
58 | 58 | } |
59 | 59 | | undefined; |
60 | 60 | |
61 | | -export type ValidateBindMountsOptions = { |
| 61 | +type ValidateBindMountsOptions = { |
62 | 62 | allowedSourceRoots?: string[]; |
63 | 63 | allowSourcesOutsideAllowedRoots?: boolean; |
64 | 64 | allowReservedContainerTargets?: boolean; |
65 | 65 | }; |
66 | 66 | |
67 | | -export type ValidateNetworkModeOptions = { |
| 67 | +type ValidateNetworkModeOptions = { |
68 | 68 | allowContainerNamespaceJoin?: boolean; |
69 | 69 | }; |
70 | 70 | |
71 | | -export type BlockedBindReason = |
| 71 | +type BlockedBindReason = |
72 | 72 | | { kind: "targets"; blockedPath: string } |
73 | 73 | | { kind: "covers"; blockedPath: string } |
74 | 74 | | { kind: "non_absolute"; sourcePath: string } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。