@gobing-ai/superskill 0.1.6 → 0.1.7

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 +17 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -96028,16 +96028,27 @@ function convertCanonicalToPiHooks(config3) {
96028
96028
  const piHooks = {};
96029
96029
  const canonicalHooks = config3.hooks ?? {};
96030
96030
  for (const [canonicalEvent, definitions] of Object.entries(canonicalHooks)) {
96031
- const piEvent = CANONICAL_TO_PI_EVENT[canonicalEvent];
96031
+ const normalized = canonicalEvent.charAt(0).toLowerCase() + canonicalEvent.slice(1);
96032
+ const piEvent = CANONICAL_TO_PI_EVENT[normalized];
96032
96033
  if (!piEvent)
96033
96034
  continue;
96034
96035
  const commands = [];
96035
96036
  for (const def of definitions) {
96036
- if (def.type && def.type !== "command")
96037
- continue;
96038
- if (!def.command)
96039
- continue;
96040
- commands.push(def.timeout ? { command: def.command, timeout: def.timeout } : def.command);
96037
+ if (def.hooks) {
96038
+ for (const entry of def.hooks) {
96039
+ if (entry.type && entry.type !== "command")
96040
+ continue;
96041
+ if (!entry.command)
96042
+ continue;
96043
+ commands.push(entry.timeout ? { command: entry.command, timeout: entry.timeout } : entry.command);
96044
+ }
96045
+ } else {
96046
+ if (def.type && def.type !== "command")
96047
+ continue;
96048
+ if (!def.command)
96049
+ continue;
96050
+ commands.push(def.timeout ? { command: def.command, timeout: def.timeout } : def.command);
96051
+ }
96041
96052
  }
96042
96053
  if (commands.length > 0) {
96043
96054
  piHooks[piEvent] = commands;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gobing-ai/superskill",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "A manager for multi-agent skill, slash command, subagent, hook, MCP and etc.",
5
5
  "keywords": [
6
6
  "cli",