Variable INITIAL_STATEConst
INITIAL_STATE: {
activeIssues: {
createdAt: string;
id: number;
labels: string[];
number: number;
repo: string;
status: "candidate" | "claimed" | "in_progress" | "pr_submitted";
title: string;
updatedAt: string;
url: string;
vetted: boolean;
vettingResult?: {
checks: {
clearRequirements: boolean;
contributionGuidelinesFound: boolean;
noExistingPR: boolean;
notClaimed: boolean;
projectActive: boolean;
};
contributionGuidelines?: {
branchNamingConvention?: string;
claRequired?: boolean;
commitMessageFormat?: string;
formatter?: string;
issueClaimProcess?: string;
linter?: string;
prTitleFormat?: string;
rawContent?: string;
requiredChecks?: string[];
reviewProcess?: string;
styleGuideUrl?: string;
testCoverageRequired?: boolean;
testFileNaming?: string;
testFramework?: string;
};
notes: string[];
passedAllChecks: boolean;
};
}[];
analyzedIssueConversations?: {
analyzedAt: string;
repo: string;
url: string;
}[];
closedPRs?: {
closedAt: string;
commentsFetchedAt?: string;
learningsExtractedAt?: string;
title: string;
url: string;
}[];
config: {
aiPolicyBlocklist: string[];
approachingDormantDays: number;
autoFormatBeforePush: boolean;
diffTool: "inline"
| "custom"
| "sourcetree"
| "vscode";
diffToolCustomCommand?: string;
dismissedIssues: Record<string, string>;
dormantThresholdDays: number;
excludeOrgs?: string[];
excludeRepos: string[];
githubUsername: string;
healthCheckFreshnessMinutes: number;
includeDocIssues: boolean;
issueListPath?: string;
labels: string[];
languages: string[];
localRepoScanPaths?: string[];
maxActivePRs: number;
maxIssueAgeDays: number;
minRepoScoreThreshold: number;
minStars: number;
persistence: "local" | "gist";
preferredOrgs: string[];
projectCategories: (
| "nonprofit"
| "devtools"
| "infrastructure"
| "web-frameworks"
| "data-ml"
| "education"
)[];
reviewMaxPasses?: number;
scope?: ("advanced" | "beginner" | "intermediate")[];
setupComplete: boolean;
setupCompletedAt?: string;
shelvedPRUrls: string[];
skippedIssuesPath?: string;
slmTriageHost: string;
slmTriageModel: string;
squashByDefault: boolean | "ask";
starredRepos: string[];
starredReposLastFetched?: string;
statusOverrides?: Record<
string,
{
lastActivityAt: string;
setAt: string;
status: "needs_addressing"
| "waiting_on_maintainer";
},
>;
trustedProjects: string[];
};
gistId?: string;
lastDigest?: {
autoUnshelvedPRs: {
daysSinceActivity: number;
number: number;
repo: string;
status: "needs_addressing"
| "waiting_on_maintainer";
title: string;
url: string;
}[];
generatedAt: string;
needsAddressingPRs: any[];
openPRs: any[];
recentlyClosedPRs: {
closedAt: string;
closedBy?: string;
number: number;
repo: string;
title: string;
url: string;
}[];
recentlyMergedPRs: {
mergedAt: string;
number: number;
repo: string;
title: string;
url: string;
}[];
shelvedPRs: {
daysSinceActivity: number;
number: number;
repo: string;
status: "needs_addressing"
| "waiting_on_maintainer";
title: string;
url: string;
}[];
summary: {
mergeRate: number;
totalActivePRs: number;
totalMergedAllTime: number;
totalNeedingAttention: number;
};
waitingOnMaintainerPRs: any[];
};
lastDigestAt?: string;
lastRunAt: string;
lastStrategyAt?: string;
localRepoCache?: {
cachedAt: string;
repos: Record<
string,
{ currentBranch: string
| null; exists: boolean; path: string },
>;
scanPaths: string[];
};
mergedPRs?: {
commentsFetchedAt?: string;
learningsExtractedAt?: string;
mergedAt: string;
title: string;
url: string;
}[];
monthlyClosedCounts?: Record<string, number>;
monthlyMergedCounts?: Record<string, number>;
monthlyOpenedCounts?: Record<string, number>;
prFollowUpHistory?: Record<
string,
{
draftPath?: string;
tier: "light_check_in"
| "direct_check_in"
| "final_check_in";
timestamp: string;
}[],
>;
repoScores: Record<
string,
{
avgResponseDays: number
| null;
closedWithoutMergeCount: number;
language?: string | null;
lastEvaluatedAt: string;
lastMergedAt?: string;
mergedPRCount: number;
repo: string;
score: number;
signals: {
hasActiveMaintainers: boolean;
hasHostileComments: boolean;
isResponsive: boolean;
};
stargazersCount?: number;
},
>;
version: 4;
workflowState?: {
branchName?: string;
completedSteps: string[];
currentStep: string;
issueContext?: { title: string; url: string };
lastUpdatedAt: string;
stepData: Record<string, unknown>;
workflowName: "draft-first" | "work-through-issues" | "pre-commit-review";
};
} = ...
Type Declaration
activeIssues: {
createdAt: string;
id: number;
labels: string[];
number: number;
repo: string;
status: "candidate" | "claimed" | "in_progress" | "pr_submitted";
title: string;
updatedAt: string;
url: string;
vetted: boolean;
vettingResult?: {
checks: {
clearRequirements: boolean;
contributionGuidelinesFound: boolean;
noExistingPR: boolean;
notClaimed: boolean;
projectActive: boolean;
};
contributionGuidelines?: {
branchNamingConvention?: string;
claRequired?: boolean;
commitMessageFormat?: string;
formatter?: string;
issueClaimProcess?: string;
linter?: string;
prTitleFormat?: string;
rawContent?: string;
requiredChecks?: string[];
reviewProcess?: string;
styleGuideUrl?: string;
testCoverageRequired?: boolean;
testFileNaming?: string;
testFramework?: string;
};
notes: string[];
passedAllChecks: boolean;
};
}[]
OptionalanalyzedIssueConversations?: { analyzedAt: string; repo: string; url: string }[]
OptionalclosedPRs?: {
closedAt: string;
commentsFetchedAt?: string;
learningsExtractedAt?: string;
title: string;
url: string;
}[]
config: {
aiPolicyBlocklist: string[];
approachingDormantDays: number;
autoFormatBeforePush: boolean;
diffTool: "inline" | "custom" | "sourcetree" | "vscode";
diffToolCustomCommand?: string;
dismissedIssues: Record<string, string>;
dormantThresholdDays: number;
excludeOrgs?: string[];
excludeRepos: string[];
githubUsername: string;
healthCheckFreshnessMinutes: number;
includeDocIssues: boolean;
issueListPath?: string;
labels: string[];
languages: string[];
localRepoScanPaths?: string[];
maxActivePRs: number;
maxIssueAgeDays: number;
minRepoScoreThreshold: number;
minStars: number;
persistence: "local" | "gist";
preferredOrgs: string[];
projectCategories: (
| "nonprofit"
| "devtools"
| "infrastructure"
| "web-frameworks"
| "data-ml"
| "education"
)[];
reviewMaxPasses?: number;
scope?: ("advanced" | "beginner" | "intermediate")[];
setupComplete: boolean;
setupCompletedAt?: string;
shelvedPRUrls: string[];
skippedIssuesPath?: string;
slmTriageHost: string;
slmTriageModel: string;
squashByDefault: boolean | "ask";
starredRepos: string[];
starredReposLastFetched?: string;
statusOverrides?: Record<
string,
{
lastActivityAt: string;
setAt: string;
status: "needs_addressing"
| "waiting_on_maintainer";
},
>;
trustedProjects: string[];
}
aiPolicyBlocklist: string[]
approachingDormantDays: number
autoFormatBeforePush: boolean
diffTool: "inline" | "custom" | "sourcetree" | "vscode"
OptionaldiffToolCustomCommand?: string
dismissedIssues: Record<string, string>
dormantThresholdDays: number
OptionalexcludeOrgs?: string[]
excludeRepos: string[]
githubUsername: string
healthCheckFreshnessMinutes: number
includeDocIssues: boolean
OptionalissueListPath?: string
labels: string[]
languages: string[]
OptionallocalRepoScanPaths?: string[]
maxActivePRs: number
maxIssueAgeDays: number
minRepoScoreThreshold: number
minStars: number
persistence: "local" | "gist"
preferredOrgs: string[]
projectCategories: (
| "nonprofit"
| "devtools"
| "infrastructure"
| "web-frameworks"
| "data-ml"
| "education"
)[]
OptionalreviewMaxPasses?: number
Optionalscope?: ("advanced" | "beginner" | "intermediate")[]
setupComplete: boolean
OptionalsetupCompletedAt?: string
shelvedPRUrls: string[]
OptionalskippedIssuesPath?: string
slmTriageHost: string
slmTriageModel: string
squashByDefault: boolean | "ask"
starredRepos: string[]
OptionalstarredReposLastFetched?: string
OptionalstatusOverrides?: Record<
string,
{
lastActivityAt: string;
setAt: string;
status: "needs_addressing"
| "waiting_on_maintainer";
},
>
trustedProjects: string[]
OptionalgistId?: string
OptionallastDigest?: {
autoUnshelvedPRs: {
daysSinceActivity: number;
number: number;
repo: string;
status: "needs_addressing" | "waiting_on_maintainer";
title: string;
url: string;
}[];
generatedAt: string;
needsAddressingPRs: any[];
openPRs: any[];
recentlyClosedPRs: {
closedAt: string;
closedBy?: string;
number: number;
repo: string;
title: string;
url: string;
}[];
recentlyMergedPRs: {
mergedAt: string;
number: number;
repo: string;
title: string;
url: string;
}[];
shelvedPRs: {
daysSinceActivity: number;
number: number;
repo: string;
status: "needs_addressing"
| "waiting_on_maintainer";
title: string;
url: string;
}[];
summary: {
mergeRate: number;
totalActivePRs: number;
totalMergedAllTime: number;
totalNeedingAttention: number;
};
waitingOnMaintainerPRs: any[];
}
OptionallastDigestAt?: string
lastRunAt: string
OptionallastStrategyAt?: string
OptionallocalRepoCache?: {
cachedAt: string;
repos: Record<
string,
{ currentBranch: string
| null; exists: boolean; path: string },
>;
scanPaths: string[];
}
OptionalmergedPRs?: {
commentsFetchedAt?: string;
learningsExtractedAt?: string;
mergedAt: string;
title: string;
url: string;
}[]
OptionalmonthlyClosedCounts?: Record<string, number>
OptionalmonthlyMergedCounts?: Record<string, number>
OptionalmonthlyOpenedCounts?: Record<string, number>
OptionalprFollowUpHistory?: Record<
string,
{
draftPath?: string;
tier: "light_check_in"
| "direct_check_in"
| "final_check_in";
timestamp: string;
}[],
>
repoScores: Record<
string,
{
avgResponseDays: number
| null;
closedWithoutMergeCount: number;
language?: string | null;
lastEvaluatedAt: string;
lastMergedAt?: string;
mergedPRCount: number;
repo: string;
score: number;
signals: {
hasActiveMaintainers: boolean;
hasHostileComments: boolean;
isResponsive: boolean;
};
stargazersCount?: number;
},
>
version: 4
OptionalworkflowState?: {
branchName?: string;
completedSteps: string[];
currentStep: string;
issueContext?: { title: string; url: string };
lastUpdatedAt: string;
stepData: Record<string, unknown>;
workflowName: "draft-first" | "work-through-issues" | "pre-commit-review";
}
Initial state written to
~/.oss-autopilot/state.jsonon first run. Uses v4 architecture.