@sideboard-ai/core 0.1.350 → 0.1.352
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{abletime-TX7BTTR2.js → abletime-5LEOMLQE.js} +4 -4
- package/dist/{abletime-URSRZW7P.js → abletime-VUPUERE4.js} +4 -4
- package/dist/{abletime-oauth-QS3WPSCC.js → abletime-oauth-65LHLQ7P.js} +3 -3
- package/dist/{abletime-oauth-SL3NMNEC.js → abletime-oauth-JAINJBNY.js} +3 -3
- package/dist/{abletime-rest-JZU6JJCV.js → abletime-rest-4TCWPN7E.js} +3 -3
- package/dist/{abletime-rest-GGQLUO55.js → abletime-rest-HBIK234Y.js} +3 -3
- package/dist/agents/claude-runner.cjs +46 -19
- package/dist/agents/claude-runner.js +16 -1
- package/dist/agents/cursor-runner.cjs +50 -12
- package/dist/agents/cursor-runner.js +2 -2
- package/dist/{agents-RGAV5OHD.js → agents-4DQDWMSX.js} +9 -9
- package/dist/{agents-P5QIV24I.js → agents-IV454BNN.js} +8 -8
- package/dist/{app-settings-IA7ZZKWQ.js → app-settings-GM4MJD2E.js} +3 -1
- package/dist/{app-settings-XILTSD6L.js → app-settings-X3UFWRAF.js} +3 -1
- package/dist/{chunk-BZK62VPT.js → chunk-2S7EAUDI.js} +2 -2
- package/dist/{chunk-CCWQ65VD.js → chunk-2SFKLWU5.js} +2 -2
- package/dist/{chunk-WB3G2LQO.js → chunk-BCNPZ7H2.js} +1 -1
- package/dist/{chunk-W5GHFT7E.js → chunk-CQDJ4RX4.js} +149 -127
- package/dist/{chunk-SMSD6U3N.js → chunk-GA5MLYVG.js} +1 -1
- package/dist/{chunk-LFSTOECH.js → chunk-HBRP2SHA.js} +4 -4
- package/dist/{chunk-DL4OHDBV.js → chunk-I6BKWSCT.js} +3 -3
- package/dist/{chunk-WJURGCBR.js → chunk-KSBJOWVO.js} +1 -1
- package/dist/{chunk-J4EA5SHF.js → chunk-LZ3TAKNJ.js} +3 -3
- package/dist/{chunk-F4RFFE2H.js → chunk-M426EW7O.js} +3 -3
- package/dist/{chunk-ZBSEJIOV.js → chunk-MBQU6RE2.js} +6 -6
- package/dist/{chunk-TCEUNSLX.js → chunk-NRGT7RMO.js} +1 -1
- package/dist/{chunk-M45WGODR.js → chunk-OCCUD5CK.js} +2 -2
- package/dist/{chunk-5AHWUJRT.js → chunk-PR5TOSRD.js} +324 -70
- package/dist/{chunk-SUZOPJZC.js → chunk-PS6TD5MQ.js} +260 -2
- package/dist/{chunk-YE7Z5WH3.js → chunk-QKNOKO2P.js} +1 -1
- package/dist/{chunk-VL6F2KRE.js → chunk-RMJXFABA.js} +8 -6
- package/dist/{chunk-FQ3JYUKI.js → chunk-SBUR2WCP.js} +2 -2
- package/dist/{chunk-MANERA6F.js → chunk-SWU5C3HQ.js} +6 -6
- package/dist/{chunk-UFUAIVNV.js → chunk-TB7SYXXS.js} +8 -6
- package/dist/{chunk-7ZD4OK6G.js → chunk-TDWE7INS.js} +1 -1
- package/dist/{chunk-WFX4ZVSZ.js → chunk-TRUNDXCE.js} +1 -1
- package/dist/{chunk-NDEVAA34.js → chunk-UDTFOKVX.js} +28 -10
- package/dist/{chunk-PXSWVZIL.js → chunk-UPJB6TFI.js} +2 -2
- package/dist/{chunk-2MESZ5XR.js → chunk-US2PGV3X.js} +146 -126
- package/dist/{chunk-YVN7L4KG.js → chunk-V2G6AGWM.js} +6 -1
- package/dist/{chunk-37ZBEBP6.js → chunk-VZAICZHU.js} +3 -3
- package/dist/{chunk-FCKTBE26.js → chunk-WJQFWDGH.js} +1 -1
- package/dist/{chunk-EZ2MUWNW.js → chunk-WTT525MC.js} +4 -4
- package/dist/{chunk-BF6INES4.js → chunk-X52SO3DM.js} +1 -1
- package/dist/{chunk-B4EFQTMP.js → chunk-XB6NCBZK.js} +5 -5
- package/dist/{chunk-5TCMXEYL.js → chunk-YGXUIBIT.js} +3 -3
- package/dist/{chunk-VHQ6OG3U.js → chunk-ZHYFRRPN.js} +2 -2
- package/dist/{chunk-5WF54R3B.js → chunk-ZLPP66IP.js} +5 -5
- package/dist/{conductor-VGCXUUG6.js → conductor-2UOW2XBE.js} +6 -6
- package/dist/{conductor-HVOGBK63.js → conductor-6NYG2SZA.js} +6 -6
- package/dist/{coordinator-prompt-E736TJBS.js → coordinator-prompt-K3WT5UVS.js} +4 -4
- package/dist/{coordinator-prompt-DPO7L2JO.js → coordinator-prompt-ZP6AEETR.js} +4 -4
- package/dist/{global-workspace-4RDPAOTT.js → global-workspace-EFPSYP4N.js} +4 -4
- package/dist/{global-workspace-TG2TVLUF.js → global-workspace-EPVNFQVC.js} +4 -4
- package/dist/index.cjs +1342 -886
- package/dist/index.d.cts +27 -14
- package/dist/index.d.ts +27 -14
- package/dist/index.js +510 -335
- package/dist/{linear-WG23LBCX.js → linear-4ACCQCWM.js} +2 -2
- package/dist/{linear-E3BX5PX5.js → linear-Q2E6LKJW.js} +2 -2
- package/dist/{linear-list-VU47BNUV.js → linear-list-5A3BAWRZ.js} +1 -1
- package/dist/{linear-list-OINZWVV5.js → linear-list-V3A57XBR.js} +1 -1
- package/dist/mcp/run-stdio.cjs +1266 -823
- package/dist/mcp/run-stdio.js +491 -328
- package/dist/{optional-cli-K6HX2X5O.js → optional-cli-CKQPLY4Q.js} +4 -4
- package/dist/{optional-cli-SA3EQYML.js → optional-cli-WE3ULLFV.js} +5 -5
- package/dist/{orchestrator-QDHZ56LA.js → orchestrator-5BCHUAFG.js} +11 -11
- package/dist/{orchestrator-3I2FLEZL.js → orchestrator-EY6GCYQG.js} +12 -12
- package/dist/{thread-store-4YTOV2HL.js → thread-store-CDFHHRXB.js} +2 -2
- package/dist/{thread-store-LME2ICZP.js → thread-store-TDGZEGS6.js} +2 -2
- package/dist/{workspaces-6TMYV4N2.js → workspaces-KL4SZMJE.js} +4 -4
- package/dist/{workspaces-4PA24IX6.js → workspaces-SQRR67HD.js} +4 -4
- package/dist/{worktree-4ATMCYIE.js → worktree-7KG5N2XL.js} +3 -3
- package/dist/{worktree-DA6SKIU5.js → worktree-IDX7LMBC.js} +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17,16 +17,16 @@ import {
|
|
|
17
17
|
toAbleTimeIssueInfo,
|
|
18
18
|
updateAbleTimeTask,
|
|
19
19
|
verifyAbleTimeConnection
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-VZAICZHU.js";
|
|
21
21
|
import {
|
|
22
22
|
looksLikeAbleTimeUlid
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-2SFKLWU5.js";
|
|
24
24
|
import {
|
|
25
25
|
clearOptionalCliPresenceCache,
|
|
26
26
|
detectOptionalServiceClis,
|
|
27
27
|
installOptionalServiceCli,
|
|
28
28
|
optionalCliPresence
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-UPJB6TFI.js";
|
|
30
30
|
import {
|
|
31
31
|
AGENT_GIT_ACTIONS,
|
|
32
32
|
BOARD_COLUMN_DEFS,
|
|
@@ -225,7 +225,7 @@ import {
|
|
|
225
225
|
worktreeCleanupSettings,
|
|
226
226
|
writeAgentBlock,
|
|
227
227
|
writeWorktreeFile
|
|
228
|
-
} from "./chunk-
|
|
228
|
+
} from "./chunk-CQDJ4RX4.js";
|
|
229
229
|
import {
|
|
230
230
|
OPTIONAL_SERVICES,
|
|
231
231
|
OPTIONAL_SERVICE_IDS,
|
|
@@ -241,7 +241,7 @@ import {
|
|
|
241
241
|
optionalServiceConnected,
|
|
242
242
|
optionalServiceSpec,
|
|
243
243
|
verifyOptionalService
|
|
244
|
-
} from "./chunk-
|
|
244
|
+
} from "./chunk-2S7EAUDI.js";
|
|
245
245
|
import {
|
|
246
246
|
LEGACY_PLAN_FILE_REL,
|
|
247
247
|
PLAN_FILE_NAME,
|
|
@@ -298,7 +298,7 @@ import {
|
|
|
298
298
|
startLinearOAuth,
|
|
299
299
|
updateLinearIssue,
|
|
300
300
|
validateLinearApiKey
|
|
301
|
-
} from "./chunk-
|
|
301
|
+
} from "./chunk-TDWE7INS.js";
|
|
302
302
|
import {
|
|
303
303
|
downloadAuthenticatedFile,
|
|
304
304
|
extractHttpUrls,
|
|
@@ -389,7 +389,7 @@ import {
|
|
|
389
389
|
userMcpNamesToDisable,
|
|
390
390
|
worktreeMcpToolNames,
|
|
391
391
|
writeInjectedMcpConfig
|
|
392
|
-
} from "./chunk-
|
|
392
|
+
} from "./chunk-UDTFOKVX.js";
|
|
393
393
|
import {
|
|
394
394
|
getAgentSetupInfo,
|
|
395
395
|
installAgent,
|
|
@@ -401,7 +401,7 @@ import {
|
|
|
401
401
|
prepareTerminalCommand,
|
|
402
402
|
resolveLoginCommand,
|
|
403
403
|
whichOnPath
|
|
404
|
-
} from "./chunk-
|
|
404
|
+
} from "./chunk-M426EW7O.js";
|
|
405
405
|
import {
|
|
406
406
|
brightsyMcpServerName,
|
|
407
407
|
connectBrightsyTeam,
|
|
@@ -425,7 +425,7 @@ import {
|
|
|
425
425
|
registerBrightsyOAuthClient,
|
|
426
426
|
saveBrightsyConfig
|
|
427
427
|
} from "./chunk-RSA47QYR.js";
|
|
428
|
-
import "./chunk-
|
|
428
|
+
import "./chunk-BCNPZ7H2.js";
|
|
429
429
|
import {
|
|
430
430
|
BRIGHTSY_SUMMARIZE_CONTEXT_TOOL,
|
|
431
431
|
CHARS_PER_CONTEXT_TOKEN,
|
|
@@ -537,7 +537,7 @@ import {
|
|
|
537
537
|
workspaceAgentChatSummaries,
|
|
538
538
|
worktreeRunPortsPath,
|
|
539
539
|
wrapReviewSkillMarkdown
|
|
540
|
-
} from "./chunk-
|
|
540
|
+
} from "./chunk-MBQU6RE2.js";
|
|
541
541
|
import {
|
|
542
542
|
STDERR_EVENT_MAX_CHARS,
|
|
543
543
|
STDOUT_EVENT_MAX_CHARS,
|
|
@@ -592,7 +592,7 @@ import {
|
|
|
592
592
|
detectAcpHarnesses,
|
|
593
593
|
isAcpHarnessId,
|
|
594
594
|
resolveAcpHarnessCommand
|
|
595
|
-
} from "./chunk-
|
|
595
|
+
} from "./chunk-QKNOKO2P.js";
|
|
596
596
|
import "./chunk-7H655NEW.js";
|
|
597
597
|
import {
|
|
598
598
|
ABLETIME_OAUTH_CALLBACK_PATH,
|
|
@@ -616,7 +616,7 @@ import {
|
|
|
616
616
|
parseAbleTimeOAuthCallbackUrl,
|
|
617
617
|
resolveAbleTimeOAuthHost,
|
|
618
618
|
startAbleTimeOAuth
|
|
619
|
-
} from "./chunk-
|
|
619
|
+
} from "./chunk-LZ3TAKNJ.js";
|
|
620
620
|
import {
|
|
621
621
|
ABLETIME_MCP_PATH,
|
|
622
622
|
ABLETIME_MCP_PM_PATH,
|
|
@@ -637,7 +637,7 @@ import {
|
|
|
637
637
|
normalizeAbleTimeCredential,
|
|
638
638
|
normalizeAbleTimeHost,
|
|
639
639
|
rewriteAbleTimeError
|
|
640
|
-
} from "./chunk-
|
|
640
|
+
} from "./chunk-ZLPP66IP.js";
|
|
641
641
|
import {
|
|
642
642
|
currentHttpFetch,
|
|
643
643
|
formatFetchError,
|
|
@@ -703,7 +703,7 @@ import {
|
|
|
703
703
|
stageBuffersAsAttachments,
|
|
704
704
|
syncWorkspacesFromThreads,
|
|
705
705
|
takenTeamSlugsForOrchestration
|
|
706
|
-
} from "./chunk-
|
|
706
|
+
} from "./chunk-HBRP2SHA.js";
|
|
707
707
|
import {
|
|
708
708
|
GITHUB_PR_BODY_MAX_CHARS,
|
|
709
709
|
GITHUB_PR_BODY_SAFE_CHARS,
|
|
@@ -793,7 +793,7 @@ import {
|
|
|
793
793
|
suggestSlug,
|
|
794
794
|
switchWorktreeBranch,
|
|
795
795
|
warmGithubAgentAuth
|
|
796
|
-
} from "./chunk-
|
|
796
|
+
} from "./chunk-SBUR2WCP.js";
|
|
797
797
|
import {
|
|
798
798
|
FAMOUS_SOCCER_TEAMS,
|
|
799
799
|
SCHEDULE_RUN_HISTORY_LIMIT,
|
|
@@ -853,7 +853,7 @@ import {
|
|
|
853
853
|
worktreeNameFromPath,
|
|
854
854
|
worktreeSlugForTicket,
|
|
855
855
|
writeThread
|
|
856
|
-
} from "./chunk-
|
|
856
|
+
} from "./chunk-NRGT7RMO.js";
|
|
857
857
|
import "./chunk-BMRJNRQK.js";
|
|
858
858
|
import "./chunk-TRMPDDVL.js";
|
|
859
859
|
import {
|
|
@@ -886,7 +886,7 @@ import {
|
|
|
886
886
|
import {
|
|
887
887
|
clipMcpToolResult,
|
|
888
888
|
cursorToolErrorText
|
|
889
|
-
} from "./chunk-
|
|
889
|
+
} from "./chunk-V2G6AGWM.js";
|
|
890
890
|
import "./chunk-AXQ4ZWHK.js";
|
|
891
891
|
import {
|
|
892
892
|
AGENT_RUNNER_MAX_OLD_SPACE_MB,
|
|
@@ -940,6 +940,7 @@ import {
|
|
|
940
940
|
AGENT_RPC_PATH,
|
|
941
941
|
AGENT_RPC_PROTOCOL_VERSION,
|
|
942
942
|
AGENT_RPC_TOKEN_QUERY,
|
|
943
|
+
COMPUTER_USE_DESCRIPTION,
|
|
943
944
|
RPC_INTERNAL_ERROR,
|
|
944
945
|
RPC_INVALID_REQUEST,
|
|
945
946
|
RPC_METHOD_NOT_FOUND,
|
|
@@ -948,13 +949,15 @@ import {
|
|
|
948
949
|
agentRpcConnectFromMetadata,
|
|
949
950
|
clearAgentRuntimeMetadataIfOwned,
|
|
950
951
|
isJsonRpcRequest,
|
|
952
|
+
macosComputerUseRunner,
|
|
951
953
|
parseRpcFrame,
|
|
954
|
+
performComputerUse,
|
|
952
955
|
readAgentRuntimeMetadata,
|
|
953
956
|
rpcError,
|
|
954
957
|
rpcNotify,
|
|
955
958
|
rpcResult,
|
|
956
959
|
writeAgentRuntimeMetadata
|
|
957
|
-
} from "./chunk-
|
|
960
|
+
} from "./chunk-PS6TD5MQ.js";
|
|
958
961
|
import {
|
|
959
962
|
AGENT_DONE_SOUNDS,
|
|
960
963
|
BAKED_REMOTE_RELAY_URL,
|
|
@@ -1010,6 +1013,7 @@ import {
|
|
|
1010
1013
|
claudeChromeEnabled,
|
|
1011
1014
|
claudeUserSettingsPath,
|
|
1012
1015
|
coerceOrchestratorAgent,
|
|
1016
|
+
computerUseEnabled,
|
|
1013
1017
|
confirmClaudeUsageOverLimitEnabled,
|
|
1014
1018
|
contextTokens,
|
|
1015
1019
|
copyReadAloudFromUnknown,
|
|
@@ -1128,7 +1132,7 @@ import {
|
|
|
1128
1132
|
withTurnScopedCost,
|
|
1129
1133
|
writeSecureJson,
|
|
1130
1134
|
writeViewerContext
|
|
1131
|
-
} from "./chunk-
|
|
1135
|
+
} from "./chunk-TB7SYXXS.js";
|
|
1132
1136
|
import {
|
|
1133
1137
|
writePrivateFile
|
|
1134
1138
|
} from "./chunk-JT7R45JB.js";
|
|
@@ -1971,6 +1975,53 @@ function buildWaterfall(rows) {
|
|
|
1971
1975
|
)
|
|
1972
1976
|
})).sort((a, b) => (a.nodes[0]?.label ?? "").localeCompare(b.nodes[0]?.label ?? ""));
|
|
1973
1977
|
}
|
|
1978
|
+
function joinCapped(lines, max = 3) {
|
|
1979
|
+
if (lines.length <= max) return lines.join(". ");
|
|
1980
|
+
const extra = lines.length - max;
|
|
1981
|
+
return `${lines.slice(0, max).join(". ")}. ${extra} more`;
|
|
1982
|
+
}
|
|
1983
|
+
function planWatchCopy(chains) {
|
|
1984
|
+
const start = [];
|
|
1985
|
+
const waiting = [];
|
|
1986
|
+
const ready = [];
|
|
1987
|
+
for (const chain of chains) {
|
|
1988
|
+
const incoming = chain.nodes.flatMap((node) => node.incoming);
|
|
1989
|
+
for (const node of chain.nodes) {
|
|
1990
|
+
const gating = node.incoming.filter((edge) => !edge.loop);
|
|
1991
|
+
const blocked = gating.filter((edge) => !edge.met);
|
|
1992
|
+
if (blocked.length > 0) {
|
|
1993
|
+
const verb = blocked.some((edge2) => edge2.hold === "start") ? "start" : "merge";
|
|
1994
|
+
const edge = blocked.find((row2) => row2.hold === verb) ?? blocked[0];
|
|
1995
|
+
waiting.push(
|
|
1996
|
+
`${node.label} can ${verb} once ${edge.fromLabel} is ${gatePhrase(edge.gate)}`
|
|
1997
|
+
);
|
|
1998
|
+
if (verb === "merge") start.push(`${node.label} can start`);
|
|
1999
|
+
continue;
|
|
2000
|
+
}
|
|
2001
|
+
if (gating.length > 0) {
|
|
2002
|
+
const verb = gating.every((edge) => edge.hold === "merge") ? "merge" : "start";
|
|
2003
|
+
ready.push(`${node.label} can ${verb}`);
|
|
2004
|
+
continue;
|
|
2005
|
+
}
|
|
2006
|
+
const outgoing = incoming.filter((edge) => edge.fromKey === node.key && !edge.loop);
|
|
2007
|
+
if (outgoing.length > 0 && outgoing.every((edge) => edge.met)) continue;
|
|
2008
|
+
start.push(`${node.label} can start`);
|
|
2009
|
+
}
|
|
2010
|
+
}
|
|
2011
|
+
if (start.length === 0 && waiting.length === 0 && ready.length === 0) {
|
|
2012
|
+
return "Later steps wait until the one above reaches its gate. In main clears when that pull request is merged. In production stays waiting until you mark it.";
|
|
2013
|
+
}
|
|
2014
|
+
const sentences = [];
|
|
2015
|
+
if (start.length) sentences.push(joinCapped(start));
|
|
2016
|
+
if (ready.length) sentences.push(joinCapped(ready));
|
|
2017
|
+
if (waiting.length) {
|
|
2018
|
+
sentences.push(
|
|
2019
|
+
start.length || ready.length ? `Still waiting: ${joinCapped(waiting)}` : `Running and idle. ${joinCapped(waiting)}. A merge or a production mark is what moves the next step`
|
|
2020
|
+
);
|
|
2021
|
+
}
|
|
2022
|
+
const text6 = sentences.join(". ");
|
|
2023
|
+
return text6.endsWith(".") ? text6 : `${text6}.`;
|
|
2024
|
+
}
|
|
1974
2025
|
function gatePhrase(gate) {
|
|
1975
2026
|
return gate === "in-prod" ? "in production" : "in main";
|
|
1976
2027
|
}
|
|
@@ -2111,10 +2162,72 @@ function formatOrderPlace(rows, you) {
|
|
|
2111
2162
|
return lines.join("\n");
|
|
2112
2163
|
}
|
|
2113
2164
|
function executionSlice(rows) {
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2165
|
+
const byKey = /* @__PURE__ */ new Map();
|
|
2166
|
+
const touch = (target, label, depth, asSubject) => {
|
|
2167
|
+
const key = targetKey(target);
|
|
2168
|
+
const found = byKey.get(key);
|
|
2169
|
+
if (!found) {
|
|
2170
|
+
byKey.set(key, {
|
|
2171
|
+
target,
|
|
2172
|
+
label,
|
|
2173
|
+
depth: asSubject ? depth : Number.POSITIVE_INFINITY,
|
|
2174
|
+
asSubject,
|
|
2175
|
+
incoming: [],
|
|
2176
|
+
outgoing: []
|
|
2177
|
+
});
|
|
2178
|
+
return;
|
|
2179
|
+
}
|
|
2180
|
+
if (asSubject || !found.asSubject) found.label = label;
|
|
2181
|
+
if (asSubject) {
|
|
2182
|
+
found.asSubject = true;
|
|
2183
|
+
found.depth = Math.min(found.depth, depth);
|
|
2184
|
+
}
|
|
2117
2185
|
};
|
|
2186
|
+
for (const row2 of rows) {
|
|
2187
|
+
touch(row2.subject, row2.subjectLabel, row2.depth, true);
|
|
2188
|
+
touch(row2.waitsOn, row2.waitsOnLabel, row2.depth, false);
|
|
2189
|
+
if (row2.loop) continue;
|
|
2190
|
+
byKey.get(targetKey(row2.subject)).incoming.push(row2);
|
|
2191
|
+
byKey.get(targetKey(row2.waitsOn)).outgoing.push(row2);
|
|
2192
|
+
}
|
|
2193
|
+
const start = [];
|
|
2194
|
+
const waiting = [];
|
|
2195
|
+
const mergeHeld = [];
|
|
2196
|
+
const gateName = (row2) => row2.gate === "in-prod" ? "in prod" : "in main";
|
|
2197
|
+
const items = [...byKey.values()].sort((a, b) => {
|
|
2198
|
+
const depthA = Number.isFinite(a.depth) ? a.depth : 0;
|
|
2199
|
+
const depthB = Number.isFinite(b.depth) ? b.depth : 0;
|
|
2200
|
+
return depthA - depthB || a.label.localeCompare(b.label);
|
|
2201
|
+
});
|
|
2202
|
+
for (const item of items) {
|
|
2203
|
+
const startBlocked = item.incoming.filter((row2) => !row2.met && row2.hold === "start");
|
|
2204
|
+
const mergeBlocked = item.incoming.filter((row2) => !row2.met && row2.hold === "merge");
|
|
2205
|
+
const settled = item.outgoing.length > 0 && item.outgoing.every((row2) => row2.met) && startBlocked.length === 0 && mergeBlocked.length === 0;
|
|
2206
|
+
if (startBlocked.length > 0) {
|
|
2207
|
+
const edge = startBlocked[0];
|
|
2208
|
+
waiting.push({
|
|
2209
|
+
target: item.target,
|
|
2210
|
+
label: item.label,
|
|
2211
|
+
detail: `${edge.waitsOnLabel} must be ${gateName(edge)} before this can start`
|
|
2212
|
+
});
|
|
2213
|
+
} else if (!settled) {
|
|
2214
|
+
const pending = item.outgoing.find((row2) => !row2.met);
|
|
2215
|
+
start.push({
|
|
2216
|
+
target: item.target,
|
|
2217
|
+
label: item.label,
|
|
2218
|
+
detail: pending ? `Start this so it can reach ${pending.gate === "in-prod" ? "production" : "main"}` : "Start this"
|
|
2219
|
+
});
|
|
2220
|
+
}
|
|
2221
|
+
if (mergeBlocked.length > 0 && startBlocked.length === 0) {
|
|
2222
|
+
const edge = mergeBlocked[0];
|
|
2223
|
+
mergeHeld.push({
|
|
2224
|
+
target: item.target,
|
|
2225
|
+
label: item.label,
|
|
2226
|
+
detail: `Do not merge until ${edge.waitsOnLabel} is ${gateName(edge)}`
|
|
2227
|
+
});
|
|
2228
|
+
}
|
|
2229
|
+
}
|
|
2230
|
+
return { start, waiting, mergeHeld };
|
|
2118
2231
|
}
|
|
2119
2232
|
function orderEdgeTouches(edge, you) {
|
|
2120
2233
|
return orderTargetMatches(edge.subject, you) || orderTargetMatches(edge.waitsOn, you);
|
|
@@ -2135,7 +2248,7 @@ function formatOrderText(rows, plan) {
|
|
|
2135
2248
|
rows.forEach((row2, index) => {
|
|
2136
2249
|
const gate = row2.gate === "in-prod" ? "in prod" : "in main";
|
|
2137
2250
|
const hold = row2.hold === "merge" ? "merge" : "start";
|
|
2138
|
-
const state = row2.loop ? "loop" : row2.met ? "clear" : "waiting";
|
|
2251
|
+
const state = row2.loop ? "loop" : row2.met ? "clear" : row2.hold === "merge" ? "merge" : "waiting";
|
|
2139
2252
|
lines.push(
|
|
2140
2253
|
row2.loop ? `${index + 1}. ${state} ${row2.subjectLabel} returns to ${row2.waitsOnLabel} once it is ${gate}` : `${index + 1}. ${state} ${row2.waitsOnLabel} must be ${gate} before ${row2.subjectLabel} can ${hold}`
|
|
2141
2254
|
);
|
|
@@ -2143,6 +2256,17 @@ function formatOrderText(rows, plan) {
|
|
|
2143
2256
|
if (row2.note) lines.push(` ${row2.note}`);
|
|
2144
2257
|
lines.push(` id: ${row2.id.slice(0, 8)}`);
|
|
2145
2258
|
});
|
|
2259
|
+
if (plan?.status === "active") {
|
|
2260
|
+
const slice = executionSlice(rows);
|
|
2261
|
+
const section = (title, items) => {
|
|
2262
|
+
if (!items.length) return;
|
|
2263
|
+
lines.push("", title);
|
|
2264
|
+
for (const item of items) lines.push(`- ${item.label}. ${item.detail}`);
|
|
2265
|
+
};
|
|
2266
|
+
section("Start now:", slice.start);
|
|
2267
|
+
section("Do not start:", slice.waiting);
|
|
2268
|
+
section("Do not merge:", slice.mergeHeld);
|
|
2269
|
+
}
|
|
2146
2270
|
return lines.join("\n");
|
|
2147
2271
|
}
|
|
2148
2272
|
function escapeHtml(value) {
|
|
@@ -2175,6 +2299,15 @@ function markWorkingChains(chains, threads) {
|
|
|
2175
2299
|
})
|
|
2176
2300
|
}));
|
|
2177
2301
|
}
|
|
2302
|
+
function waterfallBar(node, chain) {
|
|
2303
|
+
const gating = node.incoming.filter((edge) => !edge.loop);
|
|
2304
|
+
const startBlocked = gating.some((edge) => !edge.met && edge.hold === "start");
|
|
2305
|
+
const outgoing = chain.nodes.flatMap((other) => other.incoming).filter((edge) => edge.fromKey === node.key && !edge.loop);
|
|
2306
|
+
const settled = outgoing.length > 0 && outgoing.every((edge) => edge.met) && !startBlocked;
|
|
2307
|
+
if (startBlocked) return " waiting";
|
|
2308
|
+
if (settled || gating.length > 0 && gating.every((edge) => edge.met)) return " clear";
|
|
2309
|
+
return " start";
|
|
2310
|
+
}
|
|
2178
2311
|
function nodeIsYou(node, you) {
|
|
2179
2312
|
if (!you) return false;
|
|
2180
2313
|
return orderTargetMatches(
|
|
@@ -2190,20 +2323,20 @@ function formatWaterfallHtml(chains, opts) {
|
|
|
2190
2323
|
const plan = opts?.plan ?? null;
|
|
2191
2324
|
const you = opts?.you ?? null;
|
|
2192
2325
|
const title = plan?.title?.trim() || "Planner";
|
|
2193
|
-
const
|
|
2326
|
+
const watch2 = chains.length ? planWatchCopy(chains) : "";
|
|
2327
|
+
const status = plan ? plan.status === "active" ? watch2 || "Running. Start the steps that are free. Leave held steps alone." : watch2 ? `Draft. Nothing runs until you agree. ${watch2}` : "Draft. Discuss this and change it. Nothing runs until you agree." : watch2 || "Later steps wait until the one above reaches its gate. In main clears when that pull request is merged. In production stays waiting until it is marked.";
|
|
2194
2328
|
const body = chains.length === 0 ? '<p class="empty">No order yet.</p>' : chains.map((chain) => {
|
|
2195
2329
|
const nodes = chain.nodes.map((node) => {
|
|
2196
|
-
const waiting = node.incoming.some((edge) => !edge.met && !edge.loop);
|
|
2197
|
-
const clear = node.incoming.some((edge) => !edge.loop) && !waiting;
|
|
2198
2330
|
const yours = nodeIsYou(node, you);
|
|
2199
2331
|
const working = node.working === true;
|
|
2200
|
-
const
|
|
2332
|
+
const bar = waterfallBar(node, chain);
|
|
2333
|
+
const state = `${working ? " current" : ""}${bar}${yours ? " you" : ""}`;
|
|
2201
2334
|
const drops = node.incoming.map((edge) => {
|
|
2202
2335
|
const tone = edge.loop ? "loop" : edge.met ? "clear" : "waiting";
|
|
2203
2336
|
const note = edge.note ? `<span>${escapeHtml(edge.note)}</span>` : "";
|
|
2204
2337
|
return `<div class="drop"><span>After ${escapeHtml(edge.fromLabel)} is ${escapeHtml(gatePhrase(edge.gate))}, this ${escapeHtml(holdPhrase(edge.hold))}</span><span class="${tone}">${escapeHtml(edge.detail)}</span>${note}</div>`;
|
|
2205
2338
|
}).join("");
|
|
2206
|
-
const kicker = `${WATERFALL_KIND[node.kind]}${working ? " \xB7 Working" : ""}${yours ? " \xB7 You" : ""}`;
|
|
2339
|
+
const kicker = `${WATERFALL_KIND[node.kind]}${bar === " start" ? " \xB7 Start" : ""}${working ? " \xB7 Working" : ""}${yours ? " \xB7 You" : ""}`;
|
|
2207
2340
|
return `<li class="node" style="margin-left:${node.depth * 28}px">${drops}<div class="bar${state}"><span class="kicker">${kicker}</span><strong>${escapeHtml(node.label)}</strong></div></li>`;
|
|
2208
2341
|
}).join("");
|
|
2209
2342
|
return `<ol class="chain">${nodes}</ol>`;
|
|
@@ -2226,6 +2359,7 @@ h1 { font-size: 15px; font-weight: 600; margin: 0 0 6px; }
|
|
|
2226
2359
|
.bar { border: 1px solid #333; border-radius: 10px; padding: 10px 12px; background: #1c1c1c; display: flex; flex-direction: column; gap: 2px; }
|
|
2227
2360
|
.bar.waiting { border-color: #6a5420; background: #221c10; }
|
|
2228
2361
|
.bar.clear { border-color: #2d5a32; background: #142016; }
|
|
2362
|
+
.bar.start { border-color: #2a4a7a; background: #141c28; }
|
|
2229
2363
|
.bar.you { outline: 1px solid #8ab4ff; }
|
|
2230
2364
|
.bar.current { border-color: #8ab4ff; box-shadow: inset 3px 0 0 #8ab4ff; }
|
|
2231
2365
|
.bar.current .kicker { color: #ececec; }
|
|
@@ -2437,7 +2571,7 @@ function executeOrderPlan(ownerThreadId) {
|
|
|
2437
2571
|
const ids = new Set(edges.map((edge) => edge.id));
|
|
2438
2572
|
const rows = resolveOrchestrationGates(file.plans, file.edges, threadSnapshots(), file.marks);
|
|
2439
2573
|
const slice = executionSlice(rows.filter((row2) => ids.has(row2.id)));
|
|
2440
|
-
return { plan,
|
|
2574
|
+
return { plan, start: slice.start, waiting: slice.waiting, mergeHeld: slice.mergeHeld };
|
|
2441
2575
|
}
|
|
2442
2576
|
function listOrderEdges() {
|
|
2443
2577
|
return readFile().edges;
|
|
@@ -10126,7 +10260,7 @@ async function startHeadlessHost(opts) {
|
|
|
10126
10260
|
};
|
|
10127
10261
|
const refreshRunning = async () => {
|
|
10128
10262
|
try {
|
|
10129
|
-
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-
|
|
10263
|
+
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-EY6GCYQG.js");
|
|
10130
10264
|
agentsRunning = getOrchestrator2().getRuntime().running;
|
|
10131
10265
|
} catch {
|
|
10132
10266
|
agentsRunning = 0;
|
|
@@ -10763,7 +10897,7 @@ function createClippedMcpServer() {
|
|
|
10763
10897
|
}
|
|
10764
10898
|
|
|
10765
10899
|
// src/mcp/server.ts
|
|
10766
|
-
import { z as
|
|
10900
|
+
import { z as z11 } from "zod";
|
|
10767
10901
|
import { randomUUID as randomUUID8 } from "crypto";
|
|
10768
10902
|
import { basename as basename3 } from "path";
|
|
10769
10903
|
|
|
@@ -10781,6 +10915,35 @@ function resolveRunScriptThreadRef(ref) {
|
|
|
10781
10915
|
return thread.id;
|
|
10782
10916
|
}
|
|
10783
10917
|
|
|
10918
|
+
// src/mcp/computer-use-tool.ts
|
|
10919
|
+
import { z } from "zod";
|
|
10920
|
+
function registerComputerUseTool(server, catalog) {
|
|
10921
|
+
if (!catalog.has("computer_use")) return;
|
|
10922
|
+
server.tool(
|
|
10923
|
+
"computer_use",
|
|
10924
|
+
COMPUTER_USE_DESCRIPTION,
|
|
10925
|
+
{
|
|
10926
|
+
action: z.enum(["screenshot", "click", "type", "key", "scroll"]).describe("screenshot, click, type, key, or scroll"),
|
|
10927
|
+
x: z.number().optional().describe("Screen x in points, not PNG pixels, for click and scroll"),
|
|
10928
|
+
y: z.number().optional().describe("Screen y in points, not PNG pixels, for click and scroll"),
|
|
10929
|
+
text: z.string().optional().describe("Text to type"),
|
|
10930
|
+
key: z.string().optional().describe("One key: return, tab, escape, arrows, delete, or one character"),
|
|
10931
|
+
modifiers: z.array(z.string()).optional().describe("command, shift, option, control"),
|
|
10932
|
+
dx: z.number().optional().describe("Horizontal scroll in points. Positive is right"),
|
|
10933
|
+
dy: z.number().optional().describe("Vertical scroll in points. Positive is down")
|
|
10934
|
+
},
|
|
10935
|
+
async (args) => {
|
|
10936
|
+
const result = await performComputerUse({
|
|
10937
|
+
enabled: computerUseEnabled(),
|
|
10938
|
+
cwd: process.cwd(),
|
|
10939
|
+
input: args,
|
|
10940
|
+
runner: macosComputerUseRunner
|
|
10941
|
+
});
|
|
10942
|
+
return mcpJson(result);
|
|
10943
|
+
}
|
|
10944
|
+
);
|
|
10945
|
+
}
|
|
10946
|
+
|
|
10784
10947
|
// src/mcp/create-thread-agent.ts
|
|
10785
10948
|
function resolveOrchCreateThreadOptions(input) {
|
|
10786
10949
|
const { resolveNewThreadOptions: resolveNewThreadOptions2 } = input;
|
|
@@ -10973,10 +11136,10 @@ function childThreadRefs(parentId, threads) {
|
|
|
10973
11136
|
}
|
|
10974
11137
|
|
|
10975
11138
|
// src/mcp/abletime-tools.ts
|
|
10976
|
-
import { z as
|
|
11139
|
+
import { z as z3 } from "zod";
|
|
10977
11140
|
|
|
10978
11141
|
// src/mcp/issue-payload.ts
|
|
10979
|
-
import { z } from "zod";
|
|
11142
|
+
import { z as z2 } from "zod";
|
|
10980
11143
|
|
|
10981
11144
|
// src/mcp/smart-crush.ts
|
|
10982
11145
|
var MUST_KEEP_TEXT_RE = /\b(error|exception|failed|failure|fatal|critical|panic|traceback|npm err|assert)\b/i;
|
|
@@ -11221,7 +11384,7 @@ function crushMarkdown(text6, opts) {
|
|
|
11221
11384
|
|
|
11222
11385
|
// src/mcp/issue-payload.ts
|
|
11223
11386
|
var MCP_ISSUE_INCLUDE_VALUES = ["default", "full"];
|
|
11224
|
-
var mcpIssueIncludeSchema =
|
|
11387
|
+
var mcpIssueIncludeSchema = z2.enum(MCP_ISSUE_INCLUDE_VALUES).optional().describe(
|
|
11225
11388
|
"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."
|
|
11226
11389
|
);
|
|
11227
11390
|
var MCP_ISSUE_CRUSH_HINT = "Pass include=full to re-fetch the uncompressed ticket from the vendor.";
|
|
@@ -11367,7 +11530,7 @@ function registerAbleTimeTools(server) {
|
|
|
11367
11530
|
server.tool(
|
|
11368
11531
|
"abletime_list_tasks",
|
|
11369
11532
|
"List open AbleTime tasks (excludes done/archived). Optional projectId filter. Pass updatedSince for tasks updated since then and any comments on that page.",
|
|
11370
|
-
{ projectId:
|
|
11533
|
+
{ projectId: z3.string().optional(), updatedSince: mcpIssueUpdatedSinceSchema },
|
|
11371
11534
|
async ({ projectId, updatedSince }) => {
|
|
11372
11535
|
try {
|
|
11373
11536
|
const tasks = await listAbleTimeTasks({ projectId });
|
|
@@ -11380,7 +11543,7 @@ function registerAbleTimeTools(server) {
|
|
|
11380
11543
|
server.tool(
|
|
11381
11544
|
"abletime_search_tasks",
|
|
11382
11545
|
"Search AbleTime tasks by text, reference, or tag. Pass updatedSince for tasks updated since then and any comments on that page.",
|
|
11383
|
-
{ query:
|
|
11546
|
+
{ query: z3.string(), updatedSince: mcpIssueUpdatedSinceSchema },
|
|
11384
11547
|
async ({ query, updatedSince }) => {
|
|
11385
11548
|
try {
|
|
11386
11549
|
const tasks = await searchAbleTimeTasks(query);
|
|
@@ -11393,7 +11556,7 @@ function registerAbleTimeTools(server) {
|
|
|
11393
11556
|
server.tool(
|
|
11394
11557
|
"abletime_get_task",
|
|
11395
11558
|
"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).",
|
|
11396
|
-
{ id:
|
|
11559
|
+
{ id: z3.string(), include: mcpIssueIncludeSchema },
|
|
11397
11560
|
async ({ id, include }) => {
|
|
11398
11561
|
try {
|
|
11399
11562
|
return text(formatAbleTimeTaskPayload(await getAbleTimeTask(id), include));
|
|
@@ -11406,9 +11569,9 @@ function registerAbleTimeTools(server) {
|
|
|
11406
11569
|
"abletime_download_attachment",
|
|
11407
11570
|
"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.",
|
|
11408
11571
|
{
|
|
11409
|
-
id:
|
|
11410
|
-
name:
|
|
11411
|
-
repoPath:
|
|
11572
|
+
id: z3.string().describe("Attachment id or URL from abletime_get_task."),
|
|
11573
|
+
name: z3.string().optional().describe("Optional filename override."),
|
|
11574
|
+
repoPath: z3.string().optional().describe("Workspace / worktree path. Omit on a worktree turn (uses cwd).")
|
|
11412
11575
|
},
|
|
11413
11576
|
async ({ id, name, repoPath }) => {
|
|
11414
11577
|
try {
|
|
@@ -11421,7 +11584,7 @@ function registerAbleTimeTools(server) {
|
|
|
11421
11584
|
server.tool(
|
|
11422
11585
|
"abletime_comment",
|
|
11423
11586
|
"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.",
|
|
11424
|
-
{ id:
|
|
11587
|
+
{ id: z3.string(), body: z3.string() },
|
|
11425
11588
|
async (args) => {
|
|
11426
11589
|
try {
|
|
11427
11590
|
return text(await commentAbleTimeTask(args));
|
|
@@ -11430,23 +11593,23 @@ function registerAbleTimeTools(server) {
|
|
|
11430
11593
|
}
|
|
11431
11594
|
}
|
|
11432
11595
|
);
|
|
11433
|
-
const relationInputSchema =
|
|
11434
|
-
type:
|
|
11435
|
-
issue:
|
|
11596
|
+
const relationInputSchema = z3.object({
|
|
11597
|
+
type: z3.string().describe("blockedBy (this waits on issue) or blocks (issue waits on this)."),
|
|
11598
|
+
issue: z3.string().describe("Related task id or reference (CRM-232).")
|
|
11436
11599
|
});
|
|
11437
11600
|
server.tool(
|
|
11438
11601
|
"abletime_update_task",
|
|
11439
11602
|
'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.',
|
|
11440
11603
|
{
|
|
11441
|
-
id:
|
|
11442
|
-
title:
|
|
11443
|
-
description:
|
|
11444
|
-
state:
|
|
11445
|
-
labels:
|
|
11446
|
-
project:
|
|
11447
|
-
parent:
|
|
11448
|
-
relations:
|
|
11449
|
-
removeRelations:
|
|
11604
|
+
id: z3.string(),
|
|
11605
|
+
title: z3.string().optional(),
|
|
11606
|
+
description: z3.string().optional(),
|
|
11607
|
+
state: z3.string().optional(),
|
|
11608
|
+
labels: z3.array(z3.string()).optional().describe("Replace tags/labels. Empty array clears when the host accepts it."),
|
|
11609
|
+
project: z3.string().nullable().optional().describe("Project name or id. AbleTime tasks stay in a project."),
|
|
11610
|
+
parent: z3.string().nullable().optional().describe('Parent task id or reference (CRM-232), or "none" to unset.'),
|
|
11611
|
+
relations: z3.array(relationInputSchema).optional().describe("Set a wait-on dependency: blockedBy or blocks."),
|
|
11612
|
+
removeRelations: z3.array(relationInputSchema).optional().describe("Clear a wait-on dependency.")
|
|
11450
11613
|
},
|
|
11451
11614
|
async (args) => {
|
|
11452
11615
|
try {
|
|
@@ -11465,12 +11628,12 @@ function registerAbleTimeTools(server) {
|
|
|
11465
11628
|
"abletime_create_task",
|
|
11466
11629
|
"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).",
|
|
11467
11630
|
{
|
|
11468
|
-
title:
|
|
11469
|
-
description:
|
|
11470
|
-
projectId:
|
|
11471
|
-
categoryId:
|
|
11472
|
-
state:
|
|
11473
|
-
parent:
|
|
11631
|
+
title: z3.string(),
|
|
11632
|
+
description: z3.string().optional(),
|
|
11633
|
+
projectId: z3.string().optional(),
|
|
11634
|
+
categoryId: z3.string().optional(),
|
|
11635
|
+
state: z3.enum(["backlog", "todo"]).optional(),
|
|
11636
|
+
parent: z3.string().optional().describe("Parent task id or reference (CRM-232) for a spin-off.")
|
|
11474
11637
|
},
|
|
11475
11638
|
async (args) => {
|
|
11476
11639
|
try {
|
|
@@ -11484,10 +11647,10 @@ function registerAbleTimeTools(server) {
|
|
|
11484
11647
|
"abletime_ensure_task",
|
|
11485
11648
|
"Find or create an AbleTime task for this work, then create_workspace with sourceType=ticket.",
|
|
11486
11649
|
{
|
|
11487
|
-
title:
|
|
11488
|
-
description:
|
|
11489
|
-
projectId:
|
|
11490
|
-
categoryId:
|
|
11650
|
+
title: z3.string(),
|
|
11651
|
+
description: z3.string().optional(),
|
|
11652
|
+
projectId: z3.string().optional(),
|
|
11653
|
+
categoryId: z3.string().optional()
|
|
11491
11654
|
},
|
|
11492
11655
|
async (args) => {
|
|
11493
11656
|
try {
|
|
@@ -11501,7 +11664,7 @@ function registerAbleTimeTools(server) {
|
|
|
11501
11664
|
}
|
|
11502
11665
|
|
|
11503
11666
|
// src/mcp/github-tools.ts
|
|
11504
|
-
import { z as
|
|
11667
|
+
import { z as z4 } from "zod";
|
|
11505
11668
|
function text2(payload, isError = false) {
|
|
11506
11669
|
return mcpJson(payload, isError);
|
|
11507
11670
|
}
|
|
@@ -11515,15 +11678,15 @@ async function cursorIssueBlock(repoPath) {
|
|
|
11515
11678
|
const cwd = await resolveRepoRoot((repoPath ?? "").trim() || process.cwd());
|
|
11516
11679
|
return cursorIssuesUnavailableReason(cwd);
|
|
11517
11680
|
}
|
|
11518
|
-
var repoPathSchema =
|
|
11681
|
+
var repoPathSchema = z4.string().optional().describe("Workspace / worktree path. Omit on a worktree turn (uses cwd).");
|
|
11519
11682
|
function registerGithubIssueTools(server) {
|
|
11520
11683
|
server.tool(
|
|
11521
11684
|
"github_search_issues",
|
|
11522
11685
|
"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).",
|
|
11523
11686
|
{
|
|
11524
|
-
query:
|
|
11525
|
-
assignee:
|
|
11526
|
-
limit:
|
|
11687
|
+
query: z4.string().optional().describe("Search text (title, body, identifiers). Omit to list by assignee only."),
|
|
11688
|
+
assignee: z4.string().optional().describe("me, unassigned, all, or a GitHub login. Default: all when query is set, otherwise me."),
|
|
11689
|
+
limit: z4.number().int().positive().max(250).optional().describe("Page size (default 40, max 250). Raise when truncated is true."),
|
|
11527
11690
|
updatedSince: mcpIssueUpdatedSinceSchema,
|
|
11528
11691
|
repoPath: repoPathSchema
|
|
11529
11692
|
},
|
|
@@ -11586,7 +11749,7 @@ function registerGithubIssueTools(server) {
|
|
|
11586
11749
|
server.tool(
|
|
11587
11750
|
"github_get_issue",
|
|
11588
11751
|
"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).",
|
|
11589
|
-
{ id:
|
|
11752
|
+
{ id: z4.string(), include: mcpIssueIncludeSchema, repoPath: repoPathSchema },
|
|
11590
11753
|
async ({ id, include, repoPath }) => {
|
|
11591
11754
|
try {
|
|
11592
11755
|
const blocked = await cursorIssueBlock(repoPath);
|
|
@@ -11601,8 +11764,8 @@ function registerGithubIssueTools(server) {
|
|
|
11601
11764
|
"github_download_attachment",
|
|
11602
11765
|
"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.",
|
|
11603
11766
|
{
|
|
11604
|
-
url:
|
|
11605
|
-
name:
|
|
11767
|
+
url: z4.string().describe("Attachment URL from github_get_issue."),
|
|
11768
|
+
name: z4.string().optional().describe("Optional filename override."),
|
|
11606
11769
|
repoPath: repoPathSchema
|
|
11607
11770
|
},
|
|
11608
11771
|
async ({ url, name, repoPath }) => {
|
|
@@ -11616,7 +11779,7 @@ function registerGithubIssueTools(server) {
|
|
|
11616
11779
|
server.tool(
|
|
11617
11780
|
"github_comment",
|
|
11618
11781
|
"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.",
|
|
11619
|
-
{ id:
|
|
11782
|
+
{ id: z4.string(), body: z4.string(), repoPath: repoPathSchema },
|
|
11620
11783
|
async ({ id, body, repoPath }) => {
|
|
11621
11784
|
try {
|
|
11622
11785
|
const blocked = await cursorIssueBlock(repoPath);
|
|
@@ -11627,23 +11790,23 @@ function registerGithubIssueTools(server) {
|
|
|
11627
11790
|
}
|
|
11628
11791
|
}
|
|
11629
11792
|
);
|
|
11630
|
-
const relationInputSchema =
|
|
11631
|
-
type:
|
|
11632
|
-
issue:
|
|
11793
|
+
const relationInputSchema = z4.object({
|
|
11794
|
+
type: z4.string().describe("blocks or blockedBy (this issue's view)."),
|
|
11795
|
+
issue: z4.string().describe("Related issue #123 or URL.")
|
|
11633
11796
|
});
|
|
11634
11797
|
server.tool(
|
|
11635
11798
|
"github_update_issue",
|
|
11636
11799
|
'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.',
|
|
11637
11800
|
{
|
|
11638
|
-
id:
|
|
11639
|
-
title:
|
|
11640
|
-
body:
|
|
11641
|
-
state:
|
|
11642
|
-
labels:
|
|
11643
|
-
project:
|
|
11644
|
-
parent:
|
|
11645
|
-
relations:
|
|
11646
|
-
removeRelations:
|
|
11801
|
+
id: z4.string(),
|
|
11802
|
+
title: z4.string().optional(),
|
|
11803
|
+
body: z4.string().optional(),
|
|
11804
|
+
state: z4.string().optional().describe("open or closed"),
|
|
11805
|
+
labels: z4.array(z4.string()).optional().describe("Replace all labels. Empty array clears. Call github_get_issue first to keep existing."),
|
|
11806
|
+
project: z4.string().nullable().optional().describe('GitHub Project title, or "none" to remove current projects.'),
|
|
11807
|
+
parent: z4.string().nullable().optional().describe('Parent issue #123 or URL, or "none" to unset.'),
|
|
11808
|
+
relations: z4.array(relationInputSchema).optional().describe("Add blockedBy or blocks relations (issue #123 or URL)."),
|
|
11809
|
+
removeRelations: z4.array(relationInputSchema).optional().describe("Remove blockedBy or blocks relations."),
|
|
11647
11810
|
repoPath: repoPathSchema
|
|
11648
11811
|
},
|
|
11649
11812
|
async (args) => {
|
|
@@ -11660,9 +11823,9 @@ function registerGithubIssueTools(server) {
|
|
|
11660
11823
|
"github_create_issue",
|
|
11661
11824
|
"Create a GitHub issue. Pass parent (#123) to mark a spin-off in the body.",
|
|
11662
11825
|
{
|
|
11663
|
-
title:
|
|
11664
|
-
body:
|
|
11665
|
-
parent:
|
|
11826
|
+
title: z4.string(),
|
|
11827
|
+
body: z4.string().optional(),
|
|
11828
|
+
parent: z4.string().optional().describe("Parent issue #123 or URL for a spin-off."),
|
|
11666
11829
|
repoPath: repoPathSchema
|
|
11667
11830
|
},
|
|
11668
11831
|
async (args) => {
|
|
@@ -11678,7 +11841,7 @@ function registerGithubIssueTools(server) {
|
|
|
11678
11841
|
}
|
|
11679
11842
|
|
|
11680
11843
|
// src/mcp/linear-tools.ts
|
|
11681
|
-
import { z as
|
|
11844
|
+
import { z as z5 } from "zod";
|
|
11682
11845
|
function text3(payload, isError = false) {
|
|
11683
11846
|
return mcpJson(payload, isError);
|
|
11684
11847
|
}
|
|
@@ -11688,7 +11851,7 @@ function fail3(err) {
|
|
|
11688
11851
|
true
|
|
11689
11852
|
);
|
|
11690
11853
|
}
|
|
11691
|
-
var prioritySchema =
|
|
11854
|
+
var prioritySchema = z5.number().int().min(0).max(4).optional().describe("0 none, 1 urgent, 2 high, 3 medium, 4 low");
|
|
11692
11855
|
function registerLinearTools(server) {
|
|
11693
11856
|
server.tool(
|
|
11694
11857
|
"linear_list_teams",
|
|
@@ -11718,9 +11881,9 @@ function registerLinearTools(server) {
|
|
|
11718
11881
|
"linear_search_issues",
|
|
11719
11882
|
"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).",
|
|
11720
11883
|
{
|
|
11721
|
-
query:
|
|
11722
|
-
assignee:
|
|
11723
|
-
limit:
|
|
11884
|
+
query: z5.string().optional().describe("Search text (identifier, title, description). Omit to list by assignee only."),
|
|
11885
|
+
assignee: z5.string().optional().describe("me, unassigned, all, a Linear user id, or a display name. Default: all when query is set, otherwise me."),
|
|
11886
|
+
limit: z5.number().int().positive().max(250).optional().describe("Page size (default 40, max 250). Raise when truncated is true."),
|
|
11724
11887
|
updatedSince: mcpIssueUpdatedSinceSchema
|
|
11725
11888
|
},
|
|
11726
11889
|
async ({ query, assignee, limit, updatedSince }) => {
|
|
@@ -11760,7 +11923,7 @@ function registerLinearTools(server) {
|
|
|
11760
11923
|
server.tool(
|
|
11761
11924
|
"linear_get_issue",
|
|
11762
11925
|
"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).",
|
|
11763
|
-
{ id:
|
|
11926
|
+
{ id: z5.string(), include: mcpIssueIncludeSchema },
|
|
11764
11927
|
async ({ id, include }) => {
|
|
11765
11928
|
try {
|
|
11766
11929
|
return text3(formatLinearIssuePayload(await getLinearIssue(id), include));
|
|
@@ -11773,9 +11936,9 @@ function registerLinearTools(server) {
|
|
|
11773
11936
|
"linear_download_attachment",
|
|
11774
11937
|
"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.",
|
|
11775
11938
|
{
|
|
11776
|
-
id:
|
|
11777
|
-
name:
|
|
11778
|
-
repoPath:
|
|
11939
|
+
id: z5.string().describe("Attachment uuid or upload URL from linear_get_issue."),
|
|
11940
|
+
name: z5.string().optional().describe("Optional filename override."),
|
|
11941
|
+
repoPath: z5.string().optional().describe("Workspace / worktree path. Omit on a worktree turn (uses cwd).")
|
|
11779
11942
|
},
|
|
11780
11943
|
async ({ id, name, repoPath }) => {
|
|
11781
11944
|
try {
|
|
@@ -11789,13 +11952,13 @@ function registerLinearTools(server) {
|
|
|
11789
11952
|
"linear_create_issue",
|
|
11790
11953
|
'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.',
|
|
11791
11954
|
{
|
|
11792
|
-
team:
|
|
11793
|
-
title:
|
|
11794
|
-
description:
|
|
11795
|
-
state:
|
|
11796
|
-
assignee:
|
|
11955
|
+
team: z5.string(),
|
|
11956
|
+
title: z5.string(),
|
|
11957
|
+
description: z5.string().optional(),
|
|
11958
|
+
state: z5.string().optional(),
|
|
11959
|
+
assignee: z5.string().nullable().optional(),
|
|
11797
11960
|
priority: prioritySchema,
|
|
11798
|
-
parent:
|
|
11961
|
+
parent: z5.string().optional().describe("Parent issue uuid or identifier (ENG-123) for a spin-off / sub-issue.")
|
|
11799
11962
|
},
|
|
11800
11963
|
async (args) => {
|
|
11801
11964
|
try {
|
|
@@ -11805,26 +11968,26 @@ function registerLinearTools(server) {
|
|
|
11805
11968
|
}
|
|
11806
11969
|
}
|
|
11807
11970
|
);
|
|
11808
|
-
const relationInputSchema =
|
|
11809
|
-
type:
|
|
11810
|
-
issue:
|
|
11971
|
+
const relationInputSchema = z5.object({
|
|
11972
|
+
type: z5.string().describe("blocks, blockedBy, related, duplicate, or duplicateOf (this issue's view)."),
|
|
11973
|
+
issue: z5.string().describe("Related issue uuid or identifier (ENG-123).")
|
|
11811
11974
|
});
|
|
11812
11975
|
server.tool(
|
|
11813
11976
|
"linear_update_issue",
|
|
11814
11977
|
'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.',
|
|
11815
11978
|
{
|
|
11816
|
-
id:
|
|
11817
|
-
title:
|
|
11818
|
-
description:
|
|
11819
|
-
state:
|
|
11820
|
-
assignee:
|
|
11979
|
+
id: z5.string(),
|
|
11980
|
+
title: z5.string().optional(),
|
|
11981
|
+
description: z5.string().optional(),
|
|
11982
|
+
state: z5.string().optional(),
|
|
11983
|
+
assignee: z5.string().nullable().optional(),
|
|
11821
11984
|
priority: prioritySchema,
|
|
11822
|
-
cycle:
|
|
11823
|
-
labels:
|
|
11824
|
-
project:
|
|
11825
|
-
parent:
|
|
11826
|
-
relations:
|
|
11827
|
-
removeRelations:
|
|
11985
|
+
cycle: z5.string().nullable().optional().describe('Cycle name, number, "current"/"active", or "none" to unschedule.'),
|
|
11986
|
+
labels: z5.array(z5.string()).optional().describe("Replace all labels (names or ids). Empty array clears. Call linear_get_issue first to keep existing."),
|
|
11987
|
+
project: z5.string().nullable().optional().describe('Project name, id, slug, or "none" to unassign.'),
|
|
11988
|
+
parent: z5.string().nullable().optional().describe('Parent issue uuid or identifier (ENG-123), or "none" to unset.'),
|
|
11989
|
+
relations: z5.array(relationInputSchema).optional().describe("Add relations from this issue's view (blocks, blockedBy, related, duplicate, duplicateOf)."),
|
|
11990
|
+
removeRelations: z5.array(relationInputSchema).optional().describe("Remove relations by type + related issue (uuid or ENG-123).")
|
|
11828
11991
|
},
|
|
11829
11992
|
async (args) => {
|
|
11830
11993
|
try {
|
|
@@ -11838,8 +12001,8 @@ function registerLinearTools(server) {
|
|
|
11838
12001
|
"linear_comment",
|
|
11839
12002
|
"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.",
|
|
11840
12003
|
{
|
|
11841
|
-
id:
|
|
11842
|
-
body:
|
|
12004
|
+
id: z5.string(),
|
|
12005
|
+
body: z5.string()
|
|
11843
12006
|
},
|
|
11844
12007
|
async (args) => {
|
|
11845
12008
|
try {
|
|
@@ -11859,7 +12022,7 @@ function registerConnectedIssueVendorTools(server, settings = loadAppSettings())
|
|
|
11859
12022
|
}
|
|
11860
12023
|
|
|
11861
12024
|
// src/mcp/posthog-tools.ts
|
|
11862
|
-
import { z as
|
|
12025
|
+
import { z as z6 } from "zod";
|
|
11863
12026
|
var POSTHOG_METHODS = ["GET", "POST", "PATCH"];
|
|
11864
12027
|
var POSTHOG_RESPONSE_MAX_CHARS = 256e3;
|
|
11865
12028
|
var POSTHOG_TIMEOUT_MS = 2e4;
|
|
@@ -11993,13 +12156,13 @@ function registerPosthogTools(server) {
|
|
|
11993
12156
|
"posthog_api",
|
|
11994
12157
|
POSTHOG_API_DESCRIPTION,
|
|
11995
12158
|
{
|
|
11996
|
-
method:
|
|
12159
|
+
method: z6.enum(POSTHOG_METHODS).describe(
|
|
11997
12160
|
"GET, POST /api/projects|environments/:id/query/ for a read, or POST/PATCH when the user asked for a change"
|
|
11998
12161
|
),
|
|
11999
|
-
path:
|
|
12000
|
-
query:
|
|
12001
|
-
body:
|
|
12002
|
-
write:
|
|
12162
|
+
path: z6.string().describe("PostHog path starting with /api/, not a full URL"),
|
|
12163
|
+
query: z6.record(z6.string(), z6.string()).optional().describe("Query string parameters"),
|
|
12164
|
+
body: z6.unknown().optional().describe("JSON body for POST or PATCH"),
|
|
12165
|
+
write: z6.boolean().optional().describe(
|
|
12003
12166
|
"Required true for POST and PATCH that change data. Omit for GET and for POST .../query/."
|
|
12004
12167
|
)
|
|
12005
12168
|
},
|
|
@@ -12042,7 +12205,7 @@ function formatMcpPrList(input) {
|
|
|
12042
12205
|
}
|
|
12043
12206
|
|
|
12044
12207
|
// src/mcp/archive-tools.ts
|
|
12045
|
-
import { z as
|
|
12208
|
+
import { z as z7 } from "zod";
|
|
12046
12209
|
|
|
12047
12210
|
// src/mcp/archive-guard.ts
|
|
12048
12211
|
function mcpArchiveBlockedReason(thread) {
|
|
@@ -12058,9 +12221,9 @@ function registerArchiveTools(server, orch) {
|
|
|
12058
12221
|
"list_archive",
|
|
12059
12222
|
"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).",
|
|
12060
12223
|
{
|
|
12061
|
-
query:
|
|
12062
|
-
kind:
|
|
12063
|
-
limit:
|
|
12224
|
+
query: z7.string().optional().describe("Title, branch, repo, agent, ticket, or PR"),
|
|
12225
|
+
kind: z7.enum(["all", "workspace", "agent"]).optional().describe("all (default), workspace, or agent"),
|
|
12226
|
+
limit: z7.number().int().positive().max(250).optional().describe("Page size (default 40, max 250)")
|
|
12064
12227
|
},
|
|
12065
12228
|
async ({ query, kind, limit }) => {
|
|
12066
12229
|
const view = listFleetArchive(orch.getThreads(true), { query, kind, limit });
|
|
@@ -12070,7 +12233,7 @@ function registerArchiveTools(server, orch) {
|
|
|
12070
12233
|
server.tool(
|
|
12071
12234
|
"archive_workspace",
|
|
12072
12235
|
"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.",
|
|
12073
|
-
{ ref:
|
|
12236
|
+
{ ref: z7.string().describe("Any chat id on the workspace") },
|
|
12074
12237
|
async ({ ref }) => {
|
|
12075
12238
|
const thread = orch.getThread(ref);
|
|
12076
12239
|
if (!thread) {
|
|
@@ -12103,7 +12266,7 @@ function registerArchiveTools(server, orch) {
|
|
|
12103
12266
|
server.tool(
|
|
12104
12267
|
"archive_chat",
|
|
12105
12268
|
"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.",
|
|
12106
|
-
{ ref:
|
|
12269
|
+
{ ref: z7.string().describe("Chat id to archive") },
|
|
12107
12270
|
async ({ ref }) => {
|
|
12108
12271
|
const t = orch.getThread(ref);
|
|
12109
12272
|
if (!t) {
|
|
@@ -12129,7 +12292,7 @@ function registerArchiveTools(server, orch) {
|
|
|
12129
12292
|
server.tool(
|
|
12130
12293
|
"restore_workspace",
|
|
12131
12294
|
"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.",
|
|
12132
|
-
{ ref:
|
|
12295
|
+
{ ref: z7.string().describe("Any chat id from list_archive on that workspace") },
|
|
12133
12296
|
async ({ ref }) => {
|
|
12134
12297
|
try {
|
|
12135
12298
|
const restored = await orch.restoreWorkspace(ref);
|
|
@@ -12153,7 +12316,7 @@ function registerArchiveTools(server, orch) {
|
|
|
12153
12316
|
server.tool(
|
|
12154
12317
|
"restore_chat",
|
|
12155
12318
|
"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.",
|
|
12156
|
-
{ ref:
|
|
12319
|
+
{ ref: z7.string().describe("Archived chat id from list_archive") },
|
|
12157
12320
|
async ({ ref }) => {
|
|
12158
12321
|
try {
|
|
12159
12322
|
const restored = await orch.restore(ref);
|
|
@@ -12171,7 +12334,7 @@ function registerArchiveTools(server, orch) {
|
|
|
12171
12334
|
}
|
|
12172
12335
|
|
|
12173
12336
|
// src/mcp/schedule-tools.ts
|
|
12174
|
-
import { z as
|
|
12337
|
+
import { z as z8 } from "zod";
|
|
12175
12338
|
function text4(payload, isError = false) {
|
|
12176
12339
|
return mcpJson(payload, isError);
|
|
12177
12340
|
}
|
|
@@ -12272,23 +12435,23 @@ function registerScheduleTools(server) {
|
|
|
12272
12435
|
"create_schedule",
|
|
12273
12436
|
"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.",
|
|
12274
12437
|
{
|
|
12275
|
-
prompt:
|
|
12276
|
-
name:
|
|
12277
|
-
at:
|
|
12278
|
-
every:
|
|
12279
|
-
time:
|
|
12280
|
-
days:
|
|
12281
|
-
cron:
|
|
12282
|
-
tz:
|
|
12283
|
-
archiveChat:
|
|
12438
|
+
prompt: z8.string().describe("User message / goal queued when the automation fires"),
|
|
12439
|
+
name: z8.string().optional(),
|
|
12440
|
+
at: z8.string().optional().describe("ISO datetime for a one-shot"),
|
|
12441
|
+
every: z8.string().optional().describe("Interval such as 15m, 1h, 6h, 1d"),
|
|
12442
|
+
time: z8.string().optional().describe("HH:mm (24-hour) clock time. Omit days for every day."),
|
|
12443
|
+
days: z8.string().optional().describe("daily, weekdays, weekends, or days such as mon,wed,fri or mon-fri. Use with time."),
|
|
12444
|
+
cron: z8.string().optional().describe("5-field cron expression"),
|
|
12445
|
+
tz: z8.string().optional().describe("IANA timezone for cron or time (default: system)"),
|
|
12446
|
+
archiveChat: z8.boolean().optional().describe(
|
|
12284
12447
|
"Archive a new Global chat when the run finishes. Default true. Pass false to leave the chat open."
|
|
12285
12448
|
),
|
|
12286
|
-
chatId:
|
|
12449
|
+
chatId: z8.string().optional().describe(
|
|
12287
12450
|
'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.'
|
|
12288
12451
|
),
|
|
12289
|
-
threadId:
|
|
12290
|
-
agent:
|
|
12291
|
-
model:
|
|
12452
|
+
threadId: z8.string().optional().describe("Legacy alias for chatId."),
|
|
12453
|
+
agent: z8.enum(["claude", "cursor", "codex", "opencode"]).optional().describe("Agent for a new Global chat (omit for Account default)"),
|
|
12454
|
+
model: z8.string().optional()
|
|
12292
12455
|
},
|
|
12293
12456
|
async (args) => {
|
|
12294
12457
|
try {
|
|
@@ -12325,23 +12488,23 @@ function registerScheduleTools(server) {
|
|
|
12325
12488
|
"update_schedule",
|
|
12326
12489
|
"Update a local automation (prompt, cadence, target chat, archiveChat, enabled). Pass id from list_schedules.",
|
|
12327
12490
|
{
|
|
12328
|
-
id:
|
|
12329
|
-
prompt:
|
|
12330
|
-
name:
|
|
12331
|
-
at:
|
|
12332
|
-
every:
|
|
12333
|
-
time:
|
|
12334
|
-
days:
|
|
12335
|
-
cron:
|
|
12336
|
-
tz:
|
|
12337
|
-
archiveChat:
|
|
12338
|
-
chatId:
|
|
12491
|
+
id: z8.string(),
|
|
12492
|
+
prompt: z8.string().optional(),
|
|
12493
|
+
name: z8.string().optional(),
|
|
12494
|
+
at: z8.string().optional(),
|
|
12495
|
+
every: z8.string().optional(),
|
|
12496
|
+
time: z8.string().optional().describe("HH:mm clock time. Use with days, or alone to change the time of a weekly job."),
|
|
12497
|
+
days: z8.string().optional().describe("daily, weekdays, weekends, or mon,wed,fri. Use with time, or alone on an existing weekly job."),
|
|
12498
|
+
cron: z8.string().optional(),
|
|
12499
|
+
tz: z8.string().optional(),
|
|
12500
|
+
archiveChat: z8.boolean().optional().describe("Archive a new Global chat when the run finishes. False leaves it open."),
|
|
12501
|
+
chatId: z8.string().optional().describe(
|
|
12339
12502
|
'Existing chat, "self", or empty string for a Global chat each run. A bound job is removed when that chat is archived.'
|
|
12340
12503
|
),
|
|
12341
|
-
threadId:
|
|
12342
|
-
agent:
|
|
12343
|
-
model:
|
|
12344
|
-
enabled:
|
|
12504
|
+
threadId: z8.string().optional().describe("Legacy alias for chatId."),
|
|
12505
|
+
agent: z8.enum(["claude", "cursor", "codex", "opencode"]).optional(),
|
|
12506
|
+
model: z8.string().optional(),
|
|
12507
|
+
enabled: z8.boolean().optional()
|
|
12345
12508
|
},
|
|
12346
12509
|
async (args) => {
|
|
12347
12510
|
try {
|
|
@@ -12377,7 +12540,7 @@ function registerScheduleTools(server) {
|
|
|
12377
12540
|
server.tool(
|
|
12378
12541
|
"delete_schedule",
|
|
12379
12542
|
"Delete a local automation. Pass id from list_schedules.",
|
|
12380
|
-
{ id:
|
|
12543
|
+
{ id: z8.string() },
|
|
12381
12544
|
async ({ id }) => {
|
|
12382
12545
|
try {
|
|
12383
12546
|
deleteSchedule(id);
|
|
@@ -12390,7 +12553,7 @@ function registerScheduleTools(server) {
|
|
|
12390
12553
|
server.tool(
|
|
12391
12554
|
"run_schedule",
|
|
12392
12555
|
"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.",
|
|
12393
|
-
{ id:
|
|
12556
|
+
{ id: z8.string() },
|
|
12394
12557
|
async ({ id }) => {
|
|
12395
12558
|
try {
|
|
12396
12559
|
if (!getSchedule(id)) {
|
|
@@ -12406,7 +12569,7 @@ function registerScheduleTools(server) {
|
|
|
12406
12569
|
}
|
|
12407
12570
|
|
|
12408
12571
|
// src/mcp/follow-up-tools.ts
|
|
12409
|
-
import { z as
|
|
12572
|
+
import { z as z9 } from "zod";
|
|
12410
12573
|
function text5(payload, isError = false) {
|
|
12411
12574
|
return mcpJson(payload, isError);
|
|
12412
12575
|
}
|
|
@@ -12440,10 +12603,10 @@ function registerFollowUpTools(server) {
|
|
|
12440
12603
|
"create_follow_up",
|
|
12441
12604
|
"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.",
|
|
12442
12605
|
{
|
|
12443
|
-
kind:
|
|
12444
|
-
prompt:
|
|
12445
|
-
at:
|
|
12446
|
-
deadline:
|
|
12606
|
+
kind: z9.enum(["ci", "at"]),
|
|
12607
|
+
prompt: z9.string(),
|
|
12608
|
+
at: z9.string().optional(),
|
|
12609
|
+
deadline: z9.string().optional()
|
|
12447
12610
|
},
|
|
12448
12611
|
async ({ kind, prompt, at, deadline }) => {
|
|
12449
12612
|
const thread = callerThread();
|
|
@@ -12464,7 +12627,7 @@ function registerFollowUpTools(server) {
|
|
|
12464
12627
|
server.tool(
|
|
12465
12628
|
"delete_follow_up",
|
|
12466
12629
|
"Remove one follow-up from this chat by id.",
|
|
12467
|
-
{ id:
|
|
12630
|
+
{ id: z9.string() },
|
|
12468
12631
|
async ({ id }) => {
|
|
12469
12632
|
const thread = callerThread();
|
|
12470
12633
|
if (!thread) return text5({ error: "This chat id is missing" }, true);
|
|
@@ -12478,8 +12641,8 @@ function registerFollowUpTools(server) {
|
|
|
12478
12641
|
}
|
|
12479
12642
|
|
|
12480
12643
|
// src/mcp/order-tools.ts
|
|
12481
|
-
import { z as
|
|
12482
|
-
var kindSchema =
|
|
12644
|
+
import { z as z10 } from "zod";
|
|
12645
|
+
var kindSchema = z10.enum(["pr", "issue", "workspace", "orchestration"]);
|
|
12483
12646
|
function callerThread2() {
|
|
12484
12647
|
const id = process.env[SIDEBOARD_THREAD_ID_ENV]?.trim();
|
|
12485
12648
|
if (!id) return null;
|
|
@@ -12551,16 +12714,16 @@ function registerOrderTools(server) {
|
|
|
12551
12714
|
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.",
|
|
12552
12715
|
{
|
|
12553
12716
|
waitsOnKind: kindSchema.describe("What must happen first: pr, issue, workspace, or orchestration"),
|
|
12554
|
-
waitsOnRef:
|
|
12555
|
-
waitsOnRepoPath:
|
|
12556
|
-
waitsOnLabel:
|
|
12557
|
-
gate:
|
|
12558
|
-
hold:
|
|
12717
|
+
waitsOnRef: z10.string().describe("PR number (12), issue id (ENG-4), or workspace chat id / worktree path"),
|
|
12718
|
+
waitsOnRepoPath: z10.string().optional().describe("Project path when a PR or issue number is not unique"),
|
|
12719
|
+
waitsOnLabel: z10.string().optional().describe("Short label on the planner"),
|
|
12720
|
+
gate: z10.enum(["in-main", "in-prod"]).describe("in-main: merged to the default branch. in-prod: deployed; mark with satisfy_dependency"),
|
|
12721
|
+
hold: z10.enum(["start", "merge"]).describe("start: subject cannot begin. merge: subject cannot merge"),
|
|
12559
12722
|
subjectKind: kindSchema.optional().describe("What is held. Required from orchestration. Omit on a worktree to mean this checkout."),
|
|
12560
|
-
subjectRef:
|
|
12561
|
-
subjectRepoPath:
|
|
12562
|
-
subjectLabel:
|
|
12563
|
-
note:
|
|
12723
|
+
subjectRef: z10.string().optional().describe("PR number, issue id, or workspace ref for the subject"),
|
|
12724
|
+
subjectRepoPath: z10.string().optional(),
|
|
12725
|
+
subjectLabel: z10.string().optional(),
|
|
12726
|
+
note: z10.string().optional().describe("Why this order matters")
|
|
12564
12727
|
},
|
|
12565
12728
|
async (args) => {
|
|
12566
12729
|
try {
|
|
@@ -12624,9 +12787,9 @@ function registerOrderTools(server) {
|
|
|
12624
12787
|
"set_plan",
|
|
12625
12788
|
"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.",
|
|
12626
12789
|
{
|
|
12627
|
-
title:
|
|
12628
|
-
summary:
|
|
12629
|
-
goal:
|
|
12790
|
+
title: z10.string().describe("Short name for the plan"),
|
|
12791
|
+
summary: z10.string().optional().describe("What this order is for, in a sentence or two"),
|
|
12792
|
+
goal: z10.string().optional().describe("Outcome the steps are trying to reach")
|
|
12630
12793
|
},
|
|
12631
12794
|
async ({ title, summary, goal }) => {
|
|
12632
12795
|
try {
|
|
@@ -12644,29 +12807,28 @@ function registerOrderTools(server) {
|
|
|
12644
12807
|
);
|
|
12645
12808
|
server.tool(
|
|
12646
12809
|
"execute_plan",
|
|
12647
|
-
"Mark the plan active after the user has seen it and told you to run it. Returns
|
|
12810
|
+
"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.",
|
|
12648
12811
|
{
|
|
12649
|
-
agreed:
|
|
12812
|
+
agreed: z10.literal(true).describe("True only after the user has seen the plan and told you to run it")
|
|
12650
12813
|
},
|
|
12651
12814
|
async () => {
|
|
12652
12815
|
try {
|
|
12653
12816
|
const result = executeOrderPlan(orchestrationOwnerId(false));
|
|
12654
12817
|
const brief = (row2) => ({
|
|
12655
|
-
|
|
12656
|
-
|
|
12657
|
-
|
|
12658
|
-
|
|
12659
|
-
|
|
12660
|
-
detail: row2.detail,
|
|
12661
|
-
...row2.loop ? { loop: true } : {}
|
|
12818
|
+
kind: row2.target.kind,
|
|
12819
|
+
ref: row2.target.ref,
|
|
12820
|
+
...row2.target.repoPath ? { repoPath: row2.target.repoPath } : {},
|
|
12821
|
+
label: row2.label,
|
|
12822
|
+
detail: row2.detail
|
|
12662
12823
|
});
|
|
12663
12824
|
return mcpJson({
|
|
12664
12825
|
ok: true,
|
|
12665
12826
|
status: result.plan.status,
|
|
12666
12827
|
title: result.plan.title,
|
|
12667
|
-
|
|
12828
|
+
start: result.start.map(brief),
|
|
12668
12829
|
waiting: result.waiting.map(brief),
|
|
12669
|
-
|
|
12830
|
+
mergeHeld: result.mergeHeld.map(brief),
|
|
12831
|
+
message: "Plan is active. Start every step in start with create_workspace (kind pr or issue; pass repoPath when set) or send_to_chat (kind workspace or orchestration). create_workspace returns a checkout that already exists. Leave waiting alone. Steps in mergeHeld can proceed; do not merge them. Merge only if the user asked."
|
|
12670
12832
|
});
|
|
12671
12833
|
} catch (err) {
|
|
12672
12834
|
return mcpJson({ error: err instanceof Error ? err.message : String(err) }, true);
|
|
@@ -12717,7 +12879,7 @@ function registerOrderTools(server) {
|
|
|
12717
12879
|
server.tool(
|
|
12718
12880
|
"clear_dependency",
|
|
12719
12881
|
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.",
|
|
12720
|
-
{ id:
|
|
12882
|
+
{ id: z10.string().describe("Step id from list_order") },
|
|
12721
12883
|
async ({ id }) => {
|
|
12722
12884
|
try {
|
|
12723
12885
|
const caller = callerThread2();
|
|
@@ -12736,8 +12898,8 @@ function registerOrderTools(server) {
|
|
|
12736
12898
|
"satisfy_dependency",
|
|
12737
12899
|
"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.",
|
|
12738
12900
|
{
|
|
12739
|
-
id:
|
|
12740
|
-
satisfied:
|
|
12901
|
+
id: z10.string().describe("Step id from list_order"),
|
|
12902
|
+
satisfied: z10.boolean().optional().describe("false clears the manual mark. Default true.")
|
|
12741
12903
|
},
|
|
12742
12904
|
async ({ id, satisfied }) => {
|
|
12743
12905
|
try {
|
|
@@ -12934,7 +13096,7 @@ async function handleJobStop(params, _ctx) {
|
|
|
12934
13096
|
return stopDetachedJob(jobCwd(rec), id, reason ? { reason } : void 0);
|
|
12935
13097
|
}
|
|
12936
13098
|
async function defaultTurnWait(ref, timeoutMs) {
|
|
12937
|
-
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-
|
|
13099
|
+
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-EY6GCYQG.js");
|
|
12938
13100
|
const orch = getOrchestrator2();
|
|
12939
13101
|
const thread = await orch.waitForTurn(ref, timeoutMs, {
|
|
12940
13102
|
resolveIfStillRunning: true
|
|
@@ -12985,10 +13147,21 @@ async function handleTurnWait(params, ctx, waitFn = defaultTurnWait) {
|
|
|
12985
13147
|
failureClass: null
|
|
12986
13148
|
};
|
|
12987
13149
|
}
|
|
13150
|
+
async function handleComputerAct(params, ctx) {
|
|
13151
|
+
const rec = asRecord3(params);
|
|
13152
|
+
const cwd = str3(rec.cwd).trim() || ctx.cwd;
|
|
13153
|
+
return performComputerUse({
|
|
13154
|
+
enabled: computerUseEnabled(),
|
|
13155
|
+
cwd,
|
|
13156
|
+
input: rec,
|
|
13157
|
+
runner: macosComputerUseRunner
|
|
13158
|
+
});
|
|
13159
|
+
}
|
|
12988
13160
|
function createAgentRpcDispatcher() {
|
|
12989
13161
|
return {
|
|
12990
13162
|
"runtime.ping": handleRuntimePing,
|
|
12991
13163
|
"ui.presentArtifact": handlePresentArtifact,
|
|
13164
|
+
"computer.act": handleComputerAct,
|
|
12992
13165
|
"job.wait": handleJobWait,
|
|
12993
13166
|
"job.stop": handleJobStop,
|
|
12994
13167
|
"turn.wait": handleTurnWait,
|
|
@@ -13288,7 +13461,7 @@ async function startMcpServer() {
|
|
|
13288
13461
|
);
|
|
13289
13462
|
}
|
|
13290
13463
|
try {
|
|
13291
|
-
const { maxConcurrentAgents: maxConcurrentAgents2 } = await import("./app-settings-
|
|
13464
|
+
const { maxConcurrentAgents: maxConcurrentAgents2 } = await import("./app-settings-GM4MJD2E.js");
|
|
13292
13465
|
orch.setMaxConcurrent(maxConcurrentAgents2());
|
|
13293
13466
|
} catch {
|
|
13294
13467
|
}
|
|
@@ -13372,16 +13545,16 @@ async function startMcpServer() {
|
|
|
13372
13545
|
"list_board",
|
|
13373
13546
|
"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.",
|
|
13374
13547
|
{
|
|
13375
|
-
query:
|
|
13376
|
-
repoPath:
|
|
13377
|
-
kind:
|
|
13378
|
-
ownership:
|
|
13548
|
+
query: z11.string().optional().describe("Case-insensitive token search across title, id, labels, workspace tags, repo"),
|
|
13549
|
+
repoPath: z11.string().optional().describe("Limit to one project path from list_projects"),
|
|
13550
|
+
kind: z11.enum(["all", "tickets", "prs", "branches", "threads"]).optional().describe("Filter by worktree source (default all)"),
|
|
13551
|
+
ownership: z11.enum(["all", "mine", "reviewing"]).optional().describe(
|
|
13379
13552
|
"Mine = PRs you authored or local WIP; reviewing = someone else's PR. Uses the gh login."
|
|
13380
13553
|
),
|
|
13381
|
-
column:
|
|
13554
|
+
column: z11.enum(["new", "draft", "review", "approved", "done", "needs_you"]).optional().describe(
|
|
13382
13555
|
"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."
|
|
13383
13556
|
),
|
|
13384
|
-
limit:
|
|
13557
|
+
limit: z11.number().int().positive().optional().describe("Max cards per column (default 40). hidden counts the remainder.")
|
|
13385
13558
|
},
|
|
13386
13559
|
async ({ query, repoPath, kind, ownership, column, limit }) => {
|
|
13387
13560
|
const workspaces = orch.listWorkspaces();
|
|
@@ -13411,7 +13584,7 @@ async function startMcpServer() {
|
|
|
13411
13584
|
server.tool(
|
|
13412
13585
|
"get_chat",
|
|
13413
13586
|
"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).",
|
|
13414
|
-
{ ref:
|
|
13587
|
+
{ ref: z11.string() },
|
|
13415
13588
|
async ({ ref }) => {
|
|
13416
13589
|
const t = orch.getThread(ref);
|
|
13417
13590
|
if (!t) {
|
|
@@ -13458,17 +13631,17 @@ async function startMcpServer() {
|
|
|
13458
13631
|
"present_artifact",
|
|
13459
13632
|
"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.",
|
|
13460
13633
|
{
|
|
13461
|
-
title:
|
|
13462
|
-
type:
|
|
13634
|
+
title: z11.string().describe("Short title shown in the artifact pane header"),
|
|
13635
|
+
type: z11.enum(["html", "svg", "markdown", "react", "log"]).describe(
|
|
13463
13636
|
"html/svg/markdown/react replace the pane. log appends content to the same artifact_id (new lines only)."
|
|
13464
13637
|
),
|
|
13465
|
-
content:
|
|
13638
|
+
content: z11.string().describe(
|
|
13466
13639
|
"html/svg/markdown/react: full document. log: only the new lines since the last call (empty is ok for a status-only update)."
|
|
13467
13640
|
),
|
|
13468
|
-
artifact_id:
|
|
13469
|
-
status:
|
|
13470
|
-
phase:
|
|
13471
|
-
mode:
|
|
13641
|
+
artifact_id: z11.string().optional().describe("Stable id. Required for type=log so later calls append to the same pane."),
|
|
13642
|
+
status: z11.enum(["running", "ok", "failed", "idle"]).optional().describe("Log header pill: running (working), ok (done), failed, idle"),
|
|
13643
|
+
phase: z11.string().optional().describe("Log subtitle (Signing, Notarizing, \u2026)"),
|
|
13644
|
+
mode: z11.enum(["append", "replace"]).optional().describe("log only: append (default) or replace the buffer")
|
|
13472
13645
|
},
|
|
13473
13646
|
async ({ title, type, artifact_id, status, phase, mode }) => {
|
|
13474
13647
|
return mcpJson(
|
|
@@ -13481,15 +13654,15 @@ async function startMcpServer() {
|
|
|
13481
13654
|
"ask_user",
|
|
13482
13655
|
"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.",
|
|
13483
13656
|
{
|
|
13484
|
-
questions:
|
|
13485
|
-
|
|
13486
|
-
question:
|
|
13487
|
-
header:
|
|
13488
|
-
multiSelect:
|
|
13489
|
-
options:
|
|
13490
|
-
|
|
13491
|
-
label:
|
|
13492
|
-
description:
|
|
13657
|
+
questions: z11.array(
|
|
13658
|
+
z11.object({
|
|
13659
|
+
question: z11.string().describe("Full question text ending with ?"),
|
|
13660
|
+
header: z11.string().max(24).optional().describe("Short label shown above the question"),
|
|
13661
|
+
multiSelect: z11.boolean().optional().describe("Allow selecting multiple options"),
|
|
13662
|
+
options: z11.array(
|
|
13663
|
+
z11.object({
|
|
13664
|
+
label: z11.string(),
|
|
13665
|
+
description: z11.string().optional().describe("What this option means / when to choose it (strongly preferred)")
|
|
13493
13666
|
})
|
|
13494
13667
|
).min(2).max(6).describe("2\u20136 choices (Sideboard also offers Other)")
|
|
13495
13668
|
})
|
|
@@ -13515,9 +13688,9 @@ async function startMcpServer() {
|
|
|
13515
13688
|
"present_plan",
|
|
13516
13689
|
PRESENT_PLAN_TOOL_DESCRIPTION,
|
|
13517
13690
|
{
|
|
13518
|
-
title:
|
|
13519
|
-
content:
|
|
13520
|
-
thread_id:
|
|
13691
|
+
title: z11.string().optional().describe("Short plan title (defaults to Plan)"),
|
|
13692
|
+
content: z11.string().min(1).describe("Full plan markdown (headings, steps, risks, open questions)"),
|
|
13693
|
+
thread_id: z11.string().optional().describe("Sideboard thread id when cwd is not the worktree")
|
|
13521
13694
|
},
|
|
13522
13695
|
async ({ title, content, thread_id }) => {
|
|
13523
13696
|
const { writePlanFile: writePlanFile2 } = await import("./plan-file-7MMIPV7Y.js");
|
|
@@ -13546,15 +13719,15 @@ async function startMcpServer() {
|
|
|
13546
13719
|
"present_schema",
|
|
13547
13720
|
"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.",
|
|
13548
13721
|
{
|
|
13549
|
-
title:
|
|
13550
|
-
mode:
|
|
13551
|
-
datasource:
|
|
13552
|
-
resource_id:
|
|
13553
|
-
record_id:
|
|
13554
|
-
resource:
|
|
13555
|
-
record:
|
|
13556
|
-
records:
|
|
13557
|
-
pane_id:
|
|
13722
|
+
title: z11.string().describe("Pane title"),
|
|
13723
|
+
mode: z11.enum(["table", "form"]).optional().describe("table = list/filter records; form = edit one record"),
|
|
13724
|
+
datasource: z11.enum(["brightsy", "inline"]).optional().describe("brightsy resolves via login; inline uses embedded resource/records"),
|
|
13725
|
+
resource_id: z11.string().optional().describe("Brightsy record type UUID (or generic resource id)"),
|
|
13726
|
+
record_id: z11.string().optional().describe("Record id when opening form mode"),
|
|
13727
|
+
resource: z11.record(z11.unknown()).optional().describe("Inline { id, title, schema, schemaUi?, slug? }"),
|
|
13728
|
+
record: z11.record(z11.unknown()).optional().describe("Inline record { id, data, published_at? }"),
|
|
13729
|
+
records: z11.array(z11.record(z11.unknown())).optional().describe("Inline records for table mode"),
|
|
13730
|
+
pane_id: z11.string().optional().describe("Stable pane id across updates")
|
|
13558
13731
|
},
|
|
13559
13732
|
async (args) => {
|
|
13560
13733
|
const id = args.pane_id?.trim() || `schema_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 8)}`;
|
|
@@ -13575,10 +13748,10 @@ async function startMcpServer() {
|
|
|
13575
13748
|
"present_files",
|
|
13576
13749
|
"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.",
|
|
13577
13750
|
{
|
|
13578
|
-
title:
|
|
13579
|
-
datasource:
|
|
13580
|
-
path:
|
|
13581
|
-
pane_id:
|
|
13751
|
+
title: z11.string().optional().describe("Pane title (default: Files)"),
|
|
13752
|
+
datasource: z11.enum(["brightsy", "memory"]).optional().describe("brightsy = account storage via login; memory = session demo store"),
|
|
13753
|
+
path: z11.string().optional().describe("Initial folder path (e.g. public)"),
|
|
13754
|
+
pane_id: z11.string().optional().describe("Stable pane id across updates")
|
|
13582
13755
|
},
|
|
13583
13756
|
async (args) => {
|
|
13584
13757
|
const id = args.pane_id?.trim() || `files_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 8)}`;
|
|
@@ -13598,8 +13771,8 @@ async function startMcpServer() {
|
|
|
13598
13771
|
"wait_for_job",
|
|
13599
13772
|
"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.",
|
|
13600
13773
|
{
|
|
13601
|
-
id:
|
|
13602
|
-
timeoutMs:
|
|
13774
|
+
id: z11.string().describe("Detached job id (same kebab-case id passed to detached-job.cjs start)"),
|
|
13775
|
+
timeoutMs: z11.number().optional()
|
|
13603
13776
|
},
|
|
13604
13777
|
async ({ id, timeoutMs }) => {
|
|
13605
13778
|
const result = await waitForDetachedJob(process.cwd(), id, {
|
|
@@ -13612,8 +13785,8 @@ async function startMcpServer() {
|
|
|
13612
13785
|
"stop_job",
|
|
13613
13786
|
"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.",
|
|
13614
13787
|
{
|
|
13615
|
-
id:
|
|
13616
|
-
reason:
|
|
13788
|
+
id: z11.string().describe("Detached job id (same kebab-case id passed to detached-job.cjs start)"),
|
|
13789
|
+
reason: z11.string().optional().describe("Why you are stopping (hanging, no progress, wrong output, already have the answer)")
|
|
13617
13790
|
},
|
|
13618
13791
|
async ({ id, reason }) => {
|
|
13619
13792
|
const result = await stopDetachedJob(process.cwd(), id, { reason });
|
|
@@ -13625,7 +13798,7 @@ async function startMcpServer() {
|
|
|
13625
13798
|
"list_run_scripts",
|
|
13626
13799
|
"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).",
|
|
13627
13800
|
{
|
|
13628
|
-
ref:
|
|
13801
|
+
ref: z11.string().optional().describe("Thread id. Omit on a worktree turn (uses cwd).")
|
|
13629
13802
|
},
|
|
13630
13803
|
async ({ ref }) => {
|
|
13631
13804
|
try {
|
|
@@ -13655,8 +13828,8 @@ async function startMcpServer() {
|
|
|
13655
13828
|
"run_dev_script",
|
|
13656
13829
|
"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.",
|
|
13657
13830
|
{
|
|
13658
|
-
ref:
|
|
13659
|
-
name:
|
|
13831
|
+
ref: z11.string().optional().describe("Thread id. Omit on a worktree turn (uses cwd)."),
|
|
13832
|
+
name: z11.string().optional().describe("Script name from list_run_scripts (default script if omitted).")
|
|
13660
13833
|
},
|
|
13661
13834
|
async ({ ref, name }) => {
|
|
13662
13835
|
try {
|
|
@@ -13684,8 +13857,8 @@ async function startMcpServer() {
|
|
|
13684
13857
|
"stop_dev_script",
|
|
13685
13858
|
"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).",
|
|
13686
13859
|
{
|
|
13687
|
-
ref:
|
|
13688
|
-
name:
|
|
13860
|
+
ref: z11.string().optional().describe("Thread id. Omit on a worktree turn (uses cwd)."),
|
|
13861
|
+
name: z11.string().optional().describe("Script name to stop; omit to stop all active scripts.")
|
|
13689
13862
|
},
|
|
13690
13863
|
async ({ ref, name }) => {
|
|
13691
13864
|
try {
|
|
@@ -13702,9 +13875,9 @@ async function startMcpServer() {
|
|
|
13702
13875
|
"get_run_log",
|
|
13703
13876
|
"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.",
|
|
13704
13877
|
{
|
|
13705
|
-
ref:
|
|
13706
|
-
name:
|
|
13707
|
-
tail:
|
|
13878
|
+
ref: z11.string().optional().describe("Thread id. Omit on a worktree turn (uses cwd)."),
|
|
13879
|
+
name: z11.string().optional().describe("Script name from list_run_scripts (default script if omitted)."),
|
|
13880
|
+
tail: z11.number().int().min(1).max(MAX_RUN_LOG_CHARS).optional().describe(
|
|
13708
13881
|
`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.`
|
|
13709
13882
|
)
|
|
13710
13883
|
},
|
|
@@ -13737,6 +13910,7 @@ async function startMcpServer() {
|
|
|
13737
13910
|
}
|
|
13738
13911
|
}
|
|
13739
13912
|
);
|
|
13913
|
+
registerComputerUseTool(server, mcpCatalog);
|
|
13740
13914
|
if (worktreeProfile) {
|
|
13741
13915
|
server.tool(
|
|
13742
13916
|
"get_orchestrator",
|
|
@@ -13767,8 +13941,8 @@ async function startMcpServer() {
|
|
|
13767
13941
|
"notify_orchestrator",
|
|
13768
13942
|
"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.",
|
|
13769
13943
|
{
|
|
13770
|
-
message:
|
|
13771
|
-
reason:
|
|
13944
|
+
message: z11.string().min(1).max(1500).describe("Why you are blocked / what the parent should know (short)."),
|
|
13945
|
+
reason: z11.enum(["input-required", "blocked"]).optional().describe(
|
|
13772
13946
|
"input-required = waiting on the user in this chat; blocked = need the coordinator (default)."
|
|
13773
13947
|
)
|
|
13774
13948
|
},
|
|
@@ -13807,11 +13981,11 @@ async function startMcpServer() {
|
|
|
13807
13981
|
"set_workspace_tags",
|
|
13808
13982
|
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.",
|
|
13809
13983
|
{
|
|
13810
|
-
ref:
|
|
13984
|
+
ref: z11.string().optional().describe(
|
|
13811
13985
|
worktreeProfile ? "Omit for this chat. Another chat id only if it is on this same checkout." : "Chat id on the workspace to label."
|
|
13812
13986
|
),
|
|
13813
|
-
tags:
|
|
13814
|
-
mode:
|
|
13987
|
+
tags: z11.union([z11.string(), z11.array(z11.string())]).describe("Labels to set. A string may be comma-separated."),
|
|
13988
|
+
mode: z11.enum(["replace", "add", "remove"]).optional()
|
|
13815
13989
|
},
|
|
13816
13990
|
async ({ ref, tags, mode }) => {
|
|
13817
13991
|
try {
|
|
@@ -13839,10 +14013,10 @@ async function startMcpServer() {
|
|
|
13839
14013
|
"set_wake_on_github_edges",
|
|
13840
14014
|
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.",
|
|
13841
14015
|
{
|
|
13842
|
-
ref:
|
|
14016
|
+
ref: z11.string().optional().describe(
|
|
13843
14017
|
worktreeProfile ? "Omit for this chat. Another chat id only if it is on this same checkout." : "Chat id on the workspace."
|
|
13844
14018
|
),
|
|
13845
|
-
enabled:
|
|
14019
|
+
enabled: z11.boolean().describe("True opts the checkout in. False turns it off.")
|
|
13846
14020
|
},
|
|
13847
14021
|
async ({ ref, enabled }) => {
|
|
13848
14022
|
try {
|
|
@@ -13868,14 +14042,14 @@ async function startMcpServer() {
|
|
|
13868
14042
|
if (!worktreeProfile) {
|
|
13869
14043
|
registerConnectedIssueVendorTools(server);
|
|
13870
14044
|
const { getCaffeinateHold: getCaffeinateHold2, setCaffeinateHold: setCaffeinateHold2 } = await import("./caffeinate-hold-ZNUEZGHB.js");
|
|
13871
|
-
const { resolveNewThreadOptions: resolveNewThreadOptions2, resolveThreadDefaults: resolveThreadDefaults2 } = await import("./app-settings-
|
|
14045
|
+
const { resolveNewThreadOptions: resolveNewThreadOptions2, resolveThreadDefaults: resolveThreadDefaults2 } = await import("./app-settings-GM4MJD2E.js");
|
|
13872
14046
|
const accountDefaults = resolveThreadDefaults2();
|
|
13873
14047
|
const accountDefaultsHint = `Account defaults: agent=${accountDefaults.agent}, model=${accountDefaults.model?.trim() || "Auto"}, effort=${accountDefaults.effort}`;
|
|
13874
14048
|
server.tool(
|
|
13875
14049
|
"set_caffeinate",
|
|
13876
14050
|
"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.",
|
|
13877
14051
|
{
|
|
13878
|
-
enabled:
|
|
14052
|
+
enabled: z11.boolean().describe("true = hold caffeinate on; false = release and let the Mac sleep")
|
|
13879
14053
|
},
|
|
13880
14054
|
async ({ enabled }) => {
|
|
13881
14055
|
const threadId = process.env.SIDEBOARD_ORCHESTRATOR_THREAD_ID?.trim() || null;
|
|
@@ -13901,25 +14075,25 @@ async function startMcpServer() {
|
|
|
13901
14075
|
"create_workspace",
|
|
13902
14076
|
`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.`,
|
|
13903
14077
|
{
|
|
13904
|
-
sourceType:
|
|
13905
|
-
sourceRef:
|
|
13906
|
-
agent:
|
|
14078
|
+
sourceType: z11.enum(["branch", "pr", "ticket"]),
|
|
14079
|
+
sourceRef: z11.string(),
|
|
14080
|
+
agent: z11.enum(["claude", "codex", "opencode", "brightsy", "cursor", "acp"]).optional().describe(
|
|
13907
14081
|
`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.`
|
|
13908
14082
|
),
|
|
13909
|
-
acpHarness:
|
|
13910
|
-
model:
|
|
14083
|
+
acpHarness: z11.enum(["gemini", "copilot"]).optional().describe("When agent is acp: gemini (Gemini CLI) or copilot (GitHub Copilot CLI)."),
|
|
14084
|
+
model: z11.string().nullable().optional().describe(
|
|
13911
14085
|
`Usually omit to use Account default model (${accountDefaults.model?.trim() || "Auto"}). Pass null only to force Auto / agent-default.`
|
|
13912
14086
|
),
|
|
13913
|
-
repoPath:
|
|
13914
|
-
title:
|
|
13915
|
-
cowboy:
|
|
14087
|
+
repoPath: z11.string(),
|
|
14088
|
+
title: z11.string().optional(),
|
|
14089
|
+
cowboy: z11.boolean().optional().describe(
|
|
13916
14090
|
"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."
|
|
13917
14091
|
),
|
|
13918
|
-
parentChatId:
|
|
14092
|
+
parentChatId: z11.string().optional().describe(
|
|
13919
14093
|
"Orchestration: omit (preferred) or pass YOUR chat id from the turn reminder / AGENTS.md. Do not invent uuids."
|
|
13920
14094
|
),
|
|
13921
|
-
parentThreadId:
|
|
13922
|
-
tags:
|
|
14095
|
+
parentThreadId: z11.string().optional().describe("Legacy alias for parentChatId."),
|
|
14096
|
+
tags: z11.union([z11.string(), z11.array(z11.string())]).optional().describe(
|
|
13923
14097
|
"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."
|
|
13924
14098
|
)
|
|
13925
14099
|
},
|
|
@@ -13935,11 +14109,11 @@ async function startMcpServer() {
|
|
|
13935
14109
|
"start_board_card",
|
|
13936
14110
|
"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.",
|
|
13937
14111
|
{
|
|
13938
|
-
kind:
|
|
13939
|
-
ref:
|
|
13940
|
-
repoPath:
|
|
13941
|
-
title:
|
|
13942
|
-
tags:
|
|
14112
|
+
kind: z11.enum(["ticket", "pr", "branch"]),
|
|
14113
|
+
ref: z11.string().describe("Ticket identifier (ENG-12), PR number (44), or branch name from list_board"),
|
|
14114
|
+
repoPath: z11.string().describe("Project path from list_projects / list_board"),
|
|
14115
|
+
title: z11.string().optional(),
|
|
14116
|
+
tags: z11.union([z11.string(), z11.array(z11.string())]).optional().describe(
|
|
13943
14117
|
"Short labels for this workspace. Same tags on every checkout for one task. Added when the checkout already exists."
|
|
13944
14118
|
)
|
|
13945
14119
|
},
|
|
@@ -14044,9 +14218,9 @@ async function startMcpServer() {
|
|
|
14044
14218
|
"send_to_chat",
|
|
14045
14219
|
'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.',
|
|
14046
14220
|
{
|
|
14047
|
-
ref:
|
|
14048
|
-
prompt:
|
|
14049
|
-
force_stop:
|
|
14221
|
+
ref: z11.string(),
|
|
14222
|
+
prompt: z11.string(),
|
|
14223
|
+
force_stop: z11.boolean().optional()
|
|
14050
14224
|
},
|
|
14051
14225
|
async ({ ref, prompt, force_stop }) => {
|
|
14052
14226
|
if (force_stop) {
|
|
@@ -14071,8 +14245,8 @@ async function startMcpServer() {
|
|
|
14071
14245
|
"wait_for_turn",
|
|
14072
14246
|
"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).",
|
|
14073
14247
|
{
|
|
14074
|
-
ref:
|
|
14075
|
-
timeoutMs:
|
|
14248
|
+
ref: z11.string(),
|
|
14249
|
+
timeoutMs: z11.number().optional()
|
|
14076
14250
|
},
|
|
14077
14251
|
async ({ ref, timeoutMs }) => {
|
|
14078
14252
|
const thread = await orch.waitForTurn(ref, mcpWaitForTurnTimeoutMs(timeoutMs), {
|
|
@@ -14100,7 +14274,7 @@ async function startMcpServer() {
|
|
|
14100
14274
|
server.tool(
|
|
14101
14275
|
"get_turn_result",
|
|
14102
14276
|
"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).",
|
|
14103
|
-
{ ref:
|
|
14277
|
+
{ ref: z11.string() },
|
|
14104
14278
|
async ({ ref }) => {
|
|
14105
14279
|
const result = orch.getTurnResult(ref);
|
|
14106
14280
|
const failureClass = result.taskState === "failed" && result.status !== "broken" ? classifyTurnFailure(result.lastError || result.text) : null;
|
|
@@ -14118,9 +14292,9 @@ async function startMcpServer() {
|
|
|
14118
14292
|
"stop_chat",
|
|
14119
14293
|
"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.",
|
|
14120
14294
|
{
|
|
14121
|
-
ref:
|
|
14122
|
-
force:
|
|
14123
|
-
reason:
|
|
14295
|
+
ref: z11.string(),
|
|
14296
|
+
force: z11.boolean().optional(),
|
|
14297
|
+
reason: z11.string().optional().describe("Why this chat is stopping. Stored on the thread for the next session.")
|
|
14124
14298
|
},
|
|
14125
14299
|
async ({ ref, force, reason }) => {
|
|
14126
14300
|
const t = orch.getThread(ref);
|
|
@@ -14146,8 +14320,8 @@ async function startMcpServer() {
|
|
|
14146
14320
|
"get_diff",
|
|
14147
14321
|
"Compact diff summary (capped hunks, paginated)",
|
|
14148
14322
|
{
|
|
14149
|
-
ref:
|
|
14150
|
-
maxFiles:
|
|
14323
|
+
ref: z11.string(),
|
|
14324
|
+
maxFiles: z11.number().optional()
|
|
14151
14325
|
},
|
|
14152
14326
|
async ({ ref, maxFiles }) => {
|
|
14153
14327
|
const summary = await orch.diffSummary(ref);
|
|
@@ -14160,7 +14334,7 @@ async function startMcpServer() {
|
|
|
14160
14334
|
server.tool(
|
|
14161
14335
|
"get_pr_checks",
|
|
14162
14336
|
"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.",
|
|
14163
|
-
{ ref:
|
|
14337
|
+
{ ref: z11.string().describe("Worktree thread id/ref") },
|
|
14164
14338
|
async ({ ref }) => {
|
|
14165
14339
|
try {
|
|
14166
14340
|
const checks = await orch.getPrChecks(ref);
|
|
@@ -14174,7 +14348,7 @@ async function startMcpServer() {
|
|
|
14174
14348
|
server.tool(
|
|
14175
14349
|
"request_review",
|
|
14176
14350
|
'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.',
|
|
14177
|
-
{ ref:
|
|
14351
|
+
{ ref: z11.string().describe("Worktree thread id/ref to review") },
|
|
14178
14352
|
async ({ ref }) => {
|
|
14179
14353
|
try {
|
|
14180
14354
|
const tab = await orch.requestReview(ref);
|
|
@@ -14196,8 +14370,8 @@ async function startMcpServer() {
|
|
|
14196
14370
|
"ask_git",
|
|
14197
14371
|
"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.",
|
|
14198
14372
|
{
|
|
14199
|
-
ref:
|
|
14200
|
-
action:
|
|
14373
|
+
ref: z11.string().describe("Worktree thread id/ref"),
|
|
14374
|
+
action: z11.enum(AGENT_GIT_ACTIONS).describe(
|
|
14201
14375
|
"commit-push | create-draft | create-web | resolve-conflicts | ready-for-review | merge"
|
|
14202
14376
|
)
|
|
14203
14377
|
},
|
|
@@ -14226,7 +14400,7 @@ async function startMcpServer() {
|
|
|
14226
14400
|
}
|
|
14227
14401
|
}
|
|
14228
14402
|
);
|
|
14229
|
-
const agentEnum =
|
|
14403
|
+
const agentEnum = z11.enum(["claude", "codex", "opencode", "brightsy", "cursor", "acp"]);
|
|
14230
14404
|
server.tool(
|
|
14231
14405
|
"list_models",
|
|
14232
14406
|
"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.",
|
|
@@ -14247,12 +14421,12 @@ async function startMcpServer() {
|
|
|
14247
14421
|
"fork_workspace",
|
|
14248
14422
|
"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.",
|
|
14249
14423
|
{
|
|
14250
|
-
ref:
|
|
14251
|
-
through_index:
|
|
14424
|
+
ref: z11.string().describe("Worktree thread id/ref to fork"),
|
|
14425
|
+
through_index: z11.number().optional().describe("Inclusive message index to include in the transcript (default: all)"),
|
|
14252
14426
|
agent: agentEnum.optional().describe("Agent for the forked chat (default: same as source)"),
|
|
14253
|
-
acpHarness:
|
|
14254
|
-
model:
|
|
14255
|
-
title:
|
|
14427
|
+
acpHarness: z11.enum(["gemini", "copilot"]).optional().describe("When agent is acp: gemini or copilot."),
|
|
14428
|
+
model: z11.string().nullable().optional().describe("Usually omit (Auto). Only set from list_models when you need a specific model"),
|
|
14429
|
+
title: z11.string().optional()
|
|
14256
14430
|
},
|
|
14257
14431
|
async ({ ref, through_index, agent, model, title, acpHarness }) => {
|
|
14258
14432
|
try {
|
|
@@ -14287,12 +14461,12 @@ async function startMcpServer() {
|
|
|
14287
14461
|
"fork_chat",
|
|
14288
14462
|
"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.",
|
|
14289
14463
|
{
|
|
14290
|
-
ref:
|
|
14291
|
-
through_index:
|
|
14464
|
+
ref: z11.string().describe("Thread id/ref to fork (worktree agent or orchestration chat)"),
|
|
14465
|
+
through_index: z11.number().optional().describe("Inclusive message index to include in the transcript (default: all)"),
|
|
14292
14466
|
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."),
|
|
14293
|
-
acpHarness:
|
|
14294
|
-
model:
|
|
14295
|
-
title:
|
|
14467
|
+
acpHarness: z11.enum(["gemini", "copilot"]).optional().describe("When agent is acp: gemini or copilot."),
|
|
14468
|
+
model: z11.string().nullable().optional().describe("Usually omit (Auto). Only set from list_models when you need a specific model"),
|
|
14469
|
+
title: z11.string().optional()
|
|
14296
14470
|
},
|
|
14297
14471
|
async ({ ref, through_index, agent, model, title, acpHarness }) => {
|
|
14298
14472
|
try {
|
|
@@ -14331,7 +14505,7 @@ async function startMcpServer() {
|
|
|
14331
14505
|
server.tool(
|
|
14332
14506
|
"run_setup",
|
|
14333
14507
|
"Re-run workspace setup (Sideboard/Conductor settings, .cursor/worktrees.json, or script/setup). New worktrees already run this automatically.",
|
|
14334
|
-
{ ref:
|
|
14508
|
+
{ ref: z11.string() },
|
|
14335
14509
|
async ({ ref }) => {
|
|
14336
14510
|
const result = await orch.runSetup(ref);
|
|
14337
14511
|
return mcpJson(result);
|
|
@@ -14340,7 +14514,7 @@ async function startMcpServer() {
|
|
|
14340
14514
|
server.tool(
|
|
14341
14515
|
"add_project",
|
|
14342
14516
|
"Register a git repo as a Sideboard workspace",
|
|
14343
|
-
{ repoPath:
|
|
14517
|
+
{ repoPath: z11.string() },
|
|
14344
14518
|
async ({ repoPath }) => {
|
|
14345
14519
|
const ws = await orch.addWorkspace(repoPath);
|
|
14346
14520
|
return mcpJson(ws);
|
|
@@ -14349,7 +14523,7 @@ async function startMcpServer() {
|
|
|
14349
14523
|
server.tool(
|
|
14350
14524
|
"remove_project",
|
|
14351
14525
|
"Unregister a Sideboard workspace and archive its chats",
|
|
14352
|
-
{ repoPath:
|
|
14526
|
+
{ repoPath: z11.string() },
|
|
14353
14527
|
async ({ repoPath }) => {
|
|
14354
14528
|
await orch.removeWorkspace(repoPath);
|
|
14355
14529
|
return { content: [{ type: "text", text: "ok" }] };
|
|
@@ -14359,12 +14533,12 @@ async function startMcpServer() {
|
|
|
14359
14533
|
"fanout",
|
|
14360
14534
|
"Best-of-n: create one thread per agent with the same prompt (parallel attempts)",
|
|
14361
14535
|
{
|
|
14362
|
-
prompt:
|
|
14363
|
-
agents:
|
|
14364
|
-
repoPath:
|
|
14365
|
-
sourceType:
|
|
14366
|
-
sourceRef:
|
|
14367
|
-
title:
|
|
14536
|
+
prompt: z11.string(),
|
|
14537
|
+
agents: z11.array(z11.enum(["claude", "codex", "opencode", "brightsy", "cursor", "acp"])),
|
|
14538
|
+
repoPath: z11.string(),
|
|
14539
|
+
sourceType: z11.enum(["branch", "pr", "ticket"]).optional(),
|
|
14540
|
+
sourceRef: z11.string().optional(),
|
|
14541
|
+
title: z11.string().optional()
|
|
14368
14542
|
},
|
|
14369
14543
|
async (args) => {
|
|
14370
14544
|
const threads = await orch.bestOfN(args);
|
|
@@ -14382,8 +14556,8 @@ async function startMcpServer() {
|
|
|
14382
14556
|
"list_branches",
|
|
14383
14557
|
"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).",
|
|
14384
14558
|
{
|
|
14385
|
-
repoPath:
|
|
14386
|
-
unmergedOnly:
|
|
14559
|
+
repoPath: z11.string(),
|
|
14560
|
+
unmergedOnly: z11.boolean().optional()
|
|
14387
14561
|
},
|
|
14388
14562
|
async ({ repoPath, unmergedOnly }) => {
|
|
14389
14563
|
const root = await resolveRepoRoot(repoPath);
|
|
@@ -14404,19 +14578,19 @@ async function startMcpServer() {
|
|
|
14404
14578
|
"list_prs",
|
|
14405
14579
|
`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.`,
|
|
14406
14580
|
{
|
|
14407
|
-
repoPath:
|
|
14408
|
-
query:
|
|
14409
|
-
queue:
|
|
14581
|
+
repoPath: z11.string(),
|
|
14582
|
+
query: z11.string().optional().describe("GitHub search tokens (title, draft:true, \u2026)"),
|
|
14583
|
+
queue: z11.enum(["review", "mine", "approved", "changes"]).optional().describe(
|
|
14410
14584
|
"review = unclaimed ready-for-review inbox (Settings \u2192 Projects label, default eng-review). mine = review-requested:@me. approved / changes = eng-approved / eng-requested-changes."
|
|
14411
14585
|
),
|
|
14412
|
-
state:
|
|
14413
|
-
label:
|
|
14586
|
+
state: z11.enum(["open", "closed", "merged", "all", "review"]).optional().describe("GitHub PR state (default open). review is an alias for queue=review."),
|
|
14587
|
+
label: z11.string().optional().describe(
|
|
14414
14588
|
"GitHub label / workflow tag. Comma-separated AND. Examples: eng-review, eng-approved, eng-requested-changes"
|
|
14415
14589
|
),
|
|
14416
|
-
reviewer:
|
|
14590
|
+
reviewer: z11.string().optional().describe(
|
|
14417
14591
|
"me (review requested of you), unassigned (no individual reviewer; team queues like engineering-team still count), all, or a GitHub login"
|
|
14418
14592
|
),
|
|
14419
|
-
limit:
|
|
14593
|
+
limit: z11.number().int().positive().max(250).optional().describe("Page size (default 40, max 250). Raise when truncated is true.")
|
|
14420
14594
|
},
|
|
14421
14595
|
async ({ repoPath, query, queue, state, label, reviewer, limit }) => {
|
|
14422
14596
|
const root = await resolveRepoRoot(repoPath);
|
|
@@ -14449,7 +14623,7 @@ async function startMcpServer() {
|
|
|
14449
14623
|
server.tool(
|
|
14450
14624
|
"get_pr_stack",
|
|
14451
14625
|
"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).",
|
|
14452
|
-
{ ref:
|
|
14626
|
+
{ ref: z11.string() },
|
|
14453
14627
|
async ({ ref }) => {
|
|
14454
14628
|
const stack = await orch.getPrStack(ref);
|
|
14455
14629
|
return mcpJson(stack);
|
|
@@ -14459,8 +14633,8 @@ async function startMcpServer() {
|
|
|
14459
14633
|
"open_pr_stack_layers",
|
|
14460
14634
|
"Materialize one worktree+thread per stack layer (or a single 1-based layer). Pass a thread ref already on the stack.",
|
|
14461
14635
|
{
|
|
14462
|
-
ref:
|
|
14463
|
-
layer:
|
|
14636
|
+
ref: z11.string(),
|
|
14637
|
+
layer: z11.number().int().positive().optional()
|
|
14464
14638
|
},
|
|
14465
14639
|
async ({ ref, layer }) => {
|
|
14466
14640
|
const result = await orch.openPrStackLayers(ref, { layer });
|
|
@@ -14483,9 +14657,9 @@ async function startMcpServer() {
|
|
|
14483
14657
|
"add_stack_layer",
|
|
14484
14658
|
"Add a branch on top of the current stack (`gh stack add`) and open a worktree+thread for it.",
|
|
14485
14659
|
{
|
|
14486
|
-
ref:
|
|
14487
|
-
branchName:
|
|
14488
|
-
title:
|
|
14660
|
+
ref: z11.string(),
|
|
14661
|
+
branchName: z11.string(),
|
|
14662
|
+
title: z11.string().optional()
|
|
14489
14663
|
},
|
|
14490
14664
|
async ({ ref, branchName, title }) => {
|
|
14491
14665
|
const result = await orch.addStackLayer(ref, branchName, { title });
|
|
@@ -14503,11 +14677,11 @@ async function startMcpServer() {
|
|
|
14503
14677
|
"create_pr_stack",
|
|
14504
14678
|
"Create a new GitHub PR stack with one Sideboard worktree per layer (bottom\u2192top branch names). Requires `gh extension install github/gh-stack`.",
|
|
14505
14679
|
{
|
|
14506
|
-
repoPath:
|
|
14507
|
-
branches:
|
|
14508
|
-
agent:
|
|
14509
|
-
base:
|
|
14510
|
-
title:
|
|
14680
|
+
repoPath: z11.string(),
|
|
14681
|
+
branches: z11.array(z11.string()).min(1),
|
|
14682
|
+
agent: z11.enum(["claude", "codex", "opencode", "brightsy", "cursor", "acp"]),
|
|
14683
|
+
base: z11.string().optional(),
|
|
14684
|
+
title: z11.string().optional()
|
|
14511
14685
|
},
|
|
14512
14686
|
async (args) => {
|
|
14513
14687
|
const result = await orch.createPrStack({
|
|
@@ -14535,10 +14709,10 @@ async function startMcpServer() {
|
|
|
14535
14709
|
"list_issues",
|
|
14536
14710
|
"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.",
|
|
14537
14711
|
{
|
|
14538
|
-
repoPath:
|
|
14539
|
-
query:
|
|
14540
|
-
assignee:
|
|
14541
|
-
limit:
|
|
14712
|
+
repoPath: z11.string(),
|
|
14713
|
+
query: z11.string().optional().describe("Search title, identifier, or description"),
|
|
14714
|
+
assignee: z11.string().optional().describe("me (Linear default), unassigned, all, a user id, or a GitHub login"),
|
|
14715
|
+
limit: z11.number().int().positive().max(250).optional().describe("Page size (default 40, max 250). Raise when truncated is true."),
|
|
14542
14716
|
updatedSince: mcpIssueUpdatedSinceSchema
|
|
14543
14717
|
},
|
|
14544
14718
|
async ({ repoPath, query, assignee, limit, updatedSince }) => {
|
|
@@ -16555,7 +16729,7 @@ async function continueSourceThread(threadId, prompt) {
|
|
|
16555
16729
|
await continueOnReply(threadId, prompt);
|
|
16556
16730
|
return;
|
|
16557
16731
|
}
|
|
16558
|
-
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-
|
|
16732
|
+
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-EY6GCYQG.js");
|
|
16559
16733
|
await getOrchestrator2().send(threadId, prompt);
|
|
16560
16734
|
} catch {
|
|
16561
16735
|
}
|
|
@@ -17135,6 +17309,7 @@ export {
|
|
|
17135
17309
|
compactPartsForSummaryMessage,
|
|
17136
17310
|
compactSummaryPart,
|
|
17137
17311
|
computeNextRunAt,
|
|
17312
|
+
computerUseEnabled,
|
|
17138
17313
|
conductorBundledBinDir,
|
|
17139
17314
|
conductorDbPath,
|
|
17140
17315
|
confirmClaudeUsageOverLimitEnabled,
|