@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.
package/dist/cli/index.js CHANGED
@@ -3845,13 +3845,22 @@ async function validateProjectStructure() {
3845
3845
  }
3846
3846
  async function checkToolAvailable(command) {
3847
3847
  const { spawn: spawn2 } = await import("child_process");
3848
+ const isWindows = process.platform === "win32";
3849
+ const checkCommand = isWindows ? "where" : "which";
3848
3850
  return new Promise((resolve) => {
3849
- const proc = spawn2("which", [command]);
3851
+ const proc = spawn2(checkCommand, [command], {
3852
+ shell: isWindows
3853
+ // Windows needs shell for 'where'
3854
+ });
3850
3855
  proc.on("close", (code) => {
3851
- resolve(code === 0);
3856
+ if (code !== 0) {
3857
+ console.warn(`Warning: Could not verify '${command}' is installed (${checkCommand} check failed). Continuing anyway...`);
3858
+ }
3859
+ resolve(true);
3852
3860
  });
3853
3861
  proc.on("error", () => {
3854
- resolve(false);
3862
+ console.warn(`Warning: Could not verify '${command}' is installed (${checkCommand} not available). Continuing anyway...`);
3863
+ resolve(true);
3855
3864
  });
3856
3865
  });
3857
3866
  }
@@ -3904,21 +3913,8 @@ async function startSession(prompt) {
3904
3913
  process.exit(1);
3905
3914
  }
3906
3915
  spinner = ora(`Checking ${toolProfile.name} availability`).start();
3907
- const toolAvailable = await checkToolAvailable(toolProfile.cliCommand);
3908
- if (!toolAvailable) {
3909
- spinner.fail(chalk.red(`${toolProfile.name} CLI not found`));
3910
- console.log(chalk.yellow(`
3911
- Please install ${toolProfile.name}:`));
3912
- if (tool === "claude-code") {
3913
- console.log(chalk.cyan(" https://claude.com/claude-code"));
3914
- } else if (tool === "cursor") {
3915
- console.log(chalk.cyan(" https://www.cursor.com/"));
3916
- } else if (tool === "codex") {
3917
- console.log(chalk.cyan(" npm install -g @openai/codex"));
3918
- }
3919
- process.exit(1);
3920
- }
3921
- spinner.succeed(chalk.green(`${toolProfile.name} CLI found`));
3916
+ await checkToolAvailable(toolProfile.cliCommand);
3917
+ spinner.succeed(chalk.green(`${toolProfile.name} CLI check complete`));
3922
3918
  spinner = ora("Loading environment variables").start();
3923
3919
  const envVars = loadEnvFiles();
3924
3920
  const envCount = Object.keys(envVars).length;
