import type { ClaudeTokenUsage } from '../entities/ClaudeTokenUsage'; import type { Issue } from '../entities/Issue'; import { Sleep } from '../services/commentCreateWithDedupRetry'; import type { AgentDefinitionRepository } from './adapter-interfaces/AgentDefinitionRepository'; import type { ClaudeTokenUsageRepository } from './adapter-interfaces/ClaudeTokenUsageRepository'; import type { GitHubGraphqlRateLimitRepository } from './adapter-interfaces/GitHubGraphqlRateLimitRepository'; import type { IssueLatestSessionBranchRepository } from './adapter-interfaces/IssueLatestSessionBranchRepository'; import type { IssueRepository, RelatedPullRequest } from './adapter-interfaces/IssueRepository'; import type { LocalCommandRunner } from './adapter-interfaces/LocalCommandRunner'; import type { ProjectRepository } from './adapter-interfaces/ProjectRepository'; import type { TakeOwnershipSpawnRepository } from './adapter-interfaces/TakeOwnershipSpawnRepository'; export declare const NORMAL_CONCURRENT_LIMIT = 6; export declare const SPAWN_CANDIDATE_BRANCH_SOURCE_CONCURRENCY = 8; export declare const DEFAULT_MINIMUM_ISSUE_AGE_MS: number; export type SpawnCandidateExclusionReason = 'dependedIssueUrls' | 'recentlyCreated' | 'futureNextActionDate' | 'nextActionHourNotReached' | 'authorNotAllowed' | 'notAssignedToManager'; export type SpawnCandidateBranchSource = { openPullRequest: RelatedPullRequest | null; relatedOpenPullRequests: RelatedPullRequest[]; }; export declare const agentNameFromDesignation: (designation: string) => string; export type RotationOrderEntry = { name: string; fiveHourUtilization: number; blocked: boolean; rejected: boolean; thresholdExcluded: boolean; cooldownExcluded: boolean; }; export declare class StartPreparationUseCase { private readonly projectRepository; private readonly issueRepository; private readonly localCommandRunner; private readonly claudeTokenUsageRepository; private readonly takeOwnershipSpawnRepository; private readonly gitHubGraphqlRateLimitRepository; private readonly issueLatestSessionBranchRepository; private readonly sleep; private readonly agentDefinitionRepository; constructor(projectRepository: Pick, issueRepository: Pick, localCommandRunner: LocalCommandRunner, claudeTokenUsageRepository: ClaudeTokenUsageRepository, takeOwnershipSpawnRepository: TakeOwnershipSpawnRepository, gitHubGraphqlRateLimitRepository: GitHubGraphqlRateLimitRepository, issueLatestSessionBranchRepository: IssueLatestSessionBranchRepository, sleep?: Sleep, agentDefinitionRepository?: AgentDefinitionRepository); private createCommentByUrlWithDedup; private isWithinCooldown; private isModelWeeklyLimitRejected; private selectModelForToken; private secondsUntilSevenDayReset; private compareBySevenDayDeadlineThenUtilization; private taperedConcurrentLimit; getTokenConcurrentLimit: (fiveHourUtilization: number, sevenDayUtilization: number, selectionWeight?: number, normalConcurrentLimit?: number) => number; spawnCandidateExclusionReasonOf: (issue: Issue, allowedIssueAuthors: string[] | null, manager: string, now: Date, minimumIssueAgeMs?: number) => SpawnCandidateExclusionReason | null; private selectEligibleUnstoriedIssue; private buildIssueUrlsWithOpenPrs; fetchSpawnCandidateBranchSources: (issueUrls: string[], issueUrlsWithKnownOpenPrs: ReadonlySet) => Promise>; private selectRotationTokens; buildRotationOrder: (tokenUsages: ClaudeTokenUsage[], utilizationPercentageThreshold: number) => RotationOrderEntry[]; private moveDisabledStoryIssueToIcebox; run: (params: { projectUrl: string; defaultAgentName: string; defaultLlmModelName: string | null; defaultLlmAgentName: string | null; configFilePath: string; maximumPreparingIssuesCount: number | null; utilizationPercentageThreshold: number; allowedIssueAuthors: string[] | null; manager: string; codexHomeCandidates: string[] | null; labelsAsLlmAgentName: string[] | null; agents?: string[] | null; llmModelNameByAgentName?: Record | null; normalConcurrentLimit?: number; maxConcurrentWorkers?: number | null; graphqlRateLimitFloor?: number | null; minimumIssueAgeMs?: number; }) => Promise<{ rotationOrder: RotationOrderEntry[] | null; }>; } //# sourceMappingURL=StartPreparationUseCase.d.ts.map