mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-08 23:54:39 +00:00
Wires the quartz NIP-5A resolver end-to-end so it can be exercised against real manifests (interop / agents), without building the security-sensitive WebView shell yet. - commons BlossomClient: add download(url) — a Blossom GET returning raw bytes (null on non-2xx; connection failures propagate so callers try the next server). Does not verify the hash; that is the resolver's job. - cli NsiteCommands: `amy nsite fetch AUTHOR [--d ID] [--path P] [--server …] [--relay …] [--out FILE] [--timeout SECS] [--max-inline-bytes N]`. Fetches the manifest (kind 15128 root, or 35128 named with --d) from relays, then resolves one path through StaticSiteResolver, downloading from the manifest's Blossom servers (plus any --server fallbacks) and accepting only the first blob whose sha256 matches the manifest pin. Emits the verified path's bytes (inlined for small text, or written to --out) with hash/server/content-type, or a structured not_found / path_not_found / unresolvable error. Thin-assembly only: all resolution + verification stays in quartz, the byte fetch in commons. Smoke-tested offline: bad-args, help, and a dead-relay run that resolves cleanly to not_found in both text and --json modes. Also converts the StaticSitePathLookup file-overview KDoc to a plain block comment to satisfy ktlint no-consecutive-comments. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CdAJMbnHJfiMY7UcS99T6C