@sideboard-ai/core 0.1.206 → 0.1.208
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/{abletime-TONBQP4O.js → abletime-I4IYZBKU.js} +4 -4
- package/dist/{abletime-S3UHQZVW.js → abletime-UWSSLXH3.js} +4 -4
- package/dist/{abletime-oauth-SD4SZY5U.js → abletime-oauth-C3BQXKW3.js} +5 -3
- package/dist/{abletime-oauth-AVCEO2DY.js → abletime-oauth-UZHPB3W2.js} +14 -4
- package/dist/{abletime-rest-J2OBB4VA.js → abletime-rest-5YPPEOKK.js} +3 -3
- package/dist/{abletime-rest-6ODSXV7G.js → abletime-rest-HYNYDYK3.js} +3 -3
- package/dist/agents/cursor-runner.js +1 -1
- package/dist/{agents-UW2BUEDH.js → agents-CCS5IEBV.js} +6 -6
- package/dist/{agents-5SDF6KCI.js → agents-QHQXR55O.js} +5 -5
- package/dist/{app-settings-YEPF46IJ.js → app-settings-GJ6KDYEF.js} +1 -1
- package/dist/{app-settings-LGHMNHSP.js → app-settings-R2KNCT37.js} +1 -1
- package/dist/{chunk-X743YN5Y.js → chunk-4EGK47WV.js} +1 -0
- package/dist/{chunk-6Q7DFVDQ.js → chunk-6J4OQ6TF.js} +14 -4
- package/dist/{chunk-FO2NTJ7L.js → chunk-6YZLSZLK.js} +3 -3
- package/dist/{chunk-ARR4OGLY.js → chunk-7DKX5JLT.js} +2 -0
- package/dist/{chunk-64L62EZY.js → chunk-7PEIIN7P.js} +30 -5
- package/dist/{chunk-FX3P25X2.js → chunk-A6SOSLUV.js} +32 -5
- package/dist/{chunk-IQEBC3LD.js → chunk-C5MNMITQ.js} +95 -35
- package/dist/{chunk-SCIMSW7C.js → chunk-C6ZNQV5W.js} +91 -33
- package/dist/{chunk-R7QI3O74.js → chunk-DNTPX6HV.js} +3 -3
- package/dist/{chunk-CYLDJWRK.js → chunk-F4LZUEIO.js} +37 -7
- package/dist/{chunk-GD2WKFFA.js → chunk-HA4EZKFY.js} +3 -3
- package/dist/{chunk-4YXOCLJU.js → chunk-JZHRZ3DR.js} +1 -1
- package/dist/{chunk-6F2L3NTL.js → chunk-NJ2CCLV6.js} +2 -2
- package/dist/{chunk-EJX62RSX.js → chunk-OP6CFVTB.js} +2 -2
- package/dist/{chunk-3K257PCS.js → chunk-TEDEVD4O.js} +37 -7
- package/dist/{chunk-QAVWH2RQ.js → chunk-W6X4GZJG.js} +3 -3
- package/dist/{chunk-SGUVAK66.js → chunk-WXWJ5MJ4.js} +5 -5
- package/dist/{chunk-W6VM36YO.js → chunk-X45BV4VX.js} +5 -5
- package/dist/{chunk-QFBBUFD4.js → chunk-Y4CF7LHH.js} +1 -0
- package/dist/{chunk-DWGEBZ3C.js → chunk-ZHCB4CKR.js} +2 -0
- package/dist/{coordinator-prompt-EWHEK24X.js → coordinator-prompt-TUHB6ZFA.js} +4 -4
- package/dist/{coordinator-prompt-6Q5NDWOC.js → coordinator-prompt-WOTJQMD5.js} +4 -4
- package/dist/{global-workspace-2GMALKKE.js → global-workspace-5UUUNA4A.js} +4 -4
- package/dist/{global-workspace-KHSZZKIH.js → global-workspace-V6G2KH2V.js} +4 -4
- package/dist/index.cjs +164 -20
- package/dist/index.d.cts +39 -4
- package/dist/index.d.ts +39 -4
- package/dist/index.js +26 -13
- package/dist/mcp/run-stdio.cjs +150 -20
- package/dist/mcp/run-stdio.js +11 -11
- package/dist/{orchestrator-WIL5WFBL.js → orchestrator-4IGHVRAF.js} +6 -6
- package/dist/{orchestrator-NXZ5NDAM.js → orchestrator-D4AQNF25.js} +7 -7
- package/dist/{thread-store-XGYWXR2P.js → thread-store-ESZYZSVC.js} +1 -1
- package/dist/{thread-store-LS2T6RVH.js → thread-store-FMWDFAO5.js} +1 -1
- package/dist/{workspaces-6RGWGUFK.js → workspaces-CLNANACI.js} +4 -4
- package/dist/{workspaces-4CBMCP6N.js → workspaces-PZ36M7EQ.js} +4 -4
- package/dist/{worktree-SPH7Q2S6.js → worktree-JKTM47K5.js} +3 -3
- package/dist/{worktree-2U7SZBO2.js → worktree-NC4XQNQI.js} +3 -3
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
allAdapters,
|
|
10
10
|
applyAgentEvent,
|
|
11
11
|
applyTurnUsage,
|
|
12
|
+
clipAgentEventForPaint,
|
|
12
13
|
contextTokens,
|
|
13
14
|
finalizeParts,
|
|
14
15
|
getAdapter,
|
|
@@ -26,7 +27,7 @@ import {
|
|
|
26
27
|
stripBrightsyNdjsonNoise,
|
|
27
28
|
sumUsageList,
|
|
28
29
|
toolDescription
|
|
29
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-A6SOSLUV.js";
|
|
30
31
|
import {
|
|
31
32
|
SLACK_REPLY_FORMATTING,
|
|
32
33
|
addWorkspace,
|
|
@@ -49,7 +50,7 @@ import {
|
|
|
49
50
|
stageAbsolutePathsAsAttachments,
|
|
50
51
|
stageBuffersAsAttachments,
|
|
51
52
|
syncWorkspacesFromThreads
|
|
52
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-HA4EZKFY.js";
|
|
53
54
|
import {
|
|
54
55
|
addPrStackLayer,
|
|
55
56
|
allocateTeamName,
|
|
@@ -99,7 +100,7 @@ import {
|
|
|
99
100
|
worktreeDisplayLabelForGroup,
|
|
100
101
|
worktreeNameFromPath,
|
|
101
102
|
worktreeSlugForTicket
|
|
102
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-OP6CFVTB.js";
|
|
103
104
|
import {
|
|
104
105
|
ATTACHMENTS_DIR,
|
|
105
106
|
DETACHED_JOBS_DIR,
|
|
@@ -131,7 +132,7 @@ import {
|
|
|
131
132
|
shouldRetryFailedAgentTurn,
|
|
132
133
|
summarizeTurnStderr,
|
|
133
134
|
turnFailChatText
|
|
134
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-JZHRZ3DR.js";
|
|
135
136
|
import {
|
|
136
137
|
assertOrchestratorCapableAgent,
|
|
137
138
|
childEnvWithAppSettings,
|
|
@@ -156,7 +157,7 @@ import {
|
|
|
156
157
|
updateAdvancedSettings,
|
|
157
158
|
usageOnLimit,
|
|
158
159
|
writeSecureJson
|
|
159
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-Y4CF7LHH.js";
|
|
160
161
|
import {
|
|
161
162
|
stripNestedElectronEnv
|
|
162
163
|
} from "./chunk-4TR3HZFT.js";
|
|
@@ -181,7 +182,7 @@ import {
|
|
|
181
182
|
updateThread,
|
|
182
183
|
withThreadLock,
|
|
183
184
|
writeThread
|
|
184
|
-
} from "./chunk-
|
|
185
|
+
} from "./chunk-7DKX5JLT.js";
|
|
185
186
|
import {
|
|
186
187
|
appDataDir,
|
|
187
188
|
findConventionSetup,
|
|
@@ -475,7 +476,7 @@ async function continueSourceThread(threadId, prompt) {
|
|
|
475
476
|
await continueOnReply(threadId, prompt);
|
|
476
477
|
return;
|
|
477
478
|
}
|
|
478
|
-
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-
|
|
479
|
+
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-D4AQNF25.js");
|
|
479
480
|
await getOrchestrator2().send(threadId, prompt);
|
|
480
481
|
} catch {
|
|
481
482
|
}
|
|
@@ -809,9 +810,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
|
|
|
809
810
|
`Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
|
|
810
811
|
);
|
|
811
812
|
}
|
|
812
|
-
const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-
|
|
813
|
+
const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-5UUUNA4A.js");
|
|
813
814
|
if (isGlobalThread2(thread)) {
|
|
814
|
-
const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-
|
|
815
|
+
const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-WOTJQMD5.js");
|
|
815
816
|
ensureGlobalCoordinatorCwd2(
|
|
816
817
|
isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
|
|
817
818
|
);
|
|
@@ -1019,6 +1020,24 @@ var FIX_CI_RE = /^Fix CI: .+\.$/;
|
|
|
1019
1020
|
function normalizePrState(state) {
|
|
1020
1021
|
return (state ?? "").trim().toUpperCase();
|
|
1021
1022
|
}
|
|
1023
|
+
function samePrIdentity(a, b) {
|
|
1024
|
+
const left = (a ?? "").trim().replace(/\/+$/, "");
|
|
1025
|
+
const right = (b ?? "").trim().replace(/\/+$/, "");
|
|
1026
|
+
if (!left || !right) return false;
|
|
1027
|
+
if (left === right) return true;
|
|
1028
|
+
const ln = left.match(/\/pull\/(\d+)/i)?.[1];
|
|
1029
|
+
const rn = right.match(/\/pull\/(\d+)/i)?.[1];
|
|
1030
|
+
return Boolean(ln && rn && ln === rn);
|
|
1031
|
+
}
|
|
1032
|
+
function shouldPersistFetchedPrMeta(opts) {
|
|
1033
|
+
const meta = opts.metaUrl?.trim() || "";
|
|
1034
|
+
if (!meta) return false;
|
|
1035
|
+
const head = opts.headPrUrl?.trim() || "";
|
|
1036
|
+
if (head) return samePrIdentity(meta, head);
|
|
1037
|
+
const live = opts.livePrUrl?.trim() || "";
|
|
1038
|
+
if (live) return samePrIdentity(meta, live);
|
|
1039
|
+
return true;
|
|
1040
|
+
}
|
|
1022
1041
|
function sameLoginList(a, b) {
|
|
1023
1042
|
const left = [...a ?? []].map((s) => s.trim().toLowerCase()).filter(Boolean).sort();
|
|
1024
1043
|
const right = [...b ?? []].map((s) => s.trim().toLowerCase()).filter(Boolean).sort();
|
|
@@ -3789,7 +3808,7 @@ async function createThread(input, _onSetupLine) {
|
|
|
3789
3808
|
});
|
|
3790
3809
|
await requireAgent(resolved.agent);
|
|
3791
3810
|
if (input.cowboy) {
|
|
3792
|
-
const { cowboyModeEnabled } = await import("./app-settings-
|
|
3811
|
+
const { cowboyModeEnabled } = await import("./app-settings-GJ6KDYEF.js");
|
|
3793
3812
|
if (!cowboyModeEnabled()) {
|
|
3794
3813
|
throw new Error(
|
|
3795
3814
|
"Cowboy mode is off. Enable it in Settings \u2192 Advanced."
|
|
@@ -3847,7 +3866,7 @@ async function createThread(input, _onSetupLine) {
|
|
|
3847
3866
|
let sourceIsFork = false;
|
|
3848
3867
|
if (!input.cowboy && sourceType === "branch" && (!sourceRef || sourceRef === "HEAD" || sourceRef === "default")) {
|
|
3849
3868
|
if (isAbleTimeConnected() && getIssueSource() === "abletime") {
|
|
3850
|
-
const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-
|
|
3869
|
+
const { ensureAbleTimeTask, issueAttachmentForAbleTimeTask } = await import("./abletime-I4IYZBKU.js");
|
|
3851
3870
|
const task = await ensureAbleTimeTask({
|
|
3852
3871
|
title: title?.trim() || "Untitled work",
|
|
3853
3872
|
description: input.prompt?.trim() || void 0
|
|
@@ -3949,7 +3968,7 @@ async function createThread(input, _onSetupLine) {
|
|
|
3949
3968
|
return readThread(thread.id) ?? thread;
|
|
3950
3969
|
}
|
|
3951
3970
|
async function listLinearIssues(agent, repoPath) {
|
|
3952
|
-
const { getAdapter: getAdapter2 } = await import("./agents-
|
|
3971
|
+
const { getAdapter: getAdapter2 } = await import("./agents-CCS5IEBV.js");
|
|
3953
3972
|
await requireAgent(agent, { requireLinear: true });
|
|
3954
3973
|
const adapter = getAdapter2(agent);
|
|
3955
3974
|
if (!adapter.listLinearIssues) {
|
|
@@ -4395,7 +4414,7 @@ async function adoptThread(input) {
|
|
|
4395
4414
|
messages: input.messages ?? []
|
|
4396
4415
|
});
|
|
4397
4416
|
writeThread(thread);
|
|
4398
|
-
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-
|
|
4417
|
+
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-PZ36M7EQ.js");
|
|
4399
4418
|
await ensureWorkspace2(repoPath);
|
|
4400
4419
|
const { ensureWorktreeSideboardIgnored: ensureWorktreeSideboardIgnored2 } = await import("./worktree-exclude-X54WSOXM.js");
|
|
4401
4420
|
await ensureWorktreeSideboardIgnored2(input.worktreePath);
|
|
@@ -6153,6 +6172,28 @@ function expandComposerPrompt(worktreePath, prompt, opts) {
|
|
|
6153
6172
|
};
|
|
6154
6173
|
}
|
|
6155
6174
|
|
|
6175
|
+
// src/composer/consume-attachments.ts
|
|
6176
|
+
function consumeComposerAttachments(thread) {
|
|
6177
|
+
if (thread.attachments.length === 0) {
|
|
6178
|
+
return {
|
|
6179
|
+
attachments: [],
|
|
6180
|
+
pendingTurnAttachments: thread.pendingTurnAttachments ?? []
|
|
6181
|
+
};
|
|
6182
|
+
}
|
|
6183
|
+
return {
|
|
6184
|
+
attachments: [],
|
|
6185
|
+
pendingTurnAttachments: [
|
|
6186
|
+
...thread.pendingTurnAttachments ?? [],
|
|
6187
|
+
...thread.attachments
|
|
6188
|
+
]
|
|
6189
|
+
};
|
|
6190
|
+
}
|
|
6191
|
+
function takePendingTurnAttachments(thread) {
|
|
6192
|
+
const pending = thread.pendingTurnAttachments ?? [];
|
|
6193
|
+
if (pending.length === 0 && thread.attachments.length === 0) return [];
|
|
6194
|
+
return [...pending, ...thread.attachments];
|
|
6195
|
+
}
|
|
6196
|
+
|
|
6156
6197
|
// src/agents/instructions.ts
|
|
6157
6198
|
import { existsSync as existsSync17 } from "fs";
|
|
6158
6199
|
import { join as join16 } from "path";
|
|
@@ -6979,7 +7020,7 @@ function formatScheduledPrompt(name, prompt) {
|
|
|
6979
7020
|
${prompt}`;
|
|
6980
7021
|
}
|
|
6981
7022
|
async function defaultDeps() {
|
|
6982
|
-
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-
|
|
7023
|
+
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-D4AQNF25.js");
|
|
6983
7024
|
const orch = getOrchestrator2();
|
|
6984
7025
|
return {
|
|
6985
7026
|
findThread: (id) => findThreadByRef(id),
|
|
@@ -7249,7 +7290,7 @@ var Orchestrator = class {
|
|
|
7249
7290
|
orphans: orphans.map((o) => ({ path: o.path, repoPath: o.repoPath }))
|
|
7250
7291
|
});
|
|
7251
7292
|
}
|
|
7252
|
-
const { autoCleanupOrphansEnabled } = await import("./app-settings-
|
|
7293
|
+
const { autoCleanupOrphansEnabled } = await import("./app-settings-GJ6KDYEF.js");
|
|
7253
7294
|
if (autoCleanupOrphansEnabled() && shouldRunWorktreeCleanup() && orphans.length > 0) {
|
|
7254
7295
|
await cleanupOrphanWorktrees({ repoPaths });
|
|
7255
7296
|
}
|
|
@@ -7541,7 +7582,7 @@ var Orchestrator = class {
|
|
|
7541
7582
|
}
|
|
7542
7583
|
await setup;
|
|
7543
7584
|
if (skipSetup) return;
|
|
7544
|
-
const { autoRunAfterSetupEnabled } = await import("./app-settings-
|
|
7585
|
+
const { autoRunAfterSetupEnabled } = await import("./app-settings-GJ6KDYEF.js");
|
|
7545
7586
|
if (autoRunAfterSetupEnabled()) {
|
|
7546
7587
|
try {
|
|
7547
7588
|
await this.startDev(threadId);
|
|
@@ -7602,6 +7643,11 @@ var Orchestrator = class {
|
|
|
7602
7643
|
const inFlight = this.activeTurns.has(thread.id) || this.startingTurns.has(thread.id) || current.status === "running";
|
|
7603
7644
|
shouldSteer = followUp === "steer" && (inFlight || current.queue.length > 0);
|
|
7604
7645
|
const patch = { queue };
|
|
7646
|
+
if (current.attachments.length > 0) {
|
|
7647
|
+
const consumed = consumeComposerAttachments(current);
|
|
7648
|
+
patch.attachments = consumed.attachments;
|
|
7649
|
+
patch.pendingTurnAttachments = consumed.pendingTurnAttachments;
|
|
7650
|
+
}
|
|
7605
7651
|
if (!inFlight) patch.status = "queued";
|
|
7606
7652
|
const pid = current.agentPid;
|
|
7607
7653
|
if (typeof pid === "number" && pid > 0 && !isPidAlive(pid)) {
|
|
@@ -7782,7 +7828,8 @@ var Orchestrator = class {
|
|
|
7782
7828
|
thread = this.requireThread(threadId);
|
|
7783
7829
|
}
|
|
7784
7830
|
const autoContinue = isJobContinuePrompt(prompt) || prompt.trim().startsWith("The previous agent process ended before it finished.");
|
|
7785
|
-
const
|
|
7831
|
+
const parked = takePendingTurnAttachments(thread);
|
|
7832
|
+
const sentAttachments = !autoContinue && parked.length > 0 ? parked : void 0;
|
|
7786
7833
|
appendMessage(threadId, {
|
|
7787
7834
|
role: "user",
|
|
7788
7835
|
text: prompt,
|
|
@@ -7849,8 +7896,8 @@ var Orchestrator = class {
|
|
|
7849
7896
|
slackReplyContext,
|
|
7850
7897
|
expandedPrompt
|
|
7851
7898
|
].filter(Boolean).join("\n\n");
|
|
7852
|
-
if (!autoContinue &&
|
|
7853
|
-
updateThread(threadId, { attachments: [] });
|
|
7899
|
+
if (!autoContinue && sentAttachments) {
|
|
7900
|
+
updateThread(threadId, { attachments: [], pendingTurnAttachments: [] });
|
|
7854
7901
|
}
|
|
7855
7902
|
const adapter = getAdapter(thread.agent);
|
|
7856
7903
|
const resolved = await adapter.resolveSessionId(thread.worktreePath, thread.sessionId);
|
|
@@ -7865,7 +7912,7 @@ var Orchestrator = class {
|
|
|
7865
7912
|
}
|
|
7866
7913
|
const isBrightsy = fresh.agent === "brightsy";
|
|
7867
7914
|
const isOrchestration = isOrchestratorThread(fresh);
|
|
7868
|
-
const { autoRenameBranchEnabled, getGithubGitAuthMode, gitBranchPrefixSetting } = await import("./app-settings-
|
|
7915
|
+
const { autoRenameBranchEnabled, getGithubGitAuthMode, gitBranchPrefixSetting } = await import("./app-settings-GJ6KDYEF.js");
|
|
7869
7916
|
const gitAuthMode = getGithubGitAuthMode();
|
|
7870
7917
|
const worktreeDirective = isBrightsy || isOrchestration ? null : formatWorktreeDirective(fresh, {
|
|
7871
7918
|
githubSlug: await resolveGithubRepoSlug(fresh.worktreePath).catch(
|
|
@@ -7956,8 +8003,9 @@ var Orchestrator = class {
|
|
|
7956
8003
|
isolateCodexPlugins: fresh.isolateCodexPlugins === true
|
|
7957
8004
|
},
|
|
7958
8005
|
(event) => {
|
|
7959
|
-
|
|
7960
|
-
|
|
8006
|
+
const paint = clipAgentEventForPaint(event);
|
|
8007
|
+
this.emit({ type: "turn_output", threadId, event: paint });
|
|
8008
|
+
noteTurnLiveEvent(threadId, paint);
|
|
7961
8009
|
if (event.type === "session_id") {
|
|
7962
8010
|
updateThread(threadId, { sessionId: event.data });
|
|
7963
8011
|
}
|
|
@@ -8030,7 +8078,9 @@ var Orchestrator = class {
|
|
|
8030
8078
|
let detail = lastStderr || (exitCode !== 0 ? fallbackTurnFailDetail(assistantText) : "");
|
|
8031
8079
|
const liveThread = this.requireThread(threadId);
|
|
8032
8080
|
const isolateCodexPluginRetry = liveThread.agent === "codex" && shouldRetryCodexPluginIsolate(detail, {
|
|
8033
|
-
|
|
8081
|
+
// Coordinators already pass toCodexUnattendedAppsArgs — a second
|
|
8082
|
+
// isolate exec keeps sessionId and burns the crash/OOM retry.
|
|
8083
|
+
alreadyIsolated: liveThread.isolateCodexPlugins === true || isOrchestratorThread(liveThread)
|
|
8034
8084
|
});
|
|
8035
8085
|
if (isolateCodexPluginRetry) {
|
|
8036
8086
|
updateThread(threadId, { isolateCodexPlugins: true });
|
|
@@ -8080,7 +8130,8 @@ var Orchestrator = class {
|
|
|
8080
8130
|
isolateCodexPlugins: isolateCodexPluginRetry || retryThread.isolateCodexPlugins === true
|
|
8081
8131
|
},
|
|
8082
8132
|
(event) => {
|
|
8083
|
-
|
|
8133
|
+
const paint = clipAgentEventForPaint(event);
|
|
8134
|
+
this.emit({ type: "turn_output", threadId, event: paint });
|
|
8084
8135
|
if (event.type === "session_id") {
|
|
8085
8136
|
updateThread(threadId, { sessionId: event.data });
|
|
8086
8137
|
}
|
|
@@ -8833,7 +8884,7 @@ var Orchestrator = class {
|
|
|
8833
8884
|
} catch {
|
|
8834
8885
|
headUrl = null;
|
|
8835
8886
|
}
|
|
8836
|
-
return { thread, selectors: connectedPrSelectors(thread, headUrl), cwd };
|
|
8887
|
+
return { thread, selectors: connectedPrSelectors(thread, headUrl), cwd, headUrl };
|
|
8837
8888
|
}
|
|
8838
8889
|
async getPrChecks(threadRef) {
|
|
8839
8890
|
const { selectors, cwd } = await this.withPrSelector(threadRef);
|
|
@@ -8844,13 +8895,20 @@ var Orchestrator = class {
|
|
|
8844
8895
|
return null;
|
|
8845
8896
|
}
|
|
8846
8897
|
async getPrMeta(threadRef) {
|
|
8847
|
-
const { thread, selectors, cwd } = await this.withPrSelector(threadRef);
|
|
8898
|
+
const { thread, selectors, cwd, headUrl } = await this.withPrSelector(threadRef);
|
|
8848
8899
|
for (const selector of selectors) {
|
|
8849
8900
|
const meta = await getPrMeta(cwd, selector);
|
|
8850
|
-
if (meta)
|
|
8851
|
-
|
|
8852
|
-
|
|
8901
|
+
if (!meta) continue;
|
|
8902
|
+
const live = this.requireThread(thread.id);
|
|
8903
|
+
if (!shouldPersistFetchedPrMeta({
|
|
8904
|
+
metaUrl: meta.url,
|
|
8905
|
+
livePrUrl: live.prUrl,
|
|
8906
|
+
headPrUrl: headUrl
|
|
8907
|
+
})) {
|
|
8908
|
+
continue;
|
|
8853
8909
|
}
|
|
8910
|
+
await this.persistPrMetaAndMaybeArchive(live, meta);
|
|
8911
|
+
return meta;
|
|
8854
8912
|
}
|
|
8855
8913
|
return null;
|
|
8856
8914
|
}
|
|
@@ -8872,7 +8930,7 @@ var Orchestrator = class {
|
|
|
8872
8930
|
if (!titled.userSetTitle && meta.title && titled.title !== meta.title) {
|
|
8873
8931
|
updateThread(thread.id, { title: meta.title });
|
|
8874
8932
|
}
|
|
8875
|
-
const { autoArchiveOnMergeEnabled } = await import("./app-settings-
|
|
8933
|
+
const { autoArchiveOnMergeEnabled } = await import("./app-settings-GJ6KDYEF.js");
|
|
8876
8934
|
const latest = this.requireThread(thread.id);
|
|
8877
8935
|
if (!shouldAutoArchiveOnPrMerge({
|
|
8878
8936
|
previousPrState: prevState || null,
|
|
@@ -9149,7 +9207,7 @@ var Orchestrator = class {
|
|
|
9149
9207
|
this.emit({ type: "status_changed", threadId: archived.id, status: "archived" });
|
|
9150
9208
|
if (thread.repoPath && !isGlobalRepoPath(thread.repoPath)) {
|
|
9151
9209
|
try {
|
|
9152
|
-
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-
|
|
9210
|
+
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-PZ36M7EQ.js");
|
|
9153
9211
|
await ensureWorkspace2(thread.repoPath);
|
|
9154
9212
|
} catch {
|
|
9155
9213
|
}
|
|
@@ -9176,7 +9234,7 @@ var Orchestrator = class {
|
|
|
9176
9234
|
await runArchiveScript(thread.repoPath, thread.worktreePath);
|
|
9177
9235
|
} catch {
|
|
9178
9236
|
}
|
|
9179
|
-
const { deleteBranchOnPurgeEnabled } = await import("./app-settings-
|
|
9237
|
+
const { deleteBranchOnPurgeEnabled } = await import("./app-settings-GJ6KDYEF.js");
|
|
9180
9238
|
const deleteBranch = opts?.deleteBranch ?? deleteBranchOnPurgeEnabled();
|
|
9181
9239
|
await removeWorktree(thread.repoPath, thread.worktreePath, {
|
|
9182
9240
|
deleteBranch: deleteBranch ? thread.branchName : void 0
|
|
@@ -9203,7 +9261,7 @@ var Orchestrator = class {
|
|
|
9203
9261
|
`Cowboy checkout missing: ${thread.worktreePath}. Re-add the project folder, then restore.`
|
|
9204
9262
|
);
|
|
9205
9263
|
}
|
|
9206
|
-
const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-
|
|
9264
|
+
const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-NC4XQNQI.js");
|
|
9207
9265
|
const slug = thread.worktreePath.split("/").pop();
|
|
9208
9266
|
const dest = thread.worktreePath;
|
|
9209
9267
|
await withRepoGitLock(thread.repoPath, async () => {
|
|
@@ -9313,7 +9371,7 @@ async function startOrchestration(opts) {
|
|
|
9313
9371
|
sourceRef: "default",
|
|
9314
9372
|
...createOpts
|
|
9315
9373
|
}).catch(async () => {
|
|
9316
|
-
const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-
|
|
9374
|
+
const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-NC4XQNQI.js");
|
|
9317
9375
|
const repo = await resolveRepoRoot2(repoPath);
|
|
9318
9376
|
const def = await resolveDefaultBranch2(repo);
|
|
9319
9377
|
return orch.createThread({
|
|
@@ -9323,7 +9381,7 @@ async function startOrchestration(opts) {
|
|
|
9323
9381
|
repoPath: repo
|
|
9324
9382
|
});
|
|
9325
9383
|
});
|
|
9326
|
-
const { updateThread: upd } = await import("./thread-store-
|
|
9384
|
+
const { updateThread: upd } = await import("./thread-store-ESZYZSVC.js");
|
|
9327
9385
|
const updated = upd(thread.id, {
|
|
9328
9386
|
sourceType: "orchestration",
|
|
9329
9387
|
sourceRef: goal
|
|
@@ -9536,6 +9594,8 @@ export {
|
|
|
9536
9594
|
discoverSkills,
|
|
9537
9595
|
readSkillBody,
|
|
9538
9596
|
expandComposerPrompt,
|
|
9597
|
+
consumeComposerAttachments,
|
|
9598
|
+
takePendingTurnAttachments,
|
|
9539
9599
|
packagedDetachedJobPath,
|
|
9540
9600
|
resolveDetachedJobScript,
|
|
9541
9601
|
formatDetachedJobInvoke,
|