@sideboard-ai/core 0.1.158 → 0.1.159
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-BEIDJG7W.js → abletime-HOQBDQC4.js} +2 -2
- package/dist/{abletime-GWZE6OYM.js → abletime-LK7GV556.js} +2 -2
- package/dist/{agents-E3ZPWZRS.js → agents-5HY76BCR.js} +4 -4
- package/dist/{agents-RGE7PSUY.js → agents-67ZBH5OE.js} +4 -4
- package/dist/{app-settings-VRQI3FIE.js → app-settings-BJ5GFAE5.js} +13 -17
- package/dist/{app-settings-H3INSR67.js → app-settings-YWJ4MVYM.js} +13 -17
- package/dist/{chunk-DVJBO3M7.js → chunk-AGLPYXDT.js} +1 -1
- package/dist/{chunk-EPQIOAAY.js → chunk-DWUOKF3W.js} +7 -5
- package/dist/{chunk-D7EGJ3EI.js → chunk-EQIJ5MHR.js} +119 -110
- package/dist/{chunk-3BWVOUQG.js → chunk-FLG4A5FJ.js} +119 -110
- package/dist/{chunk-LQMFCS54.js → chunk-KEDHHXKW.js} +3 -13
- package/dist/{chunk-A7QXLYBN.js → chunk-MEZXWELT.js} +3 -13
- package/dist/{chunk-CVR4RJ6G.js → chunk-O7RWWPMR.js} +12 -13
- package/dist/{chunk-KYKNFJK5.js → chunk-OYOXLY6B.js} +39 -20
- package/dist/{chunk-3SUZMPGL.js → chunk-SIMFKJIB.js} +12 -13
- package/dist/{chunk-FBFIOVDH.js → chunk-TGU3LSDG.js} +38 -19
- package/dist/{chunk-N27GVFZY.js → chunk-UBMCEZRE.js} +1 -1
- package/dist/{chunk-BLRHO7XQ.js → chunk-V4R6L2ZL.js} +10 -6
- package/dist/{coordinator-prompt-GZESIQNH.js → coordinator-prompt-7NKY7QRK.js} +3 -3
- package/dist/{coordinator-prompt-26IJU2AV.js → coordinator-prompt-CNI6AK65.js} +3 -3
- package/dist/{global-workspace-REI55FZ6.js → global-workspace-FKAJZHO5.js} +3 -3
- package/dist/{global-workspace-5BIW26YR.js → global-workspace-IJYCUO4M.js} +3 -3
- package/dist/index.cjs +588 -472
- package/dist/index.d.cts +62 -57
- package/dist/index.d.ts +62 -57
- package/dist/index.js +322 -230
- package/dist/mcp/run-stdio.cjs +517 -399
- package/dist/mcp/run-stdio.js +262 -163
- package/dist/{orchestrator-ZVW2AC6B.js → orchestrator-KFLS5BTP.js} +5 -5
- package/dist/{orchestrator-J727WIJY.js → orchestrator-NSVP7DJH.js} +5 -5
- package/dist/{workspaces-NYSM2EPX.js → workspaces-D2M3AM2M.js} +3 -3
- package/dist/{workspaces-OCEPZXFD.js → workspaces-OFSDJ7PZ.js} +3 -3
- package/dist/{worktree-VTMBZKY6.js → worktree-BQE5KLRY.js} +2 -2
- package/dist/{worktree-T4SWFSTT.js → worktree-EA6AD6D6.js} +2 -2
- package/package.json +1 -1
package/dist/mcp/run-stdio.js
CHANGED
|
@@ -36,12 +36,12 @@ import {
|
|
|
36
36
|
syncBoardPins,
|
|
37
37
|
updateSchedule,
|
|
38
38
|
waitForDetachedJob
|
|
39
|
-
} from "../chunk-
|
|
39
|
+
} from "../chunk-TGU3LSDG.js";
|
|
40
40
|
import {
|
|
41
41
|
isInternalAgentStatusText,
|
|
42
42
|
listModelsForAgent,
|
|
43
43
|
sideboardMcpProfile
|
|
44
|
-
} from "../chunk-
|
|
44
|
+
} from "../chunk-DWUOKF3W.js";
|
|
45
45
|
import "../chunk-LZ6QMEQC.js";
|
|
46
46
|
import "../chunk-S42XV45P.js";
|
|
47
47
|
import {
|
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
searchAbleTimeTasks,
|
|
57
57
|
toAbleTimeIssueInfo,
|
|
58
58
|
updateAbleTimeTask
|
|
59
|
-
} from "../chunk-
|
|
59
|
+
} from "../chunk-UBMCEZRE.js";
|
|
60
60
|
import {
|
|
61
61
|
httpFetch
|
|
62
62
|
} from "../chunk-6GN5WPYZ.js";
|
|
@@ -64,8 +64,9 @@ import "../chunk-JV4VNFMS.js";
|
|
|
64
64
|
import "../chunk-OCQPTUR7.js";
|
|
65
65
|
import {
|
|
66
66
|
GLOBAL_WORKSPACE_ID,
|
|
67
|
-
isCloudCoordinatorThread
|
|
68
|
-
|
|
67
|
+
isCloudCoordinatorThread,
|
|
68
|
+
listWorkspaces
|
|
69
|
+
} from "../chunk-SIMFKJIB.js";
|
|
69
70
|
import {
|
|
70
71
|
canonicalizeRepoPath,
|
|
71
72
|
formatGhLandError,
|
|
@@ -76,7 +77,7 @@ import {
|
|
|
76
77
|
resolveListPrsOptions,
|
|
77
78
|
resolveRepoRoot,
|
|
78
79
|
warmGithubAgentAuth
|
|
79
|
-
} from "../chunk-
|
|
80
|
+
} from "../chunk-MEZXWELT.js";
|
|
80
81
|
import "../chunk-5U4NZLBH.js";
|
|
81
82
|
import "../chunk-LZQULFIT.js";
|
|
82
83
|
import "../chunk-SYFVUF2C.js";
|
|
@@ -90,11 +91,13 @@ import {
|
|
|
90
91
|
isAbleTimeConnected,
|
|
91
92
|
isLinearConnected,
|
|
92
93
|
loadAppSettings,
|
|
94
|
+
readViewerContext,
|
|
93
95
|
resolveEffectiveIssueSource,
|
|
94
96
|
resolveViewerProfile,
|
|
95
97
|
resolveViewerProfileForRepo,
|
|
96
|
-
saveLinearOAuth
|
|
97
|
-
|
|
98
|
+
saveLinearOAuth,
|
|
99
|
+
writeViewerContext
|
|
100
|
+
} from "../chunk-EQIJ5MHR.js";
|
|
98
101
|
import "../chunk-NSTQ6QKD.js";
|
|
99
102
|
import "../chunk-KGZBYWZ3.js";
|
|
100
103
|
import {
|
|
@@ -104,7 +107,7 @@ import {
|
|
|
104
107
|
// src/mcp/server.ts
|
|
105
108
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
106
109
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
107
|
-
import { z as
|
|
110
|
+
import { z as z7 } from "zod";
|
|
108
111
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
109
112
|
import { basename } from "path";
|
|
110
113
|
|
|
@@ -939,9 +942,9 @@ function mcpArchiveBlockedReason(thread) {
|
|
|
939
942
|
function lastMessagePreview(messages, max = 160) {
|
|
940
943
|
if (!messages?.length) return null;
|
|
941
944
|
for (let i = messages.length - 1; i >= 0; i--) {
|
|
942
|
-
const
|
|
943
|
-
if (!
|
|
944
|
-
const flat =
|
|
945
|
+
const text7 = messages[i]?.text?.trim();
|
|
946
|
+
if (!text7 || isInternalAgentStatusText(text7)) continue;
|
|
947
|
+
const flat = text7.replace(/\s+/g, " ");
|
|
945
948
|
return flat.length > max ? `${flat.slice(0, max)}\u2026` : flat;
|
|
946
949
|
}
|
|
947
950
|
return null;
|
|
@@ -1173,8 +1176,8 @@ function labelGithubUrl(url) {
|
|
|
1173
1176
|
}
|
|
1174
1177
|
return { kind: "other", label: "GitHub", url: raw };
|
|
1175
1178
|
}
|
|
1176
|
-
function appendGithubLink(
|
|
1177
|
-
const body =
|
|
1179
|
+
function appendGithubLink(text7, githubUrl) {
|
|
1180
|
+
const body = text7.trimEnd();
|
|
1178
1181
|
if (!githubUrl?.trim()) return body;
|
|
1179
1182
|
const labeled = labelGithubUrl(githubUrl);
|
|
1180
1183
|
if (!labeled) {
|
|
@@ -2038,6 +2041,101 @@ function registerConnectedIssueVendorTools(server, settings = loadAppSettings())
|
|
|
2038
2041
|
if (isAbleTimeConnected(settings)) registerAbleTimeTools(server);
|
|
2039
2042
|
}
|
|
2040
2043
|
|
|
2044
|
+
// src/mcp/viewer-context-tools.ts
|
|
2045
|
+
import { z as z5 } from "zod";
|
|
2046
|
+
function text5(payload, isError = false) {
|
|
2047
|
+
return mcpJson(payload, isError);
|
|
2048
|
+
}
|
|
2049
|
+
function matchRegisteredWorkspace(repoPath) {
|
|
2050
|
+
const hint = (repoPath ?? "").trim().replace(/\/+$/, "");
|
|
2051
|
+
if (!hint) return null;
|
|
2052
|
+
const match = listWorkspaces().find((w) => {
|
|
2053
|
+
const stored = w.path.replace(/\/+$/, "");
|
|
2054
|
+
return stored === hint || hint.startsWith(`${stored}/`) || stored.startsWith(`${hint}/`);
|
|
2055
|
+
});
|
|
2056
|
+
return match?.path.replace(/\/+$/, "") ?? null;
|
|
2057
|
+
}
|
|
2058
|
+
async function resolveProjectRepoPath(repoPath) {
|
|
2059
|
+
const hint = repoPath?.trim() || process.cwd();
|
|
2060
|
+
let root = hint;
|
|
2061
|
+
try {
|
|
2062
|
+
root = await resolveRepoRoot(hint);
|
|
2063
|
+
} catch {
|
|
2064
|
+
root = hint.replace(/\/+$/, "");
|
|
2065
|
+
}
|
|
2066
|
+
return matchRegisteredWorkspace(root) ?? matchRegisteredWorkspace(hint);
|
|
2067
|
+
}
|
|
2068
|
+
var PROJECT_PATH_HINT = "Pass repoPath from list_workspaces. Orchestration cwd is synthetic and empty \u2014 do not omit repoPath for project context.";
|
|
2069
|
+
function registerViewerContextTools(server) {
|
|
2070
|
+
server.tool(
|
|
2071
|
+
"get_viewer_context",
|
|
2072
|
+
"Read account and project user context (Settings \u2192 Agents / Projects): roles, tickets, and review queues as freeform text. Orchestration must pass repoPath from list_workspaces for project context. Worktree turns may omit repoPath (uses cwd).",
|
|
2073
|
+
{
|
|
2074
|
+
repoPath: z5.string().optional().describe(
|
|
2075
|
+
"Registered workspace or worktree path. Required from orchestration for a project. Omit on a worktree turn (uses cwd)."
|
|
2076
|
+
)
|
|
2077
|
+
},
|
|
2078
|
+
async ({ repoPath }) => {
|
|
2079
|
+
try {
|
|
2080
|
+
const path = await resolveProjectRepoPath(repoPath);
|
|
2081
|
+
return text5(readViewerContext(path ?? void 0));
|
|
2082
|
+
} catch (err) {
|
|
2083
|
+
return text5(
|
|
2084
|
+
{ error: err instanceof Error ? err.message : String(err) },
|
|
2085
|
+
true
|
|
2086
|
+
);
|
|
2087
|
+
}
|
|
2088
|
+
}
|
|
2089
|
+
);
|
|
2090
|
+
server.tool(
|
|
2091
|
+
"update_viewer_context",
|
|
2092
|
+
"Replace account or project user context (Settings \u2192 Agents / Projects). Never call until the user confirmed. Show the proposed text, ask_user (Save this context / Do not save), wait, then pass confirmed=true. Empty context clears that field.",
|
|
2093
|
+
{
|
|
2094
|
+
scope: z5.enum(["account", "project"]).describe("account = Settings \u2192 Agents; project = Settings \u2192 Projects for one repo"),
|
|
2095
|
+
context: z5.string().describe("Full replacement text (roles, tickets, review queues). Empty clears."),
|
|
2096
|
+
confirmed: z5.boolean().optional().describe("Must be true after the user confirmed via ask_user. False/omit is rejected."),
|
|
2097
|
+
repoPath: z5.string().optional().describe(
|
|
2098
|
+
"Required for scope=project from orchestration (path from list_workspaces). Worktree turns may omit it (cwd)."
|
|
2099
|
+
)
|
|
2100
|
+
},
|
|
2101
|
+
async ({ scope, context, confirmed, repoPath }) => {
|
|
2102
|
+
try {
|
|
2103
|
+
if (scope === "project") {
|
|
2104
|
+
const path = await resolveProjectRepoPath(repoPath);
|
|
2105
|
+
if (!path) {
|
|
2106
|
+
return text5(
|
|
2107
|
+
{
|
|
2108
|
+
ok: false,
|
|
2109
|
+
error: "repoPath required",
|
|
2110
|
+
message: PROJECT_PATH_HINT
|
|
2111
|
+
},
|
|
2112
|
+
true
|
|
2113
|
+
);
|
|
2114
|
+
}
|
|
2115
|
+
const result2 = writeViewerContext({
|
|
2116
|
+
scope,
|
|
2117
|
+
context,
|
|
2118
|
+
repoPath: path,
|
|
2119
|
+
confirmed: confirmed === true
|
|
2120
|
+
});
|
|
2121
|
+
return text5(result2, !result2.ok);
|
|
2122
|
+
}
|
|
2123
|
+
const result = writeViewerContext({
|
|
2124
|
+
scope,
|
|
2125
|
+
context,
|
|
2126
|
+
confirmed: confirmed === true
|
|
2127
|
+
});
|
|
2128
|
+
return text5(result, !result.ok);
|
|
2129
|
+
} catch (err) {
|
|
2130
|
+
return text5(
|
|
2131
|
+
{ error: err instanceof Error ? err.message : String(err) },
|
|
2132
|
+
true
|
|
2133
|
+
);
|
|
2134
|
+
}
|
|
2135
|
+
}
|
|
2136
|
+
);
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2041
2139
|
// src/mcp/pr-list.ts
|
|
2042
2140
|
function compactPrRow(pr) {
|
|
2043
2141
|
return {
|
|
@@ -2073,15 +2171,15 @@ function formatMcpPrList(input) {
|
|
|
2073
2171
|
}
|
|
2074
2172
|
|
|
2075
2173
|
// src/mcp/schedule-tools.ts
|
|
2076
|
-
import { z as
|
|
2077
|
-
function
|
|
2174
|
+
import { z as z6 } from "zod";
|
|
2175
|
+
function text6(payload, isError = false) {
|
|
2078
2176
|
return {
|
|
2079
2177
|
content: [{ type: "text", text: JSON.stringify(payload, null, 2) }],
|
|
2080
2178
|
...isError ? { isError: true } : {}
|
|
2081
2179
|
};
|
|
2082
2180
|
}
|
|
2083
2181
|
function fail5(err) {
|
|
2084
|
-
return
|
|
2182
|
+
return text6(
|
|
2085
2183
|
{ error: err instanceof Error ? err.message : String(err) },
|
|
2086
2184
|
true
|
|
2087
2185
|
);
|
|
@@ -2106,7 +2204,7 @@ function registerScheduleTools(server) {
|
|
|
2106
2204
|
{},
|
|
2107
2205
|
async () => {
|
|
2108
2206
|
try {
|
|
2109
|
-
return
|
|
2207
|
+
return text6({ schedules: listSchedules() });
|
|
2110
2208
|
} catch (err) {
|
|
2111
2209
|
return fail5(err);
|
|
2112
2210
|
}
|
|
@@ -2116,17 +2214,17 @@ function registerScheduleTools(server) {
|
|
|
2116
2214
|
"create_schedule",
|
|
2117
2215
|
"Create a local schedule that, when due, sends a prompt to an orchestration chat (threadId) or starts a new Global orchestration chat (omit threadId). Pass threadId=self to continue this coordinator. Exactly one of at (ISO datetime), every (15m/1h/6h/1d), or cron (5-field). Recurring jobs without threadId open a new chat each run. Overnight/unattended runs need Settings \u2192 Advanced \u2192 Caffeinate while schedules are enabled, or set_caffeinate. Sideboard.app must be running for the job to fire.",
|
|
2118
2216
|
{
|
|
2119
|
-
prompt:
|
|
2120
|
-
name:
|
|
2121
|
-
at:
|
|
2122
|
-
every:
|
|
2123
|
-
cron:
|
|
2124
|
-
tz:
|
|
2125
|
-
threadId:
|
|
2217
|
+
prompt: z6.string().describe("User message / goal queued when the schedule fires"),
|
|
2218
|
+
name: z6.string().optional(),
|
|
2219
|
+
at: z6.string().optional().describe("ISO datetime for a one-shot"),
|
|
2220
|
+
every: z6.string().optional().describe("Interval such as 15m, 1h, 6h, 1d"),
|
|
2221
|
+
cron: z6.string().optional().describe("5-field cron expression"),
|
|
2222
|
+
tz: z6.string().optional().describe("IANA timezone for cron (default: system)"),
|
|
2223
|
+
threadId: z6.string().optional().describe(
|
|
2126
2224
|
'Existing orchestration chat id, or "self" for this coordinator. Omit to create a new Global chat on fire.'
|
|
2127
2225
|
),
|
|
2128
|
-
agent:
|
|
2129
|
-
model:
|
|
2226
|
+
agent: z6.enum(["claude", "cursor", "codex", "opencode"]).optional().describe("Agent for a new Global chat (omit for Account default)"),
|
|
2227
|
+
model: z6.string().optional()
|
|
2130
2228
|
},
|
|
2131
2229
|
async (args) => {
|
|
2132
2230
|
try {
|
|
@@ -2146,7 +2244,7 @@ function registerScheduleTools(server) {
|
|
|
2146
2244
|
model: args.model,
|
|
2147
2245
|
createdBy: "mcp"
|
|
2148
2246
|
});
|
|
2149
|
-
return
|
|
2247
|
+
return text6({
|
|
2150
2248
|
schedule,
|
|
2151
2249
|
hint: "Fires while Sideboard.app is running. Recurring jobs without threadId create a new orchestration chat each run. Overnight runs need Settings \u2192 Advanced \u2192 Caffeinate while schedules are enabled, or set_caffeinate."
|
|
2152
2250
|
});
|
|
@@ -2159,17 +2257,17 @@ function registerScheduleTools(server) {
|
|
|
2159
2257
|
"update_schedule",
|
|
2160
2258
|
"Update a local schedule (prompt, cadence, target thread, enabled). Pass id from list_schedules.",
|
|
2161
2259
|
{
|
|
2162
|
-
id:
|
|
2163
|
-
prompt:
|
|
2164
|
-
name:
|
|
2165
|
-
at:
|
|
2166
|
-
every:
|
|
2167
|
-
cron:
|
|
2168
|
-
tz:
|
|
2169
|
-
threadId:
|
|
2170
|
-
agent:
|
|
2171
|
-
model:
|
|
2172
|
-
enabled:
|
|
2260
|
+
id: z6.string(),
|
|
2261
|
+
prompt: z6.string().optional(),
|
|
2262
|
+
name: z6.string().optional(),
|
|
2263
|
+
at: z6.string().optional(),
|
|
2264
|
+
every: z6.string().optional(),
|
|
2265
|
+
cron: z6.string().optional(),
|
|
2266
|
+
tz: z6.string().optional(),
|
|
2267
|
+
threadId: z6.string().optional().describe('Existing orchestration chat, "self", or empty string to create a new chat each run'),
|
|
2268
|
+
agent: z6.enum(["claude", "cursor", "codex", "opencode"]).optional(),
|
|
2269
|
+
model: z6.string().optional(),
|
|
2270
|
+
enabled: z6.boolean().optional()
|
|
2173
2271
|
},
|
|
2174
2272
|
async (args) => {
|
|
2175
2273
|
try {
|
|
@@ -2198,7 +2296,7 @@ function registerScheduleTools(server) {
|
|
|
2198
2296
|
enabled: args.enabled,
|
|
2199
2297
|
model: args.model
|
|
2200
2298
|
});
|
|
2201
|
-
return
|
|
2299
|
+
return text6({ schedule });
|
|
2202
2300
|
} catch (err) {
|
|
2203
2301
|
return fail5(err);
|
|
2204
2302
|
}
|
|
@@ -2207,11 +2305,11 @@ function registerScheduleTools(server) {
|
|
|
2207
2305
|
server.tool(
|
|
2208
2306
|
"delete_schedule",
|
|
2209
2307
|
"Delete a local schedule. Pass id from list_schedules.",
|
|
2210
|
-
{ id:
|
|
2308
|
+
{ id: z6.string() },
|
|
2211
2309
|
async ({ id }) => {
|
|
2212
2310
|
try {
|
|
2213
2311
|
deleteSchedule(id);
|
|
2214
|
-
return
|
|
2312
|
+
return text6({ ok: true, id });
|
|
2215
2313
|
} catch (err) {
|
|
2216
2314
|
return fail5(err);
|
|
2217
2315
|
}
|
|
@@ -2220,14 +2318,14 @@ function registerScheduleTools(server) {
|
|
|
2220
2318
|
server.tool(
|
|
2221
2319
|
"run_schedule",
|
|
2222
2320
|
"Fire a schedule now (does not wait for nextRunAt). Queues the prompt or starts a new Global chat. If Sideboard.app is running, the desktop drains the turn.",
|
|
2223
|
-
{ id:
|
|
2321
|
+
{ id: z6.string() },
|
|
2224
2322
|
async ({ id }) => {
|
|
2225
2323
|
try {
|
|
2226
2324
|
if (!getSchedule(id)) {
|
|
2227
2325
|
return fail5(new Error(`Schedule not found: ${id}`));
|
|
2228
2326
|
}
|
|
2229
2327
|
const schedule = await fireSchedule(id);
|
|
2230
|
-
return
|
|
2328
|
+
return text6({ schedule });
|
|
2231
2329
|
} catch (err) {
|
|
2232
2330
|
return fail5(err);
|
|
2233
2331
|
}
|
|
@@ -2568,7 +2666,7 @@ async function startMcpServer() {
|
|
|
2568
2666
|
);
|
|
2569
2667
|
}
|
|
2570
2668
|
try {
|
|
2571
|
-
const { maxConcurrentAgents } = await import("../app-settings-
|
|
2669
|
+
const { maxConcurrentAgents } = await import("../app-settings-BJ5GFAE5.js");
|
|
2572
2670
|
orch.setMaxConcurrent(maxConcurrentAgents());
|
|
2573
2671
|
} catch {
|
|
2574
2672
|
}
|
|
@@ -2585,13 +2683,14 @@ async function startMcpServer() {
|
|
|
2585
2683
|
version: "0.1.0"
|
|
2586
2684
|
});
|
|
2587
2685
|
const worktreeProfile = sideboardMcpProfile() === "worktree";
|
|
2686
|
+
registerViewerContextTools(server);
|
|
2588
2687
|
if (worktreeProfile) {
|
|
2589
2688
|
registerConnectedIssueVendorTools(server);
|
|
2590
2689
|
}
|
|
2591
2690
|
if (!worktreeProfile) {
|
|
2592
2691
|
server.tool(
|
|
2593
2692
|
"list_workspaces",
|
|
2594
|
-
"List registered Sideboard workspaces (repos). Each line is name, path, github:owner/repo when resolvable, and
|
|
2693
|
+
"List registered Sideboard workspaces (repos). Each line is name, path, github:owner/repo when resolvable, and project context when set \u2014 use path as repoPath for list_board/list_branches/list_prs/list_issues/create_thread. Account / project context (Settings \u2192 Agents / Projects) says which tickets and review PRs belong to the user.",
|
|
2595
2694
|
{},
|
|
2596
2695
|
async () => {
|
|
2597
2696
|
const workspaces = orch.listWorkspaces();
|
|
@@ -2640,13 +2739,13 @@ async function startMcpServer() {
|
|
|
2640
2739
|
"list_board",
|
|
2641
2740
|
"Home Kanban of worktrees (New, Draft, Review, Merged) \u2014 one card per checkout; sibling chat tabs nest as inner cards. Same cards as desktop Home. Path to merge: no PR \u2192 draft PR \u2192 open PR \u2192 merged. Archive removes the card to Settings \u2192 History. Queued/running are activity on the card, not columns. Orchestration chats are not on the board. Filters: query, repoPath, kind (ticket/PR/branch source), column, limit (default 40). create_thread adds a worktree (and a Home card), or returns the live one if that ticket/PR/named branch is already checked out.",
|
|
2642
2741
|
{
|
|
2643
|
-
query:
|
|
2644
|
-
repoPath:
|
|
2645
|
-
kind:
|
|
2646
|
-
column:
|
|
2742
|
+
query: z7.string().optional().describe("Case-insensitive token search across title, id, labels, repo"),
|
|
2743
|
+
repoPath: z7.string().optional().describe("Limit to one workspace path from list_workspaces"),
|
|
2744
|
+
kind: z7.enum(["all", "tickets", "prs", "branches", "threads"]).optional().describe("Filter by worktree source (default all)"),
|
|
2745
|
+
column: z7.enum(["new", "draft", "review", "done", "needs_you"]).optional().describe(
|
|
2647
2746
|
"Return cards for this column only (totals still include the rest). needs_you is a legacy alias for new."
|
|
2648
2747
|
),
|
|
2649
|
-
limit:
|
|
2748
|
+
limit: z7.number().int().positive().optional().describe("Max cards per column (default 40). hidden counts the remainder.")
|
|
2650
2749
|
},
|
|
2651
2750
|
async ({ query, repoPath, kind, column, limit }) => {
|
|
2652
2751
|
const workspaces = orch.listWorkspaces();
|
|
@@ -2684,7 +2783,7 @@ async function startMcpServer() {
|
|
|
2684
2783
|
server.tool(
|
|
2685
2784
|
"get_thread",
|
|
2686
2785
|
"Get a compact thread summary by id/ref. Includes last message preview, parentThreadId, and child worktree threads (status + lastText). While running, includes progress (last tool/thinking) and lastActivityAt. Includes usage (thread billed token + costUsd totals when providers reported cost) and lastTurnUsage.",
|
|
2687
|
-
{ ref:
|
|
2786
|
+
{ ref: z7.string() },
|
|
2688
2787
|
async ({ ref }) => {
|
|
2689
2788
|
const t = orch.getThread(ref);
|
|
2690
2789
|
if (!t) {
|
|
@@ -2726,17 +2825,17 @@ async function startMcpServer() {
|
|
|
2726
2825
|
"present_artifact",
|
|
2727
2826
|
"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.",
|
|
2728
2827
|
{
|
|
2729
|
-
title:
|
|
2730
|
-
type:
|
|
2828
|
+
title: z7.string().describe("Short title shown in the artifact pane header"),
|
|
2829
|
+
type: z7.enum(["html", "svg", "markdown", "react", "log"]).describe(
|
|
2731
2830
|
"html/svg/markdown/react replace the pane. log appends content to the same artifact_id (new lines only)."
|
|
2732
2831
|
),
|
|
2733
|
-
content:
|
|
2832
|
+
content: z7.string().describe(
|
|
2734
2833
|
"html/svg/markdown/react: full document. log: only the new lines since the last call (empty is ok for a status-only update)."
|
|
2735
2834
|
),
|
|
2736
|
-
artifact_id:
|
|
2737
|
-
status:
|
|
2738
|
-
phase:
|
|
2739
|
-
mode:
|
|
2835
|
+
artifact_id: z7.string().optional().describe("Stable id. Required for type=log so later calls append to the same pane."),
|
|
2836
|
+
status: z7.enum(["running", "ok", "failed", "idle"]).optional().describe("Log header pill: running (working), ok (done), failed, idle"),
|
|
2837
|
+
phase: z7.string().optional().describe("Log subtitle (Signing, Notarizing, \u2026)"),
|
|
2838
|
+
mode: z7.enum(["append", "replace"]).optional().describe("log only: append (default) or replace the buffer")
|
|
2740
2839
|
},
|
|
2741
2840
|
async ({ title, type, artifact_id, status, phase, mode }) => {
|
|
2742
2841
|
const id = artifact_id?.trim() || `artifact_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 8)}`;
|
|
@@ -2757,15 +2856,15 @@ async function startMcpServer() {
|
|
|
2757
2856
|
"ask_user",
|
|
2758
2857
|
"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.",
|
|
2759
2858
|
{
|
|
2760
|
-
questions:
|
|
2761
|
-
|
|
2762
|
-
question:
|
|
2763
|
-
header:
|
|
2764
|
-
multiSelect:
|
|
2765
|
-
options:
|
|
2766
|
-
|
|
2767
|
-
label:
|
|
2768
|
-
description:
|
|
2859
|
+
questions: z7.array(
|
|
2860
|
+
z7.object({
|
|
2861
|
+
question: z7.string().describe("Full question text ending with ?"),
|
|
2862
|
+
header: z7.string().max(24).optional().describe("Short label shown above the question"),
|
|
2863
|
+
multiSelect: z7.boolean().optional().describe("Allow selecting multiple options"),
|
|
2864
|
+
options: z7.array(
|
|
2865
|
+
z7.object({
|
|
2866
|
+
label: z7.string(),
|
|
2867
|
+
description: z7.string().optional().describe("What this option means / when to choose it (strongly preferred)")
|
|
2769
2868
|
})
|
|
2770
2869
|
).min(2).max(6).describe("2\u20136 choices (Sideboard also offers Other)")
|
|
2771
2870
|
})
|
|
@@ -2784,9 +2883,9 @@ async function startMcpServer() {
|
|
|
2784
2883
|
"present_plan",
|
|
2785
2884
|
"Save the implementation plan as markdown to .context/attachments/plan.md and show it in Sideboard chat for user approval (Copy / Hand off / Approve). Call this when the plan is ready \u2014 required in plan mode. Pass the full plan body in content. Then Claude should call ExitPlanMode.",
|
|
2786
2885
|
{
|
|
2787
|
-
title:
|
|
2788
|
-
content:
|
|
2789
|
-
thread_id:
|
|
2886
|
+
title: z7.string().optional().describe("Short plan title (defaults to Plan)"),
|
|
2887
|
+
content: z7.string().min(1).describe("Full plan markdown (headings, steps, risks, open questions)"),
|
|
2888
|
+
thread_id: z7.string().optional().describe("Sideboard thread id when cwd is not the worktree")
|
|
2790
2889
|
},
|
|
2791
2890
|
async ({ title, content, thread_id }) => {
|
|
2792
2891
|
const { writePlanFile } = await import("../plan-file-I24VJVP2.js");
|
|
@@ -2809,15 +2908,15 @@ async function startMcpServer() {
|
|
|
2809
2908
|
"present_schema",
|
|
2810
2909
|
"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.",
|
|
2811
2910
|
{
|
|
2812
|
-
title:
|
|
2813
|
-
mode:
|
|
2814
|
-
datasource:
|
|
2815
|
-
resource_id:
|
|
2816
|
-
record_id:
|
|
2817
|
-
resource:
|
|
2818
|
-
record:
|
|
2819
|
-
records:
|
|
2820
|
-
pane_id:
|
|
2911
|
+
title: z7.string().describe("Pane title"),
|
|
2912
|
+
mode: z7.enum(["table", "form"]).optional().describe("table = list/filter records; form = edit one record"),
|
|
2913
|
+
datasource: z7.enum(["brightsy", "inline"]).optional().describe("brightsy resolves via login; inline uses embedded resource/records"),
|
|
2914
|
+
resource_id: z7.string().optional().describe("Brightsy record type UUID (or generic resource id)"),
|
|
2915
|
+
record_id: z7.string().optional().describe("Record id when opening form mode"),
|
|
2916
|
+
resource: z7.record(z7.unknown()).optional().describe("Inline { id, title, schema, schemaUi?, slug? }"),
|
|
2917
|
+
record: z7.record(z7.unknown()).optional().describe("Inline record { id, data, published_at? }"),
|
|
2918
|
+
records: z7.array(z7.record(z7.unknown())).optional().describe("Inline records for table mode"),
|
|
2919
|
+
pane_id: z7.string().optional().describe("Stable pane id across updates")
|
|
2821
2920
|
},
|
|
2822
2921
|
async (args) => {
|
|
2823
2922
|
const id = args.pane_id?.trim() || `schema_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 8)}`;
|
|
@@ -2838,10 +2937,10 @@ async function startMcpServer() {
|
|
|
2838
2937
|
"present_files",
|
|
2839
2938
|
"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.",
|
|
2840
2939
|
{
|
|
2841
|
-
title:
|
|
2842
|
-
datasource:
|
|
2843
|
-
path:
|
|
2844
|
-
pane_id:
|
|
2940
|
+
title: z7.string().optional().describe("Pane title (default: Files)"),
|
|
2941
|
+
datasource: z7.enum(["brightsy", "memory"]).optional().describe("brightsy = account storage via login; memory = session demo store"),
|
|
2942
|
+
path: z7.string().optional().describe("Initial folder path (e.g. public)"),
|
|
2943
|
+
pane_id: z7.string().optional().describe("Stable pane id across updates")
|
|
2845
2944
|
},
|
|
2846
2945
|
async (args) => {
|
|
2847
2946
|
const id = args.pane_id?.trim() || `files_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 8)}`;
|
|
@@ -2860,8 +2959,8 @@ async function startMcpServer() {
|
|
|
2860
2959
|
"wait_for_job",
|
|
2861
2960
|
"Wait on a detached long job (tests, pack, deploy) started with detached-job.js. MCP clients kill tools around 60s, so this returns within 45s. stillRunning is the source of truth \u2014 if true, present_artifact type=log with content=delta (same artifact_id) and call wait_for_job again. Do not end the turn or tell the user you will let them know later. If false, ok/failed is the result.",
|
|
2862
2961
|
{
|
|
2863
|
-
id:
|
|
2864
|
-
timeoutMs:
|
|
2962
|
+
id: z7.string().describe("Detached job id (same kebab-case id passed to detached-job.js start)"),
|
|
2963
|
+
timeoutMs: z7.number().optional()
|
|
2865
2964
|
},
|
|
2866
2965
|
async ({ id, timeoutMs }) => {
|
|
2867
2966
|
const result = await waitForDetachedJob(process.cwd(), id, {
|
|
@@ -2875,14 +2974,14 @@ async function startMcpServer() {
|
|
|
2875
2974
|
registerConnectedIssueVendorTools(server);
|
|
2876
2975
|
registerScheduleTools(server);
|
|
2877
2976
|
const { getCaffeinateHold, setCaffeinateHold } = await import("../caffeinate-hold-DBKMRZZO.js");
|
|
2878
|
-
const { resolveNewThreadOptions, resolveThreadDefaults } = await import("../app-settings-
|
|
2977
|
+
const { resolveNewThreadOptions, resolveThreadDefaults } = await import("../app-settings-BJ5GFAE5.js");
|
|
2879
2978
|
const accountDefaults = resolveThreadDefaults();
|
|
2880
2979
|
const accountDefaultsHint = `Account defaults: agent=${accountDefaults.agent}, model=${accountDefaults.model?.trim() || "Auto"}, effort=${accountDefaults.effort}`;
|
|
2881
2980
|
server.tool(
|
|
2882
2981
|
"set_caffeinate",
|
|
2883
2982
|
"Keep this Mac awake with caffeinate (like Claude Code) across turns \u2014 independent of Settings toggles. Turn ON when the user will be away from the keyboard, is driving work from Slack, or asks 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.",
|
|
2884
2983
|
{
|
|
2885
|
-
enabled:
|
|
2984
|
+
enabled: z7.boolean().describe("true = hold caffeinate on; false = release and let the Mac sleep")
|
|
2886
2985
|
},
|
|
2887
2986
|
async ({ enabled }) => {
|
|
2888
2987
|
const threadId = process.env.SIDEBOARD_ORCHESTRATOR_THREAD_ID?.trim() || null;
|
|
@@ -2920,18 +3019,18 @@ async function startMcpServer() {
|
|
|
2920
3019
|
"create_thread",
|
|
2921
3020
|
`Create a worktree thread (chat) from branch, pr, or ticket. A ticket, PR, or named branch may have only one live worktree \u2014 if one already matches, returns it (alreadyStarted=true) instead of a second checkout. Creating from the default branch still opens a new isolated worktree. Pass repoPath from list_workspaces. cowboy=true uses the project folder on the default branch (no isolated worktree; land is commit+push). From an orchestration chat, omit parentThreadId (Sideboard binds the child to this chat) or pass the exact id from the turn reminder \u2014 never invent a uuid. Prefer omitting agent/model so Sideboard applies ${accountDefaultsHint}. Setup (settings.toml, .cursor/worktrees.json, or script/setup) runs in the background in parallel with the first turn (skipped for cowboy). Then use send_to_thread to chat.`,
|
|
2922
3021
|
{
|
|
2923
|
-
sourceType:
|
|
2924
|
-
sourceRef:
|
|
2925
|
-
agent:
|
|
2926
|
-
model:
|
|
3022
|
+
sourceType: z7.enum(["branch", "pr", "ticket"]),
|
|
3023
|
+
sourceRef: z7.string(),
|
|
3024
|
+
agent: z7.enum(["claude", "codex", "opencode", "brightsy", "cursor"]).optional().describe(`Omit to use Account default agent (${accountDefaults.agent})`),
|
|
3025
|
+
model: z7.string().nullable().optional().describe(
|
|
2927
3026
|
`Usually omit to use Account default model (${accountDefaults.model?.trim() || "Auto"}). Pass null only to force Auto / agent-default.`
|
|
2928
3027
|
),
|
|
2929
|
-
repoPath:
|
|
2930
|
-
title:
|
|
2931
|
-
cowboy:
|
|
3028
|
+
repoPath: z7.string(),
|
|
3029
|
+
title: z7.string().optional(),
|
|
3030
|
+
cowboy: z7.boolean().optional().describe(
|
|
2932
3031
|
"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."
|
|
2933
3032
|
),
|
|
2934
|
-
parentThreadId:
|
|
3033
|
+
parentThreadId: z7.string().optional().describe(
|
|
2935
3034
|
"Orchestration: omit (preferred) or pass YOUR chat id from the turn reminder / AGENTS.md. Do not invent uuids."
|
|
2936
3035
|
)
|
|
2937
3036
|
},
|
|
@@ -2947,10 +3046,10 @@ async function startMcpServer() {
|
|
|
2947
3046
|
"start_board_card",
|
|
2948
3047
|
"Same as create_thread for a ticket, PR, or named branch (attaches issue text when Sideboard can resolve it). Does not create a second worktree when one already matches \u2014 returns that thread (alreadyStarted). Then send_to_thread.",
|
|
2949
3048
|
{
|
|
2950
|
-
kind:
|
|
2951
|
-
ref:
|
|
2952
|
-
repoPath:
|
|
2953
|
-
title:
|
|
3049
|
+
kind: z7.enum(["ticket", "pr", "branch"]),
|
|
3050
|
+
ref: z7.string().describe("Ticket identifier (ENG-12), PR number (44), or branch name from list_board"),
|
|
3051
|
+
repoPath: z7.string().describe("Workspace path from list_workspaces / list_board"),
|
|
3052
|
+
title: z7.string().optional()
|
|
2954
3053
|
},
|
|
2955
3054
|
async ({ kind, ref, repoPath, title }) => {
|
|
2956
3055
|
const root = await resolveRepoRoot(repoPath);
|
|
@@ -3054,9 +3153,9 @@ async function startMcpServer() {
|
|
|
3054
3153
|
"send_to_thread",
|
|
3055
3154
|
'Queue a prompt on a worktree thread chat (runs under concurrency cap). Use after create_thread 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. 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. Do not force_stop to check in, resume after a halt notice, or because wait_for_turn returned stillRunning; that stops the child mid-thought. Call wait_for_turn again instead.',
|
|
3056
3155
|
{
|
|
3057
|
-
ref:
|
|
3058
|
-
prompt:
|
|
3059
|
-
force_stop:
|
|
3156
|
+
ref: z7.string(),
|
|
3157
|
+
prompt: z7.string(),
|
|
3158
|
+
force_stop: z7.boolean().optional()
|
|
3060
3159
|
},
|
|
3061
3160
|
async ({ ref, prompt, force_stop }) => {
|
|
3062
3161
|
if (force_stop) {
|
|
@@ -3085,8 +3184,8 @@ async function startMcpServer() {
|
|
|
3085
3184
|
"wait_for_turn",
|
|
3086
3185
|
"Wait until the thread 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. stillRunning is the source of truth \u2014 if false, the child is not working (do not say it is waiting for a gate). If stillRunning is true, progress is tools/thinking (or \u201Cqueued, waiting for a concurrency slot\u201D if it has not started). Call wait_for_turn again. Do not send a check-in prompt, force_stop, or assume a hang. On status error, lastError/text is the failure. On status stopped or broken, the child did not finish \u2014 resume with send_to_thread or tell the user; do not treat that as success. When finished, usage is the last agent turn\u2019s tokens + costUsd (when the provider reported cost).",
|
|
3087
3186
|
{
|
|
3088
|
-
ref:
|
|
3089
|
-
timeoutMs:
|
|
3187
|
+
ref: z7.string(),
|
|
3188
|
+
timeoutMs: z7.number().optional()
|
|
3090
3189
|
},
|
|
3091
3190
|
async ({ ref, timeoutMs }) => {
|
|
3092
3191
|
const thread = await orch.waitForTurn(ref, mcpWaitForTurnTimeoutMs(timeoutMs), {
|
|
@@ -3116,7 +3215,7 @@ async function startMcpServer() {
|
|
|
3116
3215
|
server.tool(
|
|
3117
3216
|
"get_turn_result",
|
|
3118
3217
|
"Assistant message when the turn finished, or live progress while stillRunning. Not the full transcript. Includes usage for the last agent turn (tokens + costUsd when reported).",
|
|
3119
|
-
{ ref:
|
|
3218
|
+
{ ref: z7.string() },
|
|
3120
3219
|
async ({ ref }) => {
|
|
3121
3220
|
const result = orch.getTurnResult(ref);
|
|
3122
3221
|
return {
|
|
@@ -3137,8 +3236,8 @@ async function startMcpServer() {
|
|
|
3137
3236
|
"stop_thread",
|
|
3138
3237
|
"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.",
|
|
3139
3238
|
{
|
|
3140
|
-
ref:
|
|
3141
|
-
force:
|
|
3239
|
+
ref: z7.string(),
|
|
3240
|
+
force: z7.boolean().optional()
|
|
3142
3241
|
},
|
|
3143
3242
|
async ({ ref, force }) => {
|
|
3144
3243
|
const t = orch.getThread(ref);
|
|
@@ -3168,7 +3267,7 @@ async function startMcpServer() {
|
|
|
3168
3267
|
server.tool(
|
|
3169
3268
|
"archive_thread",
|
|
3170
3269
|
"Archive a thread (stops agent/dev, runs archive script, removes worktree when last chat tab). Coordinators commit, push, and open PRs by asking the worktree agent (ask_git). Merge only when the user explicitly asked.",
|
|
3171
|
-
{ ref:
|
|
3270
|
+
{ ref: z7.string() },
|
|
3172
3271
|
async ({ ref }) => {
|
|
3173
3272
|
const t = orch.getThread(ref);
|
|
3174
3273
|
if (!t) {
|
|
@@ -3201,7 +3300,7 @@ async function startMcpServer() {
|
|
|
3201
3300
|
server.tool(
|
|
3202
3301
|
"restore_thread",
|
|
3203
3302
|
"Restore an archived thread (recreates worktree from branch when needed)",
|
|
3204
|
-
{ ref:
|
|
3303
|
+
{ ref: z7.string() },
|
|
3205
3304
|
async ({ ref }) => {
|
|
3206
3305
|
try {
|
|
3207
3306
|
const restored = await orch.restore(ref);
|
|
@@ -3227,8 +3326,8 @@ async function startMcpServer() {
|
|
|
3227
3326
|
"get_diff",
|
|
3228
3327
|
"Compact diff summary (capped hunks, paginated)",
|
|
3229
3328
|
{
|
|
3230
|
-
ref:
|
|
3231
|
-
maxFiles:
|
|
3329
|
+
ref: z7.string(),
|
|
3330
|
+
maxFiles: z7.number().optional()
|
|
3232
3331
|
},
|
|
3233
3332
|
async ({ ref, maxFiles }) => {
|
|
3234
3333
|
const summary = await orch.diffSummary(ref);
|
|
@@ -3248,7 +3347,7 @@ async function startMcpServer() {
|
|
|
3248
3347
|
server.tool(
|
|
3249
3348
|
"get_pr_checks",
|
|
3250
3349
|
"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.",
|
|
3251
|
-
{ ref:
|
|
3350
|
+
{ ref: z7.string().describe("Worktree thread id/ref") },
|
|
3252
3351
|
async ({ ref }) => {
|
|
3253
3352
|
try {
|
|
3254
3353
|
const checks = await orch.getPrChecks(ref);
|
|
@@ -3264,7 +3363,7 @@ async function startMcpServer() {
|
|
|
3264
3363
|
server.tool(
|
|
3265
3364
|
"request_review",
|
|
3266
3365
|
'Start a merge-readiness Review on a worktree agent thread (same as the desktop Review button). 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. Pass a worktree thread ref \u2014 not the orchestrator. Then wait_for_turn (loop while stillRunning) / get_turn_result on the returned review tab id.',
|
|
3267
|
-
{ ref:
|
|
3366
|
+
{ ref: z7.string().describe("Worktree thread id/ref to review") },
|
|
3268
3367
|
async ({ ref }) => {
|
|
3269
3368
|
try {
|
|
3270
3369
|
const tab = await orch.requestReview(ref);
|
|
@@ -3293,8 +3392,8 @@ async function startMcpServer() {
|
|
|
3293
3392
|
"ask_git",
|
|
3294
3393
|
"Commit & push, open a draft PR, resolve conflicts, or merge \u2014 same actions as the desktop git buttons. When the worktree is clean, Sideboard pushes / opens the PR itself (HTTPS via `gh` even when origin is SSH / Settings \u2192 Git is SSH). When dirty, queues the worktree agent to commit; 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 (Greptile 5/5, CI green). Pass a worktree thread ref (not the orchestrator). action=merge only when the user explicitly asked to merge that PR. Do not run git or gh from the orchestration cwd. If this tool errors that the GraphQL/PR body is too long, the branch is already pushed \u2014 have the worktree agent retry `gh pr create --body-file` with a short description (GitHub limit 65,536 characters). Do not invent SSH/auth failures from that error.",
|
|
3295
3394
|
{
|
|
3296
|
-
ref:
|
|
3297
|
-
action:
|
|
3395
|
+
ref: z7.string().describe("Worktree thread id/ref"),
|
|
3396
|
+
action: z7.enum(AGENT_GIT_ACTIONS).describe(
|
|
3298
3397
|
"commit-push | create-draft | create-web | resolve-conflicts | merge"
|
|
3299
3398
|
)
|
|
3300
3399
|
},
|
|
@@ -3339,7 +3438,7 @@ async function startMcpServer() {
|
|
|
3339
3438
|
}
|
|
3340
3439
|
}
|
|
3341
3440
|
);
|
|
3342
|
-
const agentEnum =
|
|
3441
|
+
const agentEnum = z7.enum(["claude", "codex", "opencode", "brightsy", "cursor"]);
|
|
3343
3442
|
server.tool(
|
|
3344
3443
|
"list_models",
|
|
3345
3444
|
"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.",
|
|
@@ -3362,11 +3461,11 @@ async function startMcpServer() {
|
|
|
3362
3461
|
"fork_worktree",
|
|
3363
3462
|
"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_thread / wait_for_turn (loop while stillRunning) on the returned id.",
|
|
3364
3463
|
{
|
|
3365
|
-
ref:
|
|
3366
|
-
through_index:
|
|
3464
|
+
ref: z7.string().describe("Worktree thread id/ref to fork"),
|
|
3465
|
+
through_index: z7.number().optional().describe("Inclusive message index to include in the transcript (default: all)"),
|
|
3367
3466
|
agent: agentEnum.optional().describe("Agent for the forked chat (default: same as source)"),
|
|
3368
|
-
model:
|
|
3369
|
-
title:
|
|
3467
|
+
model: z7.string().nullable().optional().describe("Usually omit (Auto). Only set from list_models when you need a specific model"),
|
|
3468
|
+
title: z7.string().optional()
|
|
3370
3469
|
},
|
|
3371
3470
|
async ({ ref, through_index, agent, model, title }) => {
|
|
3372
3471
|
try {
|
|
@@ -3407,11 +3506,11 @@ async function startMcpServer() {
|
|
|
3407
3506
|
"fork_chat",
|
|
3408
3507
|
"Fork a chat into a NEW tab on the SAME workspace: worktree agent \u2192 same worktree tab; Global orchestration chat \u2192 new orchestration chat (same synthetic home). Seeds a transcript; optional agent override. Leave model unset for Auto unless you have a reason. Orchestration forks require an MCP-capable agent (claude, cursor, codex, opencode \u2014 not brightsy). Slack / Global orchestrators use this to continue an orchestration chat on another agent after session limits. Then send_to_thread / wait_for_turn (loop while stillRunning) on the returned id. Use fork_worktree only for worktree agents that need a new git worktree.",
|
|
3409
3508
|
{
|
|
3410
|
-
ref:
|
|
3411
|
-
through_index:
|
|
3509
|
+
ref: z7.string().describe("Thread id/ref to fork (worktree agent or orchestration chat)"),
|
|
3510
|
+
through_index: z7.number().optional().describe("Inclusive message index to include in the transcript (default: all)"),
|
|
3412
3511
|
agent: agentEnum.optional().describe("Agent for the forked chat (default: same as source)"),
|
|
3413
|
-
model:
|
|
3414
|
-
title:
|
|
3512
|
+
model: z7.string().nullable().optional().describe("Usually omit (Auto). Only set from list_models when you need a specific model"),
|
|
3513
|
+
title: z7.string().optional()
|
|
3415
3514
|
},
|
|
3416
3515
|
async ({ ref, through_index, agent, model, title }) => {
|
|
3417
3516
|
try {
|
|
@@ -3457,8 +3556,8 @@ async function startMcpServer() {
|
|
|
3457
3556
|
"run_dev_script",
|
|
3458
3557
|
"Start a .sideboard/.conductor run script for a thread (default script if name omitted); returns port",
|
|
3459
3558
|
{
|
|
3460
|
-
ref:
|
|
3461
|
-
name:
|
|
3559
|
+
ref: z7.string(),
|
|
3560
|
+
name: z7.string().optional()
|
|
3462
3561
|
},
|
|
3463
3562
|
async ({ ref, name }) => {
|
|
3464
3563
|
const result = await orch.startDev(ref, name);
|
|
@@ -3480,7 +3579,7 @@ async function startMcpServer() {
|
|
|
3480
3579
|
server.tool(
|
|
3481
3580
|
"list_run_scripts",
|
|
3482
3581
|
"List named run scripts available for a thread",
|
|
3483
|
-
{ ref:
|
|
3582
|
+
{ ref: z7.string() },
|
|
3484
3583
|
async ({ ref }) => {
|
|
3485
3584
|
const scripts = orch.listThreadRunScripts(ref);
|
|
3486
3585
|
const active = orch.getActiveRuns(ref);
|
|
@@ -3498,8 +3597,8 @@ async function startMcpServer() {
|
|
|
3498
3597
|
"stop_dev_script",
|
|
3499
3598
|
"Stop a running script for a thread (all scripts if name omitted)",
|
|
3500
3599
|
{
|
|
3501
|
-
ref:
|
|
3502
|
-
name:
|
|
3600
|
+
ref: z7.string(),
|
|
3601
|
+
name: z7.string().optional()
|
|
3503
3602
|
},
|
|
3504
3603
|
async ({ ref, name }) => {
|
|
3505
3604
|
orch.stopDev(ref, name);
|
|
@@ -3509,7 +3608,7 @@ async function startMcpServer() {
|
|
|
3509
3608
|
server.tool(
|
|
3510
3609
|
"run_setup",
|
|
3511
3610
|
"Re-run workspace setup (Sideboard/Conductor settings, .cursor/worktrees.json, or script/setup). New worktrees already run this automatically.",
|
|
3512
|
-
{ ref:
|
|
3611
|
+
{ ref: z7.string() },
|
|
3513
3612
|
async ({ ref }) => {
|
|
3514
3613
|
const result = await orch.runSetup(ref);
|
|
3515
3614
|
return {
|
|
@@ -3520,7 +3619,7 @@ async function startMcpServer() {
|
|
|
3520
3619
|
server.tool(
|
|
3521
3620
|
"add_workspace",
|
|
3522
3621
|
"Register a git repo as a Sideboard workspace",
|
|
3523
|
-
{ repoPath:
|
|
3622
|
+
{ repoPath: z7.string() },
|
|
3524
3623
|
async ({ repoPath }) => {
|
|
3525
3624
|
const ws = await orch.addWorkspace(repoPath);
|
|
3526
3625
|
return { content: [{ type: "text", text: JSON.stringify(ws) }] };
|
|
@@ -3529,7 +3628,7 @@ async function startMcpServer() {
|
|
|
3529
3628
|
server.tool(
|
|
3530
3629
|
"remove_workspace",
|
|
3531
3630
|
"Unregister a Sideboard workspace (does not archive threads)",
|
|
3532
|
-
{ repoPath:
|
|
3631
|
+
{ repoPath: z7.string() },
|
|
3533
3632
|
async ({ repoPath }) => {
|
|
3534
3633
|
orch.removeWorkspace(repoPath);
|
|
3535
3634
|
return { content: [{ type: "text", text: "ok" }] };
|
|
@@ -3539,12 +3638,12 @@ async function startMcpServer() {
|
|
|
3539
3638
|
"fanout",
|
|
3540
3639
|
"Best-of-n: create one thread per agent with the same prompt (parallel attempts)",
|
|
3541
3640
|
{
|
|
3542
|
-
prompt:
|
|
3543
|
-
agents:
|
|
3544
|
-
repoPath:
|
|
3545
|
-
sourceType:
|
|
3546
|
-
sourceRef:
|
|
3547
|
-
title:
|
|
3641
|
+
prompt: z7.string(),
|
|
3642
|
+
agents: z7.array(z7.enum(["claude", "codex", "opencode", "brightsy", "cursor"])),
|
|
3643
|
+
repoPath: z7.string(),
|
|
3644
|
+
sourceType: z7.enum(["branch", "pr", "ticket"]).optional(),
|
|
3645
|
+
sourceRef: z7.string().optional(),
|
|
3646
|
+
title: z7.string().optional()
|
|
3548
3647
|
},
|
|
3549
3648
|
async (args) => {
|
|
3550
3649
|
const threads = await orch.bestOfN(args);
|
|
@@ -3571,8 +3670,8 @@ async function startMcpServer() {
|
|
|
3571
3670
|
"list_branches",
|
|
3572
3671
|
"List git branches in a registered workspace. Pass repoPath from list_workspaces (unmerged into the default branch by default \u2014 for create_thread sourceType=branch).",
|
|
3573
3672
|
{
|
|
3574
|
-
repoPath:
|
|
3575
|
-
unmergedOnly:
|
|
3673
|
+
repoPath: z7.string(),
|
|
3674
|
+
unmergedOnly: z7.boolean().optional()
|
|
3576
3675
|
},
|
|
3577
3676
|
async ({ repoPath, unmergedOnly }) => {
|
|
3578
3677
|
const root = await resolveRepoRoot(repoPath);
|
|
@@ -3593,19 +3692,19 @@ async function startMcpServer() {
|
|
|
3593
3692
|
"list_prs",
|
|
3594
3693
|
'List GitHub PRs for a registered workspace (the review surface for assigned ticket work \u2014 not the tickets). Pass repoPath from list_workspaces. "Get me N tickets to review" \u2192 queue=review and limit=N: open non-draft PRs labeled 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_thread with sourceType=pr.',
|
|
3595
3694
|
{
|
|
3596
|
-
repoPath:
|
|
3597
|
-
query:
|
|
3598
|
-
queue:
|
|
3695
|
+
repoPath: z7.string(),
|
|
3696
|
+
query: z7.string().optional().describe("GitHub search tokens (title, draft:true, \u2026)"),
|
|
3697
|
+
queue: z7.enum(["review", "mine", "approved", "changes"]).optional().describe(
|
|
3599
3698
|
'review = unclaimed eng-review inbox (use for "get me N tickets to review"). mine = review-requested:@me. approved / changes = eng-approved / eng-requested-changes.'
|
|
3600
3699
|
),
|
|
3601
|
-
state:
|
|
3602
|
-
label:
|
|
3700
|
+
state: z7.enum(["open", "closed", "merged", "all", "review"]).optional().describe("GitHub PR state (default open). review is an alias for queue=review."),
|
|
3701
|
+
label: z7.string().optional().describe(
|
|
3603
3702
|
"GitHub label / workflow tag. Comma-separated AND. Examples: eng-review, eng-approved, eng-requested-changes"
|
|
3604
3703
|
),
|
|
3605
|
-
reviewer:
|
|
3704
|
+
reviewer: z7.string().optional().describe(
|
|
3606
3705
|
"me (review requested of you), unassigned (no individual reviewer; team queues like engineering-team still count), all, or a GitHub login"
|
|
3607
3706
|
),
|
|
3608
|
-
limit:
|
|
3707
|
+
limit: z7.number().int().positive().max(250).optional().describe("Page size (default 40, max 250). Raise when truncated is true.")
|
|
3609
3708
|
},
|
|
3610
3709
|
async ({ repoPath, query, queue, state, label, reviewer, limit }) => {
|
|
3611
3710
|
const root = await resolveRepoRoot(repoPath);
|
|
@@ -3637,7 +3736,7 @@ async function startMcpServer() {
|
|
|
3637
3736
|
server.tool(
|
|
3638
3737
|
"get_pr_stack",
|
|
3639
3738
|
"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).",
|
|
3640
|
-
{ ref:
|
|
3739
|
+
{ ref: z7.string() },
|
|
3641
3740
|
async ({ ref }) => {
|
|
3642
3741
|
const stack = await orch.getPrStack(ref);
|
|
3643
3742
|
return {
|
|
@@ -3649,8 +3748,8 @@ async function startMcpServer() {
|
|
|
3649
3748
|
"open_pr_stack_layers",
|
|
3650
3749
|
"Materialize one worktree+thread per stack layer (or a single 1-based layer). Pass a thread ref already on the stack.",
|
|
3651
3750
|
{
|
|
3652
|
-
ref:
|
|
3653
|
-
layer:
|
|
3751
|
+
ref: z7.string(),
|
|
3752
|
+
layer: z7.number().int().positive().optional()
|
|
3654
3753
|
},
|
|
3655
3754
|
async ({ ref, layer }) => {
|
|
3656
3755
|
const result = await orch.openPrStackLayers(ref, { layer });
|
|
@@ -3684,9 +3783,9 @@ async function startMcpServer() {
|
|
|
3684
3783
|
"add_stack_layer",
|
|
3685
3784
|
"Add a branch on top of the current stack (`gh stack add`) and open a worktree+thread for it.",
|
|
3686
3785
|
{
|
|
3687
|
-
ref:
|
|
3688
|
-
branchName:
|
|
3689
|
-
title:
|
|
3786
|
+
ref: z7.string(),
|
|
3787
|
+
branchName: z7.string(),
|
|
3788
|
+
title: z7.string().optional()
|
|
3690
3789
|
},
|
|
3691
3790
|
async ({ ref, branchName, title }) => {
|
|
3692
3791
|
const result = await orch.addStackLayer(ref, branchName, { title });
|
|
@@ -3715,11 +3814,11 @@ async function startMcpServer() {
|
|
|
3715
3814
|
"create_pr_stack",
|
|
3716
3815
|
"Create a new GitHub PR stack with one Sideboard worktree per layer (bottom\u2192top branch names). Requires `gh extension install github/gh-stack`.",
|
|
3717
3816
|
{
|
|
3718
|
-
repoPath:
|
|
3719
|
-
branches:
|
|
3720
|
-
agent:
|
|
3721
|
-
base:
|
|
3722
|
-
title:
|
|
3817
|
+
repoPath: z7.string(),
|
|
3818
|
+
branches: z7.array(z7.string()).min(1),
|
|
3819
|
+
agent: z7.enum(["claude", "codex", "opencode", "brightsy", "cursor"]),
|
|
3820
|
+
base: z7.string().optional(),
|
|
3821
|
+
title: z7.string().optional()
|
|
3723
3822
|
},
|
|
3724
3823
|
async (args) => {
|
|
3725
3824
|
const result = await orch.createPrStack({
|
|
@@ -3758,10 +3857,10 @@ async function startMcpServer() {
|
|
|
3758
3857
|
"list_issues",
|
|
3759
3858
|
"List or search issues (Linear, AbleTime, or GitHub; falls back to GitHub). 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. Then create_thread with sourceType=ticket.",
|
|
3760
3859
|
{
|
|
3761
|
-
repoPath:
|
|
3762
|
-
query:
|
|
3763
|
-
assignee:
|
|
3764
|
-
limit:
|
|
3860
|
+
repoPath: z7.string(),
|
|
3861
|
+
query: z7.string().optional().describe("Search title, identifier, or description"),
|
|
3862
|
+
assignee: z7.string().optional().describe("me (Linear default), unassigned, all, a user id, or a GitHub login"),
|
|
3863
|
+
limit: z7.number().int().positive().max(250).optional().describe("Page size (default 40, max 250). Raise when truncated is true.")
|
|
3765
3864
|
},
|
|
3766
3865
|
async ({ repoPath, query, assignee, limit }) => {
|
|
3767
3866
|
const root = await resolveRepoRoot(repoPath);
|