import { AssistantMode, BuiltInAssistantMode } from './types'; declare const ASSISTANT_API_AUTH_STRATEGY = "sandbox-app-client-headers-v1"; /** * Resolve the sandbox-image registry: `DEFAULT_SANDBOX_IMAGE_REGISTRY` (ECR), * unless `VITE_SANDBOX_IMAGE_REGISTRY` is set in the environment of the build * that compiles THIS SOURCE FILE. * * ★ In the published package that build is fe-libs' own, and its Vite config * installs a guard that FAILS a CI build whose environment, env file or Vite * `define` names any other registry (`scripts/published-registry-guard.ts`, * pinned end to end by `publishedRegistryBuild.test.ts`). So every shell gets * the default. The override still takes effect where a local Vite build * compiles fe-libs from source — a shell aliasing a sibling checkout in * development — and the variable is then that shell's. * * `import.meta.env` is only available in code paths Vite transforms; non-Vite * test runners and SSR contexts may not see it, so the read is guarded (same * pattern as config/gatewayUrls.ts). */ export declare function getSandboxImageRegistry(): string; /** * The built-in mode whose image, tag family and resources a sandbox for `mode` * runs on. * * - A built-in mode runs on its own. * - A PRODUCT-declared mode runs on `vibe-plugins`: the proxy-token image, which * carries no platform identity, with the larger resource profile a build needs. * The persona is chosen at boot from `AI_ASSISTANT_MODE`, exactly as * `assistant` runs on the api-calls image — ai-assistant publishes images only * for general / api-calls / vibe-plugins, so `ai-assistant-` would * name an image that does not exist. * * ★ Throws for anything else. A malformed id must not reach `CreateSandbox`, * where it would become part of the sandbox name and metadata. */ export declare function sandboxBaseModeFor(mode: AssistantMode): BuiltInAssistantMode; export declare function getImageTagForMode(mode: AssistantMode, isProd: boolean): string; export declare function getImageForMode(mode: AssistantMode, isProd: boolean): string; export declare function getResourcesForMode(mode: AssistantMode): { cpuRequest: string; cpuLimit: string; memoryRequest: string; memoryLimit: string; }; export { ASSISTANT_API_AUTH_STRATEGY }; /** * The mode an existing sandbox was provisioned for, or null when it cannot be * told. * * ★ A product-declared mode is recognised ONLY when the caller passes it in * `declaredModes`, and only from the stamped metadata — never from the name. * Names are prefixes, and `ai-assistant--` for a product id can be a prefix * of another mode's names; every sandbox this library creates carries * `metadata.assistantMode`, and reuse already requires this library's stamps. An * undeclared id resolves to null, so its sandbox is never reused. * * ★★ The NAME is read only when the metadata names NO mode (`assistantMode` * missing or null) — the legacy built-in sandboxes that predate the stamp. * Metadata that names a mode this caller does not recognise is an answer, not a * gap to fill from the name: `ai-assistant-general-docs-…` starts with * `ai-assistant-general-`, so reading the name there handed a `general-docs` * sandbox (another persona, and not read-only) to a `general` lookup, and an * `assistant-lite` one to Ask, which would then send it the user's tokens. */ export declare function resolveSandboxAssistantMode(sandbox: { metadata: Record | null; name?: string | null; }, declaredModes?: readonly AssistantMode[]): AssistantMode | null; //# sourceMappingURL=images.d.ts.map