cli: Support dot-delimited petname paths
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:
$ endo eval '10' --name ten
10
$ endo eval 'foo' foo:INFO.ten.source
10
Note that the parsePetNamePath() utility should be used for dot-delimited path parsing in the CLI.
See also discussion in #1915.
TODO
- [ ] #2041
- [x]
eval#2034 - [ ]
cancel- Prior attempt: #2043
- [x]
--ashttps://github.com/endojs/endo/pull/2047-
dismiss -
inbox -
list -
reject
-
- [x]
make#2281 - [x]
store#2281 - [ ]
adopt - [x]
bundle#2296 - [x]
cat#2296 - [ ]
dismiss - [x]
follow#2296 - [ ]
install - [x]
mkdir#2325 - [ ]
mkguest - [ ]
mkhost - [x]
move#2227 - [x]
open#2296 - [ ]
reject - [x]
remove#2325 - [ ]
request - [ ]
resolve - [x]
run#2296 - [ ]
send - [x]
show#2237 - [x]
spawn#2325
N/A
-
clean -
help -
log -
purge -
restart -
start -
stop -
ping -
where
endo rename should be replaced with endo mv|move when we can support dot delimited paths, and we should support dot delimited paths for both the source and target. We should also guarantee that a move occurs in a single JavaScript event unless the dot-delimited path reaches outside the local dæmon. That will require the move operation to walk from formula to formula for both the source and target path before falling through to the lookup protocol. We will need a corresponding protocol for “depositing” a formula identifier to the target “directory” and allow that protocol to work remotely.
E(remoteDirectory).deposit(name, nonce, addresses). See https://github.com/ocapn/ocapn/pull/105
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.