/**
 * Process-level hardening — boot-time mitigations against provider scripts.
 *
 * Provider scripts run in-process (see providers/sdk/v1/sandbox/README-design.ts).
 * The require() whitelist (sandbox/require-whitelist.ts) blocks the obvious
 * attack surfaces (no `child_process.exec`, no `fs.writeFile`, no `net`, etc.)
 * but a malicious or buggy script can still:
 *
 *   1. Pollute Object.prototype to influence the daemon's downstream consumers
 *      (e.g. `Object.prototype.toString = () => '...'` makes every untagged
 *      object stringify to that value across the whole process).
 *   2. Mutate Array/Function/String prototypes for similar effect.
 *   3. Call `process.exit()` / `process.kill()` to kill the daemon.
 *
 * Sandbox isolation (isolated-vm) is the proper fix but has a real perf cost
 * and a real marshalling-complexity cost. As a cheaper layer we just freeze
 * the built-in prototypes at boot, which is irreversible and catches every
 * prototype-pollution variant for the lifetime of the process.
 *
 * `applyProcessHardening()` is idempotent — calling it twice is a no-op the
 * second time. The function intentionally swallows any "cannot redefine
 * property" errors that would arise if some upstream code already froze
 * the same prototype: the post-condition (prototype is frozen) is satisfied
 * either way.
 *
 * Trade-offs:
 *   - Read-only access to prototype methods (`Object.prototype.hasOwnProperty.call`,
 *     `Array.prototype.slice.call`, etc.) is unaffected — only writes throw.
 *   - Some older npm libraries patch Array.prototype or Function.prototype at
 *     import time. If a daemon-core dep does this, the import will throw. The
 *     daemon-core vitest suite is the canonical regression check for this.
 *   - We deliberately do NOT freeze RegExp.prototype, Error.prototype, Map/Set
 *     prototypes, or Date.prototype because at least one of those tends to be
 *     mutated by mainstream test/runtime libs and the value of freezing them
 *     is low (no useful prototype-pollution attack surface).
 */
/**
 * Freeze the canonical built-in prototypes so provider scripts (and anything
 * else running in this process) cannot mutate them. Idempotent.
 *
 * Returns the list of prototype names that were newly frozen — primarily for
 * tests / observability. Already-frozen prototypes are not re-reported.
 */
export declare function applyProcessHardening(): string[];
/** For tests only — clears the internal "already hardened" flag. The
 *  prototypes themselves cannot be un-frozen, so this is mostly useful for
 *  testing the idempotency guard. */
export declare function _resetProcessHardeningForTest(): void;
/** For tests only — peek at the hardened state. */
export declare function _isProcessHardened(): boolean;
