@sideboard-ai/core 0.1.287 → 0.1.289

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 (65) hide show
  1. package/dist/{abletime-I4RODUKT.js → abletime-4WJUVE64.js} +4 -4
  2. package/dist/{abletime-4CH2IOX5.js → abletime-VFKYNSJT.js} +4 -4
  3. package/dist/{abletime-oauth-7OZZ3ABX.js → abletime-oauth-FW24YHYX.js} +3 -3
  4. package/dist/{abletime-oauth-C2HN2Q6F.js → abletime-oauth-ICMB2XV2.js} +3 -3
  5. package/dist/{abletime-rest-E4LBRFLM.js → abletime-rest-HFMRTUDT.js} +3 -3
  6. package/dist/{abletime-rest-WFI2HWBU.js → abletime-rest-OGWC7BC6.js} +3 -3
  7. package/dist/agents/cursor-runner.js +3 -3
  8. package/dist/{agents-D3PU4UCP.js → agents-4BBCKITL.js} +20 -18
  9. package/dist/{agents-KU4QPB3Y.js → agents-XAKSP653.js} +18 -16
  10. package/dist/{app-settings-EQQZQNYD.js → app-settings-EHMXHNG5.js} +1 -1
  11. package/dist/{app-settings-NI4X5HW3.js → app-settings-MR2U6AXN.js} +1 -1
  12. package/dist/{chunk-K5XSTHHP.js → chunk-2IXKTAIT.js} +2 -2
  13. package/dist/{chunk-YNTXWFXT.js → chunk-36J3IZBS.js} +12 -12
  14. package/dist/{chunk-IJMUYHPT.js → chunk-3E4NOIXN.js} +3 -3
  15. package/dist/chunk-4BXRRHDC.js +139 -0
  16. package/dist/{chunk-5MGLNVNK.js → chunk-5HPMKLJ7.js} +2 -2
  17. package/dist/{chunk-VOIWX5HA.js → chunk-7UUILVMV.js} +1 -1
  18. package/dist/chunk-AF2DMY3K.js +295 -0
  19. package/dist/{chunk-5QOLFOAX.js → chunk-AFLNFGGB.js} +1 -1
  20. package/dist/{chunk-5T4YWFLD.js → chunk-AHH5USEA.js} +2 -2
  21. package/dist/{chunk-6CVVNAIU.js → chunk-B3BPLPKQ.js} +2 -2
  22. package/dist/{chunk-LKVP7JCB.js → chunk-C546EOEF.js} +35 -315
  23. package/dist/{chunk-QPBR5SAL.js → chunk-EBGJXOXT.js} +27 -129
  24. package/dist/{chunk-RFPMTOV2.js → chunk-G74TSBJ3.js} +6 -6
  25. package/dist/{chunk-L65YT2SC.js → chunk-GBAACE3C.js} +7 -7
  26. package/dist/{chunk-VQEARG5H.js → chunk-GU6DT6NO.js} +5 -5
  27. package/dist/{chunk-S2OOM7AU.js → chunk-K6IOJI3L.js} +1 -1
  28. package/dist/{chunk-UFJLNCOF.js → chunk-LUQ7MIVD.js} +8 -298
  29. package/dist/{chunk-U6QDXT4K.js → chunk-MIVX7QKI.js} +1 -1
  30. package/dist/{chunk-WRIMAEF2.js → chunk-MVZO7QZ2.js} +12 -12
  31. package/dist/{chunk-LS4FFCPL.js → chunk-MYJYINTS.js} +3 -3
  32. package/dist/{chunk-DEJALWKM.js → chunk-NFPWLDCH.js} +5 -5
  33. package/dist/chunk-NXXQFLNQ.js +300 -0
  34. package/dist/{chunk-KLAQ4G34.js → chunk-O4324MXE.js} +4 -4
  35. package/dist/chunk-OH4EN323.js +89 -0
  36. package/dist/{chunk-ZGAMETNF.js → chunk-V3BSO2O6.js} +4 -4
  37. package/dist/{chunk-Z3EE3PUZ.js → chunk-VNCPRMIK.js} +10 -300
  38. package/dist/chunk-W2KZTDET.js +302 -0
  39. package/dist/{chunk-TMM4FEZ5.js → chunk-Y67TBJD5.js} +3 -3
  40. package/dist/{chunk-XSDCLM3F.js → chunk-YSLCWCMJ.js} +1 -1
  41. package/dist/{conductor-FOKYVMUE.js → conductor-5MNGC25D.js} +6 -6
  42. package/dist/{conductor-KDUL6AMD.js → conductor-UFJXJPTF.js} +7 -7
  43. package/dist/{coordinator-prompt-GU5PGLG6.js → coordinator-prompt-5Q66Y5KW.js} +4 -4
  44. package/dist/{coordinator-prompt-YARYX53V.js → coordinator-prompt-BYPEW6DE.js} +4 -4
  45. package/dist/{global-workspace-SMCPOWE5.js → global-workspace-BTH2YGDZ.js} +4 -4
  46. package/dist/{global-workspace-C5HMC66E.js → global-workspace-YKOYXSB2.js} +4 -4
  47. package/dist/index.cjs +618 -323
  48. package/dist/index.d.cts +42 -10
  49. package/dist/index.d.ts +42 -10
  50. package/dist/index.js +494 -281
  51. package/dist/mcp/run-stdio.cjs +602 -225
  52. package/dist/mcp/run-stdio.js +334 -188
  53. package/dist/optional-cli-6SW4OOX3.js +23 -0
  54. package/dist/optional-cli-FRUZSZ3U.js +98 -0
  55. package/dist/{orchestrator-2UAVOXTN.js → orchestrator-IG4VU7MT.js} +13 -11
  56. package/dist/{orchestrator-NWKE56BW.js → orchestrator-MKF3YBNK.js} +10 -8
  57. package/dist/{thread-store-7XBOUQ5K.js → thread-store-DPKESDFR.js} +1 -1
  58. package/dist/{thread-store-ZQZDREVH.js → thread-store-X6S2GIR5.js} +1 -1
  59. package/dist/{workspaces-KHQ5ETSQ.js → workspaces-ELO2YVTU.js} +4 -4
  60. package/dist/{workspaces-DQMDCRB2.js → workspaces-RFD6I4FM.js} +4 -4
  61. package/dist/{worktree-NKLNVNXX.js → worktree-ADVQ6X6C.js} +3 -3
  62. package/dist/{worktree-YTZC3UQN.js → worktree-TN7DZDJZ.js} +3 -3
  63. package/package.json +1 -1
  64. /package/dist/{chunk-N5UGX3JL.js → chunk-QB5MDOHL.js} +0 -0
  65. /package/dist/{chunk-JPH7PYSK.js → chunk-YRXV3E7J.js} +0 -0
