:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
import { SandboxEnvironmentNetworkAccessLevelEnumApi } from 'products/tasks/frontend/generated/api.schemas'
export const NETWORK_ACCESS_COPY: Record<
SandboxEnvironmentNetworkAccessLevelEnumApi,
{ label: string; description: string }
> = {
[SandboxEnvironmentNetworkAccessLevelEnumApi.Trusted]: {
label: 'Trusted',
description: 'Downloads packages from verified sources, such as GitHub, npm, and PyPI.',
},
[SandboxEnvironmentNetworkAccessLevelEnumApi.Full]: {
label: 'Full',
description: 'Unrestricted internet access.',
},
[SandboxEnvironmentNetworkAccessLevelEnumApi.Custom]: {
label: 'Custom',
description: 'Only the domains you list.',
},
}
export function networkAccessLabel(level: string): string {
return NETWORK_ACCESS_COPY[level as SandboxEnvironmentNetworkAccessLevelEnumApi]?.label ?? level
}