@sideboard-ai/core 0.1.273 → 0.1.275

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.
Files changed (48) hide show
  1. package/dist/{abletime-4ZSDI4YP.js → abletime-VCVPSLSU.js} +4 -4
  2. package/dist/{abletime-JNQAHLHH.js → abletime-VRATUMDO.js} +4 -4
  3. package/dist/{abletime-oauth-4RXZH2KU.js → abletime-oauth-4C4G2J3R.js} +3 -3
  4. package/dist/{abletime-oauth-DCEIINYT.js → abletime-oauth-4K7MICAD.js} +3 -3
  5. package/dist/{abletime-rest-KVBJFVFD.js → abletime-rest-6N63ZVQ3.js} +3 -3
  6. package/dist/{abletime-rest-VN6PZ6P2.js → abletime-rest-PIBCNHF3.js} +3 -3
  7. package/dist/{agents-LAFFXBBZ.js → agents-2FOWVJCN.js} +4 -4
  8. package/dist/{agents-ZCO37SKG.js → agents-JBVJRDH3.js} +4 -4
  9. package/dist/{app-settings-RAC4PSSP.js → app-settings-EQQZQNYD.js} +1 -1
  10. package/dist/{app-settings-L5HGYXWJ.js → app-settings-NI4X5HW3.js} +1 -1
  11. package/dist/{chunk-UXI52MLJ.js → chunk-2J34G3WJ.js} +3 -3
  12. package/dist/{chunk-PTNGMA5C.js → chunk-A2G3ZBJS.js} +2 -2
  13. package/dist/{chunk-T47ARZ5Q.js → chunk-FELFTNH2.js} +25 -24
  14. package/dist/{chunk-OUBQH5GR.js → chunk-HOMZKYHF.js} +31 -29
  15. package/dist/{chunk-GONPMH36.js → chunk-IJDQKC5A.js} +5 -5
  16. package/dist/{chunk-USBZ7PH4.js → chunk-IPPY3FG5.js} +1 -1
  17. package/dist/{chunk-NWE3NOWQ.js → chunk-K7MWJLR7.js} +1 -1
  18. package/dist/{chunk-HO2T6BC3.js → chunk-MGS5T2A3.js} +31 -29
  19. package/dist/{chunk-ADWNK2JH.js → chunk-NIB2IZ6J.js} +5 -5
  20. package/dist/{chunk-AGXZAMOF.js → chunk-NQ7JMVSU.js} +2 -2
  21. package/dist/{chunk-JLDJGGCL.js → chunk-NT7RIWRR.js} +5 -5
  22. package/dist/{chunk-L6CYOON4.js → chunk-PZURG3XN.js} +5 -5
  23. package/dist/{chunk-LAIBYKZS.js → chunk-QINJKNLR.js} +3 -3
  24. package/dist/{chunk-2QUILREI.js → chunk-QTZO4LPU.js} +2 -2
  25. package/dist/{chunk-KZ2CDZBZ.js → chunk-R7HLXD4I.js} +3 -3
  26. package/dist/{chunk-N3LASDJM.js → chunk-SQOAFR2U.js} +26 -25
  27. package/dist/{chunk-OIENQEGG.js → chunk-WRIMAEF2.js} +67 -122
  28. package/dist/{chunk-DBFAFI5A.js → chunk-XKZAVGTT.js} +2 -2
  29. package/dist/{chunk-PAH7KDL2.js → chunk-YNTXWFXT.js} +67 -122
  30. package/dist/{conductor-3AQM67VK.js → conductor-GBCE37K4.js} +4 -4
  31. package/dist/{conductor-FLWACOVC.js → conductor-YYQKZAND.js} +4 -4
  32. package/dist/{coordinator-prompt-4KVA6XUX.js → coordinator-prompt-B3GLVXPP.js} +3 -3
  33. package/dist/{coordinator-prompt-MVUHFNSC.js → coordinator-prompt-SFZCZ3HR.js} +3 -3
  34. package/dist/{global-workspace-FR7QTLPK.js → global-workspace-7XEXTIHL.js} +3 -3
  35. package/dist/{global-workspace-34Z2IWYQ.js → global-workspace-N2YYJKA5.js} +3 -3
  36. package/dist/index.cjs +1700 -186
  37. package/dist/index.d.cts +99 -20
  38. package/dist/index.d.ts +99 -20
  39. package/dist/index.js +1583 -43
  40. package/dist/mcp/run-stdio.cjs +95 -141
  41. package/dist/mcp/run-stdio.js +11 -11
  42. package/dist/{orchestrator-YKSDWR6C.js → orchestrator-6QJLM6Y4.js} +6 -6
  43. package/dist/{orchestrator-K42IBMBE.js → orchestrator-QMKVXVUR.js} +6 -6
  44. package/dist/{workspaces-5GERYHDJ.js → workspaces-BJCHMGVG.js} +3 -3
  45. package/dist/{workspaces-2JBDUMM6.js → workspaces-PBB6HY2D.js} +3 -3
  46. package/dist/{worktree-ACW23KJ5.js → worktree-L57T3KH7.js} +2 -2
  47. package/dist/{worktree-C7RPVHZ7.js → worktree-Q6UJHG25.js} +2 -2
  48. package/package.json +1 -1