@@ -16,12 +16,12 @@ import {
16
16
  toAbleTimeIssueInfo,
17
17
  updateAbleTimeTask,
18
18
  verifyAbleTimeConnection
19
- } from "./chunk-LS4FFCPL.js";
20
- import "./chunk-6CVVNAIU.js";
21
- import "./chunk-DEJALWKM.js";
19
+ } from "./chunk-MYJYINTS.js";
20
+ import "./chunk-B3BPLPKQ.js";
21
+ import "./chunk-NFPWLDCH.js";
22
22
  import "./chunk-JAT3JFOS.js";
23
23
  import "./chunk-6K64FJDD.js";
24
- import "./chunk-YNTXWFXT.js";
24
+ import "./chunk-36J3IZBS.js";
25
25
  import "./chunk-77WWLBCI.js";
26
26
  import "./chunk-4TR3HZFT.js";
27
27
  import "./chunk-WDRMZKVB.js";
@@ -18,12 +18,12 @@ import {
18
18
  toAbleTimeIssueInfo,
19
19
  updateAbleTimeTask,
20
20
  verifyAbleTimeConnection
21
- } from "./chunk-TMM4FEZ5.js";
22
- import "./chunk-5T4YWFLD.js";
23
- import "./chunk-VQEARG5H.js";
21
+ } from "./chunk-Y67TBJD5.js";
22
+ import "./chunk-AHH5USEA.js";
23
+ import "./chunk-GU6DT6NO.js";
24
24
  import "./chunk-2GPQZZLY.js";
25
25
  import "./chunk-N2WW62LF.js";
26
- import "./chunk-WRIMAEF2.js";
26
+ import "./chunk-MVZO7QZ2.js";
27
27
  import "./chunk-NSTQ6QKD.js";
28
28
  import "./chunk-WWUABK6B.js";
29
29
  import "./chunk-FJZWM2ON.js";
