@storacha/clawracha 0.3.10 ā 0.3.11
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/plugin.d.ts.map +1 -1
- package/dist/plugin.js +6 -2
- package/package.json +1 -1
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EACV,iBAAiB,EAGlB,MAAM,qBAAqB,CAAC;AA6B7B,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,GAAG,EAAE,iBAAiB,QAglBpD"}
|
package/dist/plugin.js
CHANGED
|
@@ -12,6 +12,10 @@ import { SyncEngine } from "./sync.js";
|
|
|
12
12
|
import { resolveAgentWorkspace, getAgentIds } from "./utils/workspace.js";
|
|
13
13
|
import * as z from "zod";
|
|
14
14
|
import { loadDeviceConfig, startWorkspaceSync, doInit, doSetup, doJoin, doGrant, } from "./commands.js";
|
|
15
|
+
import { CID } from "multiformats/basics";
|
|
16
|
+
import { CAR } from "@ucanto/core";
|
|
17
|
+
import { identity } from "multiformats/hashes/identity";
|
|
18
|
+
import { base64 } from "multiformats/bases/base64";
|
|
15
19
|
const activeSyncers = new Map();
|
|
16
20
|
// --- Config helpers ---
|
|
17
21
|
const UpdateParams = z.object({
|
|
@@ -289,9 +293,9 @@ export default function plugin(api) {
|
|
|
289
293
|
console.log(`\nš„ Delegation bundle written to ${opts.output}`);
|
|
290
294
|
}
|
|
291
295
|
else {
|
|
292
|
-
const
|
|
296
|
+
const idCid = CID.createV1(CAR.code, identity.digest(bundleBytes));
|
|
293
297
|
console.log(`\nš„ Delegation bundle for ${targetDID}:\n`);
|
|
294
|
-
console.log(base64);
|
|
298
|
+
console.log(idCid.toString(base64));
|
|
295
299
|
}
|
|
296
300
|
console.log("\nThe target device should run:");
|
|
297
301
|
console.log(` openclaw clawracha join <bundle> --agent <id>`);
|