import { chargeGovernorBudgetViaAppRuntime, type WorkerRuntimeApiContext, } from '../app-runtime-api'; import { BlockReservingBudgetStateBackend } from './block-reserving-budget-state-backend'; export class AppRuntimeBudgetStateBackend extends BlockReservingBudgetStateBackend { constructor( context: WorkerRuntimeApiContext, schedulerSchema?: string | null, ) { super( async (input) => await chargeGovernorBudgetViaAppRuntime(context, { rootRunId: input.rootRunId, reservationId: input.reservationId, charges: [...input.charges], schedulerSchema: schedulerSchema ?? null, }), ); } }