Repository navigation
feat(protocol): define bounded media format queries - #6
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.
The quality picker in agalwood/Motrix#2365 needs a published
media/formatscontract before the desktop and extension can consume it. This implementation preserves scoped browser Cookie records, rejects contradictory listings, and bounds complete payloads so per-cookie limits cannot produce a request larger than the MBP1 frame allowance.Refs #5 and agalwood/Motrix#2365. This is a replacement implementation from current
mainfor review.Changes:
Methods.MediaFormats, typed request/result exports, an optionalmediaFormatscapability, and a non-agent-facing tool entry. Keep protocol version1.0and existing pairing/submit contracts.Validation:
pnpm test: 242 passed, including 22 trailing-dot regression cases. Twelve of those cases failed before the fix.pnpm buildandpnpm lint: passed.parseFormatEntriesand the extension's actualmapCookiesagainst the built schemas: standard video/MP3 output and millisecond expiry matched. The old name/value-only cookie draft and empty successful listing are intentionally rejected.npm pack --ignore-scriptsincludes both contract documents and runtime/declaration exports. A clean external consumer of that tarball passed strict TypeScript checks withexactOptionalPropertyTypesand runtime imports.0347079: accept and preserve one canonical trailing DNS dot, reject multiple trailing dots, and keep dotted/undotted domains isolated in both directions. Host-only, subdomain, path, and Secure boundaries remain enforced; both contract documents spell out the distinction.The package is prepared as
0.9.0; publication and application adoption follow protocol review. The protocol package cannot enforce an application's current grants or extractor behavior, so the documented consumer acceptance checks remain prerequisites for advertising/calling the capability. This repository's current base has no CI workflow; the checks above were run locally.