@sideboard-ai/core 0.1.350 → 0.1.351
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-P5QIV24I.js → agents-D5CL4CR4.js} +2 -2
- package/dist/{agents-RGAV5OHD.js → agents-INTH7J3F.js} +2 -2
- package/dist/{chunk-2MESZ5XR.js → chunk-7WPQAVS5.js} +10 -10
- package/dist/{chunk-NDEVAA34.js → chunk-AAKQU4UZ.js} +2 -2
- package/dist/{chunk-MANERA6F.js → chunk-AEEOYLVK.js} +2 -2
- package/dist/{chunk-W5GHFT7E.js → chunk-BDWVBEKN.js} +11 -11
- package/dist/{chunk-ZBSEJIOV.js → chunk-C3E2DGDF.js} +2 -2
- package/dist/{chunk-LFSTOECH.js → chunk-HISSQICH.js} +1 -1
- package/dist/{chunk-EZ2MUWNW.js → chunk-SZY23KGS.js} +1 -1
- package/dist/{chunk-5AHWUJRT.js → chunk-UXAKH4AW.js} +2 -2
- package/dist/{conductor-VGCXUUG6.js → conductor-FWYWIHEW.js} +2 -2
- package/dist/{conductor-HVOGBK63.js → conductor-W2X7QUKZ.js} +2 -2
- package/dist/{coordinator-prompt-E736TJBS.js → coordinator-prompt-J57Q4Z4W.js} +1 -1
- package/dist/{coordinator-prompt-DPO7L2JO.js → coordinator-prompt-KIHNLENN.js} +1 -1
- package/dist/{global-workspace-TG2TVLUF.js → global-workspace-CGB5CY4U.js} +1 -1
- package/dist/{global-workspace-4RDPAOTT.js → global-workspace-WXDWFZAN.js} +1 -1
- package/dist/index.cjs +150 -21
- package/dist/index.d.cts +19 -4
- package/dist/index.d.ts +19 -4
- package/dist/index.js +156 -27
- package/dist/mcp/run-stdio.cjs +150 -21
- package/dist/mcp/run-stdio.js +153 -24
- package/dist/{orchestrator-QDHZ56LA.js → orchestrator-DMEE7CEW.js} +4 -4
- package/dist/{orchestrator-3I2FLEZL.js → orchestrator-MUD4FY7Q.js} +4 -4
- package/dist/{workspaces-4PA24IX6.js → workspaces-7DPHDXNY.js} +1 -1
- package/dist/{workspaces-6TMYV4N2.js → workspaces-ZCTF4ECL.js} +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -13557,7 +13557,7 @@ var init_coordinator_prompt = __esm({
|
|
|
13557
13557
|
'- create_workspace \u2014 create a workspace (isolated checkout + first chat) from branch | pr | ticket (appears on Home). A ticket, PR, or named branch has one checkout: a second call returns that workspace (alreadyStarted=true) and chats for every agent already on it. That is not one agent. To put another agent on that checkout, fork_chat. send_to_chat only the chat that should do this job. Creating from the default branch still opens a new isolated workspace. Pass repoPath + parentChatId; omit agent and model so Sideboard applies Settings \u2192 Default agent, model & effort (never pass your own agent or agent=cursor). Pass the same tags (short labels, e.g. "phone-sync") on every workspace you open for one task so they group in the sidebar; reusing a checkout adds those tags. If the repo has a setup script, Sideboard runs it in the background (does not block send_to_chat). Nested Codex (you are Codex and the child would be Codex) can deadlock on ~/.codex locks \u2014 omit agent; Sideboard switches the child to Cursor when a CURSOR_API_KEY is set, otherwise keeps the Account default',
|
|
13558
13558
|
"- One orchestration chat can create at most the Settings \u2192 Advanced \u201CMax orchestration threads\u201D cap of child workspaces (default 5). fork_chat on an existing checkout does not use a slot.",
|
|
13559
13559
|
"- set_workspace_tags \u2014 set, add, or remove labels on a workspace after create. Pass any chat id on that checkout. Same tags on every workspace from one task. Worktree agents can update tags on their own checkout (they omit ref). set_wake_on_github_edges opts a workspace into CI and review-request wakes once Settings \u2192 Advanced is on. Pass a child chat id. Do not flip the Advanced switch.",
|
|
13560
|
-
"- set_plan / show_plan / list_order / set_dependency / clear_dependency / satisfy_dependency / execute_plan \u2014 This chat owns one plan. show_plan opens it in the side column, the same way a worktree agent does. The Orchestration row in the sidebar opens that chat. Draft with set_plan (title, summary, and goal) and set_dependency. A step may loop back to an earlier step. This is a plan, not a one-way waterfall. Call show_plan after you draft or change the plan. Do not paste the diagram in chat. Do not create workspaces or send_to_chat for that work while the plan is draft. execute_plan with agreed: true only after they tell you to run it. It marks the plan active and returns
|
|
13560
|
+
"- set_plan / show_plan / list_order / set_dependency / clear_dependency / satisfy_dependency / execute_plan \u2014 This chat owns one plan. show_plan opens it in the side column, the same way a worktree agent does. The Orchestration row in the sidebar opens that chat. Draft with set_plan (title, summary, and goal) and set_dependency. A step may loop back to an earlier step. This is a plan, not a one-way waterfall. Call show_plan after you draft or change the plan. Do not paste the diagram in chat. Do not create workspaces or send_to_chat for that work while the plan is draft. execute_plan with agreed: true only after they tell you to run it. It marks the plan active and returns start, waiting, and mergeHeld. start includes the first step others wait on, until that step reaches its gate, and any later step whose hold is merge rather than start. Start each of those with create_workspace (kind pr or issue; pass repoPath when set) or send_to_chat (kind workspace or orchestration). create_workspace returns a checkout that already exists. Leave waiting alone. Steps in mergeHeld can proceed; do not merge them. Merge only if they asked. Worktree agents show_plan to open the diagram and this checkout's implementation plan when plan.md exists. set_dependency / clear_dependency only for a step they are part of. A dependency says one PR, issue, or workspace must reach a gate before another can start or merge. gate=in-main is met when that PR is merged; gate=in-prod stays waiting until satisfy_dependency (Sideboard cannot see production). hold=start blocks starting the subject; hold=merge blocks merging it. Example: PR 1 in prod before PR 2 can merge; PR 3 in main before issue 4 can start. Pass waitsOnKind (pr|issue|workspace), waitsOnRef, gate, subjectKind, subjectRef, hold. Pass repoPath when the same number exists in more than one project. A step can name another orchestration chat (kind orchestration, ref that chat id). That chat drafts its own plan. Each orchestration chat opens its own plan with show_plan. Worktree agents set their own checkout and omit subject. Plan mode on a workspace agent stays a separate plan for that checkout. Do not start a step listed under Do not start. Do not merge a step listed under Do not merge. An edge line marked merge is a merge hold; that step can still be under Start now.",
|
|
13561
13561
|
"- start_board_card \u2014 same as create_workspace for a ticket/PR/named branch (attaches issue text when resolvable). Then send_to_chat.",
|
|
13562
13562
|
"- fork_workspace \u2014 fork a worktree chat into a NEW git worktree + chat (transcript attached); optional agent; leave model unset (Auto) unless you have a reason. Not for orchestration chats.",
|
|
13563
13563
|
"- 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.",
|
|
@@ -39722,6 +39722,53 @@ function buildWaterfall(rows) {
|
|
|
39722
39722
|
)
|
|
39723
39723
|
})).sort((a, b) => (a.nodes[0]?.label ?? "").localeCompare(b.nodes[0]?.label ?? ""));
|
|
39724
39724
|
}
|
|
39725
|
+
function joinCapped(lines, max = 3) {
|
|
39726
|
+
if (lines.length <= max) return lines.join(". ");
|
|
39727
|
+
const extra = lines.length - max;
|
|
39728
|
+
return `${lines.slice(0, max).join(". ")}. ${extra} more`;
|
|
39729
|
+
}
|
|
39730
|
+
function planWatchCopy(chains) {
|
|
39731
|
+
const start = [];
|
|
39732
|
+
const waiting = [];
|
|
39733
|
+
const ready = [];
|
|
39734
|
+
for (const chain of chains) {
|
|
39735
|
+
const incoming = chain.nodes.flatMap((node) => node.incoming);
|
|
39736
|
+
for (const node of chain.nodes) {
|
|
39737
|
+
const gating = node.incoming.filter((edge) => !edge.loop);
|
|
39738
|
+
const blocked = gating.filter((edge) => !edge.met);
|
|
39739
|
+
if (blocked.length > 0) {
|
|
39740
|
+
const verb = blocked.some((edge2) => edge2.hold === "start") ? "start" : "merge";
|
|
39741
|
+
const edge = blocked.find((row2) => row2.hold === verb) ?? blocked[0];
|
|
39742
|
+
waiting.push(
|
|
39743
|
+
`${node.label} can ${verb} once ${edge.fromLabel} is ${gatePhrase(edge.gate)}`
|
|
39744
|
+
);
|
|
39745
|
+
if (verb === "merge") start.push(`${node.label} can start`);
|
|
39746
|
+
continue;
|
|
39747
|
+
}
|
|
39748
|
+
if (gating.length > 0) {
|
|
39749
|
+
const verb = gating.every((edge) => edge.hold === "merge") ? "merge" : "start";
|
|
39750
|
+
ready.push(`${node.label} can ${verb}`);
|
|
39751
|
+
continue;
|
|
39752
|
+
}
|
|
39753
|
+
const outgoing = incoming.filter((edge) => edge.fromKey === node.key && !edge.loop);
|
|
39754
|
+
if (outgoing.length > 0 && outgoing.every((edge) => edge.met)) continue;
|
|
39755
|
+
start.push(`${node.label} can start`);
|
|
39756
|
+
}
|
|
39757
|
+
}
|
|
39758
|
+
if (start.length === 0 && waiting.length === 0 && ready.length === 0) {
|
|
39759
|
+
return "Later steps wait until the one above reaches its gate. In main clears when that pull request is merged. In production stays waiting until you mark it.";
|
|
39760
|
+
}
|
|
39761
|
+
const sentences = [];
|
|
39762
|
+
if (start.length) sentences.push(joinCapped(start));
|
|
39763
|
+
if (ready.length) sentences.push(joinCapped(ready));
|
|
39764
|
+
if (waiting.length) {
|
|
39765
|
+
sentences.push(
|
|
39766
|
+
start.length || ready.length ? `Still waiting: ${joinCapped(waiting)}` : `Running and idle. ${joinCapped(waiting)}. A merge or a production mark is what moves the next step`
|
|
39767
|
+
);
|
|
39768
|
+
}
|
|
39769
|
+
const text8 = sentences.join(". ");
|
|
39770
|
+
return text8.endsWith(".") ? text8 : `${text8}.`;
|
|
39771
|
+
}
|
|
39725
39772
|
function gatePhrase(gate) {
|
|
39726
39773
|
return gate === "in-prod" ? "in production" : "in main";
|
|
39727
39774
|
}
|
|
@@ -39862,10 +39909,72 @@ function formatOrderPlace(rows, you) {
|
|
|
39862
39909
|
return lines.join("\n");
|
|
39863
39910
|
}
|
|
39864
39911
|
function executionSlice(rows) {
|
|
39865
|
-
|
|
39866
|
-
|
|
39867
|
-
|
|
39912
|
+
const byKey = /* @__PURE__ */ new Map();
|
|
39913
|
+
const touch = (target, label, depth, asSubject) => {
|
|
39914
|
+
const key = targetKey(target);
|
|
39915
|
+
const found = byKey.get(key);
|
|
39916
|
+
if (!found) {
|
|
39917
|
+
byKey.set(key, {
|
|
39918
|
+
target,
|
|
39919
|
+
label,
|
|
39920
|
+
depth: asSubject ? depth : Number.POSITIVE_INFINITY,
|
|
39921
|
+
asSubject,
|
|
39922
|
+
incoming: [],
|
|
39923
|
+
outgoing: []
|
|
39924
|
+
});
|
|
39925
|
+
return;
|
|
39926
|
+
}
|
|
39927
|
+
if (asSubject || !found.asSubject) found.label = label;
|
|
39928
|
+
if (asSubject) {
|
|
39929
|
+
found.asSubject = true;
|
|
39930
|
+
found.depth = Math.min(found.depth, depth);
|
|
39931
|
+
}
|
|
39868
39932
|
};
|
|
39933
|
+
for (const row2 of rows) {
|
|
39934
|
+
touch(row2.subject, row2.subjectLabel, row2.depth, true);
|
|
39935
|
+
touch(row2.waitsOn, row2.waitsOnLabel, row2.depth, false);
|
|
39936
|
+
if (row2.loop) continue;
|
|
39937
|
+
byKey.get(targetKey(row2.subject)).incoming.push(row2);
|
|
39938
|
+
byKey.get(targetKey(row2.waitsOn)).outgoing.push(row2);
|
|
39939
|
+
}
|
|
39940
|
+
const start = [];
|
|
39941
|
+
const waiting = [];
|
|
39942
|
+
const mergeHeld = [];
|
|
39943
|
+
const gateName = (row2) => row2.gate === "in-prod" ? "in prod" : "in main";
|
|
39944
|
+
const items = [...byKey.values()].sort((a, b) => {
|
|
39945
|
+
const depthA = Number.isFinite(a.depth) ? a.depth : 0;
|
|
39946
|
+
const depthB = Number.isFinite(b.depth) ? b.depth : 0;
|
|
39947
|
+
return depthA - depthB || a.label.localeCompare(b.label);
|
|
39948
|
+
});
|
|
39949
|
+
for (const item of items) {
|
|
39950
|
+
const startBlocked = item.incoming.filter((row2) => !row2.met && row2.hold === "start");
|
|
39951
|
+
const mergeBlocked = item.incoming.filter((row2) => !row2.met && row2.hold === "merge");
|
|
39952
|
+
const settled = item.outgoing.length > 0 && item.outgoing.every((row2) => row2.met) && startBlocked.length === 0 && mergeBlocked.length === 0;
|
|
39953
|
+
if (startBlocked.length > 0) {
|
|
39954
|
+
const edge = startBlocked[0];
|
|
39955
|
+
waiting.push({
|
|
39956
|
+
target: item.target,
|
|
39957
|
+
label: item.label,
|
|
39958
|
+
detail: `${edge.waitsOnLabel} must be ${gateName(edge)} before this can start`
|
|
39959
|
+
});
|
|
39960
|
+
} else if (!settled) {
|
|
39961
|
+
const pending = item.outgoing.find((row2) => !row2.met);
|
|
39962
|
+
start.push({
|
|
39963
|
+
target: item.target,
|
|
39964
|
+
label: item.label,
|
|
39965
|
+
detail: pending ? `Start this so it can reach ${pending.gate === "in-prod" ? "production" : "main"}` : "Start this"
|
|
39966
|
+
});
|
|
39967
|
+
}
|
|
39968
|
+
if (mergeBlocked.length > 0 && startBlocked.length === 0) {
|
|
39969
|
+
const edge = mergeBlocked[0];
|
|
39970
|
+
mergeHeld.push({
|
|
39971
|
+
target: item.target,
|
|
39972
|
+
label: item.label,
|
|
39973
|
+
detail: `Do not merge until ${edge.waitsOnLabel} is ${gateName(edge)}`
|
|
39974
|
+
});
|
|
39975
|
+
}
|
|
39976
|
+
}
|
|
39977
|
+
return { start, waiting, mergeHeld };
|
|
39869
39978
|
}
|
|
39870
39979
|
function orderEdgeTouches(edge, you) {
|
|
39871
39980
|
return orderTargetMatches(edge.subject, you) || orderTargetMatches(edge.waitsOn, you);
|
|
@@ -39886,7 +39995,7 @@ function formatOrderText(rows, plan) {
|
|
|
39886
39995
|
rows.forEach((row2, index) => {
|
|
39887
39996
|
const gate = row2.gate === "in-prod" ? "in prod" : "in main";
|
|
39888
39997
|
const hold = row2.hold === "merge" ? "merge" : "start";
|
|
39889
|
-
const state = row2.loop ? "loop" : row2.met ? "clear" : "waiting";
|
|
39998
|
+
const state = row2.loop ? "loop" : row2.met ? "clear" : row2.hold === "merge" ? "merge" : "waiting";
|
|
39890
39999
|
lines.push(
|
|
39891
40000
|
row2.loop ? `${index + 1}. ${state} ${row2.subjectLabel} returns to ${row2.waitsOnLabel} once it is ${gate}` : `${index + 1}. ${state} ${row2.waitsOnLabel} must be ${gate} before ${row2.subjectLabel} can ${hold}`
|
|
39892
40001
|
);
|
|
@@ -39894,6 +40003,17 @@ function formatOrderText(rows, plan) {
|
|
|
39894
40003
|
if (row2.note) lines.push(` ${row2.note}`);
|
|
39895
40004
|
lines.push(` id: ${row2.id.slice(0, 8)}`);
|
|
39896
40005
|
});
|
|
40006
|
+
if (plan?.status === "active") {
|
|
40007
|
+
const slice = executionSlice(rows);
|
|
40008
|
+
const section = (title, items) => {
|
|
40009
|
+
if (!items.length) return;
|
|
40010
|
+
lines.push("", title);
|
|
40011
|
+
for (const item of items) lines.push(`- ${item.label}. ${item.detail}`);
|
|
40012
|
+
};
|
|
40013
|
+
section("Start now:", slice.start);
|
|
40014
|
+
section("Do not start:", slice.waiting);
|
|
40015
|
+
section("Do not merge:", slice.mergeHeld);
|
|
40016
|
+
}
|
|
39897
40017
|
return lines.join("\n");
|
|
39898
40018
|
}
|
|
39899
40019
|
function escapeHtml(value) {
|
|
@@ -39926,6 +40046,15 @@ function markWorkingChains(chains, threads) {
|
|
|
39926
40046
|
})
|
|
39927
40047
|
}));
|
|
39928
40048
|
}
|
|
40049
|
+
function waterfallBar(node, chain) {
|
|
40050
|
+
const gating = node.incoming.filter((edge) => !edge.loop);
|
|
40051
|
+
const startBlocked = gating.some((edge) => !edge.met && edge.hold === "start");
|
|
40052
|
+
const outgoing = chain.nodes.flatMap((other) => other.incoming).filter((edge) => edge.fromKey === node.key && !edge.loop);
|
|
40053
|
+
const settled = outgoing.length > 0 && outgoing.every((edge) => edge.met) && !startBlocked;
|
|
40054
|
+
if (startBlocked) return " waiting";
|
|
40055
|
+
if (settled || gating.length > 0 && gating.every((edge) => edge.met)) return " clear";
|
|
40056
|
+
return " start";
|
|
40057
|
+
}
|
|
39929
40058
|
function nodeIsYou(node, you) {
|
|
39930
40059
|
if (!you) return false;
|
|
39931
40060
|
return orderTargetMatches(
|
|
@@ -39941,20 +40070,20 @@ function formatWaterfallHtml(chains, opts) {
|
|
|
39941
40070
|
const plan = opts?.plan ?? null;
|
|
39942
40071
|
const you = opts?.you ?? null;
|
|
39943
40072
|
const title = plan?.title?.trim() || "Planner";
|
|
39944
|
-
const
|
|
40073
|
+
const watch2 = chains.length ? planWatchCopy(chains) : "";
|
|
40074
|
+
const status = plan ? plan.status === "active" ? watch2 || "Running. Start the steps that are free. Leave held steps alone." : watch2 ? `Draft. Nothing runs until you agree. ${watch2}` : "Draft. Discuss this and change it. Nothing runs until you agree." : watch2 || "Later steps wait until the one above reaches its gate. In main clears when that pull request is merged. In production stays waiting until it is marked.";
|
|
39945
40075
|
const body = chains.length === 0 ? '<p class="empty">No order yet.</p>' : chains.map((chain) => {
|
|
39946
40076
|
const nodes = chain.nodes.map((node) => {
|
|
39947
|
-
const waiting = node.incoming.some((edge) => !edge.met && !edge.loop);
|
|
39948
|
-
const clear = node.incoming.some((edge) => !edge.loop) && !waiting;
|
|
39949
40077
|
const yours = nodeIsYou(node, you);
|
|
39950
40078
|
const working = node.working === true;
|
|
39951
|
-
const
|
|
40079
|
+
const bar = waterfallBar(node, chain);
|
|
40080
|
+
const state = `${working ? " current" : ""}${bar}${yours ? " you" : ""}`;
|
|
39952
40081
|
const drops = node.incoming.map((edge) => {
|
|
39953
40082
|
const tone = edge.loop ? "loop" : edge.met ? "clear" : "waiting";
|
|
39954
40083
|
const note = edge.note ? `<span>${escapeHtml(edge.note)}</span>` : "";
|
|
39955
40084
|
return `<div class="drop"><span>After ${escapeHtml(edge.fromLabel)} is ${escapeHtml(gatePhrase(edge.gate))}, this ${escapeHtml(holdPhrase(edge.hold))}</span><span class="${tone}">${escapeHtml(edge.detail)}</span>${note}</div>`;
|
|
39956
40085
|
}).join("");
|
|
39957
|
-
const kicker = `${WATERFALL_KIND[node.kind]}${working ? " \xB7 Working" : ""}${yours ? " \xB7 You" : ""}`;
|
|
40086
|
+
const kicker = `${WATERFALL_KIND[node.kind]}${bar === " start" ? " \xB7 Start" : ""}${working ? " \xB7 Working" : ""}${yours ? " \xB7 You" : ""}`;
|
|
39958
40087
|
return `<li class="node" style="margin-left:${node.depth * 28}px">${drops}<div class="bar${state}"><span class="kicker">${kicker}</span><strong>${escapeHtml(node.label)}</strong></div></li>`;
|
|
39959
40088
|
}).join("");
|
|
39960
40089
|
return `<ol class="chain">${nodes}</ol>`;
|
|
@@ -39977,6 +40106,7 @@ h1 { font-size: 15px; font-weight: 600; margin: 0 0 6px; }
|
|
|
39977
40106
|
.bar { border: 1px solid #333; border-radius: 10px; padding: 10px 12px; background: #1c1c1c; display: flex; flex-direction: column; gap: 2px; }
|
|
39978
40107
|
.bar.waiting { border-color: #6a5420; background: #221c10; }
|
|
39979
40108
|
.bar.clear { border-color: #2d5a32; background: #142016; }
|
|
40109
|
+
.bar.start { border-color: #2a4a7a; background: #141c28; }
|
|
39980
40110
|
.bar.you { outline: 1px solid #8ab4ff; }
|
|
39981
40111
|
.bar.current { border-color: #8ab4ff; box-shadow: inset 3px 0 0 #8ab4ff; }
|
|
39982
40112
|
.bar.current .kicker { color: #ececec; }
|
|
@@ -40188,7 +40318,7 @@ function executeOrderPlan(ownerThreadId) {
|
|
|
40188
40318
|
const ids = new Set(edges.map((edge) => edge.id));
|
|
40189
40319
|
const rows = resolveOrchestrationGates(file.plans, file.edges, threadSnapshots(), file.marks);
|
|
40190
40320
|
const slice = executionSlice(rows.filter((row2) => ids.has(row2.id)));
|
|
40191
|
-
return { plan,
|
|
40321
|
+
return { plan, start: slice.start, waiting: slice.waiting, mergeHeld: slice.mergeHeld };
|
|
40192
40322
|
}
|
|
40193
40323
|
function listOrderEdges() {
|
|
40194
40324
|
return readFile().edges;
|
|
@@ -50745,7 +50875,7 @@ function registerOrderTools(server) {
|
|
|
50745
50875
|
);
|
|
50746
50876
|
server.tool(
|
|
50747
50877
|
"execute_plan",
|
|
50748
|
-
"Mark the plan active after the user has seen it and told you to run it. Returns
|
|
50878
|
+
"Mark the plan active after the user has seen it and told you to run it. Returns start (open or continue these, including the first step others wait on), waiting (hold=start is still unmet; leave them alone), and mergeHeld (work may proceed; do not merge). Does not create workspaces. Pass agreed: true only after they agree. Merge only if they asked.",
|
|
50749
50879
|
{
|
|
50750
50880
|
agreed: import_zod12.z.literal(true).describe("True only after the user has seen the plan and told you to run it")
|
|
50751
50881
|
},
|
|
@@ -50753,21 +50883,20 @@ function registerOrderTools(server) {
|
|
|
50753
50883
|
try {
|
|
50754
50884
|
const result = executeOrderPlan(orchestrationOwnerId(false));
|
|
50755
50885
|
const brief = (row2) => ({
|
|
50756
|
-
|
|
50757
|
-
|
|
50758
|
-
|
|
50759
|
-
|
|
50760
|
-
|
|
50761
|
-
detail: row2.detail,
|
|
50762
|
-
...row2.loop ? { loop: true } : {}
|
|
50886
|
+
kind: row2.target.kind,
|
|
50887
|
+
ref: row2.target.ref,
|
|
50888
|
+
...row2.target.repoPath ? { repoPath: row2.target.repoPath } : {},
|
|
50889
|
+
label: row2.label,
|
|
50890
|
+
detail: row2.detail
|
|
50763
50891
|
});
|
|
50764
50892
|
return mcpJson({
|
|
50765
50893
|
ok: true,
|
|
50766
50894
|
status: result.plan.status,
|
|
50767
50895
|
title: result.plan.title,
|
|
50768
|
-
|
|
50896
|
+
start: result.start.map(brief),
|
|
50769
50897
|
waiting: result.waiting.map(brief),
|
|
50770
|
-
|
|
50898
|
+
mergeHeld: result.mergeHeld.map(brief),
|
|
50899
|
+
message: "Plan is active. Start every step in start with create_workspace (kind pr or issue; pass repoPath when set) or send_to_chat (kind workspace or orchestration). create_workspace returns a checkout that already exists. Leave waiting alone. Steps in mergeHeld can proceed; do not merge them. Merge only if the user asked."
|
|
50771
50900
|
});
|
|
50772
50901
|
} catch (err) {
|
|
50773
50902
|
return mcpJson({ error: err instanceof Error ? err.message : String(err) }, true);
|
package/dist/index.d.cts
CHANGED
|
@@ -1400,9 +1400,23 @@ declare function resolveOrderRows(edges: OrderEdge[], threads: OrderThreadSnapsh
|
|
|
1400
1400
|
|
|
1401
1401
|
/** Steps this checkout is waiting on, ready for, or blocking. */
|
|
1402
1402
|
declare function formatOrderPlace(rows: OrderRow[], you: OrderThreadSnapshot): string;
|
|
1403
|
+
/** One pull request, issue, workspace, or orchestration chat on a plan. */
|
|
1404
|
+
interface PlanWork {
|
|
1405
|
+
target: OrderTarget;
|
|
1406
|
+
label: string;
|
|
1407
|
+
detail: string;
|
|
1408
|
+
}
|
|
1409
|
+
/**
|
|
1410
|
+
* Work this plan can start now, work held from starting, and work that may
|
|
1411
|
+
* proceed but must not merge. A root that others wait on is in `start` until
|
|
1412
|
+
* it reaches that gate. `hold=merge` does not keep the later step from starting.
|
|
1413
|
+
* An unmet `hold=start` keeps that step in `waiting` only.
|
|
1414
|
+
* A loop does not block the first pass.
|
|
1415
|
+
*/
|
|
1403
1416
|
declare function executionSlice(rows: OrderRow[]): {
|
|
1404
|
-
|
|
1405
|
-
waiting:
|
|
1417
|
+
start: PlanWork[];
|
|
1418
|
+
waiting: PlanWork[];
|
|
1419
|
+
mergeHeld: PlanWork[];
|
|
1406
1420
|
};
|
|
1407
1421
|
declare function orderEdgeTouches(edge: Pick<OrderEdge, 'waitsOn' | 'subject'>, you: OrderThreadSnapshot): boolean;
|
|
1408
1422
|
declare function formatOrderText(rows: OrderRow[], plan?: OrderPlan | null): string;
|
|
@@ -1502,8 +1516,9 @@ declare function setOrderPlan(input: {
|
|
|
1502
1516
|
}): OrderPlan;
|
|
1503
1517
|
declare function executeOrderPlan(ownerThreadId?: string): {
|
|
1504
1518
|
plan: OrderPlan;
|
|
1505
|
-
|
|
1506
|
-
waiting:
|
|
1519
|
+
start: PlanWork[];
|
|
1520
|
+
waiting: PlanWork[];
|
|
1521
|
+
mergeHeld: PlanWork[];
|
|
1507
1522
|
};
|
|
1508
1523
|
declare function listOrderEdges(): OrderEdge[];
|
|
1509
1524
|
declare function listOrderMarks(): OrderMark[];
|
package/dist/index.d.ts
CHANGED
|
@@ -1400,9 +1400,23 @@ declare function resolveOrderRows(edges: OrderEdge[], threads: OrderThreadSnapsh
|
|
|
1400
1400
|
|
|
1401
1401
|
/** Steps this checkout is waiting on, ready for, or blocking. */
|
|
1402
1402
|
declare function formatOrderPlace(rows: OrderRow[], you: OrderThreadSnapshot): string;
|
|
1403
|
+
/** One pull request, issue, workspace, or orchestration chat on a plan. */
|
|
1404
|
+
interface PlanWork {
|
|
1405
|
+
target: OrderTarget;
|
|
1406
|
+
label: string;
|
|
1407
|
+
detail: string;
|
|
1408
|
+
}
|
|
1409
|
+
/**
|
|
1410
|
+
* Work this plan can start now, work held from starting, and work that may
|
|
1411
|
+
* proceed but must not merge. A root that others wait on is in `start` until
|
|
1412
|
+
* it reaches that gate. `hold=merge` does not keep the later step from starting.
|
|
1413
|
+
* An unmet `hold=start` keeps that step in `waiting` only.
|
|
1414
|
+
* A loop does not block the first pass.
|
|
1415
|
+
*/
|
|
1403
1416
|
declare function executionSlice(rows: OrderRow[]): {
|
|
1404
|
-
|
|
1405
|
-
waiting:
|
|
1417
|
+
start: PlanWork[];
|
|
1418
|
+
waiting: PlanWork[];
|
|
1419
|
+
mergeHeld: PlanWork[];
|
|
1406
1420
|
};
|
|
1407
1421
|
declare function orderEdgeTouches(edge: Pick<OrderEdge, 'waitsOn' | 'subject'>, you: OrderThreadSnapshot): boolean;
|
|
1408
1422
|
declare function formatOrderText(rows: OrderRow[], plan?: OrderPlan | null): string;
|
|
@@ -1502,8 +1516,9 @@ declare function setOrderPlan(input: {
|
|
|
1502
1516
|
}): OrderPlan;
|
|
1503
1517
|
declare function executeOrderPlan(ownerThreadId?: string): {
|
|
1504
1518
|
plan: OrderPlan;
|
|
1505
|
-
|
|
1506
|
-
waiting:
|
|
1519
|
+
start: PlanWork[];
|
|
1520
|
+
waiting: PlanWork[];
|
|
1521
|
+
mergeHeld: PlanWork[];
|
|
1507
1522
|
};
|
|
1508
1523
|
declare function listOrderEdges(): OrderEdge[];
|
|
1509
1524
|
declare function listOrderMarks(): OrderMark[];
|