Skip to content
1 min read · 122 words

Function: mapPolicy() ​

ts
function mapPolicy(
  policy: SandboxPolicy,
  runtime?: {
    bwrapPath?: string;
    enableWeakerNestedSandbox?: boolean;
    socatPath?: string;
  },
): SrtConfig;

Defined in: src/batteries/sandbox/node/srt_enforcer.ts:209

The sole ADK-to-SRT translation point. Keep the upstream type behind this local firewall.

Parameters ​

ParameterType
policySandboxPolicy
runtime{ bwrapPath?: string; enableWeakerNestedSandbox?: boolean; socatPath?: string; }
runtime.bwrapPath?string
runtime.enableWeakerNestedSandbox?boolean
runtime.socatPath?string

Returns ​

SrtConfig

Remarks ​

runtime carries ADAPTER-level settings that are deliberately absent from SandboxPolicy. That type is ADK-owned, SRT-neutral vocabulary — naming an SRT feature in it would make the firewall nominal and leave a non-SRT enforcer unable to implement the contract — so an SRT-specific switch belongs on the adapter's own options, exactly as binShell already does.