/** * The one place configuration is read from the environment. * * Six readers used to coexist (`index.ts`, `transports/http.ts`, * `services/oauth.ts`, `services/boond-client.ts`, `config/access-policy.ts`, * `config/dictionary-overrides.ts`) and they disagreed on the one rule that * matters for the packaged channels (issue #242): the MCPB manifest and the * Claude Code plugin substitute `${user_config.KEY}` into **every** `BOOND_*` * variable, so an option the user never filled arrives as `""`, as whitespace, * or as the unsubstituted `"${…}"` — and only one of the six rejected the * whitespace form. `MCP_HTTP_PATH=" "` became the endpoint path, * `BOOND_OAUTH_AUTHORIZATION_SERVER=" "` broke the discovery document. * * Rule, applied by every reader here: `""`, whitespace-only and an * unresolved `${…}` placeholder all mean *not configured*. A blank value must * never switch a security control off (`MCP_HTTP_ALLOWED_HOSTS`) nor a * restriction on (`BOOND_MCP_DOMAINS`); it falls through to the default. * * Every reader takes the environment as its last argument so the config * modules that already accept an `env` for testing keep doing so. */ /** True when the raw value is one of the three "not configured" shapes. */ export declare function isUnset(raw: string | undefined): boolean; /** * The variable's value, or `undefined` when it is absent / blank / an * unresolved placeholder. The value is returned as-is (not trimmed): a * password may legitimately end with a space. Callers that want a token * trim it themselves. */ export declare function readString(name: string, env?: NodeJS.ProcessEnv): string | undefined; /** * A boolean switch. `1/true/yes/on` → `true`, `0/false/no/off` → `false`, * anything else (unset, blank, placeholder, garbage) → `fallback`. Both * spellings are accepted because the packaged channels send booleans as * strings with an explicit `default` — `"false"` must not read as "set, * therefore on". */ export declare function readBool(name: string, fallback?: boolean, env?: NodeJS.ProcessEnv): boolean; /** * A positive integer (floored), or `fallback` for unset, non-numeric, negative * or — unless `allowZero` — zero values. */ export declare function readPositiveInt(name: string, fallback: number, env?: NodeJS.ProcessEnv, options?: { allowZero?: boolean; }): number; /** * A list: comma and/or whitespace separated, trimmed, empties dropped. * `undefined` when the variable is not configured **or** yields no token * (`" , "`): a list with nothing in it is "unconfigured", never "allow * nothing" — the `MCP_HTTP_ALLOWED_HOSTS` rule, applied to every list. */ export declare function readCsv(name: string, env?: NodeJS.ProcessEnv): string[] | undefined; /** * An absolute URL, trimmed. Unset / blank / placeholder → `undefined`. A * value that is present but not a URL **throws**, naming the variable: the * URLs read here (`BOOND_BASE_URL`, `MCP_HTTP_PUBLIC_URL`, * `BOOND_OAUTH_AUTHORIZATION_SERVER`) all decide where credentials are sent * or where clients are told to go, so a typo must stop the start-up with a * readable message rather than surface later as an opaque fetch error or a * broken discovery document. */ export declare function readUrl(name: string, env?: NodeJS.ProcessEnv): string | undefined; //# sourceMappingURL=env.d.ts.map