@@ -310,6 +310,9 @@ function normalizeVault(raw) {
310
310
  if (typeof raw.remoteHostSecret === "string" && raw.remoteHostSecret.trim()) {
311
311
  out.remoteHostSecret = raw.remoteHostSecret.trim();
312
312
  }
313
+ if (typeof raw.remoteAccountToken === "string" && raw.remoteAccountToken.trim()) {
314
+ out.remoteAccountToken = raw.remoteAccountToken.trim();
315
+ }
313
316
  if (typeof raw.githubPat === "string" && raw.githubPat.trim()) {
314
317
  out.githubPat = raw.githubPat.trim();
315
318
  }
@@ -695,9 +698,27 @@ function emptyPublicIntegrations() {
695
698
  hasVercelToken: false,
696
699
  hasSupabaseToken: false,
697
700
  hasPosthogToken: false,
698
- hasSentryToken: false
701
+ hasSentryToken: false,
702
+ hasRemoteAccount: false
699
703
  };
700
704
  }
705
+ var INTEGRATION_VAULT_KEYS = [
706
+ "linearApiKey",
707
+ "linearAccessToken",
708
+ "linearRefreshToken",
709
+ "linearClientSecret",
710
+ "slackClientSecret",
711
+ "slackAppToken",
712
+ "remoteHostSecret",
713
+ "remoteAccountToken",
714
+ "githubPat",
715
+ "abletimeAccessToken",
716
+ "abletimeRefreshToken",
717
+ "vercelToken",
718
+ "supabaseAccessToken",
719
+ "posthogPersonalApiKey",
720
+ "sentryAuthToken"
721
+ ];
701
722
  function hasLinearOAuth(integrations) {
702
723
  return Boolean(
703
724
  integrations.linearAccessToken?.trim() || integrations.linearRefreshToken?.trim()
@@ -712,29 +733,7 @@ function toPublicAppSettings(settings) {
712
733
  if (key.trim()) environment[key] = "";
713
734
  }
714
735
  const integrations = { ...settings.integrations };
715
- const slackClientSecret = integrations.slackClientSecret;
716
- const slackAppToken = integrations.slackAppToken;
717
- const githubPat = integrations.githubPat;
718
- const abletimeAccessToken = integrations.abletimeAccessToken;
719
- const abletimeRefreshToken = integrations.abletimeRefreshToken;
720
- const vercelToken = integrations.vercelToken;
721
- const supabaseAccessToken = integrations.supabaseAccessToken;
722
- const posthogPersonalApiKey = integrations.posthogPersonalApiKey;
723
- const sentryAuthToken = integrations.sentryAuthToken;
724
- delete integrations.linearApiKey;
725
- delete integrations.linearAccessToken;
726
- delete integrations.linearRefreshToken;
727
- delete integrations.linearClientSecret;
728
- delete integrations.slackClientSecret;
729
- delete integrations.slackAppToken;
730
- delete integrations.remoteHostSecret;
731
- delete integrations.githubPat;
732
- delete integrations.abletimeAccessToken;
733
- delete integrations.abletimeRefreshToken;
734
- delete integrations.vercelToken;
735
- delete integrations.supabaseAccessToken;
736
- delete integrations.posthogPersonalApiKey;
737
- delete integrations.sentryAuthToken;
736
+ for (const key of INTEGRATION_VAULT_KEYS) delete integrations[key];
738
737
  return {
739
738
  ...settings,
740
739
  environment,
@@ -742,15 +741,18 @@ function toPublicAppSettings(settings) {
742
741
  ...integrations,
743
742
  hasLinearApiKey: hasLinearCredentials(settings.integrations),
744
743
  hasLinearOAuth: hasLinearOAuth(settings.integrations),
745
- hasSlackClientSecret: Boolean(slackClientSecret?.trim()),
746
- hasSlackAppToken: Boolean(slackAppToken?.trim()),
747
- hasGithubPat: Boolean(githubPat?.trim()),
748
- hasAbleTimeToken: Boolean(abletimeAccessToken?.trim() || abletimeRefreshToken?.trim()),
749
- hasAbleTimeOAuth: Boolean(abletimeRefreshToken?.trim()),
750
- hasVercelToken: Boolean(vercelToken?.trim()),
751
- hasSupabaseToken: Boolean(supabaseAccessToken?.trim()),
752
- hasPosthogToken: Boolean(posthogPersonalApiKey?.trim()),
753
- hasSentryToken: Boolean(sentryAuthToken?.trim())
744
+ hasSlackClientSecret: Boolean(settings.integrations.slackClientSecret?.trim()),
745
+ hasSlackAppToken: Boolean(settings.integrations.slackAppToken?.trim()),
746
+ hasGithubPat: Boolean(settings.integrations.githubPat?.trim()),
747
+ hasAbleTimeToken: Boolean(
748
+ settings.integrations.abletimeAccessToken?.trim() || settings.integrations.abletimeRefreshToken?.trim()
749
+ ),
750
+ hasAbleTimeOAuth: Boolean(settings.integrations.abletimeRefreshToken?.trim()),
751
+ hasVercelToken: Boolean(settings.integrations.vercelToken?.trim()),
752
+ hasSupabaseToken: Boolean(settings.integrations.supabaseAccessToken?.trim()),
753
+ hasPosthogToken: Boolean(settings.integrations.posthogPersonalApiKey?.trim()),
754
+ hasSentryToken: Boolean(settings.integrations.sentryAuthToken?.trim()),
755
+ hasRemoteAccount: Boolean(settings.integrations.remoteAccountToken?.trim())
754
756
  }
755
757
  };
756
758
  }
@@ -885,6 +887,14 @@ function normalizeIntegrations(raw) {
885
887
  const secret = source.remoteHostSecret.trim();
886
888
  if (secret) out.remoteHostSecret = secret;
887
889
  }
890
+ if (typeof source.remoteAccountToken === "string") {
891
+ const token = source.remoteAccountToken.trim();
892
+ if (token) out.remoteAccountToken = token;
893
+ }
894
+ if (typeof source.remoteAccountEmail === "string") {
895
+ const email = source.remoteAccountEmail.trim().toLowerCase();
896
+ if (email) out.remoteAccountEmail = email;
897
+ }
888
898
  if (typeof source.githubGitAuthMode === "string" && GIT_AUTH_MODES.has(source.githubGitAuthMode)) {
889
899
  out.githubGitAuthMode = source.githubGitAuthMode;
890
900
  }
@@ -1241,110 +1251,31 @@ function readSettingsFile() {
1241
1251
  }
1242
1252
  }
