endo program behaviour
#1220
Replies: 3 comments 3 replies
-
|
@kriskowal here's something I'd like to discuss in the open. |
Beta Was this translation helpful? Give feedback.
-
|
I’ve been mulling on this and maybe we can take an middleware / adapter-pattern approach to plugins. Perhaps the first entry in the chain just receives a bag of powers, and one of those powers is to get the namespace of the next plugin in the chain. A deploy script would be the final link in a particular chain of plugins, so the penultimate plugin would presume the ultimate plugin had the exact signature of a deploy script, providing exactly its particular home object and powers. Each intermediate plugin would embellish the vat powers it passes to the next plugin. |
Beta Was this translation helpful? Give feedback.
-
|
I have a much more lightweight, policy-agnostic Endo executor: #1225 That can be used as the basis for this kind of plugin system layered on top. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Here are some ideas inspired by generalizing
agoric deploy --target=....endo [...options] <script> ...argsIt would import
<script>as JS code, just as an Agoric deploy script would, and support the same programming API.endoreads$ENDO_OPTIONSfor options to add implicitly before the command-line options.endodirectly passesscriptand...argsthrough to the script as an array of strings:powers.args = [script, ...args].agoric deployhas an enforced leading--plugin=ag-solo://HOSTPORTwhere HOSTPORT is the value of the--hostportoption, defaulting tolocalhost:8000.agoric runhas default plugins of['home:$HOME/.agoric']butagoric deploy --homedefaults to$HOME/.agoricendo --homecan specify a URL (interpreted relative to current working directoryfile:URL, may be remote URLs for databases, etc) and override the OS default config file and program state locations.--plugin=NAME:aeditsehaiis implemented by@endo/NAME-pluginorendo-NAME-pluginpowers.argsis['--target=NAME:aeditsehai', ...remaining args]powers.priorTargetis[priorHomeP, priorPowers]ERef<[nextHomeP, nextPowers]>.@endo/options-pluginis the implicit target that runs before any other (given no home or powers), and@endo/args-pluginis the implicit target that runs before the non-optional arguments (i.e. to invoke the script).Beta Was this translation helpful? Give feedback.
All reactions