Applies GraphPatch modifications atomically to a CompiledExecutionGraph. Checks guardrail thresholds before approving expansions in guardrailed mode.

Constructors

Methods

  • Determine whether an expansion should be auto-approved based on autonomy mode and resource thresholds.

    • autonomous: always approve
    • guided: never auto-approve (requires user input)
    • guardrailed: approve if below all thresholds

    Parameters

    Returns boolean

  • Identify which specific threshold was exceeded. Returns null if no threshold is exceeded.

    Parameters

    • state: ExpansionState

    Returns null | {
        threshold: string;
        value: number;
        cap: number;
    }