import type { GatewayDependencies } from "../gateway/Gateway.js"; import type { CliProcess } from "./CliProcess.js"; export declare const HOST_ARGUMENTS: { readonly valued: readonly ["registry", "port", "listen", "tls-cert", "tls-key", "redirect-listen", "apex-page", "tenant"]; readonly flags: readonly ["require-upstream-proof"]; }; /** How often the registry is read for a change, when nothing says otherwise. */ export declare const REGISTRY_POLL_MS = 5000; /** How often tenants that could not be built are tried again, with the registry unchanged. */ export declare const TENANT_RETRY_MS = 60000; /** * `agentsafe host`: many tenants' hosted gateways in one process, from the * registry the operator mounts (`--registry` or `AGENTSAFE_TENANT_REGISTRY`). * Every tenant is a hosted gateway at `{id}.{domain}`; a request is routed by * its host alone, and a host no tenant has is refused with 421, except the * platform's `healthz` and `readyz`; `readyz` is 503 until one load has * served every tenant the registry names. The registry is read again on `SIGHUP` * and whenever its text changes; `SIGTERM` and `SIGINT` stop the listener * with a grace period, close every gateway and exit 0. Everything this * process prints is JSON, one line each, and every tenant's line carries its * id. * * With `--tls-cert` and `--tls-key` (or AGENTSAFE_TLS_CERT_FILE and * AGENTSAFE_TLS_KEY_FILE) the listener terminates TLS itself, so a layer-4 * load balancer is the whole edge: the key is watched like any mounted * secret, and a renewed certificate and key replace the context in place. * `--redirect-listen` adds a plain-HTTP listener that only redirects to * HTTPS, and `--apex-page` (an HTML file) is what the registry's domain * itself answers at `/`. `--require-upstream-proof` makes every tenant's * gateway forward nothing until its upstream's origin serves a token bound to * the tenant, its workspace and that origin, and keep checking that it does * (gateway/UpstreamProof.ts); `readyz` then also waits, at most 30 seconds, * for each tenant's first look. `--tenant ID` (or AGENTSAFE_HOST_TENANT) * serves that one registry entry and nothing else: the only host a tenant * that enforces runs on, since a host shared by many tenants leaves every * enforcing entry to a host of its own. */ export declare function runHost(io: CliProcess, argv: readonly string[], dependencies?: Omit, pollMs?: number, retryMs?: number, clock?: () => number): Promise; //# sourceMappingURL=Host.d.ts.map