Skip to content

Commit eb732ad

Browse files
docs: Fix typos and linguistic errors in documentation / hacktoberfest (#343)
# Description Fix typos and linguistic errors in documentation. It's not much but I'm happy to help Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [X ] Follow the [`CONTRIBUTING` Guide](../CONTRIBUTING.md). - [X ] Make your Pull Request title in the <https://www.conventionalcommits.org/> specification. - Important Prefixes for [release-please](https://github.com/googleapis/release-please): - `fix:` which represents bug fixes, and correlates to a [SemVer](https://semver.org/) patch. - `feat:` represents a new feature, and correlates to a SemVer minor. - `feat!:`, or `fix!:`, `refactor!:`, etc., which represent a breaking change (indicated by the `!`) and will result in a SemVer major. - [ X] Ensure the tests pass - [X ] Appropriate READMEs were updated (if necessary) Fixes #<issue_number_goes_here> 🦕 --------- Signed-off-by: Sebastien Dionne <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent e25328b commit eb732ad

File tree

8 files changed

+18
-19
lines changed

8 files changed

+18
-19
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This can be done by looking in the top-right corner of the repository page and c
1919

2020
The next step is to clone your newly forked repository onto your local workspace. This can be done by going to your newly forked repository, which should be at `https://github.com/USERNAME/a2a-java`.
2121

22-
Then, there will be a green button that says "Code". Click on that and copy the URL.
22+
Then, there will be a green button that says "Code". Click on it and copy the URL.
2323

2424
Then, in your terminal, paste the following command:
2525
```bash

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ The A2A Java SDK provides a Java server implementation of the [Agent2Agent (A2A)
4040
- [Add a class that creates an A2A Agent Card](#2-add-a-class-that-creates-an-a2a-agent-card)
4141
- [Add a class that creates an A2A Agent Executor](#3-add-a-class-that-creates-an-a2a-agent-executor)
4242

43-
### 1. Add an A2A Java SDK Reference Server dependency to your project
43+
### 1. Add an A2A Java SDK Server Maven dependency to your project
4444

45-
Adding a dependency on an A2A Java SDK Reference Server will provide access to the core classes
45+
Adding a dependency on an A2A Java SDK Server will provide access to the core classes
4646
that make up the A2A specification and allow you to run your agentic Java application as an A2A server agent.
4747

4848
The A2A Java SDK provides [reference A2A server implementations](reference) based on [Quarkus](https://quarkus.io) for use with our tests and examples. However, the project is designed in such a way that it is trivial to integrate with various Java runtimes.
@@ -128,7 +128,7 @@ public class WeatherAgentCardProducer {
128128
.skills(Collections.singletonList(new AgentSkill.Builder()
129129
.id("weather_search")
130130
.name("Search weather")
131-
.description("Helps with weather in city, or states")
131+
.description("Helps with weather in cities or states")
132132
.tags(Collections.singletonList("weather"))
133133
.examples(List.of("weather in LA, CA"))
134134
.build()))
@@ -294,8 +294,7 @@ that you can use to create your A2A `Client`.
294294

295295
### 2. Add one or more dependencies on the A2A Java SDK Client Transport(s) you'd like to use
296296

297-
By default, the sdk-client is coming with the JSONRPC transport dependency. Despite the fact that the JSONRPC transport
298-
dependency is included by default, you still need to add the transport to the Client as described in [JSON-RPC Transport section](#json-rpc-transport-configuration).
297+
By default, the `sdk-client` artifact includes the JSONRPC transport dependency. However, you must still explicitly configure this transport when building the `Client` as described in the [JSON-RPC Transport section](#json-rpc-transport-configuration).
299298

300299

301300
If you want to use the gRPC transport, you'll need to add a relevant dependency:
@@ -505,8 +504,8 @@ client.sendMessage(message, customConsumers, customErrorHandler);
505504
// Retrieve the task with id "task-1234"
506505
Task task = client.getTask(new TaskQueryParams("task-1234"));
507506

508-
// You can also specify the maximum number of items of history for the task
509-
// to include in the response and
507+
// You can also specify the maximum number of history items for the task
508+
// to include in the response
510509
Task task = client.getTask(new TaskQueryParams("task-1234", 10));
511510

512511
// You can also optionally specify a ClientCallContext with call-specific config to use

client/base/src/main/java/io/a2a/A2A.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ private static Message toMessage(List<Part<?>> parts, Message.Role role, String
136136
* @param agentUrl the base URL for the agent whose agent card we want to retrieve
137137
* @return the agent card
138138
* @throws A2AClientError If an HTTP error occurs fetching the card
139-
* @throws A2AClientJSONError f the response body cannot be decoded as JSON or validated against the AgentCard schema
139+
* @throws A2AClientJSONError If the response body cannot be decoded as JSON or validated against the AgentCard schema
140140
*/
141141
public static AgentCard getAgentCard(String agentUrl) throws A2AClientError, A2AClientJSONError {
142142
return getAgentCard(new JdkA2AHttpClient(), agentUrl);
@@ -149,7 +149,7 @@ public static AgentCard getAgentCard(String agentUrl) throws A2AClientError, A2A
149149
* @param agentUrl the base URL for the agent whose agent card we want to retrieve
150150
* @return the agent card
151151
* @throws A2AClientError If an HTTP error occurs fetching the card
152-
* @throws A2AClientJSONError f the response body cannot be decoded as JSON or validated against the AgentCard schema
152+
* @throws A2AClientJSONError If the response body cannot be decoded as JSON or validated against the AgentCard schema
153153
*/
154154
public static AgentCard getAgentCard(A2AHttpClient httpClient, String agentUrl) throws A2AClientError, A2AClientJSONError {
155155
return getAgentCard(httpClient, agentUrl, null, null);
@@ -164,7 +164,7 @@ public static AgentCard getAgentCard(A2AHttpClient httpClient, String agentUrl)
164164
* @param authHeaders the HTTP authentication headers to use
165165
* @return the agent card
166166
* @throws A2AClientError If an HTTP error occurs fetching the card
167-
* @throws A2AClientJSONError f the response body cannot be decoded as JSON or validated against the AgentCard schema
167+
* @throws A2AClientJSONError If the response body cannot be decoded as JSON or validated against the AgentCard schema
168168
*/
169169
public static AgentCard getAgentCard(String agentUrl, String relativeCardPath, Map<String, String> authHeaders) throws A2AClientError, A2AClientJSONError {
170170
return getAgentCard(new JdkA2AHttpClient(), agentUrl, relativeCardPath, authHeaders);
@@ -180,7 +180,7 @@ public static AgentCard getAgentCard(String agentUrl, String relativeCardPath, M
180180
* @param authHeaders the HTTP authentication headers to use
181181
* @return the agent card
182182
* @throws A2AClientError If an HTTP error occurs fetching the card
183-
* @throws A2AClientJSONError f the response body cannot be decoded as JSON or validated against the AgentCard schema
183+
* @throws A2AClientJSONError If the response body cannot be decoded as JSON or validated against the AgentCard schema
184184
*/
185185
public static AgentCard getAgentCard(A2AHttpClient httpClient, String agentUrl, String relativeCardPath, Map<String, String> authHeaders) throws A2AClientError, A2AClientJSONError {
186186
A2ACardResolver resolver = new A2ACardResolver(httpClient, agentUrl, relativeCardPath, authHeaders);

client/base/src/main/java/io/a2a/client/ClientBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ private ClientTransport buildClientTransport() throws A2AClientException {
9191
// Get the preferred transport
9292
AgentInterface agentInterface = findBestClientTransport();
9393

94-
// Get the transport provider associated to the protocol
94+
// Get the transport provider associated with the protocol
9595
ClientTransportProvider clientTransportProvider = transportProviderRegistry.get(agentInterface.transport());
9696
if (clientTransportProvider == null) {
9797
throw new A2AClientException("No client available for " + agentInterface.transport());
9898
}
9999
Class<? extends ClientTransport> transportProtocolClass = clientTransportProvider.getTransportProtocolClass();
100100

101-
// Retrieve the configuration associated to the preferred transport
101+
// Retrieve the configuration associated with the preferred transport
102102
ClientTransportConfig<? extends ClientTransport> clientTransportConfig = clientTransports.get(transportProtocolClass);
103103

104104
if (clientTransportConfig == null) {

common/src/main/java/io/a2a/common/A2AErrorMessages.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
public final class A2AErrorMessages {
44

55
private A2AErrorMessages() {
6-
// prevent instantiation
6+
// Prevent instantiation
77
}
88

99
public static final String AUTHENTICATION_FAILED = "Authentication failed: Client credentials are missing or invalid";

http-client/src/main/java/io/a2a/client/http/A2ACardResolver.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public A2ACardResolver(String baseUrl) throws A2AClientError {
3535
}
3636

3737
/**
38-
/**Get the agent card for an A2A agent.
38+
* Constructs an A2ACardResolver with a specific HTTP client and base URL.
3939
*
4040
* @param httpClient the http client to use
4141
* @param baseUrl the base URL for the agent whose agent card we want to retrieve
@@ -81,7 +81,7 @@ public A2ACardResolver(A2AHttpClient httpClient, String baseUrl, @Nullable Strin
8181
*
8282
* @return the agent card
8383
* @throws A2AClientError If an HTTP error occurs fetching the card
84-
* @throws A2AClientJSONError f the response body cannot be decoded as JSON or validated against the AgentCard schema
84+
* @throws A2AClientJSONError If the response body cannot be decoded as JSON or validated against the AgentCard schema
8585
*/
8686
public AgentCard getAgentCard() throws A2AClientError, A2AClientJSONError {
8787
A2AHttpClient.GetBuilder builder = httpClient.createGet()

server-common/src/main/java/io/a2a/server/agentexecution/RequestContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public RequestContext(
3838
this.relatedTasks = relatedTasks == null ? new ArrayList<>() : relatedTasks;
3939
this.callContext = callContext;
4040

41-
// if the taskId and contextId were specified, they must match the params
41+
// If the taskId and contextId were specified, they must match the params
4242
if (params != null) {
4343
if (taskId != null && !taskId.equals(params.message().getTaskId())) {
4444
throw new InvalidParamsError("bad task id");

transport/grpc/src/test/java/io/a2a/transport/grpc/handler/GrpcHandlerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ public void testDeletePushNotificationConfigNoPushConfigStore() {
742742

743743
@Disabled
744744
public void testOnGetAuthenticatedExtendedAgentCard() throws Exception {
745-
// TODO - getting the authenticated extended agent card isn't support for gRPC right now
745+
// TODO - getting the authenticated extended agent card isn't supported for gRPC right now
746746
}
747747

748748
@Test

0 commit comments

Comments
 (0)