@bugzy-ai/bugzy 1.3.0 → 1.4.0

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.
@@ -3853,13 +3853,22 @@ async function validateProjectStructure() {
3853
3853
  }
3854
3854
  async function checkToolAvailable(command) {
3855
3855
  const { spawn: spawn2 } = await import("child_process");
3856
+ const isWindows = process.platform === "win32";
3857
+ const checkCommand = isWindows ? "where" : "which";
3856
3858
  return new Promise((resolve) => {
3857
- const proc = spawn2("which", [command]);
3859
+ const proc = spawn2(checkCommand, [command], {
3860
+ shell: isWindows
3861
+ // Windows needs shell for 'where'
3862
+ });
3858
3863
  proc.on("close", (code) => {
3859
- resolve(code === 0);
3864
+ if (code !== 0) {
3865
+ console.warn(`Warning: Could not verify '${command}' is installed (${checkCommand} check failed). Continuing anyway...`);
3866
+ }
3867
+ resolve(true);
3860
3868
  });
3861
3869
  proc.on("error", () => {
3862
- resolve(false);
3870
+ console.warn(`Warning: Could not verify '${command}' is installed (${checkCommand} not available). Continuing anyway...`);
3871
+ resolve(true);
3863
3872
  });
3864
3873
  });
3865
3874
  }
@@ -3912,21 +3921,8 @@ async function startSession(prompt) {
3912
3921
  process.exit(1);
3913
3922
  }
3914
3923
  spinner = (0, import_ora.default)(`Checking ${toolProfile.name} availability`).start();
3915
- const toolAvailable = await checkToolAvailable(toolProfile.cliCommand);
3916
- if (!toolAvailable) {
3917
- spinner.fail(import_chalk.default.red(`${toolProfile.name} CLI not found`));
3918
- console.log(import_chalk.default.yellow(`
3919
- Please install ${toolProfile.name}:`));
3920
- if (tool === "claude-code") {
3921
- console.log(import_chalk.default.cyan(" https://claude.com/claude-code"));
3922
- } else if (tool === "cursor") {
3923
- console.log(import_chalk.default.cyan(" https://www.cursor.com/"));
3924
- } else if (tool === "codex") {
3925
- console.log(import_chalk.default.cyan(" npm install -g @openai/codex"));
3926
- }
3927
- process.exit(1);
3928
- }
3929
- spinner.succeed(import_chalk.default.green(`${toolProfile.name} CLI found`));
3924
+ await checkToolAvailable(toolProfile.cliCommand);
3925
+ spinner.succeed(import_chalk.default.green(`${toolProfile.name} CLI check complete`));
3930
3926
  spinner = (0, import_ora.default)("Loading environment variables").start();
3931
3927
  const envVars = loadEnvFiles();
3932
3928
  const envCount = Object.keys(envVars).length;
