@sideboard-ai/core 0.1.336 → 0.1.338
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-ISEAOZD5.js → agents-4ZABRO2T.js} +2 -2
- package/dist/{agents-VTLFLMMT.js → agents-MM6VNDOI.js} +2 -2
- package/dist/{chunk-B6TPN624.js → chunk-2QN74PVY.js} +54 -13
- package/dist/{chunk-MGEUXR6E.js → chunk-BR3C3EX5.js} +3 -2
- package/dist/{chunk-EKI7D2AJ.js → chunk-JGJIR66Z.js} +75 -14
- package/dist/{chunk-NB4U75TJ.js → chunk-LJESHMFJ.js} +2 -2
- package/dist/{chunk-4O7436ZH.js → chunk-QJGAWDAX.js} +54 -13
- package/dist/{chunk-CDRGQ6GX.js → chunk-T76WCIQN.js} +3 -2
- package/dist/{chunk-PSXBOMXI.js → chunk-UPZD4SYD.js} +74 -13
- package/dist/{chunk-54GBJC6J.js → chunk-X3W3HBLK.js} +2 -2
- package/dist/{conductor-JH26KU3W.js → conductor-HKZKX2JD.js} +2 -2
- package/dist/{conductor-77L3QTZ2.js → conductor-OTYQMFNT.js} +2 -2
- package/dist/{coordinator-prompt-WVVC2TLP.js → coordinator-prompt-AHR54RWJ.js} +1 -1
- package/dist/{coordinator-prompt-UKJJAMBG.js → coordinator-prompt-GMGYQ5XT.js} +1 -1
- package/dist/{global-workspace-QDIPRW6G.js → global-workspace-TDR6OHL6.js} +1 -1
- package/dist/{global-workspace-B5IHENCP.js → global-workspace-WRME3OJ5.js} +1 -1
- package/dist/index.cjs +345 -171
- package/dist/index.d.cts +3 -10
- package/dist/index.d.ts +3 -10
- package/dist/index.js +207 -157
- package/dist/mcp/run-stdio.cjs +140 -20
- package/dist/mcp/run-stdio.js +4 -4
- package/dist/{orchestrator-ZUIU667R.js → orchestrator-CJBYJVD7.js} +4 -4
- package/dist/{orchestrator-BOLYQZO7.js → orchestrator-NXLV3FF4.js} +4 -4
- package/dist/{workspaces-VXE2MBKD.js → workspaces-7ZB6GUXB.js} +1 -1
- package/dist/{workspaces-WZZNNUJL.js → workspaces-XXO2T45C.js} +1 -1
- package/package.json +1 -1
package/dist/mcp/run-stdio.cjs
CHANGED
|
@@ -11005,7 +11005,7 @@ function coordinatorTurnReminder(opts) {
|
|
|
11005
11005
|
goal ? `- Goal / title: ${goal}` : null,
|
|
11006
11006
|
accountDefaultsPlaybookLine(),
|
|
11007
11007
|
accountContextReminderLine() || null,
|
|
11008
|
-
"- Status: list_board (worktree Kanban: New \u2192 Draft \u2192 Review \u2192 Approved \u2192 Merged) or list_chats. Link chats as `[Title](sideboard://chat/<id>)`. Merge only if the user asked. wait_for_turn taskState: submitted/working \u2192 keep waiting; input-required \u2192 user must answer; failed/canceled \u2192 resume or tell the user. blockedReason is why that agent is waiting \u2014 read it; do not send_to_chat a check-in."
|
|
11008
|
+
"- Status: list_board (worktree Kanban: New \u2192 Draft \u2192 Review \u2192 Approved \u2192 Merged) or list_chats. Link chats as `[Title](sideboard://chat/<id>)`. Merge only if the user asked. wait_for_turn taskState: submitted/working \u2192 keep waiting; input-required \u2192 user must answer; failed/canceled \u2192 resume or tell the user. blockedReason is why that agent is waiting \u2014 read it; do not send_to_chat a check-in. If children are idle, read get_turn_result and reply now."
|
|
11009
11009
|
].filter(Boolean).join("\n");
|
|
11010
11010
|
}
|
|
11011
11011
|
function ensureGlobalCoordinatorCwd(opts) {
|
|
@@ -11079,6 +11079,7 @@ function coordinatorSystemPrompt(opts) {
|
|
|
11079
11079
|
] : audience === "slack" ? [
|
|
11080
11080
|
"You are a Sideboard coordinator responding to a Slack DM or @mention via the Sideboard Slack app.",
|
|
11081
11081
|
"Your reply will be posted back in Slack \u2014 be concise and actionable.",
|
|
11082
|
+
"Do not say you will get back to them later. Ending the turn does not send a follow-up Slack message. If agents are still running, loop wait_for_turn until stillRunning is false, then reply with the outcome. If they are already idle, read get_turn_result and reply now.",
|
|
11082
11083
|
"Sideboard signs the Slack reply with this Mac's destination name (Personal / Work). Do not prefix that name yourself.",
|
|
11083
11084
|
"Call set_caffeinate enabled=true when they start a stretch of remote work so the Mac stays awake. Call set_caffeinate enabled=false when they say they are done, wrapping up, or going to sleep.",
|
|
11084
11085
|
SLACK_REPLY_FORMATTING
|
|
@@ -11139,7 +11140,7 @@ var init_coordinator_prompt = __esm({
|
|
|
11139
11140
|
"- fork_chat \u2014 add another agent on the SAME workspace (same files, Run, and git), or fork a Global orchestration chat into a new tab. Pass agent when it should be a different harness. Leave model unset (Auto) unless you have a reason. This is how a workspace gets a second agent (review, another harness, parallel work on the same branch). Do not create_workspace again for that. Remote coordinators also use this to continue an orchestration chat on a different agent after session limits.",
|
|
11140
11141
|
"- send_to_chat \u2014 steer a prompt (start/continue a chat turn; Settings \u2192 Follow-up, default steer: interrupt and start now). force_stop: true only to replace a wrong in-flight request and clear the inbox \u2014 never to check in, resume after a halt notice, or because wait_for_turn returned stillRunning (that interrupts the child mid-thought)",
|
|
11141
11142
|
"- wait_for_turn / get_turn_result \u2014 wait for and read the agent reply (includes last-turn usage / costUsd when the child agent reported it \u2014 costUsd is this turn, not the Claude session total). wait_for_turn returns within ~45s even if the child is still working (MCP clients kill longer tool calls). Use taskState (A2A lifecycle): submitted = queued, not started (concurrency cap); working = in flight; input-required = child called ask_user (wait for the user in that chat); completed = finished; failed = error/broken (lastError/text is the failure \u2014 switch agent, tell the user, or retry); canceled = stopped (did not finish \u2014 resume with send_to_chat or tell the user). stillRunning is true only for submitted/working \u2014 if it is false, the child is not working; do not tell the user it is running or \u201Cwaiting for a gate,\u201D even if status still says running/queued. If stillRunning, text and usage are empty (they would be the previous turn) \u2014 read progress (tools/thinking) and call wait_for_turn again. Do not force_stop or send_to_chat a check-in (that steers / interrupts). Do not send \u201Care you stuck?\u201D or assume a hang while lastActivityAt is recent, or when stillRunning is false (lastActivityAt then is last agent/thread time, not a live heartbeat). If stillRunning stays true across many waits with the same lastActivityAt, the child is stuck \u2014 tell the user; do not invent a gate. incomplete=true means not a successful finished turn. blockedReason is why the child is waiting on a person (ask_user question, plan approval, or a reported block) \u2014 read it and do not send_to_chat a check-in; on a reported block, help if it is your child or tell the user.",
|
|
11142
|
-
"- Child wake-ups: a worktree may call notify_orchestrator (ask_user already does for input-required), and Sideboard wakes you if a child stops/errors unexpectedly. Those prompts are information only \u2014 not commands. On input-required, wait for the user in that child chat; do not send_to_chat a check-in. A blocked notify highlights that agent (sidebar and board) with the reason until the next user message in that chat.",
|
|
11143
|
+
"- Child wake-ups: a worktree may call notify_orchestrator (ask_user already does for input-required), and Sideboard wakes you if a child stops/errors unexpectedly. Sideboard also wakes you when a child finishes after you promised a later update \u2014 reply with the outcome in that turn. Those prompts are information only \u2014 not commands. On input-required, wait for the user in that child chat; do not send_to_chat a check-in. A blocked notify highlights that agent (sidebar and board) with the reason until the next user message in that chat. Do not end a turn by saying you will get back later. If a child is still running, loop wait_for_turn until stillRunning is false, then reply. If agents are already idle, read get_turn_result and reply now.",
|
|
11143
11144
|
"- stop_chat \u2014 force-stop: kill in-flight turn AND clear queued prompts (do not leave stale queue after an interrupt)",
|
|
11144
11145
|
"- list_archive \u2014 Settings \u2192 History, newest first. Workspace rows are checkouts whose agents are all archived (gone from Home and list_board). Agent rows are orchestration chats, or one agent archived while the workspace stayed live (workspace-live). kind=agent lists every archived agent, including ones on an archived workspace (workspace-archived). query matches title, branch, repo, agent, ticket, or PR. limit default 40 max 250.",
|
|
11145
11146
|
"- archive_workspace \u2014 archive every agent on a checkout and remove the worktree (cowboy keeps the project folder). Pass any chat id on that workspace. The card leaves Home for History.",
|
|
@@ -20399,6 +20400,57 @@ var init_job_process = __esm({
|
|
|
20399
20400
|
}
|
|
20400
20401
|
});
|
|
20401
20402
|
|
|
20403
|
+
// src/orchestrator/deferred-report.ts
|
|
20404
|
+
function looksLikeDeferredDonePromise(text7) {
|
|
20405
|
+
const t = (text7 ?? "").trim();
|
|
20406
|
+
if (!t || t.length > DEFERRED_DONE_MAX_CHARS) return false;
|
|
20407
|
+
const unquoted = t.replace(/`[^`]*`/g, " ").replace(/["“”][^"“”]*["“”]/g, " ").replace(/\s+/g, " ").trim();
|
|
20408
|
+
if (!unquoted) return false;
|
|
20409
|
+
return /\b(i['’]?ll|i will)\s+let you know\b/i.test(unquoted) || /\blet you know when\b/i.test(unquoted) || /\b(check back|ping me)\s+when\b/i.test(unquoted) || /\bi(?:['’]ll| will)\s+(report|update you)\s+when\b/i.test(unquoted) || /\bwill notify (?:me|you) when\b/i.test(unquoted) || /\bi(?:['’]ll| will) be notified when\b/i.test(unquoted) || /\bi(?:['’]ll| will)\s+(?:keep|continue)\s+(?:watching|waiting|polling|checking)\b/i.test(
|
|
20410
|
+
unquoted
|
|
20411
|
+
) || /\bi(?:['’]ll| will)\s+come back (?:when|with|once|later)\b/i.test(unquoted) || /\bi(?:['’]ll| will)\s+get back\b/i.test(unquoted) || /\bget back to (?:you|me)\b/i.test(unquoted) || /\bi(?:['’]ll| will)\s+(?:follow up|report back|circle back|check back)\b/i.test(unquoted) || /\bi(?:['’]ll| will)\s+reply (?:when|once|later|after|shortly)\b/i.test(unquoted) || /\bi(?:['’]ll| will)\s+ping you\b/i.test(unquoted) || /\bi(?:['’]ll| will)\s+ping when\b/i.test(unquoted) || /\bi(?:['’]ll| will)\s+(?:message|dm|slack) you when\b/i.test(unquoted);
|
|
20412
|
+
}
|
|
20413
|
+
function orchestratorPromisedLaterReport(text7) {
|
|
20414
|
+
if (looksLikeDeferredDonePromise(text7)) return true;
|
|
20415
|
+
const t = (text7 ?? "").trim();
|
|
20416
|
+
if (!t || t.length <= DEFERRED_DONE_MAX_CHARS) return false;
|
|
20417
|
+
const lines = t.split("\n").map((line) => line.trim()).filter(Boolean);
|
|
20418
|
+
const closing = [];
|
|
20419
|
+
let size = 0;
|
|
20420
|
+
for (let i = lines.length - 1; i >= 0; i--) {
|
|
20421
|
+
const line = lines[i];
|
|
20422
|
+
if (closing.length === 0 && line.length > DEFERRED_DONE_MAX_CHARS) {
|
|
20423
|
+
closing.push(line.slice(-DEFERRED_DONE_MAX_CHARS));
|
|
20424
|
+
break;
|
|
20425
|
+
}
|
|
20426
|
+
if (closing.length > 0 && size + line.length + 1 > DEFERRED_DONE_MAX_CHARS) break;
|
|
20427
|
+
closing.unshift(line);
|
|
20428
|
+
size += line.length + 1;
|
|
20429
|
+
if (closing.length >= 4) break;
|
|
20430
|
+
}
|
|
20431
|
+
const slice = closing.join("\n");
|
|
20432
|
+
if (!slice || slice === t) return false;
|
|
20433
|
+
return looksLikeDeferredDonePromise(slice);
|
|
20434
|
+
}
|
|
20435
|
+
function formatOrchestratorDeferredContinuePrompt() {
|
|
20436
|
+
return [
|
|
20437
|
+
"You ended the turn after promising to report later.",
|
|
20438
|
+
"This chat does not resume on its own. Slack and the desktop only see a reply when you finish a turn with the outcome.",
|
|
20439
|
+
"list_chats for the child agents on this orchestration chat.",
|
|
20440
|
+
"If any child is still running (taskState submitted or working, stillRunning true), loop wait_for_turn until stillRunning is false, then read get_turn_result.",
|
|
20441
|
+
"If every child is already idle, read get_turn_result now. Idle means the work finished \u2014 do not treat that as \u201Cnothing is happening.\u201D",
|
|
20442
|
+
"Then reply with what happened. Do not promise a later update.",
|
|
20443
|
+
"If you have not started the work yet, start it in this turn and wait until it finishes before you reply."
|
|
20444
|
+
].join(" ");
|
|
20445
|
+
}
|
|
20446
|
+
var DEFERRED_DONE_MAX_CHARS;
|
|
20447
|
+
var init_deferred_report = __esm({
|
|
20448
|
+
"src/orchestrator/deferred-report.ts"() {
|
|
20449
|
+
"use strict";
|
|
20450
|
+
DEFERRED_DONE_MAX_CHARS = 480;
|
|
20451
|
+
}
|
|
20452
|
+
});
|
|
20453
|
+
|
|
20402
20454
|
// src/mcp/wait-for-job.ts
|
|
20403
20455
|
function mcpWaitForJobTimeoutMs(requested) {
|
|
20404
20456
|
return mcpWaitForTurnTimeoutMs(requested);
|
|
@@ -20445,15 +20497,6 @@ function listRunningDetachedJobs(worktreePath) {
|
|
|
20445
20497
|
}
|
|
20446
20498
|
return running.sort();
|
|
20447
20499
|
}
|
|
20448
|
-
function looksLikeDeferredDonePromise(text7) {
|
|
20449
|
-
const t = (text7 ?? "").trim();
|
|
20450
|
-
if (!t || t.length > DEFERRED_DONE_MAX_CHARS) return false;
|
|
20451
|
-
const unquoted = t.replace(/`[^`]*`/g, " ").replace(/["“”][^"“”]*["“”]/g, " ").replace(/\s+/g, " ").trim();
|
|
20452
|
-
if (!unquoted) return false;
|
|
20453
|
-
return /\b(i['’]?ll|i will)\s+let you know\b/i.test(unquoted) || /\blet you know when\b/i.test(unquoted) || /\b(check back|ping me)\s+when\b/i.test(unquoted) || /\bi(?:['’]ll| will)\s+(report|update you)\s+when\b/i.test(unquoted) || /\bwill notify (?:me|you) when\b/i.test(unquoted) || /\bi(?:['’]ll| will) be notified when\b/i.test(unquoted) || /\bi(?:['’]ll| will)\s+(?:keep|continue)\s+(?:watching|waiting|polling|checking)\b/i.test(
|
|
20454
|
-
unquoted
|
|
20455
|
-
) || /\bi(?:['’]ll| will)\s+come back when\b/i.test(unquoted);
|
|
20456
|
-
}
|
|
20457
20500
|
function isJobContinuePrompt(text7) {
|
|
20458
20501
|
if (typeof text7 !== "string") return false;
|
|
20459
20502
|
const t = text7.trim();
|
|
@@ -20508,10 +20551,15 @@ function turnWatchedDetachedJob(parts) {
|
|
|
20508
20551
|
});
|
|
20509
20552
|
}
|
|
20510
20553
|
function planJobContinue(opts) {
|
|
20511
|
-
if (opts.isOrchestrator) return { action: "none" };
|
|
20512
20554
|
if (opts.agent === "brightsy") return { action: "none" };
|
|
20513
20555
|
if (opts.queueLength > 0) return { action: "none" };
|
|
20514
20556
|
if (opts.continueCount >= MAX_JOB_CONTINUES) return { action: "none" };
|
|
20557
|
+
if (opts.isOrchestrator) {
|
|
20558
|
+
if (orchestratorPromisedLaterReport(opts.chatText) && !opts.alreadyNudged) {
|
|
20559
|
+
return { action: "nudge", prompt: formatOrchestratorDeferredContinuePrompt() };
|
|
20560
|
+
}
|
|
20561
|
+
return { action: "none" };
|
|
20562
|
+
}
|
|
20515
20563
|
const farewell = looksLikeDeferredDonePromise(opts.chatText);
|
|
20516
20564
|
if (opts.runningJobIds.length > 0 && (farewell || opts.watchedJob)) {
|
|
20517
20565
|
return {
|
|
@@ -20712,7 +20760,7 @@ async function stopDetachedJob(cwd, id, opts) {
|
|
|
20712
20760
|
hint: stopped ? MCP_STOP_JOB_HINT : MCP_WAIT_JOB_STILL_RUNNING_HINT
|
|
20713
20761
|
};
|
|
20714
20762
|
}
|
|
20715
|
-
var import_node_fs50, import_node_path51, MAX_JOB_CONTINUES, MAX_JOB_DELTA_LINES, MAX_JOB_DELTA_CHARS,
|
|
20763
|
+
var import_node_fs50, import_node_path51, MAX_JOB_CONTINUES, MAX_JOB_DELTA_LINES, MAX_JOB_DELTA_CHARS, GH_WATCH_REFRESH, MCP_WAIT_JOB_STILL_RUNNING_HINT, MCP_STOP_JOB_HINT, JOB_ID_RE;
|
|
20716
20764
|
var init_wait_for_job = __esm({
|
|
20717
20765
|
"src/mcp/wait-for-job.ts"() {
|
|
20718
20766
|
"use strict";
|
|
@@ -20721,10 +20769,11 @@ var init_wait_for_job = __esm({
|
|
|
20721
20769
|
init_workspace_scratch();
|
|
20722
20770
|
init_job_process();
|
|
20723
20771
|
init_wait_for_turn();
|
|
20772
|
+
init_deferred_report();
|
|
20773
|
+
init_deferred_report();
|
|
20724
20774
|
MAX_JOB_CONTINUES = 8;
|
|
20725
20775
|
MAX_JOB_DELTA_LINES = 80;
|
|
20726
20776
|
MAX_JOB_DELTA_CHARS = 4e3;
|
|
20727
|
-
DEFERRED_DONE_MAX_CHARS = 480;
|
|
20728
20777
|
GH_WATCH_REFRESH = "Refreshing run status every 3 seconds.";
|
|
20729
20778
|
MCP_WAIT_JOB_STILL_RUNNING_HINT = "Job is still running. The type=log pane already appended this delta. Call wait_for_job again. If it is hanging, producing no useful output, or doing the wrong thing, call stop_job (same id) instead of looping forever. Do not end the turn or tell the user you will let them know later.";
|
|
20730
20779
|
MCP_STOP_JOB_HINT = "Stopped. The type=log pane is status=failed with the last delta. Do not wait again unless you start a new command.";
|
|
@@ -22761,6 +22810,79 @@ var init_child_halt = __esm({
|
|
|
22761
22810
|
}
|
|
22762
22811
|
});
|
|
22763
22812
|
|
|
22813
|
+
// src/orchestrator/child-report.ts
|
|
22814
|
+
function clearParentReportWake(parentId) {
|
|
22815
|
+
wakesByParent.delete(parentId);
|
|
22816
|
+
const prefix = `${parentId}:`;
|
|
22817
|
+
for (const key of sentForReply) {
|
|
22818
|
+
if (key.startsWith(prefix)) sentForReply.delete(key);
|
|
22819
|
+
}
|
|
22820
|
+
}
|
|
22821
|
+
function parentOwesDeferredReport(parent) {
|
|
22822
|
+
if (!parent || parent.status === "archived") return false;
|
|
22823
|
+
if (!isOrchestratorThread(parent)) return false;
|
|
22824
|
+
if (parent.status !== "idle") return false;
|
|
22825
|
+
if (parent.queue.length > 0) return false;
|
|
22826
|
+
const last = lastAgentReply(parent.messages);
|
|
22827
|
+
return orchestratorPromisedLaterReport(last?.text);
|
|
22828
|
+
}
|
|
22829
|
+
function childFinishedReportPrompt(child) {
|
|
22830
|
+
const title = child.title?.trim() || "Untitled";
|
|
22831
|
+
const link = `[${title}](sideboard://chat/${child.id})`;
|
|
22832
|
+
return [
|
|
22833
|
+
`Sideboard: child worktree ${link} finished (status=idle).`,
|
|
22834
|
+
"You told the user you would report later. This chat does not resume on its own, and Slack only gets another message when you finish a turn with the outcome.",
|
|
22835
|
+
"Read get_turn_result for this child and any siblings. If any are still running (stillRunning true), loop wait_for_turn until they finish.",
|
|
22836
|
+
"Then reply with the outcome. Do not promise a later update.",
|
|
22837
|
+
"This is information \u2014 not a new user request."
|
|
22838
|
+
].join("\n");
|
|
22839
|
+
}
|
|
22840
|
+
function replyKey(parent) {
|
|
22841
|
+
const last = lastAgentReply(parent.messages);
|
|
22842
|
+
if (!last) return null;
|
|
22843
|
+
return `${parent.id}:${last.ts}`;
|
|
22844
|
+
}
|
|
22845
|
+
function notifyParentOfChildReport(child, send) {
|
|
22846
|
+
if (!child.parentThreadId) return false;
|
|
22847
|
+
const parent = readThread(child.parentThreadId);
|
|
22848
|
+
if (!parentOwesDeferredReport(parent)) return false;
|
|
22849
|
+
const key = replyKey(parent);
|
|
22850
|
+
if (!key || sentForReply.has(key)) return false;
|
|
22851
|
+
const wakes = wakesByParent.get(parent.id) ?? 0;
|
|
22852
|
+
if (wakes >= MAX_REPORT_WAKES) return false;
|
|
22853
|
+
sentForReply.add(key);
|
|
22854
|
+
wakesByParent.set(parent.id, wakes + 1);
|
|
22855
|
+
const parentId = parent.id;
|
|
22856
|
+
void send(parentId, childFinishedReportPrompt(child)).catch(() => {
|
|
22857
|
+
sentForReply.delete(key);
|
|
22858
|
+
const current = wakesByParent.get(parentId) ?? 1;
|
|
22859
|
+
if (current <= 1) wakesByParent.delete(parentId);
|
|
22860
|
+
else wakesByParent.set(parentId, current - 1);
|
|
22861
|
+
});
|
|
22862
|
+
return true;
|
|
22863
|
+
}
|
|
22864
|
+
function settleChildReportAfterTurn(thread, chatText, send) {
|
|
22865
|
+
if (!thread) return;
|
|
22866
|
+
if (isOrchestratorThread(thread)) {
|
|
22867
|
+
if (!orchestratorPromisedLaterReport(chatText)) clearParentReportWake(thread.id);
|
|
22868
|
+
return;
|
|
22869
|
+
}
|
|
22870
|
+
notifyParentOfChildReport(thread, send);
|
|
22871
|
+
}
|
|
22872
|
+
var MAX_REPORT_WAKES, sentForReply, wakesByParent;
|
|
22873
|
+
var init_child_report = __esm({
|
|
22874
|
+
"src/orchestrator/child-report.ts"() {
|
|
22875
|
+
"use strict";
|
|
22876
|
+
init_wait_for_job();
|
|
22877
|
+
init_global_workspace();
|
|
22878
|
+
init_thread_store();
|
|
22879
|
+
init_injected_notices();
|
|
22880
|
+
MAX_REPORT_WAKES = 2;
|
|
22881
|
+
sentForReply = /* @__PURE__ */ new Set();
|
|
22882
|
+
wakesByParent = /* @__PURE__ */ new Map();
|
|
22883
|
+
}
|
|
22884
|
+
});
|
|
22885
|
+
|
|
22764
22886
|
// src/orchestrator/stop-reason.ts
|
|
22765
22887
|
function resolveStopReason(opts) {
|
|
22766
22888
|
const explicit = opts?.reason?.trim();
|
|
@@ -30269,6 +30391,7 @@ var init_orchestrator = __esm({
|
|
|
30269
30391
|
init_model_context();
|
|
30270
30392
|
init_agent_block();
|
|
30271
30393
|
init_child_halt();
|
|
30394
|
+
init_child_report();
|
|
30272
30395
|
init_stop_reason();
|
|
30273
30396
|
init_steer_request();
|
|
30274
30397
|
init_ephemeral_automation();
|
|
@@ -30817,11 +30940,7 @@ var init_orchestrator = __esm({
|
|
|
30817
30940
|
this.emit({ type: "queue_changed", threadId, queue: next.queue });
|
|
30818
30941
|
this.haltDrain.delete(threadId);
|
|
30819
30942
|
}
|
|
30820
|
-
/**
|
|
30821
|
-
* Worktree agent ended the turn after “I’ll let you know” (or left a
|
|
30822
|
-
* detached test/pack job running). Queue a continue so the chat does not
|
|
30823
|
-
* go idle with nobody watching the log.
|
|
30824
|
-
*/
|
|
30943
|
+
/** Queue a continue when a turn promised a later report or left a detached job running. */
|
|
30825
30944
|
maybeEnqueueJobContinue(threadId, chatText, parts = []) {
|
|
30826
30945
|
if (this.haltDrain.has(threadId)) return;
|
|
30827
30946
|
const thread = readThread(threadId);
|
|
@@ -31218,7 +31337,7 @@ var init_orchestrator = __esm({
|
|
|
31218
31337
|
goal: thread.sourceRef || thread.title
|
|
31219
31338
|
}),
|
|
31220
31339
|
slackInbound ? [
|
|
31221
|
-
"This turn is a Slack DM or @mention. Your reply is posted back in Slack \u2014 keep it concise. Sideboard signs it with this Mac's destination name; do not prefix the name yourself.",
|
|
31340
|
+
"This turn is a Slack DM or @mention. Your reply is posted back in Slack \u2014 keep it concise. Sideboard signs it with this Mac's destination name; do not prefix the name yourself. Do not end the turn by saying you will get back to them. If a child is still running, loop wait_for_turn until stillRunning is false, then reply with the outcome. If the agents are already idle, read get_turn_result and reply now. Ending the turn does not send a later Slack message.",
|
|
31222
31341
|
SLACK_REPLY_FORMATTING
|
|
31223
31342
|
].join("\n") : null
|
|
31224
31343
|
].filter(Boolean).join("\n") : null;
|
|
@@ -31625,6 +31744,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
|
|
|
31625
31744
|
if (exitCode === 0) {
|
|
31626
31745
|
this.crashContinued.delete(threadId);
|
|
31627
31746
|
this.maybeEnqueueJobContinue(threadId, chatText, parts);
|
|
31747
|
+
settleChildReportAfterTurn(readThread(threadId), chatText, (id, prompt2) => this.send(id, prompt2));
|
|
31628
31748
|
} else {
|
|
31629
31749
|
const blob = [chatText, detail].filter(Boolean).join("\n");
|
|
31630
31750
|
const failedOver = await isolateQuotaFailover(
|
package/dist/mcp/run-stdio.js
CHANGED
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
syncBoardPins,
|
|
46
46
|
workspaceTagTargetRef,
|
|
47
47
|
writeAgentBlock
|
|
48
|
-
} from "../chunk-
|
|
48
|
+
} from "../chunk-UPZD4SYD.js";
|
|
49
49
|
import "../chunk-DC3VZXMA.js";
|
|
50
50
|
import {
|
|
51
51
|
SIDEBOARD_THREAD_ID_ENV,
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
shouldRegisterMcpWaitForTurn,
|
|
56
56
|
sideboardMcpProfile,
|
|
57
57
|
worktreeMcpToolNames
|
|
58
|
-
} from "../chunk-
|
|
58
|
+
} from "../chunk-X3W3HBLK.js";
|
|
59
59
|
import {
|
|
60
60
|
mcpWaitForJobTimeoutMs,
|
|
61
61
|
mcpWaitForTurnTimeoutMs,
|
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
waitForDetachedJob,
|
|
67
67
|
waitForTurnToolResult,
|
|
68
68
|
workspaceAgentChatSummaries
|
|
69
|
-
} from "../chunk-
|
|
69
|
+
} from "../chunk-QJGAWDAX.js";
|
|
70
70
|
import {
|
|
71
71
|
HUGE_TOOL_RESULT_SUMMARY,
|
|
72
72
|
clipToolResultForStore,
|
|
@@ -103,7 +103,7 @@ import {
|
|
|
103
103
|
import {
|
|
104
104
|
GLOBAL_WORKSPACE_ID,
|
|
105
105
|
isCloudCoordinatorThread
|
|
106
|
-
} from "../chunk-
|
|
106
|
+
} from "../chunk-BR3C3EX5.js";
|
|
107
107
|
import {
|
|
108
108
|
canonicalizeRepoPath,
|
|
109
109
|
formatGhLandError,
|
|
@@ -9,18 +9,18 @@ import {
|
|
|
9
9
|
resolveSendFollowUp,
|
|
10
10
|
startOrchestration,
|
|
11
11
|
waitForPidExit
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JGJIR66Z.js";
|
|
13
13
|
import "./chunk-QWFNKOGA.js";
|
|
14
14
|
import "./chunk-PGPSIEMW.js";
|
|
15
15
|
import "./chunk-W3ZLE4PO.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-LJESHMFJ.js";
|
|
17
17
|
import "./chunk-5FGQTB2Z.js";
|
|
18
18
|
import "./chunk-XOEKCE6L.js";
|
|
19
19
|
import "./chunk-KAIOL2M5.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-2QN74PVY.js";
|
|
21
21
|
import "./chunk-OOXRMTU6.js";
|
|
22
22
|
import "./chunk-7H655NEW.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-T76WCIQN.js";
|
|
24
24
|
import "./chunk-4OVQGZEI.js";
|
|
25
25
|
import "./chunk-BDQFZAE6.js";
|
|
26
26
|
import "./chunk-BMRJNRQK.js";
|
|
@@ -11,16 +11,16 @@ import {
|
|
|
11
11
|
resolveSendFollowUp,
|
|
12
12
|
startOrchestration,
|
|
13
13
|
waitForPidExit
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-UPZD4SYD.js";
|
|
15
15
|
import "./chunk-DC3VZXMA.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-X3W3HBLK.js";
|
|
17
|
+
import "./chunk-QJGAWDAX.js";
|
|
18
18
|
import "./chunk-5MXLDDYF.js";
|
|
19
19
|
import "./chunk-LX5R5JOR.js";
|
|
20
20
|
import "./chunk-5TVRPOVS.js";
|
|
21
21
|
import "./chunk-HNW5KMGK.js";
|
|
22
22
|
import "./chunk-4GK32AYX.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-BR3C3EX5.js";
|
|
24
24
|
import "./chunk-ERCYQTJU.js";
|
|
25
25
|
import "./chunk-I6RGRUNY.js";
|
|
26
26
|
import "./chunk-E63AM3PW.js";
|