@@ -6533,8 +6529,8 @@ var SUBAGENTS = {
6533
6529
  description: "Automatically create and track bugs and issues",
6534
6530
  icon: "bot",
6535
6531
  integrations: [
6536
- INTEGRATIONS.linear,
6537
- INTEGRATIONS.jira,
6532
+ // INTEGRATIONS.linear,
6533
+ // INTEGRATIONS.jira,
6538
6534
  INTEGRATIONS["jira-server"],
6539
6535
  INTEGRATIONS.notion,
6540
6536
  INTEGRATIONS.slack
@@ -6548,7 +6544,10 @@ var SUBAGENTS = {
6548
6544
  name: "Documentation Researcher",
6549
6545
  description: "Search and retrieve information from your documentation",
6550
6546
  icon: "file-search",
6551
- integrations: [INTEGRATIONS.notion, INTEGRATIONS.confluence],
6547
+ integrations: [
6548
+ INTEGRATIONS.notion
6549
+ // INTEGRATIONS.confluence
6550
+ ],
6552
6551
  model: "sonnet",
6553
6552
  color: "cyan",
6554
6553
  version: "1.0.0"
@@ -6984,6 +6983,7 @@ var MCP_SERVERS = {
6984
6983
  name: "Slack",
6985
6984
  description: "Slack MCP server for messaging and channel operations",
6986
6985
  requiresCredentials: true,
6986
+ npmPackages: ["simple-slack-mcp-server"],
6987
6987
  config: {
6988
6988
  command: "slack-mcp-server",
6989
6989
  args: [],
@@ -6997,6 +6997,7 @@ var MCP_SERVERS = {
6997
6997
  name: "Microsoft Teams",
6998
6998
  description: "Microsoft Teams MCP server for messaging and channel operations",
6999
6999
  requiresCredentials: true,
7000
+ npmPackages: ["@bugzy-ai/teams-mcp-server"],
7000
7001
  config: {
7001
7002
  command: "teams-mcp-server",
7002
7003
  args: [],
@@ -7010,6 +7011,7 @@ var MCP_SERVERS = {
7010
7011
  name: "Playwright",
7011
7012
  description: "Playwright MCP server for browser automation",
7012
7013
  requiresCredentials: false,
7014
+ npmPackages: ["@playwright/mcp"],
7013
7015
  config: {
7014
7016
  command: "mcp-server-playwright",
7015
7017
  args: [
@@ -7034,6 +7036,7 @@ var MCP_SERVERS = {
7034
7036
  name: "Notion",
7035
7037
  description: "Notion MCP server for documentation",
7036
7038
  requiresCredentials: true,
7039
+ npmPackages: ["@notionhq/notion-mcp-server"],
7037
7040
  config: {
7038
7041
  command: "notion-mcp-server",
7039
7042
  args: [],
@@ -7047,6 +7050,7 @@ var MCP_SERVERS = {
7047
7050
  name: "Jira Server (On-Prem)",
7048
7051
  description: "Jira Server MCP via tunnel for on-premise instances",
7049
7052
  requiresCredentials: true,
7053
+ npmPackages: ["@mcp-tunnel/wrapper", "@bugzy-ai/jira-mcp-server"],
7050
7054
  config: {
7051
7055
  command: "mcp-tunnel",
7052
7056
  args: ["--server", "jira-mcp-server"],
@@ -7240,11 +7244,13 @@ function getMCPEnvConfig(serverName) {
7240
7244
  const configs = {
7241
7245
  slack: `
7242
7246
  # Slack MCP Server
7243
- # Get your token from: https://api.slack.com/apps
7247
+ # Setup guide: https://github.com/bugzy-ai/bugzy/blob/main/docs/slack-setup.md
7248
+ # Required scopes: channels:read, chat:write, chat:write.public, reactions:write
7244
7249
  SLACK_ACCESS_TOKEN=`,
7245
7250
  notion: `
7246
7251
  # Notion MCP Server
7247
- # Get your token from: https://www.notion.so/my-integrations
7252
+ # Setup guide: https://github.com/bugzy-ai/bugzy/blob/main/docs/notion-setup.md
7253
+ # Requires: Internal Integration Token (ntn_* or secret_*)
7248
7254
  NOTION_TOKEN=`,
7249
7255
  linear: `
7250
7256
  # Linear MCP Server
@@ -7628,6 +7634,34 @@ async function firstTimeSetup(cliSubagents) {
7628
7634
  }
7629
7635
  }
7630
7636
  }
7637
+ const mcpServers = getMCPServersFromSubagents(subagents);
7638
+ const packagesToInstall = [...new Set(
7639
+ mcpServers.flatMap((s) => MCP_SERVERS[s]?.npmPackages ?? [])
7640
+ )];
7641
+ if (packagesToInstall.length > 0) {
7642
+ console.log(chalk2.cyan("\nMCP Server Packages Required:\n"));
7643
+ packagesToInstall.forEach((pkg) => console.log(chalk2.white(` \u2022 ${pkg}`)));
7644
+ const { installMCP } = await inquirer.prompt([{
7645
+ type: "confirm",
7646
+ name: "installMCP",
7647
+ message: "Install MCP packages globally now?",
7648
+ default: true
7649
+ }]);
7650
+ if (installMCP) {
7651
+ const spinner2 = ora2("Installing MCP packages").start();
7652
+ try {
7653
+ execSync3(`npm install -g ${packagesToInstall.join(" ")}`, { stdio: "pipe" });
7654
+ spinner2.succeed(chalk2.green("MCP packages installed"));
7655
+ } catch (e) {
7656
+ spinner2.fail(chalk2.red("Some packages failed to install"));
7657
+ console.log(chalk2.yellow("\nInstall manually: npm install -g " + packagesToInstall.join(" ")));
7658
+ }
7659
+ } else {
7660
+ console.log(chalk2.yellow("\n\u26A0\uFE0F MCP servers will not work until packages are installed:"));
7661
+ console.log(chalk2.white(` npm install -g ${packagesToInstall.join(" ")}
7662
+ `));
7663
+ }
7664
+ }
7631
7665
  spinner = ora2("Saving configuration").start();
7632
7666
  const projectName = path12.basename(process.cwd());
7633
7667
  const config = createDefaultConfig(projectName, tool);
@@ -7653,11 +7687,23 @@ async function firstTimeSetup(cliSubagents) {
7653
7687
  });
7654
7688
  }
7655
7689
  console.log(chalk2.green.bold("\n\u2705 Setup complete!\n"));
7690
+ console.log(chalk2.cyan("\u{1F4CB} Project Context:"));
7691
+ console.log(chalk2.white(" Edit .bugzy/runtime/project-context.md to help the AI understand your project:"));
7692
+ console.log(chalk2.gray(" \u2022 Project description and tech stack"));
7693
+ console.log(chalk2.gray(" \u2022 Team communication channels"));
7694
+ console.log(chalk2.gray(" \u2022 Bug tracking workflow"));
7695
+ console.log(chalk2.gray(" \u2022 Testing conventions\n"));
7656
7696
  console.log(chalk2.yellow("Next steps:"));
7657
7697
  console.log(chalk2.white("1. cp .env.example .env"));
7658
7698
  console.log(chalk2.white("2. Edit .env and add your API tokens"));
7659
- console.log(chalk2.white("3. npx playwright install (install browser binaries)"));
7660
- console.log(chalk2.white("4. Run:"), chalk2.cyan("bugzy"));
7699
+ if (subagents["test-runner"]) {
7700
+ console.log(chalk2.white("3. npx playwright install (install browser binaries)"));
7701
+ console.log(chalk2.white("4. Edit .bugzy/runtime/project-context.md"));
7702
+ console.log(chalk2.white("5. Run:"), chalk2.cyan("bugzy"));
7703
+ } else {
7704
+ console.log(chalk2.white("3. Edit .bugzy/runtime/project-context.md"));
7705
+ console.log(chalk2.white("4. Run:"), chalk2.cyan("bugzy"));
7706
+ }
7661
7707
  console.log();
7662
7708
  }
7663
7709
  async function reconfigureProject() {