luigidemasi opened a new issue, #110: URL: https://github.com/apache/camel-kit/issues/110
> Imported from [luigidemasi/camel-kit#254](https://github.com/luigidemasi/camel-kit/issues/254), opened by [luigidemasi](https://github.com/luigidemasi) on 2026-10-19. --- ## Description Support an explicit choice of **JBang** or **Camel Launcher** as the Camel CLI backend used by Camel-Kit. Users select the backend through a command-line switch, or Kit detects the actual Camel CLI implementation when it can do so reliably. Camel Launcher is a supported choice even when JBang is also installed; it is not merely a fallback for missing JBang. A working Camel Launcher and supported JDK must also be sufficient when JBang is absent. A Qwen user can run Camel through the launcher, but the generated MCP configuration invokes `jbang` for Camel Catalog, Camel-Kit Knowledge, and Citrus. Catalog verification consequently fails and the workflow asks the user to install JBang or proceed with unverified information. Manually replacing the MCP entries does not address the other JBang assumptions in generated guidance and run scripts. ## Reproduction and verified findings 1. Install Camel Launcher and a supported JDK; leave `jbang` absent from `PATH`. 2. Initialize a Camel-Kit workspace through the Kit plugin, targeting Qwen. 3. Start Qwen with the generated `.qwen/settings.json` and request a design requiring catalog verification. 4. The generated servers attempt to execute `jbang`, so MCP startup fails. The supplied MCP configuration uses these runner coordinates: | Server | Pinned runner | | --- | --- | | Camel Catalog | `org.apache.camel:camel-jbang-mcp:4.22.1:runner` | | Camel-Kit Knowledge | `io.github.luigidemasi:camel-kit-knowledge-mcp:0.0.2:runner` | | Citrus | `org.citrusframework:citrus-mcp-server:5.0.1:runner` | The relevant source is unchanged on main `5493c8d679d4f6ee0819bfdb7f1aa1a841e7d360`: - [MCP templates](https://github.com/luigidemasi/camel-kit/tree/5493c8d679d4f6ee0819bfdb7f1aa1a841e7d360/camel-kit-core/src/main/resources/templates/mcp-configs) hardcode JBang across all eight agent targets. - [Shared MCP setup](https://github.com/luigidemasi/camel-kit/blob/5493c8d679d4f6ee0819bfdb7f1aa1a841e7d360/camel-kit-core/src/main/resources/skills/shared/mcp-setup.md) requires the JBang launch configuration and binds the Citrus artifact version specifically through a JBang command/coordinate. - [Run-script guidance](https://github.com/luigidemasi/camel-kit/blob/5493c8d679d4f6ee0819bfdb7f1aa1a841e7d360/camel-kit-core/src/main/resources/skills/camel-implement/guides/run-script.md) checks for JBang; [verification guidance](https://github.com/luigidemasi/camel-kit/blob/5493c8d679d4f6ee0819bfdb7f1aa1a841e7d360/camel-kit-core/src/main/resources/skills/camel-verify/guides/verify-loop.md) requires JBang for Main startup verification. `PrerequisiteChecker` also treats JBang as a separate prerequisite and labels the `camel` executable as Camel JBang. - Replacing the Camel MCP command with `camel mcp` is insufficient for Camel 4.22.1: its [McpCommand](https://github.com/apache/camel/blob/camel-4.22.1/dsl/camel-jbang/camel-jbang-plugin-mcp/src/main/java/org/apache/camel/dsl/jbang/core/commands/mcp/McpCommand.java) starts a `jbang` subprocess. Feasibility was verified by downloading the three published runner JARs and launching them directly with Java while `PATH` contained no JBang. All three completed MCP initialization and tool enumeration; a Camel catalog request resolved version 4.22.1. This establishes runner feasibility, not completion of the plugin-install, Knowledge retrieval, Citrus test-execution, or full workflow acceptance cases below. ## Requirements 1. **A complete installation path without JBang.** Document and verify Kit plugin installation and `camel kit` commands using Camel Launcher. Use executable capabilities rather than treating every `camel` installation as JBang. Support launcher distribution scripts and explicit executable paths; preserve the existing standalone/JBang installation path. 2. **Two selectable Camel CLI backends.** Expose a command-line choice between `jbang` and `launcher` (illustrative syntax: `--camel-cli=jbang|launcher`; final spelling is an implementation detail). An explicit switch takes precedence; persist the selected backend for subsequent workspace operations. When no explicit or saved choice exists, autodetect the backend of the actual Camel invocation/executable if reliable evidence is available. The name `camel` does not identify its implementation, and the presence of a separate `jbang` executable must not override a Launcher-backed `camel`. When detection is inconclusive, require an explicit choice rather than guess. If the chosen backend is unavailable or incompatible, report it and how to configure the correct executable; do not silently switch backends or install JBang. Backend selection applies consistently to generated commands, run scripts, MCP setup, verification, and diagnostics. Java runner startup may be an internal implement ation detail of Launcher mode, not a third user-facing backend. 3. **Managed MCP startup for every enabled server.** Support Camel Catalog, Knowledge, and Citrus when enabled, across Claude, Codex, Copilot, Qwen, OpenCode, Pi, Bob 2, and Antigravity. Users should not need to download runner JARs by hand or edit MCP JSON/TOML. A managed Java runner is acceptable; do not assume `camel mcp` is JBang-free without verifying the selected CLI version. Preserve server names, tool restrictions, approval settings, JVM properties, STDIO transport, exit status, and shutdown behavior. Bootstrap/download output must not corrupt protocol stdout. 4. **Reproducible artifact resolution.** Keep `distribution.properties` and existing supported workspace overrides authoritative for versions and repositories. Resolve the configured runner coordinates, retain artifact identity/provenance for later checks, validate downloaded artifacts before use, and reuse a versioned cache safely. Handle concurrent startup and interrupted downloads. A warm runner cache must be reusable offline; a cold cache or missing Knowledge data must produce a precise diagnostic. Cover configured repositories/proxies and avoid requiring Maven or another system tool solely to replace JBang for MCP startup. 5. **Runtime and workflow parity.** Update generated Main run scripts, environment checks, smoke tests, and skill instructions to use the selected Camel executable. Do not skip working Main validation solely because JBang is missing. Audit the `camel test` and Citrus `camel:jbang:run` paths for actual subprocess dependencies and verify the supported test path without JBang; naming alone does not establish a requirement. Keep Spring Boot/Quarkus build requirements intact. Any genuinely unsupported capability must be reported explicitly, never counted as passed verification. 6. **Version correctness and diagnostics.** Account for the launcher's fixed Camel version: do not rely on JBang's dynamic `--camel-version` behavior or silently run a different version from the project. `doctor` and prerequisite reporting should explain the selected executable/mode, missing artifacts/JDK/plugin, and version mismatches. Update Citrus artifact binding to validate supported launch modes without weakening same-version checks or trusting a JAR filename alone. 7. **Existing workspace compatibility.** Provide a supported regeneration/migration path for existing JBang-only workspaces. Preserve unrelated MCP entries, user settings, tool permissions, and the selected mode on repeated init/update operations. Handle executable/cache paths with spaces on Linux, macOS, and Windows; avoid making a shared workspace depend on another user's absolute cache path. 8. **Documentation and release notes.** Update installation, prerequisites, commands/options, MCP architecture, troubleshooting, and migration guidance, including which components still need network access and what offline operation requires. Publish the same supported behavior on the companion website. ## Acceptance criteria - [ ] A clean environment with a supported JDK and Camel Launcher, but no JBang binary, can install/use the Kit plugin and initialize a Qwen workspace without manual MCP edits. - [ ] Generated configurations for all eight targets select the supported mode and preserve their agent-specific tool/approval schemas; existing JBang mode remains covered. - [ ] A packaged integration test exercises actual initialization, `tools/list`, and a representative successful tool call for each enabled server. Include Catalog version binding, Knowledge retrieval, and a Citrus schema query; a successful handshake alone is insufficient. - [ ] A representative Main route runs and passes the startup smoke test; a container-free Citrus test runs through the advertised CLI path without spawning JBang. Any upstream dependency blocking this has a linked issue and an explicit supported-version boundary before claiming full support. - [ ] Test explicit `jbang` and `launcher` selection, switch precedence over the saved/detected choice, reliable autodetection of the actual `camel` implementation, and persistence. With both installed, test `camel` backed by each implementation and an explicit choice of the other executable. An ambiguous wrapper requires an explicit choice; an unavailable selected backend fails without silently switching. Cover missing/incompatible Java and launcher/project Camel version mismatch. - [ ] Test cold and warm caches, offline cache reuse, failed/interrupted downloads, concurrent startup, configured repositories, and paths containing spaces; error output does not contaminate MCP stdout. - [ ] Existing-workspace migration and repeated generation preserve unrelated configuration and permissions. `doctor` and skill-side artifact/version checks accept the supported mode and reject mismatched artifacts. - [ ] Repository docs, release notes, and the linked website follow-up are complete before closure. ## Detection evidence and limits Camel 4.22.1 already sets `camel.launcher=true` in [CamelLauncher.main](https://github.com/apache/camel/blob/camel-4.22.1/dsl/camel-jbang/camel-launcher/src/main/java/org/apache/camel/dsl/jbang/launcher/CamelLauncher.java) and provides [LauncherHelper.isRunningFromLauncher()](https://github.com/apache/camel/blob/camel-4.22.1/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/LauncherHelper.java). Kit's `camel kit init` plugin delegates to the core init command within that JVM, so this is a concrete detection signal for Launcher invocations. Prefer the explicit runtime marker over guessing from filenames. Standalone Kit invocation and arbitrary external wrappers may need a separate executable probe or explicit selection; do not interpret the absence of a marker in an unrelated JVM as proof of JBang. Detection feasibility outside the active plugin invocation remains to be verified. ## Design decisions to settle during implementation - Internal implementation of Launcher-mode MCP startup and artifact/cache ownership. Whether it uses a Kit subcommand or direct Java runner configuration does not change the user-facing choice of JBang versus Camel Launcher; select the smallest approach satisfying the requirements. - Exact switch/property names, reliable detection outside the active Camel plugin invocation, minimum supported Camel Launcher/JDK versions, and any upstream changes needed by the runtime/test path. ## Related work and scope - luigidemasi/camel-kit#249 owns whether Citrus MCP is enabled by default. This issue must support Citrus **when enabled** and must not change that policy. - luigidemasi/camel-kit#248 owns related catalog/Knowledge guidance and tool-contract changes; coordinate edits to the shared MCP guide. - The supplied Camel allowlist also names four tools absent from the pinned server (`camel_transform_route`, `camel_validate_route`, `camel_validate_yaml_dsl`, `camel_version_list`). This mismatch exists independently of launcher selection. Preserve least privilege and coordinate tool-contract fixes separately; do not declare a launcher failure or broaden permissions to hide it. - No new agent target, runtime, mandatory container, or removal of JBang support is requested. ## Website impact: required Companion documentation follow-up: https://github.com/luigidemasi/camel-kit-web/issues/56 This changes supported installation, prerequisites, generated MCP startup, diagnostics, and migration behavior. The website must describe the implemented behavior and supported-version boundaries before this issue closes. References: [Camel Launcher](https://camel.apache.org/manual/camel-jbang-launcher.html), [MCP server with java -jar](https://camel.apache.org/manual/camel-jbang-mcp.html#_using_java_jar_no_jbang_needed). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
