Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add capabilities.md with cap reference docs #160

Merged
merged 14 commits into from
Nov 18, 2022
Merged

Conversation

yusefnapora
Copy link
Contributor

@yusefnapora yusefnapora commented Nov 11, 2022

This is a start at a reference doc for all the capabilities defined in this repo.

There's also a stub for a "services.md" that will have details about the response values and possible error types for each capability handler.

So far, I've got store/add and store/remove covered, plus some intro context material.

@alanshaw, could you give some early 👀 to make sure the format works for you, and that you have all the info here that you would expect?

closes #172

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 11, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7f10f41
Status: ✅  Deploy successful!
Preview URL: https://ada25b6b.ucan-protocol.pages.dev
Branch Preview URL: https://docs-capabilities.ucan-protocol.pages.dev

View logs

@alanshaw
Copy link
Member

Yes I love it keep going! ❤️❤️❤️

@yusefnapora yusefnapora mentioned this pull request Nov 14, 2022
51 tasks

If an agent loses the UCAN that encodes their capability delegations for a memory space, they can initiate a recovery process by invoking the `account/recover-validation` capability.

This is one of the few capabilities that can be invoked without inlcuding proof of delegation, as it is intended to be used when proofs have been lost. <!-- TODO: is this true? verify w/Hugo -->
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hugomrdias I'm not sure if this is actually true, but if not, how does an agent who's lost their delegations invoke account/recover-validation?

@yusefnapora yusefnapora marked this pull request as ready for review November 17, 2022 17:30
Copy link
Member

@alanshaw alanshaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 this is awesome, there's a few feedback points here and I see a couple of TODOs in the doc but lets get this merged and iterate.

@yusefnapora can you please create an issue for us to track the additional things here 🙏

| `can` | `store/add` | ✅ | The ability to add CAR data to a memory space. |
| `with` | URI string, e.g. `did:key:123...` | ✅ | The `did:key` URI for the CAR's destination memory space |
| `nb.link` | CAR CID string, e.g. `bag123...` | ✅ | CID of CAR that the user wants to store |
| `nb.origin` | CAR CID string, e.g. `bagabc...` | ⛔ | Optional link to related CARs. See below for more details. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe consider the absense of an emjoi here. I'm not sure the stop sign communicates the right meaning.


There may be multiple delegations in a chain, for example: service `A` issues a delegation to service `B` as the audience, followed by service `B` issuing a delegation to user agent `U` as the audience. To exercise the capability, `U` would issue an invocation with `A` as the audience and include the delegation chain as proof of authorization.

## Accounts
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For another PR - this is soon to be renamed "Spaces"

@@ -0,0 +1,316 @@
# Capabilities
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For another PR - can we add a ToC?

@@ -0,0 +1,258 @@
# Service definitions

This doc collects RPC interface definitions for the `w3-protocol` services.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This doc collects RPC interface definitions for the `w3-protocol` services.
This doc collects RPC interface definitions for the `w3protocol` services.

@alanshaw alanshaw merged commit b0d1c95 into main Nov 18, 2022
@alanshaw alanshaw deleted the docs/capabilities branch November 18, 2022 11:29

### Issuer and audience

UCANs have a notion of "issuer" and "audience", represented by the `iss` and `aud` fields.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: This may be misleading, because in all of the code they are named issuer and audience while in their raw JWT form they are called iss and aud. In examples we often type raw form to keep it short, but in all the code it would be in full form.

gobengo pushed a commit that referenced this pull request Apr 11, 2023
This is a start at a reference doc for all the capabilities defined in
this repo.

There's also a stub for a "services.md" that will have details about the
response values and possible error types for each capability handler.

So far, I've got `store/add` and `store/remove` covered, plus some intro
context material.

@alanshaw, could you give some early 👀 to make sure the format works for
you, and that you have all the info here that you would expect?

closes #172
Peeja pushed a commit to storacha/upload-service that referenced this pull request Jan 17, 2025
This adds `.js` to the set of file extensions processed by babel.

I'm hoping that this will fix storacha#160, since after running `npm run build`
with this change I no longer see any class private members in
`packages/react-keyring/build/esm/index.js`, which is where the example
was failing before.

The downside of this change is that the rolled-up `index.js` grew from
198kb to 300kb for react-keyring. I assume the other modules are
affected as well.

I also haven't been able to test this in codesandbox, since I don't know
how to make it depend on an unreleased npm package (or if that's even
possible).
Peeja pushed a commit to storacha/upload-service that referenced this pull request Jan 29, 2025
This adds `.js` to the set of file extensions processed by babel.

I'm hoping that this will fix storacha#160, since after running `npm run build`
with this change I no longer see any class private members in
`packages/react-keyring/build/esm/index.js`, which is where the example
was failing before.

The downside of this change is that the rolled-up `index.js` grew from
198kb to 300kb for react-keyring. I assume the other modules are
affected as well.

I also haven't been able to test this in codesandbox, since I don't know
how to make it depend on an unreleased npm package (or if that's even
possible).
fforbeck pushed a commit to storacha/upload-service that referenced this pull request Feb 5, 2025
🤖 I have created a release *beep* *boop*
---


##
[1.16.1](storacha/console@w3console-v1.16.0...w3console-v1.16.1)
(2024-12-12)


### Bug Fixes

* make it possible to skip the plan gate after Stripe checkout
([storacha#162](storacha/console#162))
([b399b37](storacha/console@b399b37))
* tweak plan gate query param
([storacha#163](storacha/console#163))
([0ce071e](storacha/console@0ce071e))


### Other Changes

* update copy ([storacha#159](storacha/console#159))
([0253b05](storacha/console@0253b05))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add UCAN capabilities reference docs
3 participants