refactor(agents): dedupe config and truncation guards

This commit is contained in:
Peter Steinberger
2026-02-22 17:54:42 +00:00
parent 409a02691f
commit 3286791316
12 changed files with 325 additions and 318 deletions

View File

@@ -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>>;