/**
 * `path_exists` primitive — read-only check for files matching a basename
 * glob within a single directory, resolved relative to the event cwd.
 *
 * Powers the `scope-decomposer` skill's hard gate (Track SD): "a task/track
 * spec is being written but no `docs/research/*-pre-research-*.md` artifact
 * exists yet". Single-directory, non-recursive, NO glob dependency — it uses
 * `node:fs/promises.readdir` + a basename glob→RegExp match, because opensquid
 * pins Node `>=20` (where `fs.glob` is not stable) and ships no glob library.
 * Avoiding a new dep also keeps the license surface clean.
 *
 * Capability floor: `dir` resolves against the event cwd and MUST stay inside
 * that subtree — absolute dirs and `..` escapes are rejected with
 * `arg_invalid`. The primitive never writes, never shells out, and never reads
 * file CONTENTS (only directory entry names).
 *
 * Error model: `arg_invalid` on absolute/escaping `dir`. A missing directory
 * is NOT an error — it returns `ok({ exists: false, matches: [] })`, because
 * the gate must treat an absent `docs/research/` as "no artifact". Never throws.
 *
 * `memoizable: false` is load-bearing: disk truth changes within a session
 * (the agent creates the artifact, then the gate must see it), so a memoized
 * result would report a stale "missing" and defeat the relax-after-compliance
 * path.
 *
 * Imports from: node:fs/promises, node:path, zod, ../runtime/result.js.
 * Imported by: src/runtime/bootstrap.ts (registry wiring).
 */
import { z } from 'zod';
import type { FunctionDef } from './registry.js';
export declare const PathExistsArgs: z.ZodObject<{
    /** Directory to scan, relative to the resolved base. Absolute / escaping rejected. */
    dir: z.ZodString;
    /** Basename glob: `*` (any run) and `?` (single char). Matched against entry names. */
    pattern: z.ZodString;
    /**
     * Optional anchor: when set, resolve `dir` against the GIT REPO ROOT of this
     * file (walk up from its dirname to the nearest `.git`), NOT the event cwd.
     * Fixes the cross-repo false-block: a spec written in the planning repo
     * resolves its sibling `docs/research` correctly even when the working cwd
     * is a different (code) repo. Write/Edit always pass an absolute file_path,
     * so the anchor is reliable; falls back to cwd if no repo root is found.
     */
    base_file: z.ZodOptional<z.ZodString>;
}, "strict", z.ZodTypeAny, {
    pattern: string;
    dir: string;
    base_file?: string | undefined;
}, {
    pattern: string;
    dir: string;
    base_file?: string | undefined;
}>;
interface PathExistsResult {
    exists: boolean;
    matches: string[];
}
export declare const PathExists: FunctionDef<z.input<typeof PathExistsArgs>, PathExistsResult>;
export {};
//# sourceMappingURL=path_exists.d.ts.map