@sideboard-ai/core 0.1.191 → 0.1.193

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 (68) hide show
  1. package/dist/{abletime-JFMBCSIQ.js → abletime-QHKWGTBY.js} +4 -3
  2. package/dist/{abletime-53T7G667.js → abletime-UX53JTIH.js} +4 -3
  3. package/dist/agents/cursor-runner.js +4 -4
  4. package/dist/{agents-DTPVTDB5.js → agents-MN4GSQTL.js} +19 -17
  5. package/dist/{agents-5OBZETUV.js → agents-OK5VD25T.js} +10 -8
  6. package/dist/{app-settings-663VQWUV.js → app-settings-LO7UFHQ6.js} +5 -2
  7. package/dist/{app-settings-74HBAAH7.js → app-settings-QYLNKRK4.js} +5 -2
  8. package/dist/branch-prefix-7F37FIPX.js +10 -0
  9. package/dist/branch-prefix-EVW2KHGQ.js +12 -0
  10. package/dist/{caffeinate-hold-SK2QISPE.js → caffeinate-hold-22VFDPSO.js} +2 -2
  11. package/dist/{caffeinate-hold-DBKMRZZO.js → caffeinate-hold-OK4JJ5PP.js} +2 -2
  12. package/dist/{chunk-GPSIZGEZ.js → chunk-3DX2T2KR.js} +181 -172
  13. package/dist/{chunk-HVIEYTUK.js → chunk-3OHR73VK.js} +1 -1
  14. package/dist/{chunk-VIODP5PT.js → chunk-4OVCJPVI.js} +13 -11
  15. package/dist/{chunk-UBQIELFS.js → chunk-4QJRH5DL.js} +1 -1
  16. package/dist/{chunk-AO35MGOE.js → chunk-4TYXWPAJ.js} +1 -1
  17. package/dist/chunk-64QSHOKV.js +869 -0
  18. package/dist/{chunk-FY64F2ZQ.js → chunk-7AJ7OZZF.js} +4 -4
  19. package/dist/{chunk-WLPXZFRE.js → chunk-7J72QJOM.js} +1 -1
  20. package/dist/chunk-7SNJMKD6.js +20 -0
  21. package/dist/{chunk-WXKXSZN4.js → chunk-BIKCWYRP.js} +16 -873
  22. package/dist/{chunk-J7LQVLFQ.js → chunk-BWRS6GAS.js} +19 -1
  23. package/dist/{chunk-GOZ6T3AG.js → chunk-CJFBSQIB.js} +1 -1
  24. package/dist/{chunk-GBWKMWUQ.js → chunk-EBPBGQ4P.js} +13 -13
  25. package/dist/{chunk-JTJHOYCU.js → chunk-EQNRWDLN.js} +10 -4
  26. package/dist/{chunk-5RRAKGPK.js → chunk-EQXXGOMD.js} +192 -182
  27. package/dist/{chunk-XXEIF2IL.js → chunk-HIX2VDRE.js} +13 -11
  28. package/dist/chunk-ILWQT2UN.js +55 -0
  29. package/dist/chunk-JTWKGOFI.js +23 -0
  30. package/dist/{chunk-TCQAFTSV.js → chunk-KJBYIIJU.js} +1 -1
  31. package/dist/{chunk-OKZFTOM2.js → chunk-KORE4WOF.js} +19 -1
  32. package/dist/{chunk-OLDZXO53.js → chunk-MQC2VA5U.js} +14 -14
  33. package/dist/{chunk-4M2AK3O5.js → chunk-O4BMPY5Y.js} +1 -1
  34. package/dist/chunk-PBEPPXMY.js +57 -0
  35. package/dist/{chunk-IEEAVWAP.js → chunk-PE337IM2.js} +7 -7
  36. package/dist/chunk-RCWHL4TK.js +866 -0
  37. package/dist/{chunk-EFVFB2AH.js → chunk-WFUDY6PC.js} +12 -5
  38. package/dist/{chunk-XBLN52RZ.js → chunk-XPKKCFRT.js} +9 -866
  39. package/dist/{chunk-OCQPTUR7.js → chunk-YWI3IBP2.js} +1 -1
  40. package/dist/{connected-teams-WOYCH7FR.js → connected-teams-PU4AMFNA.js} +2 -2
  41. package/dist/{connected-teams-ON2KIKQX.js → connected-teams-SYQQGCXD.js} +2 -2
  42. package/dist/{coordinator-prompt-LWKOL3AZ.js → coordinator-prompt-GXJIPWNA.js} +7 -5
  43. package/dist/{coordinator-prompt-MSC44OOM.js → coordinator-prompt-WB65HIZ3.js} +9 -7
  44. package/dist/{cursor-recover-NDMLLNYX.js → cursor-recover-DTQAUDGO.js} +2 -2
  45. package/dist/{cursor-recover-L5MD6MBO.js → cursor-recover-TXVTLAMA.js} +1 -1
  46. package/dist/github-DWROJOB7.js +11 -0
  47. package/dist/github-IIF7AQNO.js +9 -0
  48. package/dist/{global-workspace-6G5JJH2E.js → global-workspace-BZ6V6TEX.js} +7 -5
  49. package/dist/{global-workspace-XATJTV3N.js → global-workspace-MMK5UFUZ.js} +9 -7
  50. package/dist/index.cjs +332 -205
  51. package/dist/index.d.cts +53 -9
  52. package/dist/index.d.ts +53 -9
  53. package/dist/index.js +147 -136
  54. package/dist/mcp/run-stdio.cjs +316 -201
  55. package/dist/mcp/run-stdio.js +84 -85
  56. package/dist/{orchestrator-F3CXDBZB.js → orchestrator-4KI6VIFG.js} +16 -12
  57. package/dist/{orchestrator-2X6LYBQI.js → orchestrator-SFOT6Q6F.js} +15 -11
  58. package/dist/{paths-RRCLNSJB.js → paths-C2VERLAE.js} +1 -1
  59. package/dist/{paths-53TLA7VQ.js → paths-LOXCISLX.js} +1 -1
  60. package/dist/{thread-store-ZL6GDIDP.js → thread-store-CO77HV2K.js} +2 -2
  61. package/dist/{thread-store-RXXNSRVO.js → thread-store-M4B52FUS.js} +2 -2
  62. package/dist/{workspaces-LMFCRXTT.js → workspaces-ACMZMKPD.js} +7 -5
  63. package/dist/{workspaces-FWKPWSXV.js → workspaces-KPJS7GLY.js} +9 -7
  64. package/dist/{worktree-7LOSSD7G.js → worktree-6IEVF3GN.js} +15 -12
  65. package/dist/{worktree-LPWTX2NA.js → worktree-UW6DNBIE.js} +20 -17
  66. package/dist/worktree-labels-3XDS6O3U.js +22 -0
  67. package/dist/worktree-labels-PEDOJBMD.js +24 -0
  68. package/package.json +1 -1
