@sideboard-ai/core 0.1.351 → 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-INTH7J3F.js → agents-4DQDWMSX.js} +9 -9
- package/dist/{agents-D5CL4CR4.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-BDWVBEKN.js → chunk-CQDJ4RX4.js} +149 -127
- package/dist/{chunk-SMSD6U3N.js → chunk-GA5MLYVG.js} +1 -1
- package/dist/{chunk-HISSQICH.js → chunk-HBRP2SHA.js} +3 -3
- 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-C3E2DGDF.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-UXAKH4AW.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-AEEOYLVK.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-AAKQU4UZ.js → chunk-UDTFOKVX.js} +28 -10
- package/dist/{chunk-PXSWVZIL.js → chunk-UPJB6TFI.js} +2 -2
- package/dist/{chunk-7WPQAVS5.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-SZY23KGS.js → chunk-WTT525MC.js} +3 -3
- 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-FWYWIHEW.js → conductor-2UOW2XBE.js} +6 -6
- package/dist/{conductor-W2X7QUKZ.js → conductor-6NYG2SZA.js} +6 -6
- package/dist/{coordinator-prompt-J57Q4Z4W.js → coordinator-prompt-K3WT5UVS.js} +4 -4
- package/dist/{coordinator-prompt-KIHNLENN.js → coordinator-prompt-ZP6AEETR.js} +4 -4
- package/dist/{global-workspace-WXDWFZAN.js → global-workspace-EFPSYP4N.js} +4 -4
- package/dist/{global-workspace-CGB5CY4U.js → global-workspace-EPVNFQVC.js} +4 -4
- package/dist/index.cjs +1192 -865
- package/dist/index.d.cts +8 -10
- package/dist/index.d.ts +8 -10
- package/dist/index.js +361 -315
- 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 +1116 -802
- package/dist/mcp/run-stdio.js +342 -308
- 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-DMEE7CEW.js → orchestrator-5BCHUAFG.js} +11 -11
- package/dist/{orchestrator-MUD4FY7Q.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-ZCTF4ECL.js → workspaces-KL4SZMJE.js} +4 -4
- package/dist/{workspaces-7DPHDXNY.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";
|
|
@@ -3832,7 +3865,7 @@ function satisfyOrderDependency(id, satisfied = true) {
|
|
|
3832
3865
|
}
|
|
3833
3866
|
|
|
3834
3867
|
// src/mcp/order-tools.ts
|
|
3835
|
-
var kindSchema =
|
|
3868
|
+
var kindSchema = z10.enum(["pr", "issue", "workspace", "orchestration"]);
|
|
3836
3869
|
function callerThread2() {
|
|
3837
3870
|
const id = process.env[SIDEBOARD_THREAD_ID_ENV]?.trim();
|
|
3838
3871
|
if (!id) return null;
|
|
@@ -3904,16 +3937,16 @@ function registerOrderTools(server) {
|
|
|
3904
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.",
|
|
3905
3938
|
{
|
|
3906
3939
|
waitsOnKind: kindSchema.describe("What must happen first: pr, issue, workspace, or orchestration"),
|
|
3907
|
-
waitsOnRef:
|
|
3908
|
-
waitsOnRepoPath:
|
|
3909
|
-
waitsOnLabel:
|
|
3910
|
-
gate:
|
|
3911
|
-
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"),
|
|
3912
3945
|
subjectKind: kindSchema.optional().describe("What is held. Required from orchestration. Omit on a worktree to mean this checkout."),
|
|
3913
|
-
subjectRef:
|
|
3914
|
-
subjectRepoPath:
|
|
3915
|
-
subjectLabel:
|
|
3916
|
-
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")
|
|
3917
3950
|
},
|
|
3918
3951
|
async (args) => {
|
|
3919
3952
|
try {
|
|
@@ -3977,9 +4010,9 @@ function registerOrderTools(server) {
|
|
|
3977
4010
|
"set_plan",
|
|
3978
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.",
|
|
3979
4012
|
{
|
|
3980
|
-
title:
|
|
3981
|
-
summary:
|
|
3982
|
-
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")
|
|
3983
4016
|
},
|
|
3984
4017
|
async ({ title, summary, goal }) => {
|
|
3985
4018
|
try {
|
|
@@ -3999,7 +4032,7 @@ function registerOrderTools(server) {
|
|
|
3999
4032
|
"execute_plan",
|
|
4000
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.",
|
|
4001
4034
|
{
|
|
4002
|
-
agreed:
|
|
4035
|
+
agreed: z10.literal(true).describe("True only after the user has seen the plan and told you to run it")
|
|
4003
4036
|
},
|
|
4004
4037
|
async () => {
|
|
4005
4038
|
try {
|
|
@@ -4069,7 +4102,7 @@ function registerOrderTools(server) {
|
|
|
4069
4102
|
server.tool(
|
|
4070
4103
|
"clear_dependency",
|
|
4071
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.",
|
|
4072
|
-
{ id:
|
|
4105
|
+
{ id: z10.string().describe("Step id from list_order") },
|
|
4073
4106
|
async ({ id }) => {
|
|
4074
4107
|
try {
|
|
4075
4108
|
const caller = callerThread2();
|
|
@@ -4088,8 +4121,8 @@ function registerOrderTools(server) {
|
|
|
4088
4121
|
"satisfy_dependency",
|
|
4089
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.",
|
|
4090
4123
|
{
|
|
4091
|
-
id:
|
|
4092
|
-
satisfied:
|
|
4124
|
+
id: z10.string().describe("Step id from list_order"),
|
|
4125
|
+
satisfied: z10.boolean().optional().describe("false clears the manual mark. Default true.")
|
|
4093
4126
|
},
|
|
4094
4127
|
async ({ id, satisfied }) => {
|
|
4095
4128
|
try {
|
|
@@ -4442,7 +4475,7 @@ async function startMcpServer() {
|
|
|
4442
4475
|
);
|
|
4443
4476
|
}
|
|
4444
4477
|
try {
|
|
4445
|
-
const { maxConcurrentAgents } = await import("../app-settings-
|
|
4478
|
+
const { maxConcurrentAgents } = await import("../app-settings-X3UFWRAF.js");
|
|
4446
4479
|
orch.setMaxConcurrent(maxConcurrentAgents());
|
|
4447
4480
|
} catch {
|
|
4448
4481
|
}
|
|
@@ -4526,16 +4559,16 @@ async function startMcpServer() {
|
|
|
4526
4559
|
"list_board",
|
|
4527
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.",
|
|
4528
4561
|
{
|
|
4529
|
-
query:
|
|
4530
|
-
repoPath:
|
|
4531
|
-
kind:
|
|
4532
|
-
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(
|
|
4533
4566
|
"Mine = PRs you authored or local WIP; reviewing = someone else's PR. Uses the gh login."
|
|
4534
4567
|
),
|
|
4535
|
-
column:
|
|
4568
|
+
column: z11.enum(["new", "draft", "review", "approved", "done", "needs_you"]).optional().describe(
|
|
4536
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."
|
|
4537
4570
|
),
|
|
4538
|
-
limit:
|
|
4571
|
+
limit: z11.number().int().positive().optional().describe("Max cards per column (default 40). hidden counts the remainder.")
|
|
4539
4572
|
},
|
|
4540
4573
|
async ({ query, repoPath, kind, ownership, column, limit }) => {
|
|
4541
4574
|
const workspaces = orch.listWorkspaces();
|
|
@@ -4565,7 +4598,7 @@ async function startMcpServer() {
|
|
|
4565
4598
|
server.tool(
|
|
4566
4599
|
"get_chat",
|
|
4567
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).",
|
|
4568
|
-
{ ref:
|
|
4601
|
+
{ ref: z11.string() },
|
|
4569
4602
|
async ({ ref }) => {
|
|
4570
4603
|
const t = orch.getThread(ref);
|
|
4571
4604
|
if (!t) {
|
|
@@ -4612,17 +4645,17 @@ async function startMcpServer() {
|
|
|
4612
4645
|
"present_artifact",
|
|
4613
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.",
|
|
4614
4647
|
{
|
|
4615
|
-
title:
|
|
4616
|
-
type:
|
|
4648
|
+
title: z11.string().describe("Short title shown in the artifact pane header"),
|
|
4649
|
+
type: z11.enum(["html", "svg", "markdown", "react", "log"]).describe(
|
|
4617
4650
|
"html/svg/markdown/react replace the pane. log appends content to the same artifact_id (new lines only)."
|
|
4618
4651
|
),
|
|
4619
|
-
content:
|
|
4652
|
+
content: z11.string().describe(
|
|
4620
4653
|
"html/svg/markdown/react: full document. log: only the new lines since the last call (empty is ok for a status-only update)."
|
|
4621
4654
|
),
|
|
4622
|
-
artifact_id:
|
|
4623
|
-
status:
|
|
4624
|
-
phase:
|
|
4625
|
-
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")
|
|
4626
4659
|
},
|
|
4627
4660
|
async ({ title, type, artifact_id, status, phase, mode }) => {
|
|
4628
4661
|
return mcpJson(
|
|
@@ -4635,15 +4668,15 @@ async function startMcpServer() {
|
|
|
4635
4668
|
"ask_user",
|
|
4636
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.",
|
|
4637
4670
|
{
|
|
4638
|
-
questions:
|
|
4639
|
-
|
|
4640
|
-
question:
|
|
4641
|
-
header:
|
|
4642
|
-
multiSelect:
|
|
4643
|
-
options:
|
|
4644
|
-
|
|
4645
|
-
label:
|
|
4646
|
-
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)")
|
|
4647
4680
|
})
|
|
4648
4681
|
).min(2).max(6).describe("2\u20136 choices (Sideboard also offers Other)")
|
|
4649
4682
|
})
|
|
@@ -4669,9 +4702,9 @@ async function startMcpServer() {
|
|
|
4669
4702
|
"present_plan",
|
|
4670
4703
|
PRESENT_PLAN_TOOL_DESCRIPTION,
|
|
4671
4704
|
{
|
|
4672
|
-
title:
|
|
4673
|
-
content:
|
|
4674
|
-
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")
|
|
4675
4708
|
},
|
|
4676
4709
|
async ({ title, content, thread_id }) => {
|
|
4677
4710
|
const { writePlanFile } = await import("../plan-file-VAHV5WBB.js");
|
|
@@ -4700,15 +4733,15 @@ async function startMcpServer() {
|
|
|
4700
4733
|
"present_schema",
|
|
4701
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.",
|
|
4702
4735
|
{
|
|
4703
|
-
title:
|
|
4704
|
-
mode:
|
|
4705
|
-
datasource:
|
|
4706
|
-
resource_id:
|
|
4707
|
-
record_id:
|
|
4708
|
-
resource:
|
|
4709
|
-
record:
|
|
4710
|
-
records:
|
|
4711
|
-
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")
|
|
4712
4745
|
},
|
|
4713
4746
|
async (args) => {
|
|
4714
4747
|
const id = args.pane_id?.trim() || `schema_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 8)}`;
|
|
@@ -4729,10 +4762,10 @@ async function startMcpServer() {
|
|
|
4729
4762
|
"present_files",
|
|
4730
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.",
|
|
4731
4764
|
{
|
|
4732
|
-
title:
|
|
4733
|
-
datasource:
|
|
4734
|
-
path:
|
|
4735
|
-
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")
|
|
4736
4769
|
},
|
|
4737
4770
|
async (args) => {
|
|
4738
4771
|
const id = args.pane_id?.trim() || `files_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 8)}`;
|
|
@@ -4752,8 +4785,8 @@ async function startMcpServer() {
|
|
|
4752
4785
|
"wait_for_job",
|
|
4753
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.",
|
|
4754
4787
|
{
|
|
4755
|
-
id:
|
|
4756
|
-
timeoutMs:
|
|
4788
|
+
id: z11.string().describe("Detached job id (same kebab-case id passed to detached-job.cjs start)"),
|
|
4789
|
+
timeoutMs: z11.number().optional()
|
|
4757
4790
|
},
|
|
4758
4791
|
async ({ id, timeoutMs }) => {
|
|
4759
4792
|
const result = await waitForDetachedJob(process.cwd(), id, {
|
|
@@ -4766,8 +4799,8 @@ async function startMcpServer() {
|
|
|
4766
4799
|
"stop_job",
|
|
4767
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.",
|
|
4768
4801
|
{
|
|
4769
|
-
id:
|
|
4770
|
-
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)")
|
|
4771
4804
|
},
|
|
4772
4805
|
async ({ id, reason }) => {
|
|
4773
4806
|
const result = await stopDetachedJob(process.cwd(), id, { reason });
|
|
@@ -4779,7 +4812,7 @@ async function startMcpServer() {
|
|
|
4779
4812
|
"list_run_scripts",
|
|
4780
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).",
|
|
4781
4814
|
{
|
|
4782
|
-
ref:
|
|
4815
|
+
ref: z11.string().optional().describe("Thread id. Omit on a worktree turn (uses cwd).")
|
|
4783
4816
|
},
|
|
4784
4817
|
async ({ ref }) => {
|
|
4785
4818
|
try {
|
|
@@ -4809,8 +4842,8 @@ async function startMcpServer() {
|
|
|
4809
4842
|
"run_dev_script",
|
|
4810
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.",
|
|
4811
4844
|
{
|
|
4812
|
-
ref:
|
|
4813
|
-
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).")
|
|
4814
4847
|
},
|
|
4815
4848
|
async ({ ref, name }) => {
|
|
4816
4849
|
try {
|
|
@@ -4838,8 +4871,8 @@ async function startMcpServer() {
|
|
|
4838
4871
|
"stop_dev_script",
|
|
4839
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).",
|
|
4840
4873
|
{
|
|
4841
|
-
ref:
|
|
4842
|
-
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.")
|
|
4843
4876
|
},
|
|
4844
4877
|
async ({ ref, name }) => {
|
|
4845
4878
|
try {
|
|
@@ -4856,9 +4889,9 @@ async function startMcpServer() {
|
|
|
4856
4889
|
"get_run_log",
|
|
4857
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.",
|
|
4858
4891
|
{
|
|
4859
|
-
ref:
|
|
4860
|
-
name:
|
|
4861
|
-
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(
|
|
4862
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.`
|
|
4863
4896
|
)
|
|
4864
4897
|
},
|
|
@@ -4891,6 +4924,7 @@ async function startMcpServer() {
|
|
|
4891
4924
|
}
|
|
4892
4925
|
}
|
|
4893
4926
|
);
|
|
4927
|
+
registerComputerUseTool(server, mcpCatalog);
|
|
4894
4928
|
if (worktreeProfile) {
|
|
4895
4929
|
server.tool(
|
|
4896
4930
|
"get_orchestrator",
|
|
@@ -4921,8 +4955,8 @@ async function startMcpServer() {
|
|
|
4921
4955
|
"notify_orchestrator",
|
|
4922
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.",
|
|
4923
4957
|
{
|
|
4924
|
-
message:
|
|
4925
|
-
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(
|
|
4926
4960
|
"input-required = waiting on the user in this chat; blocked = need the coordinator (default)."
|
|
4927
4961
|
)
|
|
4928
4962
|
},
|
|
@@ -4961,11 +4995,11 @@ async function startMcpServer() {
|
|
|
4961
4995
|
"set_workspace_tags",
|
|
4962
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.",
|
|
4963
4997
|
{
|
|
4964
|
-
ref:
|
|
4998
|
+
ref: z11.string().optional().describe(
|
|
4965
4999
|
worktreeProfile ? "Omit for this chat. Another chat id only if it is on this same checkout." : "Chat id on the workspace to label."
|
|
4966
5000
|
),
|
|
4967
|
-
tags:
|
|
4968
|
-
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()
|
|
4969
5003
|
},
|
|
4970
5004
|
async ({ ref, tags, mode }) => {
|
|
4971
5005
|
try {
|
|
@@ -4993,10 +5027,10 @@ async function startMcpServer() {
|
|
|
4993
5027
|
"set_wake_on_github_edges",
|
|
4994
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.",
|
|
4995
5029
|
{
|
|
4996
|
-
ref:
|
|
5030
|
+
ref: z11.string().optional().describe(
|
|
4997
5031
|
worktreeProfile ? "Omit for this chat. Another chat id only if it is on this same checkout." : "Chat id on the workspace."
|
|
4998
5032
|
),
|
|
4999
|
-
enabled:
|
|
5033
|
+
enabled: z11.boolean().describe("True opts the checkout in. False turns it off.")
|
|
5000
5034
|
},
|
|
5001
5035
|
async ({ ref, enabled }) => {
|
|
5002
5036
|
try {
|
|
@@ -5022,14 +5056,14 @@ async function startMcpServer() {
|
|
|
5022
5056
|
if (!worktreeProfile) {
|
|
5023
5057
|
registerConnectedIssueVendorTools(server);
|
|
5024
5058
|
const { getCaffeinateHold, setCaffeinateHold } = await import("../caffeinate-hold-H7TTUDGM.js");
|
|
5025
|
-
const { resolveNewThreadOptions, resolveThreadDefaults } = await import("../app-settings-
|
|
5059
|
+
const { resolveNewThreadOptions, resolveThreadDefaults } = await import("../app-settings-X3UFWRAF.js");
|
|
5026
5060
|
const accountDefaults = resolveThreadDefaults();
|
|
5027
5061
|
const accountDefaultsHint = `Account defaults: agent=${accountDefaults.agent}, model=${accountDefaults.model?.trim() || "Auto"}, effort=${accountDefaults.effort}`;
|
|
5028
5062
|
server.tool(
|
|
5029
5063
|
"set_caffeinate",
|
|
5030
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.",
|
|
5031
5065
|
{
|
|
5032
|
-
enabled:
|
|
5066
|
+
enabled: z11.boolean().describe("true = hold caffeinate on; false = release and let the Mac sleep")
|
|
5033
5067
|
},
|
|
5034
5068
|
async ({ enabled }) => {
|
|
5035
5069
|
const threadId = process.env.SIDEBOARD_ORCHESTRATOR_THREAD_ID?.trim() || null;
|
|
@@ -5055,25 +5089,25 @@ async function startMcpServer() {
|
|
|
5055
5089
|
"create_workspace",
|
|
5056
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.`,
|
|
5057
5091
|
{
|
|
5058
|
-
sourceType:
|
|
5059
|
-
sourceRef:
|
|
5060
|
-
agent:
|
|
5092
|
+
sourceType: z11.enum(["branch", "pr", "ticket"]),
|
|
5093
|
+
sourceRef: z11.string(),
|
|
5094
|
+
agent: z11.enum(["claude", "codex", "opencode", "brightsy", "cursor", "acp"]).optional().describe(
|
|
5061
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.`
|
|
5062
5096
|
),
|
|
5063
|
-
acpHarness:
|
|
5064
|
-
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(
|
|
5065
5099
|
`Usually omit to use Account default model (${accountDefaults.model?.trim() || "Auto"}). Pass null only to force Auto / agent-default.`
|
|
5066
5100
|
),
|
|
5067
|
-
repoPath:
|
|
5068
|
-
title:
|
|
5069
|
-
cowboy:
|
|
5101
|
+
repoPath: z11.string(),
|
|
5102
|
+
title: z11.string().optional(),
|
|
5103
|
+
cowboy: z11.boolean().optional().describe(
|
|
5070
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."
|
|
5071
5105
|
),
|
|
5072
|
-
parentChatId:
|
|
5106
|
+
parentChatId: z11.string().optional().describe(
|
|
5073
5107
|
"Orchestration: omit (preferred) or pass YOUR chat id from the turn reminder / AGENTS.md. Do not invent uuids."
|
|
5074
5108
|
),
|
|
5075
|
-
parentThreadId:
|
|
5076
|
-
tags:
|
|
5109
|
+
parentThreadId: z11.string().optional().describe("Legacy alias for parentChatId."),
|
|
5110
|
+
tags: z11.union([z11.string(), z11.array(z11.string())]).optional().describe(
|
|
5077
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."
|
|
5078
5112
|
)
|
|
5079
5113
|
},
|
|
@@ -5089,11 +5123,11 @@ async function startMcpServer() {
|
|
|
5089
5123
|
"start_board_card",
|
|
5090
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.",
|
|
5091
5125
|
{
|
|
5092
|
-
kind:
|
|
5093
|
-
ref:
|
|
5094
|
-
repoPath:
|
|
5095
|
-
title:
|
|
5096
|
-
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(
|
|
5097
5131
|
"Short labels for this workspace. Same tags on every checkout for one task. Added when the checkout already exists."
|
|
5098
5132
|
)
|
|
5099
5133
|
},
|
|
@@ -5198,9 +5232,9 @@ async function startMcpServer() {
|
|
|
5198
5232
|
"send_to_chat",
|
|
5199
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.',
|
|
5200
5234
|
{
|
|
5201
|
-
ref:
|
|
5202
|
-
prompt:
|
|
5203
|
-
force_stop:
|
|
5235
|
+
ref: z11.string(),
|
|
5236
|
+
prompt: z11.string(),
|
|
5237
|
+
force_stop: z11.boolean().optional()
|
|
5204
5238
|
},
|
|
5205
5239
|
async ({ ref, prompt, force_stop }) => {
|
|
5206
5240
|
if (force_stop) {
|
|
@@ -5225,8 +5259,8 @@ async function startMcpServer() {
|
|
|
5225
5259
|
"wait_for_turn",
|
|
5226
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).",
|
|
5227
5261
|
{
|
|
5228
|
-
ref:
|
|
5229
|
-
timeoutMs:
|
|
5262
|
+
ref: z11.string(),
|
|
5263
|
+
timeoutMs: z11.number().optional()
|
|
5230
5264
|
},
|
|
5231
5265
|
async ({ ref, timeoutMs }) => {
|
|
5232
5266
|
const thread = await orch.waitForTurn(ref, mcpWaitForTurnTimeoutMs(timeoutMs), {
|
|
@@ -5254,7 +5288,7 @@ async function startMcpServer() {
|
|
|
5254
5288
|
server.tool(
|
|
5255
5289
|
"get_turn_result",
|
|
5256
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).",
|
|
5257
|
-
{ ref:
|
|
5291
|
+
{ ref: z11.string() },
|
|
5258
5292
|
async ({ ref }) => {
|
|
5259
5293
|
const result = orch.getTurnResult(ref);
|
|
5260
5294
|
const failureClass = result.taskState === "failed" && result.status !== "broken" ? classifyTurnFailure(result.lastError || result.text) : null;
|
|
@@ -5272,9 +5306,9 @@ async function startMcpServer() {
|
|
|
5272
5306
|
"stop_chat",
|
|
5273
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.",
|
|
5274
5308
|
{
|
|
5275
|
-
ref:
|
|
5276
|
-
force:
|
|
5277
|
-
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.")
|
|
5278
5312
|
},
|
|
5279
5313
|
async ({ ref, force, reason }) => {
|
|
5280
5314
|
const t = orch.getThread(ref);
|
|
@@ -5300,8 +5334,8 @@ async function startMcpServer() {
|
|
|
5300
5334
|
"get_diff",
|
|
5301
5335
|
"Compact diff summary (capped hunks, paginated)",
|
|
5302
5336
|
{
|
|
5303
|
-
ref:
|
|
5304
|
-
maxFiles:
|
|
5337
|
+
ref: z11.string(),
|
|
5338
|
+
maxFiles: z11.number().optional()
|
|
5305
5339
|
},
|
|
5306
5340
|
async ({ ref, maxFiles }) => {
|
|
5307
5341
|
const summary = await orch.diffSummary(ref);
|
|
@@ -5314,7 +5348,7 @@ async function startMcpServer() {
|
|
|
5314
5348
|
server.tool(
|
|
5315
5349
|
"get_pr_checks",
|
|
5316
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.",
|
|
5317
|
-
{ ref:
|
|
5351
|
+
{ ref: z11.string().describe("Worktree thread id/ref") },
|
|
5318
5352
|
async ({ ref }) => {
|
|
5319
5353
|
try {
|
|
5320
5354
|
const checks = await orch.getPrChecks(ref);
|
|
@@ -5328,7 +5362,7 @@ async function startMcpServer() {
|
|
|
5328
5362
|
server.tool(
|
|
5329
5363
|
"request_review",
|
|
5330
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.',
|
|
5331
|
-
{ ref:
|
|
5365
|
+
{ ref: z11.string().describe("Worktree thread id/ref to review") },
|
|
5332
5366
|
async ({ ref }) => {
|
|
5333
5367
|
try {
|
|
5334
5368
|
const tab = await orch.requestReview(ref);
|
|
@@ -5350,8 +5384,8 @@ async function startMcpServer() {
|
|
|
5350
5384
|
"ask_git",
|
|
5351
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.",
|
|
5352
5386
|
{
|
|
5353
|
-
ref:
|
|
5354
|
-
action:
|
|
5387
|
+
ref: z11.string().describe("Worktree thread id/ref"),
|
|
5388
|
+
action: z11.enum(AGENT_GIT_ACTIONS).describe(
|
|
5355
5389
|
"commit-push | create-draft | create-web | resolve-conflicts | ready-for-review | merge"
|
|
5356
5390
|
)
|
|
5357
5391
|
},
|
|
@@ -5380,7 +5414,7 @@ async function startMcpServer() {
|
|
|
5380
5414
|
}
|
|
5381
5415
|
}
|
|
5382
5416
|
);
|
|
5383
|
-
const agentEnum =
|
|
5417
|
+
const agentEnum = z11.enum(["claude", "codex", "opencode", "brightsy", "cursor", "acp"]);
|
|
5384
5418
|
server.tool(
|
|
5385
5419
|
"list_models",
|
|
5386
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.",
|
|
@@ -5401,12 +5435,12 @@ async function startMcpServer() {
|
|
|
5401
5435
|
"fork_workspace",
|
|
5402
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.",
|
|
5403
5437
|
{
|
|
5404
|
-
ref:
|
|
5405
|
-
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)"),
|
|
5406
5440
|
agent: agentEnum.optional().describe("Agent for the forked chat (default: same as source)"),
|
|
5407
|
-
acpHarness:
|
|
5408
|
-
model:
|
|
5409
|
-
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()
|
|
5410
5444
|
},
|
|
5411
5445
|
async ({ ref, through_index, agent, model, title, acpHarness }) => {
|
|
5412
5446
|
try {
|
|
@@ -5441,12 +5475,12 @@ async function startMcpServer() {
|
|
|
5441
5475
|
"fork_chat",
|
|
5442
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.",
|
|
5443
5477
|
{
|
|
5444
|
-
ref:
|
|
5445
|
-
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)"),
|
|
5446
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."),
|
|
5447
|
-
acpHarness:
|
|
5448
|
-
model:
|
|
5449
|
-
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()
|
|
5450
5484
|
},
|
|
5451
5485
|
async ({ ref, through_index, agent, model, title, acpHarness }) => {
|
|
5452
5486
|
try {
|
|
@@ -5485,7 +5519,7 @@ async function startMcpServer() {
|
|
|
5485
5519
|
server.tool(
|
|
5486
5520
|
"run_setup",
|
|
5487
5521
|
"Re-run workspace setup (Sideboard/Conductor settings, .cursor/worktrees.json, or script/setup). New worktrees already run this automatically.",
|
|
5488
|
-
{ ref:
|
|
5522
|
+
{ ref: z11.string() },
|
|
5489
5523
|
async ({ ref }) => {
|
|
5490
5524
|
const result = await orch.runSetup(ref);
|
|
5491
5525
|
return mcpJson(result);
|
|
@@ -5494,7 +5528,7 @@ async function startMcpServer() {
|
|
|
5494
5528
|
server.tool(
|
|
5495
5529
|
"add_project",
|
|
5496
5530
|
"Register a git repo as a Sideboard workspace",
|
|
5497
|
-
{ repoPath:
|
|
5531
|
+
{ repoPath: z11.string() },
|
|
5498
5532
|
async ({ repoPath }) => {
|
|
5499
5533
|
const ws = await orch.addWorkspace(repoPath);
|
|
5500
5534
|
return mcpJson(ws);
|
|
@@ -5503,7 +5537,7 @@ async function startMcpServer() {
|
|
|
5503
5537
|
server.tool(
|
|
5504
5538
|
"remove_project",
|
|
5505
5539
|
"Unregister a Sideboard workspace and archive its chats",
|
|
5506
|
-
{ repoPath:
|
|
5540
|
+
{ repoPath: z11.string() },
|
|
5507
5541
|
async ({ repoPath }) => {
|
|
5508
5542
|
await orch.removeWorkspace(repoPath);
|
|
5509
5543
|
return { content: [{ type: "text", text: "ok" }] };
|
|
@@ -5513,12 +5547,12 @@ async function startMcpServer() {
|
|
|
5513
5547
|
"fanout",
|
|
5514
5548
|
"Best-of-n: create one thread per agent with the same prompt (parallel attempts)",
|
|
5515
5549
|
{
|
|
5516
|
-
prompt:
|
|
5517
|
-
agents:
|
|
5518
|
-
repoPath:
|
|
5519
|
-
sourceType:
|
|
5520
|
-
sourceRef:
|
|
5521
|
-
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()
|
|
5522
5556
|
},
|
|
5523
5557
|
async (args) => {
|
|
5524
5558
|
const threads = await orch.bestOfN(args);
|
|
@@ -5536,8 +5570,8 @@ async function startMcpServer() {
|
|
|
5536
5570
|
"list_branches",
|
|
5537
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).",
|
|
5538
5572
|
{
|
|
5539
|
-
repoPath:
|
|
5540
|
-
unmergedOnly:
|
|
5573
|
+
repoPath: z11.string(),
|
|
5574
|
+
unmergedOnly: z11.boolean().optional()
|
|
5541
5575
|
},
|
|
5542
5576
|
async ({ repoPath, unmergedOnly }) => {
|
|
5543
5577
|
const root = await resolveRepoRoot(repoPath);
|
|
@@ -5558,19 +5592,19 @@ async function startMcpServer() {
|
|
|
5558
5592
|
"list_prs",
|
|
5559
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.`,
|
|
5560
5594
|
{
|
|
5561
|
-
repoPath:
|
|
5562
|
-
query:
|
|
5563
|
-
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(
|
|
5564
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."
|
|
5565
5599
|
),
|
|
5566
|
-
state:
|
|
5567
|
-
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(
|
|
5568
5602
|
"GitHub label / workflow tag. Comma-separated AND. Examples: eng-review, eng-approved, eng-requested-changes"
|
|
5569
5603
|
),
|
|
5570
|
-
reviewer:
|
|
5604
|
+
reviewer: z11.string().optional().describe(
|
|
5571
5605
|
"me (review requested of you), unassigned (no individual reviewer; team queues like engineering-team still count), all, or a GitHub login"
|
|
5572
5606
|
),
|
|
5573
|
-
limit:
|
|
5607
|
+
limit: z11.number().int().positive().max(250).optional().describe("Page size (default 40, max 250). Raise when truncated is true.")
|
|
5574
5608
|
},
|
|
5575
5609
|
async ({ repoPath, query, queue, state, label, reviewer, limit }) => {
|
|
5576
5610
|
const root = await resolveRepoRoot(repoPath);
|
|
@@ -5603,7 +5637,7 @@ async function startMcpServer() {
|
|
|
5603
5637
|
server.tool(
|
|
5604
5638
|
"get_pr_stack",
|
|
5605
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).",
|
|
5606
|
-
{ ref:
|
|
5640
|
+
{ ref: z11.string() },
|
|
5607
5641
|
async ({ ref }) => {
|
|
5608
5642
|
const stack = await orch.getPrStack(ref);
|
|
5609
5643
|
return mcpJson(stack);
|
|
@@ -5613,8 +5647,8 @@ async function startMcpServer() {
|
|
|
5613
5647
|
"open_pr_stack_layers",
|
|
5614
5648
|
"Materialize one worktree+thread per stack layer (or a single 1-based layer). Pass a thread ref already on the stack.",
|
|
5615
5649
|
{
|
|
5616
|
-
ref:
|
|
5617
|
-
layer:
|
|
5650
|
+
ref: z11.string(),
|
|
5651
|
+
layer: z11.number().int().positive().optional()
|
|
5618
5652
|
},
|
|
5619
5653
|
async ({ ref, layer }) => {
|
|
5620
5654
|
const result = await orch.openPrStackLayers(ref, { layer });
|
|
@@ -5637,9 +5671,9 @@ async function startMcpServer() {
|
|
|
5637
5671
|
"add_stack_layer",
|
|
5638
5672
|
"Add a branch on top of the current stack (`gh stack add`) and open a worktree+thread for it.",
|
|
5639
5673
|
{
|
|
5640
|
-
ref:
|
|
5641
|
-
branchName:
|
|
5642
|
-
title:
|
|
5674
|
+
ref: z11.string(),
|
|
5675
|
+
branchName: z11.string(),
|
|
5676
|
+
title: z11.string().optional()
|
|
5643
5677
|
},
|
|
5644
5678
|
async ({ ref, branchName, title }) => {
|
|
5645
5679
|
const result = await orch.addStackLayer(ref, branchName, { title });
|
|
@@ -5657,11 +5691,11 @@ async function startMcpServer() {
|
|
|
5657
5691
|
"create_pr_stack",
|
|
5658
5692
|
"Create a new GitHub PR stack with one Sideboard worktree per layer (bottom\u2192top branch names). Requires `gh extension install github/gh-stack`.",
|
|
5659
5693
|
{
|
|
5660
|
-
repoPath:
|
|
5661
|
-
branches:
|
|
5662
|
-
agent:
|
|
5663
|
-
base:
|
|
5664
|
-
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()
|
|
5665
5699
|
},
|
|
5666
5700
|
async (args) => {
|
|
5667
5701
|
const result = await orch.createPrStack({
|
|
@@ -5689,10 +5723,10 @@ async function startMcpServer() {
|
|
|
5689
5723
|
"list_issues",
|
|
5690
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.",
|
|
5691
5725
|
{
|
|
5692
|
-
repoPath:
|
|
5693
|
-
query:
|
|
5694
|
-
assignee:
|
|
5695
|
-
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."),
|
|
5696
5730
|
updatedSince: mcpIssueUpdatedSinceSchema
|
|
5697
5731
|
},
|
|
5698
5732
|
async ({ repoPath, query, assignee, limit, updatedSince }) => {
|