@@ -3,7 +3,7 @@
3
3
  import {
4
4
  DEFAULT_ABLETIME_HOST,
5
5
  normalizeAbleTimeHost
6
- } from "./chunk-VQEARG5H.js";
6
+ } from "./chunk-GU6DT6NO.js";
7
7
  import {
8
8
  httpFetch
9
9
  } from "./chunk-2GPQZZLY.js";
@@ -12,7 +12,7 @@ import {
12
12
  getAbleTimeHost,
13
13
  loadAppSettings,
14
14
  saveAbleTimeConnection
15
- } from "./chunk-WRIMAEF2.js";
15
+ } from "./chunk-MVZO7QZ2.js";
16
16
  import "./chunk-NSTQ6QKD.js";
17
17
  import "./chunk-WWUABK6B.js";
18
18
  import "./chunk-FJZWM2ON.js";
@@ -288,7 +288,7 @@ async function startAbleTimeOAuth(opts) {
288
288
  persistAbleTimeTokens(data, { host });
289
289
  const token = data.access_token.trim();
290
290
  try {
291
- const { getAbleTimeOrientation } = await import("./abletime-4CH2IOX5.js");
291
+ const { getAbleTimeOrientation } = await import("./abletime-VFKYNSJT.js");
292
292
  const orientation = await getAbleTimeOrientation({ token, host });
293
293
  return saveAbleTimeConnection({
294
294
  accessToken: token,
@@ -20,10 +20,10 @@ import {
20
20
  parseAbleTimeOAuthCallbackUrl,
21
21
  resolveAbleTimeOAuthHost,
22
22
  startAbleTimeOAuth
23
- } from "./chunk-IJMUYHPT.js";
24
- import "./chunk-DEJALWKM.js";
23
+ } from "./chunk-3E4NOIXN.js";
24
+ import "./chunk-NFPWLDCH.js";
25
25
  import "./chunk-JAT3JFOS.js";
26
- import "./chunk-YNTXWFXT.js";
26
+ import "./chunk-36J3IZBS.js";
27
27
  import "./chunk-77WWLBCI.js";
28
28
  import "./chunk-4TR3HZFT.js";
29
29
  import "./chunk-WDRMZKVB.js";
@@ -5,10 +5,10 @@ import {
5
5
  callAbleTimeRestTool,
6
6
  looksLikeAbleTimeUlid,
7
7
  textFromAbleTimeDoc
8
- } from "./chunk-6CVVNAIU.js";
9
- import "./chunk-DEJALWKM.js";
8
+ } from "./chunk-B3BPLPKQ.js";
9
+ import "./chunk-NFPWLDCH.js";
10
10
  import "./chunk-JAT3JFOS.js";
11
- import "./chunk-YNTXWFXT.js";
11
+ import "./chunk-36J3IZBS.js";
12
12
  import "./chunk-77WWLBCI.js";
13
13
  import "./chunk-4TR3HZFT.js";
14
14
  import "./chunk-WDRMZKVB.js";
@@ -7,10 +7,10 @@ import {
7
7
  callAbleTimeRestTool,
8
8
  looksLikeAbleTimeUlid,
9
9
  textFromAbleTimeDoc
10
- } from "./chunk-5T4YWFLD.js";
11
- import "./chunk-VQEARG5H.js";
10
+ } from "./chunk-AHH5USEA.js";
11
+ import "./chunk-GU6DT6NO.js";
12
12
  import "./chunk-2GPQZZLY.js";
13
- import "./chunk-WRIMAEF2.js";
13
+ import "./chunk-MVZO7QZ2.js";
14
14
  import "./chunk-NSTQ6QKD.js";
15
15
  import "./chunk-WWUABK6B.js";
16
16
  import "./chunk-FJZWM2ON.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  clipAgentEventForEmit,
4
4
  sideboardCursorRpcTools
5
- } from "../chunk-S2OOM7AU.js";
5
+ } from "../chunk-K6IOJI3L.js";
6
6
  import {
7
7
  createAgentStreamCoalescer
8
8
  } from "../chunk-AXQ4ZWHK.js";
@@ -17,12 +17,12 @@ import {
17
17
  fetchCursorTurnCostUsd,
18
18
  importCursorSdk,
19
19
  resolveCursorSdkRoot
20
- } from "../chunk-VOIWX5HA.js";
20
+ } from "../chunk-7UUILVMV.js";
21
21
  import {
22
22
  TOOL_RESULT_STORE_MAX_CHARS,
23
23
  formatUnknownDetail,
24
24
  looksLikeCursorStreamCutOff
25
- } from "../chunk-U6QDXT4K.js";
25
+ } from "../chunk-MIVX7QKI.js";
26
26
  import "../chunk-6K64FJDD.js";
