@struktoai/mirage-core
Version:
A Unified Virtual Filesystem For AI Agents
29 lines • 1.58 kB
TypeScript
import type { NOOPAccessor } from '../../../../accessor/base.ts';
import type { FlagView } from '../../../spec/flag_view.ts';
import type { CLIVerbFn } from '../../types.ts';
import { type Repo } from './repo.ts';
import type { ReadOnlyRefusal } from './types.ts';
import type { Context } from '../../../config.ts';
/** The refusal of every verb whose first write is the index's. */
export declare const indexLocked: ReadOnlyRefusal;
/**
* A git verb whose fatal errors are rendered as git renders them (`fatal`), so
* no verb catches a `GitError` to render it; whose `refname is ambiguous`
* warnings reach stderr ahead of what the verb says; and whose refusal by a
* read-only mount is in git's words. Mirrors Python's `verb`.
*/
export declare function verb(fn: CLIVerbFn<NOOPAccessor>, refused?: ReadOnlyRefusal | null): CLIVerbFn<NOOPAccessor>;
/**
* Discover and open the repository a verb was invoked against.
*
* Every verb starts the same way: honor `-C`, walk up to the mount root looking
* for a `.git`, then open the object database across the dispatcher. Kept in one
* place so a new verb inherits the discovery rules rather than restating them.
*
* @param ctx the line's context, one field per state plane
* @param fl the leaf's flag bag, read for `-C`, `--git-dir` and `--work-tree`
* @param workTree the verb reads or writes working files, so there must be a
* work tree to enter, as git's `NEED_WORK_TREE` asks
*/
export declare function opened(ctx: Context, fl: FlagView, workTree?: boolean): Promise<Repo>;
//# sourceMappingURL=session.d.ts.map