UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

21 lines • 784 B
import { ExecutionFrame } from "./frame.js"; /** One evaluator's state, separate from the session stored by its manager. */ export class EvaluationContext { session; frame; parent; constructor(session, frame = new ExecutionFrame(), parent = null) { this.session = session; this.frame = frame; this.parent = parent; } /** An evaluation on a fork of this session: a job or a stage. */ fork() { return new EvaluationContext(this.session.fork(), this.frame.fork(), this); } } /** A child shell's evaluation: the session's subshell and a new frame. */ export function childContext(context) { return new EvaluationContext(context.session.subshell(), context.frame.fork(), context); } //# sourceMappingURL=evaluation.js.map