@sideboard-ai/core 0.1.342 → 0.1.344
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-LNZ465IM.js → agents-7CHZO3K3.js} +2 -2
- package/dist/{agents-7DCNOMFP.js → agents-FI62PUSY.js} +2 -2
- package/dist/{chunk-5HUR77ZH.js → chunk-5IMXA563.js} +140 -72
- package/dist/{chunk-LDJT3TLN.js → chunk-6N4W2MJ2.js} +2 -2
- package/dist/{chunk-DZF25KTX.js → chunk-AX7SUDTC.js} +147 -77
- package/dist/{chunk-DEQLDEYR.js → chunk-BD7KUYJA.js} +2 -2
- package/dist/{chunk-2BLJ726H.js → chunk-HRHF6N6S.js} +1 -0
- package/dist/{chunk-5BFEHSHO.js → chunk-J3BQHHDZ.js} +1 -0
- package/dist/{chunk-S3DTEGMK.js → chunk-TW63CYUA.js} +2 -2
- package/dist/{chunk-NGIGRAZB.js → chunk-YNKVGJE5.js} +2 -2
- package/dist/{conductor-4SWJM5FS.js → conductor-3A2TNWUW.js} +2 -2
- package/dist/{conductor-Q433HU77.js → conductor-H56XPSX4.js} +2 -2
- package/dist/{coordinator-prompt-5QHWCO7V.js → coordinator-prompt-2YQGOA6Y.js} +1 -1
- package/dist/{coordinator-prompt-Z7PPP45X.js → coordinator-prompt-7QALNDIV.js} +1 -1
- package/dist/{global-workspace-DL4K4K7O.js → global-workspace-HM2RKBCT.js} +1 -1
- package/dist/{global-workspace-VDCZMFCZ.js → global-workspace-YRPM6JLZ.js} +1 -1
- package/dist/index.cjs +142 -68
- package/dist/index.d.cts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +11 -7
- package/dist/mcp/run-stdio.cjs +138 -68
- package/dist/mcp/run-stdio.js +4 -4
- package/dist/{orchestrator-HIWWPWL5.js → orchestrator-DGH2UMPW.js} +4 -4
- package/dist/{orchestrator-BPCM4OP3.js → orchestrator-OWO6LQ5U.js} +4 -4
- package/dist/{workspaces-MX4W4SSB.js → workspaces-SSYKQUAU.js} +1 -1
- package/dist/{workspaces-EIIHHH4S.js → workspaces-V6IIBSKA.js} +1 -1
- package/package.json +1 -1
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
resolveCursorSdkRoot,
|
|
47
47
|
resolveQuotaFallbackAgent,
|
|
48
48
|
turnCostUsdFromCursorUsage
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-TW63CYUA.js";
|
|
50
50
|
import "./chunk-ORO4ENZR.js";
|
|
51
51
|
import {
|
|
52
52
|
getAgentSetupInfo,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
resolveLoginCommand,
|
|
61
61
|
whichOnPath
|
|
62
62
|
} from "./chunk-4PXHJA5K.js";
|
|
63
|
-
import "./chunk-
|
|
63
|
+
import "./chunk-J3BQHHDZ.js";
|
|
64
64
|
import "./chunk-RTZO2YJC.js";
|
|
65
65
|
import "./chunk-I6RGRUNY.js";
|
|
66
66
|
import "./chunk-E63AM3PW.js";
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
planModeTurnInstruction,
|
|
38
38
|
resolveCursorModelId,
|
|
39
39
|
resolveQuotaFallbackAgent
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-6N4W2MJ2.js";
|
|
41
41
|
import {
|
|
42
42
|
getAgentSetupInfo,
|
|
43
43
|
installAgent,
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
import "./chunk-XOEKCE6L.js";
|
|
54
54
|
import "./chunk-D7US5R4H.js";
|
|
55
55
|
import "./chunk-BIM24I3O.js";
|
|
56
|
-
import "./chunk-
|
|
56
|
+
import "./chunk-HRHF6N6S.js";
|
|
57
57
|
import "./chunk-G3UV3GXJ.js";
|
|
58
58
|
import "./chunk-JX3OWNOT.js";
|
|
59
59
|
import "./chunk-BMRJNRQK.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
parseSessionQuotaResetAt,
|
|
15
15
|
planModeTurnInstruction,
|
|
16
16
|
resolveQuotaFallbackAgent
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-TW63CYUA.js";
|
|
18
18
|
import {
|
|
19
19
|
applyWorktreePkgCacheEnv,
|
|
20
20
|
askBlockStillWaiting,
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
worktreeDevProcessKey,
|
|
55
55
|
worktreeRunProcessKey,
|
|
56
56
|
worktreeSetupProcessKey
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-BD7KUYJA.js";
|
|
58
58
|
import {
|
|
59
59
|
applyAgentEvent,
|
|
60
60
|
clipAgentEventForPaint,
|
|
@@ -121,7 +121,7 @@ import {
|
|
|
121
121
|
stageAbsolutePathsAsAttachments,
|
|
122
122
|
stageBuffersAsAttachments,
|
|
123
123
|
syncWorkspacesFromThreads
|
|
124
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-J3BQHHDZ.js";
|
|
125
125
|
import {
|
|
126
126
|
addPrStackLayer,
|
|
127
127
|
allocateTeamSlug,
|
|
@@ -571,9 +571,9 @@ async function spawnAgentTurn(thread, input, onEvent) {
|
|
|
571
571
|
`Cannot spawn ${thread.agent}: thread ${thread.id} has no worktreePath`
|
|
572
572
|
);
|
|
573
573
|
}
|
|
574
|
-
const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-
|
|
574
|
+
const { isGlobalThread: isGlobalThread2 } = await import("./global-workspace-HM2RKBCT.js");
|
|
575
575
|
if (isGlobalThread2(thread)) {
|
|
576
|
-
const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-
|
|
576
|
+
const { ensureGlobalCoordinatorCwd: ensureGlobalCoordinatorCwd2 } = await import("./coordinator-prompt-7QALNDIV.js");
|
|
577
577
|
ensureGlobalCoordinatorCwd2(
|
|
578
578
|
isOrchestratorThread(thread) ? { orchestratorThreadId: thread.id } : void 0
|
|
579
579
|
);
|
|
@@ -3937,7 +3937,7 @@ async function adoptThread(input) {
|
|
|
3937
3937
|
messages: input.messages ?? []
|
|
3938
3938
|
});
|
|
3939
3939
|
writeThread(thread);
|
|
3940
|
-
const { addWorkspace: addWorkspace2 } = await import("./workspaces-
|
|
3940
|
+
const { addWorkspace: addWorkspace2 } = await import("./workspaces-V6IIBSKA.js");
|
|
3941
3941
|
await addWorkspace2(repoPath);
|
|
3942
3942
|
const { ensureWorktreeSideboardIgnored } = await import("./worktree-exclude-KMZQXZKP.js");
|
|
3943
3943
|
await ensureWorktreeSideboardIgnored(input.worktreePath);
|
|
@@ -5925,49 +5925,6 @@ function expandComposerPrompt(worktreePath, prompt, opts) {
|
|
|
5925
5925
|
};
|
|
5926
5926
|
}
|
|
5927
5927
|
|
|
5928
|
-
// src/composer/agent-has-replied.ts
|
|
5929
|
-
function joinSteerPrompt(base, addition) {
|
|
5930
|
-
const next = addition.trim();
|
|
5931
|
-
if (!next) return base;
|
|
5932
|
-
const head = base.replace(/\s+$/, "");
|
|
5933
|
-
if (!head) return next;
|
|
5934
|
-
return `${head}
|
|
5935
|
-
${next}`;
|
|
5936
|
-
}
|
|
5937
|
-
function messagesWithRewrittenUserPrompt(messages, from, to) {
|
|
5938
|
-
if (from === to) return null;
|
|
5939
|
-
const next = messages.slice();
|
|
5940
|
-
for (let i = next.length - 1; i >= 0; i--) {
|
|
5941
|
-
const message = next[i];
|
|
5942
|
-
if (!message || message.origin === "continue" || message.role === "summary") continue;
|
|
5943
|
-
if (message.role !== "user") continue;
|
|
5944
|
-
if (message.text !== from) return null;
|
|
5945
|
-
next[i] = { ...message, text: to };
|
|
5946
|
-
return next;
|
|
5947
|
-
}
|
|
5948
|
-
return null;
|
|
5949
|
-
}
|
|
5950
|
-
function trailingUnansweredUserText(messages) {
|
|
5951
|
-
for (let i = messages.length - 1; i >= 0; i--) {
|
|
5952
|
-
const message = messages[i];
|
|
5953
|
-
if (!message || message.origin === "continue" || message.role === "summary") continue;
|
|
5954
|
-
if (message.role === "agent") {
|
|
5955
|
-
const text3 = (message.text ?? "").trim();
|
|
5956
|
-
if (text3 || (message.parts?.length ?? 0) > 0) return null;
|
|
5957
|
-
continue;
|
|
5958
|
-
}
|
|
5959
|
-
if (message.role === "user") return message.text;
|
|
5960
|
-
}
|
|
5961
|
-
return null;
|
|
5962
|
-
}
|
|
5963
|
-
function livePartsShowAgentReply(parts) {
|
|
5964
|
-
for (const part of parts) {
|
|
5965
|
-
if (part.type === "tool") return true;
|
|
5966
|
-
if ((part.type === "text" || part.type === "thinking") && part.text.trim()) return true;
|
|
5967
|
-
}
|
|
5968
|
-
return false;
|
|
5969
|
-
}
|
|
5970
|
-
|
|
5971
5928
|
// src/composer/consume-attachments.ts
|
|
5972
5929
|
function consumeComposerAttachments(thread) {
|
|
5973
5930
|
return {
|
|
@@ -5978,6 +5935,22 @@ function consumeComposerAttachments(thread) {
|
|
|
5978
5935
|
function takePendingTurnAttachments(thread) {
|
|
5979
5936
|
return [...thread.pendingTurnAttachments ?? []];
|
|
5980
5937
|
}
|
|
5938
|
+
function mergeTurnAttachments(base, extra) {
|
|
5939
|
+
const next = [];
|
|
5940
|
+
const seen = /* @__PURE__ */ new Set();
|
|
5941
|
+
for (const att of [...base ?? [], ...extra ?? []]) {
|
|
5942
|
+
if (seen.has(att.id)) continue;
|
|
5943
|
+
seen.add(att.id);
|
|
5944
|
+
next.push(att);
|
|
5945
|
+
}
|
|
5946
|
+
return next;
|
|
5947
|
+
}
|
|
5948
|
+
function sameTurnAttachments(a, b) {
|
|
5949
|
+
const left = a ?? [];
|
|
5950
|
+
const right = b ?? [];
|
|
5951
|
+
if (left.length !== right.length) return false;
|
|
5952
|
+
return left.every((att, i) => att.id === right[i]?.id);
|
|
5953
|
+
}
|
|
5981
5954
|
function alignQueueAttachments(queueLength, existing) {
|
|
5982
5955
|
const next = (existing ?? []).slice(0, queueLength).map((slot) => [...slot ?? []]);
|
|
5983
5956
|
while (next.length < queueLength) next.push([]);
|
|
@@ -6020,15 +5993,95 @@ function shiftQueuedItem(queue, queueAttachments) {
|
|
|
6020
5993
|
};
|
|
6021
5994
|
}
|
|
6022
5995
|
|
|
5996
|
+
// src/composer/agent-has-replied.ts
|
|
5997
|
+
function joinSteerPrompt(base, addition) {
|
|
5998
|
+
const next = addition.trim();
|
|
5999
|
+
if (!next) return base;
|
|
6000
|
+
const head = base.replace(/\s+$/, "");
|
|
6001
|
+
if (!head) return next;
|
|
6002
|
+
return `${head}
|
|
6003
|
+
${next}`;
|
|
6004
|
+
}
|
|
6005
|
+
function messagesWithRewrittenUserPrompt(messages, from, to, attachments) {
|
|
6006
|
+
const extra = attachments ?? [];
|
|
6007
|
+
if (from === to && extra.length === 0) return null;
|
|
6008
|
+
const next = messages.slice();
|
|
6009
|
+
for (let i = next.length - 1; i >= 0; i--) {
|
|
6010
|
+
const message = next[i];
|
|
6011
|
+
if (!message || message.origin === "continue" || message.role === "summary") continue;
|
|
6012
|
+
if (message.role !== "user") continue;
|
|
6013
|
+
if (message.text !== from) return null;
|
|
6014
|
+
const merged = mergeTurnAttachments(message.attachments, extra);
|
|
6015
|
+
if (from === to && merged.length === (message.attachments?.length ?? 0)) return null;
|
|
6016
|
+
next[i] = {
|
|
6017
|
+
...message,
|
|
6018
|
+
text: to,
|
|
6019
|
+
...merged.length > 0 ? { attachments: merged } : {}
|
|
6020
|
+
};
|
|
6021
|
+
return next;
|
|
6022
|
+
}
|
|
6023
|
+
return null;
|
|
6024
|
+
}
|
|
6025
|
+
function trailingUnansweredUserText(messages) {
|
|
6026
|
+
for (let i = messages.length - 1; i >= 0; i--) {
|
|
6027
|
+
const message = messages[i];
|
|
6028
|
+
if (!message || message.origin === "continue" || message.role === "summary") continue;
|
|
6029
|
+
if (message.role === "agent") {
|
|
6030
|
+
const text3 = (message.text ?? "").trim();
|
|
6031
|
+
if (text3 || (message.parts?.length ?? 0) > 0) return null;
|
|
6032
|
+
continue;
|
|
6033
|
+
}
|
|
6034
|
+
if (message.role === "user") return message.text;
|
|
6035
|
+
}
|
|
6036
|
+
return null;
|
|
6037
|
+
}
|
|
6038
|
+
function livePartsShowAgentReply(parts) {
|
|
6039
|
+
for (const part of parts) {
|
|
6040
|
+
if (part.type === "tool") return true;
|
|
6041
|
+
if ((part.type === "text" || part.type === "thinking") && part.text.trim()) return true;
|
|
6042
|
+
}
|
|
6043
|
+
return false;
|
|
6044
|
+
}
|
|
6045
|
+
|
|
6023
6046
|
// src/orchestrator/enqueue-thread-send.ts
|
|
6024
6047
|
function resolveSendFollowUp(thread, requested) {
|
|
6025
6048
|
if (requested === "steer" || requested === "queue") return requested;
|
|
6026
6049
|
return isOrchestratorThread(thread) ? followUpBehavior() : "queue";
|
|
6027
6050
|
}
|
|
6028
|
-
function
|
|
6051
|
+
function beginOpenSteerDraft(text3) {
|
|
6052
|
+
return { text: text3, spawned: false, attachments: [] };
|
|
6053
|
+
}
|
|
6054
|
+
function seedOpenSteerAttachments(draft, sent) {
|
|
6055
|
+
if (!draft) return [...sent ?? []];
|
|
6056
|
+
draft.attachments = mergeTurnAttachments(sent, draft.attachments);
|
|
6057
|
+
return draft.attachments ?? [];
|
|
6058
|
+
}
|
|
6059
|
+
function openSteerTurnAttachments(draft, fallback, autoContinue) {
|
|
6060
|
+
if (autoContinue) return [];
|
|
6061
|
+
return [...draft?.attachments ?? fallback];
|
|
6062
|
+
}
|
|
6063
|
+
function promptAfterJoinedSteer(input) {
|
|
6064
|
+
if (input.draft) input.draft.spawned = true;
|
|
6065
|
+
return promptForJoinedSteer({
|
|
6066
|
+
threadId: input.threadId,
|
|
6067
|
+
promptText: input.promptText,
|
|
6068
|
+
latestPrompt: input.draft?.text ?? input.promptText,
|
|
6069
|
+
agentPrompt: input.agentPrompt,
|
|
6070
|
+
expandedPrompt: input.expandedPrompt,
|
|
6071
|
+
worktreePath: input.worktreePath,
|
|
6072
|
+
attachments: input.expandedAttachments,
|
|
6073
|
+
latestAttachments: openSteerTurnAttachments(
|
|
6074
|
+
input.draft,
|
|
6075
|
+
input.expandedAttachments,
|
|
6076
|
+
input.autoContinue
|
|
6077
|
+
),
|
|
6078
|
+
gitForge: input.gitForge
|
|
6079
|
+
});
|
|
6080
|
+
}
|
|
6081
|
+
function rewriteTrailingUserPrompt(threadId, from, to, attachments) {
|
|
6029
6082
|
const thread = readThread(threadId);
|
|
6030
6083
|
if (!thread) return;
|
|
6031
|
-
const messages = messagesWithRewrittenUserPrompt(thread.messages, from, to);
|
|
6084
|
+
const messages = messagesWithRewrittenUserPrompt(thread.messages, from, to, attachments);
|
|
6032
6085
|
if (!messages) return;
|
|
6033
6086
|
updateThread(threadId, { messages });
|
|
6034
6087
|
}
|
|
@@ -6043,12 +6096,18 @@ function reuseJoinedUserBubble(reused, threadId, messages, promptText) {
|
|
|
6043
6096
|
return false;
|
|
6044
6097
|
}
|
|
6045
6098
|
function promptForJoinedSteer(input) {
|
|
6046
|
-
|
|
6047
|
-
|
|
6099
|
+
const latestAttachments = input.latestAttachments ?? input.attachments;
|
|
6100
|
+
const textSame = input.latestPrompt === input.promptText;
|
|
6101
|
+
if (textSame && sameTurnAttachments(input.attachments, latestAttachments)) {
|
|
6102
|
+
return input.agentPrompt;
|
|
6103
|
+
}
|
|
6104
|
+
if (!textSame) {
|
|
6105
|
+
rewriteTrailingUserPrompt(input.threadId, input.promptText, input.latestPrompt);
|
|
6106
|
+
}
|
|
6048
6107
|
const { agentPrompt: expandedLatest } = expandComposerPrompt(
|
|
6049
6108
|
input.worktreePath,
|
|
6050
6109
|
expandCanonicalGitRequest(input.latestPrompt, { forge: input.gitForge }),
|
|
6051
|
-
{ attachments:
|
|
6110
|
+
{ attachments: latestAttachments }
|
|
6052
6111
|
);
|
|
6053
6112
|
return input.expandedPrompt && input.agentPrompt.endsWith(input.expandedPrompt) ? input.agentPrompt.slice(0, -input.expandedPrompt.length) + expandedLatest : `${input.agentPrompt}
|
|
6054
6113
|
|
|
@@ -6084,7 +6143,13 @@ async function enqueueThreadSend(host, threadRef, prompt, opts) {
|
|
|
6084
6143
|
const combined = joinSteerPrompt(unanswered, prompt);
|
|
6085
6144
|
if (draft && !draft.spawned) {
|
|
6086
6145
|
draft.text = combined;
|
|
6087
|
-
|
|
6146
|
+
if (consumed.consumed.length > 0) {
|
|
6147
|
+
draft.attachments = mergeTurnAttachments(draft.attachments, consumed.consumed);
|
|
6148
|
+
}
|
|
6149
|
+
rewriteTrailingUserPrompt(current.id, unanswered, combined, consumed.consumed);
|
|
6150
|
+
if (explicit === void 0 && consumed.consumed.length > 0) {
|
|
6151
|
+
updateThread(current.id, { attachments: consumed.attachments });
|
|
6152
|
+
}
|
|
6088
6153
|
} else {
|
|
6089
6154
|
const queue = current.queue.slice();
|
|
6090
6155
|
queue[0] = combined;
|
|
@@ -6106,8 +6171,13 @@ async function enqueueThreadSend(host, threadRef, prompt, opts) {
|
|
|
6106
6171
|
}
|
|
6107
6172
|
const promptToQueue = unanswered != null ? joinSteerPrompt(unanswered, prompt) : prompt;
|
|
6108
6173
|
if (unanswered != null) {
|
|
6109
|
-
if (draft)
|
|
6110
|
-
|
|
6174
|
+
if (draft) {
|
|
6175
|
+
draft.text = promptToQueue;
|
|
6176
|
+
if (consumed.consumed.length > 0) {
|
|
6177
|
+
draft.attachments = mergeTurnAttachments(draft.attachments, consumed.consumed);
|
|
6178
|
+
}
|
|
6179
|
+
}
|
|
6180
|
+
rewriteTrailingUserPrompt(current.id, unanswered, promptToQueue, consumed.consumed);
|
|
6111
6181
|
host.reusedUserPrompt.add(current.id);
|
|
6112
6182
|
}
|
|
6113
6183
|
const queued = appendQueuedItem(
|
|
@@ -6457,7 +6527,7 @@ function formatProcessGuideDirective(opts) {
|
|
|
6457
6527
|
hasInstallSkill ? "- After merge-from-main / lockfile change, or a hung `pnpm install`: follow `.claude/skills/worktree-install/SKILL.md` (`/worktree-install`). Use the worktree-local store Sideboard already set; do not share `~/.pnpm-store` across concurrent worktrees." : null,
|
|
6458
6528
|
"- If this same shape of work will happen again, write `.claude/skills/<kebab-name>/SKILL.md` in this worktree (Claude Code project skill; Sideboard `/name`, Claude Code, and `attach` all load it). Not under `.sideboard/skills/`. Point Codex/OpenCode at it from `AGENTS.md`.",
|
|
6459
6529
|
hasReviewSkill ? "- Merge-readiness notes go in `.claude/skills/review/SKILL.md` (edit it; do not create another review skill)." : "- Merge-readiness notes go in `.context/review.md` (copied from `.sideboard/review.md` when that file exists). Do not create a review skill.",
|
|
6460
|
-
"- Skip a guide for a one-off. If a matching skill exists, follow it. Same miss twice \u2192 edit the skill, do not patch around it."
|
|
6530
|
+
!!worktree && existsSync12(join13(worktree, ".claude/skills/skill-improver/SKILL.md")) ? "- Skip a guide for a one-off. If a matching skill exists, follow it. A miss that will recur (you made it twice, or a person told you the rule) \u2192 follow `.claude/skills/skill-improver/SKILL.md` (`/skill-improver`): one sentence in the skill that owns it, in this change. Do not patch around it." : "- Skip a guide for a one-off. If a matching skill exists, follow it. Same miss twice \u2192 edit the skill, do not patch around it."
|
|
6461
6531
|
].filter(Boolean).join("\n");
|
|
6462
6532
|
}
|
|
6463
6533
|
function formatLongRunningDirective(opts) {
|
|
@@ -7457,11 +7527,11 @@ function realDeps() {
|
|
|
7457
7527
|
parentIdForThread,
|
|
7458
7528
|
designatedId: designatedOrchestratorId,
|
|
7459
7529
|
send: async (threadId, prompt) => {
|
|
7460
|
-
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-
|
|
7530
|
+
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-OWO6LQ5U.js");
|
|
7461
7531
|
await getOrchestrator2().send(threadId, prompt, { followUp: "queue" });
|
|
7462
7532
|
},
|
|
7463
7533
|
startOrchestration: async (prompt) => {
|
|
7464
|
-
const { startOrchestration: startOrchestration2 } = await import("./orchestrator-
|
|
7534
|
+
const { startOrchestration: startOrchestration2 } = await import("./orchestrator-OWO6LQ5U.js");
|
|
7465
7535
|
const defaults = resolveOrchestratorDefaults();
|
|
7466
7536
|
await startOrchestration2({
|
|
7467
7537
|
goal: prompt,
|
|
@@ -7488,7 +7558,7 @@ function formatScheduledPrompt(name, prompt) {
|
|
|
7488
7558
|
${prompt}`;
|
|
7489
7559
|
}
|
|
7490
7560
|
async function defaultDeps() {
|
|
7491
|
-
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-
|
|
7561
|
+
const { getOrchestrator: getOrchestrator2, startOrchestration: startOrchestration2 } = await import("./orchestrator-OWO6LQ5U.js");
|
|
7492
7562
|
const orch = getOrchestrator2();
|
|
7493
7563
|
return {
|
|
7494
7564
|
findThread: (id) => findThreadByRef(id),
|
|
@@ -8467,10 +8537,7 @@ var Orchestrator = class {
|
|
|
8467
8537
|
this.emit({ type: "status_changed", threadId, status: "running" });
|
|
8468
8538
|
this.emit({ type: "turn_started", threadId, prompt });
|
|
8469
8539
|
try {
|
|
8470
|
-
this.openSteerPrompt.set(threadId,
|
|
8471
|
-
text: typeof prompt === "string" ? prompt : "",
|
|
8472
|
-
spawned: false
|
|
8473
|
-
});
|
|
8540
|
+
this.openSteerPrompt.set(threadId, beginOpenSteerDraft(typeof prompt === "string" ? prompt : ""));
|
|
8474
8541
|
try {
|
|
8475
8542
|
const baseline = await captureTurnBaseline(thread.worktreePath);
|
|
8476
8543
|
if (baseline) this.turnBaselines.set(threadId, baseline);
|
|
@@ -8500,13 +8567,14 @@ var Orchestrator = class {
|
|
|
8500
8567
|
const autoContinue = isJobContinuePrompt(promptText) || promptText.startsWith("The previous agent process ended before it finished.");
|
|
8501
8568
|
const parked = takePendingTurnAttachments(thread);
|
|
8502
8569
|
const sentAttachments = !autoContinue && parked.length > 0 ? parked : void 0;
|
|
8570
|
+
const turnAttachments = seedOpenSteerAttachments(this.openSteerPrompt.get(threadId), sentAttachments);
|
|
8503
8571
|
if (!autoContinue) clearAgentBlock(threadId);
|
|
8504
8572
|
const shown = this.requireThread(threadId).messages;
|
|
8505
8573
|
if (!reuseJoinedUserBubble(this.reusedUserPrompt, threadId, shown, promptText)) {
|
|
8506
8574
|
appendMessage(threadId, {
|
|
8507
8575
|
role: "user",
|
|
8508
8576
|
text: promptText,
|
|
8509
|
-
...
|
|
8577
|
+
...turnAttachments.length > 0 ? { attachments: turnAttachments } : {},
|
|
8510
8578
|
...autoContinue ? { origin: "continue" } : {},
|
|
8511
8579
|
ts: (/* @__PURE__ */ new Date()).toISOString()
|
|
8512
8580
|
});
|
|
@@ -8536,11 +8604,12 @@ var Orchestrator = class {
|
|
|
8536
8604
|
thread = this.requireThread(threadId);
|
|
8537
8605
|
const turnOrigin = thread.worktreePath?.trim() ? await resolveOriginRemote(thread.worktreePath).catch(() => null) : null;
|
|
8538
8606
|
const gitPrompt = expandCanonicalGitRequest(promptText, { forge: turnOrigin?.forge });
|
|
8607
|
+
const expandedAttachments = openSteerTurnAttachments(this.openSteerPrompt.get(threadId), turnAttachments, autoContinue);
|
|
8539
8608
|
const { agentPrompt: expandedPrompt } = expandComposerPrompt(
|
|
8540
8609
|
thread.worktreePath,
|
|
8541
8610
|
gitPrompt,
|
|
8542
8611
|
{
|
|
8543
|
-
attachments:
|
|
8612
|
+
attachments: expandedAttachments
|
|
8544
8613
|
}
|
|
8545
8614
|
);
|
|
8546
8615
|
const slackInbound = /^(Slack DM|Slack @mention)(?:\n|$)/.test(
|
|
@@ -8708,16 +8777,15 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
|
|
|
8708
8777
|
].filter(Boolean).join("\n\n---\n\n");
|
|
8709
8778
|
const stderrTail = [];
|
|
8710
8779
|
traceTurn("runTurn.beforeSpawn", { threadId, agent: fresh.agent });
|
|
8711
|
-
const
|
|
8712
|
-
|
|
8713
|
-
|
|
8780
|
+
const promptForAgent = promptAfterJoinedSteer({
|
|
8781
|
+
draft: this.openSteerPrompt.get(threadId),
|
|
8782
|
+
autoContinue,
|
|
8783
|
+
expandedAttachments,
|
|
8714
8784
|
threadId,
|
|
8715
8785
|
promptText,
|
|
8716
|
-
latestPrompt: steerDraft?.text ?? promptText,
|
|
8717
8786
|
agentPrompt,
|
|
8718
8787
|
expandedPrompt,
|
|
8719
8788
|
worktreePath: fresh.worktreePath,
|
|
8720
|
-
attachments: autoContinue ? [] : sentAttachments ?? [],
|
|
8721
8789
|
gitForge: turnOrigin?.forge
|
|
8722
8790
|
});
|
|
8723
8791
|
const handle = await spawnAgentTurn(
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-BIM24I3O.js";
|
|
16
16
|
import {
|
|
17
17
|
isOrchestratorThread
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-HRHF6N6S.js";
|
|
19
19
|
import {
|
|
20
20
|
codexUnattendedGitConfigArgs,
|
|
21
21
|
mergeAgentGitAuthEnv,
|
|
@@ -2671,7 +2671,7 @@ var claudeAdapter = {
|
|
|
2671
2671
|
);
|
|
2672
2672
|
}
|
|
2673
2673
|
const mode = permissionMode(thread);
|
|
2674
|
-
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-
|
|
2674
|
+
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-YRPM6JLZ.js");
|
|
2675
2675
|
const isOrchestrator = isOrchestratorThread2(thread);
|
|
2676
2676
|
const rpc = worktreeAgentRpc(isOrchestrator);
|
|
2677
2677
|
const injectedServers = await buildInjectedMcpServers({
|