endojs / endo

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

feat(daemon): List special names #1918

Closed kriskowal closed 7 months ago

kriskowal commented 8 months ago

Hosts and guests have a pet store and also special names. The special names are distinguished by being in ALL_CAPS like SELF or HOST so that they do not collide with kebab-case pet names. The special names cannot be deleted or overwritten. Guests and hosts have different special names.

This change makes the list of special names observable by adding listSpecial() and listAll() methods to the host and guest facets and revealing them in the CLI with --special and --all flags.

This change also alters the endo list command to accept an optional dot-delimited pet name path to the store the user wishes to list. The object at the end of that dot delimited path must implement list(), listAll(), or listSpecial() but can otherwise be an arbitrary object implementing this protocol. This completely subsumes the behavior of the --as flag for this command, freeing -a up for --all.

dckc commented 8 months ago

these naming conventions (starting with kebab-case) make my spidey-sense tingle.

These names are supposed to be user-chosen, no? It feels very strange to not let the user choose whatever name they like.

Distinguishing system names by SHOUTING also seems fragile. something like $ystem would appeal to me.

Are the tests of what kind of name a string is localized? that would help in case we change our minds.

kriskowal commented 8 months ago

these naming conventions (starting with kebab-case) make my spidey-sense tingle.

These names are supposed to be user-chosen, no? It feels very strange to not let the user choose whatever name they like.

Distinguishing system names by SHOUTING also seems fragile. something like $ystem would appeal to me.

Are the tests of what kind of name a string is localized? that would help in case we change our minds.

This is a good time to consider alternative designs. The parameters of the design are like:

The current design is definitely optimized to minimize the scope of design conversations during this spike, but we’re definitely getting close to the end of the spike.

dckc commented 8 months ago

... Kebab-case could be special and braces could be used to envelope more expressive names, e.g., endo send CPA 'Please download your @{Tax Signature Pages.pdf}, sign, and return.'

That one appeals to me, but...

That invites a conversation about escaping / Hilbert Hoteling.

Yes. Lots to think about. Hm.

rekmarks commented 7 months ago

Superseded by #2068.