davsclaus opened a new pull request, #30978:
URL: https://github.com/apache/camel/pull/30978

   # Description
   
   Part of [CAMEL-23832](https://issues.apache.org/jira/browse/CAMEL-23832). 
The umbrella ticket stays open.
   
   ## Summary
   
   This PR rewrites 57 texts of camel-a2a: the component description, all 32 
endpoint options and all 24 headers. The component has no component options of 
its own. Most old texts were a few words, such as "Message ID", "Max history 
messages" or "Return immediately flag", and did not say which side (consumer or 
producer) reads the value or what the default does.
   
   The new texts follow the code of the component (`A2AConfiguration`, 
`A2AEndpoint`, `A2AConsumer`, `A2AProducer`, the operations, the auth handlers, 
`AgentCardLoader`/`AgentCardResolver`, `PushNotificationDispatcher`, 
`WebhookUrlValidator`, the SSE classes) and `OAuthHelper` of camel-support for 
`oauthProfile`.
   
   These old texts were wrong:
   
   - `dataFormat` RAW: the old text said the consumer passes the raw JSON. In 
fact it gives the Message of the request as JSON again, and the producer sets 
no A2A header except `CamelA2AMethod`.
   - `httpServerComponent`: the old text said the consumer looks on the 
classpath first. In fact it uses `camel.rest.component` first, then 
platform-http, then the only `RestConsumerFactory` it finds.
   - `connectTimeout`: it also applies to the push notifications of the 
consumer and to the download of the agent card, which it also times out as a 
whole.
   - `historyLength` and `CamelA2AReturnImmediately`: the old texts described 
options that have no effect (see below).
   
   ### Found, not changed
   
   - The `historyLength` endpoint option is not used. The endpoint only checks 
at start that it is not negative. The producer reads the history length from 
the `CamelA2AHistoryLength` and `CamelA2AListHistoryLength` headers.
   - The `CamelA2AReturnImmediately` header has no effect. The consumer reads 
it from the request exchange after `filterInboundHeaders` removed every 
`Camel*` header, and the producer does not send it. `a2a-component.adoc` and 
`a2a-consumer.adoc` describe it as a per-request override.
   - Some header labels are wrong. `CamelA2AHistoryLength`, 
`CamelA2AReturnImmediately`, `CamelA2APushConfigId` and the seven 
`CamelA2AList*` headers are labelled `common`, but only the producer uses them. 
The consumer reads the query parameters and the request body instead.
   - Some option labels are wrong or missing:
     - `connectTimeout` is labelled `producer,advanced`, but the consumer also 
uses it for push notifications.
     - `host` and `port` are only used by the producer, and have no producer 
label.
     - `returnImmediately`, `validateAuth`, `completedTaskTtl`, 
`pushRetryAttempts` and `pushRetryBackoffMs` are only used by the consumer, and 
have no consumer label.
   - `asyncTimeout=0` passes validation and means no timeout on the consumer. 
On the producer it makes `MESSAGE_STREAM` and `TASK_SUBSCRIBE` fail, because 
`HttpRequest.Builder.timeout` rejects a zero duration.
   - With `protocolBinding=HTTP+JSON`, `PUSH_CONFIG_GET` and 
`PUSH_CONFIG_DELETE` ignore `CamelA2APushConfigId`. Without `taskId:configId` 
in `CamelA2ATaskId`, the request goes to the list path. `a2a-producer.adoc` 
already says to use JSON-RPC for these two operations.
   - The producer drops the `nextPageToken` of the `TASK_LIST` response, as the 
body is only the List of tasks. Paging therefore needs `dataFormat=RAW`.
   - With `returnImmediately=true`, only the REST binding rejects 
`SendStreamingMessage`. The JSON-RPC dispatch does not check it.
   - With `returnImmediately=true` and a route that sets 
`CamelA2AReplyType=message`, the async task is not updated when the route ends. 
It stays `TASK_STATE_WORKING`, because `submitAsyncTask` only stores a task 
response.
   
   ## Tests
   
   - There is no new test, as only description text changes.
   - A script compared the component JSON with the parent commit: only 
`description` fields changed (57 texts: 1 component, 32 endpoint options, 24 
headers). The same holds for the catalog copy.
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 
uses the `main` branch)
   
   # Tracking
   
   - [x] If this is a large change, bug fix, or code improvement, I checked 
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for 
the change (usually before you start working on it).
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful 
subject line and body.
   - [x] I ran the formatter and built the module, then regenerated the catalog 
copy, `dsl/camel-endpointdsl` and `dsl/camel-componentdsl`, and committed all 
generated changes.
   
   # AI-assisted contributions
   
   - [x] If this PR includes AI-generated code, commits have proper 
co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR 
description identifies the AI tool used.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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]

Reply via email to