27
27
  import {
28
28
  cursorSdkStoreDir
@@ -19,40 +19,42 @@ import {
19
19
  formatClaudeUsageResetClock,
20
20
  formatClaudeUsageTooltip,
21
21
  getAdapter,
22
- getAgentSetupInfo,
23
22
  getClaudePlanUsage,
24
23
  hottestClaudeWindow,
25
- installAgent,
26
- installNpmGlobalPackage,
27
24
  isCursorApiKeyConfigured,
28
25
  isCursorAutoModel,
29
26
  isSessionQuotaLimit,
30
- listAgentSetupInfo,
31
27
  listBrightsyChatTargets,
32
28
  listCodexModels,
33
29
  listCursorModels,
34
30
  listModelsForAgent,
35
31
  listOpencodeModels,
36
- loginAgent,
37
- loginManagedAccount,
38
32
  mcpStatusThinkingFromClaudeInit,
39
- openInSystemTerminal,
40
33
  opencodeAdapter,
41
34
  parseClaudeUsagePayload,
42
35
  parseSessionQuotaResetAt,
43
36
  permissionMode,
44
37
  planModeTurnInstruction,
45
- prepareTerminalCommand,
46
38
  resolveCursorModelId,
39
+ resolveQuotaFallbackAgent
40
+ } from "./chunk-VNCPRMIK.js";
41
+ import "./chunk-VGNLMGBK.js";
42
+ import "./chunk-YSLCWCMJ.js";
43
+ import {
44
+ getAgentSetupInfo,
45
+ installAgent,
46
+ installNpmGlobalPackage,
47
+ listAgentSetupInfo,
48
+ loginAgent,
49
+ loginManagedAccount,
50
+ openInSystemTerminal,
51
+ prepareTerminalCommand,
47
52
  resolveLoginCommand,
48
- resolveQuotaFallbackAgent,
49
53
  whichOnPath
50
- } from "./chunk-Z3EE3PUZ.js";
51
- import "./chunk-VGNLMGBK.js";
52
- import "./chunk-XSDCLM3F.js";
53
- import "./chunk-ZGAMETNF.js";
54
- import "./chunk-K5XSTHHP.js";
55
- import "./chunk-N5UGX3JL.js";
54
+ } from "./chunk-NXXQFLNQ.js";
55
+ import "./chunk-V3BSO2O6.js";
56
+ import "./chunk-2IXKTAIT.js";
57
+ import "./chunk-QB5MDOHL.js";
56
58
  import "./chunk-2P4XKWV2.js";
57
59
  import "./chunk-33KDPEK4.js";
58
60
  import "./chunk-JAT3JFOS.js";
@@ -64,8 +66,8 @@ import {
64
66
  preferredCursorCostCents,
65
67
  resolveCursorSdkRoot,
66
68
  turnCostUsdFromCursorUsage
67
- } from "./chunk-VOIWX5HA.js";
68
- import "./chunk-U6QDXT4K.js";
69
+ } from "./chunk-7UUILVMV.js";
70
+ import "./chunk-MIVX7QKI.js";
69
71
  import "./chunk-6K64FJDD.js";
70
72
  import "./chunk-UWQ6UCIB.js";
71
73
  import {
@@ -85,7 +87,7 @@ import {
85
87
  assertOrchestratorCapableAgent,
86
88
  coerceOrchestratorAgent,
87
89
  isOrchestratorCapableAgent
88
- } from "./chunk-YNTXWFXT.js";
90
+ } from "./chunk-36J3IZBS.js";
89
91
  import "./chunk-77WWLBCI.js";
90
92
  import "./chunk-4TR3HZFT.js";
91
93
  import "./chunk-WDRMZKVB.js";
