@simonfestl/husky-cli 1.29.2 → 1.30.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.
@@ -86,11 +86,11 @@ export async function fetchAndCacheRole() {
86
86
  let res = await fetch(url.toString(), {
87
87
  headers: { "x-api-key": config.apiKey },
88
88
  });
89
- // If role-specific endpoint fails, fall back to whoami
90
- if (!res.ok) {
89
+ // If role-specific endpoint fails, fall back to whoami with session token
90
+ if (!res.ok && config.sessionToken) {
91
91
  url = new URL("/api/auth/whoami", config.apiUrl);
92
92
  res = await fetch(url.toString(), {
93
- headers: { "x-api-key": config.apiKey },
93
+ headers: { "Authorization": `Bearer ${config.sessionToken}` },
94
94
  });
95
95
  }
96
96
  if (res.ok) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simonfestl/husky-cli",
3
- "version": "1.29.2",
3
+ "version": "1.30.1",
4
4
  "description": "CLI for Huskyv0 Task Orchestration with Claude Agent SDK",
5
5
  "type": "module",
6
6
  "bin": {