@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.
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  extractJsonErrorMessage,
3
3
  formatUnknownDetail
4
- } from "./chunk-HO5R3ZRH.js";
4
+ } from "./chunk-5XNT6BCG.js";
5
5
  import {
6
6
  npmGlobalNodeModules,
7
7
  run
@@ -113,31 +113,60 @@ function applySystemCaEnv(env) {
113
113
  const inherited = process.env.NODE_EXTRA_CA_CERTS?.trim();
114
114
  if (inherited) env[NODE_EXTRA_CA_CERTS] = inherited;
115
115
  }
116
- function extraCertsFromBundle() {
116
+ function extraCertsFromBundle(io = {}) {
117
117
  const path = process.env.NODE_EXTRA_CA_CERTS?.trim();
118
118
  if (path) return splitPemCertificates(readExistingFile(path));
119
- const dest = systemCaBundlePath();
120
- return splitPemCertificates(readExistingFile(dest));
119
+ return splitPemCertificates(readExistingFile(systemCaBundlePath(io)));
120
+ }
121
+ function extraSystemCaPems(io = {}) {
122
+ const fromBundle = extraCertsFromBundle(io);
123
+ if (fromBundle.length > 0) return fromBundle;
124
+ return splitPemCertificates(collectSystemCaPem(io));
125
+ }
126
+ function mergeSystemCaIntoTlsOptions(options, extra, roots = tls.rootCertificates) {
127
+ const existing = options?.ca;
128
+ const base = existing == null ? [...roots] : Array.isArray(existing) ? [...existing] : [existing];
129
+ return { ...options, ca: [...base, ...extra] };
130
+ }
131
+ function systemCaTlsOptions(io = {}) {
132
+ const extra = extraSystemCaPems(io);
133
+ if (extra.length === 0) return {};
134
+ return { ca: [...tls.rootCertificates, ...extra] };
135
+ }
136
+ function installCreateSecureContextCaPatch(api, extra) {
137
+ if (api.__sideboardSystemCaPatched) return true;
138
+ if (typeof api.createSecureContext !== "function") return false;
139
+ const orig = api.createSecureContext;
140
+ const roots = api.rootCertificates ?? tls.rootCertificates;
141
+ api.createSecureContext = ((options) => orig(mergeSystemCaIntoTlsOptions(options, extra, roots)));
142
+ api.__sideboardSystemCaPatched = true;
143
+ return true;
121
144
  }
122
145
  function trustSystemCertificates(io = {}) {
123
146
  try {
124
- const api = tls;
125
- if (typeof api.getCACertificates !== "function" || typeof api.setDefaultCACertificates !== "function") {
126
- return false;
147
+ const extra = extraSystemCaPems(io);
148
+ const api = io.tls ?? tls;
149
+ if (typeof api.getCACertificates === "function" && typeof api.setDefaultCACertificates === "function") {
150
+ const current = api.getCACertificates("default");
151
+ const system = api.getCACertificates("system");
152
+ if (system.length === 0 && extra.length === 0) return false;
153
+ api.setDefaultCACertificates([...current, ...system, ...extra]);
154
+ return true;
127
155
  }
128
- const current = api.getCACertificates("default");
129
- const system = api.getCACertificates("system");
130
- let extra = extraCertsFromBundle();
131
- if (system.length === 0 && extra.length === 0) {
132
- extra = splitPemCertificates(collectSystemCaPem(io));
133
- }
134
- if (system.length === 0 && extra.length === 0) return false;
135
- api.setDefaultCACertificates([...current, ...system, ...extra]);
136
- return true;
156
+ if (extra.length === 0) return false;
157
+ return installCreateSecureContextCaPatch(api, extra);
137
158
  } catch {
138
159
  return false;
139
160
  }
140
161
  }
162
+ function bootstrapSystemCa(io = {}) {
163
+ const systemCaBundle = materializeSystemCaBundle(io);
164
+ if (systemCaBundle && !process.env.NODE_EXTRA_CA_CERTS?.trim()) {
165
+ process.env.NODE_EXTRA_CA_CERTS = systemCaBundle;
166
+ }
167
+ applySystemCaEnv(process.env);
168
+ trustSystemCertificates(io);
169
+ }
141
170
 
142
171
  // src/agents/node-launch.ts
143
172
  import { existsSync as existsSync3, readdirSync, realpathSync } from "fs";
@@ -878,7 +907,9 @@ function ensureCursorRipgrepPath(opts) {
878
907
  export {
879
908
  materializeSystemCaBundle,
880
909
  applySystemCaEnv,
910
+ systemCaTlsOptions,
881
911
  trustSystemCertificates,
912
+ bootstrapSystemCa,
882
913
  packagedCursorRuntimeDir,
883
914
  packagedCursorRunnerPath,
884
915
  packagedMcpDir,
@@ -34,8 +34,8 @@ import {
34
34
  tryReservePort,
35
35
  tryReservePorts,
36
36
  worktreeRunPortsPath
37
- } from "./chunk-HRPSFU4Q.js";
38
- import "./chunk-5XQ43YZU.js";
37
+ } from "./chunk-AILQRQ26.js";
38
+ import "./chunk-I5TESHDN.js";
39
39
  import "./chunk-X3FSWWW2.js";
40
40
  import "./chunk-DLGGLV2M.js";
41
41
  import "./chunk-N2WW62LF.js";
@@ -32,14 +32,14 @@ import {
32
32
  tryReservePort,
33
33
  tryReservePorts,
34
34
  worktreeRunPortsPath
35
- } from "./chunk-CTFBZZGZ.js";
36
- import "./chunk-F36QRDM4.js";
35
+ } from "./chunk-VBVSJUM2.js";
36
+ import "./chunk-7Q327QF2.js";
37
37
  import "./chunk-5QX2NYXL.js";
38
38
  import "./chunk-BIPXOHZI.js";
39
39
  import "./chunk-HG25AYBV.js";
40
40
  import "./chunk-2P4XKWV2.js";
41
41
  import "./chunk-F2PVRF3B.js";
42
- import "./chunk-HO5R3ZRH.js";
42
+ import "./chunk-5XNT6BCG.js";
43
43
  import "./chunk-6K64FJDD.js";
44
44
  import "./chunk-LG6RJBIY.js";
45
45
  import "./chunk-QVN2WOKJ.js";
package/dist/index.cjs CHANGED
@@ -5362,6 +5362,12 @@ var init_thread_store = __esm({
5362
5362
  function looksLikeCursorStreamCutOff(text7) {
5363
5363
  return CURSOR_STREAM_CUTOFF.test(text7.trim());
5364
5364
  }
5365
+ function looksLikeCursorStreamIdleAfterTools(text7) {
5366
+ return CURSOR_STREAM_IDLE_AFTER_TOOLS.test(text7.trim());
5367
+ }
5368
+ function looksLikeCursorStreamFailure(text7) {
5369
+ return looksLikeCursorStreamCutOff(text7) || looksLikeCursorStreamIdleAfterTools(text7);
5370
+ }
5365
5371
  function cursorStreamCutOffContinueLimit(detail) {
5366
5372
  if (looksLikeCursorStreamCutOff(detail) || /connection stalled/i.test(detail)) {
5367
5373
  return CURSOR_STREAM_CUTOFF_CONTINUE_LIMIT;
@@ -5373,11 +5379,12 @@ function nextCrashContinueCount(detail, used) {
5373
5379
  if (used >= limit) return null;
5374
5380
  return used + 1;
5375
5381
  }
5376
- var CURSOR_STREAM_CUTOFF, CURSOR_STREAM_CUTOFF_CONTINUE_LIMIT;
5382
+ var CURSOR_STREAM_CUTOFF, CURSOR_STREAM_IDLE_AFTER_TOOLS, CURSOR_STREAM_CUTOFF_CONTINUE_LIMIT;
5377
5383
  var init_cursor_stream_cutoff = __esm({
5378
5384
  "src/agents/cursor-stream-cutoff.ts"() {
5379
5385
  "use strict";
5380
5386
  CURSOR_STREAM_CUTOFF = /nghttp2|premature close|\[unavailable\]\s+error\b|http\/2 stream closed|\bcancel \(0x8\)|error code cancel\b/i;
5387
+ CURSOR_STREAM_IDLE_AFTER_TOOLS = /stopped responding after a tool call/i;
5381
5388
  CURSOR_STREAM_CUTOFF_CONTINUE_LIMIT = 3;
5382
5389
  }
5383
5390
  });
@@ -5581,7 +5588,7 @@ function looksLikeRetryableRunnerCrash(text7) {
5581
5588
  if (looksLikeInvalidAgentSession(text7)) return false;
5582
5589
  if (looksLikeV8Oom(text7)) return false;
5583
5590
  if (looksLikeHugeToolResultDump(text7)) return true;
5584
- if (looksLikeCursorStreamCutOff(text7)) return true;
5591
+ if (looksLikeCursorStreamFailure(text7)) return true;
5585
5592
  if (looksLikeBrightsyEmptyCompletion(text7)) return true;
5586
5593
  const lower = text7.trim().toLowerCase();
5587
5594
  if (/cannot find (?:package|module)|err_module_not_found/.test(lower)) return false;
@@ -5658,7 +5665,7 @@ function humanizeAgentFailDetail(detail) {
5658
5665
  if (/corrupt local agent checkpoint|missing root blob|truncated crash dump/.test(lower)) {
5659
5666
  return `${raw} \u2014 retry the turn (Sideboard will start a fresh Cursor session).`;
5660
5667
  }
5661
- if (/connection stalled/.test(lower) || looksLikeCursorStreamCutOff(raw)) {
5668
+ if (/connection stalled/.test(lower) || looksLikeCursorStreamFailure(raw)) {
5662
5669
  return /retry the turn/i.test(raw) ? raw : `${raw} \u2014 retry the turn (Sideboard will start a fresh Cursor session).`;
5663
5670
  }
5664
5671
  if (looksLikeBrightsyEmptyCompletion(raw)) {
@@ -14359,31 +14366,60 @@ function applySystemCaEnv(env) {
14359
14366
  const inherited = process.env.NODE_EXTRA_CA_CERTS?.trim();
14360
14367
  if (inherited) env[NODE_EXTRA_CA_CERTS] = inherited;
14361
14368
  }
14362
- function extraCertsFromBundle() {
14369
+ function extraCertsFromBundle(io = {}) {
14363
14370
  const path2 = process.env.NODE_EXTRA_CA_CERTS?.trim();
14364
14371
  if (path2) return splitPemCertificates(readExistingFile(path2));
14365
- const dest = systemCaBundlePath();
14366
- return splitPemCertificates(readExistingFile(dest));
14372
+ return splitPemCertificates(readExistingFile(systemCaBundlePath(io)));
14373
+ }
14374
+ function extraSystemCaPems(io = {}) {
14375
+ const fromBundle = extraCertsFromBundle(io);
14376
+ if (fromBundle.length > 0) return fromBundle;
14377
+ return splitPemCertificates(collectSystemCaPem(io));
14378
+ }
14379
+ function mergeSystemCaIntoTlsOptions(options, extra, roots = import_node_tls.default.rootCertificates) {
14380
+ const existing = options?.ca;
14381
+ const base = existing == null ? [...roots] : Array.isArray(existing) ? [...existing] : [existing];
14382
+ return { ...options, ca: [...base, ...extra] };
14383
+ }
14384
+ function systemCaTlsOptions(io = {}) {
14385
+ const extra = extraSystemCaPems(io);
14386
+ if (extra.length === 0) return {};
14387
+ return { ca: [...import_node_tls.default.rootCertificates, ...extra] };
14388
+ }
14389
+ function installCreateSecureContextCaPatch(api, extra) {
14390
+ if (api.__sideboardSystemCaPatched) return true;
14391
+ if (typeof api.createSecureContext !== "function") return false;
14392
+ const orig = api.createSecureContext;
14393
+ const roots = api.rootCertificates ?? import_node_tls.default.rootCertificates;
14394
+ api.createSecureContext = ((options) => orig(mergeSystemCaIntoTlsOptions(options, extra, roots)));
14395
+ api.__sideboardSystemCaPatched = true;
14396
+ return true;
14367
14397
  }
14368
14398
  function trustSystemCertificates(io = {}) {
14369
14399
  try {
14370
- const api = import_node_tls.default;
14371
- if (typeof api.getCACertificates !== "function" || typeof api.setDefaultCACertificates !== "function") {
14372
- return false;
14373
- }
14374
- const current = api.getCACertificates("default");
14375
- const system = api.getCACertificates("system");
14376
- let extra = extraCertsFromBundle();
14377
- if (system.length === 0 && extra.length === 0) {
14378
- extra = splitPemCertificates(collectSystemCaPem(io));
14400
+ const extra = extraSystemCaPems(io);
14401
+ const api = io.tls ?? import_node_tls.default;
14402
+ if (typeof api.getCACertificates === "function" && typeof api.setDefaultCACertificates === "function") {
14403
+ const current = api.getCACertificates("default");
14404
+ const system = api.getCACertificates("system");
14405
+ if (system.length === 0 && extra.length === 0) return false;
14406
+ api.setDefaultCACertificates([...current, ...system, ...extra]);
14407
+ return true;
14379
14408
  }
14380
- if (system.length === 0 && extra.length === 0) return false;
14381
- api.setDefaultCACertificates([...current, ...system, ...extra]);
14382
- return true;
14409
+ if (extra.length === 0) return false;
14410
+ return installCreateSecureContextCaPatch(api, extra);
14383
14411
  } catch {
14384
14412
  return false;
14385
14413
  }
14386
14414
  }
14415
+ function bootstrapSystemCa(io = {}) {
14416
+ const systemCaBundle = materializeSystemCaBundle(io);
14417
+ if (systemCaBundle && !process.env.NODE_EXTRA_CA_CERTS?.trim()) {
14418
+ process.env.NODE_EXTRA_CA_CERTS = systemCaBundle;
14419
+ }
14420
+ applySystemCaEnv(process.env);
14421
+ trustSystemCertificates(io);
14422
+ }
14387
14423
  var import_node_child_process4, import_node_fs31, import_node_path34, import_node_tls, NODE_USE_SYSTEM_CA, NODE_EXTRA_CA_CERTS, BUNDLE_NAME, BUNDLE_MAX_AGE_MS, LINUX_CA_FILES, PEM_CERT_RE;
14388
14424
  var init_system_ca = __esm({
14389
14425
  "src/http/system-ca.ts"() {
@@ -27699,7 +27735,7 @@ function formatWorktreeReminder() {
27699
27735
  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).";
27700
27736
  }
27701
27737
  function formatClaudeSubagentReminder() {
27702
- 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.';
27738
+ 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.';
27703
27739
  }
27704
27740
  function claudeSubagentTurnReminder(thread) {
27705
27741
  if (thread.agent !== "claude" || thread.planMode || isOrchestratorThread(thread)) {
@@ -32093,6 +32129,7 @@ __export(index_exports, {
32093
32129
  autoCleanupOrphansEnabled: () => autoCleanupOrphansEnabled,
32094
32130
  autoRenameBranchEnabled: () => autoRenameBranchEnabled,
32095
32131
  autoRunAfterSetupEnabled: () => autoRunAfterSetupEnabled,
32132
+ bootstrapSystemCa: () => bootstrapSystemCa,
32096
32133
  branchDisplayLabel: () => branchDisplayLabel,
32097
32134
  brightsyAccessTokenNeedsRefresh: () => brightsyAccessTokenNeedsRefresh,
32098
32135
  brightsyAdapter: () => brightsyAdapter,
@@ -33433,6 +33470,7 @@ init_schedule_runner();
33433
33470
  // src/host/serve.ts
33434
33471
  var import_node_child_process7 = require("child_process");
33435
33472
  var import_node_os22 = require("os");
33473
+ init_system_ca();
33436
33474
  init_app_settings();
33437
33475
  init_desktop_host();
33438
33476
  init_schedules();
@@ -33440,6 +33478,7 @@ init_schedule_runner();
33440
33478
 
33441
33479
  // src/remote/client.ts
33442
33480
  var import_ws2 = require("ws");
33481
+ init_system_ca();
33443
33482
 
33444
33483
  // src/slack/public-dns.ts
33445
33484
  var import_node_dns = require("dns");
@@ -34407,10 +34446,9 @@ function parsePhoneMcpUi(value, op, chatId) {
34407
34446
  }
34408
34447
  function phoneMcpToolPayload(parts, tool, callId) {
34409
34448
  if (!parts) return null;
34410
- const matches = parts.filter(
34411
- (part2) => part2.type === "tool" && part2.name === tool && !part2.parentId
34449
+ const part = parts.find(
34450
+ (row2) => row2.type === "tool" && row2.id === callId && row2.name === tool && !row2.parentId
34412
34451
  );
34413
- const part = matches.find((row2) => row2.id === callId) ?? matches[matches.length - 1];
34414
34452
  if (!part) return null;
34415
34453
  return {
34416
34454
  input: part.input ?? {},
@@ -34418,6 +34456,15 @@ function phoneMcpToolPayload(parts, tool, callId) {
34418
34456
  isError: part.status === "error"
34419
34457
  };
34420
34458
  }
34459
+ function phoneMcpToolPayloadFromMessages(messages, tool, callId) {
34460
+ for (let i = messages.length - 1; i >= 0; i--) {
34461
+ const message = messages[i];
34462
+ if (message?.role !== "agent") continue;
34463
+ const payload = phoneMcpToolPayload(message.parts, tool, callId);
34464
+ if (payload) return payload;
34465
+ }
34466
+ return null;
34467
+ }
34421
34468
 
34422
34469
  // src/remote/phone-stream.ts
34423
34470
  init_message_parts();
@@ -34477,8 +34524,8 @@ function listPhoneMessages(thread) {
34477
34524
  const names = (message.attachments ?? []).map((item) => item.name.trim()).filter(Boolean);
34478
34525
  const visible = [phoneVisibleText(message.role, message.text), names.length ? names.join(", ") : ""].filter(Boolean).join("\n");
34479
34526
  const text7 = message.role === "agent" ? phoneArtifactText(visible, message.parts, MESSAGE_LIMIT) : clip(visible, MESSAGE_LIMIT);
34480
- if (!text7) continue;
34481
34527
  const apps = message.role === "agent" ? phoneMcpApps(thread.agent, message.parts) : [];
34528
+ if (!text7 && apps.length === 0) continue;
34482
34529
  out.push({ role: message.role, text: text7, ...apps.length ? { apps } : {} });
34483
34530
  }
34484
34531
  const live = withLiveTail(thread, out);
@@ -35240,8 +35287,7 @@ function dispatchPhoneMcpUi(cmd, opts) {
35240
35287
  );
35241
35288
  return true;
35242
35289
  }
35243
- const agentMessage = [...thread.messages].reverse().find((message) => message.role === "agent");
35244
- const payload = phoneMcpToolPayload(agentMessage?.parts, cmd.tool, cmd.callId);
35290
+ const payload = phoneMcpToolPayloadFromMessages(thread.messages, cmd.tool, cmd.callId);
35245
35291
  void getMcpUiHost().viewForClaudeTool(cmd.tool, projectDirs).then((view) => {
35246
35292
  if (!view || view.html.length > PHONE_HTML_CAP) {
35247
35293
  emitControl(opts, { op: "mcp-ui", chatId, reqId, view: null });
@@ -38349,6 +38395,14 @@ function startPhoneBoardSync(opts) {
38349
38395
  init_protocol();
38350
38396
  var BACKOFF_START_MS = 1e3;
38351
38397
  var BACKOFF_MAX_MS = 3e4;
38398
+ var RELAY_TLS_RE = /UNABLE_TO_GET_ISSUER|unable to get local issuer|SELF_SIGNED_CERT_IN_CHAIN/i;
38399
+ 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.";
38400
+ function formatRemoteHostError(err) {
38401
+ const message = err instanceof Error ? err.message : String(err);
38402
+ if (message === "aborted") return message;
38403
+ if (RELAY_TLS_RE.test(message)) return `${message}${RELAY_TLS_HINT}`;
38404
+ return message;
38405
+ }
38352
38406
  function createRemoteKeepalive(opts) {
38353
38407
  let pongTimer = null;
38354
38408
  const arm = () => {
@@ -38445,7 +38499,7 @@ function runRemoteHost(opts) {
38445
38499
  backoff = BACKOFF_START_MS;
38446
38500
  } catch (err) {
38447
38501
  if (opts.signal?.aborted) return;
38448
- const message = err instanceof Error ? err.message : String(err);
38502
+ const message = formatRemoteHostError(err);
38449
38503
  if (message !== "aborted") log(`remote error: ${message}`);
38450
38504
  }
38451
38505
  opts.onStatus?.({ connected: false, phoneConnected: false });
@@ -38463,7 +38517,10 @@ function runRemoteHost(opts) {
38463
38517
  const gen = ++connectionGen;
38464
38518
  stopBoardSync();
38465
38519
  setPhoneOpenChat(null);
38466
- const ws = new import_ws2.WebSocket(opts.url, { lookup: lookupPreferPublicDns });
38520
+ const ws = new import_ws2.WebSocket(opts.url, {
38521
+ lookup: lookupPreferPublicDns,
38522
+ ...systemCaTlsOptions()
38523
+ });
38467
38524
  socket = ws;
38468
38525
  let settled = false;
38469
38526
  const finish2 = (err) => {
@@ -40867,6 +40924,7 @@ async function startHeadlessHost(opts) {
40867
40924
  const blocked = headlessHostBlockedReason();
40868
40925
  if (blocked) return { ok: false, reason: blocked };
40869
40926
  claimDesktopHost();
40927
+ bootstrapSystemCa();
40870
40928
  armSchedules();
40871
40929
  const ac = new AbortController();
40872
40930
  let stopped = false;
@@ -45451,6 +45509,7 @@ function getSlackReplyTarget(threadId) {
45451
45509
  }
45452
45510
 
45453
45511
  // src/slack/relay-client.ts
45512
+ init_system_ca();
45454
45513
  var import_ws6 = require("ws");
45455
45514
  var CLAIM_FALLBACK_MS = 400;
45456
45515
  var BACKOFF_START_MS3 = 1e3;
@@ -45479,7 +45538,10 @@ async function runSlackRelayClient(opts) {
45479
45538
  const log = opts.onLog ?? (() => void 0);
45480
45539
  const Ws = opts.WebSocketImpl ? resolveWebSocket(opts.WebSocketImpl) : class {
45481
45540
  constructor(url2) {
45482
- return new import_ws6.WebSocket(url2, { lookup: lookupPreferPublicDns });
45541
+ return new import_ws6.WebSocket(url2, {
45542
+ lookup: lookupPreferPublicDns,
45543
+ ...systemCaTlsOptions()
45544
+ });
45483
45545
  }
45484
45546
  };
45485
45547
  const url = opts.url.trim();
@@ -46302,12 +46364,12 @@ function sleep2(ms, signal) {
46302
46364
  signal?.addEventListener("abort", onAbort, { once: true });
46303
46365
  });
46304
46366
  }
46305
- var RELAY_TLS_HINT = " \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.";
46367
+ 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.";
46306
46368
  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.";
46307
46369
  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;
46308
46370
  function relayFetchError(err, url) {
46309
- const formatted = formatFetchError(err, url, { tlsHint: RELAY_TLS_HINT });
46310
- if (formatted.includes(RELAY_TLS_HINT) || !RELAY_NETWORK_RE.test(formatted)) {
46371
+ const formatted = formatFetchError(err, url, { tlsHint: RELAY_TLS_HINT2 });
46372
+ if (formatted.includes(RELAY_TLS_HINT2) || !RELAY_NETWORK_RE.test(formatted)) {
46311
46373
  return new Error(formatted);
46312
46374
  }
46313
46375
  return new Error(`${formatted}${RELAY_NETWORK_HINT}`);
@@ -46953,6 +47015,7 @@ async function pollSlackOutboundWatches(opts) {
46953
47015
  autoCleanupOrphansEnabled,
46954
47016
  autoRenameBranchEnabled,
46955
47017
  autoRunAfterSetupEnabled,
47018
+ bootstrapSystemCa,
46956
47019
  branchDisplayLabel,
46957
47020
  brightsyAccessTokenNeedsRefresh,
46958
47021
  brightsyAdapter,