mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 17:24:58 +00:00
refactor(agents): dedupe config and truncation guards
This commit is contained in:
@@ -1,22 +1,13 @@
|
||||
export type SandboxDockerConfig = {
|
||||
image: string;
|
||||
containerPrefix: string;
|
||||
workdir: string;
|
||||
readOnlyRoot: boolean;
|
||||
tmpfs: string[];
|
||||
network: string;
|
||||
user?: string;
|
||||
capDrop: string[];
|
||||
env?: Record<string, string>;
|
||||
setupCommand?: string;
|
||||
pidsLimit?: number;
|
||||
memory?: string | number;
|
||||
memorySwap?: string | number;
|
||||
cpus?: number;
|
||||
ulimits?: Record<string, string | number | { soft?: number; hard?: number }>;
|
||||
seccompProfile?: string;
|
||||
apparmorProfile?: string;
|
||||
dns?: string[];
|
||||
extraHosts?: string[];
|
||||
binds?: string[];
|
||||
};
|
||||
import type { SandboxDockerSettings } from "../../config/types.sandbox.js";
|
||||
|
||||
type RequiredDockerConfigKeys =
|
||||
| "image"
|
||||
| "containerPrefix"
|
||||
| "workdir"
|
||||
| "readOnlyRoot"
|
||||
| "tmpfs"
|
||||
| "network"
|
||||
| "capDrop";
|
||||
|
||||
export type SandboxDockerConfig = Omit<SandboxDockerSettings, RequiredDockerConfigKeys> &
|
||||
Required<Pick<SandboxDockerSettings, RequiredDockerConfigKeys>>;
|
||||
|
||||
Reference in New Issue
Block a user