Make WebFetch discovery cache-safe and self-describing - #76
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Web clients were guessing device target formats, losing the state URL after owner approval, and receiving opaque fetch failures instead of API errors. A shared public discovery response also carried a live session ticket that third-party fetch caches could reuse across callers.
This change makes discovery static and credential-free, creates requests through independent nonce URLs, and adds an authenticated portal page that copies a fresh connection prompt. Authorized manifests now publish exact targets, input schemas, URL templates and continuation instructions. HTML GET errors remain readable while carrying their logical status; JSON retains normal HTTP error codes. Owner approval errors offer recovery without exposing another owner's grant, and logs record only server-generated IDs and fixed rejection categories.
Validation:
Relay/portal-only v0.9.1 update; v0.9.0 agents remain compatible and no new database migration is needed. New bootstrap clients consume
start_url_template; existing session URLs keep their expiry and revocation behavior.