@@ -23,25 +23,18 @@ import {
23
23
  formatClaudeUsageResetClock,
24
24
  formatClaudeUsageTooltip,
25
25
  getAdapter,
26
- getAgentSetupInfo,
27
26
  getClaudePlanUsage,
28
27
  hottestClaudeWindow,
29
- installAgent,
30
- installNpmGlobalPackage,
31
28
  isCursorApiKeyConfigured,
32
29
  isCursorAutoModel,
33
30
  isCursorSdkInstalled,
34
31
  isSessionQuotaLimit,
35
- listAgentSetupInfo,
36
32
  listBrightsyChatTargets,
37
33
  listCodexModels,
38
34
  listCursorModels,
39
35
  listModelsForAgent,
40
36
  listOpencodeModels,
41
- loginAgent,
42
- loginManagedAccount,
43
37
  mcpStatusThinkingFromClaudeInit,
44
- openInSystemTerminal,
45
38
  opencodeAdapter,
46
39
  parseClaudeUsagePayload,
47
40
  parseCursorRunnerLine,
@@ -49,20 +42,29 @@ import {
49
42
  permissionMode,
50
43
  planModeTurnInstruction,
51
44
  preferredCursorCostCents,
52
- prepareTerminalCommand,
53
45
  resolveCursorModelId,
54
46
  resolveCursorSdkRoot,
55
- resolveLoginCommand,
56
47
  resolveQuotaFallbackAgent,
57
- turnCostUsdFromCursorUsage,
48
+ turnCostUsdFromCursorUsage
49
+ } from "./chunk-LUQ7MIVD.js";
50
+ import {
51
+ getAgentSetupInfo,
52
+ installAgent,
53
+ installNpmGlobalPackage,
54
+ listAgentSetupInfo,
55
+ loginAgent,
56
+ loginManagedAccount,
57
+ openInSystemTerminal,
58
+ prepareTerminalCommand,
59
+ resolveLoginCommand,
58
60
  whichOnPath
59
- } from "./chunk-UFJLNCOF.js";
61
+ } from "./chunk-W2KZTDET.js";
60
62
  import "./chunk-7IAMHN2N.js";
61
63
  import "./chunk-PXMLMBMI.js";
62
64
  import "./chunk-2GPQZZLY.js";
63
- import "./chunk-5QOLFOAX.js";
64
- import "./chunk-KLAQ4G34.js";
65
- import "./chunk-5MGLNVNK.js";
65
+ import "./chunk-AFLNFGGB.js";
66
+ import "./chunk-O4324MXE.js";
67
+ import "./chunk-5HPMKLJ7.js";
66
68
  import "./chunk-N2WW62LF.js";
67
69
  import "./chunk-DD67JWTN.js";
68
70
  import {
@@ -81,12 +83,12 @@ import {
81
83
  assertOrchestratorCapableAgent,
82
84
  coerceOrchestratorAgent,
83
85
  isOrchestratorCapableAgent
84
- } from "./chunk-WRIMAEF2.js";
86
+ } from "./chunk-MVZO7QZ2.js";
85
87
  import "./chunk-NSTQ6QKD.js";
86
88
  import "./chunk-WWUABK6B.js";
87
89
  import "./chunk-FJZWM2ON.js";
88
90
  import "./chunk-UN5Q7POQ.js";
89
- import "./chunk-JPH7PYSK.js";
91
+ import "./chunk-YRXV3E7J.js";
90
92
  import "./chunk-4RZRHTSZ.js";
91
93
  import "./chunk-KGZBYWZ3.js";
92
94
  import "./chunk-H5XL4KUS.js";
@@ -107,7 +107,7 @@ import {
107
107
  updateProjectProfileSettings,
108
108
  usageOnLimit,
109
109
  writeViewerContext
110
- } from "./chunk-WRIMAEF2.js";
110
+ } from "./chunk-MVZO7QZ2.js";
111
111
  import "./chunk-NSTQ6QKD.js";
112
112
  import "./chunk-WWUABK6B.js";
113
113
  import "./chunk-FJZWM2ON.js";
@@ -105,7 +105,7 @@ import {
105
105
  updateProjectProfileSettings,
106
106
  usageOnLimit,
107
107
  writeViewerContext
108
- } from "./chunk-YNTXWFXT.js";
108
+ } from "./chunk-36J3IZBS.js";
109
109
  import "./chunk-77WWLBCI.js";
110
110
  import "./chunk-4TR3HZFT.js";
111
111
  import "./chunk-WDRMZKVB.js";
@@ -4,7 +4,7 @@ import {
4
4
  normalizeTakenSlug,
5
5
  normalizeWorktreePath,
6
6
  takenSlugsFromThread
7
- } from "./chunk-N5UGX3JL.js";
7
+ } from "./chunk-QB5MDOHL.js";
8
8
  import {
9
9
  ensureWorktreeSideboardIgnored
10
10
  } from "./chunk-2P4XKWV2.js";