@@ -1,13 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import {
4
- allocateTeamName,
5
4
  ensureGhPreferOrigin,
6
5
  resolveGithubRepoSlug,
7
- resolveRepoRoot,
8
- takenSlugsFromThread,
9
- teamSlugFromName
10
- } from "./chunk-XBLN52RZ.js";
6
+ resolveRepoRoot
7
+ } from "./chunk-XPKKCFRT.js";
11
8
  import {
12
9
  ATTACHMENTS_DIR,
13
10
  attachmentsGitignoreBody
@@ -17,7 +14,12 @@ import {
17
14
  listThreads,
18
15
  updateThread,
19
16
  writeThread
20
- } from "./chunk-GOZ6T3AG.js";
17
+ } from "./chunk-CJFBSQIB.js";
18
+ import {
19
+ allocateTeamName,
20
+ takenSlugsFromThread,
21
+ teamSlugFromName
22
+ } from "./chunk-64QSHOKV.js";
21
23
  import {
22
24
  assertOrchestratorCapableAgent,
23
25
  formatAccountProfilePlaybookLine,
@@ -30,12 +32,12 @@ import {
30
32
  resolveThreadDefaults,
31
33
  resolveViewerProfile,
32
34
  resolveViewerProfileForRepo
33
- } from "./chunk-OKZFTOM2.js";
35
+ } from "./chunk-KORE4WOF.js";
34
36
  import {
35
37
  appDataDir,
36
38
  globalAgentCwd,
37
39
  sideboardReposDir
38
- } from "./chunk-JTJHOYCU.js";
40
+ } from "./chunk-EQNRWDLN.js";
39
41
 
