@struktoai/mirage-core
Version:
A Unified Virtual Filesystem For AI Agents
20 lines • 1.29 kB
TypeScript
import type { ExecuteFn } from './types.ts';
import type { EvaluationContext } from '../evaluation.ts';
import type { SessionView } from '../../view/types.ts';
import type { CallStack } from '../../shell/call_stack.ts';
import type { PathSpec } from '../../types.ts';
import type { MountRegistry } from '../mount/registry.ts';
import type { TSNodeLike } from '../../shell/types.ts';
/**
* Expand parsed child nodes to words that still know their quoting.
*
* Each node expands to its pieces, which IFS then splits into fields, so
* an unquoted expansion anywhere in a word splits (`q$x` too) and quoted
* text never does. A glob character quoting made literal travels under its
* own mark, so `"/data/"*.txt` still globs while `'/data/*'.txt` does not
* and `'/data/*'?.txt` globs on the `?` alone; `unmarkGlobs` takes the
* marks off.
*/
export declare function expandWords(parts: TSNodeLike[], context: EvaluationContext, executeFn: ExecuteFn, callStack?: CallStack | null, view?: SessionView): Promise<string[]>;
export declare function expandAndClassify(words: TSNodeLike[], context: EvaluationContext, executeFn: ExecuteFn, registry: MountRegistry, cwd: string, callStack?: CallStack | null, view?: SessionView): Promise<(string | PathSpec)[]>;
//# sourceMappingURL=parts.d.ts.map