import type { SmolConfig } from "smoltalk"; import type { AgencyConfig } from "../config.js"; import type { StatelogConfig } from "../statelogClient.js"; import type { LogLevel } from "../logger.js"; import type { MemoryConfig } from "./memory/types.js"; import type { TraceConfig } from "./trace/types.js"; export type RuntimeContextConstructorArgs = { statelogConfig: StatelogConfig; smoltalkDefaults: Partial; maxToolResultChars?: number; providerModules?: string[]; dirname: string; maxRestores?: number; maxCallDepth?: number; failurePropagation?: "off" | "warn" | "on"; traceConfig?: TraceConfig; verbose?: boolean; memory?: MemoryConfig; logLevel?: LogLevel; }; export declare function setRuntimeConfigOverrides(overrides: Partial | undefined): void; export declare function getRuntimeConfigOverrides(): Partial | undefined; /** * Apply runtime config overrides — a `Partial` — onto the args * used to construct a `RuntimeContext`. This is THE single runtime merge; it * serves two transports: * • subprocess IPC: the parent forwards `configOverrides` in the spawn * message (`setRuntimeConfigOverrides` sets the active value). * • bundled agents / packed bundles: `AGENCY_CONFIG_OVERRIDES` in the env * (`config.ts` `readConfigOverrides`), passed explicitly by the caller. * * Fields honored (others are ignored — the runtime has its own pathways): * • `log.*` + `observability` → statelogConfig * • `traceFile` / `traceDir` → traceConfig (the `trace` boolean is only a * marker set alongside them by applyCliFlags; the file/dir drive output). * An override always wins over the baked traceConfig: a supplied `traceDir` * clears any baked `traceFile` (which `resolveTraceFilePath` would otherwise * prefer), so a per-run `--trace` dir actually takes effect. * • `client.providerModules` → merged with baked modules (subprocess loads * the same custom/local providers; de-duped at load time). * • `maxCallDepth` → inherit the parent's runaway-recursion ceiling. * • `failurePropagation` → inherit the parent's failure-propagation mode. */ export declare function applyRuntimeConfigOverridesToContextArgs(args: RuntimeContextConstructorArgs, overrides?: Partial | undefined): RuntimeContextConstructorArgs;