UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

24 lines • 1.59 kB
import type { RedirectResult } from '../../../../context/session_context.ts'; import type { ByteSource } from '../../../../io/types.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 { PathSpec } from '../../../../types.ts'; import type { SessionState } from '../../../session/session.ts'; import type { BuiltinCall, ExecuteStringFn } from '../types.ts'; /** * Read a script file and execute it in the calling shell, `name` (`source` * or `.`) as typed. A sourced file is the caller, so whatever it sets stays * set; only the positional parameters come back, which `args` replaces * while it runs. It runs in a frame of its own, which `return` ends, * `FUNCNAME` names `source` and the RETURN action runs in as it returns; a * `break` in it ends a caller's loop. An empty name fails as a missing file * does, and bash blames a file it cannot read on itself, not the builtin. */ export declare function handleSource(dispatch: DispatchFn, executeFn: ExecuteStringFn, path: string | PathSpec, session: SessionState, args?: string[], stdin?: ByteSource | null, callStack?: CallStack | null, sink?: JobConsole, name?: string): Promise<RedirectResult>; /** * The `source` / `.` arm. Positional parameters keep the words as typed, * so a path operand contributes its spelling, not its resolved mount path. */ export declare function sourceBuiltin(call: BuiltinCall): Promise<RedirectResult>; //# sourceMappingURL=source.d.ts.map