@@ -24,7 +24,7 @@ import {
24
24
  import {
25
25
  getGithubGitAuthMode,
26
26
  getGithubPat
27
- } from "./chunk-YNTXWFXT.js";
27
+ } from "./chunk-36J3IZBS.js";
28
28
  import {
29
29
  worktreesRoot
30
30
  } from "./chunk-EHT2DRT4.js";
@@ -2237,22 +2237,21 @@ function applyAppEnvironment(target = process.env, settings = loadAppSettings())
2237
2237
  applyOptionalServiceTokens(target, settings.integrations);
2238
2238
  return target;
2239
2239
  }
2240
- function fillEnvGap(target, key, value) {
2240
+ function assignEnv(target, key, value) {
2241
2241
  const v = value?.trim();
2242
2242
  if (!key || !v) return;
2243
- if (target[key] == null || target[key] === "") target[key] = v;
2243
+ target[key] = v;
2244
+ }
2245
+ function scrubPosthogAgentEnv(target) {
2246
+ delete target.POSTHOG_PERSONAL_API_KEY;
2247
+ delete target.POSTHOG_HOST;
2244
2248
  }
2245
2249
  function applyOptionalServiceTokens(target, integrations) {
2246
- fillEnvGap(target, "VERCEL_TOKEN", integrations.vercelToken);
2247
- fillEnvGap(target, "SUPABASE_ACCESS_TOKEN", integrations.supabaseAccessToken);
2248
- fillEnvGap(target, "POSTHOG_PERSONAL_API_KEY", integrations.posthogPersonalApiKey);
2249
- fillEnvGap(
2250
- target,
2251
- "POSTHOG_HOST",
2252
- integrations.posthogPersonalApiKey ? integrations.posthogHost || "https://us.posthog.com" : void 0
2253
- );
2254
- fillEnvGap(target, "SENTRY_AUTH_TOKEN", integrations.sentryAuthToken);
2255
- fillEnvGap(
2250
+ assignEnv(target, "VERCEL_TOKEN", integrations.vercelToken);
2251
+ assignEnv(target, "SUPABASE_ACCESS_TOKEN", integrations.supabaseAccessToken);
2252
+ scrubPosthogAgentEnv(target);
2253
+ assignEnv(target, "SENTRY_AUTH_TOKEN", integrations.sentryAuthToken);
2254
+ assignEnv(
2256
2255
  target,
2257
2256
  "SENTRY_URL",
2258
2257
  integrations.sentryAuthToken ? integrations.sentryHost || "https://sentry.io" : void 0
@@ -2267,6 +2266,7 @@ function childEnvWithAppSettings(extra) {
2267
2266
  if (v != null) env[k] = v;
2268
2267
  }
2269
2268
  }
2269
+ scrubPosthogAgentEnv(env);
2270
2270
  return env;
2271
2271
  }
2272
2272
  function harnessEnvKey(harness) {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DEFAULT_ABLETIME_HOST,
3
3
  normalizeAbleTimeHost
4
- } from "./chunk-DEJALWKM.js";
4
+ } from "./chunk-NFPWLDCH.js";
5
5
  import {
6
6
  httpFetch
7
7
  } from "./chunk-JAT3JFOS.js";
@@ -10,7 +10,7 @@ import {
10
10
  getAbleTimeHost,
11
11
  loadAppSettings,
12
12
  saveAbleTimeConnection
13
- } from "./chunk-YNTXWFXT.js";
13
+ } from "./chunk-36J3IZBS.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-I4RODUKT.js");
283
+ const { getAbleTimeOrientation } = await import("./abletime-4WJUVE64.js");
284
284
  const orientation = await getAbleTimeOrientation({ token, host });
