Interface: IReviewSource
Makaio Framework / contracts / IReviewSource
Interface: IReviewSource
Section titled “Interface: IReviewSource”Defined in: ../../../packages/contracts/src/capabilities/review/types.ts:121
Review source capability provider.
Sources handle source-specific I/O: VCS reads, CLI invocation, trigger comments, and rate-limit metadata.
Extends
Section titled “Extends”Properties
Section titled “Properties”capabilities
Section titled “capabilities”
readonlycapabilities:object
Defined in: ../../../packages/contracts/src/capabilities/review/types.ts:129
Source capabilities
canFetch
Section titled “canFetch”canFetch:
boolean
canTrigger
Section titled “canTrigger”canTrigger:
boolean
isPush
Section titled “isPush”isPush:
boolean
capabilityId
Section titled “capabilityId”
readonlycapabilityId:"review-source"
Defined in: ../../../packages/contracts/src/capabilities/review/types.ts:123
Must be ‘review-source’
displayName
Section titled “displayName”
readonlydisplayName:string
Defined in: ../../../packages/contracts/src/capability/types.ts:11
Human-readable name for display in UI
Inherited from
Section titled “Inherited from”ICapabilityProvider.displayName
readonlyid:string
Defined in: ../../../packages/contracts/src/capability/types.ts:9
Unique identifier for this provider instance
Inherited from
Section titled “Inherited from”preferredProcessorKey?
Section titled “preferredProcessorKey?”
readonlyoptionalpreferredProcessorKey?:string
Defined in: ../../../packages/contracts/src/capabilities/review/types.ts:127
Preferred processor key for this source
providerKey?
Section titled “providerKey?”
readonlyoptionalproviderKey?:string
Defined in: ../../../packages/contracts/src/capability/types.ts:17
Stable provider identity used for joins across registries.
Unlike id, this should remain stable across runtime re-registration.
Inherited from
Section titled “Inherited from”ICapabilityProvider.providerKey
reviewer
Section titled “reviewer”
readonlyreviewer:string
Defined in: ../../../packages/contracts/src/capabilities/review/types.ts:125
Reviewer family this source feeds (e.g., ‘coderabbit’)
Methods
Section titled “Methods”fetchSnapshot()?
Section titled “fetchSnapshot()?”
optionalfetchSnapshot(params):Promise<ReviewSourceSnapshot>
Defined in: ../../../packages/contracts/src/capabilities/review/types.ts:145
Fetch raw snapshot from the source.
Parameters
Section titled “Parameters”params
Section titled “params”FetchFindingsParams & ReviewRequestContext
Fetch parameters merged with VCS routing context
Returns
Section titled “Returns”Promise<ReviewSourceSnapshot>
Raw snapshot of source data before processing
getRateLimit()?
Section titled “getRateLimit()?”
optionalgetRateLimit(): {lastUpdatedAt:number;limit:number;remaining:number;resetsAt:number;sourceId:string; } |null
Defined in: ../../../packages/contracts/src/capabilities/review/types.ts:150
Get current rate limit state.
Returns
Section titled “Returns”Current rate limit or null if not applicable
Type Literal
Section titled “Type Literal”{ lastUpdatedAt: number; limit: number; remaining: number; resetsAt: number; sourceId: string; }
lastUpdatedAt
Section titled “lastUpdatedAt”lastUpdatedAt:
number
Epoch ms when this was last updated
limit:
number
Total limit
remaining
Section titled “remaining”remaining:
number
Remaining review triggers
resetsAt
Section titled “resetsAt”resetsAt:
number
Epoch ms when limit resets
sourceId
Section titled “sourceId”sourceId:
string
Source that this rate limit applies to
null
trigger()?
Section titled “trigger()?”
optionaltrigger(params):Promise<ReviewTriggerResult>
Defined in: ../../../packages/contracts/src/capabilities/review/types.ts:139
Trigger a review (e.g., post “@coderabbitai review” comment).
Parameters
Section titled “Parameters”params
Section titled “params”ReviewTriggerParams & ReviewRequestContext
Trigger parameters merged with VCS routing context
Returns
Section titled “Returns”Promise<ReviewTriggerResult>
Result indicating whether the trigger succeeded
validate()?
Section titled “validate()?”
optionalvalidate():Promise<{error?:string;valid:boolean; }>
Defined in: ../../../packages/contracts/src/capability/types.ts:22
Optional validation method to check provider configuration/credentials.
Returns
Section titled “Returns”Promise<{ error?: string; valid: boolean; }>
Validation result with optional error message