@sideboard-ai/core 0.1.350 → 0.1.352
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/{abletime-TX7BTTR2.js → abletime-5LEOMLQE.js} +4 -4
- package/dist/{abletime-URSRZW7P.js → abletime-VUPUERE4.js} +4 -4
- package/dist/{abletime-oauth-QS3WPSCC.js → abletime-oauth-65LHLQ7P.js} +3 -3
- package/dist/{abletime-oauth-SL3NMNEC.js → abletime-oauth-JAINJBNY.js} +3 -3
- package/dist/{abletime-rest-JZU6JJCV.js → abletime-rest-4TCWPN7E.js} +3 -3
- package/dist/{abletime-rest-GGQLUO55.js → abletime-rest-HBIK234Y.js} +3 -3
- package/dist/agents/claude-runner.cjs +46 -19
- package/dist/agents/claude-runner.js +16 -1
- package/dist/agents/cursor-runner.cjs +50 -12
- package/dist/agents/cursor-runner.js +2 -2
- package/dist/{agents-RGAV5OHD.js → agents-4DQDWMSX.js} +9 -9
- package/dist/{agents-P5QIV24I.js → agents-IV454BNN.js} +8 -8
- package/dist/{app-settings-IA7ZZKWQ.js → app-settings-GM4MJD2E.js} +3 -1
- package/dist/{app-settings-XILTSD6L.js → app-settings-X3UFWRAF.js} +3 -1
- package/dist/{chunk-BZK62VPT.js → chunk-2S7EAUDI.js} +2 -2
- package/dist/{chunk-CCWQ65VD.js → chunk-2SFKLWU5.js} +2 -2
- package/dist/{chunk-WB3G2LQO.js → chunk-BCNPZ7H2.js} +1 -1
- package/dist/{chunk-W5GHFT7E.js → chunk-CQDJ4RX4.js} +149 -127
- package/dist/{chunk-SMSD6U3N.js → chunk-GA5MLYVG.js} +1 -1
- package/dist/{chunk-LFSTOECH.js → chunk-HBRP2SHA.js} +4 -4
- package/dist/{chunk-DL4OHDBV.js → chunk-I6BKWSCT.js} +3 -3
- package/dist/{chunk-WJURGCBR.js → chunk-KSBJOWVO.js} +1 -1
- package/dist/{chunk-J4EA5SHF.js → chunk-LZ3TAKNJ.js} +3 -3
- package/dist/{chunk-F4RFFE2H.js → chunk-M426EW7O.js} +3 -3
- package/dist/{chunk-ZBSEJIOV.js → chunk-MBQU6RE2.js} +6 -6
- package/dist/{chunk-TCEUNSLX.js → chunk-NRGT7RMO.js} +1 -1
- package/dist/{chunk-M45WGODR.js → chunk-OCCUD5CK.js} +2 -2
- package/dist/{chunk-5AHWUJRT.js → chunk-PR5TOSRD.js} +324 -70
- package/dist/{chunk-SUZOPJZC.js → chunk-PS6TD5MQ.js} +260 -2
- package/dist/{chunk-YE7Z5WH3.js → chunk-QKNOKO2P.js} +1 -1
- package/dist/{chunk-VL6F2KRE.js → chunk-RMJXFABA.js} +8 -6
- package/dist/{chunk-FQ3JYUKI.js → chunk-SBUR2WCP.js} +2 -2
- package/dist/{chunk-MANERA6F.js → chunk-SWU5C3HQ.js} +6 -6
- package/dist/{chunk-UFUAIVNV.js → chunk-TB7SYXXS.js} +8 -6
- package/dist/{chunk-7ZD4OK6G.js → chunk-TDWE7INS.js} +1 -1
- package/dist/{chunk-WFX4ZVSZ.js → chunk-TRUNDXCE.js} +1 -1
- package/dist/{chunk-NDEVAA34.js → chunk-UDTFOKVX.js} +28 -10
- package/dist/{chunk-PXSWVZIL.js → chunk-UPJB6TFI.js} +2 -2
- package/dist/{chunk-2MESZ5XR.js → chunk-US2PGV3X.js} +146 -126
- package/dist/{chunk-YVN7L4KG.js → chunk-V2G6AGWM.js} +6 -1
- package/dist/{chunk-37ZBEBP6.js → chunk-VZAICZHU.js} +3 -3
- package/dist/{chunk-FCKTBE26.js → chunk-WJQFWDGH.js} +1 -1
- package/dist/{chunk-EZ2MUWNW.js → chunk-WTT525MC.js} +4 -4
- package/dist/{chunk-BF6INES4.js → chunk-X52SO3DM.js} +1 -1
- package/dist/{chunk-B4EFQTMP.js → chunk-XB6NCBZK.js} +5 -5
- package/dist/{chunk-5TCMXEYL.js → chunk-YGXUIBIT.js} +3 -3
- package/dist/{chunk-VHQ6OG3U.js → chunk-ZHYFRRPN.js} +2 -2
- package/dist/{chunk-5WF54R3B.js → chunk-ZLPP66IP.js} +5 -5
- package/dist/{conductor-VGCXUUG6.js → conductor-2UOW2XBE.js} +6 -6
- package/dist/{conductor-HVOGBK63.js → conductor-6NYG2SZA.js} +6 -6
- package/dist/{coordinator-prompt-E736TJBS.js → coordinator-prompt-K3WT5UVS.js} +4 -4
- package/dist/{coordinator-prompt-DPO7L2JO.js → coordinator-prompt-ZP6AEETR.js} +4 -4
- package/dist/{global-workspace-4RDPAOTT.js → global-workspace-EFPSYP4N.js} +4 -4
- package/dist/{global-workspace-TG2TVLUF.js → global-workspace-EPVNFQVC.js} +4 -4
- package/dist/index.cjs +1342 -886
- package/dist/index.d.cts +27 -14
- package/dist/index.d.ts +27 -14
- package/dist/index.js +510 -335
- package/dist/{linear-WG23LBCX.js → linear-4ACCQCWM.js} +2 -2
- package/dist/{linear-E3BX5PX5.js → linear-Q2E6LKJW.js} +2 -2
- package/dist/{linear-list-VU47BNUV.js → linear-list-5A3BAWRZ.js} +1 -1
- package/dist/{linear-list-OINZWVV5.js → linear-list-V3A57XBR.js} +1 -1
- package/dist/mcp/run-stdio.cjs +1266 -823
- package/dist/mcp/run-stdio.js +491 -328
- package/dist/{optional-cli-K6HX2X5O.js → optional-cli-CKQPLY4Q.js} +4 -4
- package/dist/{optional-cli-SA3EQYML.js → optional-cli-WE3ULLFV.js} +5 -5
- package/dist/{orchestrator-QDHZ56LA.js → orchestrator-5BCHUAFG.js} +11 -11
- package/dist/{orchestrator-3I2FLEZL.js → orchestrator-EY6GCYQG.js} +12 -12
- package/dist/{thread-store-4YTOV2HL.js → thread-store-CDFHHRXB.js} +2 -2
- package/dist/{thread-store-LME2ICZP.js → thread-store-TDGZEGS6.js} +2 -2
- package/dist/{workspaces-6TMYV4N2.js → workspaces-KL4SZMJE.js} +4 -4
- package/dist/{workspaces-4PA24IX6.js → workspaces-SQRR67HD.js} +4 -4
- package/dist/{worktree-4ATMCYIE.js → worktree-7KG5N2XL.js} +3 -3
- package/dist/{worktree-DA6SKIU5.js → worktree-IDX7LMBC.js} +3 -3
- package/package.json +1 -1
package/dist/mcp/run-stdio.js
CHANGED
|
@@ -44,17 +44,20 @@ import {
|
|
|
44
44
|
syncBoardPins,
|
|
45
45
|
workspaceTagTargetRef,
|
|
46
46
|
writeAgentBlock
|
|
47
|
-
} from "../chunk-
|
|
47
|
+
} from "../chunk-US2PGV3X.js";
|
|
48
48
|
import "../chunk-DC3VZXMA.js";
|
|
49
49
|
import {
|
|
50
|
+
COMPUTER_USE_DESCRIPTION,
|
|
50
51
|
SIDEBOARD_THREAD_ID_ENV,
|
|
51
52
|
bootstrapSystemCa,
|
|
52
53
|
isCursorApiKeyConfigured,
|
|
53
54
|
listModelsForAgent,
|
|
55
|
+
macosComputerUseRunner,
|
|
56
|
+
performComputerUse,
|
|
54
57
|
shouldRegisterMcpWaitForTurn,
|
|
55
58
|
sideboardMcpProfile,
|
|
56
59
|
worktreeMcpToolNames
|
|
57
|
-
} from "../chunk-
|
|
60
|
+
} from "../chunk-PR5TOSRD.js";
|
|
58
61
|
import {
|
|
59
62
|
classifyTurnFailure,
|
|
60
63
|
mcpWaitForJobTimeoutMs,
|
|
@@ -66,7 +69,7 @@ import {
|
|
|
66
69
|
waitForDetachedJob,
|
|
67
70
|
waitForTurnToolResult,
|
|
68
71
|
workspaceAgentChatSummaries
|
|
69
|
-
} from "../chunk-
|
|
72
|
+
} from "../chunk-SWU5C3HQ.js";
|
|
70
73
|
import {
|
|
71
74
|
HUGE_TOOL_RESULT_SUMMARY,
|
|
72
75
|
clipToolResultForStore,
|
|
@@ -87,14 +90,14 @@ import {
|
|
|
87
90
|
searchAbleTimeTasks,
|
|
88
91
|
toAbleTimeIssueInfo,
|
|
89
92
|
updateAbleTimeTask
|
|
90
|
-
} from "../chunk-
|
|
91
|
-
import "../chunk-
|
|
92
|
-
import "../chunk-
|
|
93
|
+
} from "../chunk-I6BKWSCT.js";
|
|
94
|
+
import "../chunk-OCCUD5CK.js";
|
|
95
|
+
import "../chunk-XB6NCBZK.js";
|
|
93
96
|
import {
|
|
94
97
|
normalizeServiceOrigin
|
|
95
|
-
} from "../chunk-
|
|
96
|
-
import "../chunk-
|
|
97
|
-
import "../chunk-
|
|
98
|
+
} from "../chunk-KSBJOWVO.js";
|
|
99
|
+
import "../chunk-YGXUIBIT.js";
|
|
100
|
+
import "../chunk-X52SO3DM.js";
|
|
98
101
|
import {
|
|
99
102
|
PRESENT_PLAN_REQUIRES_PLAN_MODE,
|
|
100
103
|
PRESENT_PLAN_TOOL_DESCRIPTION,
|
|
@@ -107,7 +110,7 @@ import {
|
|
|
107
110
|
isCloudCoordinatorThread,
|
|
108
111
|
isGlobalThread,
|
|
109
112
|
isOrchestratorThread
|
|
110
|
-
} from "../chunk-
|
|
113
|
+
} from "../chunk-WTT525MC.js";
|
|
111
114
|
import {
|
|
112
115
|
canonicalizeRepoPath,
|
|
113
116
|
formatGhLandError,
|
|
@@ -122,7 +125,7 @@ import {
|
|
|
122
125
|
resolveProjectRemoteTag,
|
|
123
126
|
resolveRepoRoot,
|
|
124
127
|
warmGithubAgentAuth
|
|
125
|
-
} from "../chunk-
|
|
128
|
+
} from "../chunk-ZHYFRRPN.js";
|
|
126
129
|
import "../chunk-I6RGRUNY.js";
|
|
127
130
|
import "../chunk-E63AM3PW.js";
|
|
128
131
|
import {
|
|
@@ -135,7 +138,7 @@ import {
|
|
|
135
138
|
listLinearProjects,
|
|
136
139
|
listLinearTeams,
|
|
137
140
|
updateLinearIssue
|
|
138
|
-
} from "../chunk-
|
|
141
|
+
} from "../chunk-WJQFWDGH.js";
|
|
139
142
|
import {
|
|
140
143
|
formatGitHubSearchUpdatedSince,
|
|
141
144
|
issueMatchesUpdatedSince,
|
|
@@ -155,7 +158,7 @@ import {
|
|
|
155
158
|
import {
|
|
156
159
|
httpFetch
|
|
157
160
|
} from "../chunk-2GPQZZLY.js";
|
|
158
|
-
import "../chunk-
|
|
161
|
+
import "../chunk-TRUNDXCE.js";
|
|
159
162
|
import "../chunk-GK7H3SY7.js";
|
|
160
163
|
import {
|
|
161
164
|
gh,
|
|
@@ -180,9 +183,10 @@ import {
|
|
|
180
183
|
scheduleNeedsCaffeinate,
|
|
181
184
|
updateSchedule,
|
|
182
185
|
updateThread
|
|
183
|
-
} from "../chunk-
|
|
186
|
+
} from "../chunk-GA5MLYVG.js";
|
|
184
187
|
import "../chunk-WMZIANPV.js";
|
|
185
188
|
import {
|
|
189
|
+
computerUseEnabled,
|
|
186
190
|
formatWorkspaceProfileSuffix,
|
|
187
191
|
isAbleTimeConnected,
|
|
188
192
|
isLinearConnected,
|
|
@@ -195,7 +199,7 @@ import {
|
|
|
195
199
|
resolveViewerProfileForRepo,
|
|
196
200
|
savePosthogOAuth,
|
|
197
201
|
wakeOrchestratorOnGithubEdgesEnabled
|
|
198
|
-
} from "../chunk-
|
|
202
|
+
} from "../chunk-RMJXFABA.js";
|
|
199
203
|
import {
|
|
200
204
|
writePrivateFile
|
|
201
205
|
} from "../chunk-NSTQ6QKD.js";
|
|
@@ -315,7 +319,7 @@ function createClippedMcpServer() {
|
|
|
315
319
|
}
|
|
316
320
|
|
|
317
321
|
// src/mcp/server.ts
|
|
318
|
-
import { z as
|
|
322
|
+
import { z as z11 } from "zod";
|
|
319
323
|
import { randomUUID as randomUUID4 } from "crypto";
|
|
320
324
|
import { basename } from "path";
|
|
321
325
|
|
|
@@ -1038,6 +1042,35 @@ function resolveRunScriptThreadRef(ref) {
|
|
|
1038
1042
|
return thread.id;
|
|
1039
1043
|
}
|
|
1040
1044
|
|
|
1045
|
+
// src/mcp/computer-use-tool.ts
|
|
1046
|
+
import { z } from "zod";
|
|
1047
|
+
function registerComputerUseTool(server, catalog) {
|
|
1048
|
+
if (!catalog.has("computer_use")) return;
|
|
1049
|
+
server.tool(
|
|
1050
|
+
"computer_use",
|
|
1051
|
+
COMPUTER_USE_DESCRIPTION,
|
|
1052
|
+
{
|
|
1053
|
+
action: z.enum(["screenshot", "click", "type", "key", "scroll"]).describe("screenshot, click, type, key, or scroll"),
|
|
1054
|
+
x: z.number().optional().describe("Screen x in points, not PNG pixels, for click and scroll"),
|
|
1055
|
+
y: z.number().optional().describe("Screen y in points, not PNG pixels, for click and scroll"),
|
|
1056
|
+
text: z.string().optional().describe("Text to type"),
|
|
1057
|
+
key: z.string().optional().describe("One key: return, tab, escape, arrows, delete, or one character"),
|
|
1058
|
+
modifiers: z.array(z.string()).optional().describe("command, shift, option, control"),
|
|
1059
|
+
dx: z.number().optional().describe("Horizontal scroll in points. Positive is right"),
|
|
1060
|
+
dy: z.number().optional().describe("Vertical scroll in points. Positive is down")
|
|
1061
|
+
},
|
|
1062
|
+
async (args) => {
|
|
1063
|
+
const result = await performComputerUse({
|
|
1064
|
+
enabled: computerUseEnabled(),
|
|
1065
|
+
cwd: process.cwd(),
|
|
1066
|
+
input: args,
|
|
1067
|
+
runner: macosComputerUseRunner
|
|
1068
|
+
});
|
|
1069
|
+
return mcpJson(result);
|
|
1070
|
+
}
|
|
1071
|
+
);
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1041
1074
|
// src/threads/wake-on-github-edges.ts
|
|
1042
1075
|
function wakeOnGithubEdgesTargetRef(opts) {
|
|
1043
1076
|
const requested = opts.requestedRef?.trim() || "";
|
|
@@ -1271,10 +1304,10 @@ function childThreadRefs(parentId, threads) {
|
|
|
1271
1304
|
}
|
|
1272
1305
|
|
|
1273
1306
|
// src/mcp/abletime-tools.ts
|
|
1274
|
-
import { z as
|
|
1307
|
+
import { z as z3 } from "zod";
|
|
1275
1308
|
|
|
1276
1309
|
// src/mcp/issue-payload.ts
|
|
1277
|
-
import { z } from "zod";
|
|
1310
|
+
import { z as z2 } from "zod";
|
|
1278
1311
|
|
|
1279
1312
|
// src/mcp/smart-crush.ts
|
|
1280
1313
|
var MUST_KEEP_TEXT_RE = /\b(error|exception|failed|failure|fatal|critical|panic|traceback|npm err|assert)\b/i;
|
|
@@ -1519,7 +1552,7 @@ function crushMarkdown(text6, opts) {
|
|
|
1519
1552
|
|
|
1520
1553
|
// src/mcp/issue-payload.ts
|
|
1521
1554
|
var MCP_ISSUE_INCLUDE_VALUES = ["default", "full"];
|
|
1522
|
-
var mcpIssueIncludeSchema =
|
|
1555
|
+
var mcpIssueIncludeSchema = z2.enum(MCP_ISSUE_INCLUDE_VALUES).optional().describe(
|
|
1523
1556
|
"default applies SmartCrusher-style crush (dedup + budget; small unique tickets pass through). full returns the uncompressed vendor payload. Re-call with include=full if crush.truncated."
|
|
1524
1557
|
);
|
|
1525
1558
|
var MCP_ISSUE_CRUSH_HINT = "Pass include=full to re-fetch the uncompressed ticket from the vendor.";
|
|
@@ -1665,7 +1698,7 @@ function registerAbleTimeTools(server) {
|
|
|
1665
1698
|
server.tool(
|
|
1666
1699
|
"abletime_list_tasks",
|
|
1667
1700
|
"List open AbleTime tasks (excludes done/archived). Optional projectId filter. Pass updatedSince for tasks updated since then and any comments on that page.",
|
|
1668
|
-
{ projectId:
|
|
1701
|
+
{ projectId: z3.string().optional(), updatedSince: mcpIssueUpdatedSinceSchema },
|
|
1669
1702
|
async ({ projectId, updatedSince }) => {
|
|
1670
1703
|
try {
|
|
1671
1704
|
const tasks = await listAbleTimeTasks({ projectId });
|
|
@@ -1678,7 +1711,7 @@ function registerAbleTimeTools(server) {
|
|
|
1678
1711
|
server.tool(
|
|
1679
1712
|
"abletime_search_tasks",
|
|
1680
1713
|
"Search AbleTime tasks by text, reference, or tag. Pass updatedSince for tasks updated since then and any comments on that page.",
|
|
1681
|
-
{ query:
|
|
1714
|
+
{ query: z3.string(), updatedSince: mcpIssueUpdatedSinceSchema },
|
|
1682
1715
|
async ({ query, updatedSince }) => {
|
|
1683
1716
|
try {
|
|
1684
1717
|
const tasks = await searchAbleTimeTasks(query);
|
|
@@ -1691,7 +1724,7 @@ function registerAbleTimeTools(server) {
|
|
|
1691
1724
|
server.tool(
|
|
1692
1725
|
"abletime_get_task",
|
|
1693
1726
|
"Get one AbleTime task by id or reference (e.g. CRM-232): description, state, project, comments, attachments. Re-fetch to read new comments. Default crushes redundant comments and huge pasted bodies (SmartCrusher-style; small unique tickets pass through). Pass include=full for the uncompressed vendor payload. To save a file, call abletime_download_attachment with the attachment id or url (writes `.context/attachments/`; do not dump bytes into the tool result).",
|
|
1694
|
-
{ id:
|
|
1727
|
+
{ id: z3.string(), include: mcpIssueIncludeSchema },
|
|
1695
1728
|
async ({ id, include }) => {
|
|
1696
1729
|
try {
|
|
1697
1730
|
return text(formatAbleTimeTaskPayload(await getAbleTimeTask(id), include));
|
|
@@ -1704,9 +1737,9 @@ function registerAbleTimeTools(server) {
|
|
|
1704
1737
|
"abletime_download_attachment",
|
|
1705
1738
|
"Download an AbleTime task file into `.context/attachments/` using Account AbleTime auth. Pass the attachment id or URL from abletime_get_task. Returns the worktree-relative path \u2014 Read that file; do not dump bytes into chat.",
|
|
1706
1739
|
{
|
|
1707
|
-
id:
|
|
1708
|
-
name:
|
|
1709
|
-
repoPath:
|
|
1740
|
+
id: z3.string().describe("Attachment id or URL from abletime_get_task."),
|
|
1741
|
+
name: z3.string().optional().describe("Optional filename override."),
|
|
1742
|
+
repoPath: z3.string().optional().describe("Workspace / worktree path. Omit on a worktree turn (uses cwd).")
|
|
1710
1743
|
},
|
|
1711
1744
|
async ({ id, name, repoPath }) => {
|
|
1712
1745
|
try {
|
|
@@ -1719,7 +1752,7 @@ function registerAbleTimeTools(server) {
|
|
|
1719
1752
|
server.tool(
|
|
1720
1753
|
"abletime_comment",
|
|
1721
1754
|
"Add a markdown comment on an AbleTime task (id or CRM-232). When reviewing a PR or ticket, show the draft in chat and wait until they type a next step \u2014 do not ask_user after the review. The author sees this immediately.",
|
|
1722
|
-
{ id:
|
|
1755
|
+
{ id: z3.string(), body: z3.string() },
|
|
1723
1756
|
async (args) => {
|
|
1724
1757
|
try {
|
|
1725
1758
|
return text(await commentAbleTimeTask(args));
|
|
@@ -1728,23 +1761,23 @@ function registerAbleTimeTools(server) {
|
|
|
1728
1761
|
}
|
|
1729
1762
|
}
|
|
1730
1763
|
);
|
|
1731
|
-
const relationInputSchema =
|
|
1732
|
-
type:
|
|
1733
|
-
issue:
|
|
1764
|
+
const relationInputSchema = z3.object({
|
|
1765
|
+
type: z3.string().describe("blockedBy (this waits on issue) or blocks (issue waits on this)."),
|
|
1766
|
+
issue: z3.string().describe("Related task id or reference (CRM-232).")
|
|
1734
1767
|
});
|
|
1735
1768
|
server.tool(
|
|
1736
1769
|
"abletime_update_task",
|
|
1737
1770
|
'Update an AbleTime task (id or CRM-232). Pass title, description, state, labels, project, parent, and/or relations. labels replaces tags. project is name or id (tasks stay in a project). parent is CRM-232 or "none". relations sets the wait-on dependency (blockedBy/blocks); removeRelations clears it. When reviewing a PR or ticket, wait until they type a next step before changing the task \u2014 do not ask_user after the review. The author is notified.',
|
|
1738
1771
|
{
|
|
1739
|
-
id:
|
|
1740
|
-
title:
|
|
1741
|
-
description:
|
|
1742
|
-
state:
|
|
1743
|
-
labels:
|
|
1744
|
-
project:
|
|
1745
|
-
parent:
|
|
1746
|
-
relations:
|
|
1747
|
-
removeRelations:
|
|
1772
|
+
id: z3.string(),
|
|
1773
|
+
title: z3.string().optional(),
|
|
1774
|
+
description: z3.string().optional(),
|
|
1775
|
+
state: z3.string().optional(),
|
|
1776
|
+
labels: z3.array(z3.string()).optional().describe("Replace tags/labels. Empty array clears when the host accepts it."),
|
|
1777
|
+
project: z3.string().nullable().optional().describe("Project name or id. AbleTime tasks stay in a project."),
|
|
1778
|
+
parent: z3.string().nullable().optional().describe('Parent task id or reference (CRM-232), or "none" to unset.'),
|
|
1779
|
+
relations: z3.array(relationInputSchema).optional().describe("Set a wait-on dependency: blockedBy or blocks."),
|
|
1780
|
+
removeRelations: z3.array(relationInputSchema).optional().describe("Clear a wait-on dependency.")
|
|
1748
1781
|
},
|
|
1749
1782
|
async (args) => {
|
|
1750
1783
|
try {
|
|
@@ -1763,12 +1796,12 @@ function registerAbleTimeTools(server) {
|
|
|
1763
1796
|
"abletime_create_task",
|
|
1764
1797
|
"Create an AbleTime task in a project. Call abletime_list_projects if you do not have a project id. Pass parent (CRM-232) for a spin-off. New tasks start in todo (or backlog).",
|
|
1765
1798
|
{
|
|
1766
|
-
title:
|
|
1767
|
-
description:
|
|
1768
|
-
projectId:
|
|
1769
|
-
categoryId:
|
|
1770
|
-
state:
|
|
1771
|
-
parent:
|
|
1799
|
+
title: z3.string(),
|
|
1800
|
+
description: z3.string().optional(),
|
|
1801
|
+
projectId: z3.string().optional(),
|
|
1802
|
+
categoryId: z3.string().optional(),
|
|
1803
|
+
state: z3.enum(["backlog", "todo"]).optional(),
|
|
1804
|
+
parent: z3.string().optional().describe("Parent task id or reference (CRM-232) for a spin-off.")
|
|
1772
1805
|
},
|
|
1773
1806
|
async (args) => {
|
|
1774
1807
|
try {
|
|
@@ -1782,10 +1815,10 @@ function registerAbleTimeTools(server) {
|
|
|
1782
1815
|
"abletime_ensure_task",
|
|
1783
1816
|
"Find or create an AbleTime task for this work, then create_workspace with sourceType=ticket.",
|
|
1784
1817
|
{
|
|
1785
|
-
title:
|
|
1786
|
-
description:
|
|
1787
|
-
projectId:
|
|
1788
|
-
categoryId:
|
|
1818
|
+
title: z3.string(),
|
|
1819
|
+
description: z3.string().optional(),
|
|
1820
|
+
projectId: z3.string().optional(),
|
|
1821
|
+
categoryId: z3.string().optional()
|
|
1789
1822
|
},
|
|
1790
1823
|
async (args) => {
|
|
1791
1824
|
try {
|
|
@@ -1799,7 +1832,7 @@ function registerAbleTimeTools(server) {
|
|
|
1799
1832
|
}
|
|
1800
1833
|
|
|
1801
1834
|
// src/mcp/github-tools.ts
|
|
1802
|
-
import { z as
|
|
1835
|
+
import { z as z4 } from "zod";
|
|
1803
1836
|
function text2(payload, isError = false) {
|
|
1804
1837
|
return mcpJson(payload, isError);
|
|
1805
1838
|
}
|
|
@@ -1813,15 +1846,15 @@ async function cursorIssueBlock(repoPath) {
|
|
|
1813
1846
|
const cwd = await resolveRepoRoot((repoPath ?? "").trim() || process.cwd());
|
|
1814
1847
|
return cursorIssuesUnavailableReason(cwd);
|
|
1815
1848
|
}
|
|
1816
|
-
var repoPathSchema =
|
|
1849
|
+
var repoPathSchema = z4.string().optional().describe("Workspace / worktree path. Omit on a worktree turn (uses cwd).");
|
|
1817
1850
|
function registerGithubIssueTools(server) {
|
|
1818
1851
|
server.tool(
|
|
1819
1852
|
"github_search_issues",
|
|
1820
1853
|
"Search or list open GitHub issues in this repo via Account gh. A Cursor origin returns unavailableReason \u2014 Origin has no issue tracker. An Entire origin does the same \u2014 tickets there are Trails (`entire trail`), not GitHub Issues. Default 40; pass query and/or limit (max 250) when truncated. assignee: me, unassigned, all, or a login. Pass updatedSince for new/updated tickets and new comments (e.g. \u201Cany updates since yesterday?\u201D).",
|
|
1821
1854
|
{
|
|
1822
|
-
query:
|
|
1823
|
-
assignee:
|
|
1824
|
-
limit:
|
|
1855
|
+
query: z4.string().optional().describe("Search text (title, body, identifiers). Omit to list by assignee only."),
|
|
1856
|
+
assignee: z4.string().optional().describe("me, unassigned, all, or a GitHub login. Default: all when query is set, otherwise me."),
|
|
1857
|
+
limit: z4.number().int().positive().max(250).optional().describe("Page size (default 40, max 250). Raise when truncated is true."),
|
|
1825
1858
|
updatedSince: mcpIssueUpdatedSinceSchema,
|
|
1826
1859
|
repoPath: repoPathSchema
|
|
1827
1860
|
},
|
|
@@ -1884,7 +1917,7 @@ function registerGithubIssueTools(server) {
|
|
|
1884
1917
|
server.tool(
|
|
1885
1918
|
"github_get_issue",
|
|
1886
1919
|
"Get a GitHub issue (#123 or URL): body, comments, state, projects, attachments. Re-fetch to read new comments. projectsError means GitHub refused Projects (usually missing read:project \u2014 run `gh auth refresh -s read:project`). Default crushes redundant comments and huge pasted bodies (SmartCrusher-style; small unique tickets pass through). Pass include=full for the uncompressed vendor payload. Uses Account gh. To save a file, call github_download_attachment with the attachment URL (writes `.context/attachments/`; do not dump bytes into the tool result).",
|
|
1887
|
-
{ id:
|
|
1920
|
+
{ id: z4.string(), include: mcpIssueIncludeSchema, repoPath: repoPathSchema },
|
|
1888
1921
|
async ({ id, include, repoPath }) => {
|
|
1889
1922
|
try {
|
|
1890
1923
|
const blocked = await cursorIssueBlock(repoPath);
|
|
@@ -1899,8 +1932,8 @@ function registerGithubIssueTools(server) {
|
|
|
1899
1932
|
"github_download_attachment",
|
|
1900
1933
|
"Download a GitHub issue file (github.com/user-attachments/\u2026 or githubusercontent.com) into `.context/attachments/` using Account gh. Pass the URL from github_get_issue attachments. Returns the worktree-relative path \u2014 Read that file; do not dump bytes into chat.",
|
|
1901
1934
|
{
|
|
1902
|
-
url:
|
|
1903
|
-
name:
|
|
1935
|
+
url: z4.string().describe("Attachment URL from github_get_issue."),
|
|
1936
|
+
name: z4.string().optional().describe("Optional filename override."),
|
|
1904
1937
|
repoPath: repoPathSchema
|
|
1905
1938
|
},
|
|
1906
1939
|
async ({ url, name, repoPath }) => {
|
|
@@ -1914,7 +1947,7 @@ function registerGithubIssueTools(server) {
|
|
|
1914
1947
|
server.tool(
|
|
1915
1948
|
"github_comment",
|
|
1916
1949
|
"Add a markdown comment on a GitHub issue (#123 or URL). Uses Account gh. When reviewing a PR or ticket, show the draft in chat and wait until they type a next step \u2014 do not ask_user after the review. The author sees this immediately.",
|
|
1917
|
-
{ id:
|
|
1950
|
+
{ id: z4.string(), body: z4.string(), repoPath: repoPathSchema },
|
|
1918
1951
|
async ({ id, body, repoPath }) => {
|
|
1919
1952
|
try {
|
|
1920
1953
|
const blocked = await cursorIssueBlock(repoPath);
|
|
@@ -1925,23 +1958,23 @@ function registerGithubIssueTools(server) {
|
|
|
1925
1958
|
}
|
|
1926
1959
|
}
|
|
1927
1960
|
);
|
|
1928
|
-
const relationInputSchema =
|
|
1929
|
-
type:
|
|
1930
|
-
issue:
|
|
1961
|
+
const relationInputSchema = z4.object({
|
|
1962
|
+
type: z4.string().describe("blocks or blockedBy (this issue's view)."),
|
|
1963
|
+
issue: z4.string().describe("Related issue #123 or URL.")
|
|
1931
1964
|
});
|
|
1932
1965
|
server.tool(
|
|
1933
1966
|
"github_update_issue",
|
|
1934
1967
|
'Update a GitHub issue (#123). Pass title, body, state (open|closed), labels, project, parent, and/or relations. labels replaces all names (pass [] to clear). project is a Project title, or "none" to remove. parent is #123 or "none". relations adds blockedBy/blocks; removeRelations drops them (`gh` 2.94+). When reviewing a PR or ticket, wait until they type a next step before changing the issue \u2014 do not ask_user after the review. The author is notified.',
|
|
1935
1968
|
{
|
|
1936
|
-
id:
|
|
1937
|
-
title:
|
|
1938
|
-
body:
|
|
1939
|
-
state:
|
|
1940
|
-
labels:
|
|
1941
|
-
project:
|
|
1942
|
-
parent:
|
|
1943
|
-
relations:
|
|
1944
|
-
removeRelations:
|
|
1969
|
+
id: z4.string(),
|
|
1970
|
+
title: z4.string().optional(),
|
|
1971
|
+
body: z4.string().optional(),
|
|
1972
|
+
state: z4.string().optional().describe("open or closed"),
|
|
1973
|
+
labels: z4.array(z4.string()).optional().describe("Replace all labels. Empty array clears. Call github_get_issue first to keep existing."),
|
|
1974
|
+
project: z4.string().nullable().optional().describe('GitHub Project title, or "none" to remove current projects.'),
|
|
1975
|
+
parent: z4.string().nullable().optional().describe('Parent issue #123 or URL, or "none" to unset.'),
|
|
1976
|
+
relations: z4.array(relationInputSchema).optional().describe("Add blockedBy or blocks relations (issue #123 or URL)."),
|
|
1977
|
+
removeRelations: z4.array(relationInputSchema).optional().describe("Remove blockedBy or blocks relations."),
|
|
1945
1978
|
repoPath: repoPathSchema
|
|
1946
1979
|
},
|
|
1947
1980
|
async (args) => {
|
|
@@ -1958,9 +1991,9 @@ function registerGithubIssueTools(server) {
|
|
|
1958
1991
|
"github_create_issue",
|
|
1959
1992
|
"Create a GitHub issue. Pass parent (#123) to mark a spin-off in the body.",
|
|
1960
1993
|
{
|
|
1961
|
-
title:
|
|
1962
|
-
body:
|
|
1963
|
-
parent:
|
|
1994
|
+
title: z4.string(),
|
|
1995
|
+
body: z4.string().optional(),
|
|
1996
|
+
parent: z4.string().optional().describe("Parent issue #123 or URL for a spin-off."),
|
|
1964
1997
|
repoPath: repoPathSchema
|
|
1965
1998
|
},
|
|
1966
1999
|
async (args) => {
|
|
@@ -1976,7 +2009,7 @@ function registerGithubIssueTools(server) {
|
|
|
1976
2009
|
}
|
|
1977
2010
|
|
|
1978
2011
|
// src/mcp/linear-tools.ts
|
|
1979
|
-
import { z as
|
|
2012
|
+
import { z as z5 } from "zod";
|
|
1980
2013
|
function text3(payload, isError = false) {
|
|
1981
2014
|
return mcpJson(payload, isError);
|
|
1982
2015
|
}
|
|
@@ -1986,7 +2019,7 @@ function fail3(err) {
|
|
|
1986
2019
|
true
|
|
1987
2020
|
);
|
|
1988
2021
|
}
|
|
1989
|
-
var prioritySchema =
|
|
2022
|
+
var prioritySchema = z5.number().int().min(0).max(4).optional().describe("0 none, 1 urgent, 2 high, 3 medium, 4 low");
|
|
1990
2023
|
function registerLinearTools(server) {
|
|
1991
2024
|
server.tool(
|
|
1992
2025
|
"linear_list_teams",
|
|
@@ -2016,9 +2049,9 @@ function registerLinearTools(server) {
|
|
|
2016
2049
|
"linear_search_issues",
|
|
2017
2050
|
"Search or list open Linear issues. Default 40; pass query and/or limit (max 250) when truncated. assignee: me, unassigned, all (default with query), or a user id/name. Pass updatedSince for new/updated tickets and new comments (e.g. \u201Cany updates since yesterday?\u201D).",
|
|
2018
2051
|
{
|
|
2019
|
-
query:
|
|
2020
|
-
assignee:
|
|
2021
|
-
limit:
|
|
2052
|
+
query: z5.string().optional().describe("Search text (identifier, title, description). Omit to list by assignee only."),
|
|
2053
|
+
assignee: z5.string().optional().describe("me, unassigned, all, a Linear user id, or a display name. Default: all when query is set, otherwise me."),
|
|
2054
|
+
limit: z5.number().int().positive().max(250).optional().describe("Page size (default 40, max 250). Raise when truncated is true."),
|
|
2022
2055
|
updatedSince: mcpIssueUpdatedSinceSchema
|
|
2023
2056
|
},
|
|
2024
2057
|
async ({ query, assignee, limit, updatedSince }) => {
|
|
@@ -2058,7 +2091,7 @@ function registerLinearTools(server) {
|
|
|
2058
2091
|
server.tool(
|
|
2059
2092
|
"linear_get_issue",
|
|
2060
2093
|
"Get a Linear issue by uuid or identifier (ENG-123): description, comments, relations, parent/children, project, attachments. Default crushes redundant comments and huge pasted bodies (SmartCrusher-style; small unique tickets pass through). Pass include=full for the uncompressed vendor payload. To save a file, call linear_download_attachment with the attachment id or url (writes `.context/attachments/`; do not dump bytes into the tool result).",
|
|
2061
|
-
{ id:
|
|
2094
|
+
{ id: z5.string(), include: mcpIssueIncludeSchema },
|
|
2062
2095
|
async ({ id, include }) => {
|
|
2063
2096
|
try {
|
|
2064
2097
|
return text3(formatLinearIssuePayload(await getLinearIssue(id), include));
|
|
@@ -2071,9 +2104,9 @@ function registerLinearTools(server) {
|
|
|
2071
2104
|
"linear_download_attachment",
|
|
2072
2105
|
"Download a Linear file attachment into `.context/attachments/` using Account Linear auth. Pass the attachment uuid or uploads.linear.app URL from linear_get_issue. Returns the worktree-relative path \u2014 Read that file; do not dump bytes into chat.",
|
|
2073
2106
|
{
|
|
2074
|
-
id:
|
|
2075
|
-
name:
|
|
2076
|
-
repoPath:
|
|
2107
|
+
id: z5.string().describe("Attachment uuid or upload URL from linear_get_issue."),
|
|
2108
|
+
name: z5.string().optional().describe("Optional filename override."),
|
|
2109
|
+
repoPath: z5.string().optional().describe("Workspace / worktree path. Omit on a worktree turn (uses cwd).")
|
|
2077
2110
|
},
|
|
2078
2111
|
async ({ id, name, repoPath }) => {
|
|
2079
2112
|
try {
|
|
@@ -2087,13 +2120,13 @@ function registerLinearTools(server) {
|
|
|
2087
2120
|
"linear_create_issue",
|
|
2088
2121
|
'Create a Linear issue. Call linear_list_teams first. team is id/key/name; state is name/type/id; assignee is "me" or a user id. Pass parent (ENG-123 or uuid) to nest a spin-off under the current ticket.',
|
|
2089
2122
|
{
|
|
2090
|
-
team:
|
|
2091
|
-
title:
|
|
2092
|
-
description:
|
|
2093
|
-
state:
|
|
2094
|
-
assignee:
|
|
2123
|
+
team: z5.string(),
|
|
2124
|
+
title: z5.string(),
|
|
2125
|
+
description: z5.string().optional(),
|
|
2126
|
+
state: z5.string().optional(),
|
|
2127
|
+
assignee: z5.string().nullable().optional(),
|
|
2095
2128
|
priority: prioritySchema,
|
|
2096
|
-
parent:
|
|
2129
|
+
parent: z5.string().optional().describe("Parent issue uuid or identifier (ENG-123) for a spin-off / sub-issue.")
|
|
2097
2130
|
},
|
|
2098
2131
|
async (args) => {
|
|
2099
2132
|
try {
|
|
@@ -2103,26 +2136,26 @@ function registerLinearTools(server) {
|
|
|
2103
2136
|
}
|
|
2104
2137
|
}
|
|
2105
2138
|
);
|
|
2106
|
-
const relationInputSchema =
|
|
2107
|
-
type:
|
|
2108
|
-
issue:
|
|
2139
|
+
const relationInputSchema = z5.object({
|
|
2140
|
+
type: z5.string().describe("blocks, blockedBy, related, duplicate, or duplicateOf (this issue's view)."),
|
|
2141
|
+
issue: z5.string().describe("Related issue uuid or identifier (ENG-123).")
|
|
2109
2142
|
});
|
|
2110
2143
|
server.tool(
|
|
2111
2144
|
"linear_update_issue",
|
|
2112
2145
|
'Update a Linear issue (uuid or ENG-123). Pass title, description, state, assignee, priority, cycle, labels, project, parent, and/or relations. Cycle/project/parent: name or id, or "none" to clear. labels replaces all names (pass [] to clear; get the issue first to keep existing). relations adds; removeRelations removes by type + issue. When reviewing a PR or ticket, wait until they type a next step before changing the ticket \u2014 do not ask_user after the review. The author is notified.',
|
|
2113
2146
|
{
|
|
2114
|
-
id:
|
|
2115
|
-
title:
|
|
2116
|
-
description:
|
|
2117
|
-
state:
|
|
2118
|
-
assignee:
|
|
2147
|
+
id: z5.string(),
|
|
2148
|
+
title: z5.string().optional(),
|
|
2149
|
+
description: z5.string().optional(),
|
|
2150
|
+
state: z5.string().optional(),
|
|
2151
|
+
assignee: z5.string().nullable().optional(),
|
|
2119
2152
|
priority: prioritySchema,
|
|
2120
|
-
cycle:
|
|
2121
|
-
labels:
|
|
2122
|
-
project:
|
|
2123
|
-
parent:
|
|
2124
|
-
relations:
|
|
2125
|
-
removeRelations:
|
|
2153
|
+
cycle: z5.string().nullable().optional().describe('Cycle name, number, "current"/"active", or "none" to unschedule.'),
|
|
2154
|
+
labels: z5.array(z5.string()).optional().describe("Replace all labels (names or ids). Empty array clears. Call linear_get_issue first to keep existing."),
|
|
2155
|
+
project: z5.string().nullable().optional().describe('Project name, id, slug, or "none" to unassign.'),
|
|
2156
|
+
parent: z5.string().nullable().optional().describe('Parent issue uuid or identifier (ENG-123), or "none" to unset.'),
|
|
2157
|
+
relations: z5.array(relationInputSchema).optional().describe("Add relations from this issue's view (blocks, blockedBy, related, duplicate, duplicateOf)."),
|
|
2158
|
+
removeRelations: z5.array(relationInputSchema).optional().describe("Remove relations by type + related issue (uuid or ENG-123).")
|
|
2126
2159
|
},
|
|
2127
2160
|
async (args) => {
|
|
2128
2161
|
try {
|
|
@@ -2136,8 +2169,8 @@ function registerLinearTools(server) {
|
|
|
2136
2169
|
"linear_comment",
|
|
2137
2170
|
"Add a markdown comment on a Linear issue (uuid or ENG-123). When reviewing a PR or ticket, show the draft in chat and wait until they type a next step \u2014 do not ask_user after the review. The author sees this immediately.",
|
|
2138
2171
|
{
|
|
2139
|
-
id:
|
|
2140
|
-
body:
|
|
2172
|
+
id: z5.string(),
|
|
2173
|
+
body: z5.string()
|
|
2141
2174
|
},
|
|
2142
2175
|
async (args) => {
|
|
2143
2176
|
try {
|
|
@@ -2157,7 +2190,7 @@ function registerConnectedIssueVendorTools(server, settings = loadAppSettings())
|
|
|
2157
2190
|
}
|
|
2158
2191
|
|
|
2159
2192
|
// src/mcp/posthog-tools.ts
|
|
2160
|
-
import { z as
|
|
2193
|
+
import { z as z6 } from "zod";
|
|
2161
2194
|
|
|
2162
2195
|
// src/integrations/posthog-oauth.ts
|
|
2163
2196
|
import { createHash, randomBytes } from "crypto";
|
|
@@ -2368,13 +2401,13 @@ function registerPosthogTools(server) {
|
|
|
2368
2401
|
"posthog_api",
|
|
2369
2402
|
POSTHOG_API_DESCRIPTION,
|
|
2370
2403
|
{
|
|
2371
|
-
method:
|
|
2404
|
+
method: z6.enum(POSTHOG_METHODS).describe(
|
|
2372
2405
|
"GET, POST /api/projects|environments/:id/query/ for a read, or POST/PATCH when the user asked for a change"
|
|
2373
2406
|
),
|
|
2374
|
-
path:
|
|
2375
|
-
query:
|
|
2376
|
-
body:
|
|
2377
|
-
write:
|
|
2407
|
+
path: z6.string().describe("PostHog path starting with /api/, not a full URL"),
|
|
2408
|
+
query: z6.record(z6.string(), z6.string()).optional().describe("Query string parameters"),
|
|
2409
|
+
body: z6.unknown().optional().describe("JSON body for POST or PATCH"),
|
|
2410
|
+
write: z6.boolean().optional().describe(
|
|
2378
2411
|
"Required true for POST and PATCH that change data. Omit for GET and for POST .../query/."
|
|
2379
2412
|
)
|
|
2380
2413
|
},
|
|
@@ -2417,7 +2450,7 @@ function formatMcpPrList(input) {
|
|
|
2417
2450
|
}
|
|
2418
2451
|
|
|
2419
2452
|
// src/mcp/archive-tools.ts
|
|
2420
|
-
import { z as
|
|
2453
|
+
import { z as z7 } from "zod";
|
|
2421
2454
|
|
|
2422
2455
|
// src/mcp/archive-guard.ts
|
|
2423
2456
|
function mcpArchiveBlockedReason(thread) {
|
|
@@ -2433,9 +2466,9 @@ function registerArchiveTools(server, orch) {
|
|
|
2433
2466
|
"list_archive",
|
|
2434
2467
|
"Browse Settings \u2192 History (archived workspaces and agents), newest first. A workspace row is a checkout with no live agents \u2014 it is off Home and list_board. Nested lines are that workspace's agents; any of those ids restores the whole checkout. An agent row is an orchestration chat, or one agent archived while its workspace stayed live (workspace-live). kind=agent lists every archived agent, including agents on an archived workspace (workspace-archived). query matches title, branch, repo, agent, ticket, or PR. limit default 40, max 250. Then restore_workspace (whole checkout) or restore_chat (one agent).",
|
|
2435
2468
|
{
|
|
2436
|
-
query:
|
|
2437
|
-
kind:
|
|
2438
|
-
limit:
|
|
2469
|
+
query: z7.string().optional().describe("Title, branch, repo, agent, ticket, or PR"),
|
|
2470
|
+
kind: z7.enum(["all", "workspace", "agent"]).optional().describe("all (default), workspace, or agent"),
|
|
2471
|
+
limit: z7.number().int().positive().max(250).optional().describe("Page size (default 40, max 250)")
|
|
2439
2472
|
},
|
|
2440
2473
|
async ({ query, kind, limit }) => {
|
|
2441
2474
|
const view = listFleetArchive(orch.getThreads(true), { query, kind, limit });
|
|
@@ -2445,7 +2478,7 @@ function registerArchiveTools(server, orch) {
|
|
|
2445
2478
|
server.tool(
|
|
2446
2479
|
"archive_workspace",
|
|
2447
2480
|
"Archive a workspace: every live agent on that checkout, then remove the worktree when the last agent archives (cowboy keeps the project folder). The Home card moves to Settings \u2192 History. Pass any chat id on the workspace. Orchestration chats are agents \u2014 use archive_chat. To archive one agent and leave the checkout up, use archive_chat.",
|
|
2448
|
-
{ ref:
|
|
2481
|
+
{ ref: z7.string().describe("Any chat id on the workspace") },
|
|
2449
2482
|
async ({ ref }) => {
|
|
2450
2483
|
const thread = orch.getThread(ref);
|
|
2451
2484
|
if (!thread) {
|
|
@@ -2478,7 +2511,7 @@ function registerArchiveTools(server, orch) {
|
|
|
2478
2511
|
server.tool(
|
|
2479
2512
|
"archive_chat",
|
|
2480
2513
|
"Archive one agent chat: stop the turn and move that chat to Settings \u2192 History. Other agents on the workspace stay, and the worktree is removed only when this is the last agent. Uncommitted and untracked files are saved on a hidden git ref and put back uncommitted if that checkout is restored. If that snapshot fails, the checkout stays. History Delete does not keep the snapshot. Orchestration chats archive without removing a project checkout. Refuses the cloud coordinator. To archive every agent on a checkout, use archive_workspace. Commit, push, and open PRs via ask_git before archiving when the work should be kept. Merge only when the user explicitly asked.",
|
|
2481
|
-
{ ref:
|
|
2514
|
+
{ ref: z7.string().describe("Chat id to archive") },
|
|
2482
2515
|
async ({ ref }) => {
|
|
2483
2516
|
const t = orch.getThread(ref);
|
|
2484
2517
|
if (!t) {
|
|
@@ -2504,7 +2537,7 @@ function registerArchiveTools(server, orch) {
|
|
|
2504
2537
|
server.tool(
|
|
2505
2538
|
"restore_workspace",
|
|
2506
2539
|
"Restore a workspace from Settings \u2192 History: recreate the worktree if it was removed and bring every archived agent on that checkout back. Pass any chat id from list_archive. If some agents are still live, only the archived ones return to that checkout. One agent only: restore_chat. Orchestration agents: restore_chat.",
|
|
2507
|
-
{ ref:
|
|
2540
|
+
{ ref: z7.string().describe("Any chat id from list_archive on that workspace") },
|
|
2508
2541
|
async ({ ref }) => {
|
|
2509
2542
|
try {
|
|
2510
2543
|
const restored = await orch.restoreWorkspace(ref);
|
|
@@ -2528,7 +2561,7 @@ function registerArchiveTools(server, orch) {
|
|
|
2528
2561
|
server.tool(
|
|
2529
2562
|
"restore_chat",
|
|
2530
2563
|
"Restore one archived agent from list_archive. Recreates the worktree when that checkout was fully archived and the folder is gone. Other archived agents on the checkout stay in History until restore_workspace or another restore_chat. Orchestration agents come back as Global chats.",
|
|
2531
|
-
{ ref:
|
|
2564
|
+
{ ref: z7.string().describe("Archived chat id from list_archive") },
|
|
2532
2565
|
async ({ ref }) => {
|
|
2533
2566
|
try {
|
|
2534
2567
|
const restored = await orch.restore(ref);
|
|
@@ -2546,7 +2579,7 @@ function registerArchiveTools(server, orch) {
|
|
|
2546
2579
|
}
|
|
2547
2580
|
|
|
2548
2581
|
// src/mcp/schedule-tools.ts
|
|
2549
|
-
import { z as
|
|
2582
|
+
import { z as z8 } from "zod";
|
|
2550
2583
|
function text4(payload, isError = false) {
|
|
2551
2584
|
return mcpJson(payload, isError);
|
|
2552
2585
|
}
|
|
@@ -2647,23 +2680,23 @@ function registerScheduleTools(server) {
|
|
|
2647
2680
|
"create_schedule",
|
|
2648
2681
|
"Create a local automation that, when due, sends a prompt to an existing chat (chatId) or starts a new Global orchestration chat (omit chatId). Pass chatId=self to continue this chat. A job bound to a chat is removed when that chat is archived or gone; it does not start a new Global chat. Omit chatId only for a Global automation that should outlive this chat. Exactly one of at (ISO datetime), every (15m/1h/6h/1d), time (HH:mm, with days such as weekdays or mon,wed), or cron (5-field). Recurring jobs without chatId open a new Global chat each run and archive it when that run finishes unless archiveChat is false (leave the chat open to keep talking, for example a morning start-my-day run). History keeps the last 5 archived chats for that automation, and the schedule keeps the last 10 runs. To schedule a prompt from this chat, call this tool with that prompt (omit chatId for a new Global chat, or chatId=self). Creating or enabling a future job turns on Settings \u2192 Advanced \u2192 Caffeinate while automations are enabled so the Mac stays awake until due. Sideboard.app must be running for the job to fire.",
|
|
2649
2682
|
{
|
|
2650
|
-
prompt:
|
|
2651
|
-
name:
|
|
2652
|
-
at:
|
|
2653
|
-
every:
|
|
2654
|
-
time:
|
|
2655
|
-
days:
|
|
2656
|
-
cron:
|
|
2657
|
-
tz:
|
|
2658
|
-
archiveChat:
|
|
2683
|
+
prompt: z8.string().describe("User message / goal queued when the automation fires"),
|
|
2684
|
+
name: z8.string().optional(),
|
|
2685
|
+
at: z8.string().optional().describe("ISO datetime for a one-shot"),
|
|
2686
|
+
every: z8.string().optional().describe("Interval such as 15m, 1h, 6h, 1d"),
|
|
2687
|
+
time: z8.string().optional().describe("HH:mm (24-hour) clock time. Omit days for every day."),
|
|
2688
|
+
days: z8.string().optional().describe("daily, weekdays, weekends, or days such as mon,wed,fri or mon-fri. Use with time."),
|
|
2689
|
+
cron: z8.string().optional().describe("5-field cron expression"),
|
|
2690
|
+
tz: z8.string().optional().describe("IANA timezone for cron or time (default: system)"),
|
|
2691
|
+
archiveChat: z8.boolean().optional().describe(
|
|
2659
2692
|
"Archive a new Global chat when the run finishes. Default true. Pass false to leave the chat open."
|
|
2660
2693
|
),
|
|
2661
|
-
chatId:
|
|
2694
|
+
chatId: z8.string().optional().describe(
|
|
2662
2695
|
'Existing chat id, or "self" for this chat. That job is removed when the chat is archived. Omit only for a Global automation that should outlive this chat.'
|
|
2663
2696
|
),
|
|
2664
|
-
threadId:
|
|
2665
|
-
agent:
|
|
2666
|
-
model:
|
|
2697
|
+
threadId: z8.string().optional().describe("Legacy alias for chatId."),
|
|
2698
|
+
agent: z8.enum(["claude", "cursor", "codex", "opencode"]).optional().describe("Agent for a new Global chat (omit for Account default)"),
|
|
2699
|
+
model: z8.string().optional()
|
|
2667
2700
|
},
|
|
2668
2701
|
async (args) => {
|
|
2669
2702
|
try {
|
|
@@ -2700,23 +2733,23 @@ function registerScheduleTools(server) {
|
|
|
2700
2733
|
"update_schedule",
|
|
2701
2734
|
"Update a local automation (prompt, cadence, target chat, archiveChat, enabled). Pass id from list_schedules.",
|
|
2702
2735
|
{
|
|
2703
|
-
id:
|
|
2704
|
-
prompt:
|
|
2705
|
-
name:
|
|
2706
|
-
at:
|
|
2707
|
-
every:
|
|
2708
|
-
time:
|
|
2709
|
-
days:
|
|
2710
|
-
cron:
|
|
2711
|
-
tz:
|
|
2712
|
-
archiveChat:
|
|
2713
|
-
chatId:
|
|
2736
|
+
id: z8.string(),
|
|
2737
|
+
prompt: z8.string().optional(),
|
|
2738
|
+
name: z8.string().optional(),
|
|
2739
|
+
at: z8.string().optional(),
|
|
2740
|
+
every: z8.string().optional(),
|
|
2741
|
+
time: z8.string().optional().describe("HH:mm clock time. Use with days, or alone to change the time of a weekly job."),
|
|
2742
|
+
days: z8.string().optional().describe("daily, weekdays, weekends, or mon,wed,fri. Use with time, or alone on an existing weekly job."),
|
|
2743
|
+
cron: z8.string().optional(),
|
|
2744
|
+
tz: z8.string().optional(),
|
|
2745
|
+
archiveChat: z8.boolean().optional().describe("Archive a new Global chat when the run finishes. False leaves it open."),
|
|
2746
|
+
chatId: z8.string().optional().describe(
|
|
2714
2747
|
'Existing chat, "self", or empty string for a Global chat each run. A bound job is removed when that chat is archived.'
|
|
2715
2748
|
),
|
|
2716
|
-
threadId:
|
|
2717
|
-
agent:
|
|
2718
|
-
model:
|
|
2719
|
-
enabled:
|
|
2749
|
+
threadId: z8.string().optional().describe("Legacy alias for chatId."),
|
|
2750
|
+
agent: z8.enum(["claude", "cursor", "codex", "opencode"]).optional(),
|
|
2751
|
+
model: z8.string().optional(),
|
|
2752
|
+
enabled: z8.boolean().optional()
|
|
2720
2753
|
},
|
|
2721
2754
|
async (args) => {
|
|
2722
2755
|
try {
|
|
@@ -2752,7 +2785,7 @@ function registerScheduleTools(server) {
|
|
|
2752
2785
|
server.tool(
|
|
2753
2786
|
"delete_schedule",
|
|
2754
2787
|
"Delete a local automation. Pass id from list_schedules.",
|
|
2755
|
-
{ id:
|
|
2788
|
+
{ id: z8.string() },
|
|
2756
2789
|
async ({ id }) => {
|
|
2757
2790
|
try {
|
|
2758
2791
|
deleteSchedule(id);
|
|
@@ -2765,7 +2798,7 @@ function registerScheduleTools(server) {
|
|
|
2765
2798
|
server.tool(
|
|
2766
2799
|
"run_schedule",
|
|
2767
2800
|
"Fire an automation now (does not wait for nextRunAt). Queues the prompt on the target chat or starts a new Global chat. If Sideboard.app is running, the desktop drains the turn.",
|
|
2768
|
-
{ id:
|
|
2801
|
+
{ id: z8.string() },
|
|
2769
2802
|
async ({ id }) => {
|
|
2770
2803
|
try {
|
|
2771
2804
|
if (!getSchedule(id)) {
|
|
@@ -2781,7 +2814,7 @@ function registerScheduleTools(server) {
|
|
|
2781
2814
|
}
|
|
2782
2815
|
|
|
2783
2816
|
// src/mcp/follow-up-tools.ts
|
|
2784
|
-
import { z as
|
|
2817
|
+
import { z as z9 } from "zod";
|
|
2785
2818
|
function text5(payload, isError = false) {
|
|
2786
2819
|
return mcpJson(payload, isError);
|
|
2787
2820
|
}
|
|
@@ -2815,10 +2848,10 @@ function registerFollowUpTools(server) {
|
|
|
2815
2848
|
"create_follow_up",
|
|
2816
2849
|
"Register a follow-up on THIS chat. kind=ci sends the prompt when GitHub checks on this chat\u2019s PR finish (pass or fail). Checks that are already finished do not send until a later run finishes. A failed checks read does not count as finished or in progress. A CI follow-up that is still pending at deadline (default 7 days) ends silently. kind=at sends at `30m`, `2h`, `1d`, or an ISO time and waits behind a turn that is already running. Cap 10.",
|
|
2817
2850
|
{
|
|
2818
|
-
kind:
|
|
2819
|
-
prompt:
|
|
2820
|
-
at:
|
|
2821
|
-
deadline:
|
|
2851
|
+
kind: z9.enum(["ci", "at"]),
|
|
2852
|
+
prompt: z9.string(),
|
|
2853
|
+
at: z9.string().optional(),
|
|
2854
|
+
deadline: z9.string().optional()
|
|
2822
2855
|
},
|
|
2823
2856
|
async ({ kind, prompt, at, deadline }) => {
|
|
2824
2857
|
const thread = callerThread();
|
|
@@ -2839,7 +2872,7 @@ function registerFollowUpTools(server) {
|
|
|
2839
2872
|
server.tool(
|
|
2840
2873
|
"delete_follow_up",
|
|
2841
2874
|
"Remove one follow-up from this chat by id.",
|
|
2842
|
-
{ id:
|
|
2875
|
+
{ id: z9.string() },
|
|
2843
2876
|
async ({ id }) => {
|
|
2844
2877
|
const thread = callerThread();
|
|
2845
2878
|
if (!thread) return text5({ error: "This chat id is missing" }, true);
|
|
@@ -2853,7 +2886,7 @@ function registerFollowUpTools(server) {
|
|
|
2853
2886
|
}
|
|
2854
2887
|
|
|
2855
2888
|
// src/mcp/order-tools.ts
|
|
2856
|
-
import { z as
|
|
2889
|
+
import { z as z10 } from "zod";
|
|
2857
2890
|
|
|
2858
2891
|
// src/order/order.ts
|
|
2859
2892
|
import { randomUUID } from "crypto";
|
|
@@ -3191,6 +3224,53 @@ function buildWaterfall(rows) {
|
|
|
3191
3224
|
)
|
|
3192
3225
|
})).sort((a, b) => (a.nodes[0]?.label ?? "").localeCompare(b.nodes[0]?.label ?? ""));
|
|
3193
3226
|
}
|
|
3227
|
+
function joinCapped(lines, max = 3) {
|
|
3228
|
+
if (lines.length <= max) return lines.join(". ");
|
|
3229
|
+
const extra = lines.length - max;
|
|
3230
|
+
return `${lines.slice(0, max).join(". ")}. ${extra} more`;
|
|
3231
|
+
}
|
|
3232
|
+
function planWatchCopy(chains) {
|
|
3233
|
+
const start = [];
|
|
3234
|
+
const waiting = [];
|
|
3235
|
+
const ready = [];
|
|
3236
|
+
for (const chain of chains) {
|
|
3237
|
+
const incoming = chain.nodes.flatMap((node) => node.incoming);
|
|
3238
|
+
for (const node of chain.nodes) {
|
|
3239
|
+
const gating = node.incoming.filter((edge) => !edge.loop);
|
|
3240
|
+
const blocked = gating.filter((edge) => !edge.met);
|
|
3241
|
+
if (blocked.length > 0) {
|
|
3242
|
+
const verb = blocked.some((edge2) => edge2.hold === "start") ? "start" : "merge";
|
|
3243
|
+
const edge = blocked.find((row) => row.hold === verb) ?? blocked[0];
|
|
3244
|
+
waiting.push(
|
|
3245
|
+
`${node.label} can ${verb} once ${edge.fromLabel} is ${gatePhrase(edge.gate)}`
|
|
3246
|
+
);
|
|
3247
|
+
if (verb === "merge") start.push(`${node.label} can start`);
|
|
3248
|
+
continue;
|
|
3249
|
+
}
|
|
3250
|
+
if (gating.length > 0) {
|
|
3251
|
+
const verb = gating.every((edge) => edge.hold === "merge") ? "merge" : "start";
|
|
3252
|
+
ready.push(`${node.label} can ${verb}`);
|
|
3253
|
+
continue;
|
|
3254
|
+
}
|
|
3255
|
+
const outgoing = incoming.filter((edge) => edge.fromKey === node.key && !edge.loop);
|
|
3256
|
+
if (outgoing.length > 0 && outgoing.every((edge) => edge.met)) continue;
|
|
3257
|
+
start.push(`${node.label} can start`);
|
|
3258
|
+
}
|
|
3259
|
+
}
|
|
3260
|
+
if (start.length === 0 && waiting.length === 0 && ready.length === 0) {
|
|
3261
|
+
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.";
|
|
3262
|
+
}
|
|
3263
|
+
const sentences = [];
|
|
3264
|
+
if (start.length) sentences.push(joinCapped(start));
|
|
3265
|
+
if (ready.length) sentences.push(joinCapped(ready));
|
|
3266
|
+
if (waiting.length) {
|
|
3267
|
+
sentences.push(
|
|
3268
|
+
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`
|
|
3269
|
+
);
|
|
3270
|
+
}
|
|
3271
|
+
const text6 = sentences.join(". ");
|
|
3272
|
+
return text6.endsWith(".") ? text6 : `${text6}.`;
|
|
3273
|
+
}
|
|
3194
3274
|
function gatePhrase(gate) {
|
|
3195
3275
|
return gate === "in-prod" ? "in production" : "in main";
|
|
3196
3276
|
}
|
|
@@ -3266,10 +3346,72 @@ function formatOrderPlace(rows, you) {
|
|
|
3266
3346
|
return lines.join("\n");
|
|
3267
3347
|
}
|
|
3268
3348
|
function executionSlice(rows) {
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3349
|
+
const byKey = /* @__PURE__ */ new Map();
|
|
3350
|
+
const touch = (target, label, depth, asSubject) => {
|
|
3351
|
+
const key = targetKey(target);
|
|
3352
|
+
const found = byKey.get(key);
|
|
3353
|
+
if (!found) {
|
|
3354
|
+
byKey.set(key, {
|
|
3355
|
+
target,
|
|
3356
|
+
label,
|
|
3357
|
+
depth: asSubject ? depth : Number.POSITIVE_INFINITY,
|
|
3358
|
+
asSubject,
|
|
3359
|
+
incoming: [],
|
|
3360
|
+
outgoing: []
|
|
3361
|
+
});
|
|
3362
|
+
return;
|
|
3363
|
+
}
|
|
3364
|
+
if (asSubject || !found.asSubject) found.label = label;
|
|
3365
|
+
if (asSubject) {
|
|
3366
|
+
found.asSubject = true;
|
|
3367
|
+
found.depth = Math.min(found.depth, depth);
|
|
3368
|
+
}
|
|
3272
3369
|
};
|
|
3370
|
+
for (const row of rows) {
|
|
3371
|
+
touch(row.subject, row.subjectLabel, row.depth, true);
|
|
3372
|
+
touch(row.waitsOn, row.waitsOnLabel, row.depth, false);
|
|
3373
|
+
if (row.loop) continue;
|
|
3374
|
+
byKey.get(targetKey(row.subject)).incoming.push(row);
|
|
3375
|
+
byKey.get(targetKey(row.waitsOn)).outgoing.push(row);
|
|
3376
|
+
}
|
|
3377
|
+
const start = [];
|
|
3378
|
+
const waiting = [];
|
|
3379
|
+
const mergeHeld = [];
|
|
3380
|
+
const gateName = (row) => row.gate === "in-prod" ? "in prod" : "in main";
|
|
3381
|
+
const items = [...byKey.values()].sort((a, b) => {
|
|
3382
|
+
const depthA = Number.isFinite(a.depth) ? a.depth : 0;
|
|
3383
|
+
const depthB = Number.isFinite(b.depth) ? b.depth : 0;
|
|
3384
|
+
return depthA - depthB || a.label.localeCompare(b.label);
|
|
3385
|
+
});
|
|
3386
|
+
for (const item of items) {
|
|
3387
|
+
const startBlocked = item.incoming.filter((row) => !row.met && row.hold === "start");
|
|
3388
|
+
const mergeBlocked = item.incoming.filter((row) => !row.met && row.hold === "merge");
|
|
3389
|
+
const settled = item.outgoing.length > 0 && item.outgoing.every((row) => row.met) && startBlocked.length === 0 && mergeBlocked.length === 0;
|
|
3390
|
+
if (startBlocked.length > 0) {
|
|
3391
|
+
const edge = startBlocked[0];
|
|
3392
|
+
waiting.push({
|
|
3393
|
+
target: item.target,
|
|
3394
|
+
label: item.label,
|
|
3395
|
+
detail: `${edge.waitsOnLabel} must be ${gateName(edge)} before this can start`
|
|
3396
|
+
});
|
|
3397
|
+
} else if (!settled) {
|
|
3398
|
+
const pending = item.outgoing.find((row) => !row.met);
|
|
3399
|
+
start.push({
|
|
3400
|
+
target: item.target,
|
|
3401
|
+
label: item.label,
|
|
3402
|
+
detail: pending ? `Start this so it can reach ${pending.gate === "in-prod" ? "production" : "main"}` : "Start this"
|
|
3403
|
+
});
|
|
3404
|
+
}
|
|
3405
|
+
if (mergeBlocked.length > 0 && startBlocked.length === 0) {
|
|
3406
|
+
const edge = mergeBlocked[0];
|
|
3407
|
+
mergeHeld.push({
|
|
3408
|
+
target: item.target,
|
|
3409
|
+
label: item.label,
|
|
3410
|
+
detail: `Do not merge until ${edge.waitsOnLabel} is ${gateName(edge)}`
|
|
3411
|
+
});
|
|
3412
|
+
}
|
|
3413
|
+
}
|
|
3414
|
+
return { start, waiting, mergeHeld };
|
|
3273
3415
|
}
|
|
3274
3416
|
function orderEdgeTouches(edge, you) {
|
|
3275
3417
|
return orderTargetMatches(edge.subject, you) || orderTargetMatches(edge.waitsOn, you);
|
|
@@ -3290,7 +3432,7 @@ function formatOrderText(rows, plan) {
|
|
|
3290
3432
|
rows.forEach((row, index) => {
|
|
3291
3433
|
const gate = row.gate === "in-prod" ? "in prod" : "in main";
|
|
3292
3434
|
const hold = row.hold === "merge" ? "merge" : "start";
|
|
3293
|
-
const state = row.loop ? "loop" : row.met ? "clear" : "waiting";
|
|
3435
|
+
const state = row.loop ? "loop" : row.met ? "clear" : row.hold === "merge" ? "merge" : "waiting";
|
|
3294
3436
|
lines.push(
|
|
3295
3437
|
row.loop ? `${index + 1}. ${state} ${row.subjectLabel} returns to ${row.waitsOnLabel} once it is ${gate}` : `${index + 1}. ${state} ${row.waitsOnLabel} must be ${gate} before ${row.subjectLabel} can ${hold}`
|
|
3296
3438
|
);
|
|
@@ -3298,6 +3440,17 @@ function formatOrderText(rows, plan) {
|
|
|
3298
3440
|
if (row.note) lines.push(` ${row.note}`);
|
|
3299
3441
|
lines.push(` id: ${row.id.slice(0, 8)}`);
|
|
3300
3442
|
});
|
|
3443
|
+
if (plan?.status === "active") {
|
|
3444
|
+
const slice = executionSlice(rows);
|
|
3445
|
+
const section = (title, items) => {
|
|
3446
|
+
if (!items.length) return;
|
|
3447
|
+
lines.push("", title);
|
|
3448
|
+
for (const item of items) lines.push(`- ${item.label}. ${item.detail}`);
|
|
3449
|
+
};
|
|
3450
|
+
section("Start now:", slice.start);
|
|
3451
|
+
section("Do not start:", slice.waiting);
|
|
3452
|
+
section("Do not merge:", slice.mergeHeld);
|
|
3453
|
+
}
|
|
3301
3454
|
return lines.join("\n");
|
|
3302
3455
|
}
|
|
3303
3456
|
function escapeHtml(value) {
|
|
@@ -3330,6 +3483,15 @@ function markWorkingChains(chains, threads) {
|
|
|
3330
3483
|
})
|
|
3331
3484
|
}));
|
|
3332
3485
|
}
|
|
3486
|
+
function waterfallBar(node, chain) {
|
|
3487
|
+
const gating = node.incoming.filter((edge) => !edge.loop);
|
|
3488
|
+
const startBlocked = gating.some((edge) => !edge.met && edge.hold === "start");
|
|
3489
|
+
const outgoing = chain.nodes.flatMap((other) => other.incoming).filter((edge) => edge.fromKey === node.key && !edge.loop);
|
|
3490
|
+
const settled = outgoing.length > 0 && outgoing.every((edge) => edge.met) && !startBlocked;
|
|
3491
|
+
if (startBlocked) return " waiting";
|
|
3492
|
+
if (settled || gating.length > 0 && gating.every((edge) => edge.met)) return " clear";
|
|
3493
|
+
return " start";
|
|
3494
|
+
}
|
|
3333
3495
|
function nodeIsYou(node, you) {
|
|
3334
3496
|
if (!you) return false;
|
|
3335
3497
|
return orderTargetMatches(
|
|
@@ -3345,20 +3507,20 @@ function formatWaterfallHtml(chains, opts) {
|
|
|
3345
3507
|
const plan = opts?.plan ?? null;
|
|
3346
3508
|
const you = opts?.you ?? null;
|
|
3347
3509
|
const title = plan?.title?.trim() || "Planner";
|
|
3348
|
-
const
|
|
3510
|
+
const watch = chains.length ? planWatchCopy(chains) : "";
|
|
3511
|
+
const status = plan ? plan.status === "active" ? watch || "Running. Start the steps that are free. Leave held steps alone." : watch ? `Draft. Nothing runs until you agree. ${watch}` : "Draft. Discuss this and change it. Nothing runs until you agree." : watch || "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.";
|
|
3349
3512
|
const body = chains.length === 0 ? '<p class="empty">No order yet.</p>' : chains.map((chain) => {
|
|
3350
3513
|
const nodes = chain.nodes.map((node) => {
|
|
3351
|
-
const waiting = node.incoming.some((edge) => !edge.met && !edge.loop);
|
|
3352
|
-
const clear = node.incoming.some((edge) => !edge.loop) && !waiting;
|
|
3353
3514
|
const yours = nodeIsYou(node, you);
|
|
3354
3515
|
const working = node.working === true;
|
|
3355
|
-
const
|
|
3516
|
+
const bar = waterfallBar(node, chain);
|
|
3517
|
+
const state = `${working ? " current" : ""}${bar}${yours ? " you" : ""}`;
|
|
3356
3518
|
const drops = node.incoming.map((edge) => {
|
|
3357
3519
|
const tone = edge.loop ? "loop" : edge.met ? "clear" : "waiting";
|
|
3358
3520
|
const note = edge.note ? `<span>${escapeHtml(edge.note)}</span>` : "";
|
|
3359
3521
|
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>`;
|
|
3360
3522
|
}).join("");
|
|
3361
|
-
const kicker = `${WATERFALL_KIND[node.kind]}${working ? " \xB7 Working" : ""}${yours ? " \xB7 You" : ""}`;
|
|
3523
|
+
const kicker = `${WATERFALL_KIND[node.kind]}${bar === " start" ? " \xB7 Start" : ""}${working ? " \xB7 Working" : ""}${yours ? " \xB7 You" : ""}`;
|
|
3362
3524
|
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>`;
|
|
3363
3525
|
}).join("");
|
|
3364
3526
|
return `<ol class="chain">${nodes}</ol>`;
|
|
@@ -3381,6 +3543,7 @@ h1 { font-size: 15px; font-weight: 600; margin: 0 0 6px; }
|
|
|
3381
3543
|
.bar { border: 1px solid #333; border-radius: 10px; padding: 10px 12px; background: #1c1c1c; display: flex; flex-direction: column; gap: 2px; }
|
|
3382
3544
|
.bar.waiting { border-color: #6a5420; background: #221c10; }
|
|
3383
3545
|
.bar.clear { border-color: #2d5a32; background: #142016; }
|
|
3546
|
+
.bar.start { border-color: #2a4a7a; background: #141c28; }
|
|
3384
3547
|
.bar.you { outline: 1px solid #8ab4ff; }
|
|
3385
3548
|
.bar.current { border-color: #8ab4ff; box-shadow: inset 3px 0 0 #8ab4ff; }
|
|
3386
3549
|
.bar.current .kicker { color: #ececec; }
|
|
@@ -3589,7 +3752,7 @@ function executeOrderPlan(ownerThreadId) {
|
|
|
3589
3752
|
const ids = new Set(edges.map((edge) => edge.id));
|
|
3590
3753
|
const rows = resolveOrchestrationGates(file.plans, file.edges, threadSnapshots(), file.marks);
|
|
3591
3754
|
const slice = executionSlice(rows.filter((row) => ids.has(row.id)));
|
|
3592
|
-
return { plan,
|
|
3755
|
+
return { plan, start: slice.start, waiting: slice.waiting, mergeHeld: slice.mergeHeld };
|
|
3593
3756
|
}
|
|
3594
3757
|
function threadSnapshots() {
|
|
3595
3758
|
try {
|
|
@@ -3702,7 +3865,7 @@ function satisfyOrderDependency(id, satisfied = true) {
|
|
|
3702
3865
|
}
|
|
3703
3866
|
|
|
3704
3867
|
// src/mcp/order-tools.ts
|
|
3705
|
-
var kindSchema =
|
|
3868
|
+
var kindSchema = z10.enum(["pr", "issue", "workspace", "orchestration"]);
|
|
3706
3869
|
function callerThread2() {
|
|
3707
3870
|
const id = process.env[SIDEBOARD_THREAD_ID_ENV]?.trim();
|
|
3708
3871
|
if (!id) return null;
|
|
@@ -3774,16 +3937,16 @@ function registerOrderTools(server) {
|
|
|
3774
3937
|
worktree ? "Change what this checkout waits on. Omit subject to mean this workspace (hold=merge uses this PR; hold=start on a ticket uses this issue). gate=in-main (met when that PR is merged) or in-prod (stays waiting until satisfy_dependency). hold=start means do not begin; hold=merge means do not merge. You cannot set a dependency for a different checkout. show_plan so the user sees the change." : "Record a step on this orchestration plan. waitsOn must reach gate before subject can hold. gate=in-main is met when that PR is merged; gate=in-prod stays waiting until satisfy_dependency. 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 repoPath when the same PR number exists in more than one project. Worktree agents set their own checkout and can omit subject. Then show_plan so the user sees it.",
|
|
3775
3938
|
{
|
|
3776
3939
|
waitsOnKind: kindSchema.describe("What must happen first: pr, issue, workspace, or orchestration"),
|
|
3777
|
-
waitsOnRef:
|
|
3778
|
-
waitsOnRepoPath:
|
|
3779
|
-
waitsOnLabel:
|
|
3780
|
-
gate:
|
|
3781
|
-
hold:
|
|
3940
|
+
waitsOnRef: z10.string().describe("PR number (12), issue id (ENG-4), or workspace chat id / worktree path"),
|
|
3941
|
+
waitsOnRepoPath: z10.string().optional().describe("Project path when a PR or issue number is not unique"),
|
|
3942
|
+
waitsOnLabel: z10.string().optional().describe("Short label on the planner"),
|
|
3943
|
+
gate: z10.enum(["in-main", "in-prod"]).describe("in-main: merged to the default branch. in-prod: deployed; mark with satisfy_dependency"),
|
|
3944
|
+
hold: z10.enum(["start", "merge"]).describe("start: subject cannot begin. merge: subject cannot merge"),
|
|
3782
3945
|
subjectKind: kindSchema.optional().describe("What is held. Required from orchestration. Omit on a worktree to mean this checkout."),
|
|
3783
|
-
subjectRef:
|
|
3784
|
-
subjectRepoPath:
|
|
3785
|
-
subjectLabel:
|
|
3786
|
-
note:
|
|
3946
|
+
subjectRef: z10.string().optional().describe("PR number, issue id, or workspace ref for the subject"),
|
|
3947
|
+
subjectRepoPath: z10.string().optional(),
|
|
3948
|
+
subjectLabel: z10.string().optional(),
|
|
3949
|
+
note: z10.string().optional().describe("Why this order matters")
|
|
3787
3950
|
},
|
|
3788
3951
|
async (args) => {
|
|
3789
3952
|
try {
|
|
@@ -3847,9 +4010,9 @@ function registerOrderTools(server) {
|
|
|
3847
4010
|
"set_plan",
|
|
3848
4011
|
"Draft or retitle this chat's plan. It stays draft until execute_plan. Pass goal for the outcome the steps are trying to reach. Then set_dependency for each gate. A step may loop back to an earlier one. Call show_plan so the user sees it. Do not paste the diagram in chat. Do not start workspaces while it is draft.",
|
|
3849
4012
|
{
|
|
3850
|
-
title:
|
|
3851
|
-
summary:
|
|
3852
|
-
goal:
|
|
4013
|
+
title: z10.string().describe("Short name for the plan"),
|
|
4014
|
+
summary: z10.string().optional().describe("What this order is for, in a sentence or two"),
|
|
4015
|
+
goal: z10.string().optional().describe("Outcome the steps are trying to reach")
|
|
3853
4016
|
},
|
|
3854
4017
|
async ({ title, summary, goal }) => {
|
|
3855
4018
|
try {
|
|
@@ -3867,29 +4030,28 @@ function registerOrderTools(server) {
|
|
|
3867
4030
|
);
|
|
3868
4031
|
server.tool(
|
|
3869
4032
|
"execute_plan",
|
|
3870
|
-
"Mark the plan active after the user has seen it and told you to run it. Returns
|
|
4033
|
+
"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.",
|
|
3871
4034
|
{
|
|
3872
|
-
agreed:
|
|
4035
|
+
agreed: z10.literal(true).describe("True only after the user has seen the plan and told you to run it")
|
|
3873
4036
|
},
|
|
3874
4037
|
async () => {
|
|
3875
4038
|
try {
|
|
3876
4039
|
const result = executeOrderPlan(orchestrationOwnerId(false));
|
|
3877
4040
|
const brief = (row) => ({
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
detail: row.detail,
|
|
3884
|
-
...row.loop ? { loop: true } : {}
|
|
4041
|
+
kind: row.target.kind,
|
|
4042
|
+
ref: row.target.ref,
|
|
4043
|
+
...row.target.repoPath ? { repoPath: row.target.repoPath } : {},
|
|
4044
|
+
label: row.label,
|
|
4045
|
+
detail: row.detail
|
|
3885
4046
|
});
|
|
3886
4047
|
return mcpJson({
|
|
3887
4048
|
ok: true,
|
|
3888
4049
|
status: result.plan.status,
|
|
3889
4050
|
title: result.plan.title,
|
|
3890
|
-
|
|
4051
|
+
start: result.start.map(brief),
|
|
3891
4052
|
waiting: result.waiting.map(brief),
|
|
3892
|
-
|
|
4053
|
+
mergeHeld: result.mergeHeld.map(brief),
|
|
4054
|
+
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."
|
|
3893
4055
|
});
|
|
3894
4056
|
} catch (err) {
|
|
3895
4057
|
return mcpJson({ error: err instanceof Error ? err.message : String(err) }, true);
|
|
@@ -3940,7 +4102,7 @@ function registerOrderTools(server) {
|
|
|
3940
4102
|
server.tool(
|
|
3941
4103
|
"clear_dependency",
|
|
3942
4104
|
worktree ? "Remove a planner step this checkout is part of. Pass id from list_order. Then show_plan so the user sees it." : "Remove one planner step. Pass id from list_order. Then show_plan so the user sees it.",
|
|
3943
|
-
{ id:
|
|
4105
|
+
{ id: z10.string().describe("Step id from list_order") },
|
|
3944
4106
|
async ({ id }) => {
|
|
3945
4107
|
try {
|
|
3946
4108
|
const caller = callerThread2();
|
|
@@ -3959,8 +4121,8 @@ function registerOrderTools(server) {
|
|
|
3959
4121
|
"satisfy_dependency",
|
|
3960
4122
|
"Mark a planner gate met. Use this when a PR is in production \u2014 Sideboard cannot see deploys. in-main also clears on its own once that PR is merged. Pass satisfied=false to undo a manual mark. One mark covers every step waiting on that same gate.",
|
|
3961
4123
|
{
|
|
3962
|
-
id:
|
|
3963
|
-
satisfied:
|
|
4124
|
+
id: z10.string().describe("Step id from list_order"),
|
|
4125
|
+
satisfied: z10.boolean().optional().describe("false clears the manual mark. Default true.")
|
|
3964
4126
|
},
|
|
3965
4127
|
async ({ id, satisfied }) => {
|
|
3966
4128
|
try {
|
|
@@ -4313,7 +4475,7 @@ async function startMcpServer() {
|
|
|
4313
4475
|
);
|
|
4314
4476
|
}
|
|
4315
4477
|
try {
|
|
4316
|
-
const { maxConcurrentAgents } = await import("../app-settings-
|
|
4478
|
+
const { maxConcurrentAgents } = await import("../app-settings-X3UFWRAF.js");
|
|
4317
4479
|
orch.setMaxConcurrent(maxConcurrentAgents());
|
|
4318
4480
|
} catch {
|
|
4319
4481
|
}
|
|
@@ -4397,16 +4559,16 @@ async function startMcpServer() {
|
|
|
4397
4559
|
"list_board",
|
|
4398
4560
|
"Home Kanban of workspaces (New, Draft, Review, Approved, Merged) \u2014 one card per checkout; sibling chats on that card are separate agents. Same cards as desktop Home. Path to merge: no PR \u2192 draft PR \u2192 open PR \u2192 approved \u2192 merged. Archive removes the card to Settings \u2192 History (list_archive to browse, restore_workspace to bring it back). Queued/running are activity on the card, not stages. Orchestration chats are not on the board. Filters: query, repoPath, kind (ticket/PR/branch source), ownership (mine = your PRs / WIP; reviewing = someone else's PR), column, limit (default 40). create_workspace adds a workspace (and a Home card), or returns the live checkout if that ticket/PR/named branch is already checked out. That reuse is one checkout, not one agent \u2014 fork_chat to add another.",
|
|
4399
4561
|
{
|
|
4400
|
-
query:
|
|
4401
|
-
repoPath:
|
|
4402
|
-
kind:
|
|
4403
|
-
ownership:
|
|
4562
|
+
query: z11.string().optional().describe("Case-insensitive token search across title, id, labels, workspace tags, repo"),
|
|
4563
|
+
repoPath: z11.string().optional().describe("Limit to one project path from list_projects"),
|
|
4564
|
+
kind: z11.enum(["all", "tickets", "prs", "branches", "threads"]).optional().describe("Filter by worktree source (default all)"),
|
|
4565
|
+
ownership: z11.enum(["all", "mine", "reviewing"]).optional().describe(
|
|
4404
4566
|
"Mine = PRs you authored or local WIP; reviewing = someone else's PR. Uses the gh login."
|
|
4405
4567
|
),
|
|
4406
|
-
column:
|
|
4568
|
+
column: z11.enum(["new", "draft", "review", "approved", "done", "needs_you"]).optional().describe(
|
|
4407
4569
|
"Return cards for this column only (totals still include the rest). approved is an open PR GitHub has approved. needs_you is a legacy alias for new."
|
|
4408
4570
|
),
|
|
4409
|
-
limit:
|
|
4571
|
+
limit: z11.number().int().positive().optional().describe("Max cards per column (default 40). hidden counts the remainder.")
|
|
4410
4572
|
},
|
|
4411
4573
|
async ({ query, repoPath, kind, ownership, column, limit }) => {
|
|
4412
4574
|
const workspaces = orch.listWorkspaces();
|
|
@@ -4436,7 +4598,7 @@ async function startMcpServer() {
|
|
|
4436
4598
|
server.tool(
|
|
4437
4599
|
"get_chat",
|
|
4438
4600
|
"Get a compact chat summary by id/ref. Includes last message preview, parentChatId, and child workspace chats (status + lastText). While running, includes progress (last tool/thinking) and lastActivityAt. Includes usage (billed token + costUsd totals when providers reported cost) and lastTurnUsage. blockedReason is why that agent is waiting on a person (question, plan approval, or a reported block).",
|
|
4439
|
-
{ ref:
|
|
4601
|
+
{ ref: z11.string() },
|
|
4440
4602
|
async ({ ref }) => {
|
|
4441
4603
|
const t = orch.getThread(ref);
|
|
4442
4604
|
if (!t) {
|
|
@@ -4483,17 +4645,17 @@ async function startMcpServer() {
|
|
|
4483
4645
|
"present_artifact",
|
|
4484
4646
|
"Show a document or live log in Sideboard\u2019s side column. For html/svg/markdown/react, pass the FULL document and do not also fence that same body in chat. For type=log, pass only NEW lines (same artifact_id appends). Prefer type=log for long-running job output \u2014 do not resend HTML. type=react is a single default-export component (JSX/TSX); only react/react-dom imports.",
|
|
4485
4647
|
{
|
|
4486
|
-
title:
|
|
4487
|
-
type:
|
|
4648
|
+
title: z11.string().describe("Short title shown in the artifact pane header"),
|
|
4649
|
+
type: z11.enum(["html", "svg", "markdown", "react", "log"]).describe(
|
|
4488
4650
|
"html/svg/markdown/react replace the pane. log appends content to the same artifact_id (new lines only)."
|
|
4489
4651
|
),
|
|
4490
|
-
content:
|
|
4652
|
+
content: z11.string().describe(
|
|
4491
4653
|
"html/svg/markdown/react: full document. log: only the new lines since the last call (empty is ok for a status-only update)."
|
|
4492
4654
|
),
|
|
4493
|
-
artifact_id:
|
|
4494
|
-
status:
|
|
4495
|
-
phase:
|
|
4496
|
-
mode:
|
|
4655
|
+
artifact_id: z11.string().optional().describe("Stable id. Required for type=log so later calls append to the same pane."),
|
|
4656
|
+
status: z11.enum(["running", "ok", "failed", "idle"]).optional().describe("Log header pill: running (working), ok (done), failed, idle"),
|
|
4657
|
+
phase: z11.string().optional().describe("Log subtitle (Signing, Notarizing, \u2026)"),
|
|
4658
|
+
mode: z11.enum(["append", "replace"]).optional().describe("log only: append (default) or replace the buffer")
|
|
4497
4659
|
},
|
|
4498
4660
|
async ({ title, type, artifact_id, status, phase, mode }) => {
|
|
4499
4661
|
return mcpJson(
|
|
@@ -4506,15 +4668,15 @@ async function startMcpServer() {
|
|
|
4506
4668
|
"ask_user",
|
|
4507
4669
|
"Ask the user a clarifying multiple-choice question in Sideboard\u2019s composer. Call only when work is blocked on choosing among a few concrete options (approach fork, which API, auth vs cookies). Do not call for greetings, check-ins, \u201Chello\u201D, open-ended how-can-I-help, or to invent a menu of possible next tasks \u2014 reply in chat instead. If one option is the obvious default, proceed without asking. Before calling, write a short chat message explaining the decision and what each option means. Include a description on every option. After calling, stop and wait for answers. Not for \u201Cis the plan ready?\u201D.",
|
|
4508
4670
|
{
|
|
4509
|
-
questions:
|
|
4510
|
-
|
|
4511
|
-
question:
|
|
4512
|
-
header:
|
|
4513
|
-
multiSelect:
|
|
4514
|
-
options:
|
|
4515
|
-
|
|
4516
|
-
label:
|
|
4517
|
-
description:
|
|
4671
|
+
questions: z11.array(
|
|
4672
|
+
z11.object({
|
|
4673
|
+
question: z11.string().describe("Full question text ending with ?"),
|
|
4674
|
+
header: z11.string().max(24).optional().describe("Short label shown above the question"),
|
|
4675
|
+
multiSelect: z11.boolean().optional().describe("Allow selecting multiple options"),
|
|
4676
|
+
options: z11.array(
|
|
4677
|
+
z11.object({
|
|
4678
|
+
label: z11.string(),
|
|
4679
|
+
description: z11.string().optional().describe("What this option means / when to choose it (strongly preferred)")
|
|
4518
4680
|
})
|
|
4519
4681
|
).min(2).max(6).describe("2\u20136 choices (Sideboard also offers Other)")
|
|
4520
4682
|
})
|
|
@@ -4540,9 +4702,9 @@ async function startMcpServer() {
|
|
|
4540
4702
|
"present_plan",
|
|
4541
4703
|
PRESENT_PLAN_TOOL_DESCRIPTION,
|
|
4542
4704
|
{
|
|
4543
|
-
title:
|
|
4544
|
-
content:
|
|
4545
|
-
thread_id:
|
|
4705
|
+
title: z11.string().optional().describe("Short plan title (defaults to Plan)"),
|
|
4706
|
+
content: z11.string().min(1).describe("Full plan markdown (headings, steps, risks, open questions)"),
|
|
4707
|
+
thread_id: z11.string().optional().describe("Sideboard thread id when cwd is not the worktree")
|
|
4546
4708
|
},
|
|
4547
4709
|
async ({ title, content, thread_id }) => {
|
|
4548
4710
|
const { writePlanFile } = await import("../plan-file-VAHV5WBB.js");
|
|
@@ -4571,15 +4733,15 @@ async function startMcpServer() {
|
|
|
4571
4733
|
"present_schema",
|
|
4572
4734
|
"Open Sideboard\u2019s schema-driven side column (filterable table and/or form) when the user needs to filter, edit, publish, or persist records. Do not call this just to re-display rows you already wrote as a markdown table. If the user asks for an editable / interactive table, call this even if chat already showed those rows. Pass JSON Schema + optional schemaUi. Prefer datasource=inline with embedded resource/records. Use datasource=brightsy with resource_id only when the user is logged into Brightsy.",
|
|
4573
4735
|
{
|
|
4574
|
-
title:
|
|
4575
|
-
mode:
|
|
4576
|
-
datasource:
|
|
4577
|
-
resource_id:
|
|
4578
|
-
record_id:
|
|
4579
|
-
resource:
|
|
4580
|
-
record:
|
|
4581
|
-
records:
|
|
4582
|
-
pane_id:
|
|
4736
|
+
title: z11.string().describe("Pane title"),
|
|
4737
|
+
mode: z11.enum(["table", "form"]).optional().describe("table = list/filter records; form = edit one record"),
|
|
4738
|
+
datasource: z11.enum(["brightsy", "inline"]).optional().describe("brightsy resolves via login; inline uses embedded resource/records"),
|
|
4739
|
+
resource_id: z11.string().optional().describe("Brightsy record type UUID (or generic resource id)"),
|
|
4740
|
+
record_id: z11.string().optional().describe("Record id when opening form mode"),
|
|
4741
|
+
resource: z11.record(z11.unknown()).optional().describe("Inline { id, title, schema, schemaUi?, slug? }"),
|
|
4742
|
+
record: z11.record(z11.unknown()).optional().describe("Inline record { id, data, published_at? }"),
|
|
4743
|
+
records: z11.array(z11.record(z11.unknown())).optional().describe("Inline records for table mode"),
|
|
4744
|
+
pane_id: z11.string().optional().describe("Stable pane id across updates")
|
|
4583
4745
|
},
|
|
4584
4746
|
async (args) => {
|
|
4585
4747
|
const id = args.pane_id?.trim() || `schema_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 8)}`;
|
|
@@ -4600,10 +4762,10 @@ async function startMcpServer() {
|
|
|
4600
4762
|
"present_files",
|
|
4601
4763
|
"Open Sideboard\u2019s Files column (CMS-style file manager: browse, upload, pick). Use datasource=brightsy when the user is logged into Brightsy account storage; datasource=memory for a session-local demo store. Prefer this over claiming a file manager UI is unavailable. Pair with present_schema when editing records that need media.",
|
|
4602
4764
|
{
|
|
4603
|
-
title:
|
|
4604
|
-
datasource:
|
|
4605
|
-
path:
|
|
4606
|
-
pane_id:
|
|
4765
|
+
title: z11.string().optional().describe("Pane title (default: Files)"),
|
|
4766
|
+
datasource: z11.enum(["brightsy", "memory"]).optional().describe("brightsy = account storage via login; memory = session demo store"),
|
|
4767
|
+
path: z11.string().optional().describe("Initial folder path (e.g. public)"),
|
|
4768
|
+
pane_id: z11.string().optional().describe("Stable pane id across updates")
|
|
4607
4769
|
},
|
|
4608
4770
|
async (args) => {
|
|
4609
4771
|
const id = args.pane_id?.trim() || `files_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 8)}`;
|
|
@@ -4623,8 +4785,8 @@ async function startMcpServer() {
|
|
|
4623
4785
|
"wait_for_job",
|
|
4624
4786
|
"Wait on a detached long job (tests, pack, deploy, connector CLI) started with detached-job.cjs. MCP clients kill tools around 60s, so this returns within 45s. Sideboard opens a type=log pane from this result (artifact_id = job id, content = delta). stillRunning is the source of truth \u2014 if true, call wait_for_job again. If the job is hanging, producing no useful output, or doing the wrong thing, call stop_job instead of looping forever. Do not end the turn or tell the user you will let them know later. If false, ok/failed is the result.",
|
|
4625
4787
|
{
|
|
4626
|
-
id:
|
|
4627
|
-
timeoutMs:
|
|
4788
|
+
id: z11.string().describe("Detached job id (same kebab-case id passed to detached-job.cjs start)"),
|
|
4789
|
+
timeoutMs: z11.number().optional()
|
|
4628
4790
|
},
|
|
4629
4791
|
async ({ id, timeoutMs }) => {
|
|
4630
4792
|
const result = await waitForDetachedJob(process.cwd(), id, {
|
|
@@ -4637,8 +4799,8 @@ async function startMcpServer() {
|
|
|
4637
4799
|
"stop_job",
|
|
4638
4800
|
"Stop a detached job you started with detached-job.cjs when it is hanging, producing no useful output, buffering forever, or doing the wrong thing (wrong project, infinite watch, huge dump). Do not stop a pack/test/deploy that is clearly making progress. The type=log pane updates to status=failed with the last delta. Then decide the next step.",
|
|
4639
4801
|
{
|
|
4640
|
-
id:
|
|
4641
|
-
reason:
|
|
4802
|
+
id: z11.string().describe("Detached job id (same kebab-case id passed to detached-job.cjs start)"),
|
|
4803
|
+
reason: z11.string().optional().describe("Why you are stopping (hanging, no progress, wrong output, already have the answer)")
|
|
4642
4804
|
},
|
|
4643
4805
|
async ({ id, reason }) => {
|
|
4644
4806
|
const result = await stopDetachedJob(process.cwd(), id, { reason });
|
|
@@ -4650,7 +4812,7 @@ async function startMcpServer() {
|
|
|
4650
4812
|
"list_run_scripts",
|
|
4651
4813
|
"List .sideboard/.conductor run scripts for this thread (same menu as the desktop Dev button) and which are active. Each script and active run includes preview: url (open http://localhost:<SIDEBOARD_PORT>) or window (Electron: native window is the app; url is renderer/HMR only). Never guess :3000. Worktree turns may omit ref (uses cwd).",
|
|
4652
4814
|
{
|
|
4653
|
-
ref:
|
|
4815
|
+
ref: z11.string().optional().describe("Thread id. Omit on a worktree turn (uses cwd).")
|
|
4654
4816
|
},
|
|
4655
4817
|
async ({ ref }) => {
|
|
4656
4818
|
try {
|
|
@@ -4680,8 +4842,8 @@ async function startMcpServer() {
|
|
|
4680
4842
|
"run_dev_script",
|
|
4681
4843
|
"Start a .sideboard/.conductor run script (same as the desktop Dev / play button). Several named scripts can run at once; each gets its own port, and starting one does not stop the others. Logs and Stop appear in the thread UI \u2014 do not detached-job or shell-spawn the same command. Returns {port, ports, url, preview}. preview=url \u2192 open url (browser, curl, Playwright). preview=window \u2192 Electron: the native window is the app; url is renderer/HMR only (no preload/IPC in a browser). The port is allocated SIDEBOARD_PORT, not 3000. Worktree turns may omit ref (uses cwd). Omit name for the default script.",
|
|
4682
4844
|
{
|
|
4683
|
-
ref:
|
|
4684
|
-
name:
|
|
4845
|
+
ref: z11.string().optional().describe("Thread id. Omit on a worktree turn (uses cwd)."),
|
|
4846
|
+
name: z11.string().optional().describe("Script name from list_run_scripts (default script if omitted).")
|
|
4685
4847
|
},
|
|
4686
4848
|
async ({ ref, name }) => {
|
|
4687
4849
|
try {
|
|
@@ -4709,8 +4871,8 @@ async function startMcpServer() {
|
|
|
4709
4871
|
"stop_dev_script",
|
|
4710
4872
|
"Stop a run script started with run_dev_script or the desktop Dev button (same as UI Stop). Omit name to stop all scripts on this worktree. Worktree turns may omit ref (uses cwd).",
|
|
4711
4873
|
{
|
|
4712
|
-
ref:
|
|
4713
|
-
name:
|
|
4874
|
+
ref: z11.string().optional().describe("Thread id. Omit on a worktree turn (uses cwd)."),
|
|
4875
|
+
name: z11.string().optional().describe("Script name to stop; omit to stop all active scripts.")
|
|
4714
4876
|
},
|
|
4715
4877
|
async ({ ref, name }) => {
|
|
4716
4878
|
try {
|
|
@@ -4727,9 +4889,9 @@ async function startMcpServer() {
|
|
|
4727
4889
|
"get_run_log",
|
|
4728
4890
|
"Read the Run-tab terminal for a worktree script (same stdout/stderr as the desktop Dev pane). Default is a tail \u2014 raise `tail` only if the error is missing. Worktree turns may omit ref (uses cwd). Omit name for the default script.",
|
|
4729
4891
|
{
|
|
4730
|
-
ref:
|
|
4731
|
-
name:
|
|
4732
|
-
tail:
|
|
4892
|
+
ref: z11.string().optional().describe("Thread id. Omit on a worktree turn (uses cwd)."),
|
|
4893
|
+
name: z11.string().optional().describe("Script name from list_run_scripts (default script if omitted)."),
|
|
4894
|
+
tail: z11.number().int().min(1).max(MAX_RUN_LOG_CHARS).optional().describe(
|
|
4733
4895
|
`Max characters to return from the end (default ${DEFAULT_RUN_LOG_TAIL_CHARS}). Do not request the full buffer unless the tail is truncated and you still need more.`
|
|
4734
4896
|
)
|
|
4735
4897
|
},
|
|
@@ -4762,6 +4924,7 @@ async function startMcpServer() {
|
|
|
4762
4924
|
}
|
|
4763
4925
|
}
|
|
4764
4926
|
);
|
|
4927
|
+
registerComputerUseTool(server, mcpCatalog);
|
|
4765
4928
|
if (worktreeProfile) {
|
|
4766
4929
|
server.tool(
|
|
4767
4930
|
"get_orchestrator",
|
|
@@ -4792,8 +4955,8 @@ async function startMcpServer() {
|
|
|
4792
4955
|
"notify_orchestrator",
|
|
4793
4956
|
"Wake the parent Global orchestrator with a short status so it does not have to poll wait_for_turn. Use when you are blocked and the parent may have moved on (missing access, waiting on something the coordinator must handle). The message is shown on the sidebar and board until the next user message in this chat. ask_user already notifies for input-required \u2014 do not call this for the same question. Information only: never a git command. Do not use this to steer other worktrees.",
|
|
4794
4957
|
{
|
|
4795
|
-
message:
|
|
4796
|
-
reason:
|
|
4958
|
+
message: z11.string().min(1).max(1500).describe("Why you are blocked / what the parent should know (short)."),
|
|
4959
|
+
reason: z11.enum(["input-required", "blocked"]).optional().describe(
|
|
4797
4960
|
"input-required = waiting on the user in this chat; blocked = need the coordinator (default)."
|
|
4798
4961
|
)
|
|
4799
4962
|
},
|
|
@@ -4832,11 +4995,11 @@ async function startMcpServer() {
|
|
|
4832
4995
|
"set_workspace_tags",
|
|
4833
4996
|
worktreeProfile ? "Update tags on this workspace (the checkout you are in). Omit ref to use this chat. mode=replace (default), add, or remove. Short labels \u2014 the same ones the orchestrator used for this task. You cannot retag a different checkout." : "Label a project workspace so related checkouts stay recognizable in the sidebar and on the phone. Pass any chat id on that workspace. Use the same tags on every workspace from one task. mode=replace is the default; add and remove change the set. create_workspace tags= sets them at create time. Not for orchestration chats.",
|
|
4834
4997
|
{
|
|
4835
|
-
ref:
|
|
4998
|
+
ref: z11.string().optional().describe(
|
|
4836
4999
|
worktreeProfile ? "Omit for this chat. Another chat id only if it is on this same checkout." : "Chat id on the workspace to label."
|
|
4837
5000
|
),
|
|
4838
|
-
tags:
|
|
4839
|
-
mode:
|
|
5001
|
+
tags: z11.union([z11.string(), z11.array(z11.string())]).describe("Labels to set. A string may be comma-separated."),
|
|
5002
|
+
mode: z11.enum(["replace", "add", "remove"]).optional()
|
|
4840
5003
|
},
|
|
4841
5004
|
async ({ ref, tags, mode }) => {
|
|
4842
5005
|
try {
|
|
@@ -4864,10 +5027,10 @@ async function startMcpServer() {
|
|
|
4864
5027
|
"set_wake_on_github_edges",
|
|
4865
5028
|
worktreeProfile ? "Opt this checkout into orchestrator wakes when CI starts failing or GitHub requests a review. Omit ref. Only works after Settings \u2192 Advanced \u2192 Wake orchestrator on CI / review-requested is on. Do not change that Advanced switch." : "Opt a project workspace into CI and review-request wakes. Pass any chat id on that checkout. Only works after Settings \u2192 Advanced \u2192 Wake orchestrator on CI / review-requested is already on. Do not change that Advanced switch. Not for orchestration chats.",
|
|
4866
5029
|
{
|
|
4867
|
-
ref:
|
|
5030
|
+
ref: z11.string().optional().describe(
|
|
4868
5031
|
worktreeProfile ? "Omit for this chat. Another chat id only if it is on this same checkout." : "Chat id on the workspace."
|
|
4869
5032
|
),
|
|
4870
|
-
enabled:
|
|
5033
|
+
enabled: z11.boolean().describe("True opts the checkout in. False turns it off.")
|
|
4871
5034
|
},
|
|
4872
5035
|
async ({ ref, enabled }) => {
|
|
4873
5036
|
try {
|
|
@@ -4893,14 +5056,14 @@ async function startMcpServer() {
|
|
|
4893
5056
|
if (!worktreeProfile) {
|
|
4894
5057
|
registerConnectedIssueVendorTools(server);
|
|
4895
5058
|
const { getCaffeinateHold, setCaffeinateHold } = await import("../caffeinate-hold-H7TTUDGM.js");
|
|
4896
|
-
const { resolveNewThreadOptions, resolveThreadDefaults } = await import("../app-settings-
|
|
5059
|
+
const { resolveNewThreadOptions, resolveThreadDefaults } = await import("../app-settings-X3UFWRAF.js");
|
|
4897
5060
|
const accountDefaults = resolveThreadDefaults();
|
|
4898
5061
|
const accountDefaultsHint = `Account defaults: agent=${accountDefaults.agent}, model=${accountDefaults.model?.trim() || "Auto"}, effort=${accountDefaults.effort}`;
|
|
4899
5062
|
server.tool(
|
|
4900
5063
|
"set_caffeinate",
|
|
4901
5064
|
"Keep this Mac awake with caffeinate across turns \u2014 independent of Settings toggles. A connected phone already holds caffeinate (lid can close on power), so do not turn this on just because they are on the phone. Turn ON when the user will be away and no phone is connected, or they ask you to keep the machine awake. Turn OFF when they say they are done, wrapping up, going to sleep, or no longer need the Mac awake. Closing or archiving this orchestration chat also releases the hold. macOS only.",
|
|
4902
5065
|
{
|
|
4903
|
-
enabled:
|
|
5066
|
+
enabled: z11.boolean().describe("true = hold caffeinate on; false = release and let the Mac sleep")
|
|
4904
5067
|
},
|
|
4905
5068
|
async ({ enabled }) => {
|
|
4906
5069
|
const threadId = process.env.SIDEBOARD_ORCHESTRATOR_THREAD_ID?.trim() || null;
|
|
@@ -4926,25 +5089,25 @@ async function startMcpServer() {
|
|
|
4926
5089
|
"create_workspace",
|
|
4927
5090
|
`Create a workspace (isolated git checkout + first chat) from branch, pr, or ticket. A ticket, PR, or named branch has one checkout \u2014 if one already matches, returns it (alreadyStarted=true) instead of a second checkout. That is not one agent: chats lists every agent on that checkout. Add another with fork_chat; send_to_chat only the chat that should do this job. Creating from the default branch still opens a new isolated checkout. Pass repoPath from list_projects. cowboy=true uses the project folder on the default branch (no isolated worktree; land is commit+push). From an orchestration chat, omit parentChatId (Sideboard binds the child to this chat) or pass the exact id from the turn reminder \u2014 never invent a uuid. Omit agent/model \u2014 Sideboard applies ${accountDefaultsHint}. Do not pass your own agent or agent=cursor; those are ignored. Setup (settings.toml, .cursor/worktrees.json, or script/setup) runs in the background in parallel with the first turn (skipped for cowboy). Pass the same tags on every workspace you open for one task (short labels such as "phone-sync") so they still match in the sidebar the next day. Reusing a checkout adds those tags. Each 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.`,
|
|
4928
5091
|
{
|
|
4929
|
-
sourceType:
|
|
4930
|
-
sourceRef:
|
|
4931
|
-
agent:
|
|
5092
|
+
sourceType: z11.enum(["branch", "pr", "ticket"]),
|
|
5093
|
+
sourceRef: z11.string(),
|
|
5094
|
+
agent: z11.enum(["claude", "codex", "opencode", "brightsy", "cursor", "acp"]).optional().describe(
|
|
4932
5095
|
`Usually omit. Sideboard uses Account default agent (${accountDefaults.agent}). Passing your own agent or cursor is ignored. Pass agent=acp and acpHarness=gemini or copilot for Gemini CLI or Copilot CLI.`
|
|
4933
5096
|
),
|
|
4934
|
-
acpHarness:
|
|
4935
|
-
model:
|
|
5097
|
+
acpHarness: z11.enum(["gemini", "copilot"]).optional().describe("When agent is acp: gemini (Gemini CLI) or copilot (GitHub Copilot CLI)."),
|
|
5098
|
+
model: z11.string().nullable().optional().describe(
|
|
4936
5099
|
`Usually omit to use Account default model (${accountDefaults.model?.trim() || "Auto"}). Pass null only to force Auto / agent-default.`
|
|
4937
5100
|
),
|
|
4938
|
-
repoPath:
|
|
4939
|
-
title:
|
|
4940
|
-
cowboy:
|
|
5101
|
+
repoPath: z11.string(),
|
|
5102
|
+
title: z11.string().optional(),
|
|
5103
|
+
cowboy: z11.boolean().optional().describe(
|
|
4941
5104
|
"If true, work in the project folder on the default branch (no thread/* worktree). Requires Settings \u2192 Advanced \u2192 Cowboy mode. Land is commit+push to that branch. Archive does not delete the folder."
|
|
4942
5105
|
),
|
|
4943
|
-
parentChatId:
|
|
5106
|
+
parentChatId: z11.string().optional().describe(
|
|
4944
5107
|
"Orchestration: omit (preferred) or pass YOUR chat id from the turn reminder / AGENTS.md. Do not invent uuids."
|
|
4945
5108
|
),
|
|
4946
|
-
parentThreadId:
|
|
4947
|
-
tags:
|
|
5109
|
+
parentThreadId: z11.string().optional().describe("Legacy alias for parentChatId."),
|
|
5110
|
+
tags: z11.union([z11.string(), z11.array(z11.string())]).optional().describe(
|
|
4948
5111
|
"Short labels for this workspace (or a comma-separated string). Use the same tags on every checkout for one task. Added when the checkout already exists."
|
|
4949
5112
|
)
|
|
4950
5113
|
},
|
|
@@ -4960,11 +5123,11 @@ async function startMcpServer() {
|
|
|
4960
5123
|
"start_board_card",
|
|
4961
5124
|
"Same as create_workspace for a ticket, PR, or named branch (attaches issue text when Sideboard can resolve it). Does not create a second checkout when one already matches \u2014 returns that workspace (alreadyStarted) and its chats. A workspace can have many agents. fork_chat to add one; send_to_chat only the chat that should do this job.",
|
|
4962
5125
|
{
|
|
4963
|
-
kind:
|
|
4964
|
-
ref:
|
|
4965
|
-
repoPath:
|
|
4966
|
-
title:
|
|
4967
|
-
tags:
|
|
5126
|
+
kind: z11.enum(["ticket", "pr", "branch"]),
|
|
5127
|
+
ref: z11.string().describe("Ticket identifier (ENG-12), PR number (44), or branch name from list_board"),
|
|
5128
|
+
repoPath: z11.string().describe("Project path from list_projects / list_board"),
|
|
5129
|
+
title: z11.string().optional(),
|
|
5130
|
+
tags: z11.union([z11.string(), z11.array(z11.string())]).optional().describe(
|
|
4968
5131
|
"Short labels for this workspace. Same tags on every checkout for one task. Added when the checkout already exists."
|
|
4969
5132
|
)
|
|
4970
5133
|
},
|
|
@@ -5069,9 +5232,9 @@ async function startMcpServer() {
|
|
|
5069
5232
|
"send_to_chat",
|
|
5070
5233
|
'Send a prompt to a workspace chat. A second send joins that prompt only while it is still queued or not yet handed to the process. Once the process has started, the send waits behind the turn and does not stop it or change the prompt already running. force_stop=true kills the in-flight turn and clears the queue before this prompt \u2014 only when the current request is wrong and must be replaced. The workspace composer still follows Settings \u2192 Follow-up. Use after create_workspace to start or continue a conversation. For commit/push/PR, prefer ask_git (canonical desktop-button phrases). Send "Merge PR." / ask_git merge only when the user explicitly asked to merge. Do not send_to_chat to check in, resume after a halt notice, or because wait_for_turn returned stillRunning. Call wait_for_turn again instead.',
|
|
5071
5234
|
{
|
|
5072
|
-
ref:
|
|
5073
|
-
prompt:
|
|
5074
|
-
force_stop:
|
|
5235
|
+
ref: z11.string(),
|
|
5236
|
+
prompt: z11.string(),
|
|
5237
|
+
force_stop: z11.boolean().optional()
|
|
5075
5238
|
},
|
|
5076
5239
|
async ({ ref, prompt, force_stop }) => {
|
|
5077
5240
|
if (force_stop) {
|
|
@@ -5096,8 +5259,8 @@ async function startMcpServer() {
|
|
|
5096
5259
|
"wait_for_turn",
|
|
5097
5260
|
"Wait until the chat finishes its current/queued turn, or return early with a live progress snapshot. MCP clients often kill tools around 60s, so this returns within 45s even while the child is still working. taskState is the A2A-style lifecycle: submitted (queued, not started), working, input-required (ask_user), completed, failed, canceled. stillRunning is true only for submitted/working. blockedReason is why the child is waiting on a person (the question, plan approval, or a reported block) \u2014 read it and do not send_to_chat a check-in. If stillRunning, text and usage are empty (they would be the previous turn) \u2014 read progress and call wait_for_turn again. Do not send_to_chat a check-in. On failed, read failureClass: auth, quota, and refused are not a retry; timeout or runner can be one. lastError/text is the failure. On canceled, the child did not finish \u2014 resume with send_to_chat or tell the user. On input-required, wait for the user in that chat. When finished, text is this turn\u2019s assistant reply and usage is that turn\u2019s tokens + costUsd (this turn, not the Claude session total; sessionCostUsd is the provider session total when present).",
|
|
5098
5261
|
{
|
|
5099
|
-
ref:
|
|
5100
|
-
timeoutMs:
|
|
5262
|
+
ref: z11.string(),
|
|
5263
|
+
timeoutMs: z11.number().optional()
|
|
5101
5264
|
},
|
|
5102
5265
|
async ({ ref, timeoutMs }) => {
|
|
5103
5266
|
const thread = await orch.waitForTurn(ref, mcpWaitForTurnTimeoutMs(timeoutMs), {
|
|
@@ -5125,7 +5288,7 @@ async function startMcpServer() {
|
|
|
5125
5288
|
server.tool(
|
|
5126
5289
|
"get_turn_result",
|
|
5127
5290
|
"Assistant message and last-turn usage when the turn finished. While stillRunning (submitted/working), text and usage are empty so a previous reply cannot be mistaken for this turn \u2014 use progress for tools/thinking. Not the full transcript. Includes taskState (A2A lifecycle), failureClass when the turn failed (auth, quota, refused, timeout, runner, other), and blockedReason (why the agent is waiting on a person).",
|
|
5128
|
-
{ ref:
|
|
5291
|
+
{ ref: z11.string() },
|
|
5129
5292
|
async ({ ref }) => {
|
|
5130
5293
|
const result = orch.getTurnResult(ref);
|
|
5131
5294
|
const failureClass = result.taskState === "failed" && result.status !== "broken" ? classifyTurnFailure(result.lastError || result.text) : null;
|
|
@@ -5143,9 +5306,9 @@ async function startMcpServer() {
|
|
|
5143
5306
|
"stop_chat",
|
|
5144
5307
|
"Force-stop a thread: kill any in-flight agent turn AND clear queued prompts so drainQueue cannot continue. Does not archive the worktree. Optional force defaults to true. Pass reason \u2014 a short note on why this chat is stopping. It is stored on the thread and kept when the turn unwinds. If you omit it, Sideboard still records that the queue was cleared.",
|
|
5145
5308
|
{
|
|
5146
|
-
ref:
|
|
5147
|
-
force:
|
|
5148
|
-
reason:
|
|
5309
|
+
ref: z11.string(),
|
|
5310
|
+
force: z11.boolean().optional(),
|
|
5311
|
+
reason: z11.string().optional().describe("Why this chat is stopping. Stored on the thread for the next session.")
|
|
5149
5312
|
},
|
|
5150
5313
|
async ({ ref, force, reason }) => {
|
|
5151
5314
|
const t = orch.getThread(ref);
|
|
@@ -5171,8 +5334,8 @@ async function startMcpServer() {
|
|
|
5171
5334
|
"get_diff",
|
|
5172
5335
|
"Compact diff summary (capped hunks, paginated)",
|
|
5173
5336
|
{
|
|
5174
|
-
ref:
|
|
5175
|
-
maxFiles:
|
|
5337
|
+
ref: z11.string(),
|
|
5338
|
+
maxFiles: z11.number().optional()
|
|
5176
5339
|
},
|
|
5177
5340
|
async ({ ref, maxFiles }) => {
|
|
5178
5341
|
const summary = await orch.diffSummary(ref);
|
|
@@ -5185,7 +5348,7 @@ async function startMcpServer() {
|
|
|
5185
5348
|
server.tool(
|
|
5186
5349
|
"get_pr_checks",
|
|
5187
5350
|
"Snapshot of GitHub PR checks for a worktree thread (`gh pr checks` plus merge/review gates). null = no PR. If the user gave a goal (Greptile 5/5, CI green), the worktree agent watches with `gh pr checks --watch` via /long-running \u2014 this tool is a snapshot, not a waiter. Coordinators: do not run gh from the orchestration cwd.",
|
|
5188
|
-
{ ref:
|
|
5351
|
+
{ ref: z11.string().describe("Worktree thread id/ref") },
|
|
5189
5352
|
async ({ ref }) => {
|
|
5190
5353
|
try {
|
|
5191
5354
|
const checks = await orch.getPrChecks(ref);
|
|
@@ -5199,7 +5362,7 @@ async function startMcpServer() {
|
|
|
5199
5362
|
server.tool(
|
|
5200
5363
|
"request_review",
|
|
5201
5364
|
'Start a merge-readiness Review on a worktree agent thread (same as the desktop Review button). If that worktree has a single unused idle agent (no messages), runs the review there; otherwise opens a new Review chat tab. Attaches .claude/skills/review/SKILL.md when present (else copies .sideboard/review.md into .context/review.md, or seeds that file from the stock template), and sends "Review changes in this workspace." Expect Approve / Approve with nits / Request changes / Needs more information in that chat. The review stays there so the user can read it and type next steps \u2014 do not comment on or update the PR or ticket, and do not ask_user after the review, until they ask. Pass a worktree thread ref \u2014 not the orchestrator. Then wait_for_turn (loop while stillRunning) / get_turn_result on the returned review thread id.',
|
|
5202
|
-
{ ref:
|
|
5365
|
+
{ ref: z11.string().describe("Worktree thread id/ref to review") },
|
|
5203
5366
|
async ({ ref }) => {
|
|
5204
5367
|
try {
|
|
5205
5368
|
const tab = await orch.requestReview(ref);
|
|
@@ -5221,8 +5384,8 @@ async function startMcpServer() {
|
|
|
5221
5384
|
"ask_git",
|
|
5222
5385
|
"Commit & push, open a draft PR, mark ready for review, resolve conflicts, or merge \u2014 same prompts as the desktop git buttons (including Resolve). Always steers the worktree agent; does not push or open the PR locally. Then wait_for_turn (loop while stillRunning). Do not start a checks loop on a plain push \u2014 only if the user gave a goal (CI green, a review score, until checks pass). A push can wake a third-party PR review; the worktree agent acknowledges it only inside that goal. Pass a worktree thread ref (not the orchestrator). action=ready-for-review and action=merge only when the user explicitly asked (or clicked the desktop button). Do not run git or gh from the orchestration cwd.",
|
|
5223
5386
|
{
|
|
5224
|
-
ref:
|
|
5225
|
-
action:
|
|
5387
|
+
ref: z11.string().describe("Worktree thread id/ref"),
|
|
5388
|
+
action: z11.enum(AGENT_GIT_ACTIONS).describe(
|
|
5226
5389
|
"commit-push | create-draft | create-web | resolve-conflicts | ready-for-review | merge"
|
|
5227
5390
|
)
|
|
5228
5391
|
},
|
|
@@ -5251,7 +5414,7 @@ async function startMcpServer() {
|
|
|
5251
5414
|
}
|
|
5252
5415
|
}
|
|
5253
5416
|
);
|
|
5254
|
-
const agentEnum =
|
|
5417
|
+
const agentEnum = z11.enum(["claude", "codex", "opencode", "brightsy", "cursor", "acp"]);
|
|
5255
5418
|
server.tool(
|
|
5256
5419
|
"list_models",
|
|
5257
5420
|
"List models for an agent. Prefer Auto: do not call this unless you have a reason to pin a specific model (user request, cost/latency, capability). Omit agent to list all.",
|
|
@@ -5272,12 +5435,12 @@ async function startMcpServer() {
|
|
|
5272
5435
|
"fork_workspace",
|
|
5273
5436
|
"Fork a worktree agent chat into a NEW git worktree + chat (desktop \u201CFork to new workspace\u201D). Seeds a transcript (through through_index, default all). Optional agent override. Leave model unset for Auto (default) \u2014 only pass model when you have a reason. Not for the orchestrator. Then send_to_chat / wait_for_turn (loop while stillRunning) on the returned id.",
|
|
5274
5437
|
{
|
|
5275
|
-
ref:
|
|
5276
|
-
through_index:
|
|
5438
|
+
ref: z11.string().describe("Worktree thread id/ref to fork"),
|
|
5439
|
+
through_index: z11.number().optional().describe("Inclusive message index to include in the transcript (default: all)"),
|
|
5277
5440
|
agent: agentEnum.optional().describe("Agent for the forked chat (default: same as source)"),
|
|
5278
|
-
acpHarness:
|
|
5279
|
-
model:
|
|
5280
|
-
title:
|
|
5441
|
+
acpHarness: z11.enum(["gemini", "copilot"]).optional().describe("When agent is acp: gemini or copilot."),
|
|
5442
|
+
model: z11.string().nullable().optional().describe("Usually omit (Auto). Only set from list_models when you need a specific model"),
|
|
5443
|
+
title: z11.string().optional()
|
|
5281
5444
|
},
|
|
5282
5445
|
async ({ ref, through_index, agent, model, title, acpHarness }) => {
|
|
5283
5446
|
try {
|
|
@@ -5312,12 +5475,12 @@ async function startMcpServer() {
|
|
|
5312
5475
|
"fork_chat",
|
|
5313
5476
|
"Add another agent chat on the SAME workspace (same files, Run, and git). Also forks a Global orchestration chat into a new orchestration tab. Pass agent when the new chat should use a different harness. Leave model unset for Auto unless you have a reason. Orchestration forks require an MCP-capable agent (claude, cursor, codex, opencode \u2014 not brightsy). Use this for a second agent on a checkout (review, another harness, parallel work on the same branch). Do not create_workspace again for that \u2014 it returns the existing checkout. Then send_to_chat / wait_for_turn (loop while stillRunning) on the returned id. Use fork_workspace only when the work needs its own git checkout.",
|
|
5314
5477
|
{
|
|
5315
|
-
ref:
|
|
5316
|
-
through_index:
|
|
5478
|
+
ref: z11.string().describe("Thread id/ref to fork (worktree agent or orchestration chat)"),
|
|
5479
|
+
through_index: z11.number().optional().describe("Inclusive message index to include in the transcript (default: all)"),
|
|
5317
5480
|
agent: agentEnum.optional().describe("Agent for the forked chat (default: same as source). agent=acp with acpHarness=gemini or copilot opens Gemini CLI or Copilot CLI. An orchestration fork cannot use acp."),
|
|
5318
|
-
acpHarness:
|
|
5319
|
-
model:
|
|
5320
|
-
title:
|
|
5481
|
+
acpHarness: z11.enum(["gemini", "copilot"]).optional().describe("When agent is acp: gemini or copilot."),
|
|
5482
|
+
model: z11.string().nullable().optional().describe("Usually omit (Auto). Only set from list_models when you need a specific model"),
|
|
5483
|
+
title: z11.string().optional()
|
|
5321
5484
|
},
|
|
5322
5485
|
async ({ ref, through_index, agent, model, title, acpHarness }) => {
|
|
5323
5486
|
try {
|
|
@@ -5356,7 +5519,7 @@ async function startMcpServer() {
|
|
|
5356
5519
|
server.tool(
|
|
5357
5520
|
"run_setup",
|
|
5358
5521
|
"Re-run workspace setup (Sideboard/Conductor settings, .cursor/worktrees.json, or script/setup). New worktrees already run this automatically.",
|
|
5359
|
-
{ ref:
|
|
5522
|
+
{ ref: z11.string() },
|
|
5360
5523
|
async ({ ref }) => {
|
|
5361
5524
|
const result = await orch.runSetup(ref);
|
|
5362
5525
|
return mcpJson(result);
|
|
@@ -5365,7 +5528,7 @@ async function startMcpServer() {
|
|
|
5365
5528
|
server.tool(
|
|
5366
5529
|
"add_project",
|
|
5367
5530
|
"Register a git repo as a Sideboard workspace",
|
|
5368
|
-
{ repoPath:
|
|
5531
|
+
{ repoPath: z11.string() },
|
|
5369
5532
|
async ({ repoPath }) => {
|
|
5370
5533
|
const ws = await orch.addWorkspace(repoPath);
|
|
5371
5534
|
return mcpJson(ws);
|
|
@@ -5374,7 +5537,7 @@ async function startMcpServer() {
|
|
|
5374
5537
|
server.tool(
|
|
5375
5538
|
"remove_project",
|
|
5376
5539
|
"Unregister a Sideboard workspace and archive its chats",
|
|
5377
|
-
{ repoPath:
|
|
5540
|
+
{ repoPath: z11.string() },
|
|
5378
5541
|
async ({ repoPath }) => {
|
|
5379
5542
|
await orch.removeWorkspace(repoPath);
|
|
5380
5543
|
return { content: [{ type: "text", text: "ok" }] };
|
|
@@ -5384,12 +5547,12 @@ async function startMcpServer() {
|
|
|
5384
5547
|
"fanout",
|
|
5385
5548
|
"Best-of-n: create one thread per agent with the same prompt (parallel attempts)",
|
|
5386
5549
|
{
|
|
5387
|
-
prompt:
|
|
5388
|
-
agents:
|
|
5389
|
-
repoPath:
|
|
5390
|
-
sourceType:
|
|
5391
|
-
sourceRef:
|
|
5392
|
-
title:
|
|
5550
|
+
prompt: z11.string(),
|
|
5551
|
+
agents: z11.array(z11.enum(["claude", "codex", "opencode", "brightsy", "cursor", "acp"])),
|
|
5552
|
+
repoPath: z11.string(),
|
|
5553
|
+
sourceType: z11.enum(["branch", "pr", "ticket"]).optional(),
|
|
5554
|
+
sourceRef: z11.string().optional(),
|
|
5555
|
+
title: z11.string().optional()
|
|
5393
5556
|
},
|
|
5394
5557
|
async (args) => {
|
|
5395
5558
|
const threads = await orch.bestOfN(args);
|
|
@@ -5407,8 +5570,8 @@ async function startMcpServer() {
|
|
|
5407
5570
|
"list_branches",
|
|
5408
5571
|
"List git branches in a registered workspace. Pass repoPath from list_projects (unmerged into the default branch by default \u2014 for create_workspace sourceType=branch).",
|
|
5409
5572
|
{
|
|
5410
|
-
repoPath:
|
|
5411
|
-
unmergedOnly:
|
|
5573
|
+
repoPath: z11.string(),
|
|
5574
|
+
unmergedOnly: z11.boolean().optional()
|
|
5412
5575
|
},
|
|
5413
5576
|
async ({ repoPath, unmergedOnly }) => {
|
|
5414
5577
|
const root = await resolveRepoRoot(repoPath);
|
|
@@ -5429,19 +5592,19 @@ async function startMcpServer() {
|
|
|
5429
5592
|
"list_prs",
|
|
5430
5593
|
`List GitHub PRs for a registered workspace (the review surface for assigned ticket work \u2014 not the tickets). Pass repoPath from list_projects. "Get me N tickets to review" \u2192 queue=review and limit=N: open non-draft PRs labeled with this project's ready-for-review GitHub label (Settings \u2192 Projects; default eng-review) with no individual user reviewer. Prefer teams that match Settings \u2192 Agents / Projects roles for this repo. A team like engineering-team is not a claim (you are on that team). Also: state (open|closed|merged|all|review), label, reviewer (me|unassigned|login), query, limit (default 40, max 250). Then create_workspace with sourceType=pr.`,
|
|
5431
5594
|
{
|
|
5432
|
-
repoPath:
|
|
5433
|
-
query:
|
|
5434
|
-
queue:
|
|
5595
|
+
repoPath: z11.string(),
|
|
5596
|
+
query: z11.string().optional().describe("GitHub search tokens (title, draft:true, \u2026)"),
|
|
5597
|
+
queue: z11.enum(["review", "mine", "approved", "changes"]).optional().describe(
|
|
5435
5598
|
"review = unclaimed ready-for-review inbox (Settings \u2192 Projects label, default eng-review). mine = review-requested:@me. approved / changes = eng-approved / eng-requested-changes."
|
|
5436
5599
|
),
|
|
5437
|
-
state:
|
|
5438
|
-
label:
|
|
5600
|
+
state: z11.enum(["open", "closed", "merged", "all", "review"]).optional().describe("GitHub PR state (default open). review is an alias for queue=review."),
|
|
5601
|
+
label: z11.string().optional().describe(
|
|
5439
5602
|
"GitHub label / workflow tag. Comma-separated AND. Examples: eng-review, eng-approved, eng-requested-changes"
|
|
5440
5603
|
),
|
|
5441
|
-
reviewer:
|
|
5604
|
+
reviewer: z11.string().optional().describe(
|
|
5442
5605
|
"me (review requested of you), unassigned (no individual reviewer; team queues like engineering-team still count), all, or a GitHub login"
|
|
5443
5606
|
),
|
|
5444
|
-
limit:
|
|
5607
|
+
limit: z11.number().int().positive().max(250).optional().describe("Page size (default 40, max 250). Raise when truncated is true.")
|
|
5445
5608
|
},
|
|
5446
5609
|
async ({ repoPath, query, queue, state, label, reviewer, limit }) => {
|
|
5447
5610
|
const root = await resolveRepoRoot(repoPath);
|
|
@@ -5474,7 +5637,7 @@ async function startMcpServer() {
|
|
|
5474
5637
|
server.tool(
|
|
5475
5638
|
"get_pr_stack",
|
|
5476
5639
|
"Load the GitHub PR stack for a thread worktree (`gh stack view --json`). Returns null JSON when the branch is not stacked. Prefer this before ask_git merge on stacked PRs (and only merge when the user explicitly asked).",
|
|
5477
|
-
{ ref:
|
|
5640
|
+
{ ref: z11.string() },
|
|
5478
5641
|
async ({ ref }) => {
|
|
5479
5642
|
const stack = await orch.getPrStack(ref);
|
|
5480
5643
|
return mcpJson(stack);
|
|
@@ -5484,8 +5647,8 @@ async function startMcpServer() {
|
|
|
5484
5647
|
"open_pr_stack_layers",
|
|
5485
5648
|
"Materialize one worktree+thread per stack layer (or a single 1-based layer). Pass a thread ref already on the stack.",
|
|
5486
5649
|
{
|
|
5487
|
-
ref:
|
|
5488
|
-
layer:
|
|
5650
|
+
ref: z11.string(),
|
|
5651
|
+
layer: z11.number().int().positive().optional()
|
|
5489
5652
|
},
|
|
5490
5653
|
async ({ ref, layer }) => {
|
|
5491
5654
|
const result = await orch.openPrStackLayers(ref, { layer });
|
|
@@ -5508,9 +5671,9 @@ async function startMcpServer() {
|
|
|
5508
5671
|
"add_stack_layer",
|
|
5509
5672
|
"Add a branch on top of the current stack (`gh stack add`) and open a worktree+thread for it.",
|
|
5510
5673
|
{
|
|
5511
|
-
ref:
|
|
5512
|
-
branchName:
|
|
5513
|
-
title:
|
|
5674
|
+
ref: z11.string(),
|
|
5675
|
+
branchName: z11.string(),
|
|
5676
|
+
title: z11.string().optional()
|
|
5514
5677
|
},
|
|
5515
5678
|
async ({ ref, branchName, title }) => {
|
|
5516
5679
|
const result = await orch.addStackLayer(ref, branchName, { title });
|
|
@@ -5528,11 +5691,11 @@ async function startMcpServer() {
|
|
|
5528
5691
|
"create_pr_stack",
|
|
5529
5692
|
"Create a new GitHub PR stack with one Sideboard worktree per layer (bottom\u2192top branch names). Requires `gh extension install github/gh-stack`.",
|
|
5530
5693
|
{
|
|
5531
|
-
repoPath:
|
|
5532
|
-
branches:
|
|
5533
|
-
agent:
|
|
5534
|
-
base:
|
|
5535
|
-
title:
|
|
5694
|
+
repoPath: z11.string(),
|
|
5695
|
+
branches: z11.array(z11.string()).min(1),
|
|
5696
|
+
agent: z11.enum(["claude", "codex", "opencode", "brightsy", "cursor", "acp"]),
|
|
5697
|
+
base: z11.string().optional(),
|
|
5698
|
+
title: z11.string().optional()
|
|
5536
5699
|
},
|
|
5537
5700
|
async (args) => {
|
|
5538
5701
|
const result = await orch.createPrStack({
|
|
@@ -5560,10 +5723,10 @@ async function startMcpServer() {
|
|
|
5560
5723
|
"list_issues",
|
|
5561
5724
|
"List or search issues (Linear, AbleTime, or GitHub; falls back to GitHub). Cursor Origin has no issue tracker \u2014 a Cursor repo returns unavailableReason unless Linear or AbleTime is the source. Entire tickets are Trails (`entire trail`), not GitHub Issues, so an Entire repo does the same unless Linear or AbleTime is the source. Use Settings \u2192 Agents / Projects notes and roles to pick tickets relevant to the viewer (query + assignee=me or unassigned as the notes say). Default 40; pass query and/or limit (max 250) when truncated. assignee: me (Linear default), unassigned, all, or a user id. Pass updatedSince for new/updated tickets and new comments (\u201Cany updates since yesterday?\u201D). Then create_workspace with sourceType=ticket.",
|
|
5562
5725
|
{
|
|
5563
|
-
repoPath:
|
|
5564
|
-
query:
|
|
5565
|
-
assignee:
|
|
5566
|
-
limit:
|
|
5726
|
+
repoPath: z11.string(),
|
|
5727
|
+
query: z11.string().optional().describe("Search title, identifier, or description"),
|
|
5728
|
+
assignee: z11.string().optional().describe("me (Linear default), unassigned, all, a user id, or a GitHub login"),
|
|
5729
|
+
limit: z11.number().int().positive().max(250).optional().describe("Page size (default 40, max 250). Raise when truncated is true."),
|
|
5567
5730
|
updatedSince: mcpIssueUpdatedSinceSchema
|
|
5568
5731
|
},
|
|
5569
5732
|
async ({ repoPath, query, assignee, limit, updatedSince }) => {
|