@simonfestl/husky-cli 1.15.0 → 1.15.1

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.
@@ -13,6 +13,25 @@ import { ExplainTopic } from "./error-hints.js";
13
13
  export function checkPermission(permission) {
14
14
  return hasPermission(permission);
15
15
  }
16
+ /**
17
+ * Permission-specific hints for workers
18
+ */
19
+ const workerPermissionHints = {
20
+ "task:done": [
21
+ "",
22
+ "šŸ’” As a worker, you cannot mark tasks as done directly.",
23
+ " Instead, submit your work for review:",
24
+ "",
25
+ " 1. Set the task to review status:",
26
+ " husky task update <id> --status review",
27
+ "",
28
+ " 2. Or notify the supervisor:",
29
+ " husky task message <id> -m \"Ready for review. PR: <url>\"",
30
+ "",
31
+ " The supervisor will review your work and either forward it to",
32
+ " the review agent or get back to you with feedback.",
33
+ ],
34
+ };
16
35
  /**
17
36
  * Require a specific permission, exit with error if not granted.
18
37
  * Use this at the start of command handlers to enforce RBAC.
@@ -28,7 +47,15 @@ export function requirePermission(permission) {
28
47
  else {
29
48
  console.error("Run 'husky config test' to refresh your role and permissions.");
30
49
  }
31
- console.error(`\nšŸ’” For configuration help: husky explain ${ExplainTopic.CONFIG}`);
50
+ // Show role-specific hints for certain permissions
51
+ if (role === "worker" && workerPermissionHints[permission]) {
52
+ for (const line of workerPermissionHints[permission]) {
53
+ console.error(line);
54
+ }
55
+ }
56
+ else {
57
+ console.error(`\nšŸ’” For configuration help: husky explain ${ExplainTopic.CONFIG}`);
58
+ }
32
59
  process.exit(1);
33
60
  }
34
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simonfestl/husky-cli",
3
- "version": "1.15.0",
3
+ "version": "1.15.1",
4
4
  "description": "CLI for Huskyv0 Task Orchestration with Claude Agent SDK",
5
5
  "type": "module",
6
6
  "bin": {