@vite-hub/presets 0.3.1 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -643,8 +643,8 @@ declare class PullRequestInbox {
643
643
  metaNumber(key: string): Promise<number | undefined>;
644
644
  /** Metadata entries whose keys start with `prefix`. */
645
645
  metaEntries(prefix: string): Promise<Array<[string, unknown]>>;
646
- deleteMeta(key: string): Promise<void>;
647
- setMeta(key: string, value: unknown): Promise<void>;
646
+ deleteMeta(key: string, signal?: AbortSignal): Promise<void>;
647
+ setMeta(key: string, value: unknown, signal?: AbortSignal): Promise<void>;
648
648
  private enqueueStatusResult;
649
649
  private statusWritersIn;
650
650
  private settleStatusWriterIn;
@@ -662,7 +662,7 @@ declare class PullRequestInbox {
662
662
  reconcileSettledStatusWriter(observed: StatusDelivery): Promise<boolean>;
663
663
  private reconcileStatusWriterIn;
664
664
  /** Upgrade historical waiting results without synthetic webhooks or model passes. */
665
- backfillStatusDeliveries(): Promise<void>;
665
+ backfillStatusDeliveries(signal?: AbortSignal): Promise<void>;
666
666
  recordWorkerBlocker(observed: Snapshot, revision: string): Promise<void>;
667
667
  /** Wake and persist its release marker atomically, so restart cannot repeat the wake. */
668
668
  wakeForWorkerRelease(observed: Snapshot, revision: string, evidenceKey: string): Promise<boolean>;
@@ -695,16 +695,17 @@ declare class PullRequestInbox {
695
695
  /** Whether the PR's head branch starts with `mainRepairBranchPrefix`. */
696
696
  isMainRepair(pr: GitHubPullRequestRecord | null | undefined): boolean;
697
697
  eligible(repository: string, pr: GitHubPullRequestRecord | null): boolean;
698
- seed(repository: string, value: unknown): Promise<Snapshot>;
699
- ingest(id: string, event: string, value: unknown): Promise<GitHubInboxDeliveryResult>;
698
+ seed(repository: string, value: unknown, signal?: AbortSignal): Promise<Snapshot>;
699
+ ingest(id: string, event: string, value: unknown, signal?: AbortSignal): Promise<GitHubInboxDeliveryResult>;
700
700
  /** Leases up to `limit` eligible PRs. `skip` leaves a candidate unclaimed for this call. */
701
701
  claim(limit: number, options?: {
702
702
  only?: (snapshot: Snapshot) => boolean;
703
703
  skip?: (snapshot: Snapshot) => boolean;
704
704
  includeBlocked?: boolean;
705
+ signal?: AbortSignal;
705
706
  }): Promise<Claim[]>;
706
707
  hydrate(claim: Claim, patch: SnapshotPatch): Promise<boolean>;
707
- refreshThreads(observed: Snapshot, threads: GitHubReviewThread[]): Promise<boolean>;
708
+ refreshThreads(observed: Snapshot, threads: GitHubReviewThread[], signal?: AbortSignal): Promise<boolean>;
708
709
  /** Retain a worker's verified thread resolution even when its webhook is missing. */
709
710
  recordThreadResolution(claim: Claim, id: string, observed: Snapshot): Promise<boolean>;
710
711
  /** Retain CI for an exact candidate before its source-push webhook arrives. This is not a publication receipt. */
@@ -758,17 +759,18 @@ declare class PullRequestInbox {
758
759
  /** Waiting PRs that received events since the host last evaluated their wait. */
759
760
  waitsToEvaluate(includeExternal?: boolean, includeIdle?: boolean): Promise<Snapshot[]>;
760
761
  /** Records that the host evaluated a wait's new events and the wait still holds. */
761
- acknowledgeWait(observed: Snapshot): Promise<boolean>;
762
+ acknowledgeWait(observed: Snapshot, signal?: AbortSignal): Promise<boolean>;
762
763
  /** Re-evaluate structured evidence outside an Agent invocation before calling this method. */
763
764
  wake(observed: Snapshot, evidenceKey: string, options?: {
764
765
  recovery?: boolean;
766
+ signal?: AbortSignal;
765
767
  }): Promise<boolean>;
766
768
  /**
767
769
  * Frees every lease in this scope at startup and returns how many were held. Call it only when one
768
770
  * process owns the scope: a pass cannot survive a restart, so its lease only delays the PR.
769
771
  */
770
772
  releaseLeases(): Promise<number>;
771
- recoverLeases(): Promise<void>;
773
+ recoverLeases(signal?: AbortSignal): Promise<void>;
772
774
  summary(): Promise<GitHubInboxSummary[]>;
773
775
  /** The open, unleased PR that a reconciliation probe checked longest ago, with that probe time. */
774
776
  nextProbe(): Promise<{
@@ -788,9 +790,10 @@ declare class PullRequestInbox {
788
790
  deliveries: number;
789
791
  }>;
790
792
  /** Drops delivery payloads after `payloadMs` and delivery IDs after `idMs`. Recent IDs still deduplicate redeliveries. */
791
- pruneDeliveries({ payloadMs, idMs }?: {
793
+ pruneDeliveries({ payloadMs, idMs, signal }?: {
792
794
  payloadMs?: number;
793
795
  idMs?: number;
796
+ signal?: AbortSignal;
794
797
  }): Promise<void>;
795
798
  }
796
799
  //#endregion
@@ -824,7 +827,7 @@ interface BabysitterAdmissionOptions {
824
827
  * Extra check before each claim, for example a provider quota. Return a pause to stop model
825
828
  * passes, or `undefined` to continue. An error is reported in health and does not pause.
826
829
  */
827
- check?: () => BabysitterAdmissionPause | undefined | Promise<BabysitterAdmissionPause | undefined>;
830
+ check?: (signal?: AbortSignal) => BabysitterAdmissionPause | undefined | Promise<BabysitterAdmissionPause | undefined>;
828
831
  }
829
832
  /** Token limits are best-effort retained-journal thresholds, not billing caps. */
830
833
  interface BabysitterAdmissionLimits {