OverviewFilesCommitsIssuesDocsReleasesPeers

favela-host commits / eee993e

did-adopt reaches fetch through hpp, so the native versions match the APK
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
eee993e36b7b2e890e38f80515e6e7653e8ccd4c
by plankatron <fleeky@gmail.com> · 2026-09-11T19:27:54.000Z

Changed files (1) +15 -1

lib/atproto.js +15 -1
……@@ -256,7 +256,21 @@ export const ATPROTO_OPS = {
256256
257257 const { deriveAtprotoKey, ATPROTO_RECOVERY_PATH, buildUpdateOp, signOp } = await import('atproto-identity/lib/atproto-identity.js')
258258 const { PlcDirectory } = await import('atproto-identity/lib/plc-directory.js')
259 if (typeof globalThis.fetch !== 'function') await import('bare-fetch/global')
259 // ⛔ THE EMBEDDER SUPPLIES fetch, this package must not import it. `bare-fetch` drags in bare-tls
260 // and bare-zlib — NATIVE addons — and this package resolves a different copy of them than the
261 // Android app does. Importing it here demanded libbare-tls.3.1.10 while the APK ships 3.1.7, and
262 // the build guard refused the release: staged, that bundle would have failed at dlopen, never
263 // reached ready, and had its tree condemned for ever on a device with no cable.
264 //
265 // ⚠ So the rule is the same one favela-surface follows for shell state — the thing that owns the
266 // platform provides the platform. The worklet and the desktop entry each install their own.
267 // ⛔ THROUGH hpp, so the native versions match the APK. `bare-fetch` drags in bare-tls and
268 // bare-zlib; importing it from HERE resolved bare-tls 3.1.10 while the APK carries 3.1.7, and the
269 // build guard refused the release — correctly, because staged it would have died at dlopen and
270 // had its tree condemned for ever on a device with no cable. hpp's copy is the one the APK was
271 // built against, and every other network path in this stack already uses it.
272 const { ensureFetch } = await import('hyper-proto-peer/lib/mint.js')
273 if (!(await ensureFetch())) throw new Error('this node has no fetch — the PLC directory cannot be reached from here')
260274
261275 const rotation = deriveAtprotoKey(mnemonic, ATPROTO_RECOVERY_PATH)
262276 const plc = new PlcDirectory(a.plcUrl ? { baseUrl: a.plcUrl } : {})