285
285
  return saveAbleTimeConnection({
286
286
  accessToken: token,
@@ -0,0 +1,139 @@
1
+ #!/usr/bin/env node
2
+
3
+
4
+ // src/integrations/optional-services.ts
5
+ var OPTIONAL_SERVICE_IDS = ["vercel", "supabase", "posthog", "sentry"];
6
+ var OPTIONAL_SERVICES = [
7
+ {
8
+ id: "vercel",
9
+ label: "Vercel",
10
+ hint: "Deploys and project settings. Agents use the `vercel` CLI (`VERCEL_TOKEN`).",
11
+ tokenPlaceholder: "token from vercel.com/account/tokens",
12
+ tokenDocs: "https://vercel.com/account/tokens",
13
+ envKey: "VERCEL_TOKEN",
14
+ cli: "vercel",
15
+ npmPackage: "vercel"
16
+ },
17
+ {
18
+ id: "supabase",
19
+ label: "Supabase",
20
+ hint: "Database and project management. Agents use the `supabase` CLI (`SUPABASE_ACCESS_TOKEN`).",
21
+ tokenPlaceholder: "sbp_\u2026",
22
+ tokenDocs: "https://supabase.com/dashboard/account/tokens",
23
+ envKey: "SUPABASE_ACCESS_TOKEN",
24
+ cli: "supabase",
25
+ npmPackage: "supabase"
26
+ },
27
+ {
28
+ id: "posthog",
29
+ label: "PostHog",
30
+ hint: "Product analytics. Agents call `posthog_api` on the Sideboard MCP server.",
31
+ tokenPlaceholder: "phx_\u2026",
32
+ tokenDocs: "https://app.posthog.com/settings/user-api-keys",
33
+ envKey: "POSTHOG_PERSONAL_API_KEY",
34
+ hostEnvKey: "POSTHOG_HOST",
35
+ defaultHost: "https://us.posthog.com",
36
+ hostPlaceholder: "https://us.posthog.com"
37
+ },
38
+ {
39
+ id: "sentry",
40
+ label: "Sentry",
41
+ hint: "Error tracking. Agents use `sentry-cli` (`SENTRY_AUTH_TOKEN`).",
42
+ tokenPlaceholder: "sntrys_\u2026 or auth token",
43
+ tokenDocs: "https://sentry.io/settings/account/api/auth-tokens/",
44
+ envKey: "SENTRY_AUTH_TOKEN",
45
+ cli: "sentry-cli",
46
+ npmPackage: "@sentry/cli",
47
+ hostEnvKey: "SENTRY_URL",
48
+ defaultHost: "https://sentry.io",
49
+ hostPlaceholder: "https://sentry.io"
50
+ }
51
+ ];
52
+ function optionalServiceSpec(id) {
53
+ const spec = OPTIONAL_SERVICES.find((s) => s.id === id);
54
+ if (!spec) throw new Error(`Unknown optional service: ${id}`);
55
+ return spec;
56
+ }
57
+ function isOptionalServiceId(value) {
58
+ return typeof value === "string" && OPTIONAL_SERVICE_IDS.includes(value);
59
+ }
60
+ function normalizeServiceOrigin(raw, fallback) {
61
+ const trimmed = raw?.trim() || fallback;
62
+ try {
63
+ const url = new URL(trimmed.includes("://") ? trimmed : `https://${trimmed}`);
64
+ if (url.protocol !== "http:" && url.protocol !== "https:") return fallback;
65
+ return `${url.protocol}//${url.host}`;
66
+ } catch {
67
+ return fallback;
68
+ }
69
+ }
70
+ function optionalServiceConnected(id, integrations) {
71
+ if (id === "vercel") return Boolean(integrations.vercelToken?.trim());
72
+ if (id === "supabase") return Boolean(integrations.supabaseAccessToken?.trim());
73
+ if (id === "posthog") return Boolean(integrations.posthogPersonalApiKey?.trim());
74
+ return Boolean(integrations.sentryAuthToken?.trim());
75
+ }
76
+ function connectedOptionalServices(integrations) {
77
+ return OPTIONAL_SERVICES.filter((spec) => optionalServiceConnected(spec.id, integrations));
78
+ }
79
+ function cliPresencePhrase(spec, cli) {
80
+ if (!spec.cli || !cli || !(spec.id in cli)) return "";
81
+ return cli[spec.id] ? " (installed)" : " (not installed \u2014 ask the user to press Install CLI in Settings \u2192 Connectors)";
82
+ }
83
+ function connectorDirectiveLine(spec, cli) {
84
+ const extras = spec.hostEnvKey ? ` / \`${spec.hostEnvKey}\`` : "";
85
+ if (spec.cli) {
86
+ return `- ${spec.label}: use \`${spec.cli}\` (\`${spec.envKey}\`${extras})${cliPresencePhrase(spec, cli)}. Do not add a ${spec.label} MCP.`;
87
+ }
88
+ return `- ${spec.label}: call \`posthog_api\`. Path must start with \`/api/\`. GET is the default. POST \`/api/projects/:id/query/\` or \`/api/environments/:id/query/\` is a read and does not need \`write=true\`. Other POST and PATCH require \`write=true\` only when the user asked to change data. Do not read the API key from the environment. Do not add a ${spec.label} MCP.`;
89
+ }
90
+ function connectorReminderBit(spec, cli) {
91
+ if (!spec.cli) return `${spec.label}: \`posthog_api\``;
92
+ const presence = cliPresencePhrase(spec, cli);
93
+ return `${spec.label}: \`${spec.cli}\`${presence}`;
94
+ }
95
+ function formatOptionalServicesDirective(integrations, cli) {
96
+ const connected = connectedOptionalServices(integrations);
97
+ if (connected.length === 0) return null;
98
+ const cliConnected = connected.some((spec) => spec.cli);
99
+ const lines = [
100
+ cliConnected ? "Optional connectors (connected \u2014 CLI tokens are already in this process env):" : "Optional connectors (connected):",
101
+ ...connected.map((spec) => connectorDirectiveLine(spec, cli)),
102
+ cliConnected ? "If a connector MCP is listed but needsAuth or returns unauthorized, do not sign in to that MCP. CLI tokens are already in this process. Do not read a PostHog key from the environment." : "If a connector MCP is listed but needsAuth or returns unauthorized, do not sign in to that MCP. Do not read a PostHog key from the environment.",
103
+ "Do not add a vendor MCP. When a binary is missing, ask the user to press Install CLI in Settings \u2192 Connectors.",
104
+ "When you shell a connector CLI, write bulky output to `.context/cli/` and read a slice."
105
+ ];
106
+ return lines.join("\n");
107
+ }
108
+ function formatOptionalServicesReminder(integrations, cli) {
109
+ const connected = connectedOptionalServices(integrations);
110
+ if (connected.length === 0) return null;
111
+ const bits = connected.map((spec) => connectorReminderBit(spec, cli)).join(". ");
112
+ const tokenBit = connected.some((spec) => spec.cli) ? "CLI tokens are already in this process. " : "";
113
+ return `Settings \u2192 Connectors: ${tokenBit}${bits}. If a connector MCP needsAuth or is unauthorized, ignore it and use the CLI or \`posthog_api\`. Do not add vendor MCPs. Do not read a PostHog key from the environment. Shell dumps from those CLIs go in \`.context/cli/\` \u2014 read a slice.`;
114
+ }
115
+ async function connectedCliPresence(integrations) {
116
+ const ids = connectedOptionalServices(integrations).filter((spec) => spec.cli).map((spec) => spec.id);
117
+ if (ids.length === 0) return void 0;
118
+ try {
119
+ const { optionalCliPresence } = await import("./optional-cli-FRUZSZ3U.js");
120
+ return await optionalCliPresence(ids);
121
+ } catch {
122
+ return void 0;
123
+ }
124
+ }
125
+ async function formatOptionalServicesDirectiveForTurn(integrations) {
126
+ return formatOptionalServicesDirective(integrations, await connectedCliPresence(integrations));
127
+ }
128
+ async function formatOptionalServicesReminderForTurn(integrations) {
129
+ return formatOptionalServicesReminder(integrations, await connectedCliPresence(integrations));
130
+ }
131
+
132
+ export {
133
+ OPTIONAL_SERVICES,
134
+ optionalServiceSpec,
135
+ isOptionalServiceId,
136
+ normalizeServiceOrigin,
137
+ formatOptionalServicesDirectiveForTurn,
138
+ formatOptionalServicesReminderForTurn
139
+ };
@@ -19,14 +19,14 @@ import {
19
19
  import {
20
20
  getGithubGitAuthMode,
21
21
  getGithubPat
22
- } from "./chunk-WRIMAEF2.js";
22
+ } from "./chunk-MVZO7QZ2.js";
23
23
  import {
24
24
  allocateTeamName,
25
25
  listThreads,
26
26
  normalizeTakenSlug,
27
27
  normalizeWorktreePath,
28
28
  takenSlugsFromThread
29
- } from "./chunk-JPH7PYSK.js";
29
+ } from "./chunk-YRXV3E7J.js";
30
30
  import {
31
31
  worktreesRoot
32
32
  } from "./chunk-H5XL4KUS.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  extractJsonErrorMessage,
3
3
  formatUnknownDetail
4
- } from "./chunk-U6QDXT4K.js";
4
+ } from "./chunk-MIVX7QKI.js";
5
5
  import {
6
6
  npmGlobalNodeModules,
7
7
  run