40
42
  // src/store/workspaces.ts
41
43
  import { existsSync as existsSync2, mkdirSync as mkdirSync3, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "fs";
@@ -350,8 +352,8 @@ var COORDINATOR_TOOL_PLAYBOOK = [
350
352
  "- start_board_card \u2014 same as create_thread for a ticket/PR/named branch (attaches issue text when resolvable). Then send_to_thread.",
351
353
  "- fork_worktree \u2014 fork a worktree chat into a NEW git worktree + chat (transcript attached); optional agent; leave model unset (Auto) unless you have a reason. Not for orchestration chats.",
352
354
  "- fork_chat \u2014 fork a worktree chat (same worktree tab) OR a Global orchestration chat (new orchestration tab); optional agent; leave model unset (Auto) unless you have a reason. Remote coordinators: use this to continue another orchestration chat on a different agent after session limits.",
353
- "- send_to_thread \u2014 queue a prompt (start/continue a chat turn). force_stop: true only to replace a wrong in-flight request \u2014 never to check in, resume after a halt notice, or because wait_for_turn returned stillRunning (that kills the child mid-thought)",
354
- "- wait_for_turn / get_turn_result \u2014 wait for and read the agent reply (includes last-turn usage / costUsd when the child agent reported it). wait_for_turn returns within ~45s even if the child is still working (MCP clients kill longer tool calls). stillRunning is the source of truth \u2014 if it is false, the child is not working; do not tell the user it is running or \u201Cwaiting for a gate,\u201D even if status still says running/queued. If stillRunning is true, progress is a live snapshot of tools/thinking \u2014 call wait_for_turn again. status=queued with no lastActivityAt means the child has not started yet (concurrency cap) \u2014 keep waiting; do not force_stop or send a check-in. Do not send \u201Care you stuck?\u201D or assume a hang while lastActivityAt is recent. If stillRunning stays true across many waits with the same lastActivityAt, the child is stuck \u2014 tell the user; do not invent a gate. On status error, lastError (and text) is the failure \u2014 switch agent, tell the user, or retry; do not treat empty text as success. On status stopped or broken (or incomplete=true), the child was interrupted or died \u2014 resume with send_to_thread or tell the user; never treat stopped as a finished turn. Sideboard also injects a notice into this chat when a child stops unexpectedly.",
355
+ "- send_to_thread \u2014 steer a prompt (start/continue a chat turn; Settings \u2192 Follow-up, default steer: interrupt and start now). force_stop: true only to replace a wrong in-flight request and clear the inbox \u2014 never to check in, resume after a halt notice, or because wait_for_turn returned stillRunning (that interrupts the child mid-thought)",
356
+ "- wait_for_turn / get_turn_result \u2014 wait for and read the agent reply (includes last-turn usage / costUsd when the child agent reported it). wait_for_turn returns within ~45s even if the child is still working (MCP clients kill longer tool calls). stillRunning is the source of truth \u2014 if it is false, the child is not working; do not tell the user it is running or \u201Cwaiting for a gate,\u201D even if status still says running/queued. If stillRunning is true, progress is a live snapshot of tools/thinking \u2014 call wait_for_turn again. status=queued with no lastActivityAt means the child has not started yet (concurrency cap) \u2014 keep waiting; do not force_stop or send_to_thread a check-in (that steers / interrupts). Do not send \u201Care you stuck?\u201D or assume a hang while lastActivityAt is recent. If stillRunning stays true across many waits with the same lastActivityAt, the child is stuck \u2014 tell the user; do not invent a gate. On status error, lastError (and text) is the failure \u2014 switch agent, tell the user, or retry; do not treat empty text as success. On status stopped or broken (or incomplete=true), the child was interrupted or died \u2014 resume with send_to_thread or tell the user; never treat stopped as a finished turn. Sideboard also injects a notice into this chat when a child stops unexpectedly.",
355
357
  "- stop_thread \u2014 force-stop: kill in-flight turn AND clear queued prompts (do not leave stale queue after an interrupt)",
356
358
  "- archive_thread / restore_thread \u2014 archive (tears down worktree when last tab) or restore",
357
359
  "Setup / run:",
@@ -361,7 +363,7 @@ var COORDINATOR_TOOL_PLAYBOOK = [
361
363
  "- get_diff \u2014 compact diff summary",
362
364
  "- get_pr_checks \u2014 snapshot of a worktree thread's PR checks (null = no PR). Use this to inspect status. If the user gave a goal, the worktree agent watches with `gh pr checks --watch` \u2014 do not poll for the human.",
363
365
  '- request_review \u2014 open a Review chat tab on a worktree thread (attaches .claude/skills/review/SKILL.md when present, else .context/review.md copied from .sideboard/review.md / stock; sends "Review changes in this workspace."); then wait_for_turn (loop while stillRunning) / get_turn_result on the returned id. The review stays in that chat so they can read it and type next steps \u2014 do not tell the child to comment or update the PR or ticket.',
364
- "- ask_git \u2014 commit & push, open a draft PR, mark ready for review, resolve conflicts, or merge. When the worktree is clean, Sideboard pushes / opens the PR itself. When dirty, it queues the worktree agent \u2014 then wait_for_turn (loop while stillRunning). Prefer this over paraphrasing. If ask_git / get_thread lastError says the GraphQL/PR body is too long, the branch is already pushed \u2014 send_to_thread so the worktree agent runs `gh pr create --body-file` with a short description. Do not invent SSH or auth failures from that error. If the user gave a goal (Greptile 5/5, CI green), send_to_thread that goal so the worktree agent enters the watch-fix-push loop \u2014 do not tell the human to poll.",
366
+ "- ask_git \u2014 commit & push, open a draft PR, mark ready for review, resolve conflicts, or merge \u2014 same prompts as the desktop git buttons (Resolve, Create PR, \u2026). Always steers the worktree agent; then wait_for_turn (loop while stillRunning). Prefer this over paraphrasing. If the user gave a goal (Greptile 5/5, CI green), send_to_thread that goal so the worktree agent enters the watch-fix-push loop \u2014 do not tell the human to poll.",
365
367
  '- Merge (`ask_git` action=merge / send_to_thread "Merge PR.") only when the user explicitly asked to merge that PR. Do not merge because the work looks done, CI is green, or a typical flow includes it.',
366
368
  '- Or send_to_thread with those exact phrases: "Commit and push.", "Commit, push, and open a draft PR.", "Ready for review.", "Merge the remote branch (main) into your branch and resolve conflicts. Then, commit and push your changes.", "Merge PR." (draft PRs: `gh pr create --draft -R <origin-owner/name>` using the workspace `github:` slug \u2014 never upstream). Never run git/gh from this orchestration cwd, and never merge the PR yourself.',
367
369
  "Process guides:",
@@ -0,0 +1,55 @@
1
+ import {
2
+ run
3
+ } from "./chunk-UFHNSFAS.js";
4
+
5
+ // src/integrations/github.ts
6
+ async function getGitHubStatus() {
7
+ const which = await run("which", ["gh"], { reject: false });
8
+ if (which.exitCode !== 0 || !which.stdout.trim()) {
9
+ return {
10
+ connected: false,
11
+ login: null,
12
+ hosts: [],
13
+ reason: "gh CLI not found on PATH"
14
+ };
15
+ }
16
+ const loginResult = await run(
17
+ "gh",
18
+ ["api", "user", "--jq", ".login"],
19
+ { reject: false }
20
+ );
21
+ if (loginResult.exitCode === 0 && loginResult.stdout.trim()) {
22
+ return {
23
+ connected: true,
24
+ login: loginResult.stdout.trim(),
25
+ hosts: ["github.com"],
26
+ reason: null
27
+ };
28
+ }
29
+ const status = await run("gh", ["auth", "status"], { reject: false });
30
+ const text = `${status.stdout}
31
+ ${status.stderr}`;
32
+ const loginMatch = text.match(/Logged in to ([^\s]+) account (\S+)/i) ?? text.match(/Logged in to ([^\s]+) as (\S+)/i);
33
+ if (loginMatch) {
34
+ return {
35
+ connected: true,
36
+ login: loginMatch[2].replace(/['"]/g, ""),
37
+ hosts: [loginMatch[1]],
38
+ reason: null
39
+ };
40
+ }
41
+ return {
42
+ connected: false,
43
+ login: null,
44
+ hosts: [],
45
+ reason: status.stderr.trim() || status.stdout.trim() || "Not logged in to GitHub (run: gh auth login)"
46
+ };
47
+ }
48
+ async function refreshGitHubAuth() {
49
+ return getGitHubStatus();
50
+ }
51
+
52
+ export {
53
+ getGitHubStatus,
54
+ refreshGitHubAuth
55
+ };
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env node
2
+
3
+
4
+ // src/git/branch-prefix.ts
5
+ function sanitizeGitBranchPrefix(raw) {
6
+ const first = (raw ?? "").trim().replace(/^\/+|\/+$/g, "").split("/")[0] ?? "";
7
+ const slug = first.toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 39);
8
+ return slug || null;
9
+ }
10
+ function resolveGitBranchPrefix(opts) {
11
+ return sanitizeGitBranchPrefix(opts.setting) ?? sanitizeGitBranchPrefix(opts.githubLogin);
12
+ }
13
+ function examplePrefixedBranch(prefix, ticket) {
14
+ const head = sanitizeGitBranchPrefix(prefix);
15
+ const slug = ticket?.trim() ? `${ticket.trim()}-eng-fix-thing` : "bb-1234-eng-fix-thing";
16
+ return head ? `${head}/${slug}` : slug;
17
+ }
18
+
19
+ export {
20
+ sanitizeGitBranchPrefix,
21
+ resolveGitBranchPrefix,
22
+ examplePrefixedBranch
23
+ };
@@ -5,7 +5,7 @@ import {
5
5
  threadFilePath,
6
6
  threadLockPath,
7
7
  threadsDir
8
- } from "./chunk-EFVFB2AH.js";
8
+ } from "./chunk-WFUDY6PC.js";
9
9
 
10
10
  // src/store/thread-store.ts
11
11
  import { randomUUID } from "crypto";
@@ -9,7 +9,10 @@ import {
9
9
  } from "./chunk-KGZBYWZ3.js";
10
10
  import {
11
11
  appDataDir
12
- } from "./chunk-JTJHOYCU.js";
12
+ } from "./chunk-EQNRWDLN.js";
13
+ import {
14
+ sanitizeGitBranchPrefix
15
+ } from "./chunk-JTWKGOFI.js";
13
16
 
14
17
  // src/store/app-settings.ts
15
18
  import { randomUUID } from "crypto";
@@ -751,6 +754,10 @@ function normalizeAdvanced(raw) {
751
754
  if (typeof source.autoRenameBranch === "boolean") {
752
755
  out.autoRenameBranch = source.autoRenameBranch;
753
756
  }
757
+ if (typeof source.branchPrefix === "string") {
758
+ const prefix = sanitizeGitBranchPrefix(source.branchPrefix);
759
+ if (prefix) out.branchPrefix = prefix;
760
+ }
754
761
  if (typeof source.autoRunAfterSetup === "boolean") {
755
762
  out.autoRunAfterSetup = source.autoRunAfterSetup;
756
763
  }
@@ -1617,6 +1624,13 @@ function updateAdvancedSettings(patch) {
1617
1624
  if (typeof patch.autoRenameBranch === "boolean") {
1618
1625
  advanced.autoRenameBranch = patch.autoRenameBranch;
1619
1626
  }
1627
+ if (patch.branchPrefix === null || patch.branchPrefix === "") {
1628
+ delete advanced.branchPrefix;
1629
+ } else if (typeof patch.branchPrefix === "string") {
1630
+ const prefix = sanitizeGitBranchPrefix(patch.branchPrefix);
1631
+ if (prefix) advanced.branchPrefix = prefix;
1632
+ else delete advanced.branchPrefix;
1633
+ }
1620
1634
  if (typeof patch.autoRunAfterSetup === "boolean") {
1621
1635
  advanced.autoRunAfterSetup = patch.autoRunAfterSetup;
1622
1636
  }
@@ -1677,6 +1691,9 @@ function updateAdvancedSettings(patch) {
1677
1691
  function autoRenameBranchEnabled(settings = loadAppSettings()) {
1678
1692
  return settings.advanced.autoRenameBranch !== false;
1679
1693
  }
1694
+ function gitBranchPrefixSetting(settings = loadAppSettings()) {
1695
+ return sanitizeGitBranchPrefix(settings.advanced.branchPrefix);
1696
+ }
1680
1697
  function autoRunAfterSetupEnabled(settings = loadAppSettings()) {
1681
1698
  return Boolean(settings.advanced.autoRunAfterSetup);
1682
1699
  }
@@ -1891,6 +1908,7 @@ export {
1891
1908
  brightsyCloudConnectAgent,
1892
1909
  updateAdvancedSettings,
1893
1910
  autoRenameBranchEnabled,
1911
+ gitBranchPrefixSetting,
1894
1912
  autoRunAfterSetupEnabled,
1895
1913
  caffeinateWhileRunningEnabled,
1896
1914
  caffeinateWhileSlackListenEnabled,
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  isOrchestratorThread
3
- } from "./chunk-VIODP5PT.js";
3
+ } from "./chunk-4OVCJPVI.js";
4
4
  import {
5
5
  codexUnattendedGitConfigArgs,
6
6
  mergeAgentGitAuthEnv,
7
7
  resolveAgentGitAuthEnv,
8
8
  resolveCodexGitWritableRoots
9
- } from "./chunk-WXKXSZN4.js";
9
+ } from "./chunk-BIKCWYRP.js";
10
10
  import {
11
11
  applyConnectedTeamToCli,
12
12
  brightsyMcpServerName,
13
13
  ensureCliTeamTracked,
14
14
  ensureConnectedBrightsyTeamTokens
15
- } from "./chunk-IEEAVWAP.js";
15
+ } from "./chunk-PE337IM2.js";
16
16
  import {
17
17
  loadBrightsyConfig
18
18
  } from "./chunk-AN3THU7F.js";
@@ -29,7 +29,14 @@ import {
29
29
  packagedMcpStdioPath,
30
30
  parseCursorRunnerLine,
31
31
  resolveNodeLaunch
32
- } from "./chunk-FY64F2ZQ.js";
32
+ } from "./chunk-7AJ7OZZF.js";
33
+ import {
34
+ enrichPathWithNpmGlobalBin,
35
+ isConductorBundledCli,
36
+ resolveCommandBinarySync,
37
+ run,
38
+ withExportedPath
39
+ } from "./chunk-UFHNSFAS.js";
33
40
  import {
34
41
  claudeChromeEnabled,
35
42
  isAbleTimeConnected,
@@ -37,21 +44,14 @@ import {
37
44
  loadAppSettings,
38
45
  resolveAgentExecutable,
39
46
  resolveClaudeExecutable
40
- } from "./chunk-J7LQVLFQ.js";
47
+ } from "./chunk-BWRS6GAS.js";
41
48
  import {
42
49
  isElectronLikeCommand,
43
50
  unwrapStrippedElectronLaunch
44
51
  } from "./chunk-4TR3HZFT.js";
45
52
  import {
46
53
  appDataDir
47
- } from "./chunk-EFVFB2AH.js";
48
- import {
49
- enrichPathWithNpmGlobalBin,
50
- isConductorBundledCli,
51
- resolveCommandBinarySync,
52
- run,
53
- withExportedPath
54
- } from "./chunk-UFHNSFAS.js";
54
+ } from "./chunk-WFUDY6PC.js";
55
55
 
