import type { ToolDef, WardenPolicy } from "./types.js"; /** * Runtime policy layer for tool execution. * * NOTE: this is the JS-level policy layer, not a true sandbox. It classifies * tools, gates sensitive calls behind explicit approval, and watches egress for * a tool trying to phone home. OS-level process isolation * (seccomp / Landlock on Linux, sandbox-exec on macOS) is the v2 hardening that * confines the actual child process; until then these helpers are the boundary * the agent loop enforces in-process. */ /** * True if a tool name matches any sensitive pattern in the policy. Patterns use * `*` as a wildcard and match case-insensitively (e.g. "*delete*", "*transfer*"). * Sensitive tools are still allowed to be advertised — they just require explicit * per-call approval before WARDEN lets them run. */ export declare function isSensitiveTool(toolName: string, policy: WardenPolicy): boolean; /** Split a server's advertised tools into sensitive vs. safe by policy. */ export declare function classifyTools(tools: ToolDef[], policy: WardenPolicy): { sensitive: string[]; safe: string[]; }; /** * Outbound-request allowlist. Wrap any network egress a tool performs in * `check()` — a tool that tries to reach a host outside the allowlist is the * classic "phone home" exfiltration tell. Hostnames are matched case-insensitively * and a leading "*." entry matches subdomains (e.g. "*.example.com"). */ export declare class EgressGuard { private readonly allow; constructor(allowlist: string[]); check(url: string): { allowed: boolean; reason?: string; }; } //# sourceMappingURL=sandbox.d.ts.map