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.
-
Here are some ideas inspired by generalizing
agoric deploy --target=...
.endo [...options] <script> ...args
It would import
<script>
as JS code, just as an Agoric deploy script would, and support the same programming API.endo
reads$ENDO_OPTIONS
for options to add implicitly before the command-line options.endo
directly passesscript
and...args
through to the script as an array of strings:powers.args = [script, ...args]
.agoric deploy
has an enforced leading--plugin=ag-solo://HOSTPORT
where HOSTPORT is the value of the--hostport
option, defaulting tolocalhost:8000
.agoric run
has default plugins of['home:$HOME/.agoric']
butagoric deploy --home
defaults to$HOME/.agoric
endo --home
can 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:aeditsehai
is implemented by@endo/NAME-plugin
orendo-NAME-plugin
powers.args
is['--target=NAME:aeditsehai', ...remaining args]
powers.priorTarget
is[priorHomeP, priorPowers]
ERef<[nextHomeP, nextPowers]>
.@endo/options-plugin
is the implicit target that runs before any other (given no home or powers), and@endo/args-plugin
is 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