@storacha/clawracha 0.1.21 → 0.1.23

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.
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,KAAK,EACV,iBAAiB,EAIlB,MAAM,qBAAqB,CAAC;AAkJ7B,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,GAAG,EAAE,iBAAiB,QAwmBpD"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,KAAK,EACV,iBAAiB,EAIlB,MAAM,qBAAqB,CAAC;AAmJ7B,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,GAAG,EAAE,iBAAiB,QAqmBpD"}
package/dist/plugin.js CHANGED
@@ -17,6 +17,7 @@ import { resolveAgentWorkspace, getAgentIds } from "./utils/workspace.js";
17
17
  import { Agent, Name } from "@storacha/ucn/pail";
18
18
  import { extract } from "@storacha/client/delegation";
19
19
  import * as z from "zod";
20
+ import { spaceAccess } from "@storacha/client/capability/access";
20
21
  const activeSyncers = new Map();
21
22
  // --- Config helpers ---
22
23
  const UpdateParams = z.object({
@@ -446,12 +447,9 @@ export default function plugin(api) {
446
447
  const audience = {
447
448
  did: () => targetDID,
448
449
  };
449
- const uploadDel = await storachaClient.createDelegation(audience, [
450
- "space/blob/add",
451
- "space/index/add",
452
- "upload/add",
453
- "filecoin/offer",
454
- ]);
450
+ const uploadDel = await storachaClient.createDelegation(audience,
451
+ // @ts-expect-error createDelegation should validate abilities
452
+ Object.keys(spaceAccess), { expiration: Infinity });
455
453
  const { ok: archiveBytes } = await uploadDel.archive();
456
454
  if (archiveBytes) {
457
455
  results.push(`Upload delegation:\n${encodeDelegation(archiveBytes)}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storacha/clawracha",
3
- "version": "0.1.21",
3
+ "version": "0.1.23",
4
4
  "description": "OpenClaw plugin for Storacha workspace sync via UCN Pail",
5
5
  "type": "module",
6
6
  "files": [