Claus Ibsen created CAMEL-25489:
-----------------------------------
Summary: camel-jbang - add CLI commands to list and evaluate
semantic definitions
Key: CAMEL-25489
URL: https://issues.apache.org/jira/browse/CAMEL-25489
Project: Camel
Issue Type: New Feature
Components: camel-jbang
Reporter: Claus Ibsen
Follow-up to PR https://github.com/apache/camel/pull/27602 (semantic tooling in
the TUI).
That PR adds two runtime dev consoles in camel-semantic, {{semantic-metadata}}
and {{semantic-evaluate}}, plus CLI connector actions for both. Today only the
TUI uses them. Add Camel CLI commands on top of the same actions so semantic
definitions can be inspected and tried from scripts and coding agents, for
example:
* {{camel get semantic}}: list the published definitions (name, expert,
operation, state, result type, error) and the known experts. Use
{{--expert=<name>}} to show one expert's operations and parameter contract.
Support {{--json}} output.
* {{camel cmd semantic-evaluate}}: run a named definition against a sample
exchange ({{--evaluation}}, {{--body}}, {{--header}}, {{--variable}}), or call
an expert operation directly ({{--expert}}, {{--operation}}, {{--input}},
{{--parameter}}). Print value, probability/probabilities, confidence, elapsed
time and error.
Command names are a proposal. Align them with existing camel get / camel cmd
conventions, and with the agent-readiness conventions (exit codes, stderr,
JSON) from CAMEL-25388.
Note: as reviewed in PR 27602, {{semantic-evaluate}} currently runs the
provider call on the single connector action thread. A long model call blocks
the other CLI actions until it finishes. That should be fixed before more
clients use it.
Depends on PR 27602 being merged.
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)