CoAgent8 - Source API
    Preparing search index...

    Function inspectQuota

    • Reads agy's measured quota with /usage, which makes no model call.

      Parameters

      • Optionalprobe: AdapterProbeResult

        An installed probe result; nothing is read without one.

      • Optionalcontext: BackendReadContext

        Optional cancellation and deadline context (EXEC-001-T08e).

      Returns Promise<
          | {
              buckets?: {
                  id: string;
                  name: string;
                  remainingFraction: number;
                  resetTime: string;
                  window: string;
              }[];
              headroomPercent?: number
              | null;
              measured: boolean;
              resetsAt?: string | null;
              usedPercent?: number | null;
              window?: string;
          }
          | undefined,
      >

      The measured quota, or undefined when agy does not report one.

      Runs only from quota inspection (doctor), never on the request path, and with the same --sandbox as every other agy launch.