framework
Version:
The (AI) Framework: turnkey, zero-config AI orchestration that wraps a coding-agent CLI (Claude Code) as a black box and takes you from an idea to a running app. Vite for AI.
21 lines • 1.28 kB
TypeScript
import { type GitRunner } from './project.js';
import { type LinkedPr } from './dashboard/gh.js';
/** What became of one pinned branch: gone already, genuinely busy, unprovable, or released. */
export type StaleBranchOutcome = 'absent' | 'pending' | 'unproven' | 'released';
/** Injectable seams so the release is unit-testable off disk and off GitHub. */
export interface StaleBranchDeps {
git?: GitRunner;
/** The branch's full PR history (default {@link ghPrsForBranch}). */
prs?: (cwd: string, branch: string) => Promise<LinkedPr[]>;
}
/**
* Delete a pinned routine branch whose PR is closed or merged, so the next firing proceeds.
*
* Deliberately conservative on the two unprovable cases: an open PR keeps the branch (that is a
* triage genuinely pending), and a branch with no PR history at all keeps it too — that is either
* an agent still working toward its handoff or a `gh` that could not answer, and deleting on a
* hiccup would discard work. Never throws: a release that could not happen leaves the routine
* exactly as jammed as it was, which the next tick retries.
*/
export declare function releaseStalePinnedBranch(cwd: string, branch: string, deps?: StaleBranchDeps): Promise<StaleBranchOutcome>;
//# sourceMappingURL=stale-branch.d.ts.map