prpm 1.1.10 → 1.1.11

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.js +934 -47
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -542,6 +542,7 @@ function getDestinationDir2(format, subtype, name) {
542
542
  case "agents.md":
543
543
  case "gemini.md":
544
544
  case "claude.md":
545
+ case "aider":
545
546
  if (subtype === "skill" && packageName) {
546
547
  return `.openskills/${packageName}`;
547
548
  }
@@ -555,8 +556,6 @@ function getDestinationDir2(format, subtype, name) {
555
556
  return ".mcp/tools";
556
557
  case "trae":
557
558
  return ".trae/rules";
558
- case "aider":
559
- return ".";
560
559
  case "zencoder":
561
560
  return ".zencoder/rules";
562
561
  case "replit":
@@ -605,6 +604,8 @@ function getManifestFilename(format) {
605
604
  return "GEMINI.md";
606
605
  case "claude.md":
607
606
  return "CLAUDE.md";
607
+ case "aider":
608
+ return "CONVENTIONS.md";
608
609
  default:
609
610
  return "AGENTS.md";
610
611
  }
@@ -667,6 +668,16 @@ var init_filesystem = __esm({
667
668
  }
668
669
  });
669
670
 
671
+ // src/types.ts
672
+ var import_types;
673
+ var init_types = __esm({
674
+ "src/types.ts"() {
675
+ "use strict";
676
+ init_cjs_shims();
677
+ import_types = require("@pr-pm/types");
678
+ }
679
+ });
680
+
670
681
  // src/core/agents-md-progressive.ts
671
682
  function generateSkillXML(entry) {
672
683
  const resourceType = entry.resourceType || "skill";
@@ -11180,6 +11191,149 @@ var init_to_gemini = __esm({
11180
11191
  });
11181
11192
 
11182
11193
  // ../converters/dist/to-opencode.js
11194
+ function toOpencode(pkg) {
11195
+ const warnings = [];
11196
+ let qualityScore = 100;
11197
+ try {
11198
+ const content = convertContent6(pkg, warnings);
11199
+ const lossyConversion = warnings.some((w) => w.includes("not supported") || w.includes("skipped"));
11200
+ if (lossyConversion) {
11201
+ qualityScore -= 10;
11202
+ }
11203
+ return {
11204
+ content,
11205
+ format: "opencode",
11206
+ warnings: warnings.length > 0 ? warnings : void 0,
11207
+ lossyConversion,
11208
+ qualityScore
11209
+ };
11210
+ } catch (error) {
11211
+ warnings.push(`Conversion error: ${error instanceof Error ? error.message : String(error)}`);
11212
+ return {
11213
+ content: "",
11214
+ format: "opencode",
11215
+ warnings,
11216
+ lossyConversion: true,
11217
+ qualityScore: 0
11218
+ };
11219
+ }
11220
+ }
11221
+ function convertContent6(pkg, warnings) {
11222
+ const lines = [];
11223
+ const metadata = pkg.content.sections.find((s) => s.type === "metadata");
11224
+ const tools = pkg.content.sections.find((s) => s.type === "tools");
11225
+ const instructions = pkg.content.sections.find((s) => s.type === "instructions");
11226
+ const frontmatter = {};
11227
+ if (pkg.subtype === "slash-command") {
11228
+ const opencodeSlashCommand = (metadata == null ? void 0 : metadata.type) === "metadata" ? metadata.data.opencodeSlashCommand : void 0;
11229
+ if (opencodeSlashCommand == null ? void 0 : opencodeSlashCommand.template) {
11230
+ frontmatter.template = opencodeSlashCommand.template;
11231
+ } else if ((instructions == null ? void 0 : instructions.type) === "instructions") {
11232
+ frontmatter.template = instructions.content;
11233
+ warnings.push("No template field found, using instructions content as template");
11234
+ } else {
11235
+ frontmatter.template = "Execute the following task: {{args}}";
11236
+ warnings.push("REQUIRED template field missing for slash command, using default placeholder");
11237
+ }
11238
+ if (opencodeSlashCommand) {
11239
+ if (opencodeSlashCommand.description)
11240
+ frontmatter.description = opencodeSlashCommand.description;
11241
+ if (opencodeSlashCommand.agent)
11242
+ frontmatter.agent = opencodeSlashCommand.agent;
11243
+ if (opencodeSlashCommand.model)
11244
+ frontmatter.model = opencodeSlashCommand.model;
11245
+ if (opencodeSlashCommand.subtask !== void 0)
11246
+ frontmatter.subtask = opencodeSlashCommand.subtask;
11247
+ } else if ((metadata == null ? void 0 : metadata.type) === "metadata" && metadata.data.description) {
11248
+ frontmatter.description = metadata.data.description;
11249
+ }
11250
+ } else {
11251
+ if ((metadata == null ? void 0 : metadata.type) === "metadata") {
11252
+ frontmatter.description = metadata.data.description;
11253
+ }
11254
+ const opencodeData = (metadata == null ? void 0 : metadata.type) === "metadata" ? metadata.data.opencode : void 0;
11255
+ if (opencodeData) {
11256
+ if (opencodeData.mode) {
11257
+ frontmatter.mode = opencodeData.mode;
11258
+ } else {
11259
+ frontmatter.mode = "all";
11260
+ warnings.push('REQUIRED mode field missing, defaulting to "all"');
11261
+ }
11262
+ if (opencodeData.model)
11263
+ frontmatter.model = opencodeData.model;
11264
+ if (opencodeData.temperature !== void 0)
11265
+ frontmatter.temperature = opencodeData.temperature;
11266
+ if (opencodeData.permission)
11267
+ frontmatter.permission = opencodeData.permission;
11268
+ if (opencodeData.disable !== void 0)
11269
+ frontmatter.disable = opencodeData.disable;
11270
+ } else {
11271
+ frontmatter.mode = "all";
11272
+ warnings.push('REQUIRED mode field missing, defaulting to "all"');
11273
+ }
11274
+ if ((tools == null ? void 0 : tools.type) === "tools" && tools.tools.length > 0) {
11275
+ const toolsObj = {};
11276
+ const toolMap = {
11277
+ "Write": "write",
11278
+ "Edit": "edit",
11279
+ "Bash": "bash",
11280
+ "Read": "read",
11281
+ "Grep": "grep",
11282
+ "Glob": "glob",
11283
+ "WebFetch": "webfetch",
11284
+ "WebSearch": "websearch"
11285
+ };
11286
+ for (const tool of tools.tools) {
11287
+ const opencodeToolName = toolMap[tool] || tool.toLowerCase();
11288
+ toolsObj[opencodeToolName] = true;
11289
+ }
11290
+ frontmatter.tools = toolsObj;
11291
+ }
11292
+ }
11293
+ lines.push("---");
11294
+ lines.push(jsYaml.dump(frontmatter, { indent: 2, lineWidth: -1 }).trim());
11295
+ lines.push("---");
11296
+ lines.push("");
11297
+ if ((instructions == null ? void 0 : instructions.type) === "instructions") {
11298
+ lines.push(instructions.content);
11299
+ } else {
11300
+ const contentSections = pkg.content.sections.filter((s) => s.type !== "metadata" && s.type !== "tools");
11301
+ for (const section of contentSections) {
11302
+ if (section.type === "persona") {
11303
+ if (section.data.role) {
11304
+ lines.push(`You are a ${section.data.role}.`);
11305
+ lines.push("");
11306
+ }
11307
+ } else if (section.type === "instructions") {
11308
+ lines.push(section.content);
11309
+ lines.push("");
11310
+ } else if (section.type === "rules") {
11311
+ lines.push("## Rules");
11312
+ lines.push("");
11313
+ for (const rule of section.items) {
11314
+ lines.push(`- ${rule.content}`);
11315
+ }
11316
+ lines.push("");
11317
+ } else if (section.type === "examples") {
11318
+ lines.push("## Examples");
11319
+ lines.push("");
11320
+ for (const example of section.examples) {
11321
+ if (example.description) {
11322
+ lines.push(`### ${example.description}`);
11323
+ lines.push("");
11324
+ }
11325
+ lines.push("```");
11326
+ lines.push(example.code);
11327
+ lines.push("```");
11328
+ lines.push("");
11329
+ }
11330
+ } else {
11331
+ warnings.push(`Section type '${section.type}' may not be fully supported in OpenCode format`);
11332
+ }
11333
+ }
11334
+ }
11335
+ return lines.join("\n").trim() + "\n";
11336
+ }
11183
11337
  var init_to_opencode = __esm({
11184
11338
  "../converters/dist/to-opencode.js"() {
11185
11339
  "use strict";
@@ -11209,7 +11363,7 @@ function toRuler(pkg, options = {}) {
11209
11363
  warnings.push("Hooks are not supported by Ruler");
11210
11364
  qualityScore -= 20;
11211
11365
  }
11212
- const content = convertContent6(pkg.content, warnings);
11366
+ const content = convertContent7(pkg.content, warnings);
11213
11367
  const header = `<!-- Package: ${pkg.name} -->
11214
11368
  <!-- Author: ${pkg.author || "Unknown"} -->
11215
11369
  ${pkg.description ? `<!-- Description: ${pkg.description} -->
@@ -11245,7 +11399,7 @@ ${content}`;
11245
11399
  };
11246
11400
  }
11247
11401
  }
11248
- function convertContent6(content, warnings) {
11402
+ function convertContent7(content, warnings) {
11249
11403
  const parts = [];
11250
11404
  const metadataSection = content.sections.find((s) => s.type === "metadata");
11251
11405
  if (metadataSection) {
@@ -11349,6 +11503,126 @@ var init_to_ruler = __esm({
11349
11503
  });
11350
11504
 
11351
11505
  // ../converters/dist/to-droid.js
11506
+ function toDroid(pkg) {
11507
+ const warnings = [];
11508
+ let qualityScore = 100;
11509
+ try {
11510
+ const result = convertContent8(pkg, warnings, qualityScore);
11511
+ const content = result.content;
11512
+ qualityScore = result.qualityScore;
11513
+ const lossyConversion = warnings.some((w) => w.includes("not supported") || w.includes("skipped"));
11514
+ if (lossyConversion) {
11515
+ qualityScore -= 10;
11516
+ }
11517
+ return {
11518
+ content,
11519
+ format: "droid",
11520
+ warnings: warnings.length > 0 ? warnings : void 0,
11521
+ lossyConversion,
11522
+ qualityScore
11523
+ };
11524
+ } catch (error) {
11525
+ warnings.push(`Conversion error: ${error instanceof Error ? error.message : String(error)}`);
11526
+ return {
11527
+ content: "",
11528
+ format: "droid",
11529
+ warnings,
11530
+ lossyConversion: true,
11531
+ qualityScore: 0
11532
+ };
11533
+ }
11534
+ }
11535
+ function convertContent8(pkg, warnings, qualityScore) {
11536
+ var _a;
11537
+ const lines = [];
11538
+ const metadata = pkg.content.sections.find((s) => s.type === "metadata");
11539
+ const instructions = pkg.content.sections.find((s) => s.type === "instructions");
11540
+ const rules = pkg.content.sections.find((s) => s.type === "rules");
11541
+ const examples = pkg.content.sections.find((s) => s.type === "examples");
11542
+ const persona = pkg.content.sections.find((s) => s.type === "persona");
11543
+ const frontmatter = {};
11544
+ if ((metadata == null ? void 0 : metadata.type) === "metadata") {
11545
+ frontmatter.name = metadata.data.title || pkg.name;
11546
+ frontmatter.description = metadata.data.description || pkg.description;
11547
+ const droidData = metadata.data.droid;
11548
+ if (droidData) {
11549
+ if (droidData.argumentHint) {
11550
+ frontmatter["argument-hint"] = droidData.argumentHint;
11551
+ }
11552
+ if (droidData.allowedTools && droidData.allowedTools.length > 0) {
11553
+ frontmatter["allowed-tools"] = droidData.allowedTools;
11554
+ }
11555
+ }
11556
+ } else {
11557
+ frontmatter.name = pkg.name;
11558
+ frontmatter.description = pkg.description;
11559
+ }
11560
+ if ((_a = pkg.metadata) == null ? void 0 : _a.droid) {
11561
+ if (pkg.metadata.droid.argumentHint && !frontmatter["argument-hint"]) {
11562
+ frontmatter["argument-hint"] = pkg.metadata.droid.argumentHint;
11563
+ }
11564
+ if (pkg.metadata.droid.allowedTools && pkg.metadata.droid.allowedTools.length > 0 && !frontmatter["allowed-tools"]) {
11565
+ frontmatter["allowed-tools"] = pkg.metadata.droid.allowedTools;
11566
+ }
11567
+ }
11568
+ lines.push("---");
11569
+ lines.push(jsYaml.dump(frontmatter, { indent: 2, lineWidth: -1 }).trim());
11570
+ lines.push("---");
11571
+ lines.push("");
11572
+ const bodyParts = [];
11573
+ if ((persona == null ? void 0 : persona.type) === "persona") {
11574
+ bodyParts.push(`# Role
11575
+
11576
+ ${persona.data.role}`);
11577
+ warnings.push("Persona section converted to Role heading");
11578
+ }
11579
+ if ((instructions == null ? void 0 : instructions.type) === "instructions") {
11580
+ bodyParts.push(instructions.content);
11581
+ }
11582
+ if ((rules == null ? void 0 : rules.type) === "rules") {
11583
+ const rulesHeader = `## ${rules.title || "Rules"}`;
11584
+ const rulesList = rules.items.map((rule, idx) => {
11585
+ const prefix = rules.ordered ? `${idx + 1}. ` : "- ";
11586
+ return `${prefix}${rule.content}`;
11587
+ }).join("\n");
11588
+ bodyParts.push(`${rulesHeader}
11589
+
11590
+ ${rulesList}`);
11591
+ }
11592
+ if ((examples == null ? void 0 : examples.type) === "examples") {
11593
+ const examplesHeader = `## ${examples.title || "Examples"}`;
11594
+ const examplesList = examples.examples.map((example) => {
11595
+ let exampleText = `### ${example.description}
11596
+
11597
+ `;
11598
+ if (example.language) {
11599
+ exampleText += `\`\`\`${example.language}
11600
+ ${example.code}
11601
+ \`\`\``;
11602
+ } else {
11603
+ exampleText += `\`\`\`
11604
+ ${example.code}
11605
+ \`\`\``;
11606
+ }
11607
+ return exampleText;
11608
+ }).join("\n\n");
11609
+ bodyParts.push(`${examplesHeader}
11610
+
11611
+ ${examplesList}`);
11612
+ }
11613
+ const supportedTypes = ["metadata", "instructions", "rules", "examples", "persona"];
11614
+ const unsupportedSections = pkg.content.sections.filter((s) => !supportedTypes.includes(s.type));
11615
+ if (unsupportedSections.length > 0) {
11616
+ const types2 = unsupportedSections.map((s) => s.type).join(", ");
11617
+ warnings.push(`Factory Droid does not support these section types: ${types2}. They were skipped.`);
11618
+ qualityScore -= unsupportedSections.length * 5;
11619
+ }
11620
+ lines.push(bodyParts.join("\n\n"));
11621
+ return {
11622
+ content: lines.join("\n").trim() + "\n",
11623
+ qualityScore
11624
+ };
11625
+ }
11352
11626
  var init_to_droid = __esm({
11353
11627
  "../converters/dist/to-droid.js"() {
11354
11628
  "use strict";
@@ -11358,6 +11632,133 @@ var init_to_droid = __esm({
11358
11632
  });
11359
11633
 
11360
11634
  // ../converters/dist/to-trae.js
11635
+ function toTrae(pkg, options = {}) {
11636
+ const warnings = [];
11637
+ let qualityScore = 100;
11638
+ try {
11639
+ const content = convertContent9(pkg, warnings);
11640
+ const lossyConversion = warnings.some((w) => w.includes("not supported") || w.includes("skipped"));
11641
+ if (lossyConversion) {
11642
+ qualityScore -= 10;
11643
+ }
11644
+ return {
11645
+ content,
11646
+ format: "trae",
11647
+ warnings: warnings.length > 0 ? warnings : void 0,
11648
+ lossyConversion,
11649
+ qualityScore
11650
+ };
11651
+ } catch (error) {
11652
+ warnings.push(`Conversion error: ${error instanceof Error ? error.message : String(error)}`);
11653
+ return {
11654
+ content: "",
11655
+ format: "trae",
11656
+ warnings,
11657
+ lossyConversion: true,
11658
+ qualityScore: 0
11659
+ };
11660
+ }
11661
+ }
11662
+ function convertContent9(pkg, warnings) {
11663
+ var _a, _b, _c;
11664
+ const lines = [];
11665
+ const title = ((_a = pkg.metadata) == null ? void 0 : _a.title) || pkg.name;
11666
+ lines.push(`# ${title}`);
11667
+ lines.push("");
11668
+ if (pkg.description || ((_b = pkg.metadata) == null ? void 0 : _b.description)) {
11669
+ lines.push(pkg.description || ((_c = pkg.metadata) == null ? void 0 : _c.description) || "");
11670
+ lines.push("");
11671
+ }
11672
+ for (const section of pkg.content.sections) {
11673
+ if (section.type === "metadata" || section.type === "tools" || section.type === "persona") {
11674
+ if (section.type === "persona") {
11675
+ warnings.push("Persona section skipped (not supported by Trae)");
11676
+ } else if (section.type === "tools") {
11677
+ warnings.push("Tools section skipped (not supported by Trae)");
11678
+ }
11679
+ continue;
11680
+ }
11681
+ const sectionContent = convertSection8(section, warnings);
11682
+ if (sectionContent) {
11683
+ lines.push(sectionContent);
11684
+ lines.push("");
11685
+ }
11686
+ }
11687
+ return lines.join("\n").trim();
11688
+ }
11689
+ function convertSection8(section, warnings) {
11690
+ switch (section.type) {
11691
+ case "instructions":
11692
+ return convertInstructions8(section);
11693
+ case "rules":
11694
+ return convertRules8(section);
11695
+ case "examples":
11696
+ return convertExamples8(section);
11697
+ case "context":
11698
+ return convertContext8(section);
11699
+ case "custom":
11700
+ if (!section.editorType) {
11701
+ return section.content;
11702
+ }
11703
+ warnings.push(`Custom ${section.editorType} section skipped`);
11704
+ return "";
11705
+ default:
11706
+ return "";
11707
+ }
11708
+ }
11709
+ function convertInstructions8(section) {
11710
+ const lines = [];
11711
+ lines.push(`## ${section.title}`);
11712
+ lines.push("");
11713
+ lines.push(section.content);
11714
+ return lines.join("\n");
11715
+ }
11716
+ function convertRules8(section) {
11717
+ const lines = [];
11718
+ lines.push(`## ${section.title}`);
11719
+ lines.push("");
11720
+ section.items.forEach((rule, index) => {
11721
+ const prefix = section.ordered ? `${index + 1}.` : "-";
11722
+ lines.push(`${prefix} ${rule.content}`);
11723
+ if (rule.rationale) {
11724
+ lines.push(` - Rationale: ${rule.rationale}`);
11725
+ }
11726
+ if (rule.examples && rule.examples.length > 0) {
11727
+ rule.examples.forEach((example) => {
11728
+ lines.push(` - Example: \`${example}\``);
11729
+ });
11730
+ }
11731
+ });
11732
+ return lines.join("\n");
11733
+ }
11734
+ function convertExamples8(section) {
11735
+ const lines = [];
11736
+ lines.push(`## ${section.title}`);
11737
+ lines.push("");
11738
+ section.examples.forEach((example) => {
11739
+ if (example.good === false) {
11740
+ lines.push(`### \u274C Avoid: ${example.description}`);
11741
+ } else if (example.good === true) {
11742
+ lines.push(`### \u2705 Preferred: ${example.description}`);
11743
+ } else {
11744
+ lines.push(`### ${example.description}`);
11745
+ }
11746
+ lines.push("");
11747
+ const lang = example.language || "";
11748
+ lines.push("```" + lang);
11749
+ lines.push(example.code);
11750
+ lines.push("```");
11751
+ lines.push("");
11752
+ });
11753
+ return lines.join("\n");
11754
+ }
11755
+ function convertContext8(section) {
11756
+ const lines = [];
11757
+ lines.push(`## ${section.title}`);
11758
+ lines.push("");
11759
+ lines.push(section.content);
11760
+ return lines.join("\n");
11761
+ }
11361
11762
  var init_to_trae = __esm({
11362
11763
  "../converters/dist/to-trae.js"() {
11363
11764
  "use strict";
@@ -11366,26 +11767,461 @@ var init_to_trae = __esm({
11366
11767
  });
11367
11768
 
11368
11769
  // ../converters/dist/to-aider.js
11369
- var init_to_aider = __esm({
11370
- "../converters/dist/to-aider.js"() {
11371
- "use strict";
11372
- init_cjs_shims();
11373
- }
11374
- });
11375
-
11376
- // ../converters/dist/to-zencoder.js
11377
- var init_to_zencoder = __esm({
11378
- "../converters/dist/to-zencoder.js"() {
11379
- "use strict";
11380
- init_cjs_shims();
11381
- }
11382
- });
11383
-
11384
- // ../converters/dist/to-replit.js
11385
- var init_to_replit = __esm({
11386
- "../converters/dist/to-replit.js"() {
11387
- "use strict";
11388
- init_cjs_shims();
11770
+ function toAider(pkg, options = {}) {
11771
+ const warnings = [];
11772
+ let qualityScore = 100;
11773
+ try {
11774
+ const content = convertContent10(pkg, warnings);
11775
+ const lossyConversion = warnings.some((w) => w.includes("not supported") || w.includes("skipped"));
11776
+ if (lossyConversion) {
11777
+ qualityScore -= 10;
11778
+ }
11779
+ return {
11780
+ content,
11781
+ format: "aider",
11782
+ warnings: warnings.length > 0 ? warnings : void 0,
11783
+ lossyConversion,
11784
+ qualityScore
11785
+ };
11786
+ } catch (error) {
11787
+ warnings.push(`Conversion error: ${error instanceof Error ? error.message : String(error)}`);
11788
+ return {
11789
+ content: "",
11790
+ format: "aider",
11791
+ warnings,
11792
+ lossyConversion: true,
11793
+ qualityScore: 0
11794
+ };
11795
+ }
11796
+ }
11797
+ function convertContent10(pkg, warnings) {
11798
+ var _a, _b, _c;
11799
+ const lines = [];
11800
+ const title = ((_a = pkg.metadata) == null ? void 0 : _a.title) || pkg.name;
11801
+ lines.push(`# ${title}`);
11802
+ lines.push("");
11803
+ if (pkg.description || ((_b = pkg.metadata) == null ? void 0 : _b.description)) {
11804
+ lines.push(pkg.description || ((_c = pkg.metadata) == null ? void 0 : _c.description) || "");
11805
+ lines.push("");
11806
+ }
11807
+ for (const section of pkg.content.sections) {
11808
+ if (section.type === "metadata" || section.type === "tools" || section.type === "persona") {
11809
+ if (section.type === "persona") {
11810
+ warnings.push("Persona section skipped (not supported by Aider)");
11811
+ } else if (section.type === "tools") {
11812
+ warnings.push("Tools section skipped (not supported by Aider)");
11813
+ }
11814
+ continue;
11815
+ }
11816
+ const sectionContent = convertSection9(section, warnings);
11817
+ if (sectionContent) {
11818
+ lines.push(sectionContent);
11819
+ lines.push("");
11820
+ }
11821
+ }
11822
+ return lines.join("\n").trim();
11823
+ }
11824
+ function convertSection9(section, warnings) {
11825
+ switch (section.type) {
11826
+ case "instructions":
11827
+ return convertInstructions9(section);
11828
+ case "rules":
11829
+ return convertRules9(section);
11830
+ case "examples":
11831
+ return convertExamples9(section);
11832
+ case "context":
11833
+ return convertContext9(section);
11834
+ case "custom":
11835
+ if (!section.editorType) {
11836
+ return section.content;
11837
+ }
11838
+ warnings.push(`Custom ${section.editorType} section skipped`);
11839
+ return "";
11840
+ default:
11841
+ return "";
11842
+ }
11843
+ }
11844
+ function convertInstructions9(section) {
11845
+ const lines = [];
11846
+ lines.push(`## ${section.title}`);
11847
+ lines.push("");
11848
+ lines.push(section.content);
11849
+ return lines.join("\n");
11850
+ }
11851
+ function convertRules9(section) {
11852
+ const lines = [];
11853
+ lines.push(`## ${section.title}`);
11854
+ lines.push("");
11855
+ section.items.forEach((rule, index) => {
11856
+ const prefix = section.ordered ? `${index + 1}.` : "-";
11857
+ lines.push(`${prefix} ${rule.content}`);
11858
+ if (rule.rationale) {
11859
+ lines.push(` - Rationale: ${rule.rationale}`);
11860
+ }
11861
+ if (rule.examples && rule.examples.length > 0) {
11862
+ rule.examples.forEach((example) => {
11863
+ lines.push(` - Example: \`${example}\``);
11864
+ });
11865
+ }
11866
+ });
11867
+ return lines.join("\n");
11868
+ }
11869
+ function convertExamples9(section) {
11870
+ const lines = [];
11871
+ lines.push(`## ${section.title}`);
11872
+ lines.push("");
11873
+ section.examples.forEach((example) => {
11874
+ if (example.good === false) {
11875
+ lines.push(`### \u274C Avoid: ${example.description}`);
11876
+ } else if (example.good === true) {
11877
+ lines.push(`### \u2705 Preferred: ${example.description}`);
11878
+ } else {
11879
+ lines.push(`### ${example.description}`);
11880
+ }
11881
+ lines.push("");
11882
+ const lang = example.language || "";
11883
+ lines.push("```" + lang);
11884
+ lines.push(example.code);
11885
+ lines.push("```");
11886
+ lines.push("");
11887
+ });
11888
+ return lines.join("\n");
11889
+ }
11890
+ function convertContext9(section) {
11891
+ const lines = [];
11892
+ lines.push(`## ${section.title}`);
11893
+ lines.push("");
11894
+ lines.push(section.content);
11895
+ return lines.join("\n");
11896
+ }
11897
+ var init_to_aider = __esm({
11898
+ "../converters/dist/to-aider.js"() {
11899
+ "use strict";
11900
+ init_cjs_shims();
11901
+ }
11902
+ });
11903
+
11904
+ // ../converters/dist/to-zencoder.js
11905
+ function toZencoder(pkg, options = {}) {
11906
+ var _a, _b;
11907
+ const warnings = [];
11908
+ let qualityScore = 100;
11909
+ try {
11910
+ const config = options.zencoderConfig || {};
11911
+ const hasConfig = config.description || config.globs || config.alwaysApply !== void 0 || ((_a = pkg.metadata) == null ? void 0 : _a.globs) || ((_b = pkg.metadata) == null ? void 0 : _b.alwaysApply) !== void 0;
11912
+ const includeFrontmatter = config.includeFrontmatter ?? hasConfig;
11913
+ const content = convertContent11(pkg, warnings, config);
11914
+ let fullContent;
11915
+ if (includeFrontmatter) {
11916
+ const frontmatter = generateFrontmatter3(pkg, config);
11917
+ if (frontmatter) {
11918
+ fullContent = `${frontmatter}
11919
+
11920
+ ${content}`;
11921
+ } else {
11922
+ fullContent = content;
11923
+ }
11924
+ } else {
11925
+ fullContent = content;
11926
+ }
11927
+ const lossyConversion = warnings.some((w) => w.includes("not supported") || w.includes("skipped"));
11928
+ if (lossyConversion) {
11929
+ qualityScore -= 10;
11930
+ }
11931
+ return {
11932
+ content: fullContent,
11933
+ format: "zencoder",
11934
+ warnings: warnings.length > 0 ? warnings : void 0,
11935
+ lossyConversion,
11936
+ qualityScore
11937
+ };
11938
+ } catch (error) {
11939
+ warnings.push(`Conversion error: ${error instanceof Error ? error.message : String(error)}`);
11940
+ return {
11941
+ content: "",
11942
+ format: "zencoder",
11943
+ warnings,
11944
+ lossyConversion: true,
11945
+ qualityScore: 0
11946
+ };
11947
+ }
11948
+ }
11949
+ function generateFrontmatter3(pkg, config) {
11950
+ var _a, _b, _c;
11951
+ const lines = [];
11952
+ let hasContent = false;
11953
+ const description = config.description || pkg.description || ((_a = pkg.metadata) == null ? void 0 : _a.description);
11954
+ if (description) {
11955
+ if (!hasContent) {
11956
+ lines.push("---");
11957
+ hasContent = true;
11958
+ }
11959
+ lines.push(`description: ${JSON.stringify(description)}`);
11960
+ }
11961
+ const globs = config.globs || ((_b = pkg.metadata) == null ? void 0 : _b.globs);
11962
+ if (globs && globs.length > 0) {
11963
+ if (!hasContent) {
11964
+ lines.push("---");
11965
+ hasContent = true;
11966
+ }
11967
+ lines.push("globs:");
11968
+ globs.forEach((glob) => {
11969
+ lines.push(` - ${JSON.stringify(glob)}`);
11970
+ });
11971
+ }
11972
+ const alwaysApply = config.alwaysApply ?? ((_c = pkg.metadata) == null ? void 0 : _c.alwaysApply);
11973
+ if (alwaysApply !== void 0) {
11974
+ if (!hasContent) {
11975
+ lines.push("---");
11976
+ hasContent = true;
11977
+ }
11978
+ lines.push(`alwaysApply: ${alwaysApply}`);
11979
+ }
11980
+ if (hasContent) {
11981
+ lines.push("---");
11982
+ return lines.join("\n");
11983
+ }
11984
+ return "";
11985
+ }
11986
+ function convertContent11(pkg, warnings, config) {
11987
+ var _a, _b, _c;
11988
+ const lines = [];
11989
+ const title = ((_a = pkg.metadata) == null ? void 0 : _a.title) || pkg.name;
11990
+ lines.push(`# ${title}`);
11991
+ lines.push("");
11992
+ if (!config.description && (pkg.description || ((_b = pkg.metadata) == null ? void 0 : _b.description))) {
11993
+ lines.push(pkg.description || ((_c = pkg.metadata) == null ? void 0 : _c.description) || "");
11994
+ lines.push("");
11995
+ }
11996
+ for (const section of pkg.content.sections) {
11997
+ if (section.type === "metadata" || section.type === "tools" || section.type === "persona") {
11998
+ if (section.type === "persona") {
11999
+ warnings.push("Persona section skipped (not supported by Zencoder)");
12000
+ } else if (section.type === "tools") {
12001
+ warnings.push("Tools section skipped (not supported by Zencoder)");
12002
+ }
12003
+ continue;
12004
+ }
12005
+ const sectionContent = convertSection10(section, warnings);
12006
+ if (sectionContent) {
12007
+ lines.push(sectionContent);
12008
+ lines.push("");
12009
+ }
12010
+ }
12011
+ return lines.join("\n").trim();
12012
+ }
12013
+ function convertSection10(section, warnings) {
12014
+ switch (section.type) {
12015
+ case "instructions":
12016
+ return convertInstructions10(section);
12017
+ case "rules":
12018
+ return convertRules10(section);
12019
+ case "examples":
12020
+ return convertExamples10(section);
12021
+ case "context":
12022
+ return convertContext10(section);
12023
+ case "custom":
12024
+ if (!section.editorType) {
12025
+ return section.content;
12026
+ }
12027
+ warnings.push(`Custom ${section.editorType} section skipped`);
12028
+ return "";
12029
+ default:
12030
+ return "";
12031
+ }
12032
+ }
12033
+ function convertInstructions10(section) {
12034
+ const lines = [];
12035
+ lines.push(`## ${section.title}`);
12036
+ lines.push("");
12037
+ lines.push(section.content);
12038
+ return lines.join("\n");
12039
+ }
12040
+ function convertRules10(section) {
12041
+ const lines = [];
12042
+ lines.push(`## ${section.title}`);
12043
+ lines.push("");
12044
+ section.items.forEach((rule, index) => {
12045
+ const prefix = section.ordered ? `${index + 1}.` : "-";
12046
+ lines.push(`${prefix} ${rule.content}`);
12047
+ if (rule.rationale) {
12048
+ lines.push(` - Rationale: ${rule.rationale}`);
12049
+ }
12050
+ if (rule.examples && rule.examples.length > 0) {
12051
+ rule.examples.forEach((example) => {
12052
+ lines.push(` - Example: \`${example}\``);
12053
+ });
12054
+ }
12055
+ });
12056
+ return lines.join("\n");
12057
+ }
12058
+ function convertExamples10(section) {
12059
+ const lines = [];
12060
+ lines.push(`## ${section.title}`);
12061
+ lines.push("");
12062
+ section.examples.forEach((example) => {
12063
+ if (example.good === false) {
12064
+ lines.push(`### \u274C Avoid: ${example.description}`);
12065
+ } else if (example.good === true) {
12066
+ lines.push(`### \u2705 Preferred: ${example.description}`);
12067
+ } else {
12068
+ lines.push(`### ${example.description}`);
12069
+ }
12070
+ lines.push("");
12071
+ const lang = example.language || "";
12072
+ lines.push("```" + lang);
12073
+ lines.push(example.code);
12074
+ lines.push("```");
12075
+ lines.push("");
12076
+ });
12077
+ return lines.join("\n");
12078
+ }
12079
+ function convertContext10(section) {
12080
+ const lines = [];
12081
+ lines.push(`## ${section.title}`);
12082
+ lines.push("");
12083
+ lines.push(section.content);
12084
+ return lines.join("\n");
12085
+ }
12086
+ var init_to_zencoder = __esm({
12087
+ "../converters/dist/to-zencoder.js"() {
12088
+ "use strict";
12089
+ init_cjs_shims();
12090
+ }
12091
+ });
12092
+
12093
+ // ../converters/dist/to-replit.js
12094
+ function toReplit(pkg, options = {}) {
12095
+ const warnings = [];
12096
+ let qualityScore = 100;
12097
+ try {
12098
+ const content = convertContent12(pkg, warnings);
12099
+ const lossyConversion = warnings.some((w) => w.includes("not supported") || w.includes("skipped"));
12100
+ if (lossyConversion) {
12101
+ qualityScore -= 10;
12102
+ }
12103
+ return {
12104
+ content,
12105
+ format: "replit",
12106
+ warnings: warnings.length > 0 ? warnings : void 0,
12107
+ lossyConversion,
12108
+ qualityScore
12109
+ };
12110
+ } catch (error) {
12111
+ warnings.push(`Conversion error: ${error instanceof Error ? error.message : String(error)}`);
12112
+ return {
12113
+ content: "",
12114
+ format: "replit",
12115
+ warnings,
12116
+ lossyConversion: true,
12117
+ qualityScore: 0
12118
+ };
12119
+ }
12120
+ }
12121
+ function convertContent12(pkg, warnings) {
12122
+ var _a, _b, _c;
12123
+ const lines = [];
12124
+ const title = ((_a = pkg.metadata) == null ? void 0 : _a.title) || pkg.name;
12125
+ lines.push(`# ${title}`);
12126
+ lines.push("");
12127
+ if (pkg.description || ((_b = pkg.metadata) == null ? void 0 : _b.description)) {
12128
+ lines.push(pkg.description || ((_c = pkg.metadata) == null ? void 0 : _c.description) || "");
12129
+ lines.push("");
12130
+ }
12131
+ for (const section of pkg.content.sections) {
12132
+ if (section.type === "metadata" || section.type === "tools" || section.type === "persona") {
12133
+ if (section.type === "persona") {
12134
+ warnings.push("Persona section skipped (not supported by Replit)");
12135
+ } else if (section.type === "tools") {
12136
+ warnings.push("Tools section skipped (not supported by Replit)");
12137
+ }
12138
+ continue;
12139
+ }
12140
+ const sectionContent = convertSection11(section, warnings);
12141
+ if (sectionContent) {
12142
+ lines.push(sectionContent);
12143
+ lines.push("");
12144
+ }
12145
+ }
12146
+ return lines.join("\n").trim();
12147
+ }
12148
+ function convertSection11(section, warnings) {
12149
+ switch (section.type) {
12150
+ case "instructions":
12151
+ return convertInstructions11(section);
12152
+ case "rules":
12153
+ return convertRules11(section);
12154
+ case "examples":
12155
+ return convertExamples11(section);
12156
+ case "context":
12157
+ return convertContext11(section);
12158
+ case "custom":
12159
+ if (!section.editorType) {
12160
+ return section.content;
12161
+ }
12162
+ warnings.push(`Custom ${section.editorType} section skipped`);
12163
+ return "";
12164
+ default:
12165
+ return "";
12166
+ }
12167
+ }
12168
+ function convertInstructions11(section) {
12169
+ const lines = [];
12170
+ lines.push(`## ${section.title}`);
12171
+ lines.push("");
12172
+ lines.push(section.content);
12173
+ return lines.join("\n");
12174
+ }
12175
+ function convertRules11(section) {
12176
+ const lines = [];
12177
+ lines.push(`## ${section.title}`);
12178
+ lines.push("");
12179
+ section.items.forEach((rule, index) => {
12180
+ const prefix = section.ordered ? `${index + 1}.` : "-";
12181
+ lines.push(`${prefix} ${rule.content}`);
12182
+ if (rule.rationale) {
12183
+ lines.push(` - Rationale: ${rule.rationale}`);
12184
+ }
12185
+ if (rule.examples && rule.examples.length > 0) {
12186
+ rule.examples.forEach((example) => {
12187
+ lines.push(` - Example: \`${example}\``);
12188
+ });
12189
+ }
12190
+ });
12191
+ return lines.join("\n");
12192
+ }
12193
+ function convertExamples11(section) {
12194
+ const lines = [];
12195
+ lines.push(`## ${section.title}`);
12196
+ lines.push("");
12197
+ section.examples.forEach((example) => {
12198
+ if (example.good === false) {
12199
+ lines.push(`### \u274C Avoid: ${example.description}`);
12200
+ } else if (example.good === true) {
12201
+ lines.push(`### \u2705 Preferred: ${example.description}`);
12202
+ } else {
12203
+ lines.push(`### ${example.description}`);
12204
+ }
12205
+ lines.push("");
12206
+ const lang = example.language || "";
12207
+ lines.push("```" + lang);
12208
+ lines.push(example.code);
12209
+ lines.push("```");
12210
+ lines.push("");
12211
+ });
12212
+ return lines.join("\n");
12213
+ }
12214
+ function convertContext11(section) {
12215
+ const lines = [];
12216
+ lines.push(`## ${section.title}`);
12217
+ lines.push("");
12218
+ lines.push(section.content);
12219
+ return lines.join("\n");
12220
+ }
12221
+ var init_to_replit = __esm({
12222
+ "../converters/dist/to-replit.js"() {
12223
+ "use strict";
12224
+ init_cjs_shims();
11389
12225
  }
11390
12226
  });
11391
12227
 
@@ -11776,8 +12612,9 @@ async function handleInstall(packageSpec, options) {
11776
12612
  throw new CLIError(`Failed to parse ${pkg.format} format: ${error2.message}`);
11777
12613
  }
11778
12614
  let convertedContent;
12615
+ const targetFormat2 = format == null ? void 0 : format.toLowerCase();
11779
12616
  try {
11780
- switch (format) {
12617
+ switch (targetFormat2) {
11781
12618
  case "cursor":
11782
12619
  const cursorResult = toCursor(canonicalPkg);
11783
12620
  convertedContent = cursorResult.content;
@@ -11814,8 +12651,35 @@ async function handleInstall(packageSpec, options) {
11814
12651
  const geminiResult = toGemini(canonicalPkg);
11815
12652
  convertedContent = geminiResult.content;
11816
12653
  break;
12654
+ case "ruler":
12655
+ convertedContent = toRuler(canonicalPkg).content;
12656
+ break;
12657
+ case "opencode":
12658
+ convertedContent = toOpencode(canonicalPkg).content;
12659
+ break;
12660
+ case "droid":
12661
+ convertedContent = toDroid(canonicalPkg).content;
12662
+ break;
12663
+ case "trae":
12664
+ convertedContent = toTrae(canonicalPkg).content;
12665
+ break;
12666
+ case "aider":
12667
+ convertedContent = toAider(canonicalPkg).content;
12668
+ break;
12669
+ case "zencoder":
12670
+ convertedContent = toZencoder(canonicalPkg).content;
12671
+ break;
12672
+ case "replit":
12673
+ convertedContent = toReplit(canonicalPkg).content;
12674
+ break;
12675
+ case "generic":
12676
+ convertedContent = toCursor(canonicalPkg).content;
12677
+ break;
12678
+ case "canonical":
12679
+ convertedContent = JSON.stringify(canonicalPkg, null, 2);
12680
+ break;
11817
12681
  default:
11818
- throw new CLIError(`Unsupported target format for conversion: ${format}`);
12682
+ throw new CLIError(`Unsupported target format for conversion: ${targetFormat2 || format}`);
11819
12683
  }
11820
12684
  } catch (error2) {
11821
12685
  throw new CLIError(`Failed to convert to ${format} format: ${error2.message}`);
@@ -11901,6 +12765,16 @@ async function handleInstall(packageSpec, options) {
11901
12765
  }
11902
12766
  } else if (effectiveFormat === "kiro" && effectiveSubtype === "hook") {
11903
12767
  destPath = `${destDir}/${packageName}.kiro.hook`;
12768
+ } else if (effectiveFormat === "aider") {
12769
+ if (effectiveSubtype === "skill") {
12770
+ destPath = `${destDir}/SKILL.md`;
12771
+ } else if (effectiveSubtype === "agent") {
12772
+ destPath = `${destDir}/AGENT.md`;
12773
+ } else {
12774
+ destPath = `${destDir}/CONVENTIONS.md`;
12775
+ }
12776
+ } else if (effectiveFormat === "droid" && effectiveSubtype === "skill") {
12777
+ destPath = `${destDir}/SKILL.md`;
11904
12778
  } else {
11905
12779
  destPath = `${destDir}/${packageName}.${fileExtension}`;
11906
12780
  }
@@ -12057,7 +12931,7 @@ ${afterFrontmatter}`;
12057
12931
  }
12058
12932
  }
12059
12933
  let progressiveDisclosureMetadata;
12060
- if ((effectiveFormat === "agents.md" || effectiveFormat === "gemini.md" || effectiveFormat === "claude.md") && (effectiveSubtype === "skill" || effectiveSubtype === "agent") && !options.noAppend) {
12934
+ if ((effectiveFormat === "agents.md" || effectiveFormat === "gemini.md" || effectiveFormat === "claude.md" || effectiveFormat === "aider") && (effectiveSubtype === "skill" || effectiveSubtype === "agent") && !options.noAppend) {
12061
12935
  if (!destDir) {
12062
12936
  throw new Error("Internal error: destDir not set for progressive disclosure installation");
12063
12937
  }
@@ -12303,10 +13177,20 @@ async function installFromLockfile(options) {
12303
13177
  }
12304
13178
  function createInstallCommand() {
12305
13179
  const command = new import_commander11.Command("install");
12306
- command.description("Install a package from the registry, or install all packages from prpm.lock if no package specified").argument("[package]", "Package to install (e.g., react-rules or react-rules@1.2.0). If omitted, installs all packages from prpm.lock").option("--version <version>", "Specific version to install").option("--as <format>", "Convert and install in specific format (cursor, claude, continue, windsurf, copilot, kiro, agents.md, gemini.md, claude.md, canonical)").option("--format <format>", "Alias for --as").option("--location <path>", "Custom location for installed files (Agents.md or nested Cursor rules)").option("--subtype <subtype>", "Specify subtype when converting (skill, agent, rule, etc.)").option("--frozen-lockfile", "Fail if lock file needs to be updated (for CI)").option("--no-append", "Skip adding skill to manifest file (skill files only)").option("--manifest-file <filename>", "Custom manifest filename for progressive disclosure (default: AGENTS.md)", "AGENTS.md").action(async (packageSpec, options) => {
13180
+ command.description("Install a package from the registry, or install all packages from prpm.lock if no package specified").argument("[package]", "Package to install (e.g., react-rules or react-rules@1.2.0). If omitted, installs all packages from prpm.lock").option("--version <version>", "Specific version to install").option("--as <format>", `Convert and install in specific format (${import_types.FORMATS.join(", ")})`).option("--format <format>", "Alias for --as").option("--location <path>", "Custom location for installed files (Agents.md or nested Cursor rules)").option("--subtype <subtype>", "Specify subtype when converting (skill, agent, rule, etc.)").option("--frozen-lockfile", "Fail if lock file needs to be updated (for CI)").option("--no-append", "Skip adding skill to manifest file (skill files only)").option("--manifest-file <filename>", "Custom manifest filename for progressive disclosure").action(async (packageSpec, options) => {
12307
13181
  const convertTo = options.format || options.as;
12308
- if (convertTo && !["cursor", "claude", "continue", "windsurf", "copilot", "kiro", "agents.md", "gemini.md", "claude.md", "canonical", "gemini"].includes(convertTo)) {
12309
- throw new CLIError("\u274C Format must be one of: cursor, claude, continue, windsurf, copilot, kiro, agents.md, canonical, gemini\n\n\u{1F4A1} Examples:\n prpm install my-package --as cursor # Convert to Cursor format\n prpm install my-package --format claude # Convert to Claude format\n prpm install my-package --format kiro # Convert to Kiro format\n prpm install my-package --format agents.md # Convert to Agents.md format\n prpm install my-package # Install in native format", 1);
13182
+ const validFormats = import_types.FORMATS;
13183
+ if (convertTo && !validFormats.includes(convertTo)) {
13184
+ throw new CLIError(`\u274C Format must be one of: ${validFormats.join(", ")}
13185
+
13186
+ \u{1F4A1} Examples:
13187
+ prpm install my-package --as cursor # Convert to Cursor format
13188
+ prpm install my-package --format claude # Convert to Claude format
13189
+ prpm install my-package --format claude.md # Convert to Claude.md format
13190
+ prpm install my-package --format kiro # Convert to Kiro format
13191
+ prpm install my-package --format agents.md # Convert to Agents.md format
13192
+ prpm install my-package --format gemini.md # Convert to Gemini format
13193
+ prpm install my-package # Install in native format`, 1);
12310
13194
  }
12311
13195
  if (!packageSpec) {
12312
13196
  await installFromLockfile({
@@ -12340,6 +13224,7 @@ var init_install = __esm({
12340
13224
  init_user_config();
12341
13225
  init_filesystem();
12342
13226
  init_telemetry();
13227
+ init_types();
12343
13228
  import_stream = require("stream");
12344
13229
  import_promises = require("stream/promises");
12345
13230
  tar = __toESM(require("tar"));
@@ -12522,6 +13407,7 @@ init_cjs_shims();
12522
13407
  var import_commander2 = require("commander");
12523
13408
  init_lockfile();
12524
13409
  init_filesystem();
13410
+ init_types();
12525
13411
  var import_fs7 = require("fs");
12526
13412
  init_errors();
12527
13413
  init_agents_md_progressive();
@@ -12554,6 +13440,10 @@ async function promptForFormat(packageId, formats) {
12554
13440
  }
12555
13441
  async function handleUninstall(name, options = {}) {
12556
13442
  try {
13443
+ const requestedFormat = options.format || options.as;
13444
+ if (requestedFormat && !import_types.FORMATS.includes(requestedFormat)) {
13445
+ throw new CLIError(`\u274C Format must be one of: ${import_types.FORMATS.join(", ")}`, 1);
13446
+ }
12557
13447
  const lockfile = await readLockfile();
12558
13448
  if (!lockfile) {
12559
13449
  throw new CLIError("\u274C No prpm.lock file found", 1);
@@ -12569,13 +13459,13 @@ async function handleUninstall(name, options = {}) {
12569
13459
  throw new CLIError(`\u274C Package "${name}" not found`, 1);
12570
13460
  }
12571
13461
  let keysToUninstall;
12572
- if (options.format) {
12573
- const requestedKey = getLockfileKey(name, options.format);
13462
+ if (requestedFormat) {
13463
+ const requestedKey = getLockfileKey(name, requestedFormat);
12574
13464
  if (!lockfile.packages[requestedKey]) {
12575
- if (lockfile.packages[name] && lockfile.packages[name].format === options.format) {
13465
+ if (lockfile.packages[name] && lockfile.packages[name].format === requestedFormat) {
12576
13466
  keysToUninstall = [name];
12577
13467
  } else {
12578
- throw new CLIError(`\u274C Package "${name}" with format "${options.format}" not found`, 1);
13468
+ throw new CLIError(`\u274C Package "${name}" with format "${requestedFormat}" not found`, 1);
12579
13469
  }
12580
13470
  } else {
12581
13471
  keysToUninstall = [requestedKey];
@@ -12688,7 +13578,7 @@ async function handleUninstall(name, options = {}) {
12688
13578
  }
12689
13579
  function createUninstallCommand() {
12690
13580
  const command = new import_commander2.Command("uninstall");
12691
- command.description("Uninstall a prompt package").argument("<id>", "Package ID to uninstall").option("--format <format>", "Specific format to uninstall (if multiple formats installed)").alias("remove").action(handleUninstall);
13581
+ command.description("Uninstall a prompt package").argument("<id>", "Package ID to uninstall").option("--format <format>", "Specific format to uninstall (if multiple formats installed)").option("--as <format>", "Alias for --format (use when multiple formats are installed)").alias("remove").action(handleUninstall);
12692
13582
  return command;
12693
13583
  }
12694
13584
 
@@ -12934,6 +13824,7 @@ var import_commander5 = require("commander");
12934
13824
  var import_registry_client = require("@pr-pm/registry-client");
12935
13825
  init_user_config();
12936
13826
  init_telemetry();
13827
+ init_types();
12937
13828
  init_errors();
12938
13829
  async function handleTrending(options) {
12939
13830
  const startTime = Date.now();
@@ -12987,12 +13878,12 @@ async function handleTrending(options) {
12987
13878
  }
12988
13879
  function createTrendingCommand() {
12989
13880
  const command = new import_commander5.Command("trending");
12990
- command.description("Show trending packages").option("--format <format>", "Filter by format (cursor, claude, continue, windsurf, copilot, kiro, agents.md, generic)").option("--subtype <subtype>", "Filter by subtype (rule, agent, skill, slash-command, prompt, workflow, tool, template, collection, chatmode, hook)").option("--limit <number>", "Number of packages to show", "10").action(async (options) => {
13881
+ command.description("Show trending packages").option("--format <format>", `Filter by format (${import_types.FORMATS.join(", ")})`).option("--subtype <subtype>", `Filter by subtype (${import_types.SUBTYPES.join(", ")})`).option("--limit <number>", "Number of packages to show", "10").action(async (options) => {
12991
13882
  const format = options.format;
12992
13883
  const subtype = options.subtype;
12993
13884
  const limit = options.limit ? parseInt(options.limit, 10) : 10;
12994
- const validFormats = ["cursor", "claude", "continue", "windsurf", "copilot", "kiro", "agents.md", "generic", "mcp"];
12995
- const validSubtypes = ["rule", "agent", "skill", "slash-command", "prompt", "workflow", "tool", "template", "collection", "chatmode", "hook"];
13885
+ const validFormats = import_types.FORMATS;
13886
+ const validSubtypes = import_types.SUBTYPES;
12996
13887
  if (options.format && !validFormats.includes(format)) {
12997
13888
  console.error(`\u274C Format must be one of: ${validFormats.join(", ")}`);
12998
13889
  throw new CLIError(`\u274C Format must be one of: ${validFormats.join(", ")}`, 1);
@@ -13026,6 +13917,7 @@ var import_commander7 = require("commander");
13026
13917
  var import_registry_client2 = require("@pr-pm/registry-client");
13027
13918
  init_user_config();
13028
13919
  init_telemetry();
13920
+ init_types();
13029
13921
  var readline2 = __toESM(require("readline"));
13030
13922
  init_errors();
13031
13923
  function getPackageIcon(format, subtype) {
@@ -13371,14 +14263,14 @@ Try:`);
13371
14263
  }
13372
14264
  function createSearchCommand() {
13373
14265
  const command = new import_commander7.Command("search");
13374
- command.description("Search for packages in the registry").argument("[query]", "Search query (optional when using --format/--subtype or --author)").option("--format <format>", "Filter by package format (cursor, claude, continue, windsurf, copilot, kiro, agents.md, generic, mcp)").option("--subtype <subtype>", "Filter by package subtype (rule, agent, skill, slash-command, prompt, workflow, tool, template, collection, chatmode, hook)").option("--author <username>", "Filter by author username").option("--language <language>", "Filter by programming language (javascript, typescript, python, etc.)").option("--framework <framework>", "Filter by framework (react, nextjs, django, etc.)").option("--limit <number>", "Number of results per page", "20").option("--page <number>", "Page number (default: 1)", "1").option("--interactive", "Enable interactive pagination (default: true for multiple pages)", true).option("--no-interactive", "Disable interactive pagination").action(async (query, options) => {
14266
+ command.description("Search for packages in the registry").argument("[query]", "Search query (optional when using --format/--subtype or --author)").option("--format <format>", `Filter by package format (${import_types.FORMATS.join(", ")})`).option("--subtype <subtype>", `Filter by package subtype (${import_types.SUBTYPES.join(", ")})`).option("--author <username>", "Filter by author username").option("--language <language>", "Filter by programming language (javascript, typescript, python, etc.)").option("--framework <framework>", "Filter by framework (react, nextjs, django, etc.)").option("--limit <number>", "Number of results per page", "20").option("--page <number>", "Page number (default: 1)", "1").option("--interactive", "Enable interactive pagination (default: true for multiple pages)", true).option("--no-interactive", "Disable interactive pagination").action(async (query, options) => {
13375
14267
  const format = options.format;
13376
14268
  const subtype = options.subtype;
13377
14269
  const author = options.author;
13378
14270
  const limit = options.limit ? parseInt(options.limit, 10) : 20;
13379
14271
  const page = options.page ? parseInt(options.page, 10) : 1;
13380
- const validFormats = ["cursor", "claude", "continue", "windsurf", "copilot", "kiro", "agents.md", "generic", "mcp"];
13381
- const validSubtypes = ["rule", "agent", "skill", "slash-command", "prompt", "workflow", "tool", "template", "collection", "chatmode", "hook"];
14272
+ const validFormats = [...import_types.FORMATS];
14273
+ const validSubtypes = [...import_types.SUBTYPES];
13382
14274
  if (options.format && !validFormats.includes(format)) {
13383
14275
  console.error(`\u274C Format must be one of: ${validFormats.join(", ")}`);
13384
14276
  throw new CLIError(`\u274C Format must be one of: ${validFormats.join(", ")}`, 1);
@@ -15522,12 +16414,7 @@ var import_path15 = require("path");
15522
16414
  var import_fs12 = require("fs");
15523
16415
  var readline4 = __toESM(require("readline/promises"));
15524
16416
  var import_process = require("process");
15525
-
15526
- // src/types.ts
15527
- init_cjs_shims();
15528
- var import_types = require("@pr-pm/types");
15529
-
15530
- // src/commands/init.ts
16417
+ init_types();
15531
16418
  init_errors();
15532
16419
  var FORMAT_EXAMPLES = {
15533
16420
  cursor: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prpm",
3
- "version": "1.1.10",
3
+ "version": "1.1.11",
4
4
  "description": "Prompt Package Manager CLI - Install and manage prompt-based files",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -45,9 +45,9 @@
45
45
  "license": "MIT",
46
46
  "dependencies": {
47
47
  "@octokit/rest": "^22.0.0",
48
- "@pr-pm/converters": "^1.1.10",
49
- "@pr-pm/registry-client": "^2.1.10",
50
- "@pr-pm/types": "^1.1.10",
48
+ "@pr-pm/converters": "^1.1.11",
49
+ "@pr-pm/registry-client": "^2.1.11",
50
+ "@pr-pm/types": "^1.1.11",
51
51
  "ajv": "^8.17.1",
52
52
  "ajv-formats": "^3.0.1",
53
53
  "commander": "^11.1.0",