@storacha/clawracha 0.1.11 → 0.1.12

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/plugin.js +5 -5
  2. package/package.json +1 -1
package/dist/plugin.js CHANGED
@@ -420,7 +420,7 @@ export default function plugin(api) {
420
420
  results.push("⚠️ No upload delegation to re-delegate.");
421
421
  }
422
422
  // Re-delegate name capability
423
- if (deviceConfig.nameDelegation) {
423
+ {
424
424
  const { Agent, Name } = await import("@storacha/ucn/pail");
425
425
  const { extract } = await import("@storacha/client/delegation");
426
426
  const agent = Agent.parse(deviceConfig.agentKey);
@@ -429,7 +429,7 @@ export default function plugin(api) {
429
429
  const archiveBytes = decodeDelegation(deviceConfig.nameArchive);
430
430
  name = await Name.extract(agent, archiveBytes);
431
431
  }
432
- else {
432
+ else if (deviceConfig.nameDelegation) {
433
433
  const nameBytes = decodeDelegation(deviceConfig.nameDelegation);
434
434
  const { ok: nameDel } = await extract(nameBytes);
435
435
  if (nameDel) {
@@ -443,9 +443,9 @@ export default function plugin(api) {
443
443
  results.push(`Name delegation:\n${encodeDelegation(archiveBytes)}`);
444
444
  }
445
445
  }
446
- }
447
- else {
448
- results.push("⚠️ No name delegation to re-delegate.");
446
+ else {
447
+ results.push("⚠️ No name state available to grant from.");
448
+ }
449
449
  }
450
450
  console.log(`🔥 Delegations for ${targetDID}:\n`);
451
451
  for (const r of results) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storacha/clawracha",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "OpenClaw plugin for Storacha workspace sync via UCN Pail",
5
5
  "type": "module",
6
6
  "files": [