Skip to content

Commit b38d16b

Browse files
committed
feat(api): align SDK with current official contracts
1 parent b70025a commit b38d16b

59 files changed

Lines changed: 3073 additions & 289 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎CHANGELOG.md‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,27 @@ existing `0.1.0` release; earlier development prereleases are not listed.
55

66
## [Unreleased]
77

8+
### Added
9+
10+
- Add Forward Dreams (create, list, retrieve, cancel, archive), channel pairing list/retrieve/update, and Managed OAuth start with typed requests and responses.
11+
- Add Identity automatic memory-store control, mount access and cursor pagination, sparse managed-capability overrides, and full tools-array replacement.
12+
- Support string Template references and Advisor model entries in Forward Multiagent rosters, Schedule file resources, and optional Run input snapshots.
13+
- Add typed Managed OSS bucket storage with separate write credentials/read views, and Memory Store ID cursor parameters.
14+
15+
### Fixed
16+
17+
- Align Forward Outcome rubric objects and Managed Agent/Dream model configuration with the official API. Dream model defaults to `auto` when omitted; object configuration supports `effort` and `context_window`.
18+
19+
### Breaking changes
20+
21+
- Forward event `rubric` is a text/content or file/file_id object instead of a string.
22+
- Managed Agent `effort` is a level string instead of an object; Agent and Dream model configuration no longer declares the unsupported `speed` field.
23+
- Identity mount lists now return standard pages (and an `AsyncPaginator` for the async client). Existing awaited calls still yield a page; use normal or async iteration to traverse all pages.
24+
25+
### Migration
26+
27+
- Send `rubric={"type": "text", "content": "..."}` and `model={"id": "ultimate", "effort": "high"}`; remove Managed `speed` arguments. See the README's “Official contract alignment” section.
28+
829
## [0.12.0]
930

1031
### Added

‎README.md‎

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -868,3 +868,67 @@ Synchronous searches return `SyncPage`; asynchronous searches can be awaited for
868868
an `AsyncPage` or directly iterated with `async for`. Use `get_next_page()` for
869869
manual pagination (await it on an async page). `*SearchParams` TypedDicts are
870870
exported from `qca.forward.types` and `qca.managed.types`.
871+
872+
## Official contract alignment
873+
874+
The next release aligns these public types with the official API documentation
875+
retrieved on 2026-10-27. It introduces source changes relative to 0.12.0:
876+
Outcome `rubric` is an object; Managed Agent `effort` is a string; Managed Agent
877+
and Dream model objects do not accept `speed`. Managed Dream `model` is optional
878+
and defaults to `auto`. Discover model IDs and supported efforts/context windows
879+
with List models. These Managed model changes do not remove Forward model features.
880+
881+
```python
882+
from qca import Forward, Managed
883+
884+
client = Forward(pat="...")
885+
rubric = {"type": "text", "content": "report exists"}
886+
model = {"id": "ultimate", "effort": "high"}
887+
dream = client.dreams.create(inputs=[{
888+
"type": "identity_template", "identity_id": "idn_...", "template_id": "tmpl_...",
889+
}]) # model defaults to auto
890+
891+
for mount in client.identities.memory_stores.list(
892+
"tmpl_...", identity_id="idn_...", limit=20,
893+
):
894+
print(mount.memory_store_id)
895+
```
896+
897+
The async mount list returns an `AsyncPaginator`: use `async for` directly, or
898+
`await` it to obtain the first `AsyncPage`. Sync lists return `SyncPage`.
899+
Identity `tools=[]` replaces all tools with no tools; `tools=None` clears that
900+
override. Pass `managed_tool_config={"schedule": {"enabled": False}, "drive": None}`
901+
to disable Schedule tools and restore inherited Drive settings. Omitted values
902+
remain unchanged. Multiagent `agents` accepts Template ID strings and
903+
`{"type": "advisor", "model": "ultimate"}` objects.
904+
905+
New Forward Dream calls require a PAT or an admin SAT; an Identity SAT is not
906+
supported. Inputs contain exactly one primary Memory Store or Identity/Template
907+
source, optionally plus Session sources. Pairing `update` changes an active
908+
binding; supply at least one nonempty Identity or Template ID. Use pairing
909+
`create` to complete a pending pairing. Pending records preserve empty
910+
`identity_id`, `template_id`, and `paired_at` strings.
911+
912+
Identity `auto_memory_store=false` disables automatic default-store creation.
913+
Independent mounts now accept `access="read_write"`; omit access for a new
914+
read-only mount, or to preserve an existing mount's permission. Schedule
915+
`resources` accepts file entries and `[]` clears them; Run retrieval supports
916+
`include_initial_events=true` to return the saved input snapshot.
917+
918+
Managed cloud Environment `config.storage.buckets` supports up to eight OSS
919+
mounts. When the resulting configuration has buckets, explicitly include beta
920+
`oss-bucket-2026-09-23` (`Betas` in Go, `betas` in Python/TS). Send credentials
921+
only when creating or replacing them; omit `credential` on an existing named
922+
bucket to keep it. Responses expose a read view without role ARN or AccessKey
923+
secret. `storage: {buckets: []}` clears mounts.
924+
925+
Managed `OAuth.Start` (Go) / `oauth.start` (Python/TS) returns `authorization_url`,
926+
`state`, and `callback_origin`; the user completes authorization in a browser.
927+
Client secrets go in the POST body, never in a URL. This method does not open a
928+
browser or complete consent automatically.
929+
930+
See the official [Outcome contract](https://docs.qoder.com/cloud-agents/api/forward/sessions/send-events),
931+
[Identity overrides](https://docs.qoder.com/cloud-agents/api/forward/identities/upsert-config),
932+
[Dream inputs](https://docs.qoder.com/cloud-agents/api/forward/dreams/create),
933+
[OSS storage](https://docs.qoder.com/cloud-agents/api/environments/storage-buckets),
934+
and [OAuth flow](https://docs.qoder.com/cloud-agents/api/vaults/start-oauth).

0 commit comments

Comments
 (0)