Description
We are adding new Stellar functionality, and have 2 environments
where that functionality can be executed.
Some functions however, will not make sense in all environments. Between the SHELL and STORM, some things just are not going to work.
For example, executing a script, assumes the script is available on all the storm nodes, requires a user and possibly sudo access. This may not make sense from storm, but may make sense from the SHELL.
Stellar should 'know' it's context, and only load functions that fit into that context.
Currently we use "capability" checks to required things, and that includes:
Optional<Object> console = context.getCapability(CONSOLE, false);
see: ShellFunctions.java
But this requires the author to do it correctly in the code. If we make it attributed then we can prevent loading and filter out. In other words there may be a difference between required capability and applicability
This would also allow for non-runtime verification