@sideboard-ai/core 0.1.263 → 0.1.266
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-6AOJI2YZ.js → abletime-4ZSDI4YP.js} +9 -6
- package/dist/{abletime-U75ZGDIX.js → abletime-JNQAHLHH.js} +7 -4
- package/dist/{abletime-oauth-TA2YDCYX.js → abletime-oauth-4RXZH2KU.js} +3 -3
- package/dist/{abletime-oauth-LOAHGG4X.js → abletime-oauth-DCEIINYT.js} +5 -5
- package/dist/{abletime-rest-CTA5WV26.js → abletime-rest-KVBJFVFD.js} +3 -3
- package/dist/{abletime-rest-YZPFM6IY.js → abletime-rest-VN6PZ6P2.js} +5 -5
- package/dist/agents/cursor-runner.cjs +6 -2
- package/dist/agents/cursor-runner.js +13 -7
- package/dist/{agents-3TUMFSMH.js → agents-G3JTULM2.js} +7 -5
- package/dist/{agents-6FWDRVA2.js → agents-XRXJCAWJ.js} +11 -10
- package/dist/{app-settings-RKFFUIFQ.js → app-settings-L5HGYXWJ.js} +1 -3
- package/dist/{app-settings-MVZPM6WW.js → app-settings-RAC4PSSP.js} +3 -5
- package/dist/{caffeinate-hold-UAGLSGMM.js → caffeinate-hold-7JM5H5P3.js} +2 -2
- package/dist/{chunk-F5MFNUAA.js → chunk-27Z4MEQ5.js} +1 -1
- package/dist/{chunk-EK3KVT7I.js → chunk-2XIRV7FS.js} +53 -1254
- package/dist/{chunk-3H7O27X2.js → chunk-3VBS6MES.js} +39 -1017
- package/dist/chunk-4ECDIKAS.js +2273 -0
- package/dist/{chunk-H547WSSZ.js → chunk-4RZRHTSZ.js} +1 -1
- package/dist/{chunk-QN5DL2QO.js → chunk-5DZUWGKV.js} +1 -1
- package/dist/chunk-5N4Q46SG.js +392 -0
- package/dist/{chunk-YKYEHDMX.js → chunk-AGXZAMOF.js} +5 -5
- package/dist/{chunk-RKPBIB2U.js → chunk-DB7MVDYS.js} +33 -7
- package/dist/{chunk-BOMSJUXW.js → chunk-DBFAFI5A.js} +5 -5
- package/dist/chunk-FAGK33E2.js +994 -0
- package/dist/{chunk-A5SAYFJ4.js → chunk-FIBZEFKA.js} +4 -390
- package/dist/{chunk-5PK53SAP.js → chunk-GONPMH36.js} +5 -5
- package/dist/{chunk-L5WGAIL2.js → chunk-GZXKUUJO.js} +35 -9
- package/dist/{chunk-Z2LGMV6C.js → chunk-H5XL4KUS.js} +21 -0
- package/dist/{chunk-T3AYRQJZ.js → chunk-HSRN2CSL.js} +473 -2487
- package/dist/{chunk-TJ673EZT.js → chunk-JANCPF7Z.js} +2 -2
- package/dist/chunk-KZ2CDZBZ.js +828 -0
- package/dist/{chunk-6YY7XPPL.js → chunk-L6CYOON4.js} +5 -5
- package/dist/{chunk-6YOXQVJ7.js → chunk-LAIBYKZS.js} +3 -3
- package/dist/{chunk-4ALDX5IO.js → chunk-NWE3NOWQ.js} +3 -3
- package/dist/{chunk-36FOBJBF.js → chunk-OIENQEGG.js} +63 -38
- package/dist/{chunk-2QUQH2SZ.js → chunk-PAH7KDL2.js} +68 -24
- package/dist/{chunk-XAISOBBG.js → chunk-TQRSVE7D.js} +1 -1
- package/dist/chunk-UKSJO36E.js +1224 -0
- package/dist/{chunk-CEMNIGQH.js → chunk-UN5Q7POQ.js} +1 -1
- package/dist/{chunk-5ZPT5YAV.js → chunk-USBZ7PH4.js} +1 -1
- package/dist/chunk-UXI52MLJ.js +826 -0
- package/dist/chunk-X7RP3TQB.js +2385 -0
- package/dist/{chunk-QX6QUZVD.js → chunk-ZSGSVFWD.js} +424 -2611
- package/dist/conductor-MLM5NGTP.js +104 -0
- package/dist/conductor-NRKTEN5X.js +105 -0
- package/dist/{connected-teams-7CENZDWU.js → connected-teams-JIUOSZ6C.js} +2 -2
- package/dist/{coordinator-prompt-J7DKHOCH.js → coordinator-prompt-4GHKCVRH.js} +7 -7
- package/dist/{coordinator-prompt-HZCQZ6C5.js → coordinator-prompt-BKRQDZFT.js} +3 -3
- package/dist/{cursor-recover-FALSNEZN.js → cursor-recover-MB3T2K5T.js} +2 -2
- package/dist/{global-workspace-TI26K25J.js → global-workspace-EEWJOMED.js} +9 -3
- package/dist/{global-workspace-6LDUZ2NF.js → global-workspace-EWFL4HPW.js} +13 -7
- package/dist/index.cjs +3918 -2592
- package/dist/index.d.cts +350 -68
- package/dist/index.d.ts +350 -68
- package/dist/index.js +4181 -3462
- package/dist/{managed-accounts-4BLTJKAN.js → managed-accounts-46A4KRUE.js} +2 -2
- package/dist/mcp/run-stdio.cjs +1894 -2012
- package/dist/mcp/run-stdio.js +719 -1445
- package/dist/{orchestrator-5YU46YNS.js → orchestrator-6ZQ2CYS4.js} +9 -6
- package/dist/{orchestrator-4JSG7BWC.js → orchestrator-MA3MHYIM.js} +15 -13
- package/dist/{paths-IUR3ABNG.js → paths-HYT5WOOX.js} +1 -1
- package/dist/{thread-store-FJ5CDX2M.js → thread-store-B3ZM4QEZ.js} +3 -3
- package/dist/{workspaces-QJ3XIPUJ.js → workspaces-F33Z4CEY.js} +3 -3
- package/dist/{workspaces-WOQHJFRQ.js → workspaces-SLP24Z3S.js} +7 -7
- package/dist/{worktree-6U2FA5LO.js → worktree-ACW23KJ5.js} +6 -6
- package/dist/{worktree-KQA4ON2G.js → worktree-C7RPVHZ7.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-CEOTK5GZ.js +0 -479
- package/dist/chunk-K7B25HO4.js +0 -477
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
getAbleTimeHost,
|
|
6
6
|
isAbleTimeConnected
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PAH7KDL2.js";
|
|
8
8
|
|
|
9
9
|
// src/integrations/abletime-mcp.ts
|
|
10
10
|
var DEFAULT_ABLETIME_HOST = "https://track.abletime.com";
|
|
@@ -153,7 +153,7 @@ function textsFromUnknown(value) {
|
|
|
153
153
|
return "";
|
|
154
154
|
}
|
|
155
155
|
async function abletimeMcpRequest(method, params, opts) {
|
|
156
|
-
const rawToken = opts?.token ?? await import("./abletime-oauth-
|
|
156
|
+
const rawToken = opts?.token ?? await import("./abletime-oauth-4RXZH2KU.js").then((m) => m.ensureAbleTimeAccessToken());
|
|
157
157
|
if (!rawToken?.trim()) {
|
|
158
158
|
throw new Error("AbleTime is not connected \u2014 paste a personal access token in Account settings");
|
|
159
159
|
}
|
|
@@ -224,9 +224,9 @@ async function callAbleTimeTool(name, args = {}, opts) {
|
|
|
224
224
|
if (!opts?.token && !isAbleTimeConnected()) {
|
|
225
225
|
throw new Error("AbleTime is not connected \u2014 paste a personal access token in Account settings");
|
|
226
226
|
}
|
|
227
|
-
const rawToken = opts?.token ?? await import("./abletime-oauth-
|
|
227
|
+
const rawToken = opts?.token ?? await import("./abletime-oauth-4RXZH2KU.js").then((m) => m.ensureAbleTimeAccessToken());
|
|
228
228
|
if (rawToken && ableTimeUsesRest(rawToken)) {
|
|
229
|
-
const { callAbleTimeRestTool } = await import("./abletime-rest-
|
|
229
|
+
const { callAbleTimeRestTool } = await import("./abletime-rest-KVBJFVFD.js");
|
|
230
230
|
return callAbleTimeRestTool(name, args, { ...opts, token: rawToken });
|
|
231
231
|
}
|
|
232
232
|
const requestOpts = { ...opts, pm: opts?.pm ?? abletimeToolUsesPm(name) };
|
|
@@ -242,7 +242,7 @@ async function callAbleTimeTool(name, args = {}, opts) {
|
|
|
242
242
|
return await call();
|
|
243
243
|
}
|
|
244
244
|
if (rawToken && ableTimeUsesRest(rawToken) && isAbleTimeRejectedCredential(message)) {
|
|
245
|
-
const { callAbleTimeRestTool } = await import("./abletime-rest-
|
|
245
|
+
const { callAbleTimeRestTool } = await import("./abletime-rest-KVBJFVFD.js");
|
|
246
246
|
return callAbleTimeRestTool(name, args, { ...opts, token: rawToken });
|
|
247
247
|
}
|
|
248
248
|
throw err instanceof Error ? new Error(rewriteAbleTimeError(err.message)) : err;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_ABLETIME_HOST,
|
|
3
3
|
normalizeAbleTimeHost
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-L6CYOON4.js";
|
|
5
5
|
import {
|
|
6
6
|
httpFetch
|
|
7
7
|
} from "./chunk-N7WZ6NIN.js";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
getAbleTimeHost,
|
|
11
11
|
loadAppSettings,
|
|
12
12
|
saveAbleTimeConnection
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-PAH7KDL2.js";
|
|
14
14
|
|
|
15
15
|
// src/integrations/abletime-oauth.ts
|
|
16
16
|
import { createHash, randomBytes } from "crypto";
|
|
@@ -280,7 +280,7 @@ async function startAbleTimeOAuth(opts) {
|
|
|
280
280
|
persistAbleTimeTokens(data, { host });
|
|
281
281
|
const token = data.access_token.trim();
|
|
282
282
|
try {
|
|
283
|
-
const { getAbleTimeOrientation } = await import("./abletime-
|
|
283
|
+
const { getAbleTimeOrientation } = await import("./abletime-JNQAHLHH.js");
|
|
284
284
|
const orientation = await getAbleTimeOrientation({ token, host });
|
|
285
285
|
return saveAbleTimeConnection({
|
|
286
286
|
accessToken: token,
|
|
@@ -19,13 +19,13 @@ import {
|
|
|
19
19
|
import {
|
|
20
20
|
getGithubGitAuthMode,
|
|
21
21
|
getGithubPat
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-OIENQEGG.js";
|
|
23
23
|
import {
|
|
24
24
|
listThreads
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-JANCPF7Z.js";
|
|
26
26
|
import {
|
|
27
27
|
worktreesRoot
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-H5XL4KUS.js";
|
|
29
29
|
|
|
30
30
|
// src/git/worktree.ts
|
|
31
31
|
import { randomBytes } from "crypto";
|
|
@@ -17,18 +17,18 @@ import {
|
|
|
17
17
|
withAddedAccount,
|
|
18
18
|
withRemovedAccount,
|
|
19
19
|
withSelectedAccount
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-UN5Q7POQ.js";
|
|
21
21
|
import {
|
|
22
22
|
normalizeThinkingEffort
|
|
23
23
|
} from "./chunk-KGZBYWZ3.js";
|
|
24
24
|
import {
|
|
25
25
|
appDataDir
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-H5XL4KUS.js";
|
|
27
27
|
|
|
28
28
|
// src/store/app-settings.ts
|
|
29
29
|
import { randomUUID } from "crypto";
|
|
30
30
|
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
|
|
31
|
-
import { homedir
|
|
31
|
+
import { homedir } from "os";
|
|
32
32
|
import { isAbsolute, join as join2 } from "path";
|
|
33
33
|
|
|
34
34
|
// src/agents/orchestrator-capable.ts
|
|
@@ -274,14 +274,6 @@ function writeSecureJson(path, value) {
|
|
|
274
274
|
writePrivateFile(path, `${JSON.stringify(body, null, 2)}
|
|
275
275
|
`);
|
|
276
276
|
}
|
|
277
|
-
function isSecureFileEncrypted(path) {
|
|
278
|
-
if (!existsSync(path)) return false;
|
|
279
|
-
try {
|
|
280
|
-
return isEnvelope(JSON.parse(readFileSync(path, "utf8")));
|
|
281
|
-
} catch {
|
|
282
|
-
return false;
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
277
|
|
|
286
278
|
// src/store/secret-vault.ts
|
|
287
279
|
function secretVaultPath() {
|
|
@@ -315,6 +307,9 @@ function normalizeVault(raw) {
|
|
|
315
307
|
if (typeof raw.slackAppToken === "string" && raw.slackAppToken.trim()) {
|
|
316
308
|
out.slackAppToken = raw.slackAppToken.trim();
|
|
317
309
|
}
|
|
310
|
+
if (typeof raw.remoteHostSecret === "string" && raw.remoteHostSecret.trim()) {
|
|
311
|
+
out.remoteHostSecret = raw.remoteHostSecret.trim();
|
|
312
|
+
}
|
|
318
313
|
if (typeof raw.githubPat === "string" && raw.githubPat.trim()) {
|
|
319
314
|
out.githubPat = raw.githubPat.trim();
|
|
320
315
|
}
|
|
@@ -582,6 +577,42 @@ function planHistoryAgePurge(archived, olderThanDays, nowMs = Date.now()) {
|
|
|
582
577
|
return sortArchivedOldestFirst(archived).filter((t) => archivedUpdatedMs(t) < cutoff).map((t) => t.id);
|
|
583
578
|
}
|
|
584
579
|
|
|
580
|
+
// src/store/read-aloud-settings.ts
|
|
581
|
+
var READ_ALOUD_RATE_MIN = 0.5;
|
|
582
|
+
var READ_ALOUD_RATE_MAX = 3;
|
|
583
|
+
var READ_ALOUD_RATE_DEFAULT = 1;
|
|
584
|
+
function clampReadAloudRate(value) {
|
|
585
|
+
if (typeof value !== "number" || !Number.isFinite(value)) return READ_ALOUD_RATE_DEFAULT;
|
|
586
|
+
return Math.min(
|
|
587
|
+
READ_ALOUD_RATE_MAX,
|
|
588
|
+
Math.max(READ_ALOUD_RATE_MIN, Math.round(value * 10) / 10)
|
|
589
|
+
);
|
|
590
|
+
}
|
|
591
|
+
function sanitizeReadAloudVoiceURI(value) {
|
|
592
|
+
if (typeof value !== "string") return void 0;
|
|
593
|
+
const uri = value.trim().slice(0, 400);
|
|
594
|
+
return uri || void 0;
|
|
595
|
+
}
|
|
596
|
+
function copyReadAloudFromUnknown(source, out) {
|
|
597
|
+
if (typeof source.readAloudRate === "number" && Number.isFinite(source.readAloudRate)) {
|
|
598
|
+
out.readAloudRate = clampReadAloudRate(source.readAloudRate);
|
|
599
|
+
}
|
|
600
|
+
const voiceURI = sanitizeReadAloudVoiceURI(source.readAloudVoiceURI);
|
|
601
|
+
if (voiceURI) out.readAloudVoiceURI = voiceURI;
|
|
602
|
+
}
|
|
603
|
+
function patchReadAloudSettings(patch, advanced) {
|
|
604
|
+
if (typeof patch.readAloudRate === "number" && Number.isFinite(patch.readAloudRate)) {
|
|
605
|
+
advanced.readAloudRate = clampReadAloudRate(patch.readAloudRate);
|
|
606
|
+
}
|
|
607
|
+
if (patch.readAloudVoiceURI === null || patch.readAloudVoiceURI === "") {
|
|
608
|
+
delete advanced.readAloudVoiceURI;
|
|
609
|
+
} else if (typeof patch.readAloudVoiceURI === "string") {
|
|
610
|
+
const voiceURI = sanitizeReadAloudVoiceURI(patch.readAloudVoiceURI);
|
|
611
|
+
if (voiceURI) advanced.readAloudVoiceURI = voiceURI;
|
|
612
|
+
else delete advanced.readAloudVoiceURI;
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
|
|
585
616
|
// src/store/usage-on-limit.ts
|
|
586
617
|
var USAGE_ON_LIMIT_VALUES = [
|
|
587
618
|
"keep_going",
|
|
@@ -696,6 +727,7 @@ function toPublicAppSettings(settings) {
|
|
|
696
727
|
delete integrations.linearClientSecret;
|
|
697
728
|
delete integrations.slackClientSecret;
|
|
698
729
|
delete integrations.slackAppToken;
|
|
730
|
+
delete integrations.remoteHostSecret;
|
|
699
731
|
delete integrations.githubPat;
|
|
700
732
|
delete integrations.abletimeAccessToken;
|
|
701
733
|
delete integrations.abletimeRefreshToken;
|
|
@@ -849,6 +881,10 @@ function normalizeIntegrations(raw) {
|
|
|
849
881
|
const label = source.slackDeviceLabel.trim().slice(0, 64);
|
|
850
882
|
if (label) out.slackDeviceLabel = label;
|
|
851
883
|
}
|
|
884
|
+
if (typeof source.remoteHostSecret === "string") {
|
|
885
|
+
const secret = source.remoteHostSecret.trim();
|
|
886
|
+
if (secret) out.remoteHostSecret = secret;
|
|
887
|
+
}
|
|
852
888
|
if (typeof source.githubGitAuthMode === "string" && GIT_AUTH_MODES.has(source.githubGitAuthMode)) {
|
|
853
889
|
out.githubGitAuthMode = source.githubGitAuthMode;
|
|
854
890
|
}
|
|
@@ -1113,6 +1149,7 @@ function normalizeAdvanced(raw) {
|
|
|
1113
1149
|
const name = source.agentDoneCustomSoundName.trim();
|
|
1114
1150
|
if (name) out.agentDoneCustomSoundName = name.slice(0, 200);
|
|
1115
1151
|
}
|
|
1152
|
+
copyReadAloudFromUnknown(source, out);
|
|
1116
1153
|
return out;
|
|
1117
1154
|
}
|
|
1118
1155
|
function normalizeSettings(raw) {
|
|
@@ -1205,7 +1242,7 @@ function readSettingsFile() {
|
|
|
1205
1242
|
}
|
|
1206
1243
|
function diskHoldsSecrets(disk) {
|
|
1207
1244
|
return Boolean(
|
|
1208
|
-
disk.integrations.linearApiKey || disk.integrations.linearAccessToken || disk.integrations.linearRefreshToken || disk.integrations.linearClientSecret || disk.integrations.slackClientSecret || disk.integrations.slackAppToken || disk.integrations.githubPat || disk.integrations.abletimeAccessToken || disk.integrations.abletimeRefreshToken || disk.integrations.vercelToken || disk.integrations.supabaseAccessToken || disk.integrations.posthogPersonalApiKey || disk.integrations.sentryAuthToken || Object.keys(disk.environment).length > 0
|
|
1245
|
+
disk.integrations.linearApiKey || disk.integrations.linearAccessToken || disk.integrations.linearRefreshToken || disk.integrations.linearClientSecret || disk.integrations.slackClientSecret || disk.integrations.slackAppToken || disk.integrations.remoteHostSecret || disk.integrations.githubPat || disk.integrations.abletimeAccessToken || disk.integrations.abletimeRefreshToken || disk.integrations.vercelToken || disk.integrations.supabaseAccessToken || disk.integrations.posthogPersonalApiKey || disk.integrations.sentryAuthToken || Object.keys(disk.environment).length > 0
|
|
1209
1246
|
);
|
|
1210
1247
|
}
|
|
1211
1248
|
function mergeVault(disk) {
|
|
@@ -1230,6 +1267,9 @@ function mergeVault(disk) {
|
|
|
1230
1267
|
if (vault.slackAppToken && !integrations.slackAppToken) {
|
|
1231
1268
|
integrations.slackAppToken = vault.slackAppToken;
|
|
1232
1269
|
}
|
|
1270
|
+
if (vault.remoteHostSecret && !integrations.remoteHostSecret) {
|
|
1271
|
+
integrations.remoteHostSecret = vault.remoteHostSecret;
|
|
1272
|
+
}
|
|
1233
1273
|
if (vault.githubPat && !integrations.githubPat) {
|
|
1234
1274
|
integrations.githubPat = vault.githubPat;
|
|
1235
1275
|
}
|
|
@@ -1261,6 +1301,7 @@ function persistSplit(settings) {
|
|
|
1261
1301
|
const linearClientSecret = integrations.linearClientSecret;
|
|
1262
1302
|
const slackClientSecret = integrations.slackClientSecret;
|
|
1263
1303
|
const slackAppToken = integrations.slackAppToken;
|
|
1304
|
+
const remoteHostSecret = integrations.remoteHostSecret;
|
|
1264
1305
|
const githubPat = integrations.githubPat;
|
|
1265
1306
|
const abletimeAccessToken = integrations.abletimeAccessToken;
|
|
1266
1307
|
const abletimeRefreshToken = integrations.abletimeRefreshToken;
|
|
@@ -1274,6 +1315,7 @@ function persistSplit(settings) {
|
|
|
1274
1315
|
delete integrations.linearClientSecret;
|
|
1275
1316
|
delete integrations.slackClientSecret;
|
|
1276
1317
|
delete integrations.slackAppToken;
|
|
1318
|
+
delete integrations.remoteHostSecret;
|
|
1277
1319
|
delete integrations.githubPat;
|
|
1278
1320
|
delete integrations.abletimeAccessToken;
|
|
1279
1321
|
delete integrations.abletimeRefreshToken;
|
|
@@ -1293,6 +1335,7 @@ function persistSplit(settings) {
|
|
|
1293
1335
|
linearClientSecret,
|
|
1294
1336
|
slackClientSecret,
|
|
1295
1337
|
slackAppToken,
|
|
1338
|
+
remoteHostSecret,
|
|
1296
1339
|
githubPat,
|
|
1297
1340
|
abletimeAccessToken,
|
|
1298
1341
|
abletimeRefreshToken,
|
|
@@ -1505,6 +1548,13 @@ function updateIntegrationsSettings(patch) {
|
|
|
1505
1548
|
integrations.slackDeviceLabel = patch.slackDeviceLabel.trim().slice(0, 64);
|
|
1506
1549
|
}
|
|
1507
1550
|
}
|
|
1551
|
+
if ("remoteHostSecret" in patch) {
|
|
1552
|
+
if (patch.remoteHostSecret == null || patch.remoteHostSecret.trim() === "") {
|
|
1553
|
+
delete integrations.remoteHostSecret;
|
|
1554
|
+
} else {
|
|
1555
|
+
integrations.remoteHostSecret = patch.remoteHostSecret.trim();
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1508
1558
|
if ("githubGitAuthMode" in patch) {
|
|
1509
1559
|
if (patch.githubGitAuthMode == null) {
|
|
1510
1560
|
delete integrations.githubGitAuthMode;
|
|
@@ -1956,27 +2006,6 @@ function brightsyCloudConnectEnabled(settings = loadAppSettings()) {
|
|
|
1956
2006
|
function slackListenEnabled(settings = loadAppSettings()) {
|
|
1957
2007
|
return settings.integrations.slackListenEnabled === true;
|
|
1958
2008
|
}
|
|
1959
|
-
function ensureSlackDeviceIdentity(settings = loadAppSettings()) {
|
|
1960
|
-
let deviceId = settings.integrations.slackDeviceId?.trim() ?? "";
|
|
1961
|
-
let deviceLabel = settings.integrations.slackDeviceLabel?.trim() ?? "";
|
|
1962
|
-
const patch = {};
|
|
1963
|
-
if (!deviceId) {
|
|
1964
|
-
deviceId = randomUUID();
|
|
1965
|
-
patch.slackDeviceId = deviceId;
|
|
1966
|
-
}
|
|
1967
|
-
if (!deviceLabel) {
|
|
1968
|
-
try {
|
|
1969
|
-
deviceLabel = hostname().split(".")[0]?.trim() || "This Mac";
|
|
1970
|
-
} catch {
|
|
1971
|
-
deviceLabel = "This Mac";
|
|
1972
|
-
}
|
|
1973
|
-
patch.slackDeviceLabel = deviceLabel;
|
|
1974
|
-
}
|
|
1975
|
-
if (Object.keys(patch).length > 0) {
|
|
1976
|
-
updateIntegrationsSettings(patch);
|
|
1977
|
-
}
|
|
1978
|
-
return { deviceId, deviceLabel };
|
|
1979
|
-
}
|
|
1980
2009
|
function slackAppLevelToken(settings = loadAppSettings()) {
|
|
1981
2010
|
return process.env.SIDEBOARD_SLACK_APP_TOKEN?.trim() || settings.integrations.slackAppToken?.trim() || "";
|
|
1982
2011
|
}
|
|
@@ -2105,6 +2134,7 @@ function updateAdvancedSettings(patch) {
|
|
|
2105
2134
|
if (name) advanced.agentDoneCustomSoundName = name.slice(0, 200);
|
|
2106
2135
|
else delete advanced.agentDoneCustomSoundName;
|
|
2107
2136
|
}
|
|
2137
|
+
patchReadAloudSettings(patch, advanced);
|
|
2108
2138
|
return saveAppSettings({ ...current, advanced });
|
|
2109
2139
|
}
|
|
2110
2140
|
function autoRenameBranchEnabled(settings = loadAppSettings()) {
|
|
@@ -2286,10 +2316,6 @@ export {
|
|
|
2286
2316
|
formatWorkspaceProfileSuffix,
|
|
2287
2317
|
formatViewerContextDirective,
|
|
2288
2318
|
formatViewerContextReminder,
|
|
2289
|
-
resolveVaultKey,
|
|
2290
|
-
readSecureJson,
|
|
2291
|
-
writeSecureJson,
|
|
2292
|
-
isSecureFileEncrypted,
|
|
2293
2319
|
fromInclusiveInputUsage,
|
|
2294
2320
|
sumUsageList,
|
|
2295
2321
|
applyTurnUsage,
|
|
@@ -2362,7 +2388,6 @@ export {
|
|
|
2362
2388
|
getLinearApiKey,
|
|
2363
2389
|
brightsyCloudConnectEnabled,
|
|
2364
2390
|
slackListenEnabled,
|
|
2365
|
-
ensureSlackDeviceIdentity,
|
|
2366
2391
|
slackAppLevelToken,
|
|
2367
2392
|
brightsyInjectWorktreeMcpEnabled,
|
|
2368
2393
|
brightsyCloudConnectAgent,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
// src/store/app-settings.ts
|
|
27
27
|
import { randomUUID } from "crypto";
|
|
28
28
|
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
|
|
29
|
-
import { homedir
|
|
29
|
+
import { homedir } from "os";
|
|
30
30
|
import { isAbsolute, join as join2 } from "path";
|
|
31
31
|
|
|
32
32
|
// src/agents/orchestrator-capable.ts
|
|
@@ -330,6 +330,9 @@ function normalizeVault(raw) {
|
|
|
330
330
|
if (typeof raw.slackAppToken === "string" && raw.slackAppToken.trim()) {
|
|
331
331
|
out.slackAppToken = raw.slackAppToken.trim();
|
|
332
332
|
}
|
|
333
|
+
if (typeof raw.remoteHostSecret === "string" && raw.remoteHostSecret.trim()) {
|
|
334
|
+
out.remoteHostSecret = raw.remoteHostSecret.trim();
|
|
335
|
+
}
|
|
333
336
|
if (typeof raw.githubPat === "string" && raw.githubPat.trim()) {
|
|
334
337
|
out.githubPat = raw.githubPat.trim();
|
|
335
338
|
}
|
|
@@ -600,6 +603,42 @@ function planHistoryAgePurge(archived, olderThanDays, nowMs = Date.now()) {
|
|
|
600
603
|
return sortArchivedOldestFirst(archived).filter((t) => archivedUpdatedMs(t) < cutoff).map((t) => t.id);
|
|
601
604
|
}
|
|
602
605
|
|
|
606
|
+
// src/store/read-aloud-settings.ts
|
|
607
|
+
var READ_ALOUD_RATE_MIN = 0.5;
|
|
608
|
+
var READ_ALOUD_RATE_MAX = 3;
|
|
609
|
+
var READ_ALOUD_RATE_DEFAULT = 1;
|
|
610
|
+
function clampReadAloudRate(value) {
|
|
611
|
+
if (typeof value !== "number" || !Number.isFinite(value)) return READ_ALOUD_RATE_DEFAULT;
|
|
612
|
+
return Math.min(
|
|
613
|
+
READ_ALOUD_RATE_MAX,
|
|
614
|
+
Math.max(READ_ALOUD_RATE_MIN, Math.round(value * 10) / 10)
|
|
615
|
+
);
|
|
616
|
+
}
|
|
617
|
+
function sanitizeReadAloudVoiceURI(value) {
|
|
618
|
+
if (typeof value !== "string") return void 0;
|
|
619
|
+
const uri = value.trim().slice(0, 400);
|
|
620
|
+
return uri || void 0;
|
|
621
|
+
}
|
|
622
|
+
function copyReadAloudFromUnknown(source, out) {
|
|
623
|
+
if (typeof source.readAloudRate === "number" && Number.isFinite(source.readAloudRate)) {
|
|
624
|
+
out.readAloudRate = clampReadAloudRate(source.readAloudRate);
|
|
625
|
+
}
|
|
626
|
+
const voiceURI = sanitizeReadAloudVoiceURI(source.readAloudVoiceURI);
|
|
627
|
+
if (voiceURI) out.readAloudVoiceURI = voiceURI;
|
|
628
|
+
}
|
|
629
|
+
function patchReadAloudSettings(patch, advanced) {
|
|
630
|
+
if (typeof patch.readAloudRate === "number" && Number.isFinite(patch.readAloudRate)) {
|
|
631
|
+
advanced.readAloudRate = clampReadAloudRate(patch.readAloudRate);
|
|
632
|
+
}
|
|
633
|
+
if (patch.readAloudVoiceURI === null || patch.readAloudVoiceURI === "") {
|
|
634
|
+
delete advanced.readAloudVoiceURI;
|
|
635
|
+
} else if (typeof patch.readAloudVoiceURI === "string") {
|
|
636
|
+
const voiceURI = sanitizeReadAloudVoiceURI(patch.readAloudVoiceURI);
|
|
637
|
+
if (voiceURI) advanced.readAloudVoiceURI = voiceURI;
|
|
638
|
+
else delete advanced.readAloudVoiceURI;
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
|
|
603
642
|
// src/store/usage-on-limit.ts
|
|
604
643
|
var USAGE_ON_LIMIT_VALUES = [
|
|
605
644
|
"keep_going",
|
|
@@ -714,6 +753,7 @@ function toPublicAppSettings(settings) {
|
|
|
714
753
|
delete integrations.linearClientSecret;
|
|
715
754
|
delete integrations.slackClientSecret;
|
|
716
755
|
delete integrations.slackAppToken;
|
|
756
|
+
delete integrations.remoteHostSecret;
|
|
717
757
|
delete integrations.githubPat;
|
|
718
758
|
delete integrations.abletimeAccessToken;
|
|
719
759
|
delete integrations.abletimeRefreshToken;
|
|
@@ -867,6 +907,10 @@ function normalizeIntegrations(raw) {
|
|
|
867
907
|
const label = source.slackDeviceLabel.trim().slice(0, 64);
|
|
868
908
|
if (label) out.slackDeviceLabel = label;
|
|
869
909
|
}
|
|
910
|
+
if (typeof source.remoteHostSecret === "string") {
|
|
911
|
+
const secret = source.remoteHostSecret.trim();
|
|
912
|
+
if (secret) out.remoteHostSecret = secret;
|
|
913
|
+
}
|
|
870
914
|
if (typeof source.githubGitAuthMode === "string" && GIT_AUTH_MODES.has(source.githubGitAuthMode)) {
|
|
871
915
|
out.githubGitAuthMode = source.githubGitAuthMode;
|
|
872
916
|
}
|
|
@@ -1131,6 +1175,7 @@ function normalizeAdvanced(raw) {
|
|
|
1131
1175
|
const name = source.agentDoneCustomSoundName.trim();
|
|
1132
1176
|
if (name) out.agentDoneCustomSoundName = name.slice(0, 200);
|
|
1133
1177
|
}
|
|
1178
|
+
copyReadAloudFromUnknown(source, out);
|
|
1134
1179
|
return out;
|
|
1135
1180
|
}
|
|
1136
1181
|
function normalizeSettings(raw) {
|
|
@@ -1223,7 +1268,7 @@ function readSettingsFile() {
|
|
|
1223
1268
|
}
|
|
1224
1269
|
function diskHoldsSecrets(disk) {
|
|
1225
1270
|
return Boolean(
|
|
1226
|
-
disk.integrations.linearApiKey || disk.integrations.linearAccessToken || disk.integrations.linearRefreshToken || disk.integrations.linearClientSecret || disk.integrations.slackClientSecret || disk.integrations.slackAppToken || disk.integrations.githubPat || disk.integrations.abletimeAccessToken || disk.integrations.abletimeRefreshToken || disk.integrations.vercelToken || disk.integrations.supabaseAccessToken || disk.integrations.posthogPersonalApiKey || disk.integrations.sentryAuthToken || Object.keys(disk.environment).length > 0
|
|
1271
|
+
disk.integrations.linearApiKey || disk.integrations.linearAccessToken || disk.integrations.linearRefreshToken || disk.integrations.linearClientSecret || disk.integrations.slackClientSecret || disk.integrations.slackAppToken || disk.integrations.remoteHostSecret || disk.integrations.githubPat || disk.integrations.abletimeAccessToken || disk.integrations.abletimeRefreshToken || disk.integrations.vercelToken || disk.integrations.supabaseAccessToken || disk.integrations.posthogPersonalApiKey || disk.integrations.sentryAuthToken || Object.keys(disk.environment).length > 0
|
|
1227
1272
|
);
|
|
1228
1273
|
}
|
|
1229
1274
|
function mergeVault(disk) {
|
|
@@ -1248,6 +1293,9 @@ function mergeVault(disk) {
|
|
|
1248
1293
|
if (vault.slackAppToken && !integrations.slackAppToken) {
|
|
1249
1294
|
integrations.slackAppToken = vault.slackAppToken;
|
|
1250
1295
|
}
|
|
1296
|
+
if (vault.remoteHostSecret && !integrations.remoteHostSecret) {
|
|
1297
|
+
integrations.remoteHostSecret = vault.remoteHostSecret;
|
|
1298
|
+
}
|
|
1251
1299
|
if (vault.githubPat && !integrations.githubPat) {
|
|
1252
1300
|
integrations.githubPat = vault.githubPat;
|
|
1253
1301
|
}
|
|
@@ -1279,6 +1327,7 @@ function persistSplit(settings) {
|
|
|
1279
1327
|
const linearClientSecret = integrations.linearClientSecret;
|
|
1280
1328
|
const slackClientSecret = integrations.slackClientSecret;
|
|
1281
1329
|
const slackAppToken = integrations.slackAppToken;
|
|
1330
|
+
const remoteHostSecret = integrations.remoteHostSecret;
|
|
1282
1331
|
const githubPat = integrations.githubPat;
|
|
1283
1332
|
const abletimeAccessToken = integrations.abletimeAccessToken;
|
|
1284
1333
|
const abletimeRefreshToken = integrations.abletimeRefreshToken;
|
|
@@ -1292,6 +1341,7 @@ function persistSplit(settings) {
|
|
|
1292
1341
|
delete integrations.linearClientSecret;
|
|
1293
1342
|
delete integrations.slackClientSecret;
|
|
1294
1343
|
delete integrations.slackAppToken;
|
|
1344
|
+
delete integrations.remoteHostSecret;
|
|
1295
1345
|
delete integrations.githubPat;
|
|
1296
1346
|
delete integrations.abletimeAccessToken;
|
|
1297
1347
|
delete integrations.abletimeRefreshToken;
|
|
@@ -1311,6 +1361,7 @@ function persistSplit(settings) {
|
|
|
1311
1361
|
linearClientSecret,
|
|
1312
1362
|
slackClientSecret,
|
|
1313
1363
|
slackAppToken,
|
|
1364
|
+
remoteHostSecret,
|
|
1314
1365
|
githubPat,
|
|
1315
1366
|
abletimeAccessToken,
|
|
1316
1367
|
abletimeRefreshToken,
|
|
@@ -1523,6 +1574,13 @@ function updateIntegrationsSettings(patch) {
|
|
|
1523
1574
|
integrations.slackDeviceLabel = patch.slackDeviceLabel.trim().slice(0, 64);
|
|
1524
1575
|
}
|
|
1525
1576
|
}
|
|
1577
|
+
if ("remoteHostSecret" in patch) {
|
|
1578
|
+
if (patch.remoteHostSecret == null || patch.remoteHostSecret.trim() === "") {
|
|
1579
|
+
delete integrations.remoteHostSecret;
|
|
1580
|
+
} else {
|
|
1581
|
+
integrations.remoteHostSecret = patch.remoteHostSecret.trim();
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1526
1584
|
if ("githubGitAuthMode" in patch) {
|
|
1527
1585
|
if (patch.githubGitAuthMode == null) {
|
|
1528
1586
|
delete integrations.githubGitAuthMode;
|
|
@@ -1974,27 +2032,6 @@ function brightsyCloudConnectEnabled(settings = loadAppSettings()) {
|
|
|
1974
2032
|
function slackListenEnabled(settings = loadAppSettings()) {
|
|
1975
2033
|
return settings.integrations.slackListenEnabled === true;
|
|
1976
2034
|
}
|
|
1977
|
-
function ensureSlackDeviceIdentity(settings = loadAppSettings()) {
|
|
1978
|
-
let deviceId = settings.integrations.slackDeviceId?.trim() ?? "";
|
|
1979
|
-
let deviceLabel = settings.integrations.slackDeviceLabel?.trim() ?? "";
|
|
1980
|
-
const patch = {};
|
|
1981
|
-
if (!deviceId) {
|
|
1982
|
-
deviceId = randomUUID();
|
|
1983
|
-
patch.slackDeviceId = deviceId;
|
|
1984
|
-
}
|
|
1985
|
-
if (!deviceLabel) {
|
|
1986
|
-
try {
|
|
1987
|
-
deviceLabel = hostname().split(".")[0]?.trim() || "This Mac";
|
|
1988
|
-
} catch {
|
|
1989
|
-
deviceLabel = "This Mac";
|
|
1990
|
-
}
|
|
1991
|
-
patch.slackDeviceLabel = deviceLabel;
|
|
1992
|
-
}
|
|
1993
|
-
if (Object.keys(patch).length > 0) {
|
|
1994
|
-
updateIntegrationsSettings(patch);
|
|
1995
|
-
}
|
|
1996
|
-
return { deviceId, deviceLabel };
|
|
1997
|
-
}
|
|
1998
2035
|
function slackAppLevelToken(settings = loadAppSettings()) {
|
|
1999
2036
|
return process.env.SIDEBOARD_SLACK_APP_TOKEN?.trim() || settings.integrations.slackAppToken?.trim() || "";
|
|
2000
2037
|
}
|
|
@@ -2123,6 +2160,7 @@ function updateAdvancedSettings(patch) {
|
|
|
2123
2160
|
if (name) advanced.agentDoneCustomSoundName = name.slice(0, 200);
|
|
2124
2161
|
else delete advanced.agentDoneCustomSoundName;
|
|
2125
2162
|
}
|
|
2163
|
+
patchReadAloudSettings(patch, advanced);
|
|
2126
2164
|
return saveAppSettings({ ...current, advanced });
|
|
2127
2165
|
}
|
|
2128
2166
|
function autoRenameBranchEnabled(settings = loadAppSettings()) {
|
|
@@ -2335,6 +2373,13 @@ export {
|
|
|
2335
2373
|
historyRetentionStubMessage,
|
|
2336
2374
|
planHistoryRetention,
|
|
2337
2375
|
planHistoryAgePurge,
|
|
2376
|
+
READ_ALOUD_RATE_MIN,
|
|
2377
|
+
READ_ALOUD_RATE_MAX,
|
|
2378
|
+
READ_ALOUD_RATE_DEFAULT,
|
|
2379
|
+
clampReadAloudRate,
|
|
2380
|
+
sanitizeReadAloudVoiceURI,
|
|
2381
|
+
copyReadAloudFromUnknown,
|
|
2382
|
+
patchReadAloudSettings,
|
|
2338
2383
|
USAGE_ON_LIMIT_VALUES,
|
|
2339
2384
|
isUsageOnLimit,
|
|
2340
2385
|
resolveUsageOnLimit,
|
|
@@ -2398,7 +2443,6 @@ export {
|
|
|
2398
2443
|
getLinearApiKey,
|
|
2399
2444
|
brightsyCloudConnectEnabled,
|
|
2400
2445
|
slackListenEnabled,
|
|
2401
|
-
ensureSlackDeviceIdentity,
|
|
2402
2446
|
slackAppLevelToken,
|
|
2403
2447
|
brightsyInjectWorktreeMcpEnabled,
|
|
2404
2448
|
brightsyCloudConnectAgent,
|