Skip to content
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

feat(cli,daemon): Support dot-delimited petname paths for CLI eval command #2034

Merged
merged 4 commits into from
Feb 8, 2024

Commits on Feb 5, 2024

  1. feat(cli,daemon): Support dot-delimited petname paths in eval

    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`, modeled on the `web-bundle`
    formula. Also adds a unit test for this behavior.
    
    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.
    rekmarks committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    d35bbe2 View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2024

  1. Configuration menu
    Copy the full SHA
    55aa89b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c6b5b82 View commit details
    Browse the repository at this point in the history
  3. refactor(daemon): Replace "agent" language with "hub" for lookup

    Lookup formulas must be associated with the namespace for
    which the pet name path is valid. In practice, this means
    an object with a variadic `lookup()` method. Previously, these
    objects were referred to as "agents", but in the future, not
    all such object will be agents (i.e. guests or hosts). Therefore,
    here we replace all references to "agent" with "hub", short
    for "naming hub".
    rekmarks committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    e6f36a1 View commit details
    Browse the repository at this point in the history