@sideboard-ai/core 0.1.210 → 0.1.211
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-G3TFVFBQ.js → agents-A2U3K7VK.js} +4 -4
- package/dist/{agents-IQZUN47D.js → agents-GQANI7M5.js} +4 -4
- package/dist/{chunk-3S2LDD2F.js → chunk-2PE6SZCM.js} +2 -2
- package/dist/{chunk-2R6BZRRB.js → chunk-ERNK7AWM.js} +99 -53
- package/dist/{chunk-X5PUFYDJ.js → chunk-GHKFSBES.js} +2 -0
- package/dist/{chunk-NDE5RKZP.js → chunk-IA5IPGZI.js} +3 -3
- package/dist/{chunk-YYELAUKP.js → chunk-IRCAWYTN.js} +3 -3
- package/dist/{chunk-FGTPRMPS.js → chunk-JJ3ONQ4Q.js} +2 -0
- package/dist/{chunk-AOQZZA3M.js → chunk-KZUA4QG2.js} +106 -54
- package/dist/{chunk-ZZNZX2QW.js → chunk-NRKDRQM3.js} +1 -1
- package/dist/{chunk-WX4S775K.js → chunk-VPQXJYIW.js} +1 -1
- package/dist/{chunk-ZC664YBJ.js → chunk-WNVQJZ7P.js} +2 -2
- package/dist/{coordinator-prompt-PONGPWIP.js → coordinator-prompt-EHRDZ2ZU.js} +3 -3
- package/dist/{coordinator-prompt-GCITY3Q5.js → coordinator-prompt-LMTMWCPN.js} +3 -3
- package/dist/{global-workspace-LQZLTGFL.js → global-workspace-NG2TBUI5.js} +3 -3
- package/dist/{global-workspace-LIZHU4GM.js → global-workspace-RHABXQWB.js} +3 -3
- package/dist/index.cjs +101 -40
- package/dist/index.d.cts +41 -9
- package/dist/index.d.ts +41 -9
- package/dist/index.js +18 -5
- package/dist/mcp/run-stdio.cjs +88 -40
- package/dist/mcp/run-stdio.js +5 -5
- package/dist/{orchestrator-G5HELCVT.js → orchestrator-NZO4PVFH.js} +5 -5
- package/dist/{orchestrator-ZBUXJCII.js → orchestrator-QMGH4V4K.js} +5 -5
- package/dist/{thread-store-KMZRQEPY.js → thread-store-4M6WETL6.js} +1 -1
- package/dist/{thread-store-FCWU7Y3X.js → thread-store-MSMBQ3V4.js} +1 -1
- package/dist/{workspaces-2XW2DMRG.js → workspaces-FRR6Y4BY.js} +3 -3
- package/dist/{workspaces-T6PMQZYQ.js → workspaces-VIUUE4RT.js} +3 -3
- package/dist/{worktree-2OEMMFRT.js → worktree-3MEG62KB.js} +2 -2
- package/dist/{worktree-5ZGWKKZ6.js → worktree-GKUOHXXB.js} +2 -2
- package/package.json +1 -1
|
@@ -50,14 +50,14 @@ import {
|
|
|
50
50
|
resolveQuotaFallbackAgent,
|
|
51
51
|
turnCostUsdFromCursorUsage,
|
|
52
52
|
whichOnPath
|
|
53
|
-
} from "./chunk-
|
|
54
|
-
import "./chunk-
|
|
53
|
+
} from "./chunk-IA5IPGZI.js";
|
|
54
|
+
import "./chunk-WNVQJZ7P.js";
|
|
55
55
|
import "./chunk-3OHR73VK.js";
|
|
56
56
|
import "./chunk-Y4MIXGPA.js";
|
|
57
57
|
import "./chunk-VKQGAWHY.js";
|
|
58
|
-
import "./chunk-
|
|
58
|
+
import "./chunk-VPQXJYIW.js";
|
|
59
59
|
import "./chunk-D6JWYJ4P.js";
|
|
60
|
-
import "./chunk-
|
|
60
|
+
import "./chunk-GHKFSBES.js";
|
|
61
61
|
import "./chunk-X5B3OS5I.js";
|
|
62
62
|
import "./chunk-SYFVUF2C.js";
|
|
63
63
|
import {
|
|
@@ -44,9 +44,9 @@ import {
|
|
|
44
44
|
resolveLoginCommand,
|
|
45
45
|
resolveQuotaFallbackAgent,
|
|
46
46
|
whichOnPath
|
|
47
|
-
} from "./chunk-
|
|
48
|
-
import "./chunk-
|
|
49
|
-
import "./chunk-
|
|
47
|
+
} from "./chunk-IRCAWYTN.js";
|
|
48
|
+
import "./chunk-2PE6SZCM.js";
|
|
49
|
+
import "./chunk-NRKDRQM3.js";
|
|
50
50
|
import "./chunk-6K64FJDD.js";
|
|
51
51
|
import "./chunk-QQKDGPUI.js";
|
|
52
52
|
import "./chunk-SALM35KD.js";
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
import "./chunk-4TR3HZFT.js";
|
|
68
68
|
import "./chunk-WDRMZKVB.js";
|
|
69
69
|
import "./chunk-JT7R45JB.js";
|
|
70
|
-
import "./chunk-
|
|
70
|
+
import "./chunk-JJ3ONQ4Q.js";
|
|
71
71
|
import "./chunk-7J72QJOM.js";
|
|
72
72
|
import "./chunk-77WWLBCI.js";
|
|
73
73
|
import "./chunk-WFUDY6PC.js";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
resolveRepoRoot,
|
|
6
6
|
takenSlugsFromThread,
|
|
7
7
|
teamSlugFromName
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-NRKDRQM3.js";
|
|
9
9
|
import {
|
|
10
10
|
ATTACHMENTS_DIR,
|
|
11
11
|
attachmentsGitignoreBody
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
listThreads,
|
|
29
29
|
updateThread,
|
|
30
30
|
writeThread
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-JJ3ONQ4Q.js";
|
|
32
32
|
import {
|
|
33
33
|
appDataDir,
|
|
34
34
|
globalAgentCwd,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
summarizeTurnStderr,
|
|
43
43
|
toolDescription,
|
|
44
44
|
turnFailChatText
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-IA5IPGZI.js";
|
|
46
46
|
import {
|
|
47
47
|
SLACK_REPLY_FORMATTING,
|
|
48
48
|
addWorkspace,
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
stageAbsolutePathsAsAttachments,
|
|
66
66
|
stageBuffersAsAttachments,
|
|
67
67
|
syncWorkspacesFromThreads
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-WNVQJZ7P.js";
|
|
69
69
|
import {
|
|
70
70
|
addPrStackLayer,
|
|
71
71
|
allocateTeamName,
|
|
@@ -115,7 +115,7 @@ import {
|
|
|
115
115
|
worktreeDisplayLabelForGroup,
|
|
116
116
|
worktreeNameFromPath,
|
|
117
117
|
worktreeSlugForTicket
|
|
118
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-VPQXJYIW.js";
|
|
119
119
|
import {
|
|
120
120
|
ATTACHMENTS_DIR,
|
|
121
121
|
DETACHED_JOBS_DIR,
|
|
@@ -133,7 +133,7 @@ import {
|
|
|
133
133
|
updateThread,
|
|
134
134
|
withThreadLock,
|
|
135
135
|
writeThread
|
|
136
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-GHKFSBES.js";
|
|
137
137
|
import {
|
|
138
138
|
ensureWorktreeSideboardIgnored
|
|
139
139
|
} from "./chunk-SYFVUF2C.js";
|
|
@@ -417,7 +417,7 @@ async function continueSourceThread(threadId, prompt) {
|
|
|
417
417
|
await continueOnReply(threadId, prompt);
|
|
418
418
|
return;
|
|
419
419
|
}
|
|
420
|
-
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-
|
|
420
|
+
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-NZO4PVFH.js");
|
|
421
421
|
await getOrchestrator2().send(threadId, prompt);
|
|
422
422
|
} catch {
|
|
423
423
|
}
|
|
@@ -810,9 +810,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
|
|
|
810
810
|
`Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
|
|
811
811
|
);
|
|
812
812
|
}
|
|
813
|
-
const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-
|
|
813
|
+
const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-RHABXQWB.js");
|
|
814
814
|
if (isGlobalThread2(thread)) {
|
|
815
|
-
const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-
|
|
815
|
+
const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-EHRDZ2ZU.js");
|
|
816
816
|
ensureGlobalCoordinatorCwd2(
|
|
817
817
|
isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
|
|
818
818
|
);
|
|
@@ -2529,6 +2529,7 @@ function stripArchivedTranscript(thread) {
|
|
|
2529
2529
|
...thread,
|
|
2530
2530
|
attachments: [],
|
|
2531
2531
|
pendingTurnAttachments: [],
|
|
2532
|
+
queueAttachments: [],
|
|
2532
2533
|
messages: [historyRetentionStubMessage(thread)]
|
|
2533
2534
|
},
|
|
2534
2535
|
{ touch: false }
|
|
@@ -4313,7 +4314,7 @@ async function adoptThread(input) {
|
|
|
4313
4314
|
messages: input.messages ?? []
|
|
4314
4315
|
});
|
|
4315
4316
|
writeThread(thread);
|
|
4316
|
-
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-
|
|
4317
|
+
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-VIUUE4RT.js");
|
|
4317
4318
|
await ensureWorkspace2(repoPath);
|
|
4318
4319
|
const { ensureWorktreeSideboardIgnored: ensureWorktreeSideboardIgnored2 } = await import("./worktree-exclude-N5X5I422.js");
|
|
4319
4320
|
await ensureWorktreeSideboardIgnored2(input.worktreePath);
|
|
@@ -6060,24 +6061,56 @@ function expandComposerPrompt(worktreePath, prompt, opts) {
|
|
|
6060
6061
|
|
|
6061
6062
|
// src/composer/consume-attachments.ts
|
|
6062
6063
|
function consumeComposerAttachments(thread) {
|
|
6063
|
-
if (thread.attachments.length === 0) {
|
|
6064
|
-
return {
|
|
6065
|
-
attachments: [],
|
|
6066
|
-
pendingTurnAttachments: thread.pendingTurnAttachments ?? []
|
|
6067
|
-
};
|
|
6068
|
-
}
|
|
6069
6064
|
return {
|
|
6070
6065
|
attachments: [],
|
|
6071
|
-
|
|
6072
|
-
...thread.pendingTurnAttachments ?? [],
|
|
6073
|
-
...thread.attachments
|
|
6074
|
-
]
|
|
6066
|
+
consumed: [...thread.attachments]
|
|
6075
6067
|
};
|
|
6076
6068
|
}
|
|
6077
6069
|
function takePendingTurnAttachments(thread) {
|
|
6078
6070
|
const pending = thread.pendingTurnAttachments ?? [];
|
|
6079
|
-
if (pending.length
|
|
6080
|
-
return [...
|
|
6071
|
+
if (pending.length > 0) return [...pending];
|
|
6072
|
+
return thread.attachments.length > 0 ? [...thread.attachments] : [];
|
|
6073
|
+
}
|
|
6074
|
+
function alignQueueAttachments(queueLength, existing) {
|
|
6075
|
+
const next = (existing ?? []).slice(0, queueLength).map((slot) => [...slot ?? []]);
|
|
6076
|
+
while (next.length < queueLength) next.push([]);
|
|
6077
|
+
return next;
|
|
6078
|
+
}
|
|
6079
|
+
function appendQueuedItem(queue, queueAttachments, prompt, attachments = []) {
|
|
6080
|
+
return {
|
|
6081
|
+
queue: [...queue, prompt],
|
|
6082
|
+
queueAttachments: [...alignQueueAttachments(queue.length, queueAttachments), [...attachments]]
|
|
6083
|
+
};
|
|
6084
|
+
}
|
|
6085
|
+
function prependQueuedItem(queue, queueAttachments, prompt, attachments = []) {
|
|
6086
|
+
return {
|
|
6087
|
+
queue: [prompt, ...queue],
|
|
6088
|
+
queueAttachments: [[...attachments], ...alignQueueAttachments(queue.length, queueAttachments)]
|
|
6089
|
+
};
|
|
6090
|
+
}
|
|
6091
|
+
function removeQueuedItem(queue, queueAttachments, index) {
|
|
6092
|
+
const aligned = alignQueueAttachments(queue.length, queueAttachments);
|
|
6093
|
+
return {
|
|
6094
|
+
queue: queue.filter((_, i) => i !== index),
|
|
6095
|
+
queueAttachments: aligned.filter((_, i) => i !== index)
|
|
6096
|
+
};
|
|
6097
|
+
}
|
|
6098
|
+
function moveQueuedItemToFront(queue, queueAttachments, index) {
|
|
6099
|
+
const aligned = alignQueueAttachments(queue.length, queueAttachments);
|
|
6100
|
+
return {
|
|
6101
|
+
queue: [queue[index], ...queue.filter((_, i) => i !== index)],
|
|
6102
|
+
queueAttachments: [aligned[index] ?? [], ...aligned.filter((_, i) => i !== index)]
|
|
6103
|
+
};
|
|
6104
|
+
}
|
|
6105
|
+
function shiftQueuedItem(queue, queueAttachments) {
|
|
6106
|
+
if (queue.length === 0) return null;
|
|
6107
|
+
const aligned = alignQueueAttachments(queue.length, queueAttachments);
|
|
6108
|
+
return {
|
|
6109
|
+
prompt: queue[0],
|
|
6110
|
+
attachments: aligned[0] ?? [],
|
|
6111
|
+
queue: queue.slice(1),
|
|
6112
|
+
queueAttachments: aligned.slice(1)
|
|
6113
|
+
};
|
|
6081
6114
|
}
|
|
6082
6115
|
|
|
6083
6116
|
// src/agents/instructions.ts
|
|
@@ -6713,7 +6746,7 @@ function formatScheduledPrompt(name, prompt) {
|
|
|
6713
6746
|
${prompt}`;
|
|
6714
6747
|
}
|
|
6715
6748
|
async function defaultDeps() {
|
|
6716
|
-
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-
|
|
6749
|
+
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-NZO4PVFH.js");
|
|
6717
6750
|
const orch = getOrchestrator2();
|
|
6718
6751
|
return {
|
|
6719
6752
|
findThread: (id) => findThreadByRef(id),
|
|
@@ -7193,9 +7226,9 @@ var Orchestrator = class {
|
|
|
7193
7226
|
if (!thread || thread.status === "archived") return;
|
|
7194
7227
|
this.crashContinued.add(threadId);
|
|
7195
7228
|
const prompt = formatAgentErrorContinuePrompt(opts.detail);
|
|
7196
|
-
const
|
|
7197
|
-
updateThread(threadId,
|
|
7198
|
-
this.emit({ type: "queue_changed", threadId, queue });
|
|
7229
|
+
const next = prependQueuedItem(thread.queue, thread.queueAttachments, prompt);
|
|
7230
|
+
updateThread(threadId, next);
|
|
7231
|
+
this.emit({ type: "queue_changed", threadId, queue: next.queue });
|
|
7199
7232
|
this.haltDrain.delete(threadId);
|
|
7200
7233
|
}
|
|
7201
7234
|
/**
|
|
@@ -7224,9 +7257,9 @@ var Orchestrator = class {
|
|
|
7224
7257
|
}
|
|
7225
7258
|
if (decision.action === "nudge") this.jobContinueNudged.add(threadId);
|
|
7226
7259
|
else this.jobContinueCount.set(threadId, (this.jobContinueCount.get(threadId) ?? 0) + 1);
|
|
7227
|
-
const
|
|
7228
|
-
updateThread(threadId,
|
|
7229
|
-
this.emit({ type: "queue_changed", threadId, queue });
|
|
7260
|
+
const next = prependQueuedItem(thread.queue, thread.queueAttachments, decision.prompt);
|
|
7261
|
+
updateThread(threadId, next);
|
|
7262
|
+
this.emit({ type: "queue_changed", threadId, queue: next.queue });
|
|
7230
7263
|
this.haltDrain.delete(threadId);
|
|
7231
7264
|
}
|
|
7232
7265
|
getThreads(includeArchived = false) {
|
|
@@ -7334,18 +7367,22 @@ var Orchestrator = class {
|
|
|
7334
7367
|
throw new Error(`Thread is archived: ${thread.id}`);
|
|
7335
7368
|
}
|
|
7336
7369
|
const followUp = resolveSendFollowUp(current, opts?.followUp);
|
|
7337
|
-
const
|
|
7370
|
+
const consumed = consumeComposerAttachments(current);
|
|
7371
|
+
const queued = appendQueuedItem(
|
|
7372
|
+
current.queue,
|
|
7373
|
+
current.queueAttachments,
|
|
7374
|
+
prompt,
|
|
7375
|
+
consumed.consumed
|
|
7376
|
+
);
|
|
7338
7377
|
this.crashContinued.delete(thread.id);
|
|
7339
7378
|
this.jobContinueCount.delete(thread.id);
|
|
7340
7379
|
this.jobContinueNudged.delete(thread.id);
|
|
7341
7380
|
this.haltDrain.delete(thread.id);
|
|
7342
7381
|
const inFlight = this.activeTurns.has(thread.id) || this.startingTurns.has(thread.id) || current.status === "running";
|
|
7343
7382
|
shouldSteer = followUp === "steer" && (inFlight || current.queue.length > 0);
|
|
7344
|
-
const patch =
|
|
7345
|
-
if (
|
|
7346
|
-
const consumed = consumeComposerAttachments(current);
|
|
7383
|
+
const patch = queued;
|
|
7384
|
+
if (consumed.consumed.length > 0) {
|
|
7347
7385
|
patch.attachments = consumed.attachments;
|
|
7348
|
-
patch.pendingTurnAttachments = consumed.pendingTurnAttachments;
|
|
7349
7386
|
}
|
|
7350
7387
|
if (!inFlight) patch.status = "queued";
|
|
7351
7388
|
const pid = current.agentPid;
|
|
@@ -7353,7 +7390,7 @@ var Orchestrator = class {
|
|
|
7353
7390
|
patch.agentPid = null;
|
|
7354
7391
|
}
|
|
7355
7392
|
updateThread(thread.id, patch);
|
|
7356
|
-
this.emit({ type: "queue_changed", threadId: thread.id, queue });
|
|
7393
|
+
this.emit({ type: "queue_changed", threadId: thread.id, queue: queued.queue });
|
|
7357
7394
|
if (!inFlight) {
|
|
7358
7395
|
this.emit({ type: "status_changed", threadId: thread.id, status: "queued" });
|
|
7359
7396
|
}
|
|
@@ -7395,14 +7432,17 @@ var Orchestrator = class {
|
|
|
7395
7432
|
return withThreadLock(thread.id, async () => {
|
|
7396
7433
|
const current = this.requireThread(thread.id);
|
|
7397
7434
|
if (index < 0 || index >= current.queue.length) return current;
|
|
7398
|
-
const
|
|
7399
|
-
const stillQueued = queue.length > 0;
|
|
7435
|
+
const removed = removeQueuedItem(current.queue, current.queueAttachments, index);
|
|
7436
|
+
const stillQueued = removed.queue.length > 0;
|
|
7400
7437
|
const inFlight = this.activeTurns.has(thread.id) || this.startingTurns.has(thread.id);
|
|
7401
7438
|
updateThread(thread.id, {
|
|
7402
|
-
|
|
7439
|
+
...removed,
|
|
7440
|
+
// Old sends parked on pendingTurnAttachments; drop that bag when the
|
|
7441
|
+
// follow-up that owned it is gone so a later turn cannot inherit it.
|
|
7442
|
+
...stillQueued ? {} : { pendingTurnAttachments: [] },
|
|
7403
7443
|
status: !stillQueued && !inFlight && current.status === "queued" ? "idle" : current.status
|
|
7404
7444
|
});
|
|
7405
|
-
this.emit({ type: "queue_changed", threadId: thread.id, queue });
|
|
7445
|
+
this.emit({ type: "queue_changed", threadId: thread.id, queue: removed.queue });
|
|
7406
7446
|
const next = this.requireThread(thread.id);
|
|
7407
7447
|
this.emit({ type: "status_changed", threadId: thread.id, status: next.status });
|
|
7408
7448
|
return next;
|
|
@@ -7418,12 +7458,10 @@ var Orchestrator = class {
|
|
|
7418
7458
|
const promoted = await withThreadLock(thread.id, async () => {
|
|
7419
7459
|
const current2 = this.requireThread(thread.id);
|
|
7420
7460
|
if (index < 0 || index >= current2.queue.length) return false;
|
|
7421
|
-
const
|
|
7422
|
-
const rest = current2.queue.filter((_, i) => i !== index);
|
|
7423
|
-
const queue = [item, ...rest];
|
|
7461
|
+
const next = moveQueuedItemToFront(current2.queue, current2.queueAttachments, index);
|
|
7424
7462
|
this.haltDrain.delete(thread.id);
|
|
7425
|
-
updateThread(thread.id,
|
|
7426
|
-
this.emit({ type: "queue_changed", threadId: thread.id, queue });
|
|
7463
|
+
updateThread(thread.id, next);
|
|
7464
|
+
this.emit({ type: "queue_changed", threadId: thread.id, queue: next.queue });
|
|
7427
7465
|
return true;
|
|
7428
7466
|
});
|
|
7429
7467
|
if (!promoted) return this.requireThread(thread.id);
|
|
@@ -7478,11 +7516,15 @@ var Orchestrator = class {
|
|
|
7478
7516
|
}
|
|
7479
7517
|
continue;
|
|
7480
7518
|
}
|
|
7481
|
-
const
|
|
7482
|
-
|
|
7483
|
-
updateThread(threadId, {
|
|
7484
|
-
|
|
7485
|
-
|
|
7519
|
+
const shifted = shiftQueuedItem(thread.queue, thread.queueAttachments);
|
|
7520
|
+
if (!shifted) break;
|
|
7521
|
+
updateThread(threadId, {
|
|
7522
|
+
queue: shifted.queue,
|
|
7523
|
+
queueAttachments: shifted.queueAttachments,
|
|
7524
|
+
...shifted.attachments.length > 0 ? { pendingTurnAttachments: shifted.attachments } : {}
|
|
7525
|
+
});
|
|
7526
|
+
this.emit({ type: "queue_changed", threadId, queue: shifted.queue });
|
|
7527
|
+
await this.runTurn(threadId, shifted.prompt);
|
|
7486
7528
|
}
|
|
7487
7529
|
} finally {
|
|
7488
7530
|
this.draining.delete(threadId);
|
|
@@ -7527,6 +7569,7 @@ var Orchestrator = class {
|
|
|
7527
7569
|
thread = this.requireThread(threadId);
|
|
7528
7570
|
}
|
|
7529
7571
|
const autoContinue = isJobContinuePrompt(prompt) || prompt.trim().startsWith("The previous agent process ended before it finished.");
|
|
7572
|
+
const parkedSnapshot = thread.pendingTurnAttachments ?? [];
|
|
7530
7573
|
const parked = takePendingTurnAttachments(thread);
|
|
7531
7574
|
const sentAttachments = !autoContinue && parked.length > 0 ? parked : void 0;
|
|
7532
7575
|
appendMessage(threadId, {
|
|
@@ -7596,7 +7639,10 @@ var Orchestrator = class {
|
|
|
7596
7639
|
expandedPrompt
|
|
7597
7640
|
].filter(Boolean).join("\n\n");
|
|
7598
7641
|
if (!autoContinue && sentAttachments) {
|
|
7599
|
-
updateThread(
|
|
7642
|
+
updateThread(
|
|
7643
|
+
threadId,
|
|
7644
|
+
parkedSnapshot.length > 0 ? { pendingTurnAttachments: [] } : { attachments: [], pendingTurnAttachments: [] }
|
|
7645
|
+
);
|
|
7600
7646
|
}
|
|
7601
7647
|
const adapter = getAdapter(thread.agent);
|
|
7602
7648
|
const resolved = await adapter.resolveSessionId(thread.worktreePath, thread.sessionId);
|
|
@@ -8012,7 +8058,7 @@ var Orchestrator = class {
|
|
|
8012
8058
|
}
|
|
8013
8059
|
if (clearQueue && thread.queue.length > 0) {
|
|
8014
8060
|
this.haltDrain.delete(thread.id);
|
|
8015
|
-
updateThread(thread.id, { queue: [] });
|
|
8061
|
+
updateThread(thread.id, { queue: [], queueAttachments: [] });
|
|
8016
8062
|
this.emit({ type: "queue_changed", threadId: thread.id, queue: [] });
|
|
8017
8063
|
} else if (!clearQueue && !continueQueue) {
|
|
8018
8064
|
this.haltDrain.add(thread.id);
|
|
@@ -8922,7 +8968,7 @@ var Orchestrator = class {
|
|
|
8922
8968
|
this.enforceHistoryRetention();
|
|
8923
8969
|
if (thread.repoPath && !isGlobalRepoPath(thread.repoPath)) {
|
|
8924
8970
|
try {
|
|
8925
|
-
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-
|
|
8971
|
+
const { ensureWorkspace: ensureWorkspace2 } = await import("./workspaces-VIUUE4RT.js");
|
|
8926
8972
|
await ensureWorkspace2(thread.repoPath);
|
|
8927
8973
|
} catch {
|
|
8928
8974
|
}
|
|
@@ -8976,7 +9022,7 @@ var Orchestrator = class {
|
|
|
8976
9022
|
`Cowboy checkout missing: ${thread.worktreePath}. Re-add the project folder, then restore.`
|
|
8977
9023
|
);
|
|
8978
9024
|
}
|
|
8979
|
-
const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-
|
|
9025
|
+
const { createThreadWorktree: createThreadWorktree2 } = await import("./worktree-3MEG62KB.js");
|
|
8980
9026
|
const slug = thread.worktreePath.split("/").pop();
|
|
8981
9027
|
const dest = thread.worktreePath;
|
|
8982
9028
|
await withRepoGitLock(thread.repoPath, async () => {
|
|
@@ -9086,7 +9132,7 @@ async function startOrchestration(opts) {
|
|
|
9086
9132
|
sourceRef: "default",
|
|
9087
9133
|
...createOpts
|
|
9088
9134
|
}).catch(async () => {
|
|
9089
|
-
const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-
|
|
9135
|
+
const { resolveDefaultBranch: resolveDefaultBranch2, resolveRepoRoot: resolveRepoRoot2 } = await import("./worktree-3MEG62KB.js");
|
|
9090
9136
|
const repo = await resolveRepoRoot2(repoPath);
|
|
9091
9137
|
const def = await resolveDefaultBranch2(repo);
|
|
9092
9138
|
return orch.createThread({
|
|
@@ -9096,7 +9142,7 @@ async function startOrchestration(opts) {
|
|
|
9096
9142
|
repoPath: repo
|
|
9097
9143
|
});
|
|
9098
9144
|
});
|
|
9099
|
-
const { updateThread: upd } = await import("./thread-store-
|
|
9145
|
+
const { updateThread: upd } = await import("./thread-store-MSMBQ3V4.js");
|
|
9100
9146
|
const updated = upd(thread.id, {
|
|
9101
9147
|
sourceType: "orchestration",
|
|
9102
9148
|
sourceRef: goal
|
|
@@ -48,6 +48,7 @@ function normalizeThread(raw) {
|
|
|
48
48
|
agentPid: raw.agentPid ?? null,
|
|
49
49
|
attachments: Array.isArray(raw.attachments) ? raw.attachments : [],
|
|
50
50
|
pendingTurnAttachments: Array.isArray(raw.pendingTurnAttachments) ? raw.pendingTurnAttachments : [],
|
|
51
|
+
queueAttachments: Array.isArray(raw.queueAttachments) ? raw.queueAttachments : [],
|
|
51
52
|
prTitle: raw.prTitle ?? null,
|
|
52
53
|
prState: raw.prState ?? null,
|
|
53
54
|
prIsDraft: Boolean(raw.prIsDraft),
|
|
@@ -92,6 +93,7 @@ function createEmptyThread(partial) {
|
|
|
92
93
|
messages: partial.messages ?? [],
|
|
93
94
|
attachments: partial.attachments ?? [],
|
|
94
95
|
pendingTurnAttachments: partial.pendingTurnAttachments ?? [],
|
|
96
|
+
queueAttachments: partial.queueAttachments ?? [],
|
|
95
97
|
createdAt: ts,
|
|
96
98
|
updatedAt: ts,
|
|
97
99
|
archivedAt: typeof partial.archivedAt === "string" && partial.archivedAt.trim() ? partial.archivedAt.trim() : void 0,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
isOrchestratorThread
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-WNVQJZ7P.js";
|
|
6
6
|
import {
|
|
7
7
|
applyConnectedTeamToCli,
|
|
8
8
|
brightsyMcpServerName,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
mergeAgentGitAuthEnv,
|
|
21
21
|
resolveAgentGitAuthEnv,
|
|
22
22
|
resolveCodexGitWritableRoots
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-VPQXJYIW.js";
|
|
24
24
|
import {
|
|
25
25
|
enrichPathWithNpmGlobalBin,
|
|
26
26
|
isConductorBundledCli,
|
|
@@ -2414,7 +2414,7 @@ var claudeAdapter = {
|
|
|
2414
2414
|
);
|
|
2415
2415
|
}
|
|
2416
2416
|
const mode = permissionMode(thread);
|
|
2417
|
-
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-
|
|
2417
|
+
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-RHABXQWB.js");
|
|
2418
2418
|
const isOrchestrator = isOrchestratorThread2(thread);
|
|
2419
2419
|
const injectedServers = await buildInjectedMcpServers({
|
|
2420
2420
|
includeSideboard: true,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isOrchestratorThread
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2PE6SZCM.js";
|
|
4
4
|
import {
|
|
5
5
|
codexUnattendedGitConfigArgs,
|
|
6
6
|
mergeAgentGitAuthEnv,
|
|
7
7
|
resolveAgentGitAuthEnv,
|
|
8
8
|
resolveCodexGitWritableRoots
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NRKDRQM3.js";
|
|
10
10
|
import {
|
|
11
11
|
applyConnectedTeamToCli,
|
|
12
12
|
brightsyMcpServerName,
|
|
@@ -1903,7 +1903,7 @@ var claudeAdapter = {
|
|
|
1903
1903
|
);
|
|
1904
1904
|
}
|
|
1905
1905
|
const mode = permissionMode(thread);
|
|
1906
|
-
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-
|
|
1906
|
+
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-NG2TBUI5.js");
|
|
1907
1907
|
const isOrchestrator = isOrchestratorThread2(thread);
|
|
1908
1908
|
const injectedServers = await buildInjectedMcpServers({
|
|
1909
1909
|
includeSideboard: true,
|
|
@@ -46,6 +46,7 @@ function normalizeThread(raw) {
|
|
|
46
46
|
agentPid: raw.agentPid ?? null,
|
|
47
47
|
attachments: Array.isArray(raw.attachments) ? raw.attachments : [],
|
|
48
48
|
pendingTurnAttachments: Array.isArray(raw.pendingTurnAttachments) ? raw.pendingTurnAttachments : [],
|
|
49
|
+
queueAttachments: Array.isArray(raw.queueAttachments) ? raw.queueAttachments : [],
|
|
49
50
|
prTitle: raw.prTitle ?? null,
|
|
50
51
|
prState: raw.prState ?? null,
|
|
51
52
|
prIsDraft: Boolean(raw.prIsDraft),
|
|
@@ -90,6 +91,7 @@ function createEmptyThread(partial) {
|
|
|
90
91
|
messages: partial.messages ?? [],
|
|
91
92
|
attachments: partial.attachments ?? [],
|
|
92
93
|
pendingTurnAttachments: partial.pendingTurnAttachments ?? [],
|
|
94
|
+
queueAttachments: partial.queueAttachments ?? [],
|
|
93
95
|
createdAt: ts,
|
|
94
96
|
updatedAt: ts,
|
|
95
97
|
archivedAt: typeof partial.archivedAt === "string" && partial.archivedAt.trim() ? partial.archivedAt.trim() : void 0,
|