import { type StackDeps } from "../stack/commands.js"; import type { FetchLike } from "../stack/studio-login.js"; import { type ClusterFile } from "./cluster-file.js"; import { type Kube, type KubectlRunner } from "./kubectl.js"; import { type ProbePorts } from "./probe.js"; export declare const sandboxUsage = " sandbox enable --context [--tenant ] [--backend agent-sandbox|substrate] [--host-address ] [--bind-address ] [--probe-ports ,] [--no-pull]\n run the Tenant's sandboxes as pods on that kubeconfig context (agent-sandbox v1.0.10),\n or as Agent Substrate actors (--backend substrate, preview: Kubernetes 1.37 with Substrate v1.0 installed)\n sandbox disable [--tenant ] [--delete-namespace]\n stop the sandboxes service and forget the cluster\n sandbox status [--tenant ] [--json]\n the cluster, the sandboxes service's readiness and what it reports"; /** The default workload image (D36), pre-pulled with the Runtime image. */ export declare const DEFAULT_SANDBOX_IMAGE = "python:3.13-slim"; export interface SandboxDeps { stack: StackDeps; kubectl: KubectlRunner; /** Fetches the controller manifest; defaults to the stack's fetch. */ fetch?: FetchLike; /** Poll interval and NetworkPolicy wait, for tests. */ pollMs?: number; policyTimeoutMs?: number; } /** * Waits until the Sandbox CRD is Established. Polled, not `kubectl wait`: a CRD the API server has * not given any conditions yet makes `kubectl wait --for=condition` fail at once instead of waiting * (seen on GKE right after the apply). */ export declare function waitForCrd(k: Kube, pollMs: number): Promise; /** The ServiceAccount token the token controller writes into the Secret. */ export declare function serviceAccountToken(k: Kube, namespace: string, pollMs: number): Promise; export interface InstallResult { cluster: ClusterFile; /** The ServiceAccount token. */ token: string; /** Images the pre-pull could not pull. */ notPulled: string[]; } /** * Steps 2–8 of `enable` against one context: controller, namespace and RBAC, NetworkPolicy * probe, the namespace's policy, pre-pull. Returns what cluster.json records. */ export declare function installCluster(deps: SandboxDeps, input: { context: string; tenant: string; hostAddress?: string; bindAddress?: string; probePorts?: ProbePorts; prePull: readonly string[]; ports: { harness: number; gates: number; egress: number; }; }): Promise; /** * `enable --backend substrate` against one context (ADR-138, preview): checks Substrate is * installed, makes the Tenant's namespace and RBAC, finds the Docker host's address as pods see * it, and names the edge for actors in CoreDNS. The atespace is made later, by the sandboxes * image's substrate-setup, once cluster.json is written. */ export declare function installSubstrate(deps: SandboxDeps, input: { context: string; tenant: string; hostAddress?: string; bindAddress?: string; ports: { harness: number; gates: number; egress: number; }; edgePorts: { harness: number; gates: number; }; }): Promise<{ cluster: ClusterFile; token: string; }>; /** * Keys at Substrate's egress (ADR-142): deploys the keys provider with this Tenant's entry (the * edge's keys port, its token and CA, and the Host's outside credential source when the shell * names one), keeping other Tenants' entries, and checks Substrate's egress asks it. Returns * whether it does: when not, keys stay off and `enable` says how to turn them on. */ export declare function deployKeysProvider(deps: SandboxDeps, root: string, cluster: ClusterFile, input: { image: string; port: number; token: string; outside?: { url: string; token: string; }; }): Promise; /** `nylorun local sandbox `. */ export declare function runSandboxCommand(args: readonly string[], deps: SandboxDeps): Promise;