/** * RFC B5/B4 抽象点② (sema-internal server/docs/design/ENV-SELECT-AND-REGION-SOURCE.md): the deployment-region package-source → * sandbox env derivation. ENV-FIRST: pod/sandbox env OVERRIDES the image's baked `ENV` (k8s container env wins * over image config and is visible to every exec'd process; e2b sandboxEnv likewise) — so the env-overridable * ecosystem pieces (pip/uv/npm/corepack/go/rustup/flutter/playwright/nuget) switch region on EXISTING images, * no rebake needed. Only the file-bound pieces (apt sources, /etc/gemrc, composer global config, cargo * config.toml) still need the in-image `pkg-source.sh` hook (rebaked images; bake prep chowns those files). * * Profiles: * cn → inject only the SEMA_PKG_SOURCE marker (the pool's images bake the CN set as their defaults). * global → official endpoints for every env-overridable ecosystem (overrides the baked CN ENV values). * custom → SEMA_* explicit URLs (from the service process env) forwarded verbatim + mapped onto the same * ecosystem variables where a mapping is unambiguous (apt has no env form — hook-only). * * The marker `SEMA_PKG_SOURCE` always rides along: the image's pkg-source.sh hook (pod-start / profile.d) * materializes the file-bound pieces from it; images without the hook simply ignore it. */ /** Explicit URLs for `custom` (RFC B: 极端情况出口). Read from the service process env (operator-trusted). */ export interface CustomPkgSource { aptMirror?: string; pipIndex?: string; uvIndex?: string; uvPyMirror?: string; npmRegistry?: string; nodeMirror?: string; } /** * Derive the operator-trusted sandbox env for a package-source profile. Returns `{}` for an unknown/empty * profile (unset = byte-identical sandbox — the B5 backward-compat contract). */ export declare function derivePkgSourceEnv(profile: string | undefined, custom?: CustomPkgSource): Record; /** Read the `custom` explicit-URL set from the service process env (operator-trusted deployment config). */ export declare function customPkgSourceFromEnv(env?: NodeJS.ProcessEnv): CustomPkgSource; //# sourceMappingURL=sandbox-pkg-source.d.ts.map