Skip to content

feat(resource)!: adopt Blossom server hints - #206

Merged
dskvr merged 3 commits into
mainfrom
feat/nap-resource-server-hints
Aug 26, 2026
Merged

feat(resource)!: adopt Blossom server hints#206
dskvr merged 3 commits into
mainfrom
feat/nap-resource-server-hints

Conversation

@dskvr

@dskvr dskvr commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

What

Implements the NAP-RESOURCE server-hint amendment from live proposal revision 9511232.

  • resource.bytes carries optional advisory servers.
  • resource.bytesMany accepts ordered per-resource requests.
  • Public API barrels export ResourceBytesRequest { url, servers? }.
  • ResourceInfo exposes optional maxServers.
  • Runtime shim, transport, injected conformance prelude, validators, reference shell, tests, and public docs use the same envelope.
  • Minor changesets cover @napplet/core, @napplet/nap, @napplet/sdk, @napplet/shim, and @napplet/conformance.

Protocol boundary

Server hints are advisory and apply only to blossom: resource resolution. Runtime implementations retain accepted-server filtering, ordered fallback, SSRF defenses, caching, and Blossom hash verification. This PR does not invent host network policy or alter resource cache identity.

Split boundary

This protocol amendment was extracted from #205 so it can be reviewed and released independently against main. No packages/vite-plugin/src/optimizer/ file and no @napplet/vite-plugin release entry is included here. PR #205 has been restored to commit bc77a610 and its original fixture evidence.

Verification

  • NAP unit suite: 181 passed
  • Conformance unit suite: 71 passed
  • Shim unit suite: 15 passed
  • Core and SDK focused type checks passed
  • pnpm build, pnpm type-check, and pnpm -r test:unit passed
  • pnpm check:jsr, pnpm test:release-tooling, and pnpm test:tutorial passed
  • git diff --check and the optimizer-path boundary audit passed
  • Local AI-slop scan reports 84/100 solely from dependency advisories already present on origin/main (js-yaml, nanoid, and postcss); this branch changes no dependency or lockfile

Out of scope

The PR #205 optimizer loader adaptation to the amended request-object API remains with that optimizer PR and should be applied after this protocol PR lands.

dskvr and others added 3 commits August 26, 2026 14:06
Expose the proposed NAP-RESOURCE server-hint envelope across public APIs, transport, conformance, and documentation.

BREAKING CHANGE: resource.bytesMany now accepts ResourceBytesRequest[] and emits requests rather than a string urls array.

Co-Authored-By: Codex <noreply@openai.com>
Keep the dedicated protocol branch release scope and debug provenance separate from PR #205's optimizer work.

Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
@dskvr
dskvr merged commit 19e0029 into main Aug 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant