@sideboard-ai/core 0.1.306 → 0.1.308
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/{chunk-OVNIP265.js → chunk-CTFBZZGZ.js} +49 -4
- package/dist/{chunk-WBCKUFXC.js → chunk-GXFOZ5XL.js} +53 -7
- package/dist/{chunk-5SFA27CF.js → chunk-HRPSFU4Q.js} +13 -2
- package/dist/{chunk-32IN7PXB.js → chunk-T6TEANP5.js} +31 -7
- package/dist/{conductor-ZFRXTVGP.js → conductor-E6M3BATZ.js} +1 -1
- package/dist/{conductor-YBXURAUL.js → conductor-IPIMGUR4.js} +1 -1
- package/dist/index.cjs +121 -17
- package/dist/index.d.cts +64 -1
- package/dist/index.d.ts +64 -1
- package/dist/index.js +32 -14
- package/dist/mcp/run-stdio.cjs +41 -6
- package/dist/mcp/run-stdio.js +2 -2
- package/dist/{orchestrator-UXHU766C.js → orchestrator-JTDQ47H7.js} +2 -2
- package/dist/{orchestrator-XP5S4E5F.js → orchestrator-SJU5LYAO.js} +2 -2
- package/package.json +1 -1
package/dist/mcp/run-stdio.cjs
CHANGED
|
@@ -2122,12 +2122,23 @@ function isAskUserToolName(name) {
|
|
|
2122
2122
|
const base = name.replace(/^mcp__sideboard__/i, "");
|
|
2123
2123
|
return ASK_USER_TOOL_RE.test(name) || /^ask_user$/i.test(base);
|
|
2124
2124
|
}
|
|
2125
|
+
function questionsFromToolPart(part) {
|
|
2126
|
+
const fromInput = parsePlanQuestionsInput(part.input);
|
|
2127
|
+
if (fromInput.length) return fromInput;
|
|
2128
|
+
const raw = part.result?.trim();
|
|
2129
|
+
if (!raw || !raw.startsWith("{")) return [];
|
|
2130
|
+
try {
|
|
2131
|
+
return parsePlanQuestionsInput(JSON.parse(raw));
|
|
2132
|
+
} catch {
|
|
2133
|
+
return [];
|
|
2134
|
+
}
|
|
2135
|
+
}
|
|
2125
2136
|
function extractPendingPlanQuestions(parts) {
|
|
2126
2137
|
if (!parts?.length) return null;
|
|
2127
2138
|
for (let i = parts.length - 1; i >= 0; i--) {
|
|
2128
2139
|
const p = parts[i];
|
|
2129
2140
|
if (p.type !== "tool" || !isAskUserToolName(p.name)) continue;
|
|
2130
|
-
const questions =
|
|
2141
|
+
const questions = questionsFromToolPart(p);
|
|
2131
2142
|
if (!questions.length) continue;
|
|
2132
2143
|
return {
|
|
2133
2144
|
id: p.id || `ask-${i}`,
|
|
@@ -18897,7 +18908,7 @@ function decisionBlockFromParts(parts, planMode, at = (/* @__PURE__ */ new Date(
|
|
|
18897
18908
|
const reason = pending ? formatAskUserNotifyMessage(pending.questions) : "Waiting for an answer in that chat.";
|
|
18898
18909
|
return {
|
|
18899
18910
|
...makeAgentBlock("ask_user", reason, at),
|
|
18900
|
-
...pending ? { questionSignature: pending.signature } : {}
|
|
18911
|
+
...pending ? { questionSignature: pending.signature, questions: pending.questions } : {}
|
|
18901
18912
|
};
|
|
18902
18913
|
}
|
|
18903
18914
|
if (!planMode || last?.type !== "tool") return null;
|
|
@@ -18912,14 +18923,24 @@ function decisionBlockFromParts(parts, planMode, at = (/* @__PURE__ */ new Date(
|
|
|
18912
18923
|
at
|
|
18913
18924
|
);
|
|
18914
18925
|
}
|
|
18926
|
+
function withStampedQuestions(decision, existing) {
|
|
18927
|
+
if (decision.source !== "ask_user" || decision.questions?.length) return decision;
|
|
18928
|
+
if (existing?.source !== "ask_user" || !existing.questions?.length) return decision;
|
|
18929
|
+
return {
|
|
18930
|
+
...decision,
|
|
18931
|
+
questions: existing.questions,
|
|
18932
|
+
questionSignature: decision.questionSignature ?? existing.questionSignature
|
|
18933
|
+
};
|
|
18934
|
+
}
|
|
18915
18935
|
function agentBlockAfterTurn(input) {
|
|
18916
18936
|
if (input.failed) return null;
|
|
18917
18937
|
const decision = decisionBlockFromParts(input.parts, input.planMode);
|
|
18918
18938
|
if (decision) {
|
|
18919
|
-
|
|
18939
|
+
const next = withStampedQuestions(decision, input.existing);
|
|
18940
|
+
if (isDismissedAskUserBlock(next, input.dismissedQuestionSignature)) {
|
|
18920
18941
|
return input.existing?.source === "reported" ? input.existing : null;
|
|
18921
18942
|
}
|
|
18922
|
-
return
|
|
18943
|
+
return next;
|
|
18923
18944
|
}
|
|
18924
18945
|
if (input.existing && input.existing.source !== "reported" && lastTopLevelTool(input.parts)) {
|
|
18925
18946
|
return null;
|
|
@@ -18962,7 +18983,7 @@ function settleAgentBlock(threadId, parts, failed) {
|
|
|
18962
18983
|
});
|
|
18963
18984
|
const prev = thread.agentBlock ?? null;
|
|
18964
18985
|
if (prev === next) return;
|
|
18965
|
-
if (prev && next && prev.source === next.source && prev.reason === next.reason && prev.at === next.at && prev.questionSignature === next.questionSignature) {
|
|
18986
|
+
if (prev && next && prev.source === next.source && prev.reason === next.reason && prev.at === next.at && prev.questionSignature === next.questionSignature && planQuestionsSignature(prev.questions ?? []) === planQuestionsSignature(next.questions ?? [])) {
|
|
18966
18987
|
return;
|
|
18967
18988
|
}
|
|
18968
18989
|
updateThread(threadId, { agentBlock: next });
|
|
@@ -18985,7 +19006,11 @@ function stampAskUserBlock(resolveCaller, questions) {
|
|
|
18985
19006
|
try {
|
|
18986
19007
|
writeAgentBlock(
|
|
18987
19008
|
resolveCaller().id,
|
|
18988
|
-
parsed.length ? {
|
|
19009
|
+
parsed.length ? {
|
|
19010
|
+
...block,
|
|
19011
|
+
questionSignature: planQuestionsSignature(parsed),
|
|
19012
|
+
questions: parsed
|
|
19013
|
+
} : block
|
|
18989
19014
|
);
|
|
18990
19015
|
} catch {
|
|
18991
19016
|
}
|
|
@@ -24857,6 +24882,15 @@ function connectedOrchestratorTurnReminder(thread, find) {
|
|
|
24857
24882
|
function formatWorktreeReminder() {
|
|
24858
24883
|
return "Sideboard workspace: stay in this cwd for all file and git work. Push and open PRs against origin, never upstream. Do not edit the main repo checkout. If a goal is given (Greptile 5/5, CI green), watch-fix-push until it lands \u2014 do not watch after every push. Schedules: create_schedule (at / every / cron; chatId=self for this chat). set_workspace_tags updates labels on this workspace (omit ref).";
|
|
24859
24884
|
}
|
|
24885
|
+
function formatClaudeSubagentReminder() {
|
|
24886
|
+
return 'Claude subagents: if Task/Agent workers will edit files, write a short plan in this chat and continue in the same turn. Do not ask the user whether to isolate, and do not set worktree.bgIsolation to none. One writer may edit this workspace. Every other writer is an Agent with isolation "worktree" and a disjoint file list (read-only explore agents may overlap). While those agents run, leave their files alone. Merge each returned branch into this workspace, then remove the temporary worktree. You stay in this cwd. If Claude says another write-capable agent is in this directory, or that writes to the shared checkout are blocked, re-spawn that agent with isolation "worktree" or make the edit yourself.';
|
|
24887
|
+
}
|
|
24888
|
+
function claudeSubagentTurnReminder(thread) {
|
|
24889
|
+
if (thread.agent !== "claude" || thread.planMode || isOrchestratorThread(thread)) {
|
|
24890
|
+
return null;
|
|
24891
|
+
}
|
|
24892
|
+
return formatClaudeSubagentReminder();
|
|
24893
|
+
}
|
|
24860
24894
|
function mentionsPrGoal(prompt) {
|
|
24861
24895
|
return PR_GOAL_RE.test(prompt);
|
|
24862
24896
|
}
|
|
@@ -27511,6 +27545,7 @@ ${formatEnvReminder(projectNameForRepoPath(thread.repoPath || thread.worktreePat
|
|
|
27511
27545
|
);
|
|
27512
27546
|
const turnReminders = [
|
|
27513
27547
|
worktreeReminder,
|
|
27548
|
+
claudeSubagentTurnReminder(thread),
|
|
27514
27549
|
connectedOrchestratorTurnReminder(thread, (id) => readThread(id)),
|
|
27515
27550
|
optionalServicesReminder,
|
|
27516
27551
|
issueToolsReminder,
|
package/dist/mcp/run-stdio.js
CHANGED
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
updateSchedule,
|
|
57
57
|
workspaceTagTargetRef,
|
|
58
58
|
writeAgentBlock
|
|
59
|
-
} from "../chunk-
|
|
59
|
+
} from "../chunk-T6TEANP5.js";
|
|
60
60
|
import "../chunk-LX5R5JOR.js";
|
|
61
61
|
import {
|
|
62
62
|
commentAbleTimeTask,
|
|
@@ -116,7 +116,7 @@ import {
|
|
|
116
116
|
waitForDetachedJob,
|
|
117
117
|
waitForTurnToolResult,
|
|
118
118
|
workspaceAgentChatSummaries
|
|
119
|
-
} from "../chunk-
|
|
119
|
+
} from "../chunk-HRPSFU4Q.js";
|
|
120
120
|
import {
|
|
121
121
|
HUGE_TOOL_RESULT_SUMMARY,
|
|
122
122
|
clipToolResultForStore,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
resolveSendFollowUp,
|
|
12
12
|
startOrchestration,
|
|
13
13
|
waitForPidExit
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-T6TEANP5.js";
|
|
15
15
|
import "./chunk-LX5R5JOR.js";
|
|
16
16
|
import "./chunk-62ESCTJ4.js";
|
|
17
17
|
import "./chunk-4GK32AYX.js";
|
|
@@ -21,7 +21,7 @@ import "./chunk-EGTCXNQM.js";
|
|
|
21
21
|
import "./chunk-42JGPPVS.js";
|
|
22
22
|
import "./chunk-PXMLMBMI.js";
|
|
23
23
|
import "./chunk-2GPQZZLY.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-HRPSFU4Q.js";
|
|
25
25
|
import "./chunk-5XQ43YZU.js";
|
|
26
26
|
import "./chunk-X3FSWWW2.js";
|
|
27
27
|
import "./chunk-DLGGLV2M.js";
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
resolveSendFollowUp,
|
|
10
10
|
startOrchestration,
|
|
11
11
|
waitForPidExit
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-GXFOZ5XL.js";
|
|
13
13
|
import "./chunk-PGPSIEMW.js";
|
|
14
14
|
import "./chunk-G2L3CR3A.js";
|
|
15
15
|
import "./chunk-VEVFHO6K.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-CTFBZZGZ.js";
|
|
17
17
|
import "./chunk-F36QRDM4.js";
|
|
18
18
|
import "./chunk-7H655NEW.js";
|
|
19
19
|
import "./chunk-WRZRX4Q7.js";
|