/** * Read the dev-server discovery file written by `awaithumans dev`. * * Mirrors `awaithumans/utils/discovery.py`. The dev CLI drops a JSON * file at `~/.awaithumans-dev.json` containing the bound URL plus the * auto-generated admin token; the SDK reads it so users don't have to * `export AWAITHUMANS_ADMIN_API_TOKEN=$(cat ...)` before every run. * * Resolution order (matches `client.py`'s `resolve_admin_token` / * `resolve_server_url`): * * explicit option → env var → discovery file → default / undefined * * Cross-runtime safety: the SDK has to work in Bun, Deno, edge * runtimes, and browsers. Of those only Node + Bun + Deno expose * `node:fs`/`os`, and only via dynamic import. We swallow every * failure and return an empty config — the SDK falls back to defaults * and the server's auth response tells the user what's missing. */ export interface DiscoveryConfig { /** Server URL the dev CLI bound to, e.g. `http://localhost:3001`. */ url?: string; /** Auto-generated admin bearer token. */ adminToken?: string; } /** * Best-effort: read the dev-server config dropped by `awaithumans dev`. * Returns `{}` when the file doesn't exist / can't be read / we're * in a non-Node runtime. * * Memoized for the process lifetime — agents call awaitHuman in a * hot loop and we don't want a stat per task. Restarting the dev * server invalidates the cached config; restart the agent too in * that case. */ export declare function resolveDiscoveryConfig(): Promise; /** Test-only: drop the cache so a follow-up read picks up a new file. */ export declare function _resetDiscoveryCache(): void; /** * Test-only: pin the discovery result to a fixed config without * touching the filesystem. Lets unit tests assert against the * "no discovery file" or "specific discovery file" cases without * depending on what the developer has running locally. */ export declare function _setDiscoveryCacheForTesting(config: DiscoveryConfig): void; //# sourceMappingURL=discovery.d.ts.map