@sideboard-ai/core 0.1.291 → 0.1.293
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 +329 -36
- package/dist/agents/cursor-runner.js +318 -17
- package/dist/{agents-4BBCKITL.js → agents-SITR5V6F.js} +3 -3
- package/dist/{agents-XAKSP653.js → agents-WT72O5A3.js} +3 -3
- package/dist/{chunk-2IXKTAIT.js → chunk-2VGLZIU6.js} +37 -13
- package/dist/{chunk-GBAACE3C.js → chunk-4YXXLWDI.js} +3 -3
- package/dist/{chunk-4VXWLY3L.js → chunk-IP5WSADC.js} +9 -9
- package/dist/{chunk-QOUTSISS.js → chunk-LSHGJI4S.js} +10 -10
- package/dist/{chunk-O4324MXE.js → chunk-PO3PDNMV.js} +1 -1
- package/dist/{chunk-LUQ7MIVD.js → chunk-RPCKGO3J.js} +3 -3
- package/dist/{chunk-5HPMKLJ7.js → chunk-UO5C2L2G.js} +37 -13
- package/dist/{chunk-G74TSBJ3.js → chunk-WRDKJRWF.js} +3 -3
- package/dist/{chunk-VNCPRMIK.js → chunk-XZW3BXZW.js} +3 -3
- package/dist/{chunk-V3BSO2O6.js → chunk-ZRQWV3MS.js} +1 -1
- package/dist/{conductor-UFJXJPTF.js → conductor-MAYZSFL6.js} +3 -3
- package/dist/{conductor-5MNGC25D.js → conductor-P7XPGYF4.js} +3 -3
- package/dist/{coordinator-prompt-5Q66Y5KW.js → coordinator-prompt-NAM5JHLT.js} +2 -2
- package/dist/{coordinator-prompt-BYPEW6DE.js → coordinator-prompt-OZFKNCM3.js} +2 -2
- package/dist/{global-workspace-BTH2YGDZ.js → global-workspace-CTFQDG7G.js} +2 -2
- package/dist/{global-workspace-YKOYXSB2.js → global-workspace-UGR6FQXI.js} +2 -2
- package/dist/index.cjs +166 -89
- package/dist/index.d.cts +10 -4
- package/dist/index.d.ts +10 -4
- package/dist/index.js +135 -82
- package/dist/mcp/run-stdio.cjs +37 -13
- package/dist/mcp/run-stdio.js +5 -5
- package/dist/{orchestrator-EQSK2RMI.js → orchestrator-4QVF6CE2.js} +5 -5
- package/dist/{orchestrator-GSOW3RPA.js → orchestrator-BOGVTCWI.js} +5 -5
- package/dist/{workspaces-ELO2YVTU.js → workspaces-QNKFBA63.js} +2 -2
- package/dist/{workspaces-RFD6I4FM.js → workspaces-YNZXVBSF.js} +2 -2
- package/dist/{worktree-ADVQ6X6C.js → worktree-EMCWDPZJ.js} +1 -1
- package/dist/{worktree-TN7DZDJZ.js → worktree-ERRH4TAG.js} +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -186,7 +186,7 @@ import {
|
|
|
186
186
|
worktreeBoardStatus,
|
|
187
187
|
worktreeCleanupSettings,
|
|
188
188
|
writeWorktreeFile
|
|
189
|
-
} from "./chunk-
|
|
189
|
+
} from "./chunk-LSHGJI4S.js";
|
|
190
190
|
import {
|
|
191
191
|
LEGACY_PLAN_FILE_REL,
|
|
192
192
|
PLAN_FILE_NAME,
|
|
@@ -281,7 +281,7 @@ import {
|
|
|
281
281
|
userMcpNamesToDisable,
|
|
282
282
|
worktreeMcpToolNames,
|
|
283
283
|
writeInjectedMcpConfig
|
|
284
|
-
} from "./chunk-
|
|
284
|
+
} from "./chunk-XZW3BXZW.js";
|
|
285
285
|
import {
|
|
286
286
|
brightsyMcpServerName,
|
|
287
287
|
connectBrightsyTeam,
|
|
@@ -356,6 +356,7 @@ import {
|
|
|
356
356
|
getRunScript,
|
|
357
357
|
isAskUserToolName,
|
|
358
358
|
isIncompleteTaskState,
|
|
359
|
+
isJobContinuePrompt,
|
|
359
360
|
isOtherWorktreeListenerCwd,
|
|
360
361
|
isPlanQuestionAnswersMessage,
|
|
361
362
|
isTerminalTaskState,
|
|
@@ -408,7 +409,7 @@ import {
|
|
|
408
409
|
workspaceAgentChatSummaries,
|
|
409
410
|
worktreeRunPortsPath,
|
|
410
411
|
wrapReviewSkillMarkdown
|
|
411
|
-
} from "./chunk-
|
|
412
|
+
} from "./chunk-4YXXLWDI.js";
|
|
412
413
|
import {
|
|
413
414
|
STDERR_EVENT_MAX_CHARS,
|
|
414
415
|
STDOUT_EVENT_MAX_CHARS,
|
|
@@ -608,7 +609,7 @@ import {
|
|
|
608
609
|
stageBuffersAsAttachments,
|
|
609
610
|
syncWorkspacesFromThreads,
|
|
610
611
|
takenTeamSlugsForOrchestration
|
|
611
|
-
} from "./chunk-
|
|
612
|
+
} from "./chunk-ZRQWV3MS.js";
|
|
612
613
|
import {
|
|
613
614
|
GITHUB_PR_BODY_MAX_CHARS,
|
|
614
615
|
GITHUB_PR_BODY_SAFE_CHARS,
|
|
@@ -696,7 +697,7 @@ import {
|
|
|
696
697
|
suggestSlug,
|
|
697
698
|
switchWorktreeBranch,
|
|
698
699
|
warmGithubAgentAuth
|
|
699
|
-
} from "./chunk-
|
|
700
|
+
} from "./chunk-2VGLZIU6.js";
|
|
700
701
|
import {
|
|
701
702
|
FAMOUS_SOCCER_TEAMS,
|
|
702
703
|
allocateTeamName,
|
|
@@ -5126,7 +5127,7 @@ async function handleJobStop(params, _ctx) {
|
|
|
5126
5127
|
return stopDetachedJob(jobCwd(rec), id, reason ? { reason } : void 0);
|
|
5127
5128
|
}
|
|
5128
5129
|
async function defaultTurnWait(ref, timeoutMs) {
|
|
5129
|
-
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-
|
|
5130
|
+
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-BOGVTCWI.js");
|
|
5130
5131
|
const orch = getOrchestrator2();
|
|
5131
5132
|
const thread = await orch.waitForTurn(ref, timeoutMs, {
|
|
5132
5133
|
resolveIfStillRunning: true
|
|
@@ -9624,6 +9625,97 @@ function pickArtifactMatch(items, request) {
|
|
|
9624
9625
|
return null;
|
|
9625
9626
|
}
|
|
9626
9627
|
|
|
9628
|
+
// src/remote/phone-panes.ts
|
|
9629
|
+
var MAX_ROWS = 200;
|
|
9630
|
+
var MAX_QUERY = 200;
|
|
9631
|
+
function parsePhonePane(value, chatId) {
|
|
9632
|
+
const pane = value && typeof value === "object" ? value.pane : void 0;
|
|
9633
|
+
if (pane !== "files" && pane !== "changes" && pane !== "checks") return "invalid";
|
|
9634
|
+
const scopeRaw = value.scope;
|
|
9635
|
+
const scope = scopeRaw === "uncommitted" || scopeRaw === "commits" ? scopeRaw : void 0;
|
|
9636
|
+
const queryRaw = value.query;
|
|
9637
|
+
const query = typeof queryRaw === "string" ? queryRaw.trim().slice(0, MAX_QUERY) : "";
|
|
9638
|
+
return {
|
|
9639
|
+
op: "pane",
|
|
9640
|
+
chatId,
|
|
9641
|
+
pane,
|
|
9642
|
+
...scope && pane === "changes" ? { scope } : {},
|
|
9643
|
+
...query && pane === "files" ? { query } : {}
|
|
9644
|
+
};
|
|
9645
|
+
}
|
|
9646
|
+
function filterPhoneFiles(paths, query) {
|
|
9647
|
+
const q = query.trim().toLowerCase();
|
|
9648
|
+
if (!q) return paths;
|
|
9649
|
+
return paths.filter((path2) => path2.toLowerCase().includes(q));
|
|
9650
|
+
}
|
|
9651
|
+
async function readPhonePane(thread, pane, scope, query) {
|
|
9652
|
+
try {
|
|
9653
|
+
if (pane === "files") return await readFiles(thread.id, query);
|
|
9654
|
+
if (pane === "changes") return await readChanges(thread.id, scope ?? "commits");
|
|
9655
|
+
return await readChecks(thread.id);
|
|
9656
|
+
} catch (err) {
|
|
9657
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
9658
|
+
return { rows: [], note: message };
|
|
9659
|
+
}
|
|
9660
|
+
}
|
|
9661
|
+
async function readFiles(threadId, query) {
|
|
9662
|
+
const paths = filterPhoneFiles(await getOrchestrator().listFiles(threadId), query ?? "");
|
|
9663
|
+
const shown = paths.slice(0, MAX_ROWS);
|
|
9664
|
+
const extra = paths.length - shown.length;
|
|
9665
|
+
const note = extra > 0 ? query?.trim() ? `${extra} more matching files` : `${extra} more files on the Mac` : void 0;
|
|
9666
|
+
return {
|
|
9667
|
+
rows: shown.map((path2) => ({ label: path2, path: path2 })),
|
|
9668
|
+
...note ? { note } : {}
|
|
9669
|
+
};
|
|
9670
|
+
}
|
|
9671
|
+
async function readChanges(threadId, scope) {
|
|
9672
|
+
const diff = await getOrchestrator().diff(threadId, { includePatches: false, scope });
|
|
9673
|
+
const shown = diff.files.slice(0, MAX_ROWS);
|
|
9674
|
+
return {
|
|
9675
|
+
rows: shown.map((file) => {
|
|
9676
|
+
const detail = changeDetail(file.additions, file.deletions);
|
|
9677
|
+
return {
|
|
9678
|
+
label: file.path,
|
|
9679
|
+
path: file.path,
|
|
9680
|
+
...file.status ? { status: file.status } : {},
|
|
9681
|
+
...detail ? { detail } : {}
|
|
9682
|
+
};
|
|
9683
|
+
}),
|
|
9684
|
+
...diff.files.length > shown.length ? { note: `${diff.files.length - shown.length} more changed files` } : {}
|
|
9685
|
+
};
|
|
9686
|
+
}
|
|
9687
|
+
function changeDetail(additions, deletions) {
|
|
9688
|
+
const add = additions ?? 0;
|
|
9689
|
+
const del = deletions ?? 0;
|
|
9690
|
+
if (add === 0 && del === 0) return void 0;
|
|
9691
|
+
return `+${add} \u2212${del}`;
|
|
9692
|
+
}
|
|
9693
|
+
async function readPhoneChangePatch(threadId, path2) {
|
|
9694
|
+
const diff = await getOrchestrator().diff(threadId, {
|
|
9695
|
+
path: path2,
|
|
9696
|
+
scope: "commits",
|
|
9697
|
+
includePatches: true,
|
|
9698
|
+
includeMeta: false,
|
|
9699
|
+
includeUntracked: false
|
|
9700
|
+
});
|
|
9701
|
+
const file = diff.files.find((row2) => row2.path === path2) ?? diff.files[0];
|
|
9702
|
+
if (!file) return null;
|
|
9703
|
+
const content = file.patch ?? "";
|
|
9704
|
+
return { content, truncated: content.includes("\u2026 truncated") };
|
|
9705
|
+
}
|
|
9706
|
+
async function readChecks(threadId) {
|
|
9707
|
+
const checks = await getOrchestrator().getPrChecks(threadId);
|
|
9708
|
+
if (!checks) return { rows: [], note: "No pull request on this branch." };
|
|
9709
|
+
const shown = checks.slice(0, MAX_ROWS);
|
|
9710
|
+
return {
|
|
9711
|
+
rows: shown.map((check) => ({
|
|
9712
|
+
label: check.name,
|
|
9713
|
+
detail: check.bucket || check.state,
|
|
9714
|
+
...check.link ? { href: check.link } : {}
|
|
9715
|
+
}))
|
|
9716
|
+
};
|
|
9717
|
+
}
|
|
9718
|
+
|
|
9627
9719
|
// src/remote/phone-chats.ts
|
|
9628
9720
|
import { randomUUID as randomUUID7 } from "crypto";
|
|
9629
9721
|
|
|
@@ -9788,80 +9880,6 @@ function parsePhoneCodeRefs(value) {
|
|
|
9788
9880
|
return refs;
|
|
9789
9881
|
}
|
|
9790
9882
|
|
|
9791
|
-
// src/remote/phone-panes.ts
|
|
9792
|
-
var MAX_ROWS = 200;
|
|
9793
|
-
var MAX_QUERY = 200;
|
|
9794
|
-
function parsePhonePane(value, chatId) {
|
|
9795
|
-
const pane = value && typeof value === "object" ? value.pane : void 0;
|
|
9796
|
-
if (pane !== "files" && pane !== "changes" && pane !== "checks") return "invalid";
|
|
9797
|
-
const scopeRaw = value.scope;
|
|
9798
|
-
const scope = scopeRaw === "uncommitted" || scopeRaw === "commits" ? scopeRaw : void 0;
|
|
9799
|
-
const queryRaw = value.query;
|
|
9800
|
-
const query = typeof queryRaw === "string" ? queryRaw.trim().slice(0, MAX_QUERY) : "";
|
|
9801
|
-
return {
|
|
9802
|
-
op: "pane",
|
|
9803
|
-
chatId,
|
|
9804
|
-
pane,
|
|
9805
|
-
...scope && pane === "changes" ? { scope } : {},
|
|
9806
|
-
...query && pane === "files" ? { query } : {}
|
|
9807
|
-
};
|
|
9808
|
-
}
|
|
9809
|
-
function filterPhoneFiles(paths, query) {
|
|
9810
|
-
const q = query.trim().toLowerCase();
|
|
9811
|
-
if (!q) return paths;
|
|
9812
|
-
return paths.filter((path2) => path2.toLowerCase().includes(q));
|
|
9813
|
-
}
|
|
9814
|
-
async function readPhonePane(thread, pane, scope, query) {
|
|
9815
|
-
try {
|
|
9816
|
-
if (pane === "files") return await readFiles(thread.id, query);
|
|
9817
|
-
if (pane === "changes") return await readChanges(thread.id, scope ?? "commits");
|
|
9818
|
-
return await readChecks(thread.id);
|
|
9819
|
-
} catch (err) {
|
|
9820
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
9821
|
-
return { rows: [], note: message };
|
|
9822
|
-
}
|
|
9823
|
-
}
|
|
9824
|
-
async function readFiles(threadId, query) {
|
|
9825
|
-
const paths = filterPhoneFiles(await getOrchestrator().listFiles(threadId), query ?? "");
|
|
9826
|
-
const shown = paths.slice(0, MAX_ROWS);
|
|
9827
|
-
const extra = paths.length - shown.length;
|
|
9828
|
-
const note = extra > 0 ? query?.trim() ? `${extra} more matching files` : `${extra} more files on the Mac` : void 0;
|
|
9829
|
-
return {
|
|
9830
|
-
rows: shown.map((path2) => ({ label: path2, path: path2 })),
|
|
9831
|
-
...note ? { note } : {}
|
|
9832
|
-
};
|
|
9833
|
-
}
|
|
9834
|
-
async function readChanges(threadId, scope) {
|
|
9835
|
-
const diff = await getOrchestrator().diff(threadId, { includePatches: false, scope });
|
|
9836
|
-
const shown = diff.files.slice(0, MAX_ROWS);
|
|
9837
|
-
return {
|
|
9838
|
-
rows: shown.map((file) => ({
|
|
9839
|
-
label: file.path,
|
|
9840
|
-
path: file.path,
|
|
9841
|
-
detail: changeDetail(file.additions, file.deletions)
|
|
9842
|
-
})),
|
|
9843
|
-
...diff.files.length > shown.length ? { note: `${diff.files.length - shown.length} more changed files` } : {}
|
|
9844
|
-
};
|
|
9845
|
-
}
|
|
9846
|
-
function changeDetail(additions, deletions) {
|
|
9847
|
-
const add = additions ?? 0;
|
|
9848
|
-
const del = deletions ?? 0;
|
|
9849
|
-
if (add === 0 && del === 0) return void 0;
|
|
9850
|
-
return `+${add} \u2212${del}`;
|
|
9851
|
-
}
|
|
9852
|
-
async function readChecks(threadId) {
|
|
9853
|
-
const checks = await getOrchestrator().getPrChecks(threadId);
|
|
9854
|
-
if (!checks) return { rows: [], note: "No pull request on this branch." };
|
|
9855
|
-
const shown = checks.slice(0, MAX_ROWS);
|
|
9856
|
-
return {
|
|
9857
|
-
rows: shown.map((check) => ({
|
|
9858
|
-
label: check.name,
|
|
9859
|
-
detail: check.bucket || check.state,
|
|
9860
|
-
...check.link ? { href: check.link } : {}
|
|
9861
|
-
}))
|
|
9862
|
-
};
|
|
9863
|
-
}
|
|
9864
|
-
|
|
9865
9883
|
// src/remote/phone-defaults.ts
|
|
9866
9884
|
function row(resolved) {
|
|
9867
9885
|
return {
|
|
@@ -9922,6 +9940,11 @@ function phoneStreamFlushNow(event) {
|
|
|
9922
9940
|
var PHONE_USER_PREFIX = "Phone\n\n";
|
|
9923
9941
|
var TRANSCRIPT_LIMIT = 40;
|
|
9924
9942
|
var MESSAGE_LIMIT = 4e3;
|
|
9943
|
+
var CRASH_CONTINUE_PREFIX = "The previous agent process ended before it finished.";
|
|
9944
|
+
function isHostContinuePrompt(text5) {
|
|
9945
|
+
const trimmed = text5.trim();
|
|
9946
|
+
return isJobContinuePrompt(trimmed) || trimmed.startsWith(CRASH_CONTINUE_PREFIX);
|
|
9947
|
+
}
|
|
9925
9948
|
function phoneVisibleText(role, text5) {
|
|
9926
9949
|
const trimmed = text5.trim();
|
|
9927
9950
|
if (role === "user" && trimmed.startsWith(PHONE_USER_PREFIX)) {
|
|
@@ -9947,6 +9970,9 @@ function listPhoneMessages(thread) {
|
|
|
9947
9970
|
const out = [];
|
|
9948
9971
|
for (const message of thread.messages) {
|
|
9949
9972
|
if (message.role !== "user" && message.role !== "agent") continue;
|
|
9973
|
+
if (message.origin === "continue" || message.role === "user" && isHostContinuePrompt(message.text)) {
|
|
9974
|
+
continue;
|
|
9975
|
+
}
|
|
9950
9976
|
const names = (message.attachments ?? []).map((item) => item.name.trim()).filter(Boolean);
|
|
9951
9977
|
const visible = [phoneVisibleText(message.role, message.text), names.length ? names.join(", ") : ""].filter(Boolean).join("\n");
|
|
9952
9978
|
const text5 = message.role === "agent" ? phoneArtifactText(visible, message.parts, MESSAGE_LIMIT) : clip(visible, MESSAGE_LIMIT);
|
|
@@ -9955,6 +9981,7 @@ function listPhoneMessages(thread) {
|
|
|
9955
9981
|
}
|
|
9956
9982
|
const live = withLiveTail(thread, out);
|
|
9957
9983
|
for (const prompt of thread.queue) {
|
|
9984
|
+
if (isHostContinuePrompt(prompt)) continue;
|
|
9958
9985
|
const text5 = clip(phoneVisibleText("user", prompt), MESSAGE_LIMIT);
|
|
9959
9986
|
if (text5) live.push({ role: "user", text: text5 });
|
|
9960
9987
|
}
|
|
@@ -10079,12 +10106,14 @@ function parsePhoneControl(value) {
|
|
|
10079
10106
|
if (op === "media") return { op, chatId, path: path2 };
|
|
10080
10107
|
const startLine = lineField(value, "startLine");
|
|
10081
10108
|
const endLine = lineField(value, "endLine");
|
|
10109
|
+
const view = textField(value, "view") === "diff" ? "diff" : void 0;
|
|
10082
10110
|
return {
|
|
10083
10111
|
op,
|
|
10084
10112
|
chatId,
|
|
10085
10113
|
path: path2,
|
|
10086
10114
|
...startLine != null ? { startLine } : {},
|
|
10087
|
-
...endLine != null ? { endLine } : {}
|
|
10115
|
+
...endLine != null ? { endLine } : {},
|
|
10116
|
+
...view ? { view } : {}
|
|
10088
10117
|
};
|
|
10089
10118
|
}
|
|
10090
10119
|
const draft = parsePhoneDraft(value);
|
|
@@ -11093,6 +11122,30 @@ function handlePhoneControl(cmd, opts) {
|
|
|
11093
11122
|
emitControl(opts, { op: "error", chatId: cmd.chatId, message: "That file is not in this worktree." });
|
|
11094
11123
|
return;
|
|
11095
11124
|
}
|
|
11125
|
+
if (cmd.view === "diff") {
|
|
11126
|
+
void readPhoneChangePatch(thread.id, relative).then((body) => {
|
|
11127
|
+
if (!body) {
|
|
11128
|
+
emitControl(opts, { op: "error", chatId: cmd.chatId, message: "That file has no changes to show." });
|
|
11129
|
+
return;
|
|
11130
|
+
}
|
|
11131
|
+
emitControl(opts, {
|
|
11132
|
+
op: "file",
|
|
11133
|
+
chatId: cmd.chatId,
|
|
11134
|
+
path: relative,
|
|
11135
|
+
content: body.content,
|
|
11136
|
+
encoding: "utf8",
|
|
11137
|
+
view: "diff",
|
|
11138
|
+
...body.truncated ? { truncated: true } : {}
|
|
11139
|
+
});
|
|
11140
|
+
}).catch(() => {
|
|
11141
|
+
emitControl(opts, {
|
|
11142
|
+
op: "error",
|
|
11143
|
+
chatId: cmd.chatId,
|
|
11144
|
+
message: "That file could not be opened on the phone."
|
|
11145
|
+
});
|
|
11146
|
+
});
|
|
11147
|
+
return;
|
|
11148
|
+
}
|
|
11096
11149
|
void getOrchestrator().statPath(thread.id, relative).then((kind) => {
|
|
11097
11150
|
if (kind === "missing") {
|
|
11098
11151
|
emitControl(opts, { op: "error", chatId: cmd.chatId, message: "That file is not in this worktree." });
|
|
@@ -13187,7 +13240,7 @@ async function continueSourceThread(threadId, prompt) {
|
|
|
13187
13240
|
await continueOnReply(threadId, prompt);
|
|
13188
13241
|
return;
|
|
13189
13242
|
}
|
|
13190
|
-
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-
|
|
13243
|
+
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-BOGVTCWI.js");
|
|
13191
13244
|
await getOrchestrator2().send(threadId, prompt);
|
|
13192
13245
|
} catch {
|
|
13193
13246
|
}
|
package/dist/mcp/run-stdio.cjs
CHANGED
|
@@ -8577,15 +8577,8 @@ async function fetchOriginForWorktree(repoPath, sourceRef, opts) {
|
|
|
8577
8577
|
async function fastForwardMainCheckoutIfSafe(repoPath, opts) {
|
|
8578
8578
|
try {
|
|
8579
8579
|
const branch = opts?.branch?.trim() || await resolveDefaultBranch(repoPath, { network: false });
|
|
8580
|
-
|
|
8581
|
-
|
|
8582
|
-
});
|
|
8583
|
-
const current = head.stdout.trim();
|
|
8584
|
-
if (head.exitCode !== 0 || !current || current === "HEAD" || current !== branch) {
|
|
8585
|
-
return { updated: false, reason: "not-on-default" };
|
|
8586
|
-
}
|
|
8587
|
-
if (await isDirty(repoPath)) {
|
|
8588
|
-
return { updated: false, reason: "dirty" };
|
|
8580
|
+
if (!branch || branch === "HEAD" || branch.includes("..")) {
|
|
8581
|
+
return { updated: false, reason: "ff-failed" };
|
|
8589
8582
|
}
|
|
8590
8583
|
const remote = `origin/${branch}`;
|
|
8591
8584
|
const remoteOk = await git(["rev-parse", "--verify", remote], repoPath, {
|
|
@@ -8594,8 +8587,27 @@ async function fastForwardMainCheckoutIfSafe(repoPath, opts) {
|
|
|
8594
8587
|
if (remoteOk.exitCode !== 0) {
|
|
8595
8588
|
return { updated: false, reason: "no-origin-tip" };
|
|
8596
8589
|
}
|
|
8590
|
+
const worktrees = await listWorktrees(repoPath);
|
|
8591
|
+
if (worktrees.length === 0) {
|
|
8592
|
+
return { updated: false, reason: "ff-failed" };
|
|
8593
|
+
}
|
|
8594
|
+
const checkout = worktrees.find((entry) => entry.branch === branch) ?? null;
|
|
8595
|
+
const localRef = `refs/heads/${branch}`;
|
|
8596
|
+
const localOk = await git(["rev-parse", "--verify", localRef], repoPath, {
|
|
8597
|
+
reject: false
|
|
8598
|
+
});
|
|
8599
|
+
if (localOk.exitCode !== 0) {
|
|
8600
|
+
if (checkout) return { updated: false, reason: "ff-failed" };
|
|
8601
|
+
const created = await git(["branch", "--track", branch, remote], repoPath, {
|
|
8602
|
+
reject: false
|
|
8603
|
+
});
|
|
8604
|
+
if (created.exitCode !== 0) {
|
|
8605
|
+
return { updated: false, reason: "ff-failed" };
|
|
8606
|
+
}
|
|
8607
|
+
return { updated: true, reason: "updated" };
|
|
8608
|
+
}
|
|
8597
8609
|
const ancestor = await git(
|
|
8598
|
-
["merge-base", "--is-ancestor",
|
|
8610
|
+
["merge-base", "--is-ancestor", localRef, remote],
|
|
8599
8611
|
repoPath,
|
|
8600
8612
|
{ reject: false }
|
|
8601
8613
|
);
|
|
@@ -8603,7 +8615,7 @@ async function fastForwardMainCheckoutIfSafe(repoPath, opts) {
|
|
|
8603
8615
|
return { updated: false, reason: "diverged" };
|
|
8604
8616
|
}
|
|
8605
8617
|
const behind = await git(
|
|
8606
|
-
["rev-list", "--count",
|
|
8618
|
+
["rev-list", "--count", `${localRef}..${remote}`],
|
|
8607
8619
|
repoPath,
|
|
8608
8620
|
{ reject: false }
|
|
8609
8621
|
);
|
|
@@ -8611,10 +8623,22 @@ async function fastForwardMainCheckoutIfSafe(repoPath, opts) {
|
|
|
8611
8623
|
if (behind.exitCode !== 0 || !Number.isFinite(n) || n <= 0) {
|
|
8612
8624
|
return { updated: false, reason: "already-current" };
|
|
8613
8625
|
}
|
|
8614
|
-
|
|
8626
|
+
if (checkout) {
|
|
8627
|
+
if (await isDirty(checkout.path)) {
|
|
8628
|
+
return { updated: false, reason: "dirty" };
|
|
8629
|
+
}
|
|
8630
|
+
const ff = await git(["merge", "--ff-only", remote], checkout.path, {
|
|
8631
|
+
reject: false
|
|
8632
|
+
});
|
|
8633
|
+
if (ff.exitCode !== 0) {
|
|
8634
|
+
return { updated: false, reason: "ff-failed" };
|
|
8635
|
+
}
|
|
8636
|
+
return { updated: true, reason: "updated" };
|
|
8637
|
+
}
|
|
8638
|
+
const moved = await git(["branch", "-f", branch, remote], repoPath, {
|
|
8615
8639
|
reject: false
|
|
8616
8640
|
});
|
|
8617
|
-
if (
|
|
8641
|
+
if (moved.exitCode !== 0) {
|
|
8618
8642
|
return { updated: false, reason: "ff-failed" };
|
|
8619
8643
|
}
|
|
8620
8644
|
return { updated: true, reason: "updated" };
|
package/dist/mcp/run-stdio.js
CHANGED
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
syncBoardPins,
|
|
51
51
|
updateSchedule,
|
|
52
52
|
workspaceTagTargetRef
|
|
53
|
-
} from "../chunk-
|
|
53
|
+
} from "../chunk-IP5WSADC.js";
|
|
54
54
|
import "../chunk-LX5R5JOR.js";
|
|
55
55
|
import {
|
|
56
56
|
commentAbleTimeTask,
|
|
@@ -93,7 +93,7 @@ import {
|
|
|
93
93
|
sideboardMcpProfile,
|
|
94
94
|
trustSystemCertificates,
|
|
95
95
|
worktreeMcpToolNames
|
|
96
|
-
} from "../chunk-
|
|
96
|
+
} from "../chunk-RPCKGO3J.js";
|
|
97
97
|
import "../chunk-W2KZTDET.js";
|
|
98
98
|
import "../chunk-7IAMHN2N.js";
|
|
99
99
|
import "../chunk-PXMLMBMI.js";
|
|
@@ -110,7 +110,7 @@ import {
|
|
|
110
110
|
waitForDetachedJob,
|
|
111
111
|
waitForTurnToolResult,
|
|
112
112
|
workspaceAgentChatSummaries
|
|
113
|
-
} from "../chunk-
|
|
113
|
+
} from "../chunk-WRDKJRWF.js";
|
|
114
114
|
import {
|
|
115
115
|
clipToolResultForStore,
|
|
116
116
|
isInternalAgentStatusText,
|
|
@@ -119,7 +119,7 @@ import {
|
|
|
119
119
|
import {
|
|
120
120
|
GLOBAL_WORKSPACE_ID,
|
|
121
121
|
isCloudCoordinatorThread
|
|
122
|
-
} from "../chunk-
|
|
122
|
+
} from "../chunk-PO3PDNMV.js";
|
|
123
123
|
import {
|
|
124
124
|
canonicalizeRepoPath,
|
|
125
125
|
formatGhLandError,
|
|
@@ -130,7 +130,7 @@ import {
|
|
|
130
130
|
resolveListPrsOptions,
|
|
131
131
|
resolveRepoRoot,
|
|
132
132
|
warmGithubAgentAuth
|
|
133
|
-
} from "../chunk-
|
|
133
|
+
} from "../chunk-UO5C2L2G.js";
|
|
134
134
|
import {
|
|
135
135
|
CLI_DIR
|
|
136
136
|
} from "../chunk-N2WW62LF.js";
|
|
@@ -11,20 +11,20 @@ import {
|
|
|
11
11
|
resolveSendFollowUp,
|
|
12
12
|
startOrchestration,
|
|
13
13
|
waitForPidExit
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-IP5WSADC.js";
|
|
15
15
|
import "./chunk-LX5R5JOR.js";
|
|
16
16
|
import "./chunk-4BXRRHDC.js";
|
|
17
17
|
import "./chunk-4GK32AYX.js";
|
|
18
18
|
import "./chunk-5DZUWGKV.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-RPCKGO3J.js";
|
|
20
20
|
import "./chunk-W2KZTDET.js";
|
|
21
21
|
import "./chunk-7IAMHN2N.js";
|
|
22
22
|
import "./chunk-PXMLMBMI.js";
|
|
23
23
|
import "./chunk-2GPQZZLY.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-WRDKJRWF.js";
|
|
25
25
|
import "./chunk-AFLNFGGB.js";
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-PO3PDNMV.js";
|
|
27
|
+
import "./chunk-UO5C2L2G.js";
|
|
28
28
|
import "./chunk-N2WW62LF.js";
|
|
29
29
|
import "./chunk-DD67JWTN.js";
|
|
30
30
|
import "./chunk-2UG25RMK.js";
|
|
@@ -9,17 +9,17 @@ import {
|
|
|
9
9
|
resolveSendFollowUp,
|
|
10
10
|
startOrchestration,
|
|
11
11
|
waitForPidExit
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LSHGJI4S.js";
|
|
13
13
|
import "./chunk-PGPSIEMW.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-XZW3BXZW.js";
|
|
15
15
|
import "./chunk-VGNLMGBK.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-4YXXLWDI.js";
|
|
17
17
|
import "./chunk-YSLCWCMJ.js";
|
|
18
18
|
import "./chunk-7H655NEW.js";
|
|
19
19
|
import "./chunk-AF2DMY3K.js";
|
|
20
20
|
import "./chunk-NXXQFLNQ.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-ZRQWV3MS.js";
|
|
22
|
+
import "./chunk-2VGLZIU6.js";
|
|
23
23
|
import "./chunk-QB5MDOHL.js";
|
|
24
24
|
import "./chunk-2P4XKWV2.js";
|
|
25
25
|
import "./chunk-33KDPEK4.js";
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
removeWorkspace,
|
|
12
12
|
sameWorkspacePath,
|
|
13
13
|
syncWorkspacesFromThreads
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-PO3PDNMV.js";
|
|
15
|
+
import "./chunk-UO5C2L2G.js";
|
|
16
16
|
import "./chunk-N2WW62LF.js";
|
|
17
17
|
import "./chunk-DD67JWTN.js";
|
|
18
18
|
import "./chunk-2UG25RMK.js";
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
removeWorkspace,
|
|
10
10
|
sameWorkspacePath,
|
|
11
11
|
syncWorkspacesFromThreads
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-ZRQWV3MS.js";
|
|
13
|
+
import "./chunk-2VGLZIU6.js";
|
|
14
14
|
import "./chunk-QB5MDOHL.js";
|
|
15
15
|
import "./chunk-2P4XKWV2.js";
|
|
16
16
|
import "./chunk-6K64FJDD.js";
|