@sideboard-ai/core 0.1.299 → 0.1.300
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.
|
@@ -2093,13 +2093,13 @@ function isClosedPrState(prUrl, prState) {
|
|
|
2093
2093
|
if (!prUrl?.trim()) return false;
|
|
2094
2094
|
return (prState ?? "").trim().toUpperCase() === "CLOSED";
|
|
2095
2095
|
}
|
|
2096
|
-
function listBadge(id, title,
|
|
2096
|
+
function listBadge(id, title, note) {
|
|
2097
2097
|
return {
|
|
2098
2098
|
id,
|
|
2099
2099
|
label: id,
|
|
2100
|
-
title:
|
|
2100
|
+
title: note ? `${title} \xB7 ${note}` : title,
|
|
2101
2101
|
mod: `is-${id}`,
|
|
2102
|
-
...
|
|
2102
|
+
...note ? { conflict: true } : {}
|
|
2103
2103
|
};
|
|
2104
2104
|
}
|
|
2105
2105
|
function hasMergeConflict(thread) {
|
|
@@ -2110,69 +2110,52 @@ function hasMergeConflict(thread) {
|
|
|
2110
2110
|
isInMergeQueue: thread.prIsInMergeQueue
|
|
2111
2111
|
}) === "conflicts";
|
|
2112
2112
|
}
|
|
2113
|
-
function
|
|
2113
|
+
function blockerNote(group) {
|
|
2114
2114
|
const open = group.filter(
|
|
2115
2115
|
(thread) => isOpenPrState(thread.prUrl, thread.prState) && !thread.prIsInMergeQueue
|
|
2116
2116
|
);
|
|
2117
|
+
const parts = [];
|
|
2117
2118
|
if (open.some(
|
|
2118
2119
|
(thread) => thread.prChecksFailed || mergeStateSuggestsCheckFailure({
|
|
2119
2120
|
mergeStateStatus: thread.prMergeStateStatus ?? null,
|
|
2120
2121
|
reviewDecision: thread.prReviewDecision ?? null
|
|
2121
2122
|
})
|
|
2122
2123
|
)) {
|
|
2123
|
-
|
|
2124
|
-
}
|
|
2125
|
-
if (open.some(
|
|
2124
|
+
parts.push("checks failing");
|
|
2125
|
+
} else if (open.some(
|
|
2126
2126
|
(thread) => !thread.prIsDraft && (thread.prReviewDecision ?? "").trim().toUpperCase() === "CHANGES_REQUESTED"
|
|
2127
2127
|
)) {
|
|
2128
|
-
|
|
2129
|
-
}
|
|
2130
|
-
return void 0;
|
|
2131
|
-
}
|
|
2132
|
-
function withPrError(badges, error, conflict) {
|
|
2133
|
-
if (!error) return badges;
|
|
2134
|
-
const [first] = badges;
|
|
2135
|
-
if (!first) {
|
|
2136
|
-
return [
|
|
2137
|
-
{
|
|
2138
|
-
id: "error",
|
|
2139
|
-
label: error.label,
|
|
2140
|
-
title: conflict ? `${error.title} \xB7 merge conflicts` : error.title,
|
|
2141
|
-
mod: "is-error",
|
|
2142
|
-
...conflict ? { conflict: true } : {}
|
|
2143
|
-
}
|
|
2144
|
-
];
|
|
2128
|
+
parts.push("changes requested");
|
|
2145
2129
|
}
|
|
2146
|
-
|
|
2130
|
+
if (open.some(hasMergeConflict)) parts.push("merge conflicts");
|
|
2131
|
+
return parts.length > 0 ? parts.join(" \xB7 ") : void 0;
|
|
2147
2132
|
}
|
|
2148
2133
|
function classifyWorktreeListBadges(group, viewerLogin = "", reviewLabel = "") {
|
|
2149
2134
|
if (group.length === 0 || group.some((t) => t.cowboy)) return [];
|
|
2150
2135
|
if (group.some((t) => isMergedPrState(t.prUrl, t.prState))) {
|
|
2151
2136
|
return [listBadge("merged", "Merged")];
|
|
2152
2137
|
}
|
|
2153
|
-
const
|
|
2154
|
-
const error = groupPrError(group);
|
|
2155
|
-
const finish2 = (badges) => withPrError(badges, error, conflict);
|
|
2138
|
+
const note = blockerNote(group);
|
|
2156
2139
|
if (group.some((t) => isApprovedOpenPr(t))) {
|
|
2157
|
-
return
|
|
2140
|
+
return [listBadge("approved", "Approved, not merged", note)];
|
|
2158
2141
|
}
|
|
2159
2142
|
const open = group.filter((t) => isOpenPrState(t.prUrl, t.prState));
|
|
2160
2143
|
if (open.length === 0) {
|
|
2161
2144
|
if (group.some((t) => isClosedPrState(t.prUrl, t.prState))) return [];
|
|
2162
|
-
return
|
|
2145
|
+
return [listBadge("new", "No pull request")];
|
|
2163
2146
|
}
|
|
2164
2147
|
const ownership = classifyWorktreeOwnership(group, viewerLogin);
|
|
2165
2148
|
if (ownership === "reviewing") {
|
|
2166
|
-
return
|
|
2149
|
+
return [listBadge("review", "Someone else's PR", note)];
|
|
2167
2150
|
}
|
|
2168
|
-
if (!normalizeViewerLogin(viewerLogin)) return
|
|
2151
|
+
if (!normalizeViewerLogin(viewerLogin)) return [];
|
|
2169
2152
|
if (!open.some((t) => !t.prIsDraft)) {
|
|
2170
|
-
return
|
|
2153
|
+
return [listBadge("draft", "Draft pull request", note)];
|
|
2171
2154
|
}
|
|
2172
2155
|
const readyLabel = reviewLabel.trim();
|
|
2173
2156
|
const inReview = readyLabel ? labelsInclude(groupPrLabels(group), readyLabel) : true;
|
|
2174
|
-
if (!inReview) return
|
|
2175
|
-
return
|
|
2157
|
+
if (!inReview) return [];
|
|
2158
|
+
return [listBadge("pending", "Waiting for review", note)];
|
|
2176
2159
|
}
|
|
2177
2160
|
|
|
2178
2161
|
// src/board/home-board.ts
|
|
@@ -6671,7 +6654,7 @@ function formatScheduledPrompt(name, prompt) {
|
|
|
6671
6654
|
${prompt}`;
|
|
6672
6655
|
}
|
|
6673
6656
|
async function defaultDeps() {
|
|
6674
|
-
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-
|
|
6657
|
+
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-FVVDOQVD.js");
|
|
6675
6658
|
const orch = getOrchestrator2();
|
|
6676
6659
|
return {
|
|
6677
6660
|
findThread: (id) => findThreadByRef(id),
|
package/dist/index.cjs
CHANGED
|
@@ -6613,13 +6613,13 @@ function isClosedPrState(prUrl, prState) {
|
|
|
6613
6613
|
if (!prUrl?.trim()) return false;
|
|
6614
6614
|
return (prState ?? "").trim().toUpperCase() === "CLOSED";
|
|
6615
6615
|
}
|
|
6616
|
-
function listBadge(id, title,
|
|
6616
|
+
function listBadge(id, title, note) {
|
|
6617
6617
|
return {
|
|
6618
6618
|
id,
|
|
6619
6619
|
label: id,
|
|
6620
|
-
title:
|
|
6620
|
+
title: note ? `${title} \xB7 ${note}` : title,
|
|
6621
6621
|
mod: `is-${id}`,
|
|
6622
|
-
...
|
|
6622
|
+
...note ? { conflict: true } : {}
|
|
6623
6623
|
};
|
|
6624
6624
|
}
|
|
6625
6625
|
function hasMergeConflict(thread) {
|
|
@@ -6630,69 +6630,52 @@ function hasMergeConflict(thread) {
|
|
|
6630
6630
|
isInMergeQueue: thread.prIsInMergeQueue
|
|
6631
6631
|
}) === "conflicts";
|
|
6632
6632
|
}
|
|
6633
|
-
function
|
|
6633
|
+
function blockerNote(group) {
|
|
6634
6634
|
const open = group.filter(
|
|
6635
6635
|
(thread) => isOpenPrState(thread.prUrl, thread.prState) && !thread.prIsInMergeQueue
|
|
6636
6636
|
);
|
|
6637
|
+
const parts = [];
|
|
6637
6638
|
if (open.some(
|
|
6638
6639
|
(thread) => thread.prChecksFailed || mergeStateSuggestsCheckFailure({
|
|
6639
6640
|
mergeStateStatus: thread.prMergeStateStatus ?? null,
|
|
6640
6641
|
reviewDecision: thread.prReviewDecision ?? null
|
|
6641
6642
|
})
|
|
6642
6643
|
)) {
|
|
6643
|
-
|
|
6644
|
-
}
|
|
6645
|
-
if (open.some(
|
|
6644
|
+
parts.push("checks failing");
|
|
6645
|
+
} else if (open.some(
|
|
6646
6646
|
(thread) => !thread.prIsDraft && (thread.prReviewDecision ?? "").trim().toUpperCase() === "CHANGES_REQUESTED"
|
|
6647
6647
|
)) {
|
|
6648
|
-
|
|
6649
|
-
}
|
|
6650
|
-
return void 0;
|
|
6651
|
-
}
|
|
6652
|
-
function withPrError(badges, error, conflict) {
|
|
6653
|
-
if (!error) return badges;
|
|
6654
|
-
const [first] = badges;
|
|
6655
|
-
if (!first) {
|
|
6656
|
-
return [
|
|
6657
|
-
{
|
|
6658
|
-
id: "error",
|
|
6659
|
-
label: error.label,
|
|
6660
|
-
title: conflict ? `${error.title} \xB7 merge conflicts` : error.title,
|
|
6661
|
-
mod: "is-error",
|
|
6662
|
-
...conflict ? { conflict: true } : {}
|
|
6663
|
-
}
|
|
6664
|
-
];
|
|
6648
|
+
parts.push("changes requested");
|
|
6665
6649
|
}
|
|
6666
|
-
|
|
6650
|
+
if (open.some(hasMergeConflict)) parts.push("merge conflicts");
|
|
6651
|
+
return parts.length > 0 ? parts.join(" \xB7 ") : void 0;
|
|
6667
6652
|
}
|
|
6668
6653
|
function classifyWorktreeListBadges(group, viewerLogin = "", reviewLabel = "") {
|
|
6669
6654
|
if (group.length === 0 || group.some((t) => t.cowboy)) return [];
|
|
6670
6655
|
if (group.some((t) => isMergedPrState(t.prUrl, t.prState))) {
|
|
6671
6656
|
return [listBadge("merged", "Merged")];
|
|
6672
6657
|
}
|
|
6673
|
-
const
|
|
6674
|
-
const error = groupPrError(group);
|
|
6675
|
-
const finish2 = (badges) => withPrError(badges, error, conflict);
|
|
6658
|
+
const note = blockerNote(group);
|
|
6676
6659
|
if (group.some((t) => isApprovedOpenPr(t))) {
|
|
6677
|
-
return
|
|
6660
|
+
return [listBadge("approved", "Approved, not merged", note)];
|
|
6678
6661
|
}
|
|
6679
6662
|
const open = group.filter((t) => isOpenPrState(t.prUrl, t.prState));
|
|
6680
6663
|
if (open.length === 0) {
|
|
6681
6664
|
if (group.some((t) => isClosedPrState(t.prUrl, t.prState))) return [];
|
|
6682
|
-
return
|
|
6665
|
+
return [listBadge("new", "No pull request")];
|
|
6683
6666
|
}
|
|
6684
6667
|
const ownership = classifyWorktreeOwnership(group, viewerLogin);
|
|
6685
6668
|
if (ownership === "reviewing") {
|
|
6686
|
-
return
|
|
6669
|
+
return [listBadge("review", "Someone else's PR", note)];
|
|
6687
6670
|
}
|
|
6688
|
-
if (!normalizeViewerLogin(viewerLogin)) return
|
|
6671
|
+
if (!normalizeViewerLogin(viewerLogin)) return [];
|
|
6689
6672
|
if (!open.some((t) => !t.prIsDraft)) {
|
|
6690
|
-
return
|
|
6673
|
+
return [listBadge("draft", "Draft pull request", note)];
|
|
6691
6674
|
}
|
|
6692
6675
|
const readyLabel = reviewLabel.trim();
|
|
6693
6676
|
const inReview = readyLabel ? labelsInclude(groupPrLabels(group), readyLabel) : true;
|
|
6694
|
-
if (!inReview) return
|
|
6695
|
-
return
|
|
6677
|
+
if (!inReview) return [];
|
|
6678
|
+
return [listBadge("pending", "Waiting for review", note)];
|
|
6696
6679
|
}
|
|
6697
6680
|
var init_worktree_list_badges = __esm({
|
|
6698
6681
|
"src/board/worktree-list-badges.ts"() {
|
|
@@ -42013,7 +41996,7 @@ function listPhoneSidebar(viewerLogin = phoneViewerLogin()) {
|
|
|
42013
41996
|
label: worktreeDisplayLabelForGroup(group),
|
|
42014
41997
|
chats: group.map(summarize),
|
|
42015
41998
|
...tags.length > 0 ? { tags } : {},
|
|
42016
|
-
...badge ? { badge: { id: badge.id, label: badge.label, title: badge.title, ...badge.conflict ? { conflict: true } : {}
|
|
41999
|
+
...badge ? { badge: { id: badge.id, label: badge.label, title: badge.title, ...badge.conflict ? { conflict: true } : {} } } : {}
|
|
42017
42000
|
};
|
|
42018
42001
|
})
|
|
42019
42002
|
}));
|
package/dist/index.d.cts
CHANGED
|
@@ -6525,20 +6525,17 @@ declare function startAgentRpcServer(opts?: AgentRpcServerOptions): Promise<Agen
|
|
|
6525
6525
|
declare function stopAgentRpcServer(): Promise<void>;
|
|
6526
6526
|
declare function getAgentRpcServer(): AgentRpcServer | null;
|
|
6527
6527
|
|
|
6528
|
-
type WorktreeListBadgeId = 'new' | 'draft' | 'pending' | 'review' | 'approved' | 'merged'
|
|
6529
|
-
/** Checks failing or changes requested. Drawn as its own red pill. */
|
|
6530
|
-
type WorktreeListBadgeError = {
|
|
6531
|
-
label: string;
|
|
6532
|
-
title: string;
|
|
6533
|
-
};
|
|
6528
|
+
type WorktreeListBadgeId = 'new' | 'draft' | 'pending' | 'review' | 'approved' | 'merged';
|
|
6534
6529
|
type WorktreeListBadge = {
|
|
6535
6530
|
id: WorktreeListBadgeId;
|
|
6536
6531
|
label: string;
|
|
6537
6532
|
title: string;
|
|
6538
6533
|
mod: string;
|
|
6539
|
-
/**
|
|
6534
|
+
/**
|
|
6535
|
+
* Red dot on the status pill. Merge conflicts, failing checks, or changes
|
|
6536
|
+
* requested. The title names which.
|
|
6537
|
+
*/
|
|
6540
6538
|
conflict?: boolean;
|
|
6541
|
-
error?: WorktreeListBadgeError;
|
|
6542
6539
|
};
|
|
6543
6540
|
type WorktreeListBadgeThread = Pick<Thread, 'prUrl' | 'prState' | 'prIsDraft' | 'prAuthorLogin' | 'prReviewerLogins' | 'sourceType' | 'cowboy' | 'prLabels' | 'prReviewDecision' | 'prMergeable' | 'prMergeStateStatus' | 'prIsInMergeQueue' | 'prChecksFailed'>;
|
|
6544
6541
|
/**
|
|
@@ -6553,14 +6550,13 @@ declare function reviewLabelForRepo(labelsByRepo: Record<string, string> | null
|
|
|
6553
6550
|
* New is no pull request. Draft is your draft. Pending is your published PR
|
|
6554
6551
|
* waiting for review. Review is someone else's open PR, including their drafts.
|
|
6555
6552
|
* Approved is an open non-draft PR GitHub has approved. Merged is merged.
|
|
6556
|
-
* A red dot on
|
|
6557
|
-
*
|
|
6553
|
+
* A red dot on that pill means merge conflicts, failing checks, or changes
|
|
6554
|
+
* requested. The title says which. There is no second badge.
|
|
6558
6555
|
*
|
|
6559
6556
|
* Yours is pending when the project ready-for-review label (Settings →
|
|
6560
6557
|
* Projects) is on the PR; if that label is unset, a published PR counts.
|
|
6561
6558
|
* Without a viewer login, pending and review stay off so someone else's PR
|
|
6562
|
-
* is not labeled as yours.
|
|
6563
|
-
* show. New, approved, and merged do not need the login.
|
|
6559
|
+
* is not labeled as yours. New, approved, and merged do not need the login.
|
|
6564
6560
|
*/
|
|
6565
6561
|
declare function classifyWorktreeListBadges(group: WorktreeListBadgeThread[], viewerLogin?: string, reviewLabel?: string): WorktreeListBadge[];
|
|
6566
6562
|
|
package/dist/index.d.ts
CHANGED
|
@@ -6525,20 +6525,17 @@ declare function startAgentRpcServer(opts?: AgentRpcServerOptions): Promise<Agen
|
|
|
6525
6525
|
declare function stopAgentRpcServer(): Promise<void>;
|
|
6526
6526
|
declare function getAgentRpcServer(): AgentRpcServer | null;
|
|
6527
6527
|
|
|
6528
|
-
type WorktreeListBadgeId = 'new' | 'draft' | 'pending' | 'review' | 'approved' | 'merged'
|
|
6529
|
-
/** Checks failing or changes requested. Drawn as its own red pill. */
|
|
6530
|
-
type WorktreeListBadgeError = {
|
|
6531
|
-
label: string;
|
|
6532
|
-
title: string;
|
|
6533
|
-
};
|
|
6528
|
+
type WorktreeListBadgeId = 'new' | 'draft' | 'pending' | 'review' | 'approved' | 'merged';
|
|
6534
6529
|
type WorktreeListBadge = {
|
|
6535
6530
|
id: WorktreeListBadgeId;
|
|
6536
6531
|
label: string;
|
|
6537
6532
|
title: string;
|
|
6538
6533
|
mod: string;
|
|
6539
|
-
/**
|
|
6534
|
+
/**
|
|
6535
|
+
* Red dot on the status pill. Merge conflicts, failing checks, or changes
|
|
6536
|
+
* requested. The title names which.
|
|
6537
|
+
*/
|
|
6540
6538
|
conflict?: boolean;
|
|
6541
|
-
error?: WorktreeListBadgeError;
|
|
6542
6539
|
};
|
|
6543
6540
|
type WorktreeListBadgeThread = Pick<Thread, 'prUrl' | 'prState' | 'prIsDraft' | 'prAuthorLogin' | 'prReviewerLogins' | 'sourceType' | 'cowboy' | 'prLabels' | 'prReviewDecision' | 'prMergeable' | 'prMergeStateStatus' | 'prIsInMergeQueue' | 'prChecksFailed'>;
|
|
6544
6541
|
/**
|
|
@@ -6553,14 +6550,13 @@ declare function reviewLabelForRepo(labelsByRepo: Record<string, string> | null
|
|
|
6553
6550
|
* New is no pull request. Draft is your draft. Pending is your published PR
|
|
6554
6551
|
* waiting for review. Review is someone else's open PR, including their drafts.
|
|
6555
6552
|
* Approved is an open non-draft PR GitHub has approved. Merged is merged.
|
|
6556
|
-
* A red dot on
|
|
6557
|
-
*
|
|
6553
|
+
* A red dot on that pill means merge conflicts, failing checks, or changes
|
|
6554
|
+
* requested. The title says which. There is no second badge.
|
|
6558
6555
|
*
|
|
6559
6556
|
* Yours is pending when the project ready-for-review label (Settings →
|
|
6560
6557
|
* Projects) is on the PR; if that label is unset, a published PR counts.
|
|
6561
6558
|
* Without a viewer login, pending and review stay off so someone else's PR
|
|
6562
|
-
* is not labeled as yours.
|
|
6563
|
-
* show. New, approved, and merged do not need the login.
|
|
6559
|
+
* is not labeled as yours. New, approved, and merged do not need the login.
|
|
6564
6560
|
*/
|
|
6565
6561
|
declare function classifyWorktreeListBadges(group: WorktreeListBadgeThread[], viewerLogin?: string, reviewLabel?: string): WorktreeListBadge[];
|
|
6566
6562
|
|
package/dist/index.js
CHANGED
|
@@ -196,7 +196,7 @@ import {
|
|
|
196
196
|
worktreeCleanupSettings,
|
|
197
197
|
writeAgentBlock,
|
|
198
198
|
writeWorktreeFile
|
|
199
|
-
} from "./chunk-
|
|
199
|
+
} from "./chunk-GNX6YNNU.js";
|
|
200
200
|
import {
|
|
201
201
|
LEGACY_PLAN_FILE_REL,
|
|
202
202
|
PLAN_FILE_NAME,
|
|
@@ -5391,7 +5391,7 @@ async function handleJobStop(params, _ctx) {
|
|
|
5391
5391
|
return stopDetachedJob(jobCwd(rec), id, reason ? { reason } : void 0);
|
|
5392
5392
|
}
|
|
5393
5393
|
async function defaultTurnWait(ref, timeoutMs) {
|
|
5394
|
-
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-
|
|
5394
|
+
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-FVVDOQVD.js");
|
|
5395
5395
|
const orch = getOrchestrator2();
|
|
5396
5396
|
const thread = await orch.waitForTurn(ref, timeoutMs, {
|
|
5397
5397
|
resolveIfStillRunning: true
|
|
@@ -10600,7 +10600,7 @@ function listPhoneSidebar(viewerLogin = phoneViewerLogin()) {
|
|
|
10600
10600
|
label: worktreeDisplayLabelForGroup(group),
|
|
10601
10601
|
chats: group.map(summarize),
|
|
10602
10602
|
...tags.length > 0 ? { tags } : {},
|
|
10603
|
-
...badge ? { badge: { id: badge.id, label: badge.label, title: badge.title, ...badge.conflict ? { conflict: true } : {}
|
|
10603
|
+
...badge ? { badge: { id: badge.id, label: badge.label, title: badge.title, ...badge.conflict ? { conflict: true } : {} } } : {}
|
|
10604
10604
|
};
|
|
10605
10605
|
})
|
|
10606
10606
|
}));
|
|
@@ -13529,7 +13529,7 @@ async function continueSourceThread(threadId, prompt) {
|
|
|
13529
13529
|
await continueOnReply(threadId, prompt);
|
|
13530
13530
|
return;
|
|
13531
13531
|
}
|
|
13532
|
-
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-
|
|
13532
|
+
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-FVVDOQVD.js");
|
|
13533
13533
|
await getOrchestrator2().send(threadId, prompt);
|
|
13534
13534
|
} catch {
|
|
13535
13535
|
}
|