Repository navigation
feat: export the Zod schemas and fix the negotiated protocol version - #3
Conversation
The npm package now exports the Zod schemas behind its validators at @rentnerproxy/app-contracts/schemas: the app manifest, capability request, provider profile, catalog, catalog release, package artifact, revocation, candidate, approval and publication documents and the identifier primitives. Consumers such as the marketplace can build their own validation on the contract instead of copying it. The crates gain PROTOCOL_VERSION, the platform API, app protocol and UI bridge version that v1 apps negotiate. The pipeline's candidate runtime used the contract version for that, which would have announced protocol 1.1.0 with this release although the protocol documents only accept 1.0.0. A test binds the constant to the versions the schema pins. The additive change raises the contract, crates and npm package to 1.1.0. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Change
The marketplace builds part of its own validation from the contract's Zod schemas:
commit,githubId,sha256,appId,target,appManifest,providerProfile,packageArtifact,catalogRelease,revocationandcandidate. The npm package 1.0.0 only exports the parsers and types, so the marketplace cannot move from its copy ofcontracts/v1to the published package yet. This PR closes that gap and prepares release 1.1.0.@rentnerproxy/app-contracts/schemas: a new subpath export, built fromcontracts/v1/public-schemas.ts.appId,appVersion,commit,githubId,sha256,targetandtimestamp.PROTOCOL_VERSIONinrentnerproxy-app-contracts: the platform API, app protocol and UI bridge version that v1 apps negotiate (1.0.0).CONTRACT_VERSIONfor these.CONTRACT_VERSIONis the package version, so with this release the pipeline would have offered protocol 1.1.0, while the protocol documents only accept1.0.0.PROTOCOL_VERSION. A new test binds the constant to every protocol version the JSON Schema pins.contracts.schema.jsonandopenapi.jsondiffer only in$idandinfo.version.No issue: this unblocks moving the marketplace to the published SDK packages.
Verification
Run in a Rust 1.100.0 and Bun 1.4.5 container:
core:format:check,core:lint(Clippy with-D warnings) andcore:testpass.contracts:check,typecheck,lint,format:checkandrelease:checkpass; the release check confirms the single version 1.1.0.bun run testpasses (351 tests).package:buildbuilds the npm tarball and the four crates twice and checks that both builds are byte-for-byte identical. It then installs them into a TypeScript consumer and a Rust consumer ("Verified SDK 1.1.0 packages").New checks:
parseAppManifestand rejects invalid commits;PROTOCOL_VERSION;package:buildthat the installed npm package resolves./schemasand that the packaged crate exposesPROTOCOL_VERSION.Risks
1.0.0, as it was in 1.0.0.🤖 Generated with Claude Code
Summary by CodeRabbit
./schemasentry point.