Skip to content

Conversation

@Abishek-Newar
Copy link

Description

Add Go and Java auto-install support for the terminal toolkit, as discussed in eigent-ai/eigent#932.
When the terminal toolkit initializes, it now automatically detects and downloads Go and Java runtimes if they aren't already installed:

  • Go: Downloads official binary from go.dev/dl/ (pinned to v1.23.6)
  • Java: Downloads Eclipse Temurin (Adoptium) JDK 21 LTS via the Adoptium API
  • Runtimes are installed to ~/.camel/runtimes/go/ and ~/.camel/runtimes/java/
  • Supports Linux, macOS, and Windows (amd64/arm64)
  • Includes SHA256 checksum verification for Go downloads

Changes

  • camel/toolkits/terminal_toolkit/utils.py — Added ensure_go_available(), ensure_java_available(), and shared helper functions
  • camel/toolkits/terminal_toolkit/terminal_toolkit.py — Integrated auto-install in _setup_initial_environment()
  • test/toolkits/test_terminal_toolkit.py — Added 15 unit tests

Closes : #932
closes: #3817

Checklist

  • I have read the CONTRIBUTION guide (required)
  • I have linked this PR to an issue using the Development section on the right sidebar or by adding Fixes #issue-number in the PR description (required)
  • I have checked if any dependencies need to be added or updated in pyproject.toml and uv lock
  • I have updated the tests accordingly (required for a bug fix or a new feature)
  • I have updated the documentation if needed:
  • I have added examples if this is a new feature

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 10, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Collaborator

@bytecii bytecii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Left some comments

@lightaime
Copy link
Member

Should we made these runtimes configurable from the initialzation of terminal toolkit? Having all the runtimes installed by default may be a bit too heavy. I would prefer having python runtime by default but the other ones are optional in the TerminalToolkit since most of tasks we do need also all runtimes

We can enable them all in eigent product. Do we have an idea what kind of tasks we need go and java. Also do we have an idea how much extra space will it take if we want to bundle all the language runtimes into the package?

@Wendong-Fan @bytecii WDYT?

Copy link
Collaborator

@bytecii bytecii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, let's maybe add a config to for example configure whether we need to include each language

@Abishek-Newar
Copy link
Author

@bytecii , can you please elaborate what type of changes should i do further?

@bytecii
Copy link
Collaborator

bytecii commented Feb 11, 2026

@bytecii , can you please elaborate what type of changes should i do further?

For example, for the TerminalToolkit initialization add args to something like allowed runtime etc.

Comment on lines +400 to +404
# Check Go availability (auto-install if needed)
ensure_go_available(update_callback)

# Check Java availability (auto-install if needed)
ensure_java_available(update_callback)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like we directly discard the output installed path, then how would you ensure the shell command can find the correct path? Since we did not store the path in either os.environ["JAVA_HOME"] or os.environ["PATH"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

5 participants