Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/use/execmd/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The tool does the following:

* The line is not directly `exec`, but passed as-is to `bash -c`
* The working directory is set to the processed Markdown file's directory (use e.g. ` ```bash cd ..` to change it)
* Command must exit with `0`, otherwise the tool aborts and returns that code (unless ` ```bash $?`)
* Command must exit with `0`, otherwise the tool aborts and returns that code (unless ` ```bash $?` or `$%` is used)
* Command is killed (times out) after 7s if it "hangs" (useful on CI)
* `STDOUT` & `STDERR` are both captured, and interspersed in MD
* `STDIN` is closed (but you can use `< ...`)
Expand Down
10 changes: 3 additions & 7 deletions docs/use/mcp/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,19 @@ This is similar to the [MCP Inspector](https://github.com/modelcontextprotocol/i

## Call MCP Tool

<!-- TODO Re-add the 'bash cd ../.././..' header AFTER https://github.com/enola-dev/enola/issues/1862 is fixed... -->

```sh
```bash cd ../.././..
$ ./enola -v mcp call-tool modelcontextprotocol/everything echo '{"message":"hi"}'
...
```

## List MCP Tools

<!-- TODO Re-add the 'bash $? cd ../.././..' header AFTER https://github.com/enola-dev/enola/issues/1862 is fixed... -->

```sh
```bash $% cd ../.././..
$ ./enola mcp list-tools --help
...
```

<!-- TODO This doesn't work?!
<!-- TODO Why does this not work?! Is it just because secrets are missing on CI? See also test-cli.bash ...

```bash cd ../.././..
$ ./enola -vv mcp list-tools
Expand Down
6 changes: 5 additions & 1 deletion test-cli.bash
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ set -euox pipefail
# This script tests Enola CLI invocations.
# See also EnolaCLITest

# ...
# Integration test the MCP related stuff; initially added to catch https://github.com/enola-dev/enola/issues/1862 regressions:
# TODO FIXME ./enola -vv mcp list-tools
./enola -vv mcp call-tool modelcontextprotocol/everything echo '{"message":"hi"}'
# TODO The ai sub-command currently doesn't actually return 1 instead of 0 on errors, so this is not really not testable yet, but still useful:
./enola -vv ai --agents=test/agents/everything.agent.yaml --prompt "Print environment variables to debug MCP"

# PS: Update tika.md with anything (of interest) added here
5 changes: 3 additions & 2 deletions test.bash
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,10 @@ else # On CI
# https://github.com/enola-dev/enola/issues/1780
"$BZL" query //... | xargs "$BZL" test --experimental_ui_max_stdouterr_bytes=-1
cat ~/.bazel/execroot/_main/bazel-out/k8-fastbuild/testlogs/java/dev/enola/cli/tests/test.log || true
fi

./test-cli.bash
# Run Enola CLI integration tests!
./test-cli.bash
fi

# The following makes sure that this test.bash will run as a pre-commit hook.
# NB: We DO NOT want to "pre-commit install" because that won't run Bazel!
Expand Down
2 changes: 1 addition & 1 deletion test/agents/everything.agent.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$schema: https://enola.dev/ai/agent
model: google://?model=gemini-2.5-flash-lite
model: echo:/
tools:
- modelcontextprotocol/everything
2 changes: 2 additions & 0 deletions tools/test-ci/test.bash
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ nix run .#test
# Skippping test, because Nix did already just run this...
# ./test.bash

# NB: The //test-cli.bash script is run from within test.bash (if we're on CI)

# Ensure non-regression on exploratory possible future entirely non-Bazel based build infrastructure idea...
tools/javac/build.bash

Expand Down
Loading