Interface: PoolCandidateState<TItem>
Defined in: ast/pool-candidate-state.ts:9
Runtime telemetry and rate-limit state for a single candidate item inside a capacity pool.
Provided to custom PoolSelectorFn callbacks so selection strategies can inspect empirical completion rates, usage counts, and rate-limit cooldown timestamps.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TItem | unknown | Pooled resource item type (such as AccountSeatASTNode or ModelASTNode). |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
empiricalSuccessRate | readonly | number | Ratio successCount / sampleCount in [0, 1] (or 1 when sampleCount === 0). | ast/pool-candidate-state.ts:27 |
id | readonly | string | Logical identifier or alias of the candidate item. | ast/pool-candidate-state.ts:15 |
index | readonly | number | Zero-based declaration index of the candidate inside PoolNode.items. | ast/pool-candidate-state.ts:13 |
item | readonly | TItem | Underlying AST node for the pooled candidate item. | ast/pool-candidate-state.ts:11 |
lastUsedAtMs? | readonly | number | Epoch timestamp in milliseconds when this candidate was most recently acquired. | ast/pool-candidate-state.ts:21 |
rateLimitedUntilMs? | readonly | number | Epoch timestamp in milliseconds until which this candidate is rate-limited, if applicable. | ast/pool-candidate-state.ts:17 |
sampleCount | readonly | number | Cumulative number of total attempts recorded for this candidate. | ast/pool-candidate-state.ts:25 |
successCount | readonly | number | Cumulative number of successful completions recorded for this candidate. | ast/pool-candidate-state.ts:23 |
usageCount | readonly | number | Total number of acquisitions served by this candidate in the current runtime. | ast/pool-candidate-state.ts:19 |