-
Notifications
You must be signed in to change notification settings - Fork 72
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
cli: Support dot-delimited petname paths #2023
Comments
The local behavior occurs if the nonce exists in the daemon and just writes the corresponding name and formula identifier to the local pet store (directory). Otherwise, the remote behavior is to create a “remote” formula that captures the nonce and addresses. So, if the remote restarts, it can reestablish a connection to the node that the nonce calls home. |
…name paths for CLI `eval` command Ref: #2023 ## Description Adds support for dot-delimited petname paths to the CLI `eval` command. This required modifications to the `evaluate` method of the daemon's `host.js`, and the introduction of a new formula type, `lookup`. The `lookup` formula type is necessary because the names in a lookup path may have neither petnames nor formula identifiers associated with them. Consider: ```text > endo eval '10' --name ten 10 > endo eval 'foo' foo:INFO.ten.source 10 ``` The only way retrieve the value for `source` is to call `E(HOST).lookup('INFO', 'ten', 'source')`, and since the `eval` formula expects its values to be mediated by formula identifiers, the lookup of `INFO.ten.source` must itself be stored as a formula. The `lookup` formula is an `-id512` formula with the following interface: ```typescript type LookupFormula = { type: 'lookup'; /** * The formula identifier of the naming hub to call lookup on. * A "naming hub" is an object with a variadic `lookup()` method. */ hub: string; /** * The pet name path. */ path: Array<string>; }; ``` The `lookup` formula introduces the language of "naming hubs" into the daemon codebase. At present the only such objects are guests and hosts, which are also agents, but the category of naming hubs is expected to grow to include non-agent objects.
Ref: #2023 Adds support for dot-delimited petname paths in the `bundle`, `cat`, `follow`, `open`, and `run` commands. Cleans up handling in the `list` command.
Following #2022, we should support dot-delimited petname paths in the CLI such that wherever a petname for an existing value is provided, a path can be provided instead. This path will then be passed to the mailbox
lookup
method, which will attempt to resolve the value.For example, this should work:
Note that the
parsePetNamePath()
utility should be used for dot-delimited path parsing in the CLI.See also discussion in #1915.
TODO
lookup
formula #2041eval
feat(cli,daemon): Support dot-delimited petname paths for CLIeval
command #2034cancel
kill
command #2043--as
feat(cli): Support dot-delimited paths for--as
option in all commands #2047dismiss
inbox
list
reject
make
feat(daemon,cli): Make and store at path #2281store
feat(daemon,cli): Make and store at path #2281adopt
Further endo daemon CLI support for dot-delimited paths #2325bundle
Additional dot-delimited petname path support #2296cat
Additional dot-delimited petname path support #2296dismiss
follow
Additional dot-delimited petname path support #2296install
Further endo daemon CLI support for dot-delimited paths #2325mkdir
Further endo daemon CLI support for dot-delimited paths #2325mkguest
mkhost
move
feat(cli,daemon): Addmove
CLI command #2227open
Additional dot-delimited petname path support #2296reject
remove
Further endo daemon CLI support for dot-delimited paths #2325request
Further endo daemon CLI support for dot-delimited paths #2325resolve
run
Additional dot-delimited petname path support #2296send
show
feat(cli): Expand options for storing values #2237spawn
Further endo daemon CLI support for dot-delimited paths #2325N/A
clean
help
log
purge
restart
start
stop
ping
where
The text was updated successfully, but these errors were encountered: