Repository navigation
Export the contract as a subpath; invalidate discovery on publish (1.1.0) - #4
Merged
Merged
Conversation
…1.0)
`@sphere-pub/node/contract` exposes the fragment contract as types with no
Cloudflare dependencies (manifest, sources, relations, owner-API
responses), so tools that read or write fragments — the plugin first —
import it instead of vendoring a copy. The owner handlers are now typed
against the same definitions (src/core/owner-api.ts), so the served shape
and the exported type cannot drift apart silently.
The publish route now deletes the cached discovery document, so
/.well-known/sphere.json lists a new fragment on the next read instead of
after the 60 s TTL. KvStore gains `delete`.
spec/node-api.md documents PUT /owner/fragments/{id}, which existed
without a spec entry.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
4 of 16 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.
M1, node side.
@sphere-pub/node/contract: the fragment contract as types, no Cloudflare deps (manifest, sources, relations,PublisherSummary,FragmentUsage,PaymentStatus,PublishResult). The plugin will import from here instead of vendoringsrc/contract/(follow-up PR in sphere-plugin).src/core/owner-api.ts, so served shape and exported type can't drift.KvStore.delete); test added. Previously a new fragment took up to 60 s to appear in/.well-known/sphere.json.spec/node-api.md: documentsPUT /owner/fragments/{id}(it existed without a spec entry).After merge: publish 1.1.0 (
npm publish --access public --otp=…), then the plugin PR can switch to^1.1.0.🤖 Generated with Claude Code