@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
@@ -21,23 +21,19 @@ import {
21
21
  looksLikeSkillBody,
22
22
  skillCommandFromBody,
23
23
  withEventParentId
24
- } from "./chunk-5QOLFOAX.js";
24
+ } from "./chunk-AFLNFGGB.js";
25
25
  import {
26
26
  isOrchestratorThread
27
- } from "./chunk-KLAQ4G34.js";
27
+ } from "./chunk-O4324MXE.js";
28
28
  import {
29
29
  codexUnattendedGitConfigArgs,
30
30
  mergeAgentGitAuthEnv,
31
31
  resolveAgentGitAuthEnv,
32
32
  resolveCodexGitWritableRoots
33
- } from "./chunk-5MGLNVNK.js";
33
+ } from "./chunk-5HPMKLJ7.js";
34
34
  import {
35
- enrichPathWithNpmGlobalBin,
36
- isConductorBundledCli,
37
35
  npmGlobalNodeModules,
38
- resolveCommandBinarySync,
39
- run,
40
- withExportedPath
36
+ run
41
37
  } from "./chunk-2UG25RMK.js";
42
38
  import {
43
39
  claudeChromeEnabled,
@@ -47,7 +43,7 @@ import {
47
43
  loadAppSettings,
48
44
  resolveAgentExecutable,
49
45
  resolveClaudeExecutable
50
- } from "./chunk-WRIMAEF2.js";
46
+ } from "./chunk-MVZO7QZ2.js";
51
47
  import {
52
48
  isElectronLikeCommand,
53
49
  unwrapStrippedElectronLaunch,
@@ -973,7 +969,8 @@ var SIDEBOARD_ARTIFACT_MCP_ALLOWED_TOOLS = [
973
969
  "mcp__sideboard__create_schedule",
974
970
  "mcp__sideboard__update_schedule",
975
971
  "mcp__sideboard__delete_schedule",
976
- "mcp__sideboard__run_schedule"
972
+ "mcp__sideboard__run_schedule",
973
+ "mcp__sideboard__posthog_api"
977
974
  ];
978
975
  var SIDEBOARD_GITHUB_MCP_ALLOWED_TOOLS = ["mcp__sideboard__github_*"];
979
976
  var SIDEBOARD_LINEAR_MCP_ALLOWED_TOOLS = ["mcp__sideboard__linear_*"];
@@ -2018,7 +2015,7 @@ var claudeAdapter = {
2018
2015
  );
2019
2016
  }
2020
2017
  const mode = permissionMode(thread);
2021
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-SMCPOWE5.js");
2018
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-BTH2YGDZ.js");
2022
2019
  const isOrchestrator = isOrchestratorThread2(thread);
2023
2020
  const rpc = worktreeAgentRpc(isOrchestrator);