1243
1253
  function diskHoldsSecrets(disk) {
1244
- return Boolean(
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
1246
- );
1254
+ return INTEGRATION_VAULT_KEYS.some((key) => Boolean(disk.integrations[key])) || Object.keys(disk.environment).length > 0;
1247
1255
  }
1248
1256
  function mergeVault(disk) {
1249
1257
  const vault = loadSecretVault();
1250
1258
  const environment = { ...vault.environment ?? {}, ...disk.environment };
1251
1259
  const integrations = { ...disk.integrations };
1252
- if (vault.linearApiKey && !integrations.linearApiKey) {
1253
- integrations.linearApiKey = vault.linearApiKey;
1254
- }
1255
- if (vault.linearAccessToken && !integrations.linearAccessToken) {
1256
- integrations.linearAccessToken = vault.linearAccessToken;
1257
- }
1258
- if (vault.linearRefreshToken && !integrations.linearRefreshToken) {
1259
- integrations.linearRefreshToken = vault.linearRefreshToken;
1260
- }
1261
- if (vault.linearClientSecret && !integrations.linearClientSecret) {
1262
- integrations.linearClientSecret = vault.linearClientSecret;
1263
- }
1264
- if (vault.slackClientSecret && !integrations.slackClientSecret) {
1265
- integrations.slackClientSecret = vault.slackClientSecret;
1266
- }
1267
- if (vault.slackAppToken && !integrations.slackAppToken) {
1268
- integrations.slackAppToken = vault.slackAppToken;
1269
- }
1270
- if (vault.remoteHostSecret && !integrations.remoteHostSecret) {
1271
- integrations.remoteHostSecret = vault.remoteHostSecret;
1272
- }
1273
- if (vault.githubPat && !integrations.githubPat) {
1274
- integrations.githubPat = vault.githubPat;
1275
- }
1276
- if (vault.abletimeAccessToken && !integrations.abletimeAccessToken) {
1277
- integrations.abletimeAccessToken = vault.abletimeAccessToken;
1278
- }
1279
- if (vault.abletimeRefreshToken && !integrations.abletimeRefreshToken) {
1280
- integrations.abletimeRefreshToken = vault.abletimeRefreshToken;
1281
- }
1282
- if (vault.vercelToken && !integrations.vercelToken) {
1283
- integrations.vercelToken = vault.vercelToken;
1284
- }
1285
- if (vault.supabaseAccessToken && !integrations.supabaseAccessToken) {
1286
- integrations.supabaseAccessToken = vault.supabaseAccessToken;
1287
- }
1288
- if (vault.posthogPersonalApiKey && !integrations.posthogPersonalApiKey) {
1289
- integrations.posthogPersonalApiKey = vault.posthogPersonalApiKey;
1290
- }
1291
- if (vault.sentryAuthToken && !integrations.sentryAuthToken) {
1292
- integrations.sentryAuthToken = vault.sentryAuthToken;
1260
+ for (const key of INTEGRATION_VAULT_KEYS) {
1261
+ const stored = vault[key];
1262
+ if (stored && !integrations[key]) integrations[key] = stored;
1293
1263
  }
1294
1264
  return { ...disk, environment, integrations };
1295
1265
  }
1296
1266
  function persistSplit(settings) {
1297
1267
  const integrations = { ...settings.integrations };
1298
- const linearApiKey = integrations.linearApiKey;
1299
- const linearAccessToken = integrations.linearAccessToken;
1300
- const linearRefreshToken = integrations.linearRefreshToken;
1301
- const linearClientSecret = integrations.linearClientSecret;
1302
- const slackClientSecret = integrations.slackClientSecret;
1303
- const slackAppToken = integrations.slackAppToken;
1304
- const remoteHostSecret = integrations.remoteHostSecret;
1305
- const githubPat = integrations.githubPat;
1306
- const abletimeAccessToken = integrations.abletimeAccessToken;
1307
- const abletimeRefreshToken = integrations.abletimeRefreshToken;
1308
- const vercelToken = integrations.vercelToken;
1309
- const supabaseAccessToken = integrations.supabaseAccessToken;
1310
- const posthogPersonalApiKey = integrations.posthogPersonalApiKey;
1311
- const sentryAuthToken = integrations.sentryAuthToken;
1312
- delete integrations.linearApiKey;
1313
- delete integrations.linearAccessToken;
1314
- delete integrations.linearRefreshToken;
1315
- delete integrations.linearClientSecret;
1316
- delete integrations.slackClientSecret;
1317
- delete integrations.slackAppToken;
1318
- delete integrations.remoteHostSecret;
1319
- delete integrations.githubPat;
1320
- delete integrations.abletimeAccessToken;
1321
- delete integrations.abletimeRefreshToken;
1322
- delete integrations.vercelToken;
1323
- delete integrations.supabaseAccessToken;
1324
- delete integrations.posthogPersonalApiKey;
1325
- delete integrations.sentryAuthToken;
1268
+ const vault = { environment: settings.environment };
1269
+ for (const key of INTEGRATION_VAULT_KEYS) {
1270
+ vault[key] = integrations[key];
1271
+ delete integrations[key];
1272
+ }
1326
1273
  writePrivateFile(
1327
1274
  appSettingsPath(),
1328
1275
  `${JSON.stringify({ ...settings, environment: {}, integrations }, null, 2)}
1329
1276
  `
1330
1277
  );
1331
- saveSecretVault({
1332
- linearApiKey,
1333
- linearAccessToken,
1334
- linearRefreshToken,
1335
- linearClientSecret,
1336
- slackClientSecret,
1337
- slackAppToken,
1338
- remoteHostSecret,
1339
- githubPat,
1340
- abletimeAccessToken,
1341
- abletimeRefreshToken,
1342
- vercelToken,
1343
- supabaseAccessToken,
1344
- posthogPersonalApiKey,
1345
- sentryAuthToken,
1346
- environment: settings.environment
1347
- });
1278
+ saveSecretVault(vault);
1348
1279
  }
1349
1280
  function loadAppSettings() {
1350
1281
  const disk = readSettingsFile();
@@ -1555,6 +1486,20 @@ function updateIntegrationsSettings(patch) {
1555
1486
  integrations.remoteHostSecret = patch.remoteHostSecret.trim();
1556
1487
  }
1557
1488
  }
1489
+ if ("remoteAccountToken" in patch) {
1490
+ if (patch.remoteAccountToken == null || patch.remoteAccountToken.trim() === "") {
1491
+ delete integrations.remoteAccountToken;
1492
+ } else {
1493
+ integrations.remoteAccountToken = patch.remoteAccountToken.trim();
1494
+ }
1495
+ }
1496
+ if ("remoteAccountEmail" in patch) {
1497
+ if (patch.remoteAccountEmail == null || patch.remoteAccountEmail.trim() === "") {
1498
+ delete integrations.remoteAccountEmail;
1499
+ } else {
1500
+ integrations.remoteAccountEmail = patch.remoteAccountEmail.trim().toLowerCase();
1501
+ }
1502
+ }
1558
1503
  if ("githubGitAuthMode" in patch) {
1559
1504
  if (patch.githubGitAuthMode == null) {
1560
1505
  delete integrations.githubGitAuthMode;
@@ -6,14 +6,14 @@ import {
6
6
  normalizeAbleTimeCredential,
7
7
  normalizeAbleTimeHost,
8
8
  rewriteAbleTimeError
9
- } from "./chunk-GONPMH36.js";
9
+ } from "./chunk-IJDQKC5A.js";
10
10
  import {
11
11
  httpFetch
12
12
  } from "./chunk-VKQGAWHY.js";
13
13
  import {
14
14
  getAbleTimeAccessToken,
15
15
  getAbleTimeHost
16
- } from "./chunk-OIENQEGG.js";
16
+ } from "./chunk-WRIMAEF2.js";
17
17
 
18
18
  // src/integrations/abletime-rest.ts
19
19
  var ABLETIME_REST_PREFIX = "/api/public/v2";
@@ -333,6 +333,9 @@ function normalizeVault(raw) {
333
333
  if (typeof raw.remoteHostSecret === "string" && raw.remoteHostSecret.trim()) {
334
334
  out.remoteHostSecret = raw.remoteHostSecret.trim();
335
335
  }
336
+ if (typeof raw.remoteAccountToken === "string" && raw.remoteAccountToken.trim()) {
337
+ out.remoteAccountToken = raw.remoteAccountToken.trim();
338
+ }
336
339
  if (typeof raw.githubPat === "string" && raw.githubPat.trim()) {
337
340
  out.githubPat = raw.githubPat.trim();
338
341
  }
@@ -721,9 +724,27 @@ function emptyPublicIntegrations() {
721
724
  hasVercelToken: false,
722
725
  hasSupabaseToken: false,
723
726
  hasPosthogToken: false,
724
- hasSentryToken: false
727
+ hasSentryToken: false,
728
+ hasRemoteAccount: false
725
729
  };
726
730
  }
731
+ var INTEGRATION_VAULT_KEYS = [
732
+ "linearApiKey",
733
+ "linearAccessToken",
734
+ "linearRefreshToken",
735
+ "linearClientSecret",
736
+ "slackClientSecret",
737
+ "slackAppToken",
738
+ "remoteHostSecret",
739
+ "remoteAccountToken",
740
+ "githubPat",
741
+ "abletimeAccessToken",
742
+ "abletimeRefreshToken",
743
+ "vercelToken",
744
+ "supabaseAccessToken",
745
+ "posthogPersonalApiKey",
746
+ "sentryAuthToken"
747
+ ];
727
748
  function hasLinearOAuth(integrations) {
728
749
  return Boolean(
729
750
  integrations.linearAccessToken?.trim() || integrations.linearRefreshToken?.trim()
@@ -738,29 +759,7 @@ function toPublicAppSettings(settings) {
738
759
  if (key.trim()) environment[key] = "";
739
760
  }
740
761
  const integrations = { ...settings.integrations };
741
- const slackClientSecret = integrations.slackClientSecret;
742
- const slackAppToken = integrations.slackAppToken;
743
- const githubPat = integrations.githubPat;
744
- const abletimeAccessToken = integrations.abletimeAccessToken;
745
- const abletimeRefreshToken = integrations.abletimeRefreshToken;
746
- const vercelToken = integrations.vercelToken;
747
- const supabaseAccessToken = integrations.supabaseAccessToken;
748
- const posthogPersonalApiKey = integrations.posthogPersonalApiKey;
749
- const sentryAuthToken = integrations.sentryAuthToken;
750
- delete integrations.linearApiKey;
751
- delete integrations.linearAccessToken;
752
- delete integrations.linearRefreshToken;
753
- delete integrations.linearClientSecret;
754
- delete integrations.slackClientSecret;
755
- delete integrations.slackAppToken;
756
- delete integrations.remoteHostSecret;
757
- delete integrations.githubPat;
758
- delete integrations.abletimeAccessToken;
759
- delete integrations.abletimeRefreshToken;
760
- delete integrations.vercelToken;
761
- delete integrations.supabaseAccessToken;
762
- delete integrations.posthogPersonalApiKey;
763
- delete integrations.sentryAuthToken;
762
+ for (const key of INTEGRATION_VAULT_KEYS) delete integrations[key];
764
763
  return {
765
764
  ...settings,
766
765
  environment,
@@ -768,15 +767,18 @@ function toPublicAppSettings(settings) {
768
767
  ...integrations,
769
768
  hasLinearApiKey: hasLinearCredentials(settings.integrations),
770
769
  hasLinearOAuth: hasLinearOAuth(settings.integrations),
771
- hasSlackClientSecret: Boolean(slackClientSecret?.trim()),
772
- hasSlackAppToken: Boolean(slackAppToken?.trim()),
773
- hasGithubPat: Boolean(githubPat?.trim()),
774
- hasAbleTimeToken: Boolean(abletimeAccessToken?.trim() || abletimeRefreshToken?.trim()),
775
- hasAbleTimeOAuth: Boolean(abletimeRefreshToken?.trim()),
776
- hasVercelToken: Boolean(vercelToken?.trim()),
777
- hasSupabaseToken: Boolean(supabaseAccessToken?.trim()),
778
- hasPosthogToken: Boolean(posthogPersonalApiKey?.trim()),
779
- hasSentryToken: Boolean(sentryAuthToken?.trim())
770
+ hasSlackClientSecret: Boolean(settings.integrations.slackClientSecret?.trim()),
771
+ hasSlackAppToken: Boolean(settings.integrations.slackAppToken?.trim()),
772
+ hasGithubPat: Boolean(settings.integrations.githubPat?.trim()),
773
+ hasAbleTimeToken: Boolean(
774
+ settings.integrations.abletimeAccessToken?.trim() || settings.integrations.abletimeRefreshToken?.trim()
775
+ ),
776
+ hasAbleTimeOAuth: Boolean(settings.integrations.abletimeRefreshToken?.trim()),
777
+ hasVercelToken: Boolean(settings.integrations.vercelToken?.trim()),
778
+ hasSupabaseToken: Boolean(settings.integrations.supabaseAccessToken?.trim()),
779
+ hasPosthogToken: Boolean(settings.integrations.posthogPersonalApiKey?.trim()),
780
+ hasSentryToken: Boolean(settings.integrations.sentryAuthToken?.trim()),
781
+ hasRemoteAccount: Boolean(settings.integrations.remoteAccountToken?.trim())
780
782
  }
781
783
  };
782
784
  }
@@ -911,6 +913,14 @@ function normalizeIntegrations(raw) {
911
913
  const secret = source.remoteHostSecret.trim();
912
914
  if (secret) out.remoteHostSecret = secret;
913
915
  }
916
+ if (typeof source.remoteAccountToken === "string") {
917
+ const token = source.remoteAccountToken.trim();
918
+ if (token) out.remoteAccountToken = token;
919
+ }
920
+ if (typeof source.remoteAccountEmail === "string") {
921
+ const email = source.remoteAccountEmail.trim().toLowerCase();
922
+ if (email) out.remoteAccountEmail = email;
923
+ }
914
924
  if (typeof source.githubGitAuthMode === "string" && GIT_AUTH_MODES.has(source.githubGitAuthMode)) {
915
925
  out.githubGitAuthMode = source.githubGitAuthMode;
916
926
  }
@@ -1267,110 +1277,31 @@ function readSettingsFile() {
1267
1277
  }
1268
1278
  }
1269
1279
  function diskHoldsSecrets(disk) {
1270
- return Boolean(
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
1272
- );
1280
+ return INTEGRATION_VAULT_KEYS.some((key) => Boolean(disk.integrations[key])) || Object.keys(disk.environment).length > 0;
1273
1281
  }
1274
1282
  function mergeVault(disk) {
1275
1283
  const vault = loadSecretVault();
1276
1284
  const environment = { ...vault.environment ?? {}, ...disk.environment };
1277
1285
  const integrations = { ...disk.integrations };
1278
- if (vault.linearApiKey && !integrations.linearApiKey) {
1279
- integrations.linearApiKey = vault.linearApiKey;
1280
- }
1281
- if (vault.linearAccessToken && !integrations.linearAccessToken) {
1282
- integrations.linearAccessToken = vault.linearAccessToken;
1283
- }
1284
- if (vault.linearRefreshToken && !integrations.linearRefreshToken) {
1285
- integrations.linearRefreshToken = vault.linearRefreshToken;
1286
- }
1287
- if (vault.linearClientSecret && !integrations.linearClientSecret) {
1288
- integrations.linearClientSecret = vault.linearClientSecret;
1289
- }
1290
- if (vault.slackClientSecret && !integrations.slackClientSecret) {
1291
- integrations.slackClientSecret = vault.slackClientSecret;
1292
- }
1293
- if (vault.slackAppToken && !integrations.slackAppToken) {
1294
- integrations.slackAppToken = vault.slackAppToken;
1295
- }
1296
- if (vault.remoteHostSecret && !integrations.remoteHostSecret) {
1297
- integrations.remoteHostSecret = vault.remoteHostSecret;
1298
- }
1299
- if (vault.githubPat && !integrations.githubPat) {
1300
- integrations.githubPat = vault.githubPat;
1301
- }
1302
- if (vault.abletimeAccessToken && !integrations.abletimeAccessToken) {
1303
- integrations.abletimeAccessToken = vault.abletimeAccessToken;
1304
- }
1305
- if (vault.abletimeRefreshToken && !integrations.abletimeRefreshToken) {
1306
- integrations.abletimeRefreshToken = vault.abletimeRefreshToken;
1307
- }
1308
- if (vault.vercelToken && !integrations.vercelToken) {
1309
- integrations.vercelToken = vault.vercelToken;
1310
- }
1311
- if (vault.supabaseAccessToken && !integrations.supabaseAccessToken) {
1312
- integrations.supabaseAccessToken = vault.supabaseAccessToken;
1313
- }
1314
- if (vault.posthogPersonalApiKey && !integrations.posthogPersonalApiKey) {
1315
- integrations.posthogPersonalApiKey = vault.posthogPersonalApiKey;
1316
- }
1317
- if (vault.sentryAuthToken && !integrations.sentryAuthToken) {
1318
- integrations.sentryAuthToken = vault.sentryAuthToken;
1286
+ for (const key of INTEGRATION_VAULT_KEYS) {
1287
+ const stored = vault[key];
1288
+ if (stored && !integrations[key]) integrations[key] = stored;
1319
1289
  }
1320
1290
  return { ...disk, environment, integrations };
1321
1291
  }
1322
1292
  function persistSplit(settings) {
1323
1293
  const integrations = { ...settings.integrations };
1324
- const linearApiKey = integrations.linearApiKey;
1325
- const linearAccessToken = integrations.linearAccessToken;
1326
- const linearRefreshToken = integrations.linearRefreshToken;
1327
- const linearClientSecret = integrations.linearClientSecret;
1328
- const slackClientSecret = integrations.slackClientSecret;
1329
- const slackAppToken = integrations.slackAppToken;
1330
- const remoteHostSecret = integrations.remoteHostSecret;
1331
- const githubPat = integrations.githubPat;
1332
- const abletimeAccessToken = integrations.abletimeAccessToken;
1333
- const abletimeRefreshToken = integrations.abletimeRefreshToken;
1334
- const vercelToken = integrations.vercelToken;
1335
- const supabaseAccessToken = integrations.supabaseAccessToken;
1336
- const posthogPersonalApiKey = integrations.posthogPersonalApiKey;
1337
- const sentryAuthToken = integrations.sentryAuthToken;
1338
- delete integrations.linearApiKey;
1339
- delete integrations.linearAccessToken;
1340
- delete integrations.linearRefreshToken;
1341
- delete integrations.linearClientSecret;
1342
- delete integrations.slackClientSecret;
1343
- delete integrations.slackAppToken;
1344
- delete integrations.remoteHostSecret;
1345
- delete integrations.githubPat;
1346
- delete integrations.abletimeAccessToken;
1347
- delete integrations.abletimeRefreshToken;
1348
- delete integrations.vercelToken;
1349
- delete integrations.supabaseAccessToken;
1350
- delete integrations.posthogPersonalApiKey;
1351
- delete integrations.sentryAuthToken;
1294
+ const vault = { environment: settings.environment };
1295
+ for (const key of INTEGRATION_VAULT_KEYS) {
1296
+ vault[key] = integrations[key];
1297
+ delete integrations[key];
1298
+ }
1352
1299
  writePrivateFile(
1353
1300
  appSettingsPath(),
1354
1301
  `${JSON.stringify({ ...settings, environment: {}, integrations }, null, 2)}
1355
1302
  `
1356
1303
  );
1357
- saveSecretVault({
1358
- linearApiKey,
1359
- linearAccessToken,
1360
- linearRefreshToken,
1361
- linearClientSecret,
1362
- slackClientSecret,
1363
- slackAppToken,
1364
- remoteHostSecret,
1365
- githubPat,
1366
- abletimeAccessToken,
1367
- abletimeRefreshToken,
1368
- vercelToken,
1369
- supabaseAccessToken,
1370
- posthogPersonalApiKey,
1371
- sentryAuthToken,
1372
- environment: settings.environment
1373
- });
1304
+ saveSecretVault(vault);
1374
1305
  }
1375
1306
  function loadAppSettings() {
1376
1307
  const disk = readSettingsFile();
@@ -1581,6 +1512,20 @@ function updateIntegrationsSettings(patch) {
1581
1512
  integrations.remoteHostSecret = patch.remoteHostSecret.trim();
1582
1513
  }
1583
1514
  }
1515
+ if ("remoteAccountToken" in patch) {
1516
+ if (patch.remoteAccountToken == null || patch.remoteAccountToken.trim() === "") {
1517
+ delete integrations.remoteAccountToken;
1518
+ } else {
1519
+ integrations.remoteAccountToken = patch.remoteAccountToken.trim();
1520
+ }
1521
+ }
1522
+ if ("remoteAccountEmail" in patch) {
1523
+ if (patch.remoteAccountEmail == null || patch.remoteAccountEmail.trim() === "") {
1524
+ delete integrations.remoteAccountEmail;
1525
+ } else {
1526
+ integrations.remoteAccountEmail = patch.remoteAccountEmail.trim().toLowerCase();
1527
+ }
1528
+ }
1584
1529
  if ("githubGitAuthMode" in patch) {
1585
1530
  if (patch.githubGitAuthMode == null) {
1586
1531
  delete integrations.githubGitAuthMode;
@@ -31,17 +31,17 @@ import {
31
31
  tryReservePort,
32
32
  tryReservePorts,
33
33
  worktreeRunPortsPath
34
- } from "./chunk-HO2T6BC3.js";
34
+ } from "./chunk-MGS5T2A3.js";
35
35
  import "./chunk-FAGK33E2.js";
36
- import "./chunk-PTNGMA5C.js";
37
- import "./chunk-USBZ7PH4.js";
36
+ import "./chunk-A2G3ZBJS.js";
37
+ import "./chunk-IPPY3FG5.js";
38
38
  import "./chunk-FWNL62VA.js";
39
39
  import "./chunk-2P4XKWV2.js";
40
40
  import "./chunk-5N4Q46SG.js";
41
41
  import "./chunk-6K64FJDD.js";
42
42
  import "./chunk-UWQ6UCIB.js";
43
43
  import "./chunk-QVN2WOKJ.js";
44
- import "./chunk-PAH7KDL2.js";
44
+ import "./chunk-YNTXWFXT.js";
45
45
  import "./chunk-77WWLBCI.js";
46
46
  import {
47
47
  stripNestedElectronEnv
@@ -33,14 +33,14 @@ import {
33
33
  tryReservePort,
34
34
  tryReservePorts,
35
35
  worktreeRunPortsPath
36
- } from "./chunk-OUBQH5GR.js";
36
+ } from "./chunk-HOMZKYHF.js";
37
37
  import "./chunk-UKSJO36E.js";
38
- import "./chunk-2QUILREI.js";
39
- import "./chunk-NWE3NOWQ.js";
38
+ import "./chunk-QTZO4LPU.js";
39
+ import "./chunk-K7MWJLR7.js";
40
40
  import "./chunk-N2WW62LF.js";
41
41
  import "./chunk-DD67JWTN.js";
42
42
  import "./chunk-2UG25RMK.js";
43
- import "./chunk-OIENQEGG.js";
43
+ import "./chunk-WRIMAEF2.js";
44
44
  import "./chunk-NSTQ6QKD.js";
45
45
  import {
46
46
  stripNestedElectronEnv
@@ -7,14 +7,14 @@ import {
7
7
  enrichWorkspacesWithGithub,
8
8
  ensureGlobalCoordinatorCwd,
9
9
  formatWorkspaceInventory
10
- } from "./chunk-PTNGMA5C.js";
11
- import "./chunk-USBZ7PH4.js";
10
+ } from "./chunk-A2G3ZBJS.js";
11
+ import "./chunk-IPPY3FG5.js";
12
12
  import "./chunk-FWNL62VA.js";
13
13
  import "./chunk-2P4XKWV2.js";
14
14
  import "./chunk-6K64FJDD.js";
15
15
  import "./chunk-UWQ6UCIB.js";
16
16
  import "./chunk-QVN2WOKJ.js";
17
- import "./chunk-PAH7KDL2.js";
17
+ import "./chunk-YNTXWFXT.js";
18
18
  import "./chunk-77WWLBCI.js";
19
19
  import "./chunk-4TR3HZFT.js";
20
20
  import "./chunk-WDRMZKVB.js";
@@ -9,12 +9,12 @@ import {
9
9
  enrichWorkspacesWithGithub,
10
10
  ensureGlobalCoordinatorCwd,
11
11
  formatWorkspaceInventory
12
- } from "./chunk-2QUILREI.js";
13
- import "./chunk-NWE3NOWQ.js";
12
+ } from "./chunk-QTZO4LPU.js";
13
+ import "./chunk-K7MWJLR7.js";
14
14
  import "./chunk-N2WW62LF.js";
15
15
  import "./chunk-DD67JWTN.js";
16
16
  import "./chunk-2UG25RMK.js";
17
- import "./chunk-OIENQEGG.js";
17
+ import "./chunk-WRIMAEF2.js";
18
18
  import "./chunk-NSTQ6QKD.js";
19
19
  import "./chunk-WWUABK6B.js";
20
20
  import "./chunk-FJZWM2ON.js";
@@ -20,12 +20,12 @@ import {
20
20
  remoteCoordinatorSourceRef,
21
21
  slackCoordinatorSourceRef,
22
22
  takenTeamSlugsForOrchestration
23
- } from "./chunk-2QUILREI.js";
24
- import "./chunk-NWE3NOWQ.js";
23
+ } from "./chunk-QTZO4LPU.js";
24
+ import "./chunk-K7MWJLR7.js";
25
25
  import "./chunk-N2WW62LF.js";
26
26
  import "./chunk-DD67JWTN.js";
27
27
  import "./chunk-2UG25RMK.js";
28
- import "./chunk-OIENQEGG.js";
28
+ import "./chunk-WRIMAEF2.js";
29
29
  import "./chunk-NSTQ6QKD.js";
30
30
  import "./chunk-WWUABK6B.js";
31
31
  import "./chunk-FJZWM2ON.js";
@@ -18,14 +18,14 @@ import {
18
18
  remoteCoordinatorSourceRef,
19
19
  slackCoordinatorSourceRef,
20
20
  takenTeamSlugsForOrchestration
21
- } from "./chunk-PTNGMA5C.js";
22
- import "./chunk-USBZ7PH4.js";
21
+ } from "./chunk-A2G3ZBJS.js";
22
+ import "./chunk-IPPY3FG5.js";
23
23
  import "./chunk-FWNL62VA.js";
24
24
  import "./chunk-2P4XKWV2.js";
25
25
  import "./chunk-6K64FJDD.js";
26
26
  import "./chunk-UWQ6UCIB.js";
27
27
  import "./chunk-QVN2WOKJ.js";
28
- import "./chunk-PAH7KDL2.js";
28
+ import "./chunk-YNTXWFXT.js";
29
29
  import "./chunk-77WWLBCI.js";
30
30
  import "./chunk-4TR3HZFT.js";
31
31
  import "./chunk-WDRMZKVB.js";