prpm 2.1.14 → 2.1.15

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 +19 -4
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -7290,6 +7290,15 @@ function fromOpencode(content, metadata) {
7290
7290
  disable: fm.disable
7291
7291
  };
7292
7292
  }
7293
+ if (fm.template) {
7294
+ metadataSection.data.opencodeSlashCommand = {
7295
+ template: fm.template,
7296
+ description: fm.description,
7297
+ agent: fm.agent,
7298
+ model: fm.model,
7299
+ subtask: fm.subtask
7300
+ };
7301
+ }
7293
7302
  sections.push(metadataSection);
7294
7303
  if (fm.tools) {
7295
7304
  const enabledTools = Object.entries(fm.tools).filter(([_, enabled]) => enabled === true).map(([tool, _]) => {
@@ -7303,7 +7312,11 @@ function fromOpencode(content, metadata) {
7303
7312
  "webfetch": "WebFetch",
7304
7313
  "websearch": "WebSearch"
7305
7314
  };
7306
- return toolMap[tool.toLowerCase()] || tool;
7315
+ const normalized = toolMap[tool.toLowerCase()];
7316
+ if (normalized) {
7317
+ return normalized;
7318
+ }
7319
+ return tool.charAt(0).toUpperCase() + tool.slice(1).toLowerCase();
7307
7320
  });
7308
7321
  if (enabledTools.length > 0) {
7309
7322
  const toolsSection = {
@@ -7325,6 +7338,9 @@ function fromOpencode(content, metadata) {
7325
7338
  version: "1.0",
7326
7339
  sections
7327
7340
  };
7341
+ const templateValue = fm.template;
7342
+ const isSlashCommand = typeof templateValue === "string" && templateValue.trim().length > 0;
7343
+ const detectedSubtype = isSlashCommand ? "slash-command" : "agent";
7328
7344
  const pkg = {
7329
7345
  ...metadata,
7330
7346
  id: metadata.id,
@@ -7334,11 +7350,10 @@ function fromOpencode(content, metadata) {
7334
7350
  description: metadata.description || fm.description || "",
7335
7351
  tags: metadata.tags || [],
7336
7352
  format: "opencode",
7337
- subtype: "agent",
7338
- // OpenCode only supports agents
7353
+ subtype: detectedSubtype,
7339
7354
  content: canonicalContent
7340
7355
  };
7341
- setTaxonomy(pkg, "opencode", "agent");
7356
+ setTaxonomy(pkg, "opencode", detectedSubtype);
7342
7357
  return pkg;
7343
7358
  }
7344
7359
  var init_from_opencode = __esm({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prpm",
3
- "version": "2.1.14",
3
+ "version": "2.1.15",
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.15",
49
- "@pr-pm/registry-client": "^2.3.14",
50
- "@pr-pm/types": "^2.1.15",
48
+ "@pr-pm/converters": "^2.1.16",
49
+ "@pr-pm/registry-client": "^2.3.15",
50
+ "@pr-pm/types": "^2.1.16",
51
51
  "ajv": "^8.17.1",
52
52
  "ajv-formats": "^3.0.1",
53
53
  "commander": "^11.1.0",