-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: allow api inferring capabilities #259
Conversation
capabilities: [ | ||
{ | ||
with: alice.did(), | ||
can: 'store/*', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be good to test that store/*
allows store/add
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couple questions above, but no need to block
Co-authored-by: Benjamin Goering <[email protected]>
this looks awesome! I've started using it in my local so I'm excited for this to ship. one question - you aren't re-exporting the new function from import * as ucanto from '@ucanto/core'
...
export function canDelegateCapability(delegation, child) {
const allowsCapabilities = ucanto.Delegation.allows(delegation)
... which typescript still isn't super happy with (but it compiles and runs just fine):
could just be a transient TS failure but curious if you think this function is worth re-exporting manually like we do with |
I suspect that error happens because typedefs have not been generated when you linked locally so it still refers to and old version. In other words I would expect |
@gobengo I have addressed some of the comments and added more tests, which lead me discover cases where behavior was not accurate. I did bunch of changes to address those cases & it would help to have another review. |
Implements subset of #254 that can be used to derive set of capabilities provided by one or more delegations.