Repository navigation
feat(contracts): validate UI extension documents and release 1.6.0 - #14
Merged
Merged
Conversation
Platforms render x-rentnerproxy-extensions since RentnerProxy/platform#630 and #631 and read the document leniently, skipping invalid entries. The SDK now describes it strictly so app developers and candidate admission see mistakes the platform would silently drop. - UiExtensions, HostTableCellsRequest and HostTableCellsResult join the protocol documents: catalog 1.0.0 with app.page, proxyHosts.table.column and proxyHosts.table.rowAction, unique IDs, per-target limits, labels without edge white space, platform icons and navigation groups, and one non-empty cell per requested host. - checkUiExtensions and check_ui_extensions check the document against the manifest and the OpenAPI document: pages and row actions open declared routes, permissions exist, and every column operation filters cells per proxy host on proxy.hosts.read.v1 without a resource guard. - Candidate admission runs the check when an app declares the member. - Shared fixtures keep the TypeScript and Rust checks in agreement and ship with the package. The member is new, so no admitted document becomes invalid; the protocol version stays 1.2.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
6 tasks
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.
Summary
Remaining part of RentnerProxy/platform#625: a strict SDK contract and candidate checks for the
x-rentnerproxy-extensionsmember of an app's OpenAPI document.The platform renders that member since RentnerProxy/platform#630 and RentnerProxy/platform#631. It reads the document leniently and skips invalid entries. This SDK release describes the document strictly, so developers and Marketplace admission catch the mistakes the platform would silently drop.
New protocol documents:
UiExtensions1.0.0with three targets:app.page,proxyHosts.table.columnandproxyHosts.table.rowAction.HostTableCellsRequest{ proxyHostIds }request of a column operation.HostTableCellsResult{ cells }answer of a column operation.Shape rules for
UiExtensions:actionmust name a declared row action.Shape rules for the cell result:
TypeScript enforces these rules with refinements, and Rust mirrors them in
ProtocolContracts::validate.Cross-document check.
checkUiExtensions(manifest, api)in the package andcheck_ui_extensionsinrentnerproxy-app-contractsrequire:uix-rentnerproxy-ui(plusoverview)operationIdand anx-rentnerproxy-accessthatresultsonproxy.hosts.read.v1withlistFieldcellsandresourceIdFieldproxyHostIdresourceguardproxy.hosts.read.v1capabilityAdmission.
rentnerproxy-app-pipelineruns the cross-document check when a candidate declares the member. Marketplace submissions therefore reject broken documents.Shared fixtures.
extension-fixtures.jsonhas 14 cross-document cases, andprotocol-fixtures.jsonhas 20 new shape cases. TypeScript and Rust both run them, and the new file ships with the package.Docs. A short README section covers the document, the three targets and the column operation contract.
Compatibility
Test plan
bun --no-env-file test: 514 tests.cargo test -p rentnerproxy-app-contracts: the shared protocol and extension fixtures agree with TypeScript.cargo test -p rentnerproxy-app-pipeline --lib: admission accepts and rejects extension documents.cargo clippy -p rentnerproxy-app-contracts -p rentnerproxy-app-pipeline --all-targets --all-features -D warnings.tsc --noEmitandoxlint. The remaining warnings are pre-existing ones intests/Contracts/app-protocol.test.ts.contracts:check(generated documents in sync) andrelease:check(1.6.0 consistent).package:buildruns in CI; it needs the CI output directory and checkout commit.🤖 Generated with Claude Code