@sideboard-ai/core 0.1.81 → 0.1.84
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/cursor-runner.cjs +106 -53
- package/dist/agents/cursor-runner.js +96 -55
- package/dist/{agents-UQ7D6U6L.js → agents-JFXM66QA.js} +7 -6
- package/dist/{agents-EBKJ55PN.js → agents-OPTHS4IX.js} +5 -5
- package/dist/{app-settings-6IOQYGBK.js → app-settings-K6RFCRF6.js} +2 -1
- package/dist/{app-settings-NILNWNNQ.js → app-settings-PEXK5VEX.js} +1 -1
- package/dist/chunk-5KLC2MWZ.js +40 -0
- package/dist/{chunk-XKNBSYA7.js → chunk-AY53MPDE.js} +39 -1
- package/dist/{chunk-4AVU4QXO.js → chunk-BBQ6HXKS.js} +67 -17
- package/dist/{chunk-SEOICVGB.js → chunk-CBJSPTBG.js} +30 -6
- package/dist/{chunk-FUUVPN4A.js → chunk-CKBIQ54F.js} +78 -49
- package/dist/{chunk-IFPN6TER.js → chunk-I3FRXL7J.js} +4 -1
- package/dist/{chunk-CQBQWX73.js → chunk-JPHG2KCC.js} +8 -3
- package/dist/{chunk-4HJK57XU.js → chunk-NW7MEJHO.js} +8 -3
- package/dist/{chunk-K553XK7M.js → chunk-ODZ2ZOA4.js} +2 -2
- package/dist/{chunk-6F2TQFJE.js → chunk-OIEFHOP7.js} +3 -3
- package/dist/{chunk-XNECBC6T.js → chunk-R753UFSX.js} +39 -11
- package/dist/{chunk-TDJ43HUD.js → chunk-UN3LVQB2.js} +2 -2
- package/dist/{chunk-P5VDPGAN.js → chunk-WJ5TINR6.js} +3 -3
- package/dist/{chunk-YVVXWWCC.js → chunk-XW47PL6A.js} +81 -49
- package/dist/{coordinator-prompt-NYNEFKIV.js → coordinator-prompt-DOIOSLUN.js} +3 -3
- package/dist/{coordinator-prompt-JQF72JKX.js → coordinator-prompt-RCTIIZ6C.js} +4 -3
- package/dist/{global-workspace-NUMUJRWG.js → global-workspace-33BIG7KK.js} +4 -4
- package/dist/{global-workspace-DZM4ZFGU.js → global-workspace-73OAKD3C.js} +5 -4
- package/dist/index.cjs +235 -88
- package/dist/index.d.cts +36 -9
- package/dist/index.d.ts +36 -9
- package/dist/index.js +69 -45
- package/dist/mcp/run-stdio.cjs +233 -88
- package/dist/mcp/run-stdio.js +60 -43
- package/dist/{workspaces-QLRCOXAY.js → workspaces-SRITISKA.js} +6 -5
- package/dist/{workspaces-SUU2GO3A.js → workspaces-WDLY34MX.js} +5 -5
- package/dist/{worktree-5VLLFI5W.js → worktree-SGZVAWOQ.js} +3 -2
- package/dist/{worktree-UNSOCYZU.js → worktree-TUAO74SI.js} +2 -2
- package/package.json +1 -1
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
ensureGlobalCoordinatorCwd
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-NW7MEJHO.js";
|
|
6
6
|
import {
|
|
7
7
|
allocateTeamName,
|
|
8
8
|
takenSlugsFromThread,
|
|
9
9
|
teamSlugFromName
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-CKBIQ54F.js";
|
|
11
11
|
import {
|
|
12
12
|
createEmptyThread,
|
|
13
13
|
listThreads,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
resolveNewThreadOptions,
|
|
19
19
|
resolveThreadDefaults
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-AY53MPDE.js";
|
|
21
21
|
import {
|
|
22
22
|
globalAgentCwd
|
|
23
23
|
} from "./chunk-7MV3RXSC.js";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
getGithubGitAuthMode,
|
|
6
6
|
getGithubPat
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-I3FRXL7J.js";
|
|
8
8
|
import {
|
|
9
9
|
listThreads
|
|
10
10
|
} from "./chunk-FWJYLBO6.js";
|
|
@@ -882,11 +882,25 @@ function formatGhLandError(raw, opts) {
|
|
|
882
882
|
}
|
|
883
883
|
return detail || "Failed to create or update pull request";
|
|
884
884
|
}
|
|
885
|
+
function isPrNotMergeableError(text) {
|
|
886
|
+
return /not mergeable|cannot be cleanly created|cannot merge cleanly|Merge conflict|\bCONFLICTING\b|must be (updated|rebased)|branch is out of date|needs? to be (updated|rebased)|Resolve conflicts or update the branch/i.test(
|
|
887
|
+
text
|
|
888
|
+
);
|
|
889
|
+
}
|
|
890
|
+
function formatMergePrError(raw) {
|
|
891
|
+
const trimmed = raw.trim();
|
|
892
|
+
if (!trimmed) return "gh pr merge failed";
|
|
893
|
+
if (isPrNotMergeableError(trimmed)) {
|
|
894
|
+
return "This pull request cannot merge cleanly into the base branch. Resolve conflicts or update the branch, then retry.";
|
|
895
|
+
}
|
|
896
|
+
return extractGhErrorDetail(trimmed) || trimmed;
|
|
897
|
+
}
|
|
885
898
|
function formatIpcInvokeError(err) {
|
|
886
899
|
let msg = err instanceof Error ? err.message : String(err);
|
|
887
900
|
msg = msg.replace(/^Error invoking remote method '[^']+':\s*/i, "");
|
|
888
901
|
msg = msg.replace(/^ExecaError:\s*/i, "");
|
|
889
902
|
msg = msg.replace(/^Error:\s*/i, "");
|
|
903
|
+
if (isPrNotMergeableError(msg)) return formatMergePrError(msg);
|
|
890
904
|
return formatGhLandError(msg);
|
|
891
905
|
}
|
|
892
906
|
|
|
@@ -1599,6 +1613,41 @@ ${result.stderr}`;
|
|
|
1599
1613
|
].slice(0, 20) : [];
|
|
1600
1614
|
return { conflicting, base: baseName, files };
|
|
1601
1615
|
}
|
|
1616
|
+
async function probeLocalMergeGate(cwd, gate) {
|
|
1617
|
+
const mergeable = (gate?.mergeable ?? "").toUpperCase();
|
|
1618
|
+
const mergeState = (gate?.mergeStateStatus ?? "").toUpperCase();
|
|
1619
|
+
const alreadyConflicting = mergeable === "CONFLICTING" || mergeState === "DIRTY";
|
|
1620
|
+
const inQueue = gate ? prIsInMergeQueue(gate) : false;
|
|
1621
|
+
if (alreadyConflicting || inQueue) return { gate, files: [] };
|
|
1622
|
+
try {
|
|
1623
|
+
const local = await detectLocalMergeConflicts(cwd, gate?.baseRefName ?? null);
|
|
1624
|
+
if (local.conflicting) {
|
|
1625
|
+
return {
|
|
1626
|
+
gate: {
|
|
1627
|
+
mergeable: "CONFLICTING",
|
|
1628
|
+
mergeStateStatus: "DIRTY",
|
|
1629
|
+
reviewDecision: gate?.reviewDecision ?? null,
|
|
1630
|
+
baseRefName: local.base,
|
|
1631
|
+
url: gate?.url ?? null,
|
|
1632
|
+
isInMergeQueue: false
|
|
1633
|
+
},
|
|
1634
|
+
files: local.files
|
|
1635
|
+
};
|
|
1636
|
+
}
|
|
1637
|
+
if (gate && (mergeable === "UNKNOWN" || mergeState === "UNKNOWN")) {
|
|
1638
|
+
return {
|
|
1639
|
+
gate: {
|
|
1640
|
+
...gate,
|
|
1641
|
+
mergeable: gate.mergeable === "UNKNOWN" ? "MERGEABLE" : gate.mergeable,
|
|
1642
|
+
mergeStateStatus: gate.mergeStateStatus === "UNKNOWN" ? "CLEAN" : gate.mergeStateStatus
|
|
1643
|
+
},
|
|
1644
|
+
files: []
|
|
1645
|
+
};
|
|
1646
|
+
}
|
|
1647
|
+
} catch {
|
|
1648
|
+
}
|
|
1649
|
+
return { gate, files: [] };
|
|
1650
|
+
}
|
|
1602
1651
|
async function getPrChecks(cwd, selector) {
|
|
1603
1652
|
const slug = await resolveGithubRepoSlug(cwd);
|
|
1604
1653
|
const args = [
|
|
@@ -1634,47 +1683,9 @@ async function getPrChecks(cwd, selector) {
|
|
|
1634
1683
|
}
|
|
1635
1684
|
}
|
|
1636
1685
|
let gate = await fetchPrMergeGate(cwd, selector, slug);
|
|
1637
|
-
const
|
|
1638
|
-
|
|
1639
|
-
const
|
|
1640
|
-
const inQueue = gate ? prIsInMergeQueue(gate) : false;
|
|
1641
|
-
const needsLocalProbe = !alreadyConflicting && !inQueue;
|
|
1642
|
-
if (needsLocalProbe) {
|
|
1643
|
-
try {
|
|
1644
|
-
const local = await detectLocalMergeConflicts(cwd, gate?.baseRefName ?? null);
|
|
1645
|
-
if (local.conflicting) {
|
|
1646
|
-
const fileHint = local.files.length > 0 ? ` Conflicting paths: ${local.files.slice(0, 8).join(", ")}${local.files.length > 8 ? "\u2026" : ""}.` : "";
|
|
1647
|
-
gate = {
|
|
1648
|
-
mergeable: "CONFLICTING",
|
|
1649
|
-
mergeStateStatus: "DIRTY",
|
|
1650
|
-
reviewDecision: gate?.reviewDecision ?? null,
|
|
1651
|
-
baseRefName: local.base,
|
|
1652
|
-
url: gate?.url ?? null,
|
|
1653
|
-
isInMergeQueue: false
|
|
1654
|
-
};
|
|
1655
|
-
const ciFailed2 = ciChecks.some((c) => c.bucket === "fail");
|
|
1656
|
-
const review2 = (gate.reviewDecision ?? "").toUpperCase();
|
|
1657
|
-
const hasReviewRow2 = review2 === "CHANGES_REQUESTED" || review2 === "REVIEW_REQUIRED";
|
|
1658
|
-
const gateRows2 = buildMergeGateChecks(gate, {
|
|
1659
|
-
suppressGenericBlocked: ciFailed2 || hasReviewRow2
|
|
1660
|
-
}).map(
|
|
1661
|
-
(row) => row.kind === "mergeability" && row.name === "Merge conflicts" ? {
|
|
1662
|
-
...row,
|
|
1663
|
-
description: `${row.description ?? ""}${fileHint}`.trim()
|
|
1664
|
-
} : row
|
|
1665
|
-
);
|
|
1666
|
-
return [...gateRows2, ...ciChecks];
|
|
1667
|
-
}
|
|
1668
|
-
if (gate && (mergeable === "UNKNOWN" || mergeState === "UNKNOWN")) {
|
|
1669
|
-
gate = {
|
|
1670
|
-
...gate,
|
|
1671
|
-
mergeable: gate.mergeable === "UNKNOWN" ? "MERGEABLE" : gate.mergeable,
|
|
1672
|
-
mergeStateStatus: gate.mergeStateStatus === "UNKNOWN" ? "CLEAN" : gate.mergeStateStatus
|
|
1673
|
-
};
|
|
1674
|
-
}
|
|
1675
|
-
} catch {
|
|
1676
|
-
}
|
|
1677
|
-
}
|
|
1686
|
+
const probed = await probeLocalMergeGate(cwd, gate);
|
|
1687
|
+
gate = probed.gate;
|
|
1688
|
+
const fileHint = probed.files.length > 0 ? ` Conflicting paths: ${probed.files.slice(0, 8).join(", ")}${probed.files.length > 8 ? "\u2026" : ""}.` : "";
|
|
1678
1689
|
if (!gate) {
|
|
1679
1690
|
return ciChecks;
|
|
1680
1691
|
}
|
|
@@ -1684,7 +1695,12 @@ async function getPrChecks(cwd, selector) {
|
|
|
1684
1695
|
const gateRows = buildMergeGateChecks(gate, {
|
|
1685
1696
|
// Avoid duplicating "blocked" when CI failures or review rows already explain it.
|
|
1686
1697
|
suppressGenericBlocked: ciFailed || hasReviewRow
|
|
1687
|
-
})
|
|
1698
|
+
}).map(
|
|
1699
|
+
(row) => fileHint && row.kind === "mergeability" && row.name === "Merge conflicts" ? {
|
|
1700
|
+
...row,
|
|
1701
|
+
description: `${row.description ?? ""}${fileHint}`.trim()
|
|
1702
|
+
} : row
|
|
1703
|
+
);
|
|
1688
1704
|
return [...gateRows, ...ciChecks];
|
|
1689
1705
|
}
|
|
1690
1706
|
async function getPrMeta(cwd, selector) {
|
|
@@ -1694,7 +1710,7 @@ async function getPrMeta(cwd, selector) {
|
|
|
1694
1710
|
"view",
|
|
1695
1711
|
selector,
|
|
1696
1712
|
"--json",
|
|
1697
|
-
"number,title,url,state,isDraft,reviewDecision,baseRefName,headRefName,isInMergeQueue,mergeStateStatus"
|
|
1713
|
+
"number,title,url,state,isDraft,reviewDecision,baseRefName,headRefName,isInMergeQueue,mergeStateStatus,mergeable"
|
|
1698
1714
|
];
|
|
1699
1715
|
if (slug) viewArgs.push("--repo", slug);
|
|
1700
1716
|
let { stdout, exitCode, stderr } = await gh(viewArgs, cwd, { reject: false });
|
|
@@ -1704,7 +1720,7 @@ async function getPrMeta(cwd, selector) {
|
|
|
1704
1720
|
"view",
|
|
1705
1721
|
selector,
|
|
1706
1722
|
"--json",
|
|
1707
|
-
"number,title,url,state,isDraft,reviewDecision,baseRefName,headRefName,mergeStateStatus"
|
|
1723
|
+
"number,title,url,state,isDraft,reviewDecision,baseRefName,headRefName,mergeStateStatus,mergeable"
|
|
1708
1724
|
];
|
|
1709
1725
|
if (slug) retry.push("--repo", slug);
|
|
1710
1726
|
({ stdout, exitCode, stderr } = await gh(retry, cwd, { reject: false }));
|
|
@@ -1715,16 +1731,28 @@ async function getPrMeta(cwd, selector) {
|
|
|
1715
1731
|
}
|
|
1716
1732
|
try {
|
|
1717
1733
|
const view = JSON.parse(stdout);
|
|
1734
|
+
const gate = {
|
|
1735
|
+
mergeable: typeof view.mergeable === "string" && view.mergeable ? view.mergeable : null,
|
|
1736
|
+
mergeStateStatus: typeof view.mergeStateStatus === "string" && view.mergeStateStatus ? view.mergeStateStatus : null,
|
|
1737
|
+
reviewDecision: typeof view.reviewDecision === "string" && view.reviewDecision ? view.reviewDecision : null,
|
|
1738
|
+
baseRefName: String(view.baseRefName ?? ""),
|
|
1739
|
+
url: String(view.url ?? ""),
|
|
1740
|
+
isInMergeQueue: parseInMergeQueue(view)
|
|
1741
|
+
};
|
|
1742
|
+
const probed = await probeLocalMergeGate(cwd, gate);
|
|
1743
|
+
const resolved = probed.gate ?? gate;
|
|
1718
1744
|
return {
|
|
1719
1745
|
number: Number(view.number),
|
|
1720
1746
|
title: String(view.title ?? ""),
|
|
1721
1747
|
url: String(view.url ?? ""),
|
|
1722
1748
|
state: String(view.state ?? ""),
|
|
1723
1749
|
isDraft: Boolean(view.isDraft),
|
|
1724
|
-
reviewDecision:
|
|
1725
|
-
baseRefName: String(view.baseRefName ?? ""),
|
|
1750
|
+
reviewDecision: resolved.reviewDecision,
|
|
1751
|
+
baseRefName: resolved.baseRefName || String(view.baseRefName ?? ""),
|
|
1726
1752
|
headRefName: String(view.headRefName ?? ""),
|
|
1727
|
-
isInMergeQueue:
|
|
1753
|
+
isInMergeQueue: Boolean(resolved.isInMergeQueue),
|
|
1754
|
+
mergeable: resolved.mergeable,
|
|
1755
|
+
mergeStateStatus: resolved.mergeStateStatus
|
|
1728
1756
|
};
|
|
1729
1757
|
} catch {
|
|
1730
1758
|
return null;
|
|
@@ -2192,7 +2220,9 @@ async function mergePr(cwd, selector, opts) {
|
|
|
2192
2220
|
if (slug) args.push("--repo", slug);
|
|
2193
2221
|
const { exitCode, stderr, stdout } = await gh(args, cwd, { reject: false });
|
|
2194
2222
|
if (exitCode !== 0) {
|
|
2195
|
-
throw new Error(
|
|
2223
|
+
throw new Error(
|
|
2224
|
+
formatMergePrError(stderr.trim() || stdout.trim() || "gh pr merge failed")
|
|
2225
|
+
);
|
|
2196
2226
|
}
|
|
2197
2227
|
const after = await gh(viewArgs, cwd, { reject: false });
|
|
2198
2228
|
if (after.exitCode === 0 && after.stdout.trim()) {
|
|
@@ -2353,6 +2383,8 @@ export {
|
|
|
2353
2383
|
formatRateLimitResetHint,
|
|
2354
2384
|
extractGhErrorDetail,
|
|
2355
2385
|
formatGhLandError,
|
|
2386
|
+
isPrNotMergeableError,
|
|
2387
|
+
formatMergePrError,
|
|
2356
2388
|
formatIpcInvokeError,
|
|
2357
2389
|
appendIndexedGitConfig,
|
|
2358
2390
|
githubAgentGitEnv,
|
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
enrichWorkspacesWithGithub,
|
|
10
10
|
ensureGlobalCoordinatorCwd,
|
|
11
11
|
formatWorkspaceInventory
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-NW7MEJHO.js";
|
|
13
|
+
import "./chunk-CKBIQ54F.js";
|
|
14
14
|
import "./chunk-B3SJXYIJ.js";
|
|
15
15
|
import "./chunk-7FD7COKE.js";
|
|
16
16
|
import "./chunk-AE5VBOFE.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-AY53MPDE.js";
|
|
18
18
|
import "./chunk-NSTQ6QKD.js";
|
|
19
19
|
import "./chunk-KGZBYWZ3.js";
|
|
20
20
|
import "./chunk-7MV3RXSC.js";
|
|
@@ -7,10 +7,11 @@ import {
|
|
|
7
7
|
enrichWorkspacesWithGithub,
|
|
8
8
|
ensureGlobalCoordinatorCwd,
|
|
9
9
|
formatWorkspaceInventory
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-JPHG2KCC.js";
|
|
11
|
+
import "./chunk-XW47PL6A.js";
|
|
12
12
|
import "./chunk-FKOIHGKV.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-I3FRXL7J.js";
|
|
14
|
+
import "./chunk-5KLC2MWZ.js";
|
|
14
15
|
import "./chunk-JT7R45JB.js";
|
|
15
16
|
import "./chunk-FWJYLBO6.js";
|
|
16
17
|
import "./chunk-77WWLBCI.js";
|
|
@@ -16,13 +16,13 @@ import {
|
|
|
16
16
|
orchestratorSessionPoisonedByBuiltins,
|
|
17
17
|
slackCoordinatorSourceRef,
|
|
18
18
|
takenTeamSlugsForOrchestration
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
19
|
+
} from "./chunk-WJ5TINR6.js";
|
|
20
|
+
import "./chunk-NW7MEJHO.js";
|
|
21
|
+
import "./chunk-CKBIQ54F.js";
|
|
22
22
|
import "./chunk-B3SJXYIJ.js";
|
|
23
23
|
import "./chunk-7FD7COKE.js";
|
|
24
24
|
import "./chunk-AE5VBOFE.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-AY53MPDE.js";
|
|
26
26
|
import "./chunk-NSTQ6QKD.js";
|
|
27
27
|
import "./chunk-KGZBYWZ3.js";
|
|
28
28
|
import {
|
|
@@ -14,11 +14,12 @@ import {
|
|
|
14
14
|
orchestratorSessionPoisonedByBuiltins,
|
|
15
15
|
slackCoordinatorSourceRef,
|
|
16
16
|
takenTeamSlugsForOrchestration
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-OIEFHOP7.js";
|
|
18
|
+
import "./chunk-JPHG2KCC.js";
|
|
19
|
+
import "./chunk-XW47PL6A.js";
|
|
20
20
|
import "./chunk-FKOIHGKV.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-I3FRXL7J.js";
|
|
22
|
+
import "./chunk-5KLC2MWZ.js";
|
|
22
23
|
import "./chunk-JT7R45JB.js";
|
|
23
24
|
import "./chunk-FWJYLBO6.js";
|
|
24
25
|
import "./chunk-77WWLBCI.js";
|