UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

34 lines • 2.6 kB
import type { RedirectResult } from '../../context/session_context.ts'; import type { ByteSource } from '../../io/types.ts'; import type { Decisions } from '../../policy/decisions.ts'; import type { HandOff } from '../../policy/types.ts'; import type { ProcessTable } from '../../process/table.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 { TSNodeLike } from '../../shell/types.ts'; import { type EvaluationContext } from '../evaluation.ts'; import type { ExecuteFn } from '../expand/types.ts'; import type { ExecuteStringFn } from './builtins/types.ts'; import type { ExecuteNodeFn } from './command/types.ts'; export declare function handlePipe(executeNode: ExecuteNodeFn, commands: readonly TSNodeLike[], stderrFlags: readonly boolean[], context: EvaluationContext, stdin?: ByteSource | null, callStack?: CallStack | null, signal?: AbortSignal, processes?: ProcessTable, executeFn?: ExecuteFn | null, bufferBytes?: number, sink?: JobConsole): Promise<RedirectResult>; /** * Handle `&&` and `||`. The left command runs where `set -e` is ignored. * The right one is the list's own: the ERR action is armed as it starts * and answers its failure, which the statement holding the list then does * not. Mirrors Python's handle_connection. */ export declare function handleConnection(executeNode: ExecuteNodeFn, left: TSNodeLike, op: string | null, right: TSNodeLike, context: EvaluationContext, stdin?: ByteSource | null, callStack?: CallStack | null, executeFn?: ExecuteStringFn | null): Promise<RedirectResult>; /** * Run a subshell's body in the child shell its caller made. * * `body` is ALL subshell children, including the `&` tokens that mark * background statements (named-only lists would run `a & b` * synchronously and never set `$!`). Background jobs live in the * subshell's private `jobTable` (bash forks: the parent's table never * sees them), and `executeNode` is bound to that same table so * `wait`/`kill`/`jobs` inside the body resolve against it. */ export declare function handleSubshell(executeNode: ExecuteNodeFn, body: readonly TSNodeLike[], context: EvaluationContext, stdin?: ByteSource | null, callStack?: CallStack | null, jobTable?: JobTable | null, dispatch?: DispatchFn, handed?: HandOff | null, decisions?: Decisions | null, sink?: JobConsole | null, executeFn?: ExecuteFn | null): Promise<RedirectResult>; //# sourceMappingURL=pipes.d.ts.map