UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

23 lines • 1.47 kB
import type { RedirectResult } from '../../../../context/session_context.ts'; import type { DispatchFn } from '../../../../runtime/types.ts'; import type { PathSpec } from '../../../../types.ts'; import type { SessionView } from '../../../../view/types.ts'; import type { Namespace } from '../../../mount/namespace/namespace.ts'; import type { SessionState } from '../../../session/session.ts'; import type { BuiltinCall } from '../types.ts'; import type { AdmitTest, CondNode } from './types.ts'; /** * Evaluate test/[ (flat argv) or [[ (condition tree). `name` is the * invocation spelling used in diagnostics: "test", "[", or "[[". * * `[ ]` and `[[ ]]` are the shell's own tests, which no command gate * admitted, so each is admitted here by its own name on what it tests * (`admit`), read as every reader of the line reads it (`readsOfTest`): * `[`'s whole argv before it runs, each `[[` leaf as it is reached. A * refusal is the test's answer, as it is `test`'s. `admit` is absent where * the command was admitted already. */ export declare function handleTest(dispatch: DispatchFn, namespace: Namespace, args: (string | PathSpec)[] | CondNode, session: SessionState, name?: string, view?: SessionView, admit?: AdmitTest, signal?: AbortSignal): Promise<RedirectResult>; /** The `test` / `[` / `[[` arm; `[` must close with `]`. */ export declare function testBuiltin(call: BuiltinCall): Promise<RedirectResult>; //# sourceMappingURL=condition.d.ts.map