56
56
  // src/agents/brightsy.ts
57
57
  import { existsSync } from "fs";
@@ -1908,7 +1908,7 @@ var claudeAdapter = {
1908
1908
  );
1909
1909
  }
1910
1910
  const mode = permissionMode(thread);
1911
- const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-XATJTV3N.js");
1911
+ const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-MMK5UFUZ.js");
1912
1912
  const isOrchestrator = isOrchestratorThread2(thread);
1913
1913
  const injectedServers = await buildInjectedMcpServers({
1914
1914
  includeSideboard: true,
@@ -6,7 +6,7 @@ import {
6
6
  getAbleTimeHost,
7
7
  isAbleTimeConnected,
8
8
  saveAbleTimeConnection
9
- } from "./chunk-J7LQVLFQ.js";
9
+ } from "./chunk-BWRS6GAS.js";
10
10
 
11
11
  // src/integrations/abletime-mcp.ts
12
12
  var DEFAULT_ABLETIME_HOST = "https://track.abletime.com";
@@ -0,0 +1,57 @@
1
+ #!/usr/bin/env node
2
+
3
+ import {
4
+ run
5
+ } from "./chunk-FNQNJOHY.js";
6
+
7
+ // src/integrations/github.ts
8
+ async function getGitHubStatus() {
9
+ const which = await run("which", ["gh"], { reject: false });
10
+ if (which.exitCode !== 0 || !which.stdout.trim()) {
11
+ return {
12
+ connected: false,
13
+ login: null,
14
+ hosts: [],
15
+ reason: "gh CLI not found on PATH"
16
+ };
17
+ }
18
+ const loginResult = await run(
19
+ "gh",
20
+ ["api", "user", "--jq", ".login"],
21
+ { reject: false }
22
+ );
23
+ if (loginResult.exitCode === 0 && loginResult.stdout.trim()) {
24
+ return {
25
+ connected: true,
26
+ login: loginResult.stdout.trim(),
27
+ hosts: ["github.com"],
28
+ reason: null
29
+ };
30
+ }
31
+ const status = await run("gh", ["auth", "status"], { reject: false });
32
+ const text = `${status.stdout}
33
+ ${status.stderr}`;
34
+ const loginMatch = text.match(/Logged in to ([^\s]+) account (\S+)/i) ?? text.match(/Logged in to ([^\s]+) as (\S+)/i);
35
+ if (loginMatch) {
36
+ return {
37
+ connected: true,
38
+ login: loginMatch[2].replace(/['"]/g, ""),
39
+ hosts: [loginMatch[1]],
40
+ reason: null
41
+ };
42
+ }
43
+ return {
44
+ connected: false,
45
+ login: null,
46
+ hosts: [],
47
+ reason: status.stderr.trim() || status.stdout.trim() || "Not logged in to GitHub (run: gh auth login)"
48
+ };
49
+ }
50
+ async function refreshGitHubAuth() {
51
+ return getGitHubStatus();
52
+ }
53
+
54
+ export {
55
+ getGitHubStatus,
56
+ refreshGitHubAuth
57
+ };
@@ -5,12 +5,12 @@ import {
5
5
  refreshBrightsyAccessToken,
6
6
  saveBrightsyConfig
7
7
  } from "./chunk-AN3THU7F.js";
8
- import {
9
- appDataDir
10
- } from "./chunk-EFVFB2AH.js";
11
8
  import {
12
9
  run
13
10
  } from "./chunk-UFHNSFAS.js";
11
+ import {
12
+ appDataDir
13
+ } from "./chunk-WFUDY6PC.js";
14
14
 
15
15
  // src/brightsy/connected-teams.ts
16
16
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
@@ -18,7 +18,7 @@ import { join } from "path";
18
18
 
19
19
  // src/brightsy/accounts.ts
20
20
  async function loadConnectedTeams() {
21
- const { listConnectedBrightsyTeams: listConnectedBrightsyTeams2 } = await import("./connected-teams-ON2KIKQX.js");
21
+ const { listConnectedBrightsyTeams: listConnectedBrightsyTeams2 } = await import("./connected-teams-SYQQGCXD.js");
22
22
  return listConnectedBrightsyTeams2();
23
23
  }
24
24
  async function runBrightsyTeamsJson(args) {
@@ -47,14 +47,14 @@ async function listBrightsyAccounts() {
47
47
  async function getBrightsySession() {
48
48
  try {
49
49
  const { ensureBrightsyLocalConfigFresh: ensureBrightsyLocalConfigFresh2 } = await import("./oauth-6ZQ4Q4XN.js");
50
- const { ensureConnectedBrightsyTeamTokens: ensureConnectedBrightsyTeamTokens2 } = await import("./connected-teams-ON2KIKQX.js");
50
+ const { ensureConnectedBrightsyTeamTokens: ensureConnectedBrightsyTeamTokens2 } = await import("./connected-teams-SYQQGCXD.js");
51
51
  await ensureBrightsyLocalConfigFresh2();
52
52
  await ensureConnectedBrightsyTeamTokens2();
53
53
  loadBrightsyConfig();
54
54
  const data = await runBrightsyTeamsJson([]);
55
55
  const accounts = Array.isArray(data.teams) ? data.teams : [];
56
56
  const active = data.active ?? accounts.find((a) => a.active) ?? null;
57
- const { ensureCliTeamTracked: ensureCliTeamTracked2 } = await import("./connected-teams-ON2KIKQX.js");
57
+ const { ensureCliTeamTracked: ensureCliTeamTracked2 } = await import("./connected-teams-SYQQGCXD.js");
58
58
  const connectedTeams = ensureCliTeamTracked2(
59
59
  active ? { id: active.id, slug: active.slug, name: active.name } : void 0
60
60
  );
@@ -94,7 +94,7 @@ async function performBrightsyAccountSwitch(accountIdOrSlug) {
94
94
  return { cfg, target: data.active };
95
95
  }
96
96
  async function switchBrightsyAccount(accountIdOrSlug) {
97
- const { connectBrightsyTeam: connectBrightsyTeam2 } = await import("./connected-teams-ON2KIKQX.js");
97
+ const { connectBrightsyTeam: connectBrightsyTeam2 } = await import("./connected-teams-SYQQGCXD.js");
98
98
  await connectBrightsyTeam2(accountIdOrSlug);
99
99
  return getBrightsySession();
100
100
  }