stencila/executa

feat(Capabilities): Add ability to query peer capabilities

Closed this issue · 0 comments

@alex-ketch requested a way to get a "list of supported languages". An Executor would provide that list by walking through it's capabilities and returning the programmingLanguages for every execute capability where type: "CodeChunk". This is essentially a query on capabilities and it feels like it would be useful to generalise it for things like "get a list of formats that can be encoded to".

Will investigate adding a capabilitiesQuery method that takes a function that acts as a filter/selector and then have capabilitiesExecuteLang and capabilitiesEncodeFormat etc that use it for preset queries.