2024
2021
  const injectedServers = await buildInjectedMcpServers({
@@ -4293,283 +4290,6 @@ async function getClaudePlanUsage(opts = {}) {
4293
4290
  return inflight;
4294
4291
  }
4295
4292
 
4296
- // src/agents/install.ts
4297
- import { existsSync as existsSync17 } from "fs";
4298
- var SETUP = {
4299
- claude: {
4300
- agent: "claude",
4301
- kind: "cli",
4302
- summary: "Install the Claude Code CLI, then complete login in a terminal.",
4303
- docsUrl: "https://code.claude.com/docs/en/install",
4304
- installCommand: "npm install -g @anthropic-ai/claude-code",
4305
- loginCommand: "claude auth login",
4306
- npmPackage: "@anthropic-ai/claude-code",
4307
- updateArgs: ["update"]
4308
- },
4309
- codex: {
4310
- agent: "codex",
4311
- kind: "cli",
4312
- summary: "Install the Codex CLI, then run login in a terminal.",
4313
- docsUrl: "https://github.com/openai/codex",
4314
- installCommand: "npm install -g @openai/codex",
4315
- loginCommand: "codex login",
4316
- npmPackage: "@openai/codex",
4317
- updateArgs: ["update"]
4318
- },
4319
- opencode: {
4320
- agent: "opencode",
4321
- kind: "cli",
4322
- summary: "Install OpenCode (curl installer or npm), then authenticate providers.",
4323
- docsUrl: "https://opencode.ai/docs",
4324
- // Prefer the official installer; npm package name is opencode-ai.
4325
- installCommand: "curl -fsSL https://opencode.ai/install | bash",
4326
- loginCommand: "opencode auth login",
4327
- npmPackage: "opencode-ai@latest",
4328
- updateArgs: ["upgrade"]
4329
- },
4330
- cursor: {
4331
- agent: "cursor",
4332
- kind: "cli",
4333
- summary: "Install (or update) @cursor/sdk with npm \u2014 Sideboard does not pin it in the app. Then add a CURSOR_API_KEY.",
4334
- docsUrl: "https://www.npmjs.com/package/@cursor/sdk",
4335
- installCommand: "npm install -g @cursor/sdk",
4336
- loginCommand: null,
4337
- npmPackage: "@cursor/sdk"
4338
- },
4339
- brightsy: {
4340
- agent: "brightsy",
4341
- kind: "cli",
4342
- summary: "Install (or update) the Brightsy CLI with npm, then run `brightsy login`.",
4343
- docsUrl: "https://www.npmjs.com/package/@brightsy/cli",
4344
- installCommand: "npm install -g @brightsy/cli",
4345
- loginCommand: "brightsy login",
4346
- npmPackage: "@brightsy/cli"
4347
- }
4348
- };
4349
- var CLI_BIN = {
4350
- claude: "claude",
4351
- codex: "codex",
4352
- opencode: "opencode",
4353
- brightsy: "brightsy"
4354
- };
4355
- function getAgentSetupInfo(agent) {
4356
- return SETUP[agent];
4357
- }
4358
- function listAgentSetupInfo() {
4359
- return Object.values(SETUP);
4360
- }
4361
- var CLI_LOGIN_AGENTS = /* @__PURE__ */ new Set([
4362
- "claude",
4363
- "codex",
4364
- "opencode",
4365
- "brightsy"
4366
- ]);
4367
- function resolveLoginCommand(agent) {
4368
- const info = getAgentSetupInfo(agent);
4369
- if (!info.loginCommand) return null;
4370
- if (!CLI_LOGIN_AGENTS.has(agent)) return info.loginCommand;
4371
- const exe = resolveAgentExecutable(agent);
4372
- return info.loginCommand.replace(/^\S+/, exe);
4373
- }
4374
- async function prepareTerminalCommand(command) {
4375
- enrichPathWithNpmGlobalBin();
4376
- const trimmed = command.trim();
4377
- if (!trimmed) return trimmed;
4378
- if (/^(export\s+PATH=|PATH=)/.test(trimmed)) return trimmed;
4379
- const match = /^(\S+)(\s[\s\S]*)?$/.exec(trimmed);
4380
- const bin = match?.[1];
4381
- let whichPath = null;
4382
- if (bin && !bin.includes("/") && !bin.includes("\\")) {
4383
- const which = await run("which", [bin], { reject: false, timeoutMs: 3e3 });
4384
- whichPath = which.exitCode === 0 ? which.stdout.trim() : null;
4385
- }
4386
- const resolved = resolveCommandBinarySync(trimmed, whichPath);
4387
- return withExportedPath(resolved, process.env.PATH ?? "");
4388
- }
4389
- async function openInSystemTerminal(command) {
4390
- const trimmed = (await prepareTerminalCommand(command)).trim();
4391
- if (!trimmed) throw new Error("Command is empty");
4392
- if (process.platform === "darwin") {
4393
- const escaped = trimmed.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
4394
- const script = `tell application "Terminal" to do script "${escaped}"`;
4395
- const result = await run("osascript", ["-e", script], { reject: false });
4396
- if (result.exitCode !== 0) {
4397
- throw new Error(result.stderr.trim() || result.stdout.trim() || "Failed to open Terminal");
4398
- }
4399
- await run("osascript", ["-e", 'tell application "Terminal" to activate'], {
4400
- reject: false
4401
- });
4402
- return;
4403
- }
4404
- if (process.platform === "win32") {
4405
- const result = await run(
4406
- "cmd.exe",
4407
- ["/c", "start", "cmd.exe", "/k", trimmed],
4408
- { reject: false }
4409
- );
4410
- if (result.exitCode !== 0) {
4411
- throw new Error(result.stderr.trim() || result.stdout.trim() || "Failed to open cmd");
4412
- }
4413
- return;
4414
- }
4415
- const candidates = [
4416
- { file: "gnome-terminal", args: ["--", "bash", "-lc", `${trimmed}; exec bash`] },
4417
- { file: "x-terminal-emulator", args: ["-e", "bash", "-lc", `${trimmed}; exec bash`] },
4418
- { file: "konsole", args: ["-e", "bash", "-lc", `${trimmed}; exec bash`] },
4419
- { file: "xterm", args: ["-e", "bash", "-lc", `${trimmed}; exec bash`] }
4420
- ];
4421
- for (const c of candidates) {
4422
- const which = await run("which", [c.file], { reject: false });
4423
- if (which.exitCode !== 0 || !which.stdout.trim()) continue;
4424
- const result = await run(c.file, c.args, { reject: false });
4425
- if (result.exitCode === 0) return;
4426
- }
4427
- throw new Error(
4428
- `No terminal found to run: ${trimmed}. Install gnome-terminal (or similar), or run the command manually.`
4429
- );
4430
- }
4431
- async function whichOnPath(bin) {
4432
- const which = await run("which", [bin], { reject: false, timeoutMs: 3e3 });
4433
- if (which.exitCode !== 0) return null;
4434
- return which.stdout.trim().split(/\r?\n/).find(Boolean) ?? null;
4435
- }
4436
- async function installNpmGlobalPackage(opts) {
4437
- enrichPathWithNpmGlobalBin();
4438
- const result = await run("npm", ["install", "-g", opts.npmPackage], { reject: false });
4439
- const ok = result.exitCode === 0;
4440
- if (!ok) {
4441
- try {
4442
- await openInSystemTerminal(opts.installCommand);
4443
- return {
4444
- ok: false,
4445
- openedTerminal: true,
4446
- command: opts.installCommand,
4447
- exitCode: result.exitCode,
4448
- stdout: result.stdout,
4449
- stderr: result.stderr,
4450
- message: `npm install failed (exit ${result.exitCode}). Opened Terminal with: ${opts.installCommand}`
4451
- };
4452
- } catch {
4453
- return {
4454
- ok: false,
4455
- command: opts.installCommand,
4456
- exitCode: result.exitCode,
4457
- stdout: result.stdout,
4458
- stderr: result.stderr,
4459
- message: result.stderr.trim() || result.stdout.trim() || `npm install failed (exit ${result.exitCode})`
4460
- };
4461
- }
4462
- }
4463
- enrichPathWithNpmGlobalBin();
4464
- const binPath = opts.cliBin ? await whichOnPath(opts.cliBin) : null;
4465
- return {
4466
- ok: true,
4467
- command: opts.installCommand,
4468
- exitCode: 0,
4469
- stdout: result.stdout,
4470
- stderr: result.stderr,
4471
- // Library-only packages (`@cursor/sdk`) have no CLI to look for.
4472
- message: !opts.cliBin ? `Installed ${opts.npmPackage}` : binPath ? `Installed ${opts.npmPackage} \u2192 ${binPath}` : `Installed ${opts.npmPackage} (CLI not yet on PATH)`
4473
- };
4474
- }
4475
- async function resolveExistingCli(agent) {
4476
- if (agent === "cursor") return null;
4477
- const exe = resolveAgentExecutable(agent);
4478
- if ((exe.includes("/") || exe.includes("\\")) && existsSync17(exe)) return exe;
4479
- enrichPathWithNpmGlobalBin();
4480
- return whichOnPath(CLI_BIN[agent]);
4481
- }
4482
- async function runVendorUpdate(existing, updateArgs) {
4483
- const result = await run(existing, updateArgs, {
4484
- reject: false,
4485
- timeoutMs: 12e4
4486
- });
4487
- const command = `${existing} ${updateArgs.join(" ")}`;
4488
- const ok = result.exitCode === 0;
4489
- const detail = result.stdout.trim() || result.stderr.trim() || `exit ${result.exitCode}`;
4490
- return {
4491
- ok,
4492
- command,
4493
- exitCode: result.exitCode,
4494
- stdout: result.stdout,
4495
- stderr: result.stderr,
4496
- message: ok ? isConductorBundledCli(existing) ? `Updated Conductor\u2019s CLI at ${existing}. ${detail}` : `Updated ${command}. ${detail}` : `Update failed (${command}): ${detail}`
4497
- };
4498
- }
4499
- function isCurlInstaller(command) {
4500
- return /curl\s| \|\s*bash/.test(command);
4501
- }
4502
- async function installAgent(agent) {
4503
- const info = getAgentSetupInfo(agent);
4504
- if (info.kind === "bundled-sdk" || info.kind === "api-key") {
4505
- return {
4506
- ok: true,
4507
- message: info.summary
4508
- };
4509
- }
4510
- if (!info.installCommand) {
4511
- return { ok: false, message: `No install command for ${agent}` };
4512
- }
4513
- const existing = await resolveExistingCli(agent);
4514
- if (existing && info.updateArgs?.length) {
4515
- return runVendorUpdate(existing, info.updateArgs);
4516
- }
4517
- if (info.npmPackage && !isCurlInstaller(info.installCommand)) {
4518
- const cliBin = agent === "cursor" ? null : CLI_BIN[agent];
4519
- return installNpmGlobalPackage({
4520
- npmPackage: info.npmPackage,
4521
- installCommand: info.installCommand,
4522
- cliBin
4523
- });
4524
- }
4525
- await openInSystemTerminal(info.installCommand);
4526
- return {
4527
- ok: true,
4528
- openedTerminal: true,
4529
- command: info.installCommand,
4530
- message: `Opened Terminal to run: ${info.installCommand}`
4531
- };
4532
- }
4533
- async function loginAgent(agent) {
4534
- const info = getAgentSetupInfo(agent);
4535
- const loginCommand = resolveLoginCommand(agent);
4536
- if (!loginCommand) {
4537
- return {
4538
- ok: true,
4539
- message: info.kind === "bundled-sdk" || info.kind === "api-key" ? info.summary : `No login command for ${agent}`
4540
- };
4541
- }
4542
- const prepared = await prepareTerminalCommand(loginCommand);
4543
- await openInSystemTerminal(prepared);
4544
- return {
4545
- ok: true,
4546
- openedTerminal: true,
4547
- command: prepared,
4548
- message: `Opened Terminal to run: ${prepared}`
4549
- };
4550
- }
4551
- async function loginManagedAccount(accountId) {
4552
- const { loadAppSettings: loadAppSettings2 } = await import("./app-settings-EQQZQNYD.js");
4553
- const { loginEnvPrefix } = await import("./managed-accounts-46A4KRUE.js");
4554
- const account = loadAppSettings2().accounts.accounts.find((a) => a.id === accountId);
4555
- if (!account) {
4556
- return { ok: false, message: `Account not found: ${accountId}` };
4557
- }
4558
- const loginCommand = resolveLoginCommand(account.kind);
4559
- if (!loginCommand) {
4560
- return { ok: false, message: `No login command for ${account.kind}` };
4561
- }
4562
- const prepared = await prepareTerminalCommand(loginCommand);
4563
- const prefixed = `${loginEnvPrefix(account)} && ${prepared}`;
4564
- await openInSystemTerminal(prefixed);
4565
- return {
4566
- ok: true,
4567
- openedTerminal: true,
4568
- command: prefixed,
4569
- message: `Opened Terminal to run: ${prefixed}`
4570
- };
4571
- }
4572
-
4573
4293
  // src/agents/index.ts
4574
4294
  var adapters = {
4575
4295
  claude: claudeAdapter,
@@ -4640,16 +4360,6 @@ export {
4640
4360
  formatClaudeUsageOverLimitConfirm,
4641
4361
  formatClaudeUsageOverLimitWait,
4642
4362
  getClaudePlanUsage,
4643
- getAgentSetupInfo,
4644
- listAgentSetupInfo,
4645
- resolveLoginCommand,
4646
- prepareTerminalCommand,
4647
- openInSystemTerminal,
4648
- whichOnPath,
4649
- installNpmGlobalPackage,
4650
- installAgent,
4651
- loginAgent,
4652
- loginManagedAccount,
4653
4363
  getAdapter,
4654
4364
  allAdapters
4655
4365
  };
@@ -269,7 +269,7 @@ function humanizeAgentFailDetail(detail) {
269
269
  return "Cursor local file search failed (ripgrep / resource_exhausted). Wait a minute and retry; if it keeps happening, check Cursor usage.";
270
270
  }
271
271
  if (looksLikeCodexMcpError(raw)) {
272
- return `${raw} \u2014 skip that vendor MCP and continue (PostHog: Settings \u2192 Connectors + HTTP API).`;
272
+ return `${raw} \u2014 skip that vendor MCP and continue (PostHog: Settings \u2192 Connectors and posthog_api).`;
273
273
  }
274
274
  if (/invalid user api key|invalid api key|not logged in|not authenticated|unauthorized|authentication|please run.*login|codex login|claude auth|cursor api/.test(
275
275
  lower
@@ -2211,22 +2211,21 @@ function applyAppEnvironment(target = process.env, settings = loadAppSettings())
2211
2211
  applyOptionalServiceTokens(target, settings.integrations);
2212
2212
  return target;
2213
2213
  }
2214
- function fillEnvGap(target, key, value) {
2214
+ function assignEnv(target, key, value) {
2215
2215
  const v = value?.trim();
2216
2216
  if (!key || !v) return;
2217
- if (target[key] == null || target[key] === "") target[key] = v;
2217
+ target[key] = v;
2218
+ }
2219
+ function scrubPosthogAgentEnv(target) {
2220
+ delete target.POSTHOG_PERSONAL_API_KEY;
2221
+ delete target.POSTHOG_HOST;
2218
2222
  }
2219
2223
  function applyOptionalServiceTokens(target, integrations) {
2220
- fillEnvGap(target, "VERCEL_TOKEN", integrations.vercelToken);
2221
- fillEnvGap(target, "SUPABASE_ACCESS_TOKEN", integrations.supabaseAccessToken);
2222
- fillEnvGap(target, "POSTHOG_PERSONAL_API_KEY", integrations.posthogPersonalApiKey);
2223
- fillEnvGap(
2224
- target,
2225
- "POSTHOG_HOST",
2226
- integrations.posthogPersonalApiKey ? integrations.posthogHost || "https://us.posthog.com" : void 0
2227
- );
2228
- fillEnvGap(target, "SENTRY_AUTH_TOKEN", integrations.sentryAuthToken);
2229
- fillEnvGap(
2224
+ assignEnv(target, "VERCEL_TOKEN", integrations.vercelToken);
2225
+ assignEnv(target, "SUPABASE_ACCESS_TOKEN", integrations.supabaseAccessToken);
2226
+ scrubPosthogAgentEnv(target);
2227
+ assignEnv(target, "SENTRY_AUTH_TOKEN", integrations.sentryAuthToken);
2228
+ assignEnv(
2230
2229
  target,
2231
2230
  "SENTRY_URL",
2232
2231
  integrations.sentryAuthToken ? integrations.sentryHost || "https://sentry.io" : void 0
@@ -2241,6 +2240,7 @@ function childEnvWithAppSettings(extra) {
2241
2240
  if (v != null) env[k] = v;
2242
2241
  }
2243
2242
  }
2243
+ scrubPosthogAgentEnv(env);
2244
2244
  return env;
2245
2245
  }
2246
2246
  function harnessEnvKey(harness) {
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  abletimeRestUrl,
3
3
  textFromAbleTimeDoc
4
- } from "./chunk-6CVVNAIU.js";
4
+ } from "./chunk-B3BPLPKQ.js";
5
5
  import {
6
6
  assertAbleTimeCredential,
7
7
  callAbleTimeTool,
8
8
  normalizeAbleTimeHost,
9
9
  rewriteAbleTimeError
10
- } from "./chunk-DEJALWKM.js";
10
+ } from "./chunk-NFPWLDCH.js";
11
11
  import {
12
12
  httpFetch
13
13
  } from "./chunk-JAT3JFOS.js";
@@ -20,7 +20,7 @@ import {
20
20
  getAbleTimeHost,
21
21
  isAbleTimeConnected,
22
22
  saveAbleTimeConnection
23
- } from "./chunk-YNTXWFXT.js";
23
+ } from "./chunk-36J3IZBS.js";
24
24
 
25
25
  // src/integrations/issue-attachments.ts
26
26
  import { existsSync, mkdirSync, writeFileSync } from "fs";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  getAbleTimeHost,
6
6
  isAbleTimeConnected
7
- } from "./chunk-YNTXWFXT.js";
7
+ } from "./chunk-36J3IZBS.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-C2HN2Q6F.js").then((m) => m.ensureAbleTimeAccessToken());
156
+ const rawToken = opts?.token ?? await import("./abletime-oauth-ICMB2XV2.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-C2HN2Q6F.js").then((m) => m.ensureAbleTimeAccessToken());
227
+ const rawToken = opts?.token ?? await import("./abletime-oauth-ICMB2XV2.js").then((m) => m.ensureAbleTimeAccessToken());
228
228
  if (rawToken && ableTimeUsesRest(rawToken)) {
229
- const { callAbleTimeRestTool } = await import("./abletime-rest-E4LBRFLM.js");
229
+ const { callAbleTimeRestTool } = await import("./abletime-rest-HFMRTUDT.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-E4LBRFLM.js");
245
+ const { callAbleTimeRestTool } = await import("./abletime-rest-HFMRTUDT.js");
246
246
  return callAbleTimeRestTool(name, args, { ...opts, token: rawToken });
247
247
  }
248
248
  throw err instanceof Error ? new Error(rewriteAbleTimeError(err.message)) : err;