import * as Config from 'effect/Config'; import * as Effect from 'effect/Effect'; import * as FileSystem from 'effect/FileSystem'; import * as Path from 'effect/Path'; import { SettingsDecodeError, SettingsParseError, SettingsReadError } from '../Errors.js'; import { SettingsFile } from './Schema.js'; export interface LoadOptions { /** Path supplied by Claude Code's `--settings` flag. */ readonly settingsPath?: string; /** Override the managed-settings directory, mainly for tests. */ readonly managedSettingsRoot?: string; /** Override all candidate managed-settings directories. */ readonly managedSettingsRoots?: ReadonlyArray; } /** * Resolve the canonical user settings path (`~/.claude/settings.json`). * * @category Paths * @since 0.1.0 */ export declare const userSettingsPath: Effect.Effect; /** * Resolve the project settings path for a given cwd. * * @category Paths * @since 0.1.0 */ export declare const projectSettingsPath: (cwd: string) => Effect.Effect; /** * Resolve the local (gitignored) settings path for a given cwd. * * @category Paths * @since 0.1.0 */ export declare const localSettingsPath: (cwd: string) => Effect.Effect; /** * Load and merge settings.json files from all scopes for the given cwd. * * Priority order (later sources win on conflicting top-level keys): * * 1. `~/.claude/settings.json` (user) * 2. `/.claude/settings.json` (project) * 3. `/.claude/settings.local.json` (local, usually gitignored) * 4. `options.settingsPath` (`--settings` CLI overlay) * 5. file-based managed settings (`managed-settings.json`, then sorted * `managed-settings.d/*.json` drop-ins) * * Files that don't exist are silently skipped. Parse or decode errors * propagate as `SettingsParseError` / `SettingsDecodeError`. * * @category Loader * @since 0.1.0 * @example * ```ts * import * as Effect from 'effect/Effect' * import * as NodeFileSystem from '@effect/platform-node-shared/NodeFileSystem' * import * as NodePath from '@effect/platform-node-shared/NodePath' * import { Layer } from 'effect' * import { Settings } from 'effect-claudecode' * * const program = Effect.gen(function* () { * const settings = yield* Settings.load(process.cwd()) * console.log(settings.model) * }) * * program.pipe( * Effect.provide(Layer.mergeAll(NodeFileSystem.layer, NodePath.layer)) * ) * ``` */ export declare const load: (cwd: string, options?: LoadOptions) => Effect.Effect; //# sourceMappingURL=Loader.d.ts.map