@clawos-dev/clawd 0.2.71-beta.130.ea9dc82 → 0.2.71-beta.132.6fed21c
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.
- package/dist/cli.cjs +14 -5
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -28664,11 +28664,20 @@ function buildWhoamiHandler(deps) {
|
|
|
28664
28664
|
capability = stripSecretHash(cap);
|
|
28665
28665
|
}
|
|
28666
28666
|
const grantedPersonas = [];
|
|
28667
|
-
|
|
28668
|
-
|
|
28669
|
-
const
|
|
28670
|
-
|
|
28671
|
-
|
|
28667
|
+
const hasWildcard = capability.grants.some((g2) => g2.resource.type === "*");
|
|
28668
|
+
if (hasWildcard) {
|
|
28669
|
+
for (const id of deps.personaStore.list()) {
|
|
28670
|
+
const file = deps.personaStore.read(id);
|
|
28671
|
+
if (!file) continue;
|
|
28672
|
+
grantedPersonas.push({ id: file.personaId, displayName: file.label });
|
|
28673
|
+
}
|
|
28674
|
+
} else {
|
|
28675
|
+
for (const g2 of capability.grants) {
|
|
28676
|
+
if (g2.resource.type !== "persona") continue;
|
|
28677
|
+
const file = deps.personaStore.read(g2.resource.id);
|
|
28678
|
+
if (!file) continue;
|
|
28679
|
+
grantedPersonas.push({ id: file.personaId, displayName: file.label });
|
|
28680
|
+
}
|
|
28672
28681
|
}
|
|
28673
28682
|
return {
|
|
28674
28683
|
response: {
|
package/package.json
CHANGED