Skip to content

Commit 1404bd1

Browse files
committed
chore(release): prepare Java SDK 0.1.0 and clarify installation
1 parent 7742942 commit 1404bd1

10 files changed

Lines changed: 201 additions & 127 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,27 @@
22

33
## [Unreleased]
44

5+
## [0.1.0] - 2026-10-21
6+
7+
First stable release of the Java SDK for the Forward API, using `com.qoder.sdk:qoder-cloud-agents-sdk:0.1.0`.
8+
9+
### Features
10+
11+
- Java 8 compatible synchronous and asynchronous clients, checked on Java 8, 11, 17, 21 and 25.
12+
- Shared PAT, static SAT and custom credentials, plus `ServiceAccountCredential` for automatic SA Key exchange, SAT caching and refresh. Forward administrator/Identity SAT issuance and revocation use explicit per-call SA Keys.
13+
- Typed Forward resource APIs for Models, Templates, Identities and configuration, Sessions and Threads, Memory Stores, Environments, Files, Skills, Vaults and Credentials, Schedules, Batches, Channels and Pairing, Usage and Drive.
14+
- Session/Thread SSE subscriptions with cancellation and explicit resumption; Realtime conversations with text/PCM audio, typed events, acknowledged close and History.
15+
- Shared request options, timeouts, retries, pagination, response metadata and typed errors, with resource-lifecycle examples and API guides. Managed APIs are outside this release's scope.
16+
17+
### Changed
18+
19+
- Promote the RC's API and runtime behavior without implementation changes; update installation, example and maintenance documentation for Maven Central consumption.
20+
21+
### Migration
22+
23+
- From `0.1.0-rc.1`, change only the dependency version to `0.1.0`.
24+
- From the earlier internal `com.qoder:qca-sdk:0.1.0-SNAPSHOT`, use `com.qoder.sdk:qoder-cloud-agents-sdk:0.1.0`. Java imports remain under `com.qoder.cloudagents`.
25+
526
## [0.1.0-rc.1] - 2026-10-21
627

728
First public release candidate for installation and integration testing ahead of `0.1.0`.
@@ -76,4 +97,4 @@ First public release candidate for installation and integration testing ahead of
7697
- Usage, Token management and Drive round-trip examples with installed-JAR consumer checks, scoped cleanup and storage credential isolation.
7798
- HTTP error request ID fallback from top-level and nested error bodies when response headers omit it.
7899

79-
This version can be built from source; Maven Central publication remains pending. See the [maintenance guide](docs/maintaining.md) for current checks and delivery boundaries.
100+
This release candidate is available from Maven Central. See the [maintenance guide](docs/maintaining.md) for checks and delivery boundaries.

‎README.md‎

Lines changed: 18 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,43 @@
11
# Qoder Cloud Agents Java SDK
22

3-
Java 8 compatible client for the **Forward API**. The repository follows the resource and authentication structure of the QCA Go, Python and TypeScript SDKs, using Maven and Java builders.
3+
Java 8+ SDK for the **Forward API**, with typed synchronous and asynchronous clients. Supports PAT/SA authentication, pagination, retries, Session/Thread SSE and Realtime text/audio. Managed APIs are outside this SDK's scope.
44

