@dunnewold-labs/mr-manager 0.4.16 → 0.4.18

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 (2) hide show
  1. package/dist/index.mjs +127 -26
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // cli/index.ts
4
- import { Command as Command27 } from "commander";
4
+ import { Command as Command28 } from "commander";
5
5
  import { existsSync as existsSync17 } from "fs";
6
6
  import { homedir as homedir3 } from "os";
7
7
  import { join as join12 } from "path";
@@ -185,7 +185,7 @@ import { fileURLToPath } from "url";
185
185
  // cli/package.json
186
186
  var package_default = {
187
187
  name: "@dunnewold-labs/mr-manager",
188
- version: "0.4.16",
188
+ version: "0.4.18",
189
189
  description: "Mr. Manager - Task and project management CLI",
190
190
  bin: {
191
191
  mr: "./dist/index.mjs"
@@ -4557,7 +4557,7 @@ async function checkApiConnectivity() {
4557
4557
  }
4558
4558
  }
4559
4559
  function printResults(checks) {
4560
- const maxNameLen = Math.max(...checks.map((c10) => c10.name.length));
4560
+ const maxNameLen = Math.max(...checks.map((c11) => c11.name.length));
4561
4561
  let allOk = true;
4562
4562
  for (const check of checks) {
4563
4563
  const isOptional = check.optional ?? false;
@@ -4571,10 +4571,10 @@ function printResults(checks) {
4571
4571
  }
4572
4572
  async function autoFix(checks, agent) {
4573
4573
  const { spawn: spawn8 } = await import("child_process");
4574
- const ghInstalled = checks.find((c10) => c10.name === "GitHub CLI (gh)").ok;
4575
- const ghAuthed = checks.find((c10) => c10.name === "GitHub CLI auth").ok;
4576
- const mrAuthed = checks.find((c10) => c10.name === "Mr. Manager CLI auth").ok;
4577
- const claudeCheck = checks.find((c10) => c10.name === "Claude Code (claude)");
4574
+ const ghInstalled = checks.find((c11) => c11.name === "GitHub CLI (gh)").ok;
4575
+ const ghAuthed = checks.find((c11) => c11.name === "GitHub CLI auth").ok;
4576
+ const mrAuthed = checks.find((c11) => c11.name === "Mr. Manager CLI auth").ok;
4577
+ const claudeCheck = checks.find((c11) => c11.name === "Claude Code (claude)");
4578
4578
  if (claudeCheck && !claudeCheck.ok && agent === "claude") {
4579
4579
  console.log(paint5("cyan", " Installing Claude Code..."));
4580
4580
  console.log(paint5("dim", " Running: curl -fsSL https://claude.ai/install.sh | bash"));
@@ -4637,7 +4637,7 @@ var setupCommand = new Command14("setup").description("Check that all dependenci
4637
4637
  console.log("");
4638
4638
  return;
4639
4639
  }
4640
- const fixes = checks.filter((c10) => !c10.ok && c10.fix && !c10.optional);
4640
+ const fixes = checks.filter((c11) => !c11.ok && c11.fix && !c11.optional);
4641
4641
  if (fixes.length > 0) {
4642
4642
  console.log(paint5("yellow", " To fix:"));
4643
4643
  for (const fix of fixes) {
@@ -5719,10 +5719,10 @@ ${codebaseAnalysis.routes.map((r) => `- ${r}`).join("\n")}
5719
5719
  ${codebaseAnalysis.prismaModels.map((m) => `- ${m}`).join("\n")}
5720
5720
 
5721
5721
  **Components:**
5722
- ${codebaseAnalysis.components.slice(0, 15).map((c10) => `- ${c10}`).join("\n")}
5722
+ ${codebaseAnalysis.components.slice(0, 15).map((c11) => `- ${c11}`).join("\n")}
5723
5723
 
5724
5724
  **Recent Git Commits:**
5725
- ${codebaseAnalysis.recentCommits.slice(0, 8).map((c10) => `- ${c10}`).join("\n")}
5725
+ ${codebaseAnalysis.recentCommits.slice(0, 8).map((c11) => `- ${c11}`).join("\n")}
5726
5726
 
5727
5727
  **Completed Tasks:**
5728
5728
  ${context.completedTasks.slice(0, 10).map((t) => `- ${t.title}`).join("\n") || "None"}
@@ -6369,7 +6369,7 @@ var doctorCommand = new Command25("doctor").description("Diagnose Mr. Manager CL
6369
6369
  console.log("");
6370
6370
  return;
6371
6371
  }
6372
- const fixes = checks.filter((c10) => !c10.ok && c10.fix && !c10.optional);
6372
+ const fixes = checks.filter((c11) => !c11.ok && c11.fix && !c11.optional);
6373
6373
  if (fixes.length > 0) {
6374
6374
  console.log(paint5("yellow", " To fix:"));
6375
6375
  for (const fix of fixes) {
@@ -6600,6 +6600,106 @@ ${r.jobType} [${r.identifier}]`);
6600
6600
  }
6601
6601
  });
6602
6602
 
6603
+ // cli/commands/skill.ts
6604
+ import { Command as Command27 } from "commander";
6605
+ var c10 = {
6606
+ reset: "\x1B[0m",
6607
+ bold: "\x1B[1m",
6608
+ dim: "\x1B[2m",
6609
+ cyan: "\x1B[36m",
6610
+ green: "\x1B[32m",
6611
+ yellow: "\x1B[33m"
6612
+ };
6613
+ var skillCommand = new Command27("skill").description("Manage skills \u2014 reusable playbooks for AI agents");
6614
+ skillCommand.command("list").alias("ls").description("List all skills").option("--category <category>", "Filter by category").action(async (opts) => {
6615
+ const params = new URLSearchParams();
6616
+ if (opts.category) params.set("category", opts.category);
6617
+ const skills = await api.get(
6618
+ `/api/skills${params.toString() ? `?${params}` : ""}`
6619
+ );
6620
+ if (skills.length === 0) {
6621
+ console.log(`${c10.dim}No skills found.${c10.reset}`);
6622
+ return;
6623
+ }
6624
+ for (const skill of skills) {
6625
+ const cat = skill.category ? ` ${c10.dim}[${skill.category}]${c10.reset}` : "";
6626
+ const scope = skill.projectId ? ` ${c10.dim}(project)${c10.reset}` : ` ${c10.dim}(global)${c10.reset}`;
6627
+ console.log(` ${c10.cyan}${skill.name}${c10.reset}${cat}${scope}`);
6628
+ if (skill.description) {
6629
+ console.log(` ${c10.dim}${skill.description}${c10.reset}`);
6630
+ }
6631
+ console.log(` ${c10.dim}id: ${skill.id}${c10.reset}`);
6632
+ }
6633
+ });
6634
+ skillCommand.command("create").description("Create a new skill from a markdown file or inline content").argument("<name>", "Skill name").option("-d, --description <desc>", "Short description").option("-c, --category <cat>", "Category (e.g. Deployment, Testing)").option("-f, --file <path>", "Read content from a markdown file").option("--content <text>", "Inline markdown content").option("-p, --project", "Scope to the linked project").action(async (name, opts) => {
6635
+ let content = opts.content ?? "";
6636
+ if (opts.file) {
6637
+ const { readFileSync: readFileSync13 } = await import("fs");
6638
+ try {
6639
+ content = readFileSync13(opts.file, "utf-8");
6640
+ } catch (err) {
6641
+ console.error(`Failed to read file: ${err.message}`);
6642
+ process.exit(1);
6643
+ }
6644
+ }
6645
+ if (!content.trim()) {
6646
+ console.error("Content is required. Use --file <path> or --content <text>.");
6647
+ process.exit(1);
6648
+ }
6649
+ let projectId = null;
6650
+ if (opts.project) {
6651
+ projectId = getLinkedProjectId();
6652
+ if (!projectId) {
6653
+ console.error(
6654
+ 'No project linked to this directory. Run "mr link <project-id>" first.'
6655
+ );
6656
+ process.exit(1);
6657
+ }
6658
+ }
6659
+ const skill = await api.post("/api/skills", {
6660
+ name,
6661
+ description: opts.description ?? null,
6662
+ content: content.trim(),
6663
+ category: opts.category ?? null,
6664
+ projectId
6665
+ });
6666
+ console.log(
6667
+ `${c10.green}Created skill:${c10.reset} ${c10.bold}${skill.name}${c10.reset} ${c10.dim}(${skill.id})${c10.reset}`
6668
+ );
6669
+ });
6670
+ skillCommand.command("generate").alias("gen").description("Generate a new skill using AI from a text prompt").argument("<prompt>", "Describe the skill to generate").option("-p, --project", "Scope to the linked project").action(async (prompt2, opts) => {
6671
+ let projectId = null;
6672
+ if (opts.project) {
6673
+ projectId = getLinkedProjectId();
6674
+ if (!projectId) {
6675
+ console.error(
6676
+ 'No project linked to this directory. Run "mr link <project-id>" first.'
6677
+ );
6678
+ process.exit(1);
6679
+ }
6680
+ }
6681
+ console.log(`${c10.dim}Generating skill...${c10.reset}`);
6682
+ try {
6683
+ const skill = await api.post("/api/skills/generate", {
6684
+ prompt: prompt2,
6685
+ projectId
6686
+ });
6687
+ console.log(
6688
+ `${c10.green}Generated skill:${c10.reset} ${c10.bold}${skill.name}${c10.reset}`
6689
+ );
6690
+ if (skill.description) {
6691
+ console.log(` ${c10.dim}${skill.description}${c10.reset}`);
6692
+ }
6693
+ if (skill.category) {
6694
+ console.log(` ${c10.dim}Category: ${skill.category}${c10.reset}`);
6695
+ }
6696
+ console.log(` ${c10.dim}id: ${skill.id}${c10.reset}`);
6697
+ } catch (err) {
6698
+ console.error(`Failed to generate skill: ${err.message}`);
6699
+ process.exit(1);
6700
+ }
6701
+ });
6702
+
6603
6703
  // cli/index.ts
6604
6704
  var configPath = join12(homedir3(), ".mr-manager", "config.json");
6605
6705
  var isFirstRun = !existsSync17(configPath);
@@ -6607,7 +6707,7 @@ var userArgs = process.argv.slice(2);
6607
6707
  var bypassCommands = /* @__PURE__ */ new Set(["login", "init", "auth", "help", "--help", "-h", "--version", "-V", "doctor", "setup"]);
6608
6708
  var shouldBypass = userArgs.length > 0 && bypassCommands.has(userArgs[0]);
6609
6709
  if (isFirstRun && !shouldBypass) {
6610
- const c10 = {
6710
+ const c11 = {
6611
6711
  reset: "\x1B[0m",
6612
6712
  bold: "\x1B[1m",
6613
6713
  dim: "\x1B[2m",
@@ -6617,28 +6717,28 @@ if (isFirstRun && !shouldBypass) {
6617
6717
  magenta: "\x1B[35m"
6618
6718
  };
6619
6719
  console.log("");
6620
- console.log(`${c10.cyan} \u2554\u2566\u2557\u2566\u2550\u2557 \u2554\u2566\u2557\u2554\u2550\u2557\u2554\u2557\u2554\u2554\u2550\u2557\u2554\u2550\u2557\u2554\u2550\u2557\u2566\u2550\u2557${c10.reset}`);
6621
- console.log(`${c10.magenta} \u2551\u2551\u2551\u2560\u2566\u255D \u2551\u2551\u2551\u2560\u2550\u2563\u2551\u2551\u2551\u2560\u2550\u2563\u2551 \u2566\u2551\u2563 \u2560\u2566\u255D${c10.reset}`);
6622
- console.log(`${c10.cyan} \u2569 \u2569\u2569\u255A\u2550 \u2569 \u2569\u2569 \u2569\u255D\u255A\u255D\u2569 \u2569\u255A\u2550\u255D\u255A\u2550\u255D\u2569\u255A\u2550${c10.reset}`);
6623
- console.log(`${c10.dim} \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500${c10.reset}`);
6720
+ console.log(`${c11.cyan} \u2554\u2566\u2557\u2566\u2550\u2557 \u2554\u2566\u2557\u2554\u2550\u2557\u2554\u2557\u2554\u2554\u2550\u2557\u2554\u2550\u2557\u2554\u2550\u2557\u2566\u2550\u2557${c11.reset}`);
6721
+ console.log(`${c11.magenta} \u2551\u2551\u2551\u2560\u2566\u255D \u2551\u2551\u2551\u2560\u2550\u2563\u2551\u2551\u2551\u2560\u2550\u2563\u2551 \u2566\u2551\u2563 \u2560\u2566\u255D${c11.reset}`);
6722
+ console.log(`${c11.cyan} \u2569 \u2569\u2569\u255A\u2550 \u2569 \u2569\u2569 \u2569\u255D\u255A\u255D\u2569 \u2569\u255A\u2550\u255D\u255A\u2550\u255D\u2569\u255A\u2550${c11.reset}`);
6723
+ console.log(`${c11.dim} \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500${c11.reset}`);
6624
6724
  console.log("");
6625
- console.log(`${c10.bold} Welcome to Mr. Manager!${c10.reset}`);
6626
- console.log(`${c10.dim} Let's get you set up in a few quick steps.${c10.reset}`);
6725
+ console.log(`${c11.bold} Welcome to Mr. Manager!${c11.reset}`);
6726
+ console.log(`${c11.dim} Let's get you set up in a few quick steps.${c11.reset}`);
6627
6727
  console.log("");
6628
- console.log(` ${c10.yellow}Step 1:${c10.reset} Authenticate via Google OAuth`);
6629
- console.log(` ${c10.dim}Run:${c10.reset} ${c10.cyan}mr login${c10.reset}`);
6728
+ console.log(` ${c11.yellow}Step 1:${c11.reset} Authenticate via Google OAuth`);
6729
+ console.log(` ${c11.dim}Run:${c11.reset} ${c11.cyan}mr login${c11.reset}`);
6630
6730
  console.log("");
6631
- console.log(` ${c10.yellow}Step 2:${c10.reset} Verify your environment`);
6632
- console.log(` ${c10.dim}Run:${c10.reset} ${c10.cyan}mr setup${c10.reset}`);
6731
+ console.log(` ${c11.yellow}Step 2:${c11.reset} Verify your environment`);
6732
+ console.log(` ${c11.dim}Run:${c11.reset} ${c11.cyan}mr setup${c11.reset}`);
6633
6733
  console.log("");
6634
- console.log(` ${c10.yellow}Step 3:${c10.reset} Link a repo and start watching`);
6635
- console.log(` ${c10.dim}Run:${c10.reset} ${c10.cyan}mr link${c10.reset} ${c10.dim}&&${c10.reset} ${c10.cyan}mr watch${c10.reset}`);
6734
+ console.log(` ${c11.yellow}Step 3:${c11.reset} Link a repo and start watching`);
6735
+ console.log(` ${c11.dim}Run:${c11.reset} ${c11.cyan}mr link${c11.reset} ${c11.dim}&&${c11.reset} ${c11.cyan}mr watch${c11.reset}`);
6636
6736
  console.log("");
6637
- console.log(`${c10.dim} Or run ${c10.reset}${c10.cyan}mr login${c10.reset}${c10.dim} to get started now.${c10.reset}`);
6737
+ console.log(`${c11.dim} Or run ${c11.reset}${c11.cyan}mr login${c11.reset}${c11.dim} to get started now.${c11.reset}`);
6638
6738
  console.log("");
6639
6739
  process.exit(0);
6640
6740
  }
6641
- var program = new Command27();
6741
+ var program = new Command28();
6642
6742
  program.name("mr").description("Mr. Manager - Task and project management CLI").version(CLI_VERSION);
6643
6743
  program.addCommand(initCommand);
6644
6744
  program.addCommand(authCommand);
@@ -6669,4 +6769,5 @@ program.addCommand(scanCommand);
6669
6769
  program.addCommand(ideaCommand);
6670
6770
  program.addCommand(doctorCommand);
6671
6771
  program.addCommand(promptAuditCommand);
6772
+ program.addCommand(skillCommand);
6672
6773
  program.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dunnewold-labs/mr-manager",
3
- "version": "0.4.16",
3
+ "version": "0.4.18",
4
4
  "description": "Mr. Manager - Task and project management CLI",
5
5
  "bin": {
6
6
  "mr": "./dist/index.mjs"