@highway1/cli 0.1.39 → 0.1.40
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/bin/clawiverse.js +2 -0
- package/dist/index.js +17 -5
- package/dist/index.js.map +1 -1
- package/package.json +21 -9
- package/src/commands/card.ts +99 -0
- package/src/commands/discover.ts +168 -0
- package/src/commands/identity.ts +37 -0
- package/src/commands/init.ts +54 -0
- package/src/commands/join.ts +272 -0
- package/src/commands/send.ts +160 -0
- package/src/commands/status.ts +45 -0
- package/src/commands/trust.ts +215 -0
- package/src/config.ts +74 -0
- package/src/index.ts +49 -0
- package/src/ui.ts +38 -0
package/dist/index.js
CHANGED
|
@@ -118408,13 +118408,25 @@ function registerJoinCommand(program2) {
|
|
|
118408
118408
|
await dht.publishAgentCard(signedCard);
|
|
118409
118409
|
cardSpin.succeed("Agent Card published!");
|
|
118410
118410
|
const pingInterval = setInterval(async () => {
|
|
118411
|
-
|
|
118412
|
-
|
|
118413
|
-
|
|
118414
|
-
|
|
118411
|
+
const peers = node.libp2p.getPeers();
|
|
118412
|
+
if (peers.length === 0) {
|
|
118413
|
+
for (const bootstrapAddr of bootstrapPeers) {
|
|
118414
|
+
try {
|
|
118415
|
+
await node.libp2p.dial(bootstrapAddr);
|
|
118416
|
+
info("Reconnected to bootstrap peer");
|
|
118417
|
+
break;
|
|
118418
|
+
} catch {
|
|
118419
|
+
}
|
|
118420
|
+
}
|
|
118421
|
+
} else {
|
|
118422
|
+
for (const peer of peers) {
|
|
118423
|
+
try {
|
|
118424
|
+
await node.libp2p.services.ping.ping(peer);
|
|
118425
|
+
} catch {
|
|
118426
|
+
}
|
|
118415
118427
|
}
|
|
118416
118428
|
}
|
|
118417
|
-
},
|
|
118429
|
+
}, 15e3);
|
|
118418
118430
|
const verifyFn = async (signature, data) => {
|
|
118419
118431
|
try {
|
|
118420
118432
|
const decoded = JSON.parse(new TextDecoder().decode(data));
|