5-
**Status: source available; not yet published to Maven Central.** The current version is `0.1.0-rc.1`. Build from source to use the SDK until a public Maven release is available.
5+
[Changelog](CHANGELOG.md) · [Releases](https://github.com/QoderAI/qoder-cloud-agents-sdk-java/releases) · [Maven Central](https://central.sonatype.com/artifact/com.qoder.sdk/qoder-cloud-agents-sdk)
66

7-
The SDK provides synchronous and asynchronous clients for Models, Templates, Identities, Sessions and Threads, Memory Stores, Environments, Files, Skills, Vaults and Credentials, Schedules, Batches, Channels and Pairing, Usage, Service Account Tokens and Drive. Shared support includes PAT/SA authentication, timeouts, retries, pagination, typed errors and request IDs. Session/Thread SSE supports explicit resumption; Realtime supports text, PCM audio and History. The [API coverage](docs/forward-api-coverage.md) records the 123-operation baseline and its exclusions. Managed APIs are outside this project's scope.
7+
## Installation
88

9-
See the [examples](examples/README.md) for authentication and resource workflows, and the [maintenance guide](docs/maintaining.md) for contributor checks and version updates.
10-
11-
## Maven dependency
12-
13-
After installing the SDK locally or publishing it to your configured Maven repository, use:
9+
Add the Maven dependency; published versions require no local SDK build or additional repository configuration.
1410

1511
```xml
1612
<dependency>
1713
<groupId>com.qoder.sdk</groupId>
1814
<artifactId>qoder-cloud-agents-sdk</artifactId>
19-
<version>0.1.0-rc.1</version>
15+
<version>0.1.0</version>
2016
</dependency>
2117
```
2218

23-
The Maven coordinates do not change Java imports, which remain under `com.qoder.cloudagents`.
24-
25-
## Local build
26-
27-
```sh
28-
./mvnw clean install
29-
./mvnw -f examples/pom.xml verify
30-
python3 .github/scripts/check_package.py
31-
```
19+
Compatible with Java 8, 11, 17, 21 and 25. See the [changelog](CHANGELOG.md) for upgrading from the RC or earlier internal coordinates.
3220

33-
Requires JDK 8 or later. JDK 17 is recommended for maintenance builds; compilation targets Java 8. The independent examples project consumes the installed JAR. See [CONTRIBUTING.md](CONTRIBUTING.md) for checks and repository organization; CI checks Java 8, 11, 17, 21 and 25.
21+
## Quick start with PAT
3422

35-
## PAT
23+
Set `QODER_PAT`, then create a client:
3624

3725
```java
3826
import com.qoder.cloudagents.ForwardClient;
39-
import com.qoder.cloudagents.forward.Template;
4027

4128
try (ForwardClient client = ForwardClient.builder()
42-
.baseUrl("https://api.qoder.com/api/v1/forward")
4329
.pat(System.getenv("QODER_PAT"))
4430
.build()) {
45-
Template template = client.templates().retrieve("tmpl_example");
46-
System.out.println(template.id());
47-
System.out.println(template.requestId());
31+
System.out.println(client.models().list().data().size());
4832
}
4933
```
5034

51-
The default BaseURL is Global. For CN, use `https://api.qoder.com.cn/api/v1/forward`. `QODER_FORWARD_BASE_URL` provides the default when `.baseUrl(...)` is omitted.
52-
53-
With no explicit credentials, PAT mode reads `QODER_ACCESS_TOKEN`, then `QODER_PAT`. Explicit `.pat(...)`, `.accessToken(...)` or `.credential(...)` takes precedence over environment tokens; configure only one explicit source.
35+
The default endpoint is Global: `https://api.qoder.com/api/v1/forward`. For CN, add `.baseUrl("https://api.qoder.com.cn/api/v1/forward")` to the client builder.
5436

5537
## Service Account
5638

39+
Set `QODER_SA_KEY` and explicitly configure a credential:
40+
5741
```java
5842
import com.qoder.cloudagents.ForwardClient;
5943
import com.qoder.cloudagents.auth.Region;
@@ -69,94 +53,14 @@ try (ServiceAccountCredential credential = ServiceAccountCredential.builder()
6953
}
7054
```
7155

72-
The credential lazily exchanges the SA Key for a platform SAT, caches and refreshes the SAT before expiry, and shares concurrent refreshes. Business requests use the SAT; the Key only goes to the fixed regional exchange endpoint. Set both `Region.CN` and the CN BaseURL for CN requests. No SA credential is inferred merely because `QODER_SA_KEY` exists.
73-
74-
The caller owns the credential. Keep it open until all clients using it are closed. Closing a client does not close its credential.
75-
76-
For a SAT managed by your application:
77-
78-
```java
79-
ForwardClient client = ForwardClient.builder()
80-
.authMode(com.qoder.cloudagents.auth.AuthMode.SA)
81-
.accessToken(System.getenv("QODER_ACCESS_TOKEN"))
82-
.build();
83-
```
84-
85-
Forward SAT management uses explicit per-call SA Keys through `serviceAccountTokens()` and `identities().serviceAccountTokens()`; see the [usage guide](docs/usage-sat-drive.md). A client without a business credential can call those methods; ordinary requests fail locally before network access until a business credential is configured.
86-
87-
Close the client after use. A static SAT is not automatically renewed. SA mode does not fall back to `QODER_PAT`. For application-managed rotation, implement `Credential.getToken()` returning a `CompletableFuture<String>`; it is called before each attempt and must be thread-safe and return promptly. Cancelling a request does not cancel a shared credential future.
88-
89-
## Asynchronous calls and cancellation
90-
91-
```java
92-
java.util.concurrent.CompletableFuture<com.qoder.cloudagents.forward.Template> pending =
93-
client.async().templates().retrieve("tmpl_example");
94-
pending.cancel(true); // when the caller no longer needs the result
95-
```
96-
97-
Cancellation propagates to the HTTP call and retry timer. The returned future follows Java's `CancellationException` contract. Interrupting a synchronous call cancels its request, preserves the interrupt flag and raises `ApiUserAbortException`.
98-
99-
`client.async()` shares its parent's resources; closing the view is a no-op. Closing the parent cancels active requests. `ForwardClient.builder().buildAsync()` creates an independently owned, closeable async client. Keep the owning client open until futures finish. Additional futures created with application-side `thenApply(...)` follow normal Java cancellation behavior; cancel the SDK-returned future to abort its request.
100-
101-
## Request options and errors
102-
103-
```java
104-
com.qoder.cloudagents.core.RequestOptions options =
105-
com.qoder.cloudagents.core.RequestOptions.builder()
106-
.timeout(java.time.Duration.ofSeconds(30))
107-
.totalTimeout(java.time.Duration.ofSeconds(60))
108-
.maxRetries(1)
109-
.build();
110-
com.qoder.cloudagents.core.ApiResponse<com.qoder.cloudagents.forward.Template> response =
111-
client.templates().withResponse().retrieve("tmpl_example", options);
112-
```
113-
114-
- Default connection timeout: 5 seconds. Default response-header wait and read/write idle timeouts: 10 minutes. `.timeout(...)` overrides the latter limits for one attempt. Optional `.totalTimeout(...)` covers credentials, all attempts, backoff and body reads. Timeouts must be positive. SSE disables read-idle timing after accepted headers; an optional subscription-wide total deadline remains active, including reconnects. See [SSE lifecycle](docs/session-streaming.md).
115-
- Default maximum retries: 2, giving at most 3 attempts. The shared engine follows QCA safety rules: 409 is never retried; non-idempotent writes only qualify for 429 retries; non-repeatable bodies are not retried. Server retry hints remain subject to these checks.
116-
- `ApiException` covers request failures. `ApiStatusException` exposes HTTP status, request ID, headers and parsed error body. Connection, timeout, cancellation and response parsing failures have corresponding subclasses. SA issuer failures use `ServiceAccountExchangeException`, exposing status/request ID without retaining the issuer body. Failed SA exchange does not switch to PAT.
117-
- Models provide `requestId()`, `field(name)` for unknown fields and `rawJson()`. Unknown fields and numeric precision are preserved; invalid typed field access raises `ResponseValidationException`. Request metadata is separate from the JSON body.
118-
- Template list parameters support `limit`, `status`, `afterId` or `beforeId`. Use `page.data()` for one page, `getNextPage()` / `getNextPageAsync()` for manual pagination, or `for (Template template : page)` for lazy synchronous iteration. Server order is retained; filters and request options follow subsequent pages. Check `hasNextPage()` before fetching; an exhausted page or repeated cursor raises `PaginationException`.
119-
120-
## Template configuration
121-
122-
```java
123-
import com.qoder.cloudagents.forward.TemplateCreateParams;
124-
import com.qoder.cloudagents.forward.TemplateUpdateParams;
125-
import com.qoder.cloudagents.core.RequestOptions;
126-
127-
Template template = client.templates().create(
128-
TemplateCreateParams.builder()
129-
.name("Support assistant")
130-
.modelId("auto")
131-
.environmentId("env_example")
132-
.build(),
133-
RequestOptions.builder().idempotencyKey(java.util.UUID.randomUUID().toString()).build());
134-
135-
client.templates().update(template.id(), TemplateUpdateParams.builder()
136-
.description("Updated description")
137-
.multiagent(null) // explicitly clear the multi-agent configuration
138-
.build());
139-
```
140-
141-
An unset builder field is omitted. A setter with `null` writes JSON null; empty collections write `[]` or `{}`. The server decides which fields accept null. `omit("wire_name")` removes a previously set field. Requests and responses preserve unknown JSON fields; raw JSON can contain secrets and should not be logged. See [Template operations and configuration](docs/templates.md) and the [lifecycle example](examples/README.md).
56+
The credential exchanges the SA Key for a SAT, then caches and refreshes it. For CN, use both `Region.CN` and the CN BaseURL. See [client configuration](docs/client-configuration.md) for static SATs, authentication precedence, timeouts, retries and cancellation.
14257

14358
## Documentation
14459

145-
- [Runnable examples and shared PAT/SA setup](examples/README.md)
146-
- [Template operations, configuration and pagination](docs/templates.md)
147-
- [Identity operations and configuration overrides](docs/identities.md)
148-
- [Session HTTP operations, events, threads and Memory Store mounts](docs/sessions.md)
149-
- [Session/Thread SSE, cancellation and resumable streaming](docs/session-streaming.md)
150-
- [Memory Stores, content updates, versions and lifecycle rules](docs/memory-stores.md)
151-
- [Environments, multipart upload and streaming file download](docs/environments-files.md)
152-
- [Skills, versions, Vaults and Credentials](docs/skills-vaults.md)
153-
- [Schedules, Runs and Batches](docs/schedules-batches.md)
154-
- [Channels, Pairing and QR authorization](docs/channels.md)
60+
- [Runnable resource examples and shared authentication setup](examples/README.md)
61+
- [Forward API coverage and resource guides](docs/forward-api-coverage.md)
62+
- [Session/Thread SSE](docs/session-streaming.md) and [Realtime text, audio and History](docs/realtime.md)
15563
- [Usage, Forward SAT management and Drive](docs/usage-sat-drive.md)
156-
- [Forward API coverage](docs/forward-api-coverage.md)
157-
- [Realtime text, PCM audio and History](docs/realtime.md)
158-
- [Opt-in live testing](docs/live-testing.md)
159-
- [Maintenance and release setup](docs/maintaining.md)
160-
- [Changelog](CHANGELOG.md)
64+
- [Live testing](docs/live-testing.md)
16165

162-
`./mvnw verify` also builds source and Javadoc JARs. API documentation is generated under `target/reports/apidocs/`; packages under `core.internal` are implementation details.
66+
For source builds and contributions, see [CONTRIBUTING.md](CONTRIBUTING.md). Maintainers can follow the [maintenance](docs/maintaining.md) and [release](docs/releasing.md) guides.

0 commit comments

Comments
 (0)