@struktoai/mirage-core
Version:
A Unified Virtual Filesystem For AI Agents
22 lines • 1.15 kB
TypeScript
import type { Occurrence } from '../../policy/types.ts';
/** Copy portable function definitions without parsing or executing them. */
export declare function functionSources(value?: unknown): Record<string, string>;
/**
* Where a function was defined, for the source it was defined as. The
* body is parsed again from that source at every call, so its own rows
* and offsets start at zero; the site puts them back where the
* definition stood. A site whose source no longer matches the table (a
* checkout, a stored session) is not the function's. `mark` is the parse
* and row the body reads aliases at; `origin` the definition's place on
* its line, which the body's approvals stand under, null outside a line;
* `aliases` the aliases the body runs, as its definition saw them
* (`aliasView`), absent or null to read them as they are when it runs.
* Mirrors Python's FunctionSite.
*/
export interface FunctionSite {
readonly source: string;
readonly mark: readonly [number, number];
readonly origin: Occurrence | null;
readonly aliases?: Readonly<Record<string, string>> | null;
}
//# sourceMappingURL=functions.d.ts.map