@sideboard-ai/core 0.1.250 → 0.1.252
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-7IIUQLCC.js → agents-B66CNEPB.js} +3 -3
- package/dist/{agents-72QLUO4L.js → agents-C7T4US6D.js} +3 -3
- package/dist/{chunk-IJIMEK2K.js → chunk-4DGYMF7H.js} +24 -13
- package/dist/{chunk-W4BGLHA3.js → chunk-6IP4FWMK.js} +1 -1
- package/dist/{chunk-RLJHH6T7.js → chunk-AQQWP2TL.js} +23 -11
- package/dist/{chunk-DMT62X6L.js → chunk-BHPGORIY.js} +25 -13
- package/dist/{chunk-EV4QJNR7.js → chunk-FKGVQKRX.js} +25 -12
- package/dist/{chunk-566W54AN.js → chunk-NYXDZCMP.js} +50 -14
- package/dist/{chunk-WSOFNJPD.js → chunk-PV4KCI2S.js} +50 -14
- package/dist/{chunk-SJPK5Y5U.js → chunk-SJ3IUYG2.js} +1 -1
- package/dist/{coordinator-prompt-Q53MIP2G.js → coordinator-prompt-A2JJ5X7B.js} +2 -2
- package/dist/{coordinator-prompt-ON5YI463.js → coordinator-prompt-BX2R5EMW.js} +2 -2
- package/dist/{global-workspace-MTBVW6GW.js → global-workspace-JJRPZNTY.js} +2 -2
- package/dist/{global-workspace-VWF5AOYN.js → global-workspace-PUJEGSOB.js} +2 -2
- package/dist/index.cjs +88 -26
- package/dist/index.d.cts +25 -1
- package/dist/index.d.ts +25 -1
- package/dist/index.js +7 -5
- package/dist/mcp/run-stdio.cjs +85 -26
- package/dist/mcp/run-stdio.js +5 -5
- package/dist/{orchestrator-NKG4R6TX.js → orchestrator-O3TVI7SN.js} +4 -4
- package/dist/{orchestrator-HEFTR7RA.js → orchestrator-O3V4UH73.js} +4 -4
- package/dist/{workspaces-QWGSPLMF.js → workspaces-FUOZIR3V.js} +2 -2
- package/dist/{workspaces-24YJWKJQ.js → workspaces-V3PZRTY5.js} +2 -2
- package/dist/{worktree-RYZOFNY7.js → worktree-4DNK2CK6.js} +1 -1
- package/dist/{worktree-VED7K2UL.js → worktree-UK62JCYF.js} +1 -1
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -2285,9 +2322,10 @@ ${result.stderr}`;
|
|
|
2285
2322
|
async function probeLocalMergeGate(cwd, gate) {
|
|
2286
2323
|
const mergeable = (gate?.mergeable ?? "").toUpperCase();
|
|
2287
2324
|
const mergeState = (gate?.mergeStateStatus ?? "").toUpperCase();
|
|
2288
|
-
const
|
|
2325
|
+
const githubConflicting = mergeable === "CONFLICTING" || mergeState === "DIRTY";
|
|
2326
|
+
const githubUnknown = mergeable === "UNKNOWN" || mergeState === "UNKNOWN";
|
|
2289
2327
|
const inQueue = gate ? prIsInMergeQueue(gate) : false;
|
|
2290
|
-
if (
|
|
2328
|
+
if (inQueue) return { gate, files: [] };
|
|
2291
2329
|
try {
|
|
2292
2330
|
const local = await detectLocalMergeConflicts(cwd, gate?.baseRefName ?? null);
|
|
2293
2331
|
if (local.conflicting) {
|
|
@@ -2303,13 +2341,9 @@ async function probeLocalMergeGate(cwd, gate) {
|
|
|
2303
2341
|
files: local.files
|
|
2304
2342
|
};
|
|
2305
2343
|
}
|
|
2306
|
-
if (gate && (
|
|
2344
|
+
if (gate && (githubConflicting || githubUnknown)) {
|
|
2307
2345
|
return {
|
|
2308
|
-
gate:
|
|
2309
|
-
...gate,
|
|
2310
|
-
mergeable: gate.mergeable === "UNKNOWN" ? "MERGEABLE" : gate.mergeable,
|
|
2311
|
-
mergeStateStatus: gate.mergeStateStatus === "UNKNOWN" ? "CLEAN" : gate.mergeStateStatus
|
|
2312
|
-
},
|
|
2346
|
+
gate: applyCleanLocalMergeTree(gate),
|
|
2313
2347
|
files: []
|
|
2314
2348
|
};
|
|
2315
2349
|
}
|
|
@@ -2440,6 +2474,7 @@ var PR_DETAILS_JSON_FIELDS = [
|
|
|
2440
2474
|
"isDraft",
|
|
2441
2475
|
"reviewDecision",
|
|
2442
2476
|
"author",
|
|
2477
|
+
"createdAt",
|
|
2443
2478
|
"baseRefName",
|
|
2444
2479
|
"headRefName",
|
|
2445
2480
|
"additions",
|
|
@@ -2469,6 +2504,7 @@ function parsePrDetailsView(view) {
|
|
|
2469
2504
|
isDraft: Boolean(view.isDraft),
|
|
2470
2505
|
reviewDecision: typeof view.reviewDecision === "string" && view.reviewDecision ? view.reviewDecision : null,
|
|
2471
2506
|
author: { login: author.login ?? "unknown", name: author.name ?? null },
|
|
2507
|
+
createdAt: typeof view.createdAt === "string" && view.createdAt ? view.createdAt : null,
|
|
2472
2508
|
baseRefName: String(view.baseRefName ?? ""),
|
|
2473
2509
|
headRefName: String(view.headRefName ?? ""),
|
|
2474
2510
|
additions: Number(view.additions ?? 0),
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
enrichWorkspacesWithGithub,
|
|
10
10
|
ensureGlobalCoordinatorCwd,
|
|
11
11
|
formatWorkspaceInventory
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-6IP4FWMK.js";
|
|
13
|
+
import "./chunk-PV4KCI2S.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-SJ3IUYG2.js";
|
|
11
|
+
import "./chunk-NYXDZCMP.js";
|
|
12
12
|
import "./chunk-6K64FJDD.js";
|
|
13
13
|
import "./chunk-2P4XKWV2.js";
|
|
14
14
|
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-6IP4FWMK.js";
|
|
21
|
+
import "./chunk-PV4KCI2S.js";
|
|
22
22
|
import "./chunk-D6JWYJ4P.js";
|
|
23
23
|
import "./chunk-RJC2MKXN.js";
|
|
24
24
|
import "./chunk-H547WSSZ.js";
|
|
@@ -15,8 +15,8 @@ import {
|
|
|
15
15
|
orchestratorSessionPoisonedByBuiltins,
|
|
16
16
|
slackCoordinatorSourceRef,
|
|
17
17
|
takenTeamSlugsForOrchestration
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-SJ3IUYG2.js";
|
|
19
|
+
import "./chunk-NYXDZCMP.js";
|
|
20
20
|
import "./chunk-6K64FJDD.js";
|
|
21
21
|
import "./chunk-2P4XKWV2.js";
|
|
22
22
|
import "./chunk-KJM3E3NF.js";
|
package/dist/index.cjs
CHANGED
|
@@ -4099,6 +4099,15 @@ function isContextCompactInProgress(text7) {
|
|
|
4099
4099
|
if (isContextCompactDone(t)) return false;
|
|
4100
4100
|
return /^Compressing context/i.test(t);
|
|
4101
4101
|
}
|
|
4102
|
+
function isSystemStatusThinking(event) {
|
|
4103
|
+
if (event.replace) return true;
|
|
4104
|
+
const t = (event.data ?? "").trim();
|
|
4105
|
+
if (!t) return true;
|
|
4106
|
+
if (/^API retry\b/i.test(t)) return true;
|
|
4107
|
+
if (/^MCP:/i.test(t)) return true;
|
|
4108
|
+
if (isContextCompactInProgress(t) || isContextCompactDone(t)) return true;
|
|
4109
|
+
return false;
|
|
4110
|
+
}
|
|
4102
4111
|
function looksLikeConversationSummary(text7) {
|
|
4103
4112
|
const t = text7.trim();
|
|
4104
4113
|
if (t.length < 80) return false;
|
|
@@ -4640,15 +4649,6 @@ function applyAgentEvent(parts, event) {
|
|
|
4640
4649
|
);
|
|
4641
4650
|
return next2;
|
|
4642
4651
|
}
|
|
4643
|
-
if (contextCompactInProgress(parts, event.parentId)) {
|
|
4644
|
-
return [
|
|
4645
|
-
...parts,
|
|
4646
|
-
compactToolPart(data, `compact-${parts.length}`, {
|
|
4647
|
-
parentId: event.parentId,
|
|
4648
|
-
status: "running"
|
|
4649
|
-
})
|
|
4650
|
-
];
|
|
4651
|
-
}
|
|
4652
4652
|
const runningSkillIdx = lastRunningSkillIndex(parts, event.parentId);
|
|
4653
4653
|
if (runningSkillIdx >= 0) {
|
|
4654
4654
|
const prev = parts[runningSkillIdx];
|
|
@@ -4667,6 +4667,15 @@ function applyAgentEvent(parts, event) {
|
|
|
4667
4667
|
);
|
|
4668
4668
|
return next2;
|
|
4669
4669
|
}
|
|
4670
|
+
if (contextCompactInProgress(parts, event.parentId)) {
|
|
4671
|
+
return [
|
|
4672
|
+
...parts,
|
|
4673
|
+
compactToolPart(data, `compact-${parts.length}`, {
|
|
4674
|
+
parentId: event.parentId,
|
|
4675
|
+
status: "running"
|
|
4676
|
+
})
|
|
4677
|
+
];
|
|
4678
|
+
}
|
|
4670
4679
|
const next = [...parts];
|
|
4671
4680
|
const last = next[next.length - 1];
|
|
4672
4681
|
if (last?.type === "text" && sameParentId(last.parentId, event.parentId)) {
|
|
@@ -4703,7 +4712,9 @@ function applyAgentEvent(parts, event) {
|
|
|
4703
4712
|
if (event.type === "thinking") {
|
|
4704
4713
|
const data = event.data;
|
|
4705
4714
|
if (!data) return parts;
|
|
4706
|
-
|
|
4715
|
+
if (!isSystemStatusThinking(event)) {
|
|
4716
|
+
parts = markRunningSkillsDone(parts, event.parentId);
|
|
4717
|
+
}
|
|
4707
4718
|
const next = [...parts];
|
|
4708
4719
|
if (event.replace) {
|
|
4709
4720
|
for (let i = next.length - 1; i >= 0; i--) {
|
|
@@ -5943,6 +5954,7 @@ function classifyWorktreeListBadges(group, viewerLogin = "", reviewLabel = "") {
|
|
|
5943
5954
|
}
|
|
5944
5955
|
];
|
|
5945
5956
|
}
|
|
5957
|
+
if (!normalizeViewerLogin(viewerLogin)) return [];
|
|
5946
5958
|
const draft = open.some((t) => t.prIsDraft);
|
|
5947
5959
|
const readyLabel = reviewLabel.trim();
|
|
5948
5960
|
const inReview = readyLabel ? labelsInclude(groupPrLabels(group), readyLabel) : !draft;
|
|
@@ -8516,6 +8528,23 @@ function prIsInMergeQueue(gate) {
|
|
|
8516
8528
|
if (gate.isInMergeQueue) return true;
|
|
8517
8529
|
return (gate.mergeStateStatus ?? "").toUpperCase() === "QUEUED";
|
|
8518
8530
|
}
|
|
8531
|
+
function applyCleanLocalMergeTree(gate) {
|
|
8532
|
+
const mergeable = (gate.mergeable ?? "").toUpperCase();
|
|
8533
|
+
const mergeState = (gate.mergeStateStatus ?? "").toUpperCase();
|
|
8534
|
+
const githubConflicting = mergeable === "CONFLICTING" || mergeState === "DIRTY";
|
|
8535
|
+
if (githubConflicting) {
|
|
8536
|
+
return {
|
|
8537
|
+
...gate,
|
|
8538
|
+
mergeable: "MERGEABLE",
|
|
8539
|
+
mergeStateStatus: mergeState === "BEHIND" ? "BEHIND" : "CLEAN"
|
|
8540
|
+
};
|
|
8541
|
+
}
|
|
8542
|
+
return {
|
|
8543
|
+
...gate,
|
|
8544
|
+
mergeable: mergeable === "UNKNOWN" || !mergeable ? "MERGEABLE" : gate.mergeable,
|
|
8545
|
+
mergeStateStatus: mergeState === "BEHIND" ? "BEHIND" : mergeState === "UNKNOWN" || !mergeState ? "CLEAN" : gate.mergeStateStatus
|
|
8546
|
+
};
|
|
8547
|
+
}
|
|
8519
8548
|
function ciChecksFailed(checks) {
|
|
8520
8549
|
if (!checks?.length) return false;
|
|
8521
8550
|
return checks.some(
|
|
@@ -9143,6 +9172,21 @@ async function listPrs(repoPath, opts) {
|
|
|
9143
9172
|
if (exitCode !== 0 || !stdout.trim()) return [];
|
|
9144
9173
|
return applyPrListResponse(stdout, { ...resolved, limit, viewerTeams });
|
|
9145
9174
|
}
|
|
9175
|
+
function prInfoFromGhView(view) {
|
|
9176
|
+
const author = view.author;
|
|
9177
|
+
const login = author?.login?.trim();
|
|
9178
|
+
return {
|
|
9179
|
+
number: Number(view.number),
|
|
9180
|
+
title: String(view.title ?? ""),
|
|
9181
|
+
headRefName: String(view.headRefName ?? ""),
|
|
9182
|
+
url: String(view.url ?? ""),
|
|
9183
|
+
isCrossRepository: Boolean(view.isCrossRepository),
|
|
9184
|
+
author: login ? { login } : null,
|
|
9185
|
+
isDraft: Boolean(view.isDraft),
|
|
9186
|
+
state: typeof view.state === "string" ? view.state : void 0,
|
|
9187
|
+
labels: labelNames(view.labels)
|
|
9188
|
+
};
|
|
9189
|
+
}
|
|
9146
9190
|
async function getPr(repoPath, number) {
|
|
9147
9191
|
const slug = await resolveGithubRepoSlug(repoPath);
|
|
9148
9192
|
const args = [
|
|
@@ -9150,12 +9194,16 @@ async function getPr(repoPath, number) {
|
|
|
9150
9194
|
"view",
|
|
9151
9195
|
String(number),
|
|
9152
9196
|
"--json",
|
|
9153
|
-
|
|
9197
|
+
PR_INFO_JSON_FIELDS
|
|
9154
9198
|
];
|
|
9155
9199
|
if (slug) args.push("--repo", slug);
|
|
9156
9200
|
const { stdout, exitCode } = await gh(args, repoPath, { reject: false });
|
|
9157
9201
|
if (exitCode !== 0 || !stdout.trim()) return null;
|
|
9158
|
-
|
|
9202
|
+
try {
|
|
9203
|
+
return prInfoFromGhView(JSON.parse(stdout));
|
|
9204
|
+
} catch {
|
|
9205
|
+
return null;
|
|
9206
|
+
}
|
|
9159
9207
|
}
|
|
9160
9208
|
function normalizeGitBranchName(ref) {
|
|
9161
9209
|
return ref.trim().replace(/^refs\/heads\//, "").replace(/^origin\//, "");
|
|
@@ -9209,7 +9257,7 @@ async function getPrForHeadBranch(repoPath, branch) {
|
|
|
9209
9257
|
"--head",
|
|
9210
9258
|
listHead,
|
|
9211
9259
|
"--json",
|
|
9212
|
-
|
|
9260
|
+
PR_INFO_JSON_FIELDS,
|
|
9213
9261
|
"--limit",
|
|
9214
9262
|
"1",
|
|
9215
9263
|
"--state",
|
|
@@ -9220,7 +9268,7 @@ async function getPrForHeadBranch(repoPath, branch) {
|
|
|
9220
9268
|
if (listed.exitCode === 0 && listed.stdout.trim()) {
|
|
9221
9269
|
try {
|
|
9222
9270
|
const rows = JSON.parse(listed.stdout);
|
|
9223
|
-
if (rows[0]) return rows[0];
|
|
9271
|
+
if (rows[0]) return prInfoFromGhView(rows[0]);
|
|
9224
9272
|
} catch {
|
|
9225
9273
|
}
|
|
9226
9274
|
}
|
|
@@ -9229,13 +9277,13 @@ async function getPrForHeadBranch(repoPath, branch) {
|
|
|
9229
9277
|
"view",
|
|
9230
9278
|
head,
|
|
9231
9279
|
"--json",
|
|
9232
|
-
|
|
9280
|
+
`${PR_INFO_JSON_FIELDS},state`
|
|
9233
9281
|
];
|
|
9234
9282
|
if (slug) viewArgs.push("--repo", slug);
|
|
9235
9283
|
const viewed = await gh(viewArgs, repoPath, { reject: false });
|
|
9236
9284
|
if (viewed.exitCode !== 0 || !viewed.stdout.trim()) return null;
|
|
9237
9285
|
try {
|
|
9238
|
-
const info = JSON.parse(viewed.stdout);
|
|
9286
|
+
const info = prInfoFromGhView(JSON.parse(viewed.stdout));
|
|
9239
9287
|
const state = (info.state ?? "OPEN").trim().toUpperCase();
|
|
9240
9288
|
if (state !== "OPEN") return null;
|
|
9241
9289
|
return info;
|
|
@@ -9335,9 +9383,10 @@ ${result.stderr}`;
|
|
|
9335
9383
|
async function probeLocalMergeGate(cwd, gate) {
|
|
9336
9384
|
const mergeable = (gate?.mergeable ?? "").toUpperCase();
|
|
9337
9385
|
const mergeState = (gate?.mergeStateStatus ?? "").toUpperCase();
|
|
9338
|
-
const
|
|
9386
|
+
const githubConflicting = mergeable === "CONFLICTING" || mergeState === "DIRTY";
|
|
9387
|
+
const githubUnknown = mergeable === "UNKNOWN" || mergeState === "UNKNOWN";
|
|
9339
9388
|
const inQueue = gate ? prIsInMergeQueue(gate) : false;
|
|
9340
|
-
if (
|
|
9389
|
+
if (inQueue) return { gate, files: [] };
|
|
9341
9390
|
try {
|
|
9342
9391
|
const local = await detectLocalMergeConflicts(cwd, gate?.baseRefName ?? null);
|
|
9343
9392
|
if (local.conflicting) {
|
|
@@ -9353,13 +9402,9 @@ async function probeLocalMergeGate(cwd, gate) {
|
|
|
9353
9402
|
files: local.files
|
|
9354
9403
|
};
|
|
9355
9404
|
}
|
|
9356
|
-
if (gate && (
|
|
9405
|
+
if (gate && (githubConflicting || githubUnknown)) {
|
|
9357
9406
|
return {
|
|
9358
|
-
gate:
|
|
9359
|
-
...gate,
|
|
9360
|
-
mergeable: gate.mergeable === "UNKNOWN" ? "MERGEABLE" : gate.mergeable,
|
|
9361
|
-
mergeStateStatus: gate.mergeStateStatus === "UNKNOWN" ? "CLEAN" : gate.mergeStateStatus
|
|
9362
|
-
},
|
|
9407
|
+
gate: applyCleanLocalMergeTree(gate),
|
|
9363
9408
|
files: []
|
|
9364
9409
|
};
|
|
9365
9410
|
}
|
|
@@ -9499,6 +9544,7 @@ function parsePrDetailsView(view) {
|
|
|
9499
9544
|
isDraft: Boolean(view.isDraft),
|
|
9500
9545
|
reviewDecision: typeof view.reviewDecision === "string" && view.reviewDecision ? view.reviewDecision : null,
|
|
9501
9546
|
author: { login: author.login ?? "unknown", name: author.name ?? null },
|
|
9547
|
+
createdAt: typeof view.createdAt === "string" && view.createdAt ? view.createdAt : null,
|
|
9502
9548
|
baseRefName: String(view.baseRefName ?? ""),
|
|
9503
9549
|
headRefName: String(view.headRefName ?? ""),
|
|
9504
9550
|
additions: Number(view.additions ?? 0),
|
|
@@ -10274,7 +10320,7 @@ function allocateTeamSlug(repoPath) {
|
|
|
10274
10320
|
}
|
|
10275
10321
|
throw new Error("No available soccer team worktree directories left");
|
|
10276
10322
|
}
|
|
10277
|
-
var import_node_crypto8, import_node_fs21, import_node_os6, import_node_path24, PR_DETAILS_JSON_FIELDS;
|
|
10323
|
+
var import_node_crypto8, import_node_fs21, import_node_os6, import_node_path24, PR_INFO_JSON_FIELDS, PR_DETAILS_JSON_FIELDS;
|
|
10278
10324
|
var init_worktree = __esm({
|
|
10279
10325
|
"src/git/worktree.ts"() {
|
|
10280
10326
|
"use strict";
|
|
@@ -10300,6 +10346,7 @@ var init_worktree = __esm({
|
|
|
10300
10346
|
init_git_auth_mode();
|
|
10301
10347
|
init_workspace_scratch();
|
|
10302
10348
|
init_worktree_labels();
|
|
10349
|
+
PR_INFO_JSON_FIELDS = "number,title,headRefName,url,isCrossRepository,author,isDraft,labels";
|
|
10303
10350
|
PR_DETAILS_JSON_FIELDS = [
|
|
10304
10351
|
"number",
|
|
10305
10352
|
"title",
|
|
@@ -10309,6 +10356,7 @@ var init_worktree = __esm({
|
|
|
10309
10356
|
"isDraft",
|
|
10310
10357
|
"reviewDecision",
|
|
10311
10358
|
"author",
|
|
10359
|
+
"createdAt",
|
|
10312
10360
|
"baseRefName",
|
|
10313
10361
|
"headRefName",
|
|
10314
10362
|
"additions",
|
|
@@ -20908,6 +20956,7 @@ async function createThread(input, _onSetupLine) {
|
|
|
20908
20956
|
let prTitle = null;
|
|
20909
20957
|
let prAuthorLogin2 = null;
|
|
20910
20958
|
let prLabels = [];
|
|
20959
|
+
let prIsDraft = false;
|
|
20911
20960
|
if (sourceType === "pr") {
|
|
20912
20961
|
const num2 = Number(input.sourceRef.replace(/^#/, ""));
|
|
20913
20962
|
if (!Number.isFinite(num2)) throw new Error(`Invalid PR number: ${input.sourceRef}`);
|
|
@@ -20925,6 +20974,7 @@ async function createThread(input, _onSetupLine) {
|
|
|
20925
20974
|
prUrl = pr.url;
|
|
20926
20975
|
prAuthorLogin2 = pr.author?.login?.trim() || null;
|
|
20927
20976
|
prLabels = pr.labels ?? [];
|
|
20977
|
+
prIsDraft = Boolean(pr.isDraft);
|
|
20928
20978
|
const localFetchBranch = `sideboard-pr-${pr.number}`;
|
|
20929
20979
|
await fetchPrHead(repoPath, pr.number, localFetchBranch);
|
|
20930
20980
|
sourceRef = localFetchBranch;
|
|
@@ -20949,6 +20999,7 @@ async function createThread(input, _onSetupLine) {
|
|
|
20949
20999
|
prTitle = existing.title;
|
|
20950
21000
|
prAuthorLogin2 = existing.author?.login?.trim() || null;
|
|
20951
21001
|
prLabels = existing.labels ?? [];
|
|
21002
|
+
prIsDraft = Boolean(existing.isDraft);
|
|
20952
21003
|
}
|
|
20953
21004
|
}
|
|
20954
21005
|
}
|
|
@@ -20985,7 +21036,8 @@ async function createThread(input, _onSetupLine) {
|
|
|
20985
21036
|
prUrl,
|
|
20986
21037
|
prTitle,
|
|
20987
21038
|
prAuthorLogin: prAuthorLogin2,
|
|
20988
|
-
prLabels
|
|
21039
|
+
prLabels,
|
|
21040
|
+
prIsDraft
|
|
20989
21041
|
});
|
|
20990
21042
|
writeThread(thread);
|
|
20991
21043
|
await ensureWorkspace(repoPath);
|
|
@@ -26548,6 +26600,14 @@ var init_orchestrator = __esm({
|
|
|
26548
26600
|
const thread = this.requireThread(threadRef);
|
|
26549
26601
|
return discoverSkills(thread.worktreePath);
|
|
26550
26602
|
}
|
|
26603
|
+
/** Skills for a project folder before a worktree exists (create modal). */
|
|
26604
|
+
listSkillsForRepo(repoPath) {
|
|
26605
|
+
const root = repoPath.trim();
|
|
26606
|
+
if (!root || root === "/" || root === ".") {
|
|
26607
|
+
return discoverSkills("/__sideboard_no_workspace__");
|
|
26608
|
+
}
|
|
26609
|
+
return discoverSkills(root);
|
|
26610
|
+
}
|
|
26551
26611
|
async previewLand(threadRef) {
|
|
26552
26612
|
const thread = this.requireThread(threadRef);
|
|
26553
26613
|
this.assertNotGlobal(thread, "Land");
|
|
@@ -27792,6 +27852,7 @@ __export(index_exports, {
|
|
|
27792
27852
|
isSlackOAuthCancelled: () => isSlackOAuthCancelled,
|
|
27793
27853
|
isStaleLastErrorDuringTurn: () => isStaleLastErrorDuringTurn,
|
|
27794
27854
|
isSubagentToolName: () => isSubagentToolName,
|
|
27855
|
+
isSystemStatusThinking: () => isSystemStatusThinking,
|
|
27795
27856
|
isTerminalTaskState: () => isTerminalTaskState,
|
|
27796
27857
|
isThinkingEffort: () => isThinkingEffort,
|
|
27797
27858
|
isThisProcessDesktopHost: () => isThisProcessDesktopHost,
|
|
@@ -37633,6 +37694,7 @@ async function startSlackRelayServer(opts) {
|
|
|
37633
37694
|
isSlackOAuthCancelled,
|
|
37634
37695
|
isStaleLastErrorDuringTurn,
|
|
37635
37696
|
isSubagentToolName,
|
|
37697
|
+
isSystemStatusThinking,
|
|
37636
37698
|
isTerminalTaskState,
|
|
37637
37699
|
isThinkingEffort,
|
|
37638
37700
|
isThisProcessDesktopHost,
|