prpm 2.1.27 → 2.1.29
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/index.js +33 -20
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -8696,7 +8696,7 @@ function parseFrontmatter8(content) {
|
|
|
8696
8696
|
}
|
|
8697
8697
|
function parseAllowedTools(toolsString) {
|
|
8698
8698
|
return toolsString.split(/\s+/).filter(Boolean).map((tool) => {
|
|
8699
|
-
const match = tool.match(/^([A-Za-
|
|
8699
|
+
const match = tool.match(/^([A-Za-z0-9_.-]+)(?:\([^)]*\))?$/);
|
|
8700
8700
|
return match ? match[1] : tool;
|
|
8701
8701
|
}).filter((tool, index, arr) => arr.indexOf(tool) === index);
|
|
8702
8702
|
}
|
|
@@ -12889,6 +12889,9 @@ function generateFilename2(pkg) {
|
|
|
12889
12889
|
if ((pkg == null ? void 0 : pkg.subtype) === "skill") {
|
|
12890
12890
|
return "SKILL.md";
|
|
12891
12891
|
}
|
|
12892
|
+
if ((pkg == null ? void 0 : pkg.subtype) === "agent") {
|
|
12893
|
+
return "AGENT.md";
|
|
12894
|
+
}
|
|
12892
12895
|
return "AGENTS.md";
|
|
12893
12896
|
}
|
|
12894
12897
|
function isCodexSkillFormat(content) {
|
|
@@ -13489,7 +13492,7 @@ var init_format_registry = __esm({
|
|
|
13489
13492
|
fileExtension: ".md"
|
|
13490
13493
|
},
|
|
13491
13494
|
skill: {
|
|
13492
|
-
directory: ".
|
|
13495
|
+
directory: ".agents/skills",
|
|
13493
13496
|
filePatterns: ["SKILL.md"],
|
|
13494
13497
|
nested: true,
|
|
13495
13498
|
nestedIndicator: "SKILL.md",
|
|
@@ -13497,7 +13500,7 @@ var init_format_registry = __esm({
|
|
|
13497
13500
|
fileExtension: ".md"
|
|
13498
13501
|
},
|
|
13499
13502
|
agent: {
|
|
13500
|
-
directory: ".
|
|
13503
|
+
directory: ".agents/agents",
|
|
13501
13504
|
filePatterns: ["AGENT.md"],
|
|
13502
13505
|
nested: true,
|
|
13503
13506
|
nestedIndicator: "AGENT.md",
|
|
@@ -18541,9 +18544,11 @@ async function installFromLockfile(options) {
|
|
|
18541
18544
|
}
|
|
18542
18545
|
function createInstallCommand() {
|
|
18543
18546
|
const command = new import_commander12.Command("install");
|
|
18544
|
-
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("--hook-mapping <strategy>", "Hook mapping strategy: auto (default), strict, skip", "auto").option("--frozen-lockfile", "Fail if lock file needs to be updated (for CI)").option("-y, --yes", "Auto-confirm prompts (overwrite files without asking)").option("--no-append", "Skip adding skill to manifest file (skill files only)").option("--manifest-file <filename>", "Custom manifest filename for progressive disclosure").option("--eager", "Force skill/agent to always activate (not on-demand)").option("--lazy", "Use default on-demand activation (overrides package eager setting)").option("--global", "Install MCP servers to global config (e.g., ~/.claude/settings.json, ~/.codex/config.toml, ~/.cursor/mcp.json, ~/.kiro/settings/mcp.json)").option("--editor <editor>", "Target editor for MCP server installation
|
|
18545
|
-
const
|
|
18547
|
+
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("--hook-mapping <strategy>", "Hook mapping strategy: auto (default), strict, skip", "auto").option("--frozen-lockfile", "Fail if lock file needs to be updated (for CI)").option("-y, --yes", "Auto-confirm prompts (overwrite files without asking)").option("--no-append", "Skip adding skill to manifest file (skill files only)").option("--manifest-file <filename>", "Custom manifest filename for progressive disclosure").option("--eager", "Force skill/agent to always activate (not on-demand)").option("--lazy", "Use default on-demand activation (overrides package eager setting)").option("--global", "Install MCP servers to global config (e.g., ~/.claude/settings.json, ~/.codex/config.toml, ~/.cursor/mcp.json, ~/.kiro/settings/mcp.json)").option("--editor <editor>", "[Deprecated: use --as] Target editor for MCP server installation").action(async (packageSpec, options) => {
|
|
18548
|
+
const rawAs = options.format || options.as;
|
|
18546
18549
|
const validFormats = import_types.FORMATS;
|
|
18550
|
+
const isMCPEditorOnly = rawAs && !validFormats.includes(rawAs) && MCP_EDITORS.includes(rawAs);
|
|
18551
|
+
const convertTo = isMCPEditorOnly ? void 0 : rawAs;
|
|
18547
18552
|
if (convertTo && !validFormats.includes(convertTo)) {
|
|
18548
18553
|
throw new CLIError(`\u274C Format must be one of: ${validFormats.join(", ")}
|
|
18549
18554
|
|
|
@@ -18554,8 +18559,10 @@ function createInstallCommand() {
|
|
|
18554
18559
|
prpm install my-package --format kiro # Convert to Kiro format
|
|
18555
18560
|
prpm install my-package --format agents.md # Convert to Agents.md format
|
|
18556
18561
|
prpm install my-package --format gemini.md # Convert to Gemini format
|
|
18562
|
+
prpm install my-mcp-server --as codex # Install MCP server to Codex
|
|
18557
18563
|
prpm install my-package # Install in native format`, 1);
|
|
18558
18564
|
}
|
|
18565
|
+
const mcpEditor = options.editor || rawAs;
|
|
18559
18566
|
if (options.editor && !MCP_EDITORS.includes(options.editor)) {
|
|
18560
18567
|
throw new CLIError(
|
|
18561
18568
|
`Invalid MCP editor: ${options.editor}
|
|
@@ -18563,17 +18570,17 @@ function createInstallCommand() {
|
|
|
18563
18570
|
Supported editors: ${MCP_EDITORS.join(", ")}
|
|
18564
18571
|
|
|
18565
18572
|
\u{1F4A1} Examples:
|
|
18566
|
-
prpm install my-mcp-server --
|
|
18567
|
-
prpm install my-mcp-server --
|
|
18568
|
-
prpm install my-mcp-server --
|
|
18569
|
-
prpm install my-mcp-server --
|
|
18570
|
-
prpm install my-mcp-server --
|
|
18571
|
-
prpm install my-mcp-server --
|
|
18572
|
-
prpm install my-mcp-server --
|
|
18573
|
-
prpm install my-mcp-server --
|
|
18574
|
-
prpm install my-mcp-server --
|
|
18575
|
-
prpm install my-mcp-server --
|
|
18576
|
-
prpm install my-mcp-server --
|
|
18573
|
+
prpm install my-mcp-server --as claude # Install to .mcp.json
|
|
18574
|
+
prpm install my-mcp-server --as codex # Install to .codex/config.toml
|
|
18575
|
+
prpm install my-mcp-server --as cursor # Install to .cursor/mcp.json
|
|
18576
|
+
prpm install my-mcp-server --as windsurf # Install to ~/.codeium/windsurf/mcp_config.json
|
|
18577
|
+
prpm install my-mcp-server --as vscode # Install to .vscode/mcp.json
|
|
18578
|
+
prpm install my-mcp-server --as gemini # Install to .gemini/settings.json
|
|
18579
|
+
prpm install my-mcp-server --as opencode # Install to opencode.json
|
|
18580
|
+
prpm install my-mcp-server --as kiro # Install to .kiro/settings/mcp.json
|
|
18581
|
+
prpm install my-mcp-server --as trae # Install to .trae/mcp.json
|
|
18582
|
+
prpm install my-mcp-server --as amp # Install to .amp/settings.json
|
|
18583
|
+
prpm install my-mcp-server --as zed # Install to ~/.config/zed/settings.json`
|
|
18577
18584
|
);
|
|
18578
18585
|
}
|
|
18579
18586
|
if (options.hookMapping && !isValidHookMappingStrategy(options.hookMapping)) {
|
|
@@ -18606,7 +18613,7 @@ Valid strategies: ${VALID_HOOK_MAPPING_STRATEGIES.join(", ")}`
|
|
|
18606
18613
|
hookMapping: options.hookMapping,
|
|
18607
18614
|
eager,
|
|
18608
18615
|
global: options.global,
|
|
18609
|
-
editor:
|
|
18616
|
+
editor: mcpEditor
|
|
18610
18617
|
});
|
|
18611
18618
|
});
|
|
18612
18619
|
return command;
|
|
@@ -25996,7 +26003,10 @@ function getDefaultPath(format, filename, subtype, customName) {
|
|
|
25996
26003
|
return (0, import_path25.join)(process.cwd(), ".factory", `${baseName}.md`);
|
|
25997
26004
|
case "codex":
|
|
25998
26005
|
if (subtype === "skill") {
|
|
25999
|
-
return (0, import_path25.join)(process.cwd(), ".
|
|
26006
|
+
return (0, import_path25.join)(process.cwd(), ".agents", "skills", baseName, "SKILL.md");
|
|
26007
|
+
}
|
|
26008
|
+
if (subtype === "agent") {
|
|
26009
|
+
return (0, import_path25.join)(process.cwd(), ".agents", "agents", baseName, "AGENT.md");
|
|
26000
26010
|
}
|
|
26001
26011
|
return (0, import_path25.join)(process.cwd(), "AGENTS.md");
|
|
26002
26012
|
default:
|
|
@@ -26041,8 +26051,11 @@ function detectFormat(content, filepath) {
|
|
|
26041
26051
|
if (filepath.includes(".zed/extensions") || filepath.includes(".zed/slash_commands")) {
|
|
26042
26052
|
return "zed";
|
|
26043
26053
|
}
|
|
26044
|
-
if (filepath.includes(".
|
|
26045
|
-
return "codex";
|
|
26054
|
+
if (filepath.includes(".agents/skills")) {
|
|
26055
|
+
return "codex-skill";
|
|
26056
|
+
}
|
|
26057
|
+
if (filepath.includes(".agents/agents")) {
|
|
26058
|
+
return "codex-agent";
|
|
26046
26059
|
}
|
|
26047
26060
|
if (isCursorHooksFormat(content)) return "cursor-hooks";
|
|
26048
26061
|
if (isClaudeFormat(content)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prpm",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.29",
|
|
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": "^2.1.
|
|
49
|
-
"@pr-pm/registry-client": "^2.3.
|
|
50
|
-
"@pr-pm/types": "^2.1.
|
|
48
|
+
"@pr-pm/converters": "^2.1.30",
|
|
49
|
+
"@pr-pm/registry-client": "^2.3.29",
|
|
50
|
+
"@pr-pm/types": "^2.1.30",
|
|
51
51
|
"ajv": "^8.17.1",
|
|
52
52
|
"ajv-formats": "^3.0.1",
|
|
53
53
|
"chalk": "^5.6.2",
|