Skip to content

feat(contracts): validate UI extension documents and release 1.6.0 - #14

Merged
RentnerKev merged 2 commits into
mainfrom
rentner/feat/ui-extension-contracts
Nov 29, 2026
Merged

RentnerKev merged 2 commits into
mainfrom
rentner/feat/ui-extension-contracts

Conversation

@RentnerKev

Copy link
Copy Markdown
Member

Summary

Remaining part of RentnerProxy/platform#625: a strict SDK contract and candidate checks for the x-rentnerproxy-extensions member 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:

Document Contents
UiExtensions Catalog 1.0.0 with three targets: app.page, proxyHosts.table.column and proxyHosts.table.rowAction.
HostTableCellsRequest The { proxyHostIds } request of a column operation.
HostTableCellsResult The { cells } answer of a column operation.

Shape rules for UiExtensions:

  • IDs are unique across all entries.
  • At most 32 entries: 8 pages, 2 columns and 4 row actions.
  • A column action must name a declared row action.
  • Titles have no leading or trailing white space and at most 60 characters.
  • Icons and navigation groups come from fixed sets.

Shape rules for the cell result:

  • At most one cell per requested host.
  • Every cell shows at least one of status, text, time and measure.
  • Tones and units come from fixed sets, and timestamps carry milliseconds.

TypeScript enforces these rules with refinements, and Rust mirrors them in ProtocolContracts::validate.

Cross-document check. checkUiExtensions(manifest, api) in the package and check_ui_extensions in rentnerproxy-app-contracts require:

  • a manifest ui
  • pages and row actions that open routes declared in x-rentnerproxy-ui (plus overview)
  • permissions the manifest declares
  • for every column: an existing operation with a matching operationId and an x-rentnerproxy-access that
    • filters results on proxy.hosts.read.v1 with listField cells and resourceIdField proxyHostId
    • has no resource guard
    • uses a declared permission key
  • the manifest requesting the proxy.hosts.read.v1 capability

Admission. rentnerproxy-app-pipeline runs the cross-document check when a candidate declares the member. Marketplace submissions therefore reject broken documents.

Shared fixtures. extension-fixtures.json has 14 cross-document cases, and protocol-fixtures.json has 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

  • Contract 1.6.0 (minor). The member did not exist before, and admission checks only documents that declare it, so no previously admitted document becomes invalid.
  • Protocol version stays 1.2.0. The extension document carries its own catalog version.

Test plan

  • bun --no-env-file test: 514 tests.
    • The shared protocol fixtures include the 20 new cases.
    • The 14 shared cross-document cases run plus an invalid-manifest check.
  • 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 --noEmit and oxlint. The remaining warnings are pre-existing ones in tests/Contracts/app-protocol.test.ts.
  • contracts:check (generated documents in sync) and release:check (1.6.0 consistent).
  • package:build runs in CI; it needs the CI output directory and checkout commit.

🤖 Generated with Claude Code

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 <[email protected]>
@RentnerKev RentnerKev added enhancement New feature or request area: contracts App contract schemas, fixtures and documents minor Dependency update with a minor version change. labels Nov 29, 2026
@coderabbitai

coderabbitai Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions github-actions Bot added area: automation GitHub checks, release and repository automation. area: core Rust core, native protocols and safe storage. area: npm labels Nov 29, 2026
@RentnerKev
RentnerKev merged commit cd4af5e into main Nov 29, 2026
15 checks passed
@RentnerKev
RentnerKev deleted the rentner/feat/ui-extension-contracts branch November 29, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: automation GitHub checks, release and repository automation. area: contracts App contract schemas, fixtures and documents area: core Rust core, native protocols and safe storage. area: npm enhancement New feature or request minor Dependency update with a minor version change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant