Skip to content

Commit 69fda8a

Browse files
committed
feat(forward): add typed schedule tool scope for 0.5.0
1 parent 57ed8a1 commit 69fda8a

17 files changed

Lines changed: 442 additions & 18 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
## [Unreleased]
44

5+
## [0.5.0]
6+
7+
### Added
8+
9+
- Add typed Forward `ManagedToolConfig.schedule` and `ScheduleToolConfig.accessScope` for Identity- or Template-scoped Schedule management tools. Preserve unknown fields and omitted/null schedule configuration; Template managed-capability updates remain whole-object replacements.
10+
- Add offline contracts and packaged-consumer checks for Schedule tool scope and direct Managed SA Key Bearer authentication, including rejection without PAT fallback.
11+
12+
### Documentation
13+
14+
- Document Managed SA Key direct calls separately from optional SAT exchange and Forward authentication, and reconcile Forward coverage to 147 HTTP operations including A2A Agent Card discovery.
15+
516
## [0.4.0]
617

718
### Added

‎README.md‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
The Qoder Cloud Agents Java SDK provides typed synchronous and asynchronous clients, with shared authentication, timeouts, retries, pagination, streaming and error handling.
66

7-
Version **0.4.0** supports both the **Forward API** and the **[Managed API](docs/managed.md)** in one package. Use `ForwardClient` / `AsyncForwardClient` for Forward and `ManagedClient` / `AsyncManagedClient` for Managed.
7+
Version **0.5.0** supports both the **Forward API** and the **[Managed API](docs/managed.md)** in one package. Use `ForwardClient` / `AsyncForwardClient` for Forward and `ManagedClient` / `AsyncManagedClient` for Managed.
88

99
- [Installation](#installation)
1010
- [Quick start](#quick-start)
@@ -20,13 +20,13 @@ Version **0.4.0** supports both the **Forward API** and the **[Managed API](docs
2020

2121
## Installation
2222

23-
Add the Maven dependency; published versions require no local SDK build or additional repository configuration.
23+
Add the Maven dependency; published versions require no local SDK build or additional repository configuration. Version 0.5.0 is prepared in this checkout but is not yet published; install the local SDK for development, or use a version listed in [Releases](https://github.com/QoderAI/qoder-cloud-agents-sdk-java/releases).
2424

2525
```xml
2626
<dependency>
2727
<groupId>com.qoder.sdk</groupId>
2828
<artifactId>qoder-cloud-agents-sdk</artifactId>
29-
<version>0.4.0</version>
29+
<version>0.5.0</version>
3030
</dependency>
3131
```
3232

@@ -76,6 +76,7 @@ PAT and SA are parallel authentication modes:
7676
| PAT | `.pat(token)` | Managed by your application |
7777
| SA Key | `.credential(ServiceAccountCredential)` | SDK exchanges, caches and refreshes the SAT on demand |
7878
| Existing SAT | `.authMode(AuthMode.SA).accessToken(token)` | Managed by your application |
79+
| Direct SA Key (Managed only) | `.authMode(AuthMode.SA).accessToken(saKey)` | No SAT exchange or renewal; rotate the Key in your application |
7980

8081
With no explicit credentials, PAT mode reads `QODER_ACCESS_TOKEN`, then `QODER_PAT`. An explicit token or credential takes precedence over environment tokens; configure only one explicit source. The SDK does not load `.env` files or enable SA merely because `QODER_SA_KEY` is set.
8182

@@ -96,7 +97,9 @@ try (ServiceAccountCredential credential = ServiceAccountCredential.builder()
9697
}
9798
```
9899

99-
Business requests use the SAT; the SA Key is sent only to the exchange service. For CN, use both `Region.CN` and the CN BaseURL. Keep a shared credential open until all clients using it are closed. Failed SA authentication does not fall back to PAT.
100+
With `ServiceAccountCredential`, business requests use the SAT; the SA Key is sent only to the exchange service. For CN, use both `Region.CN` and the CN BaseURL. Keep a shared credential open until all clients using it are closed. Failed SA authentication does not fall back to PAT.
101+
102+
Managed APIs also accept the full SA Key directly as a Bearer credential through the existing `accessToken(...)` builder. Explicitly read it from your secrets manager or `QODER_SA_KEY`; the SDK does not infer this mode. See [Managed authentication](docs/managed.md#client-and-authentication) for a complete example. Direct SA Key authentication does not apply to Forward business APIs, which require PAT or SAT.
100103

101104
Forward also provides explicit administrator/Identity SAT issuance and revocation through `serviceAccountTokens()` and `identities().serviceAccountTokens()`. These methods take a per-call SA Key and do not retry automatically. See [SAT management](docs/usage-sat-drive.md) and [authentication configuration](docs/client-configuration.md).
102105

‎docs/client-configuration.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ Forward SAT management uses explicit per-call SA Keys through `serviceAccountTok
5656

5757
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.
5858

59+
For Managed-only integrations, the full SA Key can instead be passed directly with `ManagedClient.builder().authMode(AuthMode.SA).accessToken(saKey)`. This sends the Key as Bearer without exchange or SAT renewal; do not use this path for Forward business requests. No `QODER_SA_KEY` lookup is automatic. See [Managed authentication](managed.md#client-and-authentication) and [the official credential rules](https://docs.qoder.com/cloud-agents/api/conventions/authentication).
60+
5961
## Asynchronous calls and cancellation
6062

6163
```java

‎docs/forward-api-coverage.md‎

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

33
开发中契约复核(2026-11-03):补齐 Session budget(省略/null/对象)、config.model、审批 evaluation 和 Environment startup_script;修正顶层 evaluatedPermission 字符串与 Thread 终止后的续订行为。本轮没有新增 HTTP 操作;验证见 `DocumentationAlignmentTest`,真实环境结果单独记录。
44

5-
契约核对:2026-10-28。**0.2.0** 覆盖 **146 个 HTTP 操作及 Realtime WebSocket**:首版 123 项、Webhook 8 项、Forward Search / Dream / Pairing / Decision 15 项。同一版本还提供 [107 个 Managed 操作](managed-api-coverage.md)。离线验证与真实环境验收分别记录,不能把操作覆盖数当作线上通过率。
5+
契约核对:2026-10-28,能力增量核对:2026-11-21,Schedule 工具范围核对:2026-12-03。当前 **0.5.0** 覆盖 **147 个 HTTP 操作及 Realtime WebSocket**:首版 123 项、Webhook 8 项、Forward Search / Dream / Pairing / Decision 15 项、0.4.0 新增 A2A Agent Card 1 项。同一包还提供 [107 个 Managed 操作](managed-api-coverage.md)。离线验证与真实环境验收分别记录,不能把操作覆盖数当作线上通过率。
66

77
HTTP BaseURL 为 CN `https://api.qoder.com.cn/api/v1/forward` 或 Global `https://api.qoder.com/api/v1/forward`;表内路径均相对于 BaseURL。
88

@@ -16,6 +16,8 @@ HTTP BaseURL 为 CN `https://api.qoder.com.cn/api/v1/forward` 或 Global `https:
1616

1717
开发中能力补齐(2026-11-21):新增 `GET /templates/{template_id}/a2a/agent-card.json`,方法 `templates().retrieveAgentCard(...)`,同步/异步及 withResponse 均支持;其余变更补齐 Session 更新多智能体、创建自动标题、A2A 配置和 OSS 模型,不新增这些资源的 HTTP 路由。新增测试见 `CapabilityParityTest`;真实环境未在本轮执行。
1818

19+
0.5.0 补齐 `managed_tool_config.schedule.access_scope` 的类型化请求/响应和省略/null 表达,不新增 HTTP 路由。Template 配置整体替换与 Identity/template 范围边界见 [Template 指南](templates.md#schedule-management-tool-scope),契约测试见 `TemplatesTest`,独立 JAR 消费测试见 `TemplateConsumerTest`。
20+
1921
## 使用指南
2022

2123
- [客户端认证、超时、重试与取消](client-configuration.md)
@@ -214,6 +216,12 @@ Webhook 的 8 个操作已实现同步/异步、分页、原始请求体验签
214216
| 145 | `GET` | `/decisions` | `decisions().list(...)` |
215217
| 146 | `GET` | `/decisions/{decision_id}` | `decisions().retrieve(...)` |
216218

219+
## 0.4.0 新增的 A2A 操作
220+
221+
| # | HTTP | 相对路径 | Java 入口 |
222+
| ---: | --- | --- | --- |
223+
| 147 | `GET` | `/templates/{template_id}/a2a/agent-card.json` | `templates().retrieveAgentCard(...)` |
224+
217225
最新公开契约及字段迁移说明见 [Forward 补齐指南](forward-parity.md)。固定官方来源为 2026-10-28 文档快照;Go/Python/TS 0.13.0 作为行为对照,不把其扩展字段自动视为官方契约。
218226

219227
本轮独立请求 fixture 位于 `src/test/resources/forward-parity-routes.json`,覆盖 15 个操作的同步/异步及 withResponse 入口。`ForwardParityTest`、`ForwardPaginationParityTest` 验证字段、metadata 冲突、精度、分页、幂等重试与取消。`ForwardCapabilitiesConsumerTest` 通过独立 examples 工程消费实际 JAR。真实环境和 QA 包尚须按 [验收指南](live-testing.md) 执行;目前没有这些新增功能的线上通过声明。

‎docs/maintaining.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Java SDK maintenance
22

3-
SDK 0.4.0 covers Forward and Managed and targets Java 8. Use JDK 17 or later for maintenance tools; the runtime compatibility matrix remains Java 8, 11, 17, 21 and 25.
3+
SDK 0.5.0 covers Forward and Managed and targets Java 8. Use JDK 17 or later for maintenance tools; the runtime compatibility matrix remains Java 8, 11, 17, 21 and 25.
44

55
## Local checks and pull requests
66

@@ -36,10 +36,10 @@ The SDK's embedded version is filtered from `${project.version}`; do not replace
3636
```sh
3737
python3 .github/scripts/release_notes.py check
3838
# After adding the actual release entry:
39-
python3 .github/scripts/release_notes.py extract --version 0.4.0
39+
python3 .github/scripts/release_notes.py extract --version 0.5.0
4040
```
4141

42-
The release version in this checkout is `0.4.0`. Also update the README dependency and version-specific maintenance examples. Acceptance records must include the resolved version, source SHA and JAR digest. Release versions must not be overwritten; a successful test of an older build is not evidence for a newer one.
42+
The release version in this checkout is `0.5.0`. Also update the README dependency and version-specific maintenance examples. Acceptance records must include the resolved version, source SHA and JAR digest. Release versions must not be overwritten; a successful test of an older build is not evidence for a newer one.
4343

4444
### RC qualification for 0.1.0
4545

‎docs/managed.md‎

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,28 @@ try (ManagedClient client = ManagedClient.builder()
2626
}
2727
```
2828

29-
The base URL is resolved from `.baseUrl(...)`, then `QODER_BASE_URL`, then Global `https://api.qoder.com/api/v1/cloud`. CN uses `https://api.qoder.com.cn/api/v1/cloud`. PAT and static SAT use the same configuration rules as Forward; `ServiceAccountCredential` exchanges an SA Key for a platform SAT with `qca.access`. The examples' `ManagedExampleClient` handles PAT, SA Key and static SAT selection. Managed does not expose Forward's Identity query selector.
29+
The base URL is resolved from `.baseUrl(...)`, then `QODER_BASE_URL`, then Global `https://api.qoder.com/api/v1/cloud`. CN uses `https://api.qoder.com.cn/api/v1/cloud`. PAT and static SAT use the same configuration rules as Forward. Managed does not expose Forward's Identity query selector.
30+
31+
Managed APIs accept the **full SA Key directly** as a Bearer credential; no SAT exchange or renewal is required. Use the existing builder explicitly:
32+
33+
```java
34+
import com.qoder.cloudagents.ManagedClient;
35+
import com.qoder.cloudagents.auth.AuthMode;
36+
37+
try (ManagedClient client = ManagedClient.builder()
38+
.baseUrl("https://api.qoder.com/api/v1/cloud")
39+
.authMode(AuthMode.SA)
40+
.accessToken(System.getenv("QODER_SA_KEY"))
41+
.build()) {
42+
System.out.println(client.models().list().data().size());
43+
}
44+
```
45+
46+
For an independently owned async client, use the same builder with `.buildAsync()` and close it after requests finish. The SDK does not automatically read `QODER_SA_KEY`, exchange a directly configured Key, validate JWT structure or fall back to PAT on rejection. Keep the Key in a secrets manager, rotate it in your application, and select the credential's region and workspace binding; the service enforces access.
47+
48+
SAT exchange remains optional: `ServiceAccountCredential` obtains, caches and refreshes a platform SAT with `qca.access`; request both `qca.access` and `forward.access` if that SAT will also call Forward. Forward business APIs accept PAT/SAT, **not direct SA Keys**. `ManagedExampleClient` retains its existing automatic-exchange behavior when `QODER_SA_KEY` is supplied. For direct calls with that helper, set `QODER_AUTH_MODE=sa` and put the Key in `QODER_ACCESS_TOKEN`, leaving `QODER_SA_KEY` unset in the helper's environment.
49+
50+
Source: [official authentication](https://docs.qoder.com/cloud-agents/api/conventions/authentication), checked on 2026-12-03. `ManagedContractsTest` and `ManagedConsumerTest` validate direct Bearer wire placement without contacting the service; real account access remains a separate opt-in verification.
3051

3152
`client.async()` shares the parent's transport; closing that view is a no-op. `ManagedClient.builder().buildAsync()` owns its transport. `withOptions(...)` creates an independently closeable client. Ordinary HTTP methods also offer `withResponse()` for status, headers and request ID. SSE streams expose handshake metadata through `response()` and must be closed.
3253

‎docs/releasing.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Java SDK release setup
22

3-
The release version in this checkout is `com.qoder.sdk:qoder-cloud-agents-sdk:0.4.0`. The manual [Release workflow](../.github/workflows/release.yml) publishes using repository Actions secrets. Dispatching it from `main` authorizes publication after all automated checks pass; there is no separate environment approval. The Central account, namespace, signing key and repository settings below must be configured first. The GitHub repository and internal Maven access do not grant Maven Central publishing access.
3+
The release version in this checkout is `com.qoder.sdk:qoder-cloud-agents-sdk:0.5.0`. The manual [Release workflow](../.github/workflows/release.yml) publishes using repository Actions secrets. Dispatching it from `main` authorizes publication after all automated checks pass; there is no separate environment approval. The Central account, namespace, signing key and repository settings below must be configured first. The GitHub repository and internal Maven access do not grant Maven Central publishing access.
44

55
`0.1.0-rc.1` was published to Maven Central on 2026-10-21; see its [Release](https://github.com/QoderAI/qoder-cloud-agents-sdk-java/releases/tag/v0.1.0-rc.1) and [successful publication workflow](https://github.com/QoderAI/qoder-cloud-agents-sdk-java/actions/runs/39572349619). A version committed to a POM is not yet a published package: check the workflow's public verification and matching GitHub Release for each version.
66

@@ -70,13 +70,13 @@ The namespace variable is a maintainer's setup confirmation, not an automatic ow
7070

7171
Prepare a PR that updates the root POM, the example project's version and SDK dependency, plus the changelog version section. Keep an empty `Unreleased` section. Review any version-specific install examples. Merge only after `quality` and all five Java checks succeed. The workflow does not bump versions or merge the PR.
7272

73-
For the Forward and Managed contract-alignment `0.4.0` release, run internal integration tests and accept a QA package built from the merged version commit. Record both API surfaces, the Java runtime, cleanup warnings and untested scenarios. Earlier development-package results do not replace this check. Use the merged `0.4.0` main SHA and a new batch ID; leave recovery inputs empty for the first publication.
73+
For the Forward and Managed contract-alignment `0.5.0` release, run internal integration tests and accept a QA package built from the merged version commit. Record both API surfaces, the Java runtime, cleanup warnings and untested scenarios. Earlier development-package results do not replace this check. Use the merged `0.5.0` main SHA and a new batch ID; leave recovery inputs empty for the first publication.
7474

7575
Open **Actions → Release → Run workflow**, select **main**, and verify the following inputs before dispatch. Successful preflight automatically proceeds to signing and publication; it does not pause for an additional approval.
7676

7777
| Input | First publication |
7878
| --- | --- |
79-
| `version` | The reviewed version without `v` or `SNAPSHOT`, for example `0.4.0` |
79+
| `version` | The reviewed version without `v` or `SNAPSHOT`, for example `0.5.0` |
8080
| `commit_sha` | Full 40-character lowercase SHA of the current GitHub main |
8181
| `batch_id` | 1–64 letters/digits/dots/underscores/hyphens, starting with a letter or digit |
8282
| `resume_run_id` | Empty |

0 commit comments

Comments
 (0)