@liangjie559567/ultrapower 5.4.4 → 5.4.5

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.
@@ -8,11 +8,11 @@
8
8
  {
9
9
  "name": "ultrapower",
10
10
  "description": "Disciplined multi-agent orchestration: workflow enforcement + parallel execution",
11
- "version": "5.4.4",
11
+ "version": "5.4.5",
12
12
  "source": {
13
13
  "source": "npm",
14
14
  "package": "@liangjie559567/ultrapower",
15
- "version": "5.4.4"
15
+ "version": "5.4.5"
16
16
  },
17
17
  "author": {
18
18
  "name": "liangjie559567"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ultrapower",
3
3
  "description": "Disciplined multi-agent orchestration: workflow enforcement + parallel execution. Combines superpowers' TDD/debugging discipline with OMC's multi-agent execution capabilities.",
4
- "version": "5.4.4",
4
+ "version": "5.4.5",
5
5
  "author": {
6
6
  "name": "liangjie559567"
7
7
  },
@@ -16,7 +16,5 @@
16
16
  "orchestration",
17
17
  "workflows",
18
18
  "ultrapower"
19
- ],
20
- "hooks": "./hooks/hooks.json",
21
- "agents": "./agents/"
19
+ ]
22
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liangjie559567/ultrapower",
3
- "version": "5.4.4",
3
+ "version": "5.4.5",
4
4
  "description": "Disciplined multi-agent orchestration: workflow enforcement + parallel execution",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -235,10 +235,13 @@ function fixMissingPluginJson() {
235
235
  const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));
236
236
  const version = pkg.version || '0.0.0';
237
237
 
238
- // Include metadata fields + explicit component path declarations.
239
- // Per official docs, paths must start with './' — auto-discovery constructs paths without
240
- // this prefix, causing Zod validation errors: "hooks: Invalid input, agents: Invalid input".
241
- // Declaring explicit paths prevents auto-discovery from taking over.
238
+ // Metadata-only plugin manifest. Per the Claude Code plugin schema:
239
+ // - hooks/hooks.json is auto-discovered from the hooks/ directory
240
+ // - agents/ directory is auto-discovered automatically
241
+ // - The 'hooks' field is only for ADDITIONAL hooks files (must end with .json)
242
+ // - The 'agents' field is only for ADDITIONAL individual agent .md files (must end with .md)
243
+ // Declaring hooks/agents directory paths here causes Zod validation failures because
244
+ // the schema expects .md files for agents and .json files for hooks, NOT directory paths.
242
245
  const pluginJson = {
243
246
  name: 'ultrapower',
244
247
  description: pkg.description || '',
@@ -248,22 +251,20 @@ function fixMissingPluginJson() {
248
251
  repository: pkg.repository?.url || pkg.repository || '',
249
252
  license: pkg.license || 'MIT',
250
253
  keywords: pkg.keywords || [],
251
- hooks: './hooks/hooks.json',
252
- agents: './agents/',
253
254
  };
254
255
  const pluginJsonStr = JSON.stringify(pluginJson, null, 2);
255
256
 
256
257
  // Detect cache entries that need repair:
257
- // - Missing hooks or agents fields (old clean format from v5.4.3)
258
- // - hooks/agents not declared as relative string paths starting with './'
259
- // - Old invalid inline object/array formats from v5.3.x
258
+ // - Old invalid inline object/array formats from v5.3.x (hooks as object, agents as array)
259
+ // - Old invalid path formats from v5.4.1-v5.4.4 (agents as directory path like './agents/')
260
+ // NOTE: Missing hooks/agents fields is NOT a problem — auto-discovery handles them.
260
261
  function needsRepair(jsonPath) {
261
262
  try {
262
263
  const content = JSON.parse(readFileSync(jsonPath, 'utf-8'));
263
- // hooks must be a string path starting with './'
264
- if (!content.hooks || typeof content.hooks !== 'string' || !content.hooks.startsWith('./')) return true;
265
- // agents must be a string path starting with './'
266
- if (!content.agents || typeof content.agents !== 'string' || !content.agents.startsWith('./')) return true;
264
+ // agents must NOT be a directory path (./agents/ fails r48() which requires .md files)
265
+ if (content.agents && (typeof content.agents !== 'string' || !content.agents.endsWith('.md'))) return true;
266
+ // hooks must NOT be an object/array (inline format is invalid; string path or absent is OK)
267
+ if (content.hooks && typeof content.hooks === 'object') return true;
267
268
  return false;
268
269
  } catch { return false; }
269
270
  }