@sideboard-ai/core 0.1.251 → 0.1.253
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/{agents-FY2DFOMV.js → agents-6HDC7UA7.js} +3 -3
- package/dist/{agents-PU2P5VWM.js → agents-RKZ2NBIV.js} +3 -3
- package/dist/{chunk-6Z66OYYO.js → chunk-46KDLP6T.js} +50 -26
- package/dist/{chunk-GNO7RXNH.js → chunk-6ZYSXLXK.js} +37 -14
- package/dist/{chunk-2LZ3CNTN.js → chunk-GZRS5QVL.js} +52 -27
- package/dist/{chunk-PL23EQ3S.js → chunk-IAS7Q2YF.js} +2 -2
- package/dist/{chunk-TMLS5WYR.js → chunk-JUYD2YUC.js} +2 -2
- package/dist/{chunk-7R5I5UWW.js → chunk-MLB5CFUP.js} +44 -15
- package/dist/{chunk-WI75LO3T.js → chunk-PLMMPA6A.js} +62 -13
- package/dist/{chunk-JLLISK4D.js → chunk-WVNQML4W.js} +62 -13
- package/dist/{coordinator-prompt-6CWVH2US.js → coordinator-prompt-JKW7YZOC.js} +2 -2
- package/dist/{coordinator-prompt-R7JNOUZ3.js → coordinator-prompt-YSIC6YFC.js} +2 -2
- package/dist/{global-workspace-GTEL4UUZ.js → global-workspace-3Q57XYG4.js} +2 -2
- package/dist/{global-workspace-DWKW4CFY.js → global-workspace-DMR5JB7T.js} +2 -2
- package/dist/index.cjs +738 -628
- package/dist/index.d.cts +36 -9
- package/dist/index.d.ts +36 -9
- package/dist/index.js +24 -14
- package/dist/mcp/run-stdio.cjs +152 -52
- package/dist/mcp/run-stdio.js +21 -14
- package/dist/{orchestrator-7XDC4UOC.js → orchestrator-PJCQSVLY.js} +4 -4
- package/dist/{orchestrator-W7A5BA5V.js → orchestrator-W6DUFWVE.js} +4 -4
- package/dist/{workspaces-E6IL3MIH.js → workspaces-6A3ASHHI.js} +2 -2
- package/dist/{workspaces-PSDDVERD.js → workspaces-PS3IO4VJ.js} +2 -2
- package/dist/{worktree-MWX6ZVNS.js → worktree-7WTVHFGF.js} +1 -1
- package/dist/{worktree-Q4T7RSSW.js → worktree-DLSVHUF6.js} +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isOrchestratorThread
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JUYD2YUC.js";
|
|
4
4
|
import {
|
|
5
5
|
codexUnattendedGitConfigArgs,
|
|
6
6
|
mergeAgentGitAuthEnv,
|
|
7
7
|
resolveAgentGitAuthEnv,
|
|
8
8
|
resolveCodexGitWritableRoots
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PLMMPA6A.js";
|
|
10
10
|
import {
|
|
11
11
|
applyConnectedTeamToCli,
|
|
12
12
|
brightsyMcpServerName,
|
|
@@ -572,7 +572,12 @@ var WORKTREE_MCP_TOOLS = [
|
|
|
572
572
|
"get_run_log",
|
|
573
573
|
"notify_orchestrator",
|
|
574
574
|
"get_viewer_context",
|
|
575
|
-
"update_viewer_context"
|
|
575
|
+
"update_viewer_context",
|
|
576
|
+
"list_schedules",
|
|
577
|
+
"create_schedule",
|
|
578
|
+
"update_schedule",
|
|
579
|
+
"delete_schedule",
|
|
580
|
+
"run_schedule"
|
|
576
581
|
];
|
|
577
582
|
var WORKTREE_GITHUB_MCP_TOOLS = [
|
|
578
583
|
"github_search_issues",
|
|
@@ -623,7 +628,12 @@ var SIDEBOARD_ARTIFACT_MCP_ALLOWED_TOOLS = [
|
|
|
623
628
|
"mcp__sideboard__get_run_log",
|
|
624
629
|
"mcp__sideboard__notify_orchestrator",
|
|
625
630
|
"mcp__sideboard__get_viewer_context",
|
|
626
|
-
"mcp__sideboard__update_viewer_context"
|
|
631
|
+
"mcp__sideboard__update_viewer_context",
|
|
632
|
+
"mcp__sideboard__list_schedules",
|
|
633
|
+
"mcp__sideboard__create_schedule",
|
|
634
|
+
"mcp__sideboard__update_schedule",
|
|
635
|
+
"mcp__sideboard__delete_schedule",
|
|
636
|
+
"mcp__sideboard__run_schedule"
|
|
627
637
|
];
|
|
628
638
|
var SIDEBOARD_GITHUB_MCP_ALLOWED_TOOLS = ["mcp__sideboard__github_*"];
|
|
629
639
|
var SIDEBOARD_LINEAR_MCP_ALLOWED_TOOLS = ["mcp__sideboard__linear_*"];
|
|
@@ -1234,6 +1244,15 @@ function isContextCompactInProgress(text) {
|
|
|
1234
1244
|
if (isContextCompactDone(t)) return false;
|
|
1235
1245
|
return /^Compressing context/i.test(t);
|
|
1236
1246
|
}
|
|
1247
|
+
function isSystemStatusThinking(event) {
|
|
1248
|
+
if (event.replace) return true;
|
|
1249
|
+
const t = (event.data ?? "").trim();
|
|
1250
|
+
if (!t) return true;
|
|
1251
|
+
if (/^API retry\b/i.test(t)) return true;
|
|
1252
|
+
if (/^MCP:/i.test(t)) return true;
|
|
1253
|
+
if (isContextCompactInProgress(t) || isContextCompactDone(t)) return true;
|
|
1254
|
+
return false;
|
|
1255
|
+
}
|
|
1237
1256
|
function looksLikeConversationSummary(text) {
|
|
1238
1257
|
const t = text.trim();
|
|
1239
1258
|
if (t.length < 80) return false;
|
|
@@ -1311,6 +1330,13 @@ function toolDescription(name, input) {
|
|
|
1311
1330
|
return str(input?.name) ? `Read ${str(input?.name)} log` : "Read Dev log";
|
|
1312
1331
|
}
|
|
1313
1332
|
if (/notify_orchestrator$/i.test(name)) return "Notify orchestrator";
|
|
1333
|
+
if (/list_schedules$/i.test(name)) return "List schedules";
|
|
1334
|
+
if (/create_schedule$/i.test(name)) {
|
|
1335
|
+
return str(input?.name) ? `Schedule ${str(input?.name)}` : "Create schedule";
|
|
1336
|
+
}
|
|
1337
|
+
if (/update_schedule$/i.test(name)) return "Update schedule";
|
|
1338
|
+
if (/delete_schedule$/i.test(name)) return "Delete schedule";
|
|
1339
|
+
if (/run_schedule$/i.test(name)) return "Run schedule";
|
|
1314
1340
|
if (isSkillToolName(name)) {
|
|
1315
1341
|
const cmd = skillCommandFromInput(input);
|
|
1316
1342
|
return cmd ? `Using /${cmd}` : "Using skill";
|
|
@@ -1778,15 +1804,6 @@ function applyAgentEvent(parts, event) {
|
|
|
1778
1804
|
);
|
|
1779
1805
|
return next2;
|
|
1780
1806
|
}
|
|
1781
|
-
if (contextCompactInProgress(parts, event.parentId)) {
|
|
1782
|
-
return [
|
|
1783
|
-
...parts,
|
|
1784
|
-
compactToolPart(data, `compact-${parts.length}`, {
|
|
1785
|
-
parentId: event.parentId,
|
|
1786
|
-
status: "running"
|
|
1787
|
-
})
|
|
1788
|
-
];
|
|
1789
|
-
}
|
|
1790
1807
|
const runningSkillIdx = lastRunningSkillIndex(parts, event.parentId);
|
|
1791
1808
|
if (runningSkillIdx >= 0) {
|
|
1792
1809
|
const prev = parts[runningSkillIdx];
|
|
@@ -1805,6 +1822,15 @@ function applyAgentEvent(parts, event) {
|
|
|
1805
1822
|
);
|
|
1806
1823
|
return next2;
|
|
1807
1824
|
}
|
|
1825
|
+
if (contextCompactInProgress(parts, event.parentId)) {
|
|
1826
|
+
return [
|
|
1827
|
+
...parts,
|
|
1828
|
+
compactToolPart(data, `compact-${parts.length}`, {
|
|
1829
|
+
parentId: event.parentId,
|
|
1830
|
+
status: "running"
|
|
1831
|
+
})
|
|
1832
|
+
];
|
|
1833
|
+
}
|
|
1808
1834
|
const next = [...parts];
|
|
1809
1835
|
const last = next[next.length - 1];
|
|
1810
1836
|
if (last?.type === "text" && sameParentId(last.parentId, event.parentId)) {
|
|
@@ -1841,7 +1867,9 @@ function applyAgentEvent(parts, event) {
|
|
|
1841
1867
|
if (event.type === "thinking") {
|
|
1842
1868
|
const data = event.data;
|
|
1843
1869
|
if (!data) return parts;
|
|
1844
|
-
|
|
1870
|
+
if (!isSystemStatusThinking(event)) {
|
|
1871
|
+
parts = markRunningSkillsDone(parts, event.parentId);
|
|
1872
|
+
}
|
|
1845
1873
|
const next = [...parts];
|
|
1846
1874
|
if (event.replace) {
|
|
1847
1875
|
for (let i = next.length - 1; i >= 0; i--) {
|
|
@@ -2533,7 +2561,7 @@ var claudeAdapter = {
|
|
|
2533
2561
|
);
|
|
2534
2562
|
}
|
|
2535
2563
|
const mode = permissionMode(thread);
|
|
2536
|
-
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-
|
|
2564
|
+
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-3Q57XYG4.js");
|
|
2537
2565
|
const isOrchestrator = isOrchestratorThread2(thread);
|
|
2538
2566
|
const injectedServers = await buildInjectedMcpServers({
|
|
2539
2567
|
includeSideboard: true,
|
|
@@ -4529,6 +4557,7 @@ export {
|
|
|
4529
4557
|
isCompactToolName,
|
|
4530
4558
|
isContextCompactDone,
|
|
4531
4559
|
isContextCompactInProgress,
|
|
4560
|
+
isSystemStatusThinking,
|
|
4532
4561
|
looksLikeConversationSummary,
|
|
4533
4562
|
toolDetail,
|
|
4534
4563
|
toolDescription,
|
|
@@ -1578,6 +1578,23 @@ function prIsInMergeQueue(gate) {
|
|
|
1578
1578
|
if (gate.isInMergeQueue) return true;
|
|
1579
1579
|
return (gate.mergeStateStatus ?? "").toUpperCase() === "QUEUED";
|
|
1580
1580
|
}
|
|
1581
|
+
function applyCleanLocalMergeTree(gate) {
|
|
1582
|
+
const mergeable = (gate.mergeable ?? "").toUpperCase();
|
|
1583
|
+
const mergeState = (gate.mergeStateStatus ?? "").toUpperCase();
|
|
1584
|
+
const githubConflicting = mergeable === "CONFLICTING" || mergeState === "DIRTY";
|
|
1585
|
+
if (githubConflicting) {
|
|
1586
|
+
return {
|
|
1587
|
+
...gate,
|
|
1588
|
+
mergeable: "MERGEABLE",
|
|
1589
|
+
mergeStateStatus: mergeState === "BEHIND" ? "BEHIND" : "CLEAN"
|
|
1590
|
+
};
|
|
1591
|
+
}
|
|
1592
|
+
return {
|
|
1593
|
+
...gate,
|
|
1594
|
+
mergeable: mergeable === "UNKNOWN" || !mergeable ? "MERGEABLE" : gate.mergeable,
|
|
1595
|
+
mergeStateStatus: mergeState === "BEHIND" ? "BEHIND" : mergeState === "UNKNOWN" || !mergeState ? "CLEAN" : gate.mergeStateStatus
|
|
1596
|
+
};
|
|
1597
|
+
}
|
|
1581
1598
|
function ciChecksFailed(checks) {
|
|
1582
1599
|
if (!checks?.length) return false;
|
|
1583
1600
|
return checks.some(
|
|
@@ -2130,6 +2147,22 @@ async function listPrs(repoPath, opts) {
|
|
|
2130
2147
|
if (exitCode !== 0 || !stdout.trim()) return [];
|
|
2131
2148
|
return applyPrListResponse(stdout, { ...resolved, limit, viewerTeams });
|
|
2132
2149
|
}
|
|
2150
|
+
var PR_INFO_JSON_FIELDS = "number,title,headRefName,url,isCrossRepository,author,isDraft,labels";
|
|
2151
|
+
function prInfoFromGhView(view) {
|
|
2152
|
+
const author = view.author;
|
|
2153
|
+
const login = author?.login?.trim();
|
|
2154
|
+
return {
|
|
2155
|
+
number: Number(view.number),
|
|
2156
|
+
title: String(view.title ?? ""),
|
|
2157
|
+
headRefName: String(view.headRefName ?? ""),
|
|
2158
|
+
url: String(view.url ?? ""),
|
|
2159
|
+
isCrossRepository: Boolean(view.isCrossRepository),
|
|
2160
|
+
author: login ? { login } : null,
|
|
2161
|
+
isDraft: Boolean(view.isDraft),
|
|
2162
|
+
state: typeof view.state === "string" ? view.state : void 0,
|
|
2163
|
+
labels: labelNames(view.labels)
|
|
2164
|
+
};
|
|
2165
|
+
}
|
|
2133
2166
|
async function getPr(repoPath, number) {
|
|
2134
2167
|
const slug = await resolveGithubRepoSlug(repoPath);
|
|
2135
2168
|
const args = [
|
|
@@ -2137,12 +2170,16 @@ async function getPr(repoPath, number) {
|
|
|
2137
2170
|
"view",
|
|
2138
2171
|
String(number),
|
|
2139
2172
|
"--json",
|
|
2140
|
-
|
|
2173
|
+
PR_INFO_JSON_FIELDS
|
|
2141
2174
|
];
|
|
2142
2175
|
if (slug) args.push("--repo", slug);
|
|
2143
2176
|
const { stdout, exitCode } = await gh(args, repoPath, { reject: false });
|
|
2144
2177
|
if (exitCode !== 0 || !stdout.trim()) return null;
|
|
2145
|
-
|
|
2178
|
+
try {
|
|
2179
|
+
return prInfoFromGhView(JSON.parse(stdout));
|
|
2180
|
+
} catch {
|
|
2181
|
+
return null;
|
|
2182
|
+
}
|
|
2146
2183
|
}
|
|
2147
2184
|
function normalizeGitBranchName(ref) {
|
|
2148
2185
|
return ref.trim().replace(/^refs\/heads\//, "").replace(/^origin\//, "");
|
|
@@ -2196,7 +2233,7 @@ async function getPrForHeadBranch(repoPath, branch) {
|
|
|
2196
2233
|
"--head",
|
|
2197
2234
|
listHead,
|
|
2198
2235
|
"--json",
|
|
2199
|
-
|
|
2236
|
+
PR_INFO_JSON_FIELDS,
|
|
2200
2237
|
"--limit",
|
|
2201
2238
|
"1",
|
|
2202
2239
|
"--state",
|
|
@@ -2207,7 +2244,7 @@ async function getPrForHeadBranch(repoPath, branch) {
|
|
|
2207
2244
|
if (listed.exitCode === 0 && listed.stdout.trim()) {
|
|
2208
2245
|
try {
|
|
2209
2246
|
const rows = JSON.parse(listed.stdout);
|
|
2210
|
-
if (rows[0]) return rows[0];
|
|
2247
|
+
if (rows[0]) return prInfoFromGhView(rows[0]);
|
|
2211
2248
|
} catch {
|
|
2212
2249
|
}
|
|
2213
2250
|
}
|
|
@@ -2216,13 +2253,13 @@ async function getPrForHeadBranch(repoPath, branch) {
|
|
|
2216
2253
|
"view",
|
|
2217
2254
|
head,
|
|
2218
2255
|
"--json",
|
|
2219
|
-
|
|
2256
|
+
`${PR_INFO_JSON_FIELDS},state`
|
|
2220
2257
|
];
|
|
2221
2258
|
if (slug) viewArgs.push("--repo", slug);
|
|
2222
2259
|
const viewed = await gh(viewArgs, repoPath, { reject: false });
|
|
2223
2260
|
if (viewed.exitCode !== 0 || !viewed.stdout.trim()) return null;
|
|
2224
2261
|
try {
|
|
2225
|
-
const info = JSON.parse(viewed.stdout);
|
|
2262
|
+
const info = prInfoFromGhView(JSON.parse(viewed.stdout));
|
|
2226
2263
|
const state = (info.state ?? "OPEN").trim().toUpperCase();
|
|
2227
2264
|
if (state !== "OPEN") return null;
|
|
2228
2265
|
return info;
|
|
@@ -2343,11 +2380,7 @@ async function probeLocalMergeGate(cwd, gate) {
|
|
|
2343
2380
|
}
|
|
2344
2381
|
if (gate && (githubConflicting || githubUnknown)) {
|
|
2345
2382
|
return {
|
|
2346
|
-
gate:
|
|
2347
|
-
...gate,
|
|
2348
|
-
mergeable: "MERGEABLE",
|
|
2349
|
-
mergeStateStatus: mergeState === "BEHIND" ? "BEHIND" : "CLEAN"
|
|
2350
|
-
},
|
|
2383
|
+
gate: applyCleanLocalMergeTree(gate),
|
|
2351
2384
|
files: []
|
|
2352
2385
|
};
|
|
2353
2386
|
}
|
|
@@ -2484,6 +2517,7 @@ var PR_DETAILS_JSON_FIELDS = [
|
|
|
2484
2517
|
"additions",
|
|
2485
2518
|
"deletions",
|
|
2486
2519
|
"changedFiles",
|
|
2520
|
+
"commits",
|
|
2487
2521
|
"comments",
|
|
2488
2522
|
"reviews",
|
|
2489
2523
|
"assignees",
|
|
@@ -2494,6 +2528,7 @@ function parsePrDetailsView(view) {
|
|
|
2494
2528
|
const author = view.author ?? {};
|
|
2495
2529
|
const comments = Array.isArray(view.comments) ? view.comments : [];
|
|
2496
2530
|
const reviews = Array.isArray(view.reviews) ? view.reviews : [];
|
|
2531
|
+
const commits = Array.isArray(view.commits) ? view.commits : [];
|
|
2497
2532
|
const requested = {
|
|
2498
2533
|
ids: reviewerIdentities(view.reviewRequests),
|
|
2499
2534
|
users: humanReviewerLogins(view.reviewRequests),
|
|
@@ -2514,8 +2549,22 @@ function parsePrDetailsView(view) {
|
|
|
2514
2549
|
additions: Number(view.additions ?? 0),
|
|
2515
2550
|
deletions: Number(view.deletions ?? 0),
|
|
2516
2551
|
changedFiles: Number(view.changedFiles ?? 0),
|
|
2517
|
-
|
|
2518
|
-
|
|
2552
|
+
commits: commits.map((c) => {
|
|
2553
|
+
const row = c;
|
|
2554
|
+
const authors = Array.isArray(row.authors) ? row.authors.map((a) => {
|
|
2555
|
+
const actor = a;
|
|
2556
|
+
return {
|
|
2557
|
+
login: actor.login?.trim() || actor.name?.trim() || "unknown",
|
|
2558
|
+
name: actor.name ?? null
|
|
2559
|
+
};
|
|
2560
|
+
}) : [];
|
|
2561
|
+
return {
|
|
2562
|
+
oid: String(row.oid ?? ""),
|
|
2563
|
+
messageHeadline: String(row.messageHeadline ?? ""),
|
|
2564
|
+
committedDate: String(row.committedDate ?? ""),
|
|
2565
|
+
authors
|
|
2566
|
+
};
|
|
2567
|
+
}),
|
|
2519
2568
|
comments: comments.map((c) => {
|
|
2520
2569
|
const row = c;
|
|
2521
2570
|
const a = row.author ?? {};
|
|
@@ -1569,6 +1569,23 @@ function prIsInMergeQueue(gate) {
|
|
|
1569
1569
|
if (gate.isInMergeQueue) return true;
|
|
1570
1570
|
return (gate.mergeStateStatus ?? "").toUpperCase() === "QUEUED";
|
|
1571
1571
|
}
|
|
1572
|
+
function applyCleanLocalMergeTree(gate) {
|
|
1573
|
+
const mergeable = (gate.mergeable ?? "").toUpperCase();
|
|
1574
|
+
const mergeState = (gate.mergeStateStatus ?? "").toUpperCase();
|
|
1575
|
+
const githubConflicting = mergeable === "CONFLICTING" || mergeState === "DIRTY";
|
|
1576
|
+
if (githubConflicting) {
|
|
1577
|
+
return {
|
|
1578
|
+
...gate,
|
|
1579
|
+
mergeable: "MERGEABLE",
|
|
1580
|
+
mergeStateStatus: mergeState === "BEHIND" ? "BEHIND" : "CLEAN"
|
|
1581
|
+
};
|
|
1582
|
+
}
|
|
1583
|
+
return {
|
|
1584
|
+
...gate,
|
|
1585
|
+
mergeable: mergeable === "UNKNOWN" || !mergeable ? "MERGEABLE" : gate.mergeable,
|
|
1586
|
+
mergeStateStatus: mergeState === "BEHIND" ? "BEHIND" : mergeState === "UNKNOWN" || !mergeState ? "CLEAN" : gate.mergeStateStatus
|
|
1587
|
+
};
|
|
1588
|
+
}
|
|
1572
1589
|
function ciChecksFailed(checks) {
|
|
1573
1590
|
if (!checks?.length) return false;
|
|
1574
1591
|
return checks.some(
|
|
@@ -2093,6 +2110,22 @@ async function listPrs(repoPath, opts) {
|
|
|
2093
2110
|
if (exitCode !== 0 || !stdout.trim()) return [];
|
|
2094
2111
|
return applyPrListResponse(stdout, { ...resolved, limit, viewerTeams });
|
|
2095
2112
|
}
|
|
2113
|
+
var PR_INFO_JSON_FIELDS = "number,title,headRefName,url,isCrossRepository,author,isDraft,labels";
|
|
2114
|
+
function prInfoFromGhView(view) {
|
|
2115
|
+
const author = view.author;
|
|
2116
|
+
const login = author?.login?.trim();
|
|
2117
|
+
return {
|
|
2118
|
+
number: Number(view.number),
|
|
2119
|
+
title: String(view.title ?? ""),
|
|
2120
|
+
headRefName: String(view.headRefName ?? ""),
|
|
2121
|
+
url: String(view.url ?? ""),
|
|
2122
|
+
isCrossRepository: Boolean(view.isCrossRepository),
|
|
2123
|
+
author: login ? { login } : null,
|
|
2124
|
+
isDraft: Boolean(view.isDraft),
|
|
2125
|
+
state: typeof view.state === "string" ? view.state : void 0,
|
|
2126
|
+
labels: labelNames(view.labels)
|
|
2127
|
+
};
|
|
2128
|
+
}
|
|
2096
2129
|
async function getPr(repoPath, number) {
|
|
2097
2130
|
const slug = await resolveGithubRepoSlug(repoPath);
|
|
2098
2131
|
const args = [
|
|
@@ -2100,12 +2133,16 @@ async function getPr(repoPath, number) {
|
|
|
2100
2133
|
"view",
|
|
2101
2134
|
String(number),
|
|
2102
2135
|
"--json",
|
|
2103
|
-
|
|
2136
|
+
PR_INFO_JSON_FIELDS
|
|
2104
2137
|
];
|
|
2105
2138
|
if (slug) args.push("--repo", slug);
|
|
2106
2139
|
const { stdout, exitCode } = await gh(args, repoPath, { reject: false });
|
|
2107
2140
|
if (exitCode !== 0 || !stdout.trim()) return null;
|
|
2108
|
-
|
|
2141
|
+
try {
|
|
2142
|
+
return prInfoFromGhView(JSON.parse(stdout));
|
|
2143
|
+
} catch {
|
|
2144
|
+
return null;
|
|
2145
|
+
}
|
|
2109
2146
|
}
|
|
2110
2147
|
function normalizeGitBranchName(ref) {
|
|
2111
2148
|
return ref.trim().replace(/^refs\/heads\//, "").replace(/^origin\//, "");
|
|
@@ -2159,7 +2196,7 @@ async function getPrForHeadBranch(repoPath, branch) {
|
|
|
2159
2196
|
"--head",
|
|
2160
2197
|
listHead,
|
|
2161
2198
|
"--json",
|
|
2162
|
-
|
|
2199
|
+
PR_INFO_JSON_FIELDS,
|
|
2163
2200
|
"--limit",
|
|
2164
2201
|
"1",
|
|
2165
2202
|
"--state",
|
|
@@ -2170,7 +2207,7 @@ async function getPrForHeadBranch(repoPath, branch) {
|
|
|
2170
2207
|
if (listed.exitCode === 0 && listed.stdout.trim()) {
|
|
2171
2208
|
try {
|
|
2172
2209
|
const rows = JSON.parse(listed.stdout);
|
|
2173
|
-
if (rows[0]) return rows[0];
|
|
2210
|
+
if (rows[0]) return prInfoFromGhView(rows[0]);
|
|
2174
2211
|
} catch {
|
|
2175
2212
|
}
|
|
2176
2213
|
}
|
|
@@ -2179,13 +2216,13 @@ async function getPrForHeadBranch(repoPath, branch) {
|
|
|
2179
2216
|
"view",
|
|
2180
2217
|
head,
|
|
2181
2218
|
"--json",
|
|
2182
|
-
|
|
2219
|
+
`${PR_INFO_JSON_FIELDS},state`
|
|
2183
2220
|
];
|
|
2184
2221
|
if (slug) viewArgs.push("--repo", slug);
|
|
2185
2222
|
const viewed = await gh(viewArgs, repoPath, { reject: false });
|
|
2186
2223
|
if (viewed.exitCode !== 0 || !viewed.stdout.trim()) return null;
|
|
2187
2224
|
try {
|
|
2188
|
-
const info = JSON.parse(viewed.stdout);
|
|
2225
|
+
const info = prInfoFromGhView(JSON.parse(viewed.stdout));
|
|
2189
2226
|
const state = (info.state ?? "OPEN").trim().toUpperCase();
|
|
2190
2227
|
if (state !== "OPEN") return null;
|
|
2191
2228
|
return info;
|
|
@@ -2306,11 +2343,7 @@ async function probeLocalMergeGate(cwd, gate) {
|
|
|
2306
2343
|
}
|
|
2307
2344
|
if (gate && (githubConflicting || githubUnknown)) {
|
|
2308
2345
|
return {
|
|
2309
|
-
gate:
|
|
2310
|
-
...gate,
|
|
2311
|
-
mergeable: "MERGEABLE",
|
|
2312
|
-
mergeStateStatus: mergeState === "BEHIND" ? "BEHIND" : "CLEAN"
|
|
2313
|
-
},
|
|
2346
|
+
gate: applyCleanLocalMergeTree(gate),
|
|
2314
2347
|
files: []
|
|
2315
2348
|
};
|
|
2316
2349
|
}
|
|
@@ -2447,6 +2480,7 @@ var PR_DETAILS_JSON_FIELDS = [
|
|
|
2447
2480
|
"additions",
|
|
2448
2481
|
"deletions",
|
|
2449
2482
|
"changedFiles",
|
|
2483
|
+
"commits",
|
|
2450
2484
|
"comments",
|
|
2451
2485
|
"reviews",
|
|
2452
2486
|
"assignees",
|
|
@@ -2457,6 +2491,7 @@ function parsePrDetailsView(view) {
|
|
|
2457
2491
|
const author = view.author ?? {};
|
|
2458
2492
|
const comments = Array.isArray(view.comments) ? view.comments : [];
|
|
2459
2493
|
const reviews = Array.isArray(view.reviews) ? view.reviews : [];
|
|
2494
|
+
const commits = Array.isArray(view.commits) ? view.commits : [];
|
|
2460
2495
|
const requested = {
|
|
2461
2496
|
ids: reviewerIdentities(view.reviewRequests),
|
|
2462
2497
|
users: humanReviewerLogins(view.reviewRequests),
|
|
@@ -2477,8 +2512,22 @@ function parsePrDetailsView(view) {
|
|
|
2477
2512
|
additions: Number(view.additions ?? 0),
|
|
2478
2513
|
deletions: Number(view.deletions ?? 0),
|
|
2479
2514
|
changedFiles: Number(view.changedFiles ?? 0),
|
|
2480
|
-
|
|
2481
|
-
|
|
2515
|
+
commits: commits.map((c) => {
|
|
2516
|
+
const row = c;
|
|
2517
|
+
const authors = Array.isArray(row.authors) ? row.authors.map((a) => {
|
|
2518
|
+
const actor = a;
|
|
2519
|
+
return {
|
|
2520
|
+
login: actor.login?.trim() || actor.name?.trim() || "unknown",
|
|
2521
|
+
name: actor.name ?? null
|
|
2522
|
+
};
|
|
2523
|
+
}) : [];
|
|
2524
|
+
return {
|
|
2525
|
+
oid: String(row.oid ?? ""),
|
|
2526
|
+
messageHeadline: String(row.messageHeadline ?? ""),
|
|
2527
|
+
committedDate: String(row.committedDate ?? ""),
|
|
2528
|
+
authors
|
|
2529
|
+
};
|
|
2530
|
+
}),
|
|
2482
2531
|
comments: comments.map((c) => {
|
|
2483
2532
|
const row = c;
|
|
2484
2533
|
const a = row.author ?? {};
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
enrichWorkspacesWithGithub,
|
|
10
10
|
ensureGlobalCoordinatorCwd,
|
|
11
11
|
formatWorkspaceInventory
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-IAS7Q2YF.js";
|
|
13
|
+
import "./chunk-WVNQML4W.js";
|
|
14
14
|
import "./chunk-D6JWYJ4P.js";
|
|
15
15
|
import "./chunk-RJC2MKXN.js";
|
|
16
16
|
import "./chunk-H547WSSZ.js";
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
enrichWorkspacesWithGithub,
|
|
8
8
|
ensureGlobalCoordinatorCwd,
|
|
9
9
|
formatWorkspaceInventory
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-JUYD2YUC.js";
|
|
11
|
+
import "./chunk-PLMMPA6A.js";
|
|
12
12
|
import "./chunk-6K64FJDD.js";
|
|
13
13
|
import "./chunk-2P4XKWV2.js";
|
|
14
14
|
import "./chunk-KJM3E3NF.js";
|
|
@@ -15,8 +15,8 @@ import {
|
|
|
15
15
|
orchestratorSessionPoisonedByBuiltins,
|
|
16
16
|
slackCoordinatorSourceRef,
|
|
17
17
|
takenTeamSlugsForOrchestration
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-JUYD2YUC.js";
|
|
19
|
+
import "./chunk-PLMMPA6A.js";
|
|
20
20
|
import "./chunk-6K64FJDD.js";
|
|
21
21
|
import "./chunk-2P4XKWV2.js";
|
|
22
22
|
import "./chunk-KJM3E3NF.js";
|
|
@@ -17,8 +17,8 @@ import {
|
|
|
17
17
|
orchestratorSessionPoisonedByBuiltins,
|
|
18
18
|
slackCoordinatorSourceRef,
|
|
19
19
|
takenTeamSlugsForOrchestration
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-IAS7Q2YF.js";
|
|
21
|
+
import "./chunk-WVNQML4W.js";
|
|
22
22
|
import "./chunk-D6JWYJ4P.js";
|
|
23
23
|
import "./chunk-RJC2MKXN.js";
|
|
24
24
|
import "./chunk-H547WSSZ.js";
|