OverviewFilesCommitsIssuesDocsReleasesPeers

p2pbuilders commits / f0380d4

Upgrade relay client to p2p-hiverelay-client 0.20.2 (was p2p-hiverelay 0.4.2)
The relay fleet runs 0.24.x; the pinned 0.4.2 client predates waitForDurable and durability tiers that web/publish.mjs relies on — those guarantees silently no-oped. p2p-hiverelay-client is the published modern client (discovery topic and seed-protocol names unchanged, so it interoperates). Updated every call site: terminal relay seeder, seeding and publish scripts, web publish/durability tooling. Verified: client loads with the full API under Node, TUI boots and seeds under standalone Bare. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QAqfE2dpo3vsVd9BorLY6w
f0380d4994399f1a0bcda14aefaf720d8c38181e
by Claude <noreply@anthropic.com> · 2026-07-29T12:25:04.000Z

Changed files (8) +172 -60

package-lock.json +165 -53
……@@ -24,7 +24,7 @@
2424 "hypercore": "^11.0.0",
2525 "hyperdht": "^6.30.0",
2626 "hyperswarm": "^4.17.0",
27 "p2p-hiverelay": "^0.4.2",
27 "p2p-hiverelay-client": "^0.20.2",
2828 "pear-electron": "^1.7.28",
2929 "random-access-memory": "^6.2.1",
3030 "sodium-universal": "^5.0.0",
……@@ -36,9 +36,9 @@
3636 }
3737 },
3838 "node_modules/@grpc/grpc-js": {
39 "version": "1.14.3",
40 "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.14.3.tgz",
41 "integrity": "sha512-Iq8QQQ/7X3Sac15oB6p0FmUg/klxQvXLeileoqrTRGJYLV+/9tubbr9ipz0GKHjmXVsgFPo/+W+2cA8eNcR+XA==",
39 "version": "1.14.4",
40 "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.14.4.tgz",
41 "integrity": "sha512-k9Dj3DV/itK9D06Y8f190Qgop7/Ui+D0njFV3LHMPwPT75DpXLQohE9Wmz0QElrJnzsjB7KPWiKJbOl7IPDArQ==",
4242 "license": "Apache-2.0",
4343 "dependencies": {
4444 "@grpc/proto-loader": "^0.8.0",
……@@ -49,14 +49,14 @@
4949 }
5050 },
5151 "node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader": {
52 "version": "0.8.0",
53 "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.8.0.tgz",
54 "integrity": "sha512-rc1hOQtjIWGxcxpb9aHAfLpIctjEnsDehj0DAiVfBlmT84uvR0uUtN2hEi/ecvWVjXUGf5qPF4qEgiLOx1YIMQ==",
52 "version": "0.8.1",
53 "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.8.1.tgz",
54 "integrity": "sha512-wtF6h+DY6M3YaDBPAmvuuA6jV8Sif9MjtOI5euKFWRgCDl5PeDpPsHR9u2l6St5ceY8AZgoNDww5+HvEsXFsGg==",
5555 "license": "Apache-2.0",
5656 "dependencies": {
5757 "lodash.camelcase": "^4.3.0",
5858 "long": "^5.0.0",
59 "protobufjs": "^7.5.3",
59 "protobufjs": "^7.5.5",
6060 "yargs": "^17.7.2"
6161 },
6262 "bin": {
……@@ -518,6 +518,21 @@
518518 "integrity": "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==",
519519 "license": "MIT"
520520 },
521 "node_modules/@noble/curves": {
522 "version": "2.2.0",
523 "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-2.2.0.tgz",
524 "integrity": "sha512-T/BoHgFXirb0ENSPBquzX0rcjXeM6Lo892a2jlYJkqk83LqZx0l1Of7DzlKJ6jkpvMrkHSnAcgb5JegL8SeIkQ==",
525 "license": "MIT",
526 "dependencies": {
527 "@noble/hashes": "2.2.0"
528 },
529 "engines": {
530 "node": ">= 20.19.0"
531 },
532 "funding": {
533 "url": "https://paulmillr.com/funding/"
534 }
535 },
521536 "node_modules/@noble/hashes": {
522537 "version": "2.2.0",
523538 "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-2.2.0.tgz",
……@@ -829,9 +844,9 @@
829844 }
830845 },
831846 "node_modules/bare-crypto": {
832 "version": "1.13.4",
833 "resolved": "https://registry.npmjs.org/bare-crypto/-/bare-crypto-1.13.4.tgz",
834 "integrity": "sha512-JiCZ5l2YOG1y8J7yy1BCAKTCZrPnHLb7pDRIdurBTOn5oIwBQDIv8iH5Pl2V85vzjl1NZXRfNY4HZLsE942jJA==",
847 "version": "1.15.3",
848 "resolved": "https://registry.npmjs.org/bare-crypto/-/bare-crypto-1.15.3.tgz",
849 "integrity": "sha512-macV9lbyJTsLPRXJkBtz8ivTGEo3LCyJInLT9IB/PWJ7pRXwvHs/FP4bx/fWw+HZkiepIYCAV2cuU5CR92XWCw==",
835850 "license": "Apache-2.0",
836851 "dependencies": {
837852 "bare-assert": "^1.2.0",
……@@ -909,9 +924,9 @@
909924 }
910925 },
911926 "node_modules/bare-events": {
912 "version": "2.8.2",
913 "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.8.2.tgz",
914 "integrity": "sha512-riJjyv1/mHLIPX4RwiK+oW9/4c3TEUeORHKefKAKnZ5kyslbN+HXowtbaVEqt4IMUB7OXlfixcs6gsFeo/jhiQ==",
927 "version": "2.9.1",
928 "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.9.1.tgz",
929 "integrity": "sha512-Z0oHEHAFDZkffN8Qc39zNZjQlMDkPJRyyyZieU1VH7u8c5S+qHZ2S8ixdKIAxEjfHO7FJxXmJWgteOghVanIsg==",
915930 "license": "Apache-2.0",
916931 "peerDependencies": {
917932 "bare-abort-controller": "*"
……@@ -932,9 +947,9 @@
932947 }
933948 },
934949 "node_modules/bare-fs": {
935 "version": "4.7.1",
936 "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.7.1.tgz",
937 "integrity": "sha512-WDRsyVN52eAx/lBamKD6uyw8H4228h/x0sGGGegOamM2cd7Pag88GfMQalobXI+HaEUxpCkbKQUDOQqt9wawRw==",
950 "version": "4.7.4",
951 "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.7.4.tgz",
952 "integrity": "sha512-y1kC+ffIx/tPLdTE693uNjHfzTfr+ravR5tvWlMXe25nELbkqV400S71qHDwbkAQ1FVEZobB1NFRzFbCCcyBCQ==",
938953 "license": "Apache-2.0",
939954 "dependencies": {
940955 "bare-events": "^2.5.4",
……@@ -967,6 +982,30 @@
967982 "integrity": "sha512-+dhVvQi6brHq14L/XHNRQ+TLuVE76VjRmMt61wVEtS+Od8xUslfMHWJN/ZjIIt3RtTG6vPuA+x9cOh7KrkBJsA==",
968983 "license": "Apache-2.0"
969984 },
985 "node_modules/bare-http1": {
986 "version": "4.5.7",
987 "resolved": "https://registry.npmjs.org/bare-http1/-/bare-http1-4.5.7.tgz",
988 "integrity": "sha512-PRuzs9ywt4vUvrC3mnHhQyaQfLYzdFy8XKOH0oKeKmYfyYYUqXBkdbJE2csESLBxJEbKDBjxPGLU+Qa0l1ds4A==",
989 "license": "Apache-2.0",
990 "dependencies": {
991 "bare-events": "^2.6.0",
992 "bare-http-parser": "^1.1.1",
993 "bare-stream": "^2.10.0",
994 "bare-tcp": "^2.2.0"
995 },
996 "peerDependencies": {
997 "bare-buffer": "*",
998 "bare-url": "*"
999 },
1000 "peerDependenciesMeta": {
1001 "bare-buffer": {
1002 "optional": true
1003 },
1004 "bare-url": {
1005 "optional": true
1006 }
1007 }
1008 },
9701009 "node_modules/bare-inspect": {
9711010 "version": "3.1.4",
9721011 "resolved": "https://registry.npmjs.org/bare-inspect/-/bare-inspect-3.1.4.tgz",
……@@ -1127,13 +1166,10 @@
11271166 }
11281167 },
11291168 "node_modules/bare-path": {
1130 "version": "3.0.0",
1131 "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-3.0.0.tgz",
1132 "integrity": "sha512-tyfW2cQcB5NN8Saijrhqn0Zh7AnFNsnczRcuWODH0eYAXBsJ5gVxAUuNr7tsHSC6IZ77cA0SitzT+s47kot8Mw==",
1133 "license": "Apache-2.0",
1134 "dependencies": {
1135 "bare-os": "^3.0.1"
1136 }
1169 "version": "3.1.1",
1170 "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-3.1.1.tgz",
1171 "integrity": "sha512-JprUlveX3QjApC1cTpsUOiscADftCGVWkzitbHsRqv84hzYwYHw2mbluddsq5TvI8mH/8Ov1f4BiMAdcB0oYnQ==",
1172 "license": "Apache-2.0"
11371173 },
11381174 "node_modules/bare-pipe": {
11391175 "version": "4.1.5",
……@@ -2856,35 +2892,41 @@
28562892 }
28572893 },
28582894 "node_modules/p2p-hiverelay": {
2859 "version": "0.4.2",
2860 "resolved": "https://registry.npmjs.org/p2p-hiverelay/-/p2p-hiverelay-0.4.2.tgz",
2861 "integrity": "sha512-L7/x+AgCcQfxWdhWxW/VWHJNIjJle+yeqcGjeuCPePsv6QbI630G5FuYCwF1N8WnKvKzXVSIKNMhSodcA//c+g==",
2895 "version": "0.20.2",
2896 "resolved": "https://registry.npmjs.org/p2p-hiverelay/-/p2p-hiverelay-0.20.2.tgz",
2897 "integrity": "sha512-ezLp8abKmzZJPm8JAgEFIL3f/Vh/IKEwBzyL8GrxPMXS8lg/oDP6RLMj7G01CVOFuMFJNDbs6scPY9iSljaMMQ==",
28622898 "license": "Apache-2.0",
28632899 "dependencies": {
2864 "@grpc/grpc-js": "^1.14.3",
2900 "@grpc/grpc-js": "^1.14.4",
28652901 "@grpc/proto-loader": "^0.7.15",
2902 "@hyperswarm/dht-relay": "^0.4.3",
28662903 "@inquirer/prompts": "^8.4.1",
2904 "@noble/curves": "^2.2.0",
28672905 "@noble/hashes": "^2.2.0",
28682906 "@noble/secp256k1": "^3.1.0",
28692907 "b4a": "^1.6.6",
2870 "bare-events": "^2.2.0",
2871 "bare-fs": "^2.1.0",
2872 "bare-path": "^2.1.0",
2908 "bare-events": "^2.9.1",
2909 "bare-fs": "^4.7.2",
2910 "bare-http1": "^4.5.7",
2911 "bare-path": "^3.0.1",
28732912 "compact-encoding": "^2.15.0",
28742913 "corestore": "^6.18.0",
28752914 "distributed-drive": "^0.1.1",
28762915 "graceful-goodbye": "^1.3.0",
28772916 "holesail": "^2.4.1",
2917 "hyperbee": "^2.20.5",
28782918 "hypercore": "^10.36.0",
28792919 "hyperdht": "^6.15.0",
28802920 "hyperdrive": "^11.8.0",
2881 "hyperswarm": "^4.7.0",
2921 "hyperswarm": "^4.17.0",
28822922 "minimist": "^1.2.8",
28832923 "multicast-dns": "^7.2.5",
2924 "paparam": "^1.10.1",
28842925 "pino": "^9.0.0",
28852926 "protomux": "^3.6.0",
28862927 "socks": "^2.8.7",
28872928 "sodium-universal": "^4.0.0",
2929 "which-runtime": "^1.4.0",
28882930 "ws": "^8.20.0"
28892931 },
28902932 "bin": {
……@@ -2895,30 +2937,100 @@
28952937 "node": ">=20.0.0"
28962938 }
28972939 },
2898 "node_modules/p2p-hiverelay/node_modules/bare-fs": {
2899 "version": "2.3.5",
2900 "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-2.3.5.tgz",
2901 "integrity": "sha512-SlE9eTxifPDJrT6YgemQ1WGFleevzwY+XAP1Xqgl56HtcrisC2CHCZ2tq6dBpcH2TnNxwUEUGhweo+lrQtYuiw==",
2940 "node_modules/p2p-hiverelay-client": {
2941 "version": "0.20.2",
2942 "resolved": "https://registry.npmjs.org/p2p-hiverelay-client/-/p2p-hiverelay-client-0.20.2.tgz",
2943 "integrity": "sha512-Mgzovwx+QqRbc0yFiTa+t07/prLbH9JGyi+jhw1PDPFvfb+pmkGEawfXR6xwoF8/LyeEcJUwPtCOTE4CbwR1zg==",
29022944 "license": "Apache-2.0",
29032945 "dependencies": {
2904 "bare-events": "^2.0.0",
2905 "bare-path": "^2.0.0",
2906 "bare-stream": "^2.0.0"
2946 "@noble/hashes": "^2.2.0",
2947 "@noble/secp256k1": "^3.1.0",
2948 "b4a": "^1.6.6",
2949 "bare-crypto": "^1.15.3",
2950 "bare-events": "^2.9.1",
2951 "bare-fs": "^4.7.2",
2952 "bare-path": "^3.0.1",
2953 "corestore": "^6.18.0",
2954 "hyperdrive": "^11.8.0",
2955 "hyperswarm": "^4.17.0",
2956 "p2p-hiverelay": "^0.20.2",
2957 "sodium-universal": "^4.0.0"
2958 },
2959 "engines": {
2960 "node": ">=20.0.0"
29072961 }
29082962 },
2909 "node_modules/p2p-hiverelay/node_modules/bare-os": {
2910 "version": "2.4.4",
2911 "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-2.4.4.tgz",
2912 "integrity": "sha512-z3UiI2yi1mK0sXeRdc4O1Kk8aOa/e+FNWZcTiPB/dfTWyLypuE99LibgRaQki914Jq//yAWylcAt+mknKdixRQ==",
2913 "license": "Apache-2.0"
2963 "node_modules/p2p-hiverelay-client/node_modules/corestore": {
2964 "version": "6.18.4",
2965 "resolved": "https://registry.npmjs.org/corestore/-/corestore-6.18.4.tgz",
2966 "integrity": "sha512-KL1cOUyj3DFRNzeVRekGPRiGN4sIfGo7BsncSJQQBT3Rh2y1nQ32MOR9X5DlOMlWIT4txwqBzhzam6+JXtwFVw==",
2967 "license": "MIT",
2968 "dependencies": {
2969 "b4a": "^1.6.4",
2970 "hypercore": "^10.37.10",
2971 "hypercore-crypto": "^3.4.0",
2972 "hypercore-id-encoding": "^1.2.0",
2973 "read-write-mutexify": "^2.1.0",
2974 "ready-resource": "^1.0.0",
2975 "safety-catch": "^1.0.1",
2976 "sodium-universal": "^4.0.0",
2977 "xache": "^1.1.0"
2978 }
29142979 },
2915 "node_modules/p2p-hiverelay/node_modules/bare-path": {
2916 "version": "2.1.3",
2917 "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-2.1.3.tgz",
2918 "integrity": "sha512-lh/eITfU8hrj9Ru5quUp0Io1kJWIk1bTjzo7JH1P5dWmQ2EL4hFUlfI8FonAhSlgIfhn63p84CDY/x+PisgcXA==",
2919 "license": "Apache-2.0",
2980 "node_modules/p2p-hiverelay-client/node_modules/hypercore": {
2981 "version": "10.38.2",
2982 "resolved": "https://registry.npmjs.org/hypercore/-/hypercore-10.38.2.tgz",
2983 "integrity": "sha512-2vx42g2RKdP/o2XzlxKfvgEaZ3+h/B855gCR8iscUDnxUoOZej7vXZ2buex0sweDUEW5aEfMxFR6o5hncio3Nw==",
2984 "license": "MIT",
2985 "dependencies": {
2986 "@hyperswarm/secret-stream": "^6.0.0",
2987 "b4a": "^1.1.0",
2988 "bare-events": "^2.2.0",
2989 "big-sparse-array": "^1.0.3",
2990 "compact-encoding": "^2.11.0",
2991 "crc-universal": "^1.0.2",
2992 "fast-fifo": "^1.3.0",
2993 "flat-tree": "^1.9.0",
2994 "hypercore-crypto": "^3.2.1",
2995 "hypercore-errors": "^1.2.0",
2996 "hypercore-id-encoding": "^1.2.0",
2997 "is-options": "^1.0.1",
2998 "protomux": "^3.5.0",
2999 "quickbit-universal": "^2.2.0",
3000 "random-access-file": "^4.0.0",
3001 "random-array-iterator": "^1.0.0",
3002 "safety-catch": "^1.0.1",
3003 "sodium-universal": "^4.0.0",
3004 "streamx": "^2.12.4",
3005 "unslab": "^1.3.0",
3006 "xache": "^1.1.0",
3007 "z32": "^1.0.0"
3008 }
3009 },
3010 "node_modules/p2p-hiverelay-client/node_modules/sodium-native": {
3011 "version": "4.3.3",
3012 "resolved": "https://registry.npmjs.org/sodium-native/-/sodium-native-4.3.3.tgz",
3013 "integrity": "sha512-OnxSlN3uyY8D0EsLHpmm2HOFmKddQVvEMmsakCrXUzSd8kjjbzL413t4ZNF3n0UxSwNgwTyUvkmZHTfuCeiYSw==",
3014 "license": "MIT",
29203015 "dependencies": {
2921 "bare-os": "^2.1.0"
3016 "require-addon": "^1.1.0"
3017 }
3018 },
3019 "node_modules/p2p-hiverelay-client/node_modules/sodium-universal": {
3020 "version": "4.0.1",
3021 "resolved": "https://registry.npmjs.org/sodium-universal/-/sodium-universal-4.0.1.tgz",
3022 "integrity": "sha512-sNp13PrxYLaUFHTGoDKkSDFvoEu51bfzE12RwGlqU1fcrkpAOK0NvizaJzOWV0Omtk9me2+Pnbjcf/l0efxuGQ==",
3023 "license": "MIT",
3024 "dependencies": {
3025 "sodium-native": "^4.0.0"
3026 },
3027 "peerDependencies": {
3028 "sodium-javascript": "~0.8.0"
3029 },
3030 "peerDependenciesMeta": {
3031 "sodium-javascript": {
3032 "optional": true
3033 }
29223034 }
29233035 },
29243036 "node_modules/p2p-hiverelay/node_modules/corestore": {
……@@ -4158,9 +4270,9 @@
41584270 }
41594271 },
41604272 "node_modules/which-runtime": {
4161 "version": "1.3.2",
4162 "resolved": "https://registry.npmjs.org/which-runtime/-/which-runtime-1.3.2.tgz",
4163 "integrity": "sha512-5kwCfWml7+b2NO7KrLMhYihjRx0teKkd3yGp1Xk5Vaf2JGdSh+rgVhEALAD9c/59dP+YwJHXoEO7e8QPy7gOkw==",
4273 "version": "1.4.0",
4274 "resolved": "https://registry.npmjs.org/which-runtime/-/which-runtime-1.4.0.tgz",
4275 "integrity": "sha512-0ugbP4CJW4e2D20jvEcC4973dCgIaHI4Rw1PT+26U9zEve7FyYdWAIwUnoeOYvoCfn+wXHoHTKb1KhkYlb60Pw==",
41644276 "license": "Apache-2.0"
41654277 },
41664278 "node_modules/wrap-ansi": {
package.json +1 -1
……@@ -62,7 +62,7 @@
6262 "hypercore": "^11.0.0",
6363 "hyperdht": "^6.30.0",
6464 "hyperswarm": "^4.17.0",
65 "p2p-hiverelay": "^0.4.2",
65 "p2p-hiverelay-client": "^0.20.2",
6666 "pear-electron": "^1.7.28",
6767 "random-access-memory": "^6.2.1",
6868 "sodium-universal": "^5.0.0",
scripts/probe-relays.mjs +1 -1
……@@ -1,4 +1,4 @@
1import { HiveRelayClient } from 'p2p-hiverelay/client'
1import { HiveRelayClient } from 'p2p-hiverelay-client'
22import b4a from 'b4a'
33import hypercoreId from 'hypercore-id-encoding'
44
scripts/publish.js +1 -1
……@@ -34,7 +34,7 @@ async function main () {
3434 console.log(`[publish] local storage: ${storageDir}`)
3535
3636 // ESM import — p2p-hiverelay is type=module.
37 const { HiveRelayClient } = await import('p2p-hiverelay/client')
37 const { HiveRelayClient } = await import('p2p-hiverelay-client')
3838
3939 const client = new HiveRelayClient(storageDir, {
4040 // Auto-discover relays on the public HiveRelay DHT topic.
scripts/seed-pear.js +1 -1
……@@ -30,7 +30,7 @@ async function main () {
3030
3131 const storageDir = path.resolve('.hiverelay-seed')
3232 const b4a = require('b4a')
33 const { HiveRelayClient } = await import('p2p-hiverelay/client')
33 const { HiveRelayClient } = await import('p2p-hiverelay-client')
3434
3535 const client = new HiveRelayClient(storageDir)
3636 await client.start()
src/terminal/main.js +1 -1
……@@ -68,7 +68,7 @@ const fmtAgo = (ts) => {
6868async function startRelaySeeder ({ node, storage }) {
6969 // p2p-hiverelay is an ESM module; we dynamic-import so the CommonJS
7070 // terminal entry can still load it cleanly.
71 const { HiveRelayClient } = await import('p2p-hiverelay/client')
71 const { HiveRelayClient } = await import('p2p-hiverelay-client')
7272 const seederStorage = path.join(storage, '..', 'p2pbuilders-relay-client')
7373 const client = new HiveRelayClient(seederStorage)
7474 await client.start()
web/check-durable.mjs +1 -1
……@@ -3,7 +3,7 @@
33// the drive from a fresh store and actually READ a file — which forces fetching
44// the content/blobs core from whatever peer serves it. If a relay serves the
55// file with all my hosts down, the drive is genuinely durable. Exit 0 = durable.
6import { HiveRelayClient } from 'p2p-hiverelay'
6import { HiveRelayClient } from 'p2p-hiverelay-client'
77import { fileURLToPath } from 'url'
88import { dirname, join } from 'path'
99
web/publish.mjs +1 -1
……@@ -10,7 +10,7 @@
1010 *
1111 * The non-local form is OUTWARD-FACING (public network). Run deliberately.
1212 */
13import { HiveRelayClient } from 'p2p-hiverelay'
13import { HiveRelayClient } from 'p2p-hiverelay-client'
1414import { readFileSync, writeFileSync } from 'fs'
1515import { fileURLToPath } from 'url'
1616import { dirname, join } from 'path'