import type { JsStatusEvent } from "./types";
export interface HelperOptions {
    path?: string;
    hidden?: boolean;
    maxDepth?: number;
    limit?: number;
    offset?: number;
    reverse?: boolean;
    unique?: boolean;
    count?: boolean;
}
/**
 * Inputs the helper factory needs from its host runtime. `cwd` is a getter so the runtime
 * can update it between cells (e.g. when the agent's session cwd changes) without
 * recreating helpers.
 */
export interface HelperContext {
    cwd(): string;
    env: Map<string, string>;
    /**
     * On-disk roots for internal-URL schemes the helpers accept (e.g.
     * `{ local: "/…/artifacts/local" }`). A path like `local://x.md` is rewritten
     * to `<root>/x.md` before any filesystem op; unknown schemes are rejected.
     */
    localRoots(): Record<string, string>;
    emitStatus(event: JsStatusEvent): void;
}
/**
 * The set of functions exposed to user code via `globalThis.__omp_helpers__`. The JS
 * prelude reads from this bag and attaches short aliases (`read`, `write`, `tree`, ...)
 * onto the global scope.
 */
export interface HelperBundle {
    read(rawPath: string, options?: HelperOptions): Promise<string>;
    writeFile(rawPath: string, data: unknown): Promise<string>;
    append(rawPath: string, content: string): Promise<string>;
    sortText(text: string, options?: HelperOptions): string;
    uniqText(text: string, options?: HelperOptions): string | Array<[number, string]>;
    counter(items: string | string[], options?: HelperOptions): Array<[number, string]>;
    diff(rawA: string, rawB: string): Promise<string>;
    tree(searchPath?: string, options?: HelperOptions): Promise<string>;
    env(key?: string, value?: string): string | Record<string, string> | undefined;
}
export declare function createHelpers(ctx: HelperContext): HelperBundle;
