@sideboard-ai/core 0.1.308 → 0.1.310
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/cursor-runner.cjs +36 -1
- package/dist/agents/cursor-runner.js +17 -5
- package/dist/{agents-PGU5WVSO.js → agents-QIIZYNOM.js} +2 -2
- package/dist/{agents-IWNQOQOU.js → agents-XXXRQJJO.js} +4 -4
- package/dist/{chunk-G2L3CR3A.js → chunk-4YBQBVYL.js} +3 -3
- package/dist/{chunk-HO5R3ZRH.js → chunk-5XNT6BCG.js} +40 -2
- package/dist/{chunk-F36QRDM4.js → chunk-7Q327QF2.js} +1 -1
- package/dist/{chunk-HRPSFU4Q.js → chunk-AILQRQ26.js} +2 -2
- package/dist/{chunk-EZYZGDWU.js → chunk-GQJOLTZU.js} +41 -19
- package/dist/{chunk-5XQ43YZU.js → chunk-I5TESHDN.js} +9 -2
- package/dist/{chunk-GXFOZ5XL.js → chunk-IT6A4FZF.js} +8 -8
- package/dist/{chunk-T6TEANP5.js → chunk-JXOW5JAW.js} +5 -5
- package/dist/{chunk-YJBUYGPN.js → chunk-NCHOTN3C.js} +1 -1
- package/dist/{chunk-CTFBZZGZ.js → chunk-VBVSJUM2.js} +3 -3
- package/dist/{chunk-MMVMQ34G.js → chunk-Y3Y7SZBZ.js} +47 -16
- package/dist/{conductor-E6M3BATZ.js → conductor-AMZ5SKG2.js} +2 -2
- package/dist/{conductor-IPIMGUR4.js → conductor-OFXA5BST.js} +3 -3
- package/dist/index.cjs +94 -31
- package/dist/index.d.cts +34 -14
- package/dist/index.d.ts +34 -14
- package/dist/index.js +47 -22
- package/dist/mcp/run-stdio.cjs +51 -25
- package/dist/mcp/run-stdio.js +6 -13
- package/dist/{orchestrator-JTDQ47H7.js → orchestrator-7374OI7T.js} +4 -4
- package/dist/{orchestrator-SJU5LYAO.js → orchestrator-XFE3U3RP.js} +6 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -201,7 +201,7 @@ import {
|
|
|
201
201
|
worktreeCleanupSettings,
|
|
202
202
|
writeAgentBlock,
|
|
203
203
|
writeWorktreeFile
|
|
204
|
-
} from "./chunk-
|
|
204
|
+
} from "./chunk-IT6A4FZF.js";
|
|
205
205
|
import {
|
|
206
206
|
LEGACY_PLAN_FILE_REL,
|
|
207
207
|
PLAN_FILE_NAME,
|
|
@@ -295,7 +295,7 @@ import {
|
|
|
295
295
|
userMcpNamesToDisable,
|
|
296
296
|
worktreeMcpToolNames,
|
|
297
297
|
writeInjectedMcpConfig
|
|
298
|
-
} from "./chunk-
|
|
298
|
+
} from "./chunk-4YBQBVYL.js";
|
|
299
299
|
import {
|
|
300
300
|
brightsyMcpServerName,
|
|
301
301
|
connectBrightsyTeam,
|
|
@@ -424,7 +424,7 @@ import {
|
|
|
424
424
|
workspaceAgentChatSummaries,
|
|
425
425
|
worktreeRunPortsPath,
|
|
426
426
|
wrapReviewSkillMarkdown
|
|
427
|
-
} from "./chunk-
|
|
427
|
+
} from "./chunk-VBVSJUM2.js";
|
|
428
428
|
import {
|
|
429
429
|
STDERR_EVENT_MAX_CHARS,
|
|
430
430
|
STDOUT_EVENT_MAX_CHARS,
|
|
@@ -466,7 +466,7 @@ import {
|
|
|
466
466
|
visibleToolRowDetail,
|
|
467
467
|
withEventParentId,
|
|
468
468
|
withEventsParentId
|
|
469
|
-
} from "./chunk-
|
|
469
|
+
} from "./chunk-7Q327QF2.js";
|
|
470
470
|
import "./chunk-7H655NEW.js";
|
|
471
471
|
import {
|
|
472
472
|
ABLETIME_OAUTH_CALLBACK_PATH,
|
|
@@ -783,24 +783,26 @@ import {
|
|
|
783
783
|
import {
|
|
784
784
|
clipMcpToolResult,
|
|
785
785
|
cursorToolErrorText
|
|
786
|
-
} from "./chunk-
|
|
786
|
+
} from "./chunk-NCHOTN3C.js";
|
|
787
787
|
import "./chunk-AXQ4ZWHK.js";
|
|
788
788
|
import {
|
|
789
789
|
AGENT_RUNNER_MAX_OLD_SPACE_MB,
|
|
790
790
|
CURSOR_SDK_INSTALL_HINT,
|
|
791
791
|
applyAgentRunnerHeapEnv,
|
|
792
792
|
applySystemCaEnv,
|
|
793
|
+
bootstrapSystemCa,
|
|
793
794
|
cursorSdkMessageToEvents,
|
|
794
795
|
isCursorSdkInstalled,
|
|
795
796
|
materializeSystemCaBundle,
|
|
796
797
|
parseCursorRunnerLine,
|
|
797
798
|
preferredCursorCostCents,
|
|
798
799
|
resolveCursorSdkRoot,
|
|
800
|
+
systemCaTlsOptions,
|
|
799
801
|
trustSystemCertificates,
|
|
800
802
|
turnCostUsdFromCursorUsage,
|
|
801
803
|
withMaxOldSpaceSize
|
|
802
|
-
} from "./chunk-
|
|
803
|
-
import "./chunk-
|
|
804
|
+
} from "./chunk-Y3Y7SZBZ.js";
|
|
805
|
+
import "./chunk-5XNT6BCG.js";
|
|
804
806
|
import {
|
|
805
807
|
ATTACHMENTS_DIR,
|
|
806
808
|
CLI_DIR,
|
|
@@ -2468,10 +2470,9 @@ function parsePhoneMcpUi(value, op, chatId) {
|
|
|
2468
2470
|
}
|
|
2469
2471
|
function phoneMcpToolPayload(parts, tool, callId) {
|
|
2470
2472
|
if (!parts) return null;
|
|
2471
|
-
const
|
|
2472
|
-
(
|
|
2473
|
+
const part = parts.find(
|
|
2474
|
+
(row2) => row2.type === "tool" && row2.id === callId && row2.name === tool && !row2.parentId
|
|
2473
2475
|
);
|
|
2474
|
-
const part = matches.find((row2) => row2.id === callId) ?? matches[matches.length - 1];
|
|
2475
2476
|
if (!part) return null;
|
|
2476
2477
|
return {
|
|
2477
2478
|
input: part.input ?? {},
|
|
@@ -2479,6 +2480,15 @@ function phoneMcpToolPayload(parts, tool, callId) {
|
|
|
2479
2480
|
isError: part.status === "error"
|
|
2480
2481
|
};
|
|
2481
2482
|
}
|
|
2483
|
+
function phoneMcpToolPayloadFromMessages(messages, tool, callId) {
|
|
2484
|
+
for (let i = messages.length - 1; i >= 0; i--) {
|
|
2485
|
+
const message = messages[i];
|
|
2486
|
+
if (message?.role !== "agent") continue;
|
|
2487
|
+
const payload = phoneMcpToolPayload(message.parts, tool, callId);
|
|
2488
|
+
if (payload) return payload;
|
|
2489
|
+
}
|
|
2490
|
+
return null;
|
|
2491
|
+
}
|
|
2482
2492
|
|
|
2483
2493
|
// src/remote/phone-stream.ts
|
|
2484
2494
|
var PHONE_STREAM_FLUSH_MS = 80;
|
|
@@ -2537,8 +2547,8 @@ function listPhoneMessages(thread) {
|
|
|
2537
2547
|
const names = (message.attachments ?? []).map((item) => item.name.trim()).filter(Boolean);
|
|
2538
2548
|
const visible = [phoneVisibleText(message.role, message.text), names.length ? names.join(", ") : ""].filter(Boolean).join("\n");
|
|
2539
2549
|
const text5 = message.role === "agent" ? phoneArtifactText(visible, message.parts, MESSAGE_LIMIT) : clip(visible, MESSAGE_LIMIT);
|
|
2540
|
-
if (!text5) continue;
|
|
2541
2550
|
const apps = message.role === "agent" ? phoneMcpApps(thread.agent, message.parts) : [];
|
|
2551
|
+
if (!text5 && apps.length === 0) continue;
|
|
2542
2552
|
out.push({ role: message.role, text: text5, ...apps.length ? { apps } : {} });
|
|
2543
2553
|
}
|
|
2544
2554
|
const live = withLiveTail(thread, out);
|
|
@@ -3291,8 +3301,7 @@ function dispatchPhoneMcpUi(cmd, opts) {
|
|
|
3291
3301
|
);
|
|
3292
3302
|
return true;
|
|
3293
3303
|
}
|
|
3294
|
-
const
|
|
3295
|
-
const payload = phoneMcpToolPayload(agentMessage?.parts, cmd.tool, cmd.callId);
|
|
3304
|
+
const payload = phoneMcpToolPayloadFromMessages(thread.messages, cmd.tool, cmd.callId);
|
|
3296
3305
|
void getMcpUiHost().viewForClaudeTool(cmd.tool, projectDirs).then((view) => {
|
|
3297
3306
|
if (!view || view.html.length > PHONE_HTML_CAP) {
|
|
3298
3307
|
emitControl(opts, { op: "mcp-ui", chatId, reqId, view: null });
|
|
@@ -6347,6 +6356,14 @@ function startPhoneBoardSync(opts) {
|
|
|
6347
6356
|
// src/remote/client.ts
|
|
6348
6357
|
var BACKOFF_START_MS = 1e3;
|
|
6349
6358
|
var BACKOFF_MAX_MS = 3e4;
|
|
6359
|
+
var RELAY_TLS_RE = /UNABLE_TO_GET_ISSUER|unable to get local issuer|SELF_SIGNED_CERT_IN_CHAIN/i;
|
|
6360
|
+
var RELAY_TLS_HINT = " \u2014 the TLS certificate was rejected. GitHub login can still work (browser Keychain trust); the relay socket uses Node TLS, which needs the corporate CA.";
|
|
6361
|
+
function formatRemoteHostError(err) {
|
|
6362
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
6363
|
+
if (message === "aborted") return message;
|
|
6364
|
+
if (RELAY_TLS_RE.test(message)) return `${message}${RELAY_TLS_HINT}`;
|
|
6365
|
+
return message;
|
|
6366
|
+
}
|
|
6350
6367
|
function createRemoteKeepalive(opts) {
|
|
6351
6368
|
let pongTimer = null;
|
|
6352
6369
|
const arm = () => {
|
|
@@ -6443,7 +6460,7 @@ function runRemoteHost(opts) {
|
|
|
6443
6460
|
backoff = BACKOFF_START_MS;
|
|
6444
6461
|
} catch (err) {
|
|
6445
6462
|
if (opts.signal?.aborted) return;
|
|
6446
|
-
const message =
|
|
6463
|
+
const message = formatRemoteHostError(err);
|
|
6447
6464
|
if (message !== "aborted") log(`remote error: ${message}`);
|
|
6448
6465
|
}
|
|
6449
6466
|
opts.onStatus?.({ connected: false, phoneConnected: false });
|
|
@@ -6461,7 +6478,10 @@ function runRemoteHost(opts) {
|
|
|
6461
6478
|
const gen = ++connectionGen;
|
|
6462
6479
|
stopBoardSync();
|
|
6463
6480
|
setPhoneOpenChat(null);
|
|
6464
|
-
const ws = new WsWebSocket(opts.url, {
|
|
6481
|
+
const ws = new WsWebSocket(opts.url, {
|
|
6482
|
+
lookup: lookupPreferPublicDns,
|
|
6483
|
+
...systemCaTlsOptions()
|
|
6484
|
+
});
|
|
6465
6485
|
socket = ws;
|
|
6466
6486
|
let settled = false;
|
|
6467
6487
|
const finish = (err) => {
|
|
@@ -8857,6 +8877,7 @@ async function startHeadlessHost(opts) {
|
|
|
8857
8877
|
const blocked = headlessHostBlockedReason();
|
|
8858
8878
|
if (blocked) return { ok: false, reason: blocked };
|
|
8859
8879
|
claimDesktopHost();
|
|
8880
|
+
bootstrapSystemCa();
|
|
8860
8881
|
armSchedules();
|
|
8861
8882
|
const ac = new AbortController();
|
|
8862
8883
|
let stopped = false;
|
|
@@ -8884,7 +8905,7 @@ async function startHeadlessHost(opts) {
|
|
|
8884
8905
|
};
|
|
8885
8906
|
const refreshRunning = async () => {
|
|
8886
8907
|
try {
|
|
8887
|
-
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-
|
|
8908
|
+
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-XFE3U3RP.js");
|
|
8888
8909
|
agentsRunning = getOrchestrator2().getRuntime().running;
|
|
8889
8910
|
} catch {
|
|
8890
8911
|
agentsRunning = 0;
|
|
@@ -10816,7 +10837,7 @@ async function handleJobStop(params, _ctx) {
|
|
|
10816
10837
|
return stopDetachedJob(jobCwd(rec), id, reason ? { reason } : void 0);
|
|
10817
10838
|
}
|
|
10818
10839
|
async function defaultTurnWait(ref, timeoutMs) {
|
|
10819
|
-
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-
|
|
10840
|
+
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-XFE3U3RP.js");
|
|
10820
10841
|
const orch = getOrchestrator2();
|
|
10821
10842
|
const thread = await orch.waitForTurn(ref, timeoutMs, {
|
|
10822
10843
|
resolveIfStillRunning: true
|
|
@@ -13202,7 +13223,10 @@ async function runSlackRelayClient(opts) {
|
|
|
13202
13223
|
const log = opts.onLog ?? (() => void 0);
|
|
13203
13224
|
const Ws = opts.WebSocketImpl ? resolveWebSocket(opts.WebSocketImpl) : class {
|
|
13204
13225
|
constructor(url2) {
|
|
13205
|
-
return new WsWebSocket3(url2, {
|
|
13226
|
+
return new WsWebSocket3(url2, {
|
|
13227
|
+
lookup: lookupPreferPublicDns,
|
|
13228
|
+
...systemCaTlsOptions()
|
|
13229
|
+
});
|
|
13206
13230
|
}
|
|
13207
13231
|
};
|
|
13208
13232
|
const url = opts.url.trim();
|
|
@@ -14020,12 +14044,12 @@ function sleep2(ms, signal) {
|
|
|
14020
14044
|
signal?.addEventListener("abort", onAbort, { once: true });
|
|
14021
14045
|
});
|
|
14022
14046
|
}
|
|
14023
|
-
var
|
|
14047
|
+
var RELAY_TLS_HINT2 = " \u2014 the TLS certificate was rejected. A work proxy often does this when Sideboard is not allowlisted, or when the app does not trust the corporate CA.";
|
|
14024
14048
|
var RELAY_NETWORK_HINT = " Sideboard could not reach the relay. On a work computer this is often a VPN, a proxy, or an allowlist that does not include Sideboard.";
|
|
14025
14049
|
var RELAY_NETWORK_RE = /fetch failed|Failed to fetch|ENOTFOUND|ECONNREFUSED|ECONNRESET|ETIMEDOUT|EHOSTUNREACH|ENETUNREACH|EAI_AGAIN|EPERM|UND_ERR_|ERR_CONNECTION|ERR_NETWORK|ERR_PROXY|ERR_TUNNEL|ERR_INTERNET|ERR_BLOCKED|ERR_NAME_NOT_RESOLVED|ERR_ADDRESS_UNREACHABLE|ERR_CERT|CERT_|UNABLE_TO_GET_ISSUER|SELF_SIGNED/i;
|
|
14026
14050
|
function relayFetchError(err, url) {
|
|
14027
|
-
const formatted = formatFetchError(err, url, { tlsHint:
|
|
14028
|
-
if (formatted.includes(
|
|
14051
|
+
const formatted = formatFetchError(err, url, { tlsHint: RELAY_TLS_HINT2 });
|
|
14052
|
+
if (formatted.includes(RELAY_TLS_HINT2) || !RELAY_NETWORK_RE.test(formatted)) {
|
|
14029
14053
|
return new Error(formatted);
|
|
14030
14054
|
}
|
|
14031
14055
|
return new Error(`${formatted}${RELAY_NETWORK_HINT}`);
|
|
@@ -14189,7 +14213,7 @@ async function continueSourceThread(threadId, prompt) {
|
|
|
14189
14213
|
await continueOnReply(threadId, prompt);
|
|
14190
14214
|
return;
|
|
14191
14215
|
}
|
|
14192
|
-
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-
|
|
14216
|
+
const { getOrchestrator: getOrchestrator2 } = await import("./orchestrator-XFE3U3RP.js");
|
|
14193
14217
|
await getOrchestrator2().send(threadId, prompt);
|
|
14194
14218
|
} catch {
|
|
14195
14219
|
}
|
|
@@ -14665,6 +14689,7 @@ export {
|
|
|
14665
14689
|
autoCleanupOrphansEnabled,
|
|
14666
14690
|
autoRenameBranchEnabled,
|
|
14667
14691
|
autoRunAfterSetupEnabled,
|
|
14692
|
+
bootstrapSystemCa,
|
|
14668
14693
|
branchDisplayLabel,
|
|
14669
14694
|
brightsyAccessTokenNeedsRefresh,
|
|
14670
14695
|
brightsyAdapter,
|
package/dist/mcp/run-stdio.cjs
CHANGED
|
@@ -732,31 +732,55 @@ function applySystemCaEnv(env) {
|
|
|
732
732
|
const inherited = process.env.NODE_EXTRA_CA_CERTS?.trim();
|
|
733
733
|
if (inherited) env[NODE_EXTRA_CA_CERTS] = inherited;
|
|
734
734
|
}
|
|
735
|
-
function extraCertsFromBundle() {
|
|
735
|
+
function extraCertsFromBundle(io = {}) {
|
|
736
736
|
const path = process.env.NODE_EXTRA_CA_CERTS?.trim();
|
|
737
737
|
if (path) return splitPemCertificates(readExistingFile(path));
|
|
738
|
-
|
|
739
|
-
|
|
738
|
+
return splitPemCertificates(readExistingFile(systemCaBundlePath(io)));
|
|
739
|
+
}
|
|
740
|
+
function extraSystemCaPems(io = {}) {
|
|
741
|
+
const fromBundle = extraCertsFromBundle(io);
|
|
742
|
+
if (fromBundle.length > 0) return fromBundle;
|
|
743
|
+
return splitPemCertificates(collectSystemCaPem(io));
|
|
744
|
+
}
|
|
745
|
+
function mergeSystemCaIntoTlsOptions(options, extra, roots = import_node_tls.default.rootCertificates) {
|
|
746
|
+
const existing = options?.ca;
|
|
747
|
+
const base = existing == null ? [...roots] : Array.isArray(existing) ? [...existing] : [existing];
|
|
748
|
+
return { ...options, ca: [...base, ...extra] };
|
|
749
|
+
}
|
|
750
|
+
function installCreateSecureContextCaPatch(api, extra) {
|
|
751
|
+
if (api.__sideboardSystemCaPatched) return true;
|
|
752
|
+
if (typeof api.createSecureContext !== "function") return false;
|
|
753
|
+
const orig = api.createSecureContext;
|
|
754
|
+
const roots = api.rootCertificates ?? import_node_tls.default.rootCertificates;
|
|
755
|
+
api.createSecureContext = ((options) => orig(mergeSystemCaIntoTlsOptions(options, extra, roots)));
|
|
756
|
+
api.__sideboardSystemCaPatched = true;
|
|
757
|
+
return true;
|
|
740
758
|
}
|
|
741
759
|
function trustSystemCertificates(io = {}) {
|
|
742
760
|
try {
|
|
743
|
-
const
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
extra = splitPemCertificates(collectSystemCaPem(io));
|
|
761
|
+
const extra = extraSystemCaPems(io);
|
|
762
|
+
const api = io.tls ?? import_node_tls.default;
|
|
763
|
+
if (typeof api.getCACertificates === "function" && typeof api.setDefaultCACertificates === "function") {
|
|
764
|
+
const current = api.getCACertificates("default");
|
|
765
|
+
const system = api.getCACertificates("system");
|
|
766
|
+
if (system.length === 0 && extra.length === 0) return false;
|
|
767
|
+
api.setDefaultCACertificates([...current, ...system, ...extra]);
|
|
768
|
+
return true;
|
|
752
769
|
}
|
|
753
|
-
if (
|
|
754
|
-
api
|
|
755
|
-
return true;
|
|
770
|
+
if (extra.length === 0) return false;
|
|
771
|
+
return installCreateSecureContextCaPatch(api, extra);
|
|
756
772
|
} catch {
|
|
757
773
|
return false;
|
|
758
774
|
}
|
|
759
775
|
}
|
|
776
|
+
function bootstrapSystemCa(io = {}) {
|
|
777
|
+
const systemCaBundle = materializeSystemCaBundle(io);
|
|
778
|
+
if (systemCaBundle && !process.env.NODE_EXTRA_CA_CERTS?.trim()) {
|
|
779
|
+
process.env.NODE_EXTRA_CA_CERTS = systemCaBundle;
|
|
780
|
+
}
|
|
781
|
+
applySystemCaEnv(process.env);
|
|
782
|
+
trustSystemCertificates(io);
|
|
783
|
+
}
|
|
760
784
|
var import_node_child_process, import_node_fs6, import_node_path7, import_node_tls, NODE_USE_SYSTEM_CA, NODE_EXTRA_CA_CERTS, BUNDLE_NAME, BUNDLE_MAX_AGE_MS, LINUX_CA_FILES, PEM_CERT_RE;
|
|
761
785
|
var init_system_ca = __esm({
|
|
762
786
|
"src/http/system-ca.ts"() {
|
|
@@ -784,6 +808,12 @@ var init_system_ca = __esm({
|
|
|
784
808
|
function looksLikeCursorStreamCutOff(text7) {
|
|
785
809
|
return CURSOR_STREAM_CUTOFF.test(text7.trim());
|
|
786
810
|
}
|
|
811
|
+
function looksLikeCursorStreamIdleAfterTools(text7) {
|
|
812
|
+
return CURSOR_STREAM_IDLE_AFTER_TOOLS.test(text7.trim());
|
|
813
|
+
}
|
|
814
|
+
function looksLikeCursorStreamFailure(text7) {
|
|
815
|
+
return looksLikeCursorStreamCutOff(text7) || looksLikeCursorStreamIdleAfterTools(text7);
|
|
816
|
+
}
|
|
787
817
|
function cursorStreamCutOffContinueLimit(detail) {
|
|
788
818
|
if (looksLikeCursorStreamCutOff(detail) || /connection stalled/i.test(detail)) {
|
|
789
819
|
return CURSOR_STREAM_CUTOFF_CONTINUE_LIMIT;
|
|
@@ -795,11 +825,12 @@ function nextCrashContinueCount(detail, used) {
|
|
|
795
825
|
if (used >= limit) return null;
|
|
796
826
|
return used + 1;
|
|
797
827
|
}
|
|
798
|
-
var CURSOR_STREAM_CUTOFF, CURSOR_STREAM_CUTOFF_CONTINUE_LIMIT;
|
|
828
|
+
var CURSOR_STREAM_CUTOFF, CURSOR_STREAM_IDLE_AFTER_TOOLS, CURSOR_STREAM_CUTOFF_CONTINUE_LIMIT;
|
|
799
829
|
var init_cursor_stream_cutoff = __esm({
|
|
800
830
|
"src/agents/cursor-stream-cutoff.ts"() {
|
|
801
831
|
"use strict";
|
|
802
832
|
CURSOR_STREAM_CUTOFF = /nghttp2|premature close|\[unavailable\]\s+error\b|http\/2 stream closed|\bcancel \(0x8\)|error code cancel\b/i;
|
|
833
|
+
CURSOR_STREAM_IDLE_AFTER_TOOLS = /stopped responding after a tool call/i;
|
|
803
834
|
CURSOR_STREAM_CUTOFF_CONTINUE_LIMIT = 3;
|
|
804
835
|
}
|
|
805
836
|
});
|
|
@@ -1003,7 +1034,7 @@ function looksLikeRetryableRunnerCrash(text7) {
|
|
|
1003
1034
|
if (looksLikeInvalidAgentSession(text7)) return false;
|
|
1004
1035
|
if (looksLikeV8Oom(text7)) return false;
|
|
1005
1036
|
if (looksLikeHugeToolResultDump(text7)) return true;
|
|
1006
|
-
if (
|
|
1037
|
+
if (looksLikeCursorStreamFailure(text7)) return true;
|
|
1007
1038
|
if (looksLikeBrightsyEmptyCompletion(text7)) return true;
|
|
1008
1039
|
const lower = text7.trim().toLowerCase();
|
|
1009
1040
|
if (/cannot find (?:package|module)|err_module_not_found/.test(lower)) return false;
|
|
@@ -1080,7 +1111,7 @@ function humanizeAgentFailDetail(detail) {
|
|
|
1080
1111
|
if (/corrupt local agent checkpoint|missing root blob|truncated crash dump/.test(lower)) {
|
|
1081
1112
|
return `${raw} \u2014 retry the turn (Sideboard will start a fresh Cursor session).`;
|
|
1082
1113
|
}
|
|
1083
|
-
if (/connection stalled/.test(lower) ||
|
|
1114
|
+
if (/connection stalled/.test(lower) || looksLikeCursorStreamFailure(raw)) {
|
|
1084
1115
|
return /retry the turn/i.test(raw) ? raw : `${raw} \u2014 retry the turn (Sideboard will start a fresh Cursor session).`;
|
|
1085
1116
|
}
|
|
1086
1117
|
if (looksLikeBrightsyEmptyCompletion(raw)) {
|
|
@@ -24883,7 +24914,7 @@ function formatWorktreeReminder() {
|
|
|
24883
24914
|
return "Sideboard workspace: stay in this cwd for all file and git work. Push and open PRs against origin, never upstream. Do not edit the main repo checkout. If a goal is given (Greptile 5/5, CI green), watch-fix-push until it lands \u2014 do not watch after every push. Schedules: create_schedule (at / every / cron; chatId=self for this chat). set_workspace_tags updates labels on this workspace (omit ref).";
|
|
24884
24915
|
}
|
|
24885
24916
|
function formatClaudeSubagentReminder() {
|
|
24886
|
-
return 'Claude subagents: if Task/Agent workers will edit files, write a short plan in this chat and continue in the same turn. Do not ask the user whether to isolate, and do not set worktree.bgIsolation to none. One writer may edit this workspace. Every other writer is an Agent with isolation "worktree" and a disjoint file list (read-only explore agents may overlap). While those agents run, leave their files alone. Merge each returned branch into this workspace, then remove the temporary worktree. You stay in this cwd. If Claude says another write-capable agent is in this directory, or that writes to the shared checkout are blocked, re-spawn that agent with isolation "worktree" or make the edit yourself.';
|
|
24917
|
+
return 'Claude subagents: if Task/Agent workers will edit files, write a short plan in this chat and continue in the same turn. Do not ask the user whether to isolate, and do not set worktree.bgIsolation to none. One writer may edit this workspace. Every other writer is an Agent with isolation "worktree" and a disjoint file list (read-only explore agents may overlap). While those agents run, leave their files alone. Merge each returned branch into this workspace, then remove the temporary worktree. You stay in this cwd. If Claude says another write-capable agent is in this directory, or that writes to the shared checkout are blocked, re-spawn that agent with isolation "worktree" or make the edit yourself. That note is another worker in this chat, or a worker Claude still has marked running. Do not mention it to the user.';
|
|
24887
24918
|
}
|
|
24888
24919
|
function claudeSubagentTurnReminder(thread) {
|
|
24889
24920
|
if (thread.agent !== "claude" || thread.planMode || isOrchestratorThread(thread)) {
|
|
@@ -34508,12 +34539,7 @@ async function startMcpServer() {
|
|
|
34508
34539
|
|
|
34509
34540
|
// src/mcp/run-stdio.ts
|
|
34510
34541
|
dropNestedElectronEnvFromProcess();
|
|
34511
|
-
|
|
34512
|
-
if (systemCaBundle && !process.env.NODE_EXTRA_CA_CERTS?.trim()) {
|
|
34513
|
-
process.env.NODE_EXTRA_CA_CERTS = systemCaBundle;
|
|
34514
|
-
}
|
|
34515
|
-
applySystemCaEnv(process.env);
|
|
34516
|
-
trustSystemCertificates();
|
|
34542
|
+
bootstrapSystemCa();
|
|
34517
34543
|
startMcpServer().catch((err) => {
|
|
34518
34544
|
console.error(err);
|
|
34519
34545
|
process.exitCode = 1;
|
package/dist/mcp/run-stdio.js
CHANGED
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
updateSchedule,
|
|
57
57
|
workspaceTagTargetRef,
|
|
58
58
|
writeAgentBlock
|
|
59
|
-
} from "../chunk-
|
|
59
|
+
} from "../chunk-JXOW5JAW.js";
|
|
60
60
|
import "../chunk-LX5R5JOR.js";
|
|
61
61
|
import {
|
|
62
62
|
commentAbleTimeTask,
|
|
@@ -91,15 +91,13 @@ import {
|
|
|
91
91
|
import "../chunk-DC3VZXMA.js";
|
|
92
92
|
import {
|
|
93
93
|
SIDEBOARD_THREAD_ID_ENV,
|
|
94
|
-
|
|
94
|
+
bootstrapSystemCa,
|
|
95
95
|
isCursorApiKeyConfigured,
|
|
96
96
|
listModelsForAgent,
|
|
97
|
-
materializeSystemCaBundle,
|
|
98
97
|
shouldRegisterMcpWaitForTurn,
|
|
99
98
|
sideboardMcpProfile,
|
|
100
|
-
trustSystemCertificates,
|
|
101
99
|
worktreeMcpToolNames
|
|
102
|
-
} from "../chunk-
|
|
100
|
+
} from "../chunk-GQJOLTZU.js";
|
|
103
101
|
import "../chunk-EGTCXNQM.js";
|
|
104
102
|
import "../chunk-42JGPPVS.js";
|
|
105
103
|
import "../chunk-PXMLMBMI.js";
|
|
@@ -116,14 +114,14 @@ import {
|
|
|
116
114
|
waitForDetachedJob,
|
|
117
115
|
waitForTurnToolResult,
|
|
118
116
|
workspaceAgentChatSummaries
|
|
119
|
-
} from "../chunk-
|
|
117
|
+
} from "../chunk-AILQRQ26.js";
|
|
120
118
|
import {
|
|
121
119
|
HUGE_TOOL_RESULT_SUMMARY,
|
|
122
120
|
clipToolResultForStore,
|
|
123
121
|
formatUnknownDetail,
|
|
124
122
|
isInternalAgentStatusText,
|
|
125
123
|
looksLikeHugeToolResultDump
|
|
126
|
-
} from "../chunk-
|
|
124
|
+
} from "../chunk-I5TESHDN.js";
|
|
127
125
|
import {
|
|
128
126
|
GLOBAL_WORKSPACE_ID,
|
|
129
127
|
isCloudCoordinatorThread
|
|
@@ -5246,12 +5244,7 @@ async function startMcpServer() {
|
|
|
5246
5244
|
|
|
5247
5245
|
// src/mcp/run-stdio.ts
|
|
5248
5246
|
dropNestedElectronEnvFromProcess();
|
|
5249
|
-
|
|
5250
|
-
if (systemCaBundle && !process.env.NODE_EXTRA_CA_CERTS?.trim()) {
|
|
5251
|
-
process.env.NODE_EXTRA_CA_CERTS = systemCaBundle;
|
|
5252
|
-
}
|
|
5253
|
-
applySystemCaEnv(process.env);
|
|
5254
|
-
trustSystemCertificates();
|
|
5247
|
+
bootstrapSystemCa();
|
|
5255
5248
|
startMcpServer().catch((err) => {
|
|
5256
5249
|
console.error(err);
|
|
5257
5250
|
process.exitCode = 1;
|
|
@@ -11,18 +11,18 @@ import {
|
|
|
11
11
|
resolveSendFollowUp,
|
|
12
12
|
startOrchestration,
|
|
13
13
|
waitForPidExit
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-JXOW5JAW.js";
|
|
15
15
|
import "./chunk-LX5R5JOR.js";
|
|
16
16
|
import "./chunk-62ESCTJ4.js";
|
|
17
17
|
import "./chunk-4GK32AYX.js";
|
|
18
18
|
import "./chunk-DC3VZXMA.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-GQJOLTZU.js";
|
|
20
20
|
import "./chunk-EGTCXNQM.js";
|
|
21
21
|
import "./chunk-42JGPPVS.js";
|
|
22
22
|
import "./chunk-PXMLMBMI.js";
|
|
23
23
|
import "./chunk-2GPQZZLY.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-AILQRQ26.js";
|
|
25
|
+
import "./chunk-I5TESHDN.js";
|
|
26
26
|
import "./chunk-X3FSWWW2.js";
|
|
27
27
|
import "./chunk-DLGGLV2M.js";
|
|
28
28
|
import "./chunk-N2WW62LF.js";
|
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
resolveSendFollowUp,
|
|
10
10
|
startOrchestration,
|
|
11
11
|
waitForPidExit
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-IT6A4FZF.js";
|
|
13
13
|
import "./chunk-PGPSIEMW.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-4YBQBVYL.js";
|
|
15
15
|
import "./chunk-VEVFHO6K.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-VBVSJUM2.js";
|
|
17
|
+
import "./chunk-7Q327QF2.js";
|
|
18
18
|
import "./chunk-7H655NEW.js";
|
|
19
19
|
import "./chunk-WRZRX4Q7.js";
|
|
20
20
|
import "./chunk-U4WACWBC.js";
|
|
@@ -26,8 +26,8 @@ import "./chunk-33KDPEK4.js";
|
|
|
26
26
|
import "./chunk-JAT3JFOS.js";
|
|
27
27
|
import "./chunk-F2PVRF3B.js";
|
|
28
28
|
import "./chunk-AXQ4ZWHK.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-Y3Y7SZBZ.js";
|
|
30
|
+
import "./chunk-5XNT6BCG.js";
|
|
31
31
|
import "./chunk-6K64FJDD.js";
|
|
32
32
|
import "./chunk-LG6RJBIY.js";
|
|
33
33
|
import "./chunk-QVN2WOKJ.js";
|