@miller-tech/uap 1.165.0 → 1.168.0
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.
- package/dist/.tsbuildinfo +1 -1
- package/dist/bin/cli.js +47 -2
- package/dist/bin/cli.js.map +1 -1
- package/dist/cli/coord.d.ts +1 -1
- package/dist/cli/coord.d.ts.map +1 -1
- package/dist/cli/coord.js +59 -0
- package/dist/cli/coord.js.map +1 -1
- package/dist/cli/merge-queue.d.ts +53 -0
- package/dist/cli/merge-queue.d.ts.map +1 -0
- package/dist/cli/merge-queue.js +239 -0
- package/dist/cli/merge-queue.js.map +1 -0
- package/dist/cli/worktree.d.ts +69 -1
- package/dist/cli/worktree.d.ts.map +1 -1
- package/dist/cli/worktree.js +560 -26
- package/dist/cli/worktree.js.map +1 -1
- package/dist/config/policy-recommendations.d.ts.map +1 -1
- package/dist/config/policy-recommendations.js +4 -0
- package/dist/config/policy-recommendations.js.map +1 -1
- package/dist/coordination/index.d.ts +1 -0
- package/dist/coordination/index.d.ts.map +1 -1
- package/dist/coordination/index.js +1 -0
- package/dist/coordination/index.js.map +1 -1
- package/dist/coordination/ownership.d.ts +51 -0
- package/dist/coordination/ownership.d.ts.map +1 -0
- package/dist/coordination/ownership.js +175 -0
- package/dist/coordination/ownership.js.map +1 -0
- package/docs/INDEX.md +2 -1
- package/docs/guides/PARALLEL_AGENTS.md +209 -0
- package/docs/guides/POLICIES.md +1 -0
- package/docs/guides/WORKTREE_WORKFLOW.md +5 -2
- package/docs/reference/CLI.md +24 -1
- package/package.json +1 -1
- package/src/policies/enforcers/__pycache__/_common.cpython-312.pyc +0 -0
- package/src/policies/enforcers/branch_freshness.py +134 -0
- package/src/policies/enforcers/coord_overlap.py +126 -47
- package/src/policies/schemas/policies/branch-freshness.md +81 -0
- package/templates/hooks/__pycache__/deliver_autoroute.cpython-312.pyc +0 -0
- package/templates/hooks/coordinate-file.sh +153 -3
- package/templates/hooks/session-end.sh +15 -0
- package/templates/hooks/session-start.sh +24 -2
- package/tools/agents/scripts/__pycache__/toolcall_path_normalizer.cpython-312.pyc +0 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type OwnershipMap } from '../coordination/ownership.js';
|
|
2
|
+
export interface QueueOptions {
|
|
3
|
+
dryRun?: boolean;
|
|
4
|
+
limit?: number;
|
|
5
|
+
/** Land PRs even when their checks are not green (never the default). */
|
|
6
|
+
force?: boolean;
|
|
7
|
+
/** Required to actually merge. Without it the queue only prints its plan. */
|
|
8
|
+
yes?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Landing is irreversible and unattended, so the default must not merge.
|
|
12
|
+
* `uap merge queue` with no flags prints the plan; `--yes` commits to it.
|
|
13
|
+
*/
|
|
14
|
+
export declare const DEFAULT_QUEUE_LIMIT = 10;
|
|
15
|
+
export interface PullRequest {
|
|
16
|
+
number: number;
|
|
17
|
+
title: string;
|
|
18
|
+
headRefName: string;
|
|
19
|
+
isDraft: boolean;
|
|
20
|
+
updatedAt: string;
|
|
21
|
+
labels: string[];
|
|
22
|
+
files: string[];
|
|
23
|
+
}
|
|
24
|
+
/** Open, non-draft PRs with their changed-file lists. */
|
|
25
|
+
export declare function fetchOpenPrs(cwd?: string): PullRequest[];
|
|
26
|
+
/** Files touched by both PRs — the direct textual-conflict surface. */
|
|
27
|
+
export declare function overlappingFiles(a: PullRequest, b: PullRequest): string[];
|
|
28
|
+
/**
|
|
29
|
+
* Landing order. Mirrors TaskCoordinator.getMergeOrderSuggestion's intent —
|
|
30
|
+
* urgent and small first — but operates on PRs, which is where merges actually
|
|
31
|
+
* happen. Ordering is deterministic so a dry-run plan matches the real run.
|
|
32
|
+
*/
|
|
33
|
+
export declare function orderQueue(prs: PullRequest[]): PullRequest[];
|
|
34
|
+
/**
|
|
35
|
+
* PRs that will need a re-sync once `landed` is on the base branch.
|
|
36
|
+
*
|
|
37
|
+
* Shared FILES are the certain case. Shared LANES (per .uap/ownership.json) catch
|
|
38
|
+
* the semantic case that file overlap misses entirely: two PRs editing different
|
|
39
|
+
* files in the same module, each green alone, broken together. That is exactly how
|
|
40
|
+
* PR #577 turned master red — it touched infra while a test asserting the opposite
|
|
41
|
+
* lived in a file it never opened.
|
|
42
|
+
*/
|
|
43
|
+
export declare function impactedBy(landed: PullRequest, remaining: PullRequest[], map?: OwnershipMap): PullRequest[];
|
|
44
|
+
export type ChecksVerdict = 'green' | 'red' | 'pending' | 'none';
|
|
45
|
+
/**
|
|
46
|
+
* Classify `gh pr checks` output. Collapsing everything non-zero into "red" was
|
|
47
|
+
* wrong in two ways that both stop the queue dead: a repo with NO CI (exit 8)
|
|
48
|
+
* could never land anything, and a PR whose checks are still running after the
|
|
49
|
+
* previous merge's re-sync got reported as failing rather than waited on.
|
|
50
|
+
*/
|
|
51
|
+
export declare function checksVerdict(exitCode: number, output: string): ChecksVerdict;
|
|
52
|
+
export declare function mergeQueueCommand(options?: QueueOptions): Promise<void>;
|
|
53
|
+
//# sourceMappingURL=merge-queue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge-queue.d.ts","sourceRoot":"","sources":["../../src/cli/merge-queue.ts"],"names":[],"mappings":"AAeA,OAAO,EAAoC,KAAK,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEnG,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yEAAyE;IACzE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,6EAA6E;IAC7E,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAmBD,yDAAyD;AACzD,wBAAgB,YAAY,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,WAAW,EAAE,CAwBxD;AAED,uEAAuE;AACvE,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,MAAM,EAAE,CAGzE;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,WAAW,EAAE,CAqB5D;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,WAAW,EACnB,SAAS,EAAE,WAAW,EAAE,EACxB,GAAG,CAAC,EAAE,YAAY,GACjB,WAAW,EAAE,CAGf;AAED,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,GAAG,MAAM,CAAC;AAEjE;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,CAK7E;AAgCD,wBAAsB,iBAAiB,CAAC,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAuGjF"}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `uap merge queue` — serialized landing of concurrent agent PRs.
|
|
3
|
+
*
|
|
4
|
+
* Per-PR gates prove a branch is green against the base it was CUT from. They
|
|
5
|
+
* cannot see the semantic conflict where two independently-green PRs break each
|
|
6
|
+
* other once both are on master. That is not hypothetical here: PR #577 landed a
|
|
7
|
+
* legitimate docker-compose file while a stale hygiene test on master asserted
|
|
8
|
+
* the file's absence — both sides green in isolation, master CI red on merge,
|
|
9
|
+
* blocking every version bump in the repo until someone noticed.
|
|
10
|
+
*
|
|
11
|
+
* The queue closes that hole: land ONE PR at a time, then re-sync and re-check
|
|
12
|
+
* every remaining PR against the tip that actually landed, before the next merge.
|
|
13
|
+
*/
|
|
14
|
+
import chalk from 'chalk';
|
|
15
|
+
import { execFileSync } from 'child_process';
|
|
16
|
+
import { loadOwnershipMap, assessConflict } from '../coordination/ownership.js';
|
|
17
|
+
/**
|
|
18
|
+
* Landing is irreversible and unattended, so the default must not merge.
|
|
19
|
+
* `uap merge queue` with no flags prints the plan; `--yes` commits to it.
|
|
20
|
+
*/
|
|
21
|
+
export const DEFAULT_QUEUE_LIMIT = 10;
|
|
22
|
+
/** Run `gh` and return stdout. Throws with a readable message on failure. */
|
|
23
|
+
function gh(args, cwd) {
|
|
24
|
+
try {
|
|
25
|
+
// maxBuffer: `pr list --json files` over 100 PRs blows the 1 MB default and
|
|
26
|
+
// surfaces as a bare "gh failed". timeout: an auth prompt otherwise hangs forever.
|
|
27
|
+
return execFileSync('gh', args, {
|
|
28
|
+
cwd,
|
|
29
|
+
encoding: 'utf-8',
|
|
30
|
+
timeout: 120_000,
|
|
31
|
+
maxBuffer: 32 * 1024 * 1024,
|
|
32
|
+
}).trim();
|
|
33
|
+
}
|
|
34
|
+
catch (err) {
|
|
35
|
+
const e = err;
|
|
36
|
+
throw new Error(`gh ${args.join(' ')} failed: ${e.stderr || e.message || 'unknown error'}`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/** Open, non-draft PRs with their changed-file lists. */
|
|
40
|
+
export function fetchOpenPrs(cwd) {
|
|
41
|
+
const raw = gh(['pr', 'list', '--state', 'open', '--limit', '100', '--json',
|
|
42
|
+
'number,title,headRefName,isDraft,updatedAt,labels,files'], cwd);
|
|
43
|
+
const parsed = JSON.parse(raw);
|
|
44
|
+
return parsed.map((p) => ({
|
|
45
|
+
number: p.number,
|
|
46
|
+
title: p.title,
|
|
47
|
+
headRefName: p.headRefName,
|
|
48
|
+
isDraft: p.isDraft,
|
|
49
|
+
updatedAt: p.updatedAt,
|
|
50
|
+
labels: (p.labels ?? []).map((l) => l.name),
|
|
51
|
+
files: (p.files ?? []).map((f) => f.path),
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
54
|
+
/** Files touched by both PRs — the direct textual-conflict surface. */
|
|
55
|
+
export function overlappingFiles(a, b) {
|
|
56
|
+
const bSet = new Set(b.files);
|
|
57
|
+
return a.files.filter((f) => bSet.has(f));
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Landing order. Mirrors TaskCoordinator.getMergeOrderSuggestion's intent —
|
|
61
|
+
* urgent and small first — but operates on PRs, which is where merges actually
|
|
62
|
+
* happen. Ordering is deterministic so a dry-run plan matches the real run.
|
|
63
|
+
*/
|
|
64
|
+
export function orderQueue(prs) {
|
|
65
|
+
const priorityOf = (p) => {
|
|
66
|
+
const labels = p.labels.map((l) => l.toLowerCase());
|
|
67
|
+
if (labels.some((l) => l.includes('p0') || l.includes('critical')))
|
|
68
|
+
return 0;
|
|
69
|
+
if (labels.some((l) => l.includes('hotfix') || l.includes('security')))
|
|
70
|
+
return 0;
|
|
71
|
+
if (labels.some((l) => l.includes('bug') || l.includes('fix')))
|
|
72
|
+
return 1;
|
|
73
|
+
if (/^(fix|hotfix)\//.test(p.headRefName))
|
|
74
|
+
return 1;
|
|
75
|
+
if (labels.some((l) => l.includes('p1')))
|
|
76
|
+
return 1;
|
|
77
|
+
if (/^chore\//.test(p.headRefName) || /^docs\//.test(p.headRefName))
|
|
78
|
+
return 3;
|
|
79
|
+
return 2;
|
|
80
|
+
};
|
|
81
|
+
return [...prs].sort((a, b) => {
|
|
82
|
+
const pa = priorityOf(a);
|
|
83
|
+
const pb = priorityOf(b);
|
|
84
|
+
if (pa !== pb)
|
|
85
|
+
return pa - pb;
|
|
86
|
+
// Smaller diffs land more predictably and unblock others sooner.
|
|
87
|
+
if (a.files.length !== b.files.length)
|
|
88
|
+
return a.files.length - b.files.length;
|
|
89
|
+
// Oldest first — long-lived branches drift most, so stop the bleeding.
|
|
90
|
+
return a.updatedAt.localeCompare(b.updatedAt);
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* PRs that will need a re-sync once `landed` is on the base branch.
|
|
95
|
+
*
|
|
96
|
+
* Shared FILES are the certain case. Shared LANES (per .uap/ownership.json) catch
|
|
97
|
+
* the semantic case that file overlap misses entirely: two PRs editing different
|
|
98
|
+
* files in the same module, each green alone, broken together. That is exactly how
|
|
99
|
+
* PR #577 turned master red — it touched infra while a test asserting the opposite
|
|
100
|
+
* lived in a file it never opened.
|
|
101
|
+
*/
|
|
102
|
+
export function impactedBy(landed, remaining, map) {
|
|
103
|
+
const lanes = map ?? { lanes: {} };
|
|
104
|
+
return remaining.filter((p) => assessConflict(landed.files, p.files, lanes).conflicts);
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Classify `gh pr checks` output. Collapsing everything non-zero into "red" was
|
|
108
|
+
* wrong in two ways that both stop the queue dead: a repo with NO CI (exit 8)
|
|
109
|
+
* could never land anything, and a PR whose checks are still running after the
|
|
110
|
+
* previous merge's re-sync got reported as failing rather than waited on.
|
|
111
|
+
*/
|
|
112
|
+
export function checksVerdict(exitCode, output) {
|
|
113
|
+
if (exitCode === 0)
|
|
114
|
+
return 'green';
|
|
115
|
+
if (exitCode === 8)
|
|
116
|
+
return 'none';
|
|
117
|
+
if (/\b(pending|in_progress|queued|waiting|expected)\b/i.test(output))
|
|
118
|
+
return 'pending';
|
|
119
|
+
return 'red';
|
|
120
|
+
}
|
|
121
|
+
function inspectChecks(prNumber, cwd) {
|
|
122
|
+
try {
|
|
123
|
+
const out = execFileSync('gh', ['pr', 'checks', String(prNumber)], {
|
|
124
|
+
cwd,
|
|
125
|
+
encoding: 'utf-8',
|
|
126
|
+
timeout: 60_000,
|
|
127
|
+
});
|
|
128
|
+
return checksVerdict(0, out);
|
|
129
|
+
}
|
|
130
|
+
catch (err) {
|
|
131
|
+
const e = err;
|
|
132
|
+
return checksVerdict(e.status ?? 1, `${e.stdout ?? ''}${e.stderr ?? ''}`);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Re-sync a PR branch onto the freshly-updated base and push.
|
|
137
|
+
* Returns null on success, or a human-readable reason on failure.
|
|
138
|
+
*/
|
|
139
|
+
function resyncPr(pr, cwd) {
|
|
140
|
+
try {
|
|
141
|
+
gh(['pr', 'update-branch', String(pr.number)], cwd);
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
catch (err) {
|
|
145
|
+
// update-branch fails on a real conflict — exactly what we want surfaced.
|
|
146
|
+
return err.message.includes('merge conflict')
|
|
147
|
+
? 'merge conflict with the new base — resolve locally'
|
|
148
|
+
: err.message.slice(0, 160);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
export async function mergeQueueCommand(options = {}) {
|
|
152
|
+
const cwd = process.cwd();
|
|
153
|
+
let prs;
|
|
154
|
+
try {
|
|
155
|
+
prs = fetchOpenPrs(cwd);
|
|
156
|
+
}
|
|
157
|
+
catch (err) {
|
|
158
|
+
console.error(chalk.red(String(err)));
|
|
159
|
+
console.error(chalk.dim('Requires the `gh` CLI, authenticated against this repo.'));
|
|
160
|
+
process.exitCode = 1;
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
const eligible = prs.filter((p) => !p.isDraft);
|
|
164
|
+
if (eligible.length === 0) {
|
|
165
|
+
console.log(chalk.dim('No open, non-draft PRs to land.'));
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
const ownership = loadOwnershipMap(cwd);
|
|
169
|
+
const ordered = orderQueue(eligible);
|
|
170
|
+
const limit = Number.isFinite(options.limit) && (options.limit ?? 0) > 0
|
|
171
|
+
? options.limit
|
|
172
|
+
: DEFAULT_QUEUE_LIMIT;
|
|
173
|
+
const plan = ordered.slice(0, limit);
|
|
174
|
+
console.log(chalk.bold(`\n🚦 Merge queue — ${plan.length} PR(s)\n`));
|
|
175
|
+
for (const [i, pr] of plan.entries()) {
|
|
176
|
+
const others = plan.slice(i + 1);
|
|
177
|
+
const conflicts = impactedBy(pr, others, ownership);
|
|
178
|
+
const note = conflicts.length > 0
|
|
179
|
+
? chalk.yellow(` → forces re-sync of ${conflicts.map((c) => `#${c.number}`).join(', ')}`)
|
|
180
|
+
: '';
|
|
181
|
+
console.log(` ${i + 1}. #${pr.number} ${pr.title} ${chalk.dim(`(${pr.files.length} files)`)}${note}`);
|
|
182
|
+
}
|
|
183
|
+
console.log('');
|
|
184
|
+
if (ordered.length > plan.length) {
|
|
185
|
+
console.log(chalk.dim(` … ${ordered.length - plan.length} more open PR(s) not in this batch (--limit ${limit}).`));
|
|
186
|
+
console.log('');
|
|
187
|
+
}
|
|
188
|
+
if (options.dryRun || !options.yes) {
|
|
189
|
+
console.log(chalk.dim(options.dryRun
|
|
190
|
+
? 'Dry run — nothing merged.'
|
|
191
|
+
: 'Plan only — nothing merged. Re-run with --yes to land these.'));
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
let landed = 0;
|
|
195
|
+
const skipped = [];
|
|
196
|
+
for (const [i, pr] of plan.entries()) {
|
|
197
|
+
const remaining = plan.slice(i + 1);
|
|
198
|
+
if (!options.force) {
|
|
199
|
+
const verdict = inspectChecks(pr.number, cwd);
|
|
200
|
+
if (verdict === 'red' || verdict === 'pending') {
|
|
201
|
+
const why = verdict === 'pending' ? 'checks still running' : 'checks failing';
|
|
202
|
+
console.log(chalk.yellow(` ⏭ #${pr.number} skipped — ${why}`));
|
|
203
|
+
skipped.push(`#${pr.number} (${why})`);
|
|
204
|
+
continue;
|
|
205
|
+
}
|
|
206
|
+
// 'none' (repo has no CI) and 'green' both proceed.
|
|
207
|
+
}
|
|
208
|
+
try {
|
|
209
|
+
gh(['pr', 'merge', String(pr.number), '--merge'], cwd);
|
|
210
|
+
landed++;
|
|
211
|
+
console.log(chalk.green(` ✔ #${pr.number} merged`));
|
|
212
|
+
}
|
|
213
|
+
catch (err) {
|
|
214
|
+
console.log(chalk.red(` ✖ #${pr.number} merge failed: ${err.message.slice(0, 140)}`));
|
|
215
|
+
skipped.push(`#${pr.number} (merge failed)`);
|
|
216
|
+
continue;
|
|
217
|
+
}
|
|
218
|
+
// THE POINT OF THE QUEUE: every PR that touches what just landed is now
|
|
219
|
+
// testing against a base that no longer exists. Re-sync before the next merge
|
|
220
|
+
// so the next PR's checks describe reality.
|
|
221
|
+
const impacted = impactedBy(pr, remaining, ownership);
|
|
222
|
+
for (const other of impacted) {
|
|
223
|
+
const failure = resyncPr(other, cwd);
|
|
224
|
+
if (failure) {
|
|
225
|
+
console.log(chalk.red(` ↳ #${other.number} could not re-sync: ${failure}`));
|
|
226
|
+
}
|
|
227
|
+
else {
|
|
228
|
+
console.log(chalk.dim(` ↳ #${other.number} re-synced onto the new base`));
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
console.log('');
|
|
233
|
+
console.log(chalk.bold(`Landed ${landed}/${plan.length}.`));
|
|
234
|
+
if (skipped.length > 0) {
|
|
235
|
+
console.log(chalk.yellow(`Skipped: ${skipped.join(', ')}`));
|
|
236
|
+
process.exitCode = 1;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
//# sourceMappingURL=merge-queue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge-queue.js","sourceRoot":"","sources":["../../src/cli/merge-queue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAqB,MAAM,8BAA8B,CAAC;AAWnG;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAYtC,6EAA6E;AAC7E,SAAS,EAAE,CAAC,IAAc,EAAE,GAAY;IACtC,IAAI,CAAC;QACH,4EAA4E;QAC5E,mFAAmF;QACnF,OAAO,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE;YAC9B,GAAG;Y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|
+
type WorktreeAction = 'create' | 'list' | 'pr' | 'finish' | 'cleanup' | 'ensure' | 'prune' | 'sync' | 'hygiene';
|
|
2
3
|
interface WorktreeOptions {
|
|
3
4
|
slug?: string;
|
|
4
5
|
id?: string;
|
|
@@ -9,8 +10,75 @@ interface WorktreeOptions {
|
|
|
9
10
|
olderThan?: number;
|
|
10
11
|
force?: boolean;
|
|
11
12
|
dryRun?: boolean;
|
|
13
|
+
/** create: skip the fetch of the base remote (offline / air-gapped). */
|
|
14
|
+
noFetch?: boolean;
|
|
15
|
+
/** hygiene: emit a single-line advisory instead of the full table. */
|
|
16
|
+
brief?: boolean;
|
|
17
|
+
/** sync/hygiene: operate on every worktree, not just the current one. */
|
|
18
|
+
all?: boolean;
|
|
12
19
|
}
|
|
20
|
+
/** Commits behind the integration ref at which a worktree reads as abandoned. */
|
|
21
|
+
export declare const STALE_BEHIND_LIMIT = 200;
|
|
13
22
|
export declare function worktreeCommand(action: WorktreeAction, options?: WorktreeOptions): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Name of the repo's integration branch, without the remote prefix.
|
|
25
|
+
* Prefers origin/HEAD (what the remote itself calls default), then the usual
|
|
26
|
+
* suspects, then the current local branch. Hard-coding "master" broke every
|
|
27
|
+
* main-branch repo that installed UAP.
|
|
28
|
+
*/
|
|
29
|
+
export declare function resolveDefaultBranch(git: SimpleGit): Promise<string>;
|
|
30
|
+
/** Fully-qualified ref to integrate against: `origin/<default>` when the remote has it. */
|
|
31
|
+
export declare function resolveIntegrationRef(git: SimpleGit): Promise<string>;
|
|
32
|
+
export interface BranchDrift {
|
|
33
|
+
name: string;
|
|
34
|
+
path: string;
|
|
35
|
+
branch: string;
|
|
36
|
+
/** Commits on the integration ref that this branch does not have. */
|
|
37
|
+
behind: number;
|
|
38
|
+
/** Commits on this branch not yet on the integration ref (unmerged work). */
|
|
39
|
+
ahead: number;
|
|
40
|
+
/** Count of uncommitted (staged + unstaged + untracked) entries. */
|
|
41
|
+
dirty: number;
|
|
42
|
+
/** A live agent is announcing work on this branch right now. */
|
|
43
|
+
active?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Branches a LIVE agent is currently announcing work on.
|
|
47
|
+
*
|
|
48
|
+
* Git metadata alone cannot tell "abandoned" from "someone is working here this
|
|
49
|
+
* second": both look like an old branch with uncommitted files. That ambiguity is
|
|
50
|
+
* not academic — a worktree in this repo was read as abandoned WIP and merged
|
|
51
|
+
* forward while its owning agent was mid-session, because the drift report only
|
|
52
|
+
* ever consulted git. The coordination DB knows the difference; join against it.
|
|
53
|
+
*
|
|
54
|
+
* Liveness uses the same heartbeat window as coordinate-file.sh so "live" means
|
|
55
|
+
* one thing across the system. Fail-open: an unreadable DB marks nothing active.
|
|
56
|
+
*/
|
|
57
|
+
export declare function liveAgentBranches(mainRoot: string): {
|
|
58
|
+
branches: Set<string>;
|
|
59
|
+
/** False when the DB could not be read — callers that DELETE must fail closed. */
|
|
60
|
+
readable: boolean;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Measure one worktree's drift against the integration ref. Never throws.
|
|
64
|
+
*
|
|
65
|
+
* Kept to ONE git process on the common path. The first version spent four
|
|
66
|
+
* (`rev-parse`, two `rev-list`, `status`) which, across this repo's 152
|
|
67
|
+
* worktrees, ran ~600 sequential git invocations — comfortably past the 15s
|
|
68
|
+
* budget the session banner allows, so the advisory was always killed before it
|
|
69
|
+
* printed while still costing the full 15 seconds.
|
|
70
|
+
*
|
|
71
|
+
* @param branch pre-resolved from `git worktree list --porcelain`, which already
|
|
72
|
+
* reports it — re-asking per worktree was a free process we were paying for.
|
|
73
|
+
* @param withDirty `git status` is by far the most expensive call (it stats the
|
|
74
|
+
* whole tree). Only worth it for worktrees that already look interesting.
|
|
75
|
+
*/
|
|
76
|
+
export declare function measureDrift(worktreePath: string, integrationRef: string, branch?: string, withDirty?: boolean): Promise<BranchDrift | null>;
|
|
77
|
+
/**
|
|
78
|
+
* One-line advisory for session-start. Returns '' when nothing needs attention,
|
|
79
|
+
* so the caller can stay silent on a healthy repo.
|
|
80
|
+
*/
|
|
81
|
+
export declare function summarizeHygiene(drifts: BranchDrift[], integrationRef: string): string;
|
|
14
82
|
export declare function parseRevListCount(output: string): number;
|
|
15
83
|
export declare function isAlreadyMergedMessage(message: string): boolean;
|
|
16
84
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worktree.d.ts","sourceRoot":"","sources":["../../src/cli/worktree.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"worktree.d.ts","sourceRoot":"","sources":["../../src/cli/worktree.ts"],"names":[],"mappings":"AAIA,OAAO,EAAa,SAAS,EAAE,MAAM,YAAY,CAAC;AAIlD,KAAK,cAAc,GACf,QAAQ,GACR,MAAM,GACN,IAAI,GACJ,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,OAAO,GACP,MAAM,GACN,SAAS,CAAC;AAEd,UAAU,eAAe;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,wEAAwE;IACxE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sEAAsE;IACtE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,yEAAyE;IACzE,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,iFAAiF;AACjF,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAuEtC,wBAAsB,eAAe,CACnC,MAAM,EAAE,cAAc,EACtB,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC,IAAI,CAAC,CA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