UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

26 lines • 2.08 kB
import type { RedirectResult } from '../../context/session_context.ts'; import { type ByteSource } from '../../io/types.ts'; import { type HandOff } from '../../policy/index.ts'; import type { DispatchFn } from '../../runtime/types.ts'; import { CallStack } from '../../shell/call_stack.ts'; import { type JobConsole } from '../../shell/console/index.ts'; import type { JobTable } from '../../shell/job_table/index.ts'; import type { ParseScope } from '../../shell/parse/scope.ts'; import type { TSNodeLike } from '../../shell/types.ts'; import type { EvaluationContext } from '../evaluation.ts'; import type { ExecuteNodeOpts } from '../executor/command/types.ts'; import type { ExecuteFn } from '../expand/types.ts'; import type { Namespace } from '../mount/namespace/namespace.ts'; import type { MountRegistry } from '../mount/registry.ts'; import type { ExpandedWords } from './types.ts'; /** * The aliases the parser takes for a line an alias rewrote. An alias is no * alias inside the text its own expansion produced, so a name spelling a * reserved word is that word there (`alias fi='if :; then :; fi'` closes its * own `if`). The parser takes one set for the line, so a name that stands in * its own text leaves it. Mirrors Python's parser_aliases. */ export declare function parserAliases(line: string, aliases: ReadonlySet<string>, owners: readonly ReadonlySet<string>[]): ReadonlySet<string>; export declare function executeCommand(recurse: (n: TSNodeLike, s: EvaluationContext, i: ByteSource | null, cs: CallStack | null, opts?: ExecuteNodeOpts) => Promise<RedirectResult>, dispatch: DispatchFn, registry: MountRegistry, namespace: Namespace, executeFn: ExecuteFn, node: TSNodeLike, context: EvaluationContext, stdinIn: ByteSource | null, callStack: CallStack | null, jobTable: JobTable | null, signal?: AbortSignal, parser?: ParseScope, handed?: HandOff, sink?: JobConsole, expanded?: ExpandedWords): Promise<RedirectResult>; export declare function unsaid(lines: readonly string[], said: Uint8Array): string[]; //# sourceMappingURL=command_dispatch.d.ts.map