Skip to content
1 min read · 108 words

Function: mapPolicy()

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

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

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

Parameters

ParameterType
policySandboxPolicy
runtime{ enableWeakerNestedSandbox?: boolean; }
runtime.enableWeakerNestedSandbox?boolean

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.