feat: add missing capabilities#6
Merged
alanshaw merged 11 commits intoMay 11, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds several missing UCAN capability definitions and their associated datamodels/encoders, including list-style capabilities and new provider/index capabilities, largely via generated CBOR/Dag-JSON code.
Changes:
- Add capability bindings for
/blob/list,/upload/list, and/upload/shard/listplus their datamodels. - Add new capabilities
/index/addand/provider/addwith datamodels and generated encoders. - Extend existing datamodel codegen outputs to include the newly introduced types.
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| capabilities/upload/shard/list.go | Adds /upload/shard/list capability binding. |
| capabilities/upload/shard/datamodel/list.go | Introduces list request/response models for shard listing. |
| capabilities/upload/shard/datamodel/json_gen.go | Generated Dag-JSON encoders/decoders for shard list models. |
| capabilities/upload/shard/datamodel/gen/main.go | Codegen entrypoint for shard datamodel encoders. |
| capabilities/upload/shard/datamodel/cbor_gen.go | Generated CBOR encoders/decoders for shard list models. |
| capabilities/upload/list.go | Adds /upload/list capability binding. |
| capabilities/upload/datamodel/list.go | Introduces upload list request/response models. |
| capabilities/upload/datamodel/json_gen.go | Extends generated Dag-JSON encoders/decoders to cover upload list models. |
| capabilities/upload/datamodel/gen/main.go | Updates upload datamodel codegen to include list-related models. |
| capabilities/upload/datamodel/cbor_gen.go | Extends generated CBOR encoders/decoders to cover upload list models. |
| capabilities/provider/datamodel/json_gen.go | Generated Dag-JSON encoders/decoders for provider add models. |
| capabilities/provider/datamodel/gen/main.go | Codegen entrypoint for provider datamodel encoders. |
| capabilities/provider/datamodel/cbor_gen.go | Generated CBOR encoders/decoders for provider add models. |
| capabilities/provider/datamodel/add.go | Adds provider add request/response models. |
| capabilities/provider/add.go | Adds /provider/add capability binding. |
| capabilities/index/datamodel/json_gen.go | Generated Dag-JSON encoders/decoders for index add model. |
| capabilities/index/datamodel/gen/main.go | Codegen entrypoint for index datamodel encoders. |
| capabilities/index/datamodel/cbor_gen.go | Generated CBOR encoders/decoders for index add model. |
| capabilities/index/datamodel/add.go | Adds index add request model. |
| capabilities/index/add.go | Adds /index/add capability binding. |
| capabilities/blob/list.go | Adds /blob/list capability binding. |
| capabilities/blob/datamodel/list.go | Introduces blob list request/response models. |
| capabilities/blob/datamodel/json_gen.go | Extends generated Dag-JSON encoders/decoders to cover blob list models. |
| capabilities/blob/datamodel/gen/main.go | Updates blob datamodel codegen to include list-related models. |
| capabilities/blob/datamodel/cbor_gen.go | Extends generated CBOR encoders/decoders to cover blob list models. |
| capabilities/blob/datamodel/add.go | Adds clarifying comment on Site meaning in /blob/add response. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sometimes it is not necessary to add an index if the blob itself is the data.
frrist
approved these changes
May 11, 2026
Upgrades `dag-json-gen` dependency and re-generates `dag-json` serializers/deserializers. Error messages are a lot more informative, and avoid linter complains about capitalization.
Moves error definitions from Sprue to the library so that they can be used in clients to disambiguate invocation errors.
Closed
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.
Cherry picks from #2 and adds the remaining missing capabilities.
Also, (sorry!) removes the
CborTimetype. This is unnecessarily accurate (to nanoseconds) and was being used to specify expiry time of a UCAN, which has a resolution of seconds, so was unnecessary.