endojs / endo

Endo is a distributed secure JavaScript sandbox, based on SES
Apache License 2.0
761 stars 68 forks source link

Further endo daemon CLI support for dot-delimited paths #2325

Closed FUDCo closed 1 week ago

FUDCo commented 1 week ago

Adds support for dot-delimited petname paths in the mkdir, remove, and spawn commands, plus everywhere there's a --name option (the install, make, request, adopt, store, eval, and bundle commands).

Ref: #2023

FUDCo commented 1 week ago

Something for the TODO list that came up in the doing of this PR: The switchover to allowing paths where only simple names had previously been supported forced some of the functions that accept a path in the form of a variadic argument list to be converted to take the path in the form of an array of path elements, while other functions remain using the variadic form. The resulting mixture is quite confusing. For the sake of cleanliness, consistency, and legibility (not to mention making parameter types less mysterious), all the variadic functions should be converted to the array form. The fact that this change is not completely trivial to execute highlights the need for it.

kriskowal commented 1 week ago

I agree all methods should take the array form. Except lookup because I don’t make the rules for hub protocol (@dckc).

dckc commented 1 week ago

The rules for the lookup protocol pre-date me. @erights , @michaelfig ? thoughts?

michaelfig commented 1 week ago

I’m fine with this as-is, but there’s a chance we’ll have to loosen up lookup to accept variadic pet name paths again because that’s the protocol of name hubs on the Agoric chain.

I don't see how that is a requirement: why would the current version of "name hubs on the Agoric chain" be relevant to the daemon's long-term API? The daemon's pet name system should work with any other name system, using adapters as necessary to be agnostic.