@kynver-app/runtime 0.1.152 → 0.1.154
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { PrHandoffExec } from "./pr-handoff-gh.js";
|
|
2
|
+
export interface TaskOpenPrRow {
|
|
3
|
+
url: string;
|
|
4
|
+
number: number;
|
|
5
|
+
headRefName: string;
|
|
6
|
+
createdAt: string;
|
|
7
|
+
}
|
|
8
|
+
/** Worker/branch suffix shared across harness retry attempts for one AgentOS task. */
|
|
9
|
+
export declare function buildTaskWorkerBranchSuffix(taskId: string): string;
|
|
10
|
+
export declare function prRowMatchesTask(row: {
|
|
11
|
+
body?: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
headRefName: string;
|
|
14
|
+
}, taskId: string): boolean;
|
|
15
|
+
export declare function pickCanonicalTaskPr(rows: TaskOpenPrRow[], preferredUrl?: string | null): TaskOpenPrRow | null;
|
|
16
|
+
export declare function supersededPrUrls(rows: TaskOpenPrRow[], canonicalUrl: string): string[];
|
|
17
|
+
/** Find open PRs associated with a harness AgentOS task (body, title, or retry branch prefix). */
|
|
18
|
+
export declare function listOpenPrsForTask(worktreePath: string, repo: string, taskId: string, exec: PrHandoffExec): TaskOpenPrRow[];
|
|
@@ -33,6 +33,14 @@ export interface CreatePrResult {
|
|
|
33
33
|
created?: boolean;
|
|
34
34
|
detail?: string;
|
|
35
35
|
}
|
|
36
|
+
export declare function pushHeadToRemoteBranch(input: {
|
|
37
|
+
worktreePath: string;
|
|
38
|
+
remoteBranch: string;
|
|
39
|
+
exec: PrHandoffExec;
|
|
40
|
+
}): {
|
|
41
|
+
ok: boolean;
|
|
42
|
+
detail?: string;
|
|
43
|
+
};
|
|
36
44
|
export declare function createGithubPr(input: {
|
|
37
45
|
worktreePath: string;
|
|
38
46
|
repo: string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { PrHandoffExec } from "./pr-handoff-gh.js";
|
|
2
|
+
import { type TaskOpenPrRow } from "./pr-handoff-dedupe.js";
|
|
3
|
+
export interface SupersedePrsResult {
|
|
4
|
+
closed: string[];
|
|
5
|
+
failed: Array<{
|
|
6
|
+
prUrl: string;
|
|
7
|
+
detail: string;
|
|
8
|
+
}>;
|
|
9
|
+
}
|
|
10
|
+
/** Close older open PRs for the same task, leaving the canonical PR open. */
|
|
11
|
+
export declare function closeSupersededTaskPrs(input: {
|
|
12
|
+
worktreePath: string;
|
|
13
|
+
repo: string;
|
|
14
|
+
rows: TaskOpenPrRow[];
|
|
15
|
+
canonicalPrUrl: string;
|
|
16
|
+
exec: PrHandoffExec;
|
|
17
|
+
}): SupersedePrsResult;
|