@usine/orchestrator/polling-triggers
Classes
Section titled “Classes”PollCycle
Section titled “PollCycle”Outcomes of one poll over all managed repositories, including isolated failures and backoff.
Extends
Section titled “Extends”Schema.Class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new PollCycle(…
args):PollCycle
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[props: object, options?: MakeOptions] |
Returns
Section titled “Returns”Properties
Section titled “Properties”changedItems
Section titled “changedItems”
readonlychangedItems:number
failures
Section titled “failures”
readonlyfailures: readonlyRepositoryPollFailure[]
nextPollAt
Section titled “nextPollAt”
readonlynextPollAt:Option<Utc>
preflightFindings
Section titled “preflightFindings”
readonlypreflightFindings: readonlyLabelPreflightFinding[]
repositories
Section titled “repositories”
readonlyrepositories:number
revokedRuns
Section titled “revokedRuns”
readonlyrevokedRuns:number
How many Runs this cycle revoked because their item stopped matching.
submissions
Section titled “submissions”
readonlysubmissions: readonly (Claimed|Queued|Ignored|CycleBlocked)[]
PollingTriggers
Section titled “PollingTriggers”Keeps managed repositories’ Boards current and evaluates their active Loops against changed Items.
Extends
Section titled “Extends”Context.ServiceClass
Properties
Section titled “Properties”Service
Section titled “Service”
readonlyService:object
The service’s operations: what yield* PollingTriggers returns.
readonlyhint: (repository,item,backoffUntil?) =>Effect.Effect<void>
Nudges an authoritative Item fetch after a self-write, retaining any request backoff from the writer. Pending duplicates coalesce; polling repairs loss.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
repository |
RepositoryName |
item |
ChangedItem |
backoffUntil? |
Option.Option<DateTime.Utc> |
Returns
Section titled “Returns”Effect.Effect<void>
latest
Section titled “latest”
readonlylatest:Effect.Effect<Option.Option<PollCycle>>
The last completed cycle, including its isolated failures; absent until the first cycle completes.
readonlypoll: (instance) =>Effect.Effect<PollCycle,EnginePersistenceError>
Polls every managed repository, including those without active Loops.
Label preflight precedes change detection; each changed Item is projected
before its Run decisions. Known open pull requests are fetched again every
cycle, changed or not, so mergeability that moves without an Item update
still reaches the Board and Loops; changedItems counts detection only.
A repository commits its cursor only after all Items finish. Repository
failures are reported while siblings continue; failure to read Loop
runtime state fails the whole cycle.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
instance |
LoadedInstance |
Returns
Section titled “Returns”Effect.Effect<PollCycle, EnginePersistenceError>
readonlyrun: (instance) =>Effect.Effect<never>
Repeats cycles at the configured interval and processes self-write Hints, respecting GitHub request backoff.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
instance |
LoadedInstance |
Returns
Section titled “Returns”Effect.Effect<never>
readonlystaticlayer:Layer<PollingTriggers,never,ConfigParser|ExpressionEngine|CycleBudgets|RunEngine|CursorStore|ItemProjectionWriter|LoopControl|RepositoryLabelProjectionReader|RepositoryLabelProjectionWriter|GitHubPolling|LabelReconciler>
RepositoryPollFailure
Section titled “RepositoryPollFailure”One repository whose cycle failed; its siblings finished normally.
Extends
Section titled “Extends”Schema.Class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new RepositoryPollFailure(…
args):RepositoryPollFailure
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[props: object, options?: MakeOptions] |
Returns
Section titled “Returns”Properties
Section titled “Properties”errorTag
Section titled “errorTag”
readonlyerrorTag:string
message
Section titled “message”
readonlymessage:string
repository
Section titled “repository”
readonlyrepository:string&Brand<"RepositoryName">
Variables
Section titled “Variables”GitHubItemKey
Section titled “GitHubItemKey”
constGitHubItemKey:Schema.compose<Schema.fromJsonString<Schema.Tuple<readonly [Schema.Literal<"github">,Schema.brand<Schema.String,"RepositoryName">,Schema.brand<Schema.Int,"ItemNumber">]>>,Schema.toType<Schema.brand<Schema.NonEmptyString,"ItemKey">>>
Identifies one GitHub issue or pull request across its changing snapshots. Encoding uses the canonical repository name and Item number; decoding lets Board consumers locate the Item associated with a Run. Schedule Runs identify the repository alone and do not decode as an Item.