@@ -6541,8 +6537,8 @@ var SUBAGENTS = {
6541
6537
  description: "Automatically create and track bugs and issues",
6542
6538
  icon: "bot",
6543
6539
  integrations: [
6544
- INTEGRATIONS.linear,
6545
- INTEGRATIONS.jira,
6540
+ // INTEGRATIONS.linear,
6541
+ // INTEGRATIONS.jira,
6546
6542
  INTEGRATIONS["jira-server"],
6547
6543
  INTEGRATIONS.notion,
6548
6544
  INTEGRATIONS.slack
@@ -6556,7 +6552,10 @@ var SUBAGENTS = {
6556
6552
  name: "Documentation Researcher",
6557
6553
  description: "Search and retrieve information from your documentation",
6558
6554
  icon: "file-search",
6559
- integrations: [INTEGRATIONS.notion, INTEGRATIONS.confluence],
6555
+ integrations: [
6556
+ INTEGRATIONS.notion
6557
+ // INTEGRATIONS.confluence
6558
+ ],
6560
6559
  model: "sonnet",
6561
6560
  color: "cyan",
6562
6561
  version: "1.0.0"
@@ -6992,6 +6991,7 @@ var MCP_SERVERS = {
6992
6991
  name: "Slack",
6993
6992
  description: "Slack MCP server for messaging and channel operations",
6994
6993
  requiresCredentials: true,
6994
+ npmPackages: ["simple-slack-mcp-server"],
6995
6995
  config: {
6996
6996
  command: "slack-mcp-server",
6997
6997
  args: [],
@@ -7005,6 +7005,7 @@ var MCP_SERVERS = {
7005
7005
  name: "Microsoft Teams",
7006
7006
  description: "Microsoft Teams MCP server for messaging and channel operations",
7007
7007
  requiresCredentials: true,
7008
+ npmPackages: ["@bugzy-ai/teams-mcp-server"],
7008
7009
  config: {
7009
7010
  command: "teams-mcp-server",
7010
7011
  args: [],
@@ -7018,6 +7019,7 @@ var MCP_SERVERS = {
7018
7019
  name: "Playwright",
7019
7020
  description: "Playwright MCP server for browser automation",
7020
7021
  requiresCredentials: false,
7022
+ npmPackages: ["@playwright/mcp"],
7021
7023
  config: {
7022
7024
  command: "mcp-server-playwright",
7023
7025
  args: [
@@ -7042,6 +7044,7 @@ var MCP_SERVERS = {
7042
7044
  name: "Notion",
7043
7045
  description: "Notion MCP server for documentation",
7044
7046
  requiresCredentials: true,
7047
+ npmPackages: ["@notionhq/notion-mcp-server"],
7045
7048
  config: {
7046
7049
  command: "notion-mcp-server",
7047
7050
  args: [],
@@ -7055,6 +7058,7 @@ var MCP_SERVERS = {
7055
7058
  name: "Jira Server (On-Prem)",
7056
7059
  description: "Jira Server MCP via tunnel for on-premise instances",
7057
7060
  requiresCredentials: true,
7061
+ npmPackages: ["@mcp-tunnel/wrapper", "@bugzy-ai/jira-mcp-server"],
7058
7062
  config: {
7059
7063
  command: "mcp-tunnel",
7060
7064
  args: ["--server", "jira-mcp-server"],
@@ -7248,11 +7252,13 @@ function getMCPEnvConfig(serverName) {
7248
7252
  const configs = {
7249
7253
  slack: `
7250
7254
  # Slack MCP Server
7251
- # Get your token from: https://api.slack.com/apps
7255
+ # Setup guide: https://github.com/bugzy-ai/bugzy/blob/main/docs/slack-setup.md
7256
+ # Required scopes: channels:read, chat:write, chat:write.public, reactions:write
7252
7257
  SLACK_ACCESS_TOKEN=`,
7253
7258
  notion: `
7254
7259
  # Notion MCP Server
7255
- # Get your token from: https://www.notion.so/my-integrations
7260
+ # Setup guide: https://github.com/bugzy-ai/bugzy/blob/main/docs/notion-setup.md
7261
+ # Requires: Internal Integration Token (ntn_* or secret_*)
7256
7262
  NOTION_TOKEN=`,
7257
7263
  linear: `
7258
7264
  # Linear MCP Server
@@ -7636,6 +7642,34 @@ async function firstTimeSetup(cliSubagents) {
7636
7642
  }
7637
7643
  }
7638
7644
  }
7645
+ const mcpServers = getMCPServersFromSubagents(subagents);
7646
+ const packagesToInstall = [...new Set(
7647
+ mcpServers.flatMap((s) => MCP_SERVERS[s]?.npmPackages ?? [])
7648
+ )];
7649
+ if (packagesToInstall.length > 0) {
7650
+ console.log(import_chalk2.default.cyan("\nMCP Server Packages Required:\n"));
7651
+ packagesToInstall.forEach((pkg) => console.log(import_chalk2.default.white(` \u2022 ${pkg}`)));
7652
+ const { installMCP } = await import_inquirer.default.prompt([{
7653
+ type: "confirm",
7654
+ name: "installMCP",
7655
+ message: "Install MCP packages globally now?",
7656
+ default: true
7657
+ }]);
7658
+ if (installMCP) {
7659
+ const spinner2 = (0, import_ora2.default)("Installing MCP packages").start();
7660
+ try {
7661
+ (0, import_child_process4.execSync)(`npm install -g ${packagesToInstall.join(" ")}`, { stdio: "pipe" });
7662
+ spinner2.succeed(import_chalk2.default.green("MCP packages installed"));
7663
+ } catch (e) {
7664
+ spinner2.fail(import_chalk2.default.red("Some packages failed to install"));
7665
+ console.log(import_chalk2.default.yellow("\nInstall manually: npm install -g " + packagesToInstall.join(" ")));
7666
+ }
7667
+ } else {
7668
+ console.log(import_chalk2.default.yellow("\n\u26A0\uFE0F MCP servers will not work until packages are installed:"));
7669
+ console.log(import_chalk2.default.white(` npm install -g ${packagesToInstall.join(" ")}
7670
+ `));
7671
+ }
7672
+ }
7639
7673
  spinner = (0, import_ora2.default)("Saving configuration").start();
7640
7674
  const projectName = path11.basename(process.cwd());
7641
7675
  const config = createDefaultConfig(projectName, tool);
@@ -7661,11 +7695,23 @@ async function firstTimeSetup(cliSubagents) {
7661
7695
  });
7662
7696
  }
7663
7697
  console.log(import_chalk2.default.green.bold("\n\u2705 Setup complete!\n"));
7698
+ console.log(import_chalk2.default.cyan("\u{1F4CB} Project Context:"));
7699
+ console.log(import_chalk2.default.white(" Edit .bugzy/runtime/project-context.md to help the AI understand your project:"));
7700
+ console.log(import_chalk2.default.gray(" \u2022 Project description and tech stack"));
7701
+ console.log(import_chalk2.default.gray(" \u2022 Team communication channels"));
7702
+ console.log(import_chalk2.default.gray(" \u2022 Bug tracking workflow"));
7703
+ console.log(import_chalk2.default.gray(" \u2022 Testing conventions\n"));
7664
7704
  console.log(import_chalk2.default.yellow("Next steps:"));
7665
7705
  console.log(import_chalk2.default.white("1. cp .env.example .env"));
7666
7706
  console.log(import_chalk2.default.white("2. Edit .env and add your API tokens"));
7667
- console.log(import_chalk2.default.white("3. npx playwright install (install browser binaries)"));
7668
- console.log(import_chalk2.default.white("4. Run:"), import_chalk2.default.cyan("bugzy"));
7707
+ if (subagents["test-runner"]) {
7708
+ console.log(import_chalk2.default.white("3. npx playwright install (install browser binaries)"));
7709
+ console.log(import_chalk2.default.white("4. Edit .bugzy/runtime/project-context.md"));
7710
+ console.log(import_chalk2.default.white("5. Run:"), import_chalk2.default.cyan("bugzy"));
7711
+ } else {
7712
+ console.log(import_chalk2.default.white("3. Edit .bugzy/runtime/project-context.md"));
7713
+ console.log(import_chalk2.default.white("4. Run:"), import_chalk2.default.cyan("bugzy"));
7714
+ }
7669
7715
  console.log();
7670
7716
  }
7671
7717
  async function reconfigureProject() {