import type { WorkflowModule } from "../contracts/module-contract.js";
import { ModuleRegistry, type ModuleRegistryOptions } from "./module-registry.js";
import { type ConfigLayer, type EffectiveWorkspaceConfig } from "./workspace-kit-config.js";
/**
 * Instruction paths in module registration are package-relative. Use `workspacePath` when it
 * contains the kit sources; otherwise fall back to the installed package root.
 */
export declare function pickModuleContractWorkspacePath(workspacePath: string): string;
/**
 * Reads `modules.enabled` / `modules.disabled` from effective config and maps them
 * to ModuleRegistryOptions. Unknown module ids throw — fail fast on typos.
 *
 * Semantics (matches resolveEnabledModuleIds):
 * - If `modules.enabled` is non-empty: only those ids are candidates, then `modules.disabled` subtracts.
 * - If `modules.enabled` is empty/absent: start from each module's enabledByDefault, then subtract disabled.
 */
export declare function moduleRegistryOptionsFromEffectiveConfig(effective: Record<string, unknown>, knownModuleIds: Set<string>): Pick<ModuleRegistryOptions, "enabledModules" | "disabledModules">;
/**
 * Resolves layered config together with module enablement toggles from that config.
 * Iterates until the enabled module set stabilizes (module config contributions can
 * change when modules drop out of startup order).
 */
export declare function resolveRegistryAndConfig(workspacePath: string, allModules: WorkflowModule[], invocationConfig?: Record<string, unknown>): Promise<{
    registry: ModuleRegistry;
    effective: EffectiveWorkspaceConfig;
    layers: ConfigLayer[];
}>;
