@qoniai/qoni 0.9.1 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,28 +1,152 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased — GenAuth communication
3
+ ## 0.9.2 - 2026-10-15
4
4
 
5
- - Add 111 Agent Mail/Phone runtime and administration methods with typed inputs/results.
6
- - Add native GenAuth credential exchange, bounded polling, idempotency and revision headers, and nested communication error codes.
7
- - Add bilingual SDK reference content and read-only live acceptance checks; current hosted Phone routes remain unavailable.
5
+ ### Fixes found by running the Personal Agent guide in production
8
6
 
7
+ - `doAnything.run({ model })` now sends `model`; the Web Agent create body accepts it and falls back to the platform default. Add `doAnything.api.listModels()` (`GET /do_anything/models`, `{ default_model, items: [{ value, label }] }`).
8
+ - Signed AK/SK requests re-sign and retry, up to three attempts, when GenAuth returns `1306` (signature already consumed). Separate processes sharing an AccessKey could sign an identical request in the same millisecond; GenAuth rejects the reuse before the request runs.
9
+ - Include the Quickstart v5 work below (`taskScopes`, `fill_form` `submit()`/`submitSensitive()`, current-task login scopes, hosted login, pre-run memory, Personal Agent provisioning) together with the GenAuth management and communication APIs from 0.9.1.
10
+ ### Candidate integration documentation
9
11
 
10
- ## Unreleased
12
+ - Add explicit `taskScopes` to `doAnything.run()`, `api.createRun()` and `runWithMemory()` for the task's initial Web Agent token exchange. Defaults remain manage-only. Request `webagent.browser_use:take_control` when the task needs human control; the original delegation and current policy must allow it. The SDK-only option never enters the task body, does not expand an existing product token, and rejects invalid input before any request (including memory recall).
11
13
 
12
- - Add 591 GenAuth / Authing v3 management methods across 35 namespaces, aligned with all 496 JSON management methods in the official Authing Node SDK 4.0.2 plus GenAuth extensions and compatibility names. Include typed inputs/results, domain shortcuts and the flat `genauth.management` migration entry.
13
- - Preserve official SDK defaults and method names; support management PUT operations and safely interpolate DELETE path identifiers. Pin the upstream contract and include its MIT notice.
14
- - Add `genauth.users.iterate` for streaming paginated user lists and management request cancellation.
15
- - Coalesce concurrent management-token exchanges, honor JWT expiry and refresh once after automatic-token auth rejection.
16
- - Surface HTTP-200 GenAuth business errors even with `data`, preserving numeric Authing API codes and request IDs.
17
- - Preserve the existing user helpers; add generated contract/catalog maintenance, isolated live management acceptance and integration documentation.
14
+ - Document the corrected `runWithMemory` phase/submissionUnknown contract and `QoniTaskSubmissionUnknownError` (`task.submit_unknown`, non-retryable). Other run APIs retain existing error types; unknown writes must never be blindly replayed.
15
+
16
+ - Add typed hosted-login, exact-interaction, ordinary Profile, opt-in memory and Agent provisioning examples.
17
+ - Correct `recallContext()` to `QoniResponse<MemoryContext>` and the ordinary Profile field boundary. `runWithMemory()` still returns `{ run, memory }`; ordinary `run()` never opts into recall.
18
+ - Separate accepted/pending/unknown writes from success; no automatic POST replay or permission expansion after consent changes. Agent provisioning remains pending backend business validation, and open execution isolation and complete one-hour waiting remain unverified.
18
19
 
19
- ## Unreleased — next version: 0.10.0
20
+ ### Pre-run memory context
20
21
 
21
- These public API changes require **0.10.0**, not a 0.9.x patch. This work does
22
- not bump the packaged version, publish, or release it.
22
+ - Add explicit `doAnything.runWithMemory()` and typed `gumem.recallContext()`
23
+ using the original delegation source and existing resource exchanges. Recall
24
+ must succeed before Task creation; empty recall preserves the prompt, with
25
+ bounded quoted reference data, cancellation/deadline support and no write retry.
26
+ - Keep actual history message IDs and optional safe stored `metadata.source_url`;
27
+ never forward arbitrary metadata or infer fact URLs from text. Flattened GUM
28
+ facts/summary explicitly report unavailable provenance until backend projection.
29
+ - Keep ordinary `run()` defaults, package version and released history unchanged.
30
+
31
+
32
+ ### Ordinary structured forms
33
+
34
+ - Add `InteractionTypes.FillForm`, narrowed `FillFormPayload`/`FormHandle`, `FormField`, `FormAddress`, `FormValues`, and `InteractionHandle.submit(values)` using the declared submit route.
35
+ - Preserve ordinary field names and JSON values; check required fields, types, option values, NUL and finite numbers before transport. The matching W4 backend validates its current durable card again. Existing typed `answer()` and login/control lifecycle stay compatible.
36
+ - Task-only collection: sensitive fields, payment cards and Profile writes remain unavailable. Package version and released 0.9.0 history are unchanged; final W6 synthesis/provider acceptance is separate.
37
+
38
+ ### Fixed
39
+
40
+ - Internal task facade run/message IDs reject all C1 controls, including NEL,
41
+ before permission or HTTP. Message role/content reject unpaired surrogates
42
+ without normalizing valid strings, using a Node 18 compatible check. Whole
43
+ batches bind IDs on synchronous submission, including batches not yet sent;
44
+ provider rejection or timeout before HTTP keeps that binding, and the original
45
+ content can be explicitly retried. Invalid batches bind no IDs.
46
+
47
+ ### Added
48
+
49
+ - `genauth.auth.createLoginUrl({ redirectUri, state, screen? })` and
50
+ `genauth.auth.exchangeLoginCode({ code, redirectUri })` send users to the
51
+ Qoni-hosted GenAuth sign-up/sign-in page for the AccessKey's registered
52
+ business app and exchange the callback code on the server. `expiresAt` is the
53
+ server deadline fixed at creation (600 seconds); a URL completes at most once
54
+ and a code is exchanged at most once, with no automatic retry. `isNewUser`
55
+ comes from the actual registration in that sign-in. The app keeps and checks
56
+ `state` itself. Inputs reject undeclared fields (client ID, secret, issuer,
57
+ token URL) before HTTP, and responses are validated without invented
58
+ defaults.
59
+ - Internal Pi hosts can use `createTaskClient` without AK/SK to create the fixed
60
+ run Session and append immutable identified messages. The entry reuses GUMem
61
+ mappings and JSON transport, checks current permission per call, bounds provider
62
+ and HTTP with one timeout/abort, refuses redirects and never retries POST.
63
+ Stable ordered batches use an internal request ID for existing usage-outbox
64
+ deduplication. Runtime/type allowlists reject identity/token/header/path overrides;
65
+ responses and typed errors exclude private raw payloads. Resource-server run
66
+ isolation, G6/WA issuance, durable Pi recovery and offline acceptance remain
67
+ dependencies. This local task facade build is separate from the frozen current-task
68
+ integration archive; version and released history remain unchanged.
23
69
 
24
70
  ### Breaking
25
71
 
72
+ - Declared DoAnything task-login actions now use the unreleased `current_task`
73
+ policy. `openLogin()` uses the existing task browser and requires
74
+ SITE_LOGIN_REQUEST + BROWSER_USE_TAKE_CONTROL; `confirmSignedIn()` requires
75
+ SITE_LOGIN_CONFIRM + BROWSER_USE_TAKE_CONTROL + DO_ANYTHING_MANAGE. Enable
76
+ these AccessKey policies and obtain user consent before the coordinated cutover
77
+ below. Product `manage` cannot replace login or control permission.
78
+ The SDK binds the original login question L and open's control round C
79
+ (`session_id === control_interaction_id`), then makes one declared confirm
80
+ POST `{login_session_id:C}` for reliable save, release and reply. It does not
81
+ call Profile confirm or send another recheck. `login.confirm()` shares that
82
+ same request. A saved result is `state: "saved", active: false,
83
+ probeResult: "agent_pending"`; the agent must still verify the page.
84
+ Missing/unknown mode or mismatched L/C fails closed. Confirmation requires a
85
+ successful open on this run/interaction; 409 remains a failure, including
86
+ `no_pending_login`, without ID replacement or reopening. Save failures and
87
+ uncertain/invalid responses permit an explicit retry of the original L/C;
88
+ only the backend's exact successful history can acknowledge a lost response.
89
+ Legacy `/profiles/login` and Profile confirm retain their paths, single scopes
90
+ and result semantics. Update application UI that treats `active: false` as
91
+ always signed out: current-task `saved/agent_pending` means persistence only.
92
+ - Raw `doAnything.api.intervene()` refresh/release calls must carry this
93
+ control round's `interactionId` (wire alias `interaction_id`). A first
94
+ user-initiated take may omit it only when no marker is active; reconnecting
95
+ to an active round must match its ID. Save `interaction_id` from the new
96
+ Web Agent take/refresh response. Missing, ended, expired or mismatched IDs
97
+ return server HTTP 409 without side effects; never fetch a current ID and
98
+ retry an old action. Card methods keep their declared path ID and old
99
+ `ControlSession` objects are not rebound to new cards. Conflicting aliases
100
+ and explicit non-string/empty IDs fail SDK validation; omission still reaches
101
+ the server. `requestId` remains the separate input-question identifier.
102
+ - Browser connection, refresh and release now require the independent
103
+ `webagent.browser_use:take_control` scope
104
+ (`QoniScopes.BROWSER_USE_TAKE_CONTROL`). Product `manage`, `products` bundles,
105
+ and legacy control scopes do not grant it. Existing AccessKeys and user
106
+ delegations must migrate; permissions are not automatically expanded.
107
+ - Migration: first prepare GenAuth scope registration and Console's browser-control
108
+ and site-login policies; enable the required policies on the AccessKey. Then
109
+ explicitly request the new scope and obtain new user consent through interactive
110
+ delegation. Updating the allowlist or renewing an old grant must not add the
111
+ new permission silently. Request `webagent.site_login:request` and
112
+ `webagent.site_login:confirm` separately when login is needed.
113
+ - Coordinate the Web Agent and SDK cutover in a maintenance window after finishing
114
+ or draining existing browser-control tasks. The old Web Agent release endpoint
115
+ checks product `manage`, while the new SDK requests `take_control` for release;
116
+ the new Web Agent rejects `manage` as a substitute. A simple sequential upgrade
117
+ does not guarantee uninterrupted existing sessions. Do not introduce a `manage`
118
+ compatibility bypass. Verify connect, refresh and release with the new consent,
119
+ plus rejection when the scope is missing or only legacy control scopes are present.
120
+ The new Console lists permissions not covered by selected policies separately,
121
+ including legacy, unknown and partial policy entries. It preserves them by
122
+ default; removal requires selecting “Remove these permissions when saving”. Inspect the saved
123
+ allowlist. Preserving a legacy control scope does not grant the independent scope.
124
+ - Raw input answer/skip calls now require the current persisted input ID, waiting
125
+ state and declared action. Stale or undeclared actions return server 409 without
126
+ SDK ID replacement or retry. Use declared confirmation/sign-in actions for those
127
+ interactions; ordinary answer/skip must not stand in for approval or sign-in.
128
+ - Card connect returns a pending round; OBO/API-key `surface` input cannot claim
129
+ an active Console connection. Releasing it does not resolve a pending login ask.
130
+ Console active release also leaves current_task login/credential asks unanswered;
131
+ both are `site_login` cards that end only through `confirmSignedIn()` after
132
+ reliable save, a declared explicit `skip()`, or expiry. Only legacy `secure_input`
133
+ asks receive a recheck reply on Console active release, which proves neither
134
+ sign-in nor persistence. Clarification and confirmation are never answered
135
+ automatically. Task-login confirmation
136
+ above is a separate save/release/reply operation; deployment remains pending.
137
+ - Deployment and publication await a separate Owner instruction. The released
138
+ `0.9.0` history below is unchanged.
139
+
140
+ ### Fixed
141
+
142
+ - Normalize recall metadata filter aliases into `recall_config.metadata_filters`
143
+ without mutating the input. Matching duplicate values merge; conflicts,
144
+ null/non-scalar/non-finite values and system-reserved fields throw a local
145
+ `QoniValidationError`. Other recall configuration keys pass through unchanged.
146
+ This SDK validation does not fix backend isolation or verify cross-task recall.
147
+
148
+ ### Track and artifact compatibility — Breaking
149
+
26
150
  - `track.create` requires an explicit schedule. Migrate to an integer
27
151
  `{ kind: "interval", intervalSeconds: 600..2592000 }` or an explicit
28
152
  `{ kind: "daily", at: "HH:MM", tz }`; daily starts up to 30 minutes early.
@@ -47,7 +171,7 @@ not bump the packaged version, publish, or release it.
47
171
  interactions, real file artifacts(), or captured screenshot events instead.
48
172
  - Pause/delete stop future scheduling and keep an in-flight check running.
49
173
 
50
- ### Changed
174
+ ### Track and artifact compatibility — Changed
51
175
 
52
176
  - Track now maps supported operations to `/track/tracks`: prompt → instructions,
53
177
  explicit integer intervals of 600–2592000 seconds or daily at/tz (starts
@@ -62,6 +186,23 @@ not bump the packaged version, publish, or release it.
62
186
  - Live coverage metadata retires old monitor/snapshot success claims; current
63
187
  Track mapping is locally verified, with live acceptance pending.
64
188
 
189
+ ## 0.9.1 - 2026-10-13
190
+
191
+ ### GenAuth communication
192
+
193
+ - Add 111 Agent Mail/Phone runtime and administration methods with typed inputs/results.
194
+ - Add native GenAuth credential exchange, bounded polling, idempotency and revision headers, and nested communication error codes.
195
+ - Add bilingual SDK reference content and read-only live acceptance checks; current hosted Phone routes remain unavailable.
196
+
197
+ ### GenAuth management
198
+
199
+ - Add 591 GenAuth / Authing v3 management methods across 35 namespaces, aligned with all 496 JSON management methods in the official Authing Node SDK 4.0.2 plus GenAuth extensions and compatibility names. Include typed inputs/results, domain shortcuts and the flat `genauth.management` migration entry.
200
+ - Preserve official SDK defaults and method names; support management PUT operations and safely interpolate DELETE path identifiers. Pin the upstream contract and include its MIT notice.
201
+ - Add `genauth.users.iterate` for streaming paginated user lists and management request cancellation.
202
+ - Coalesce concurrent management-token exchanges, honor JWT expiry and refresh once after automatic-token auth rejection.
203
+ - Surface HTTP-200 GenAuth business errors even with `data`, preserving numeric Authing API codes and request IDs.
204
+ - Preserve the existing user helpers; add generated contract/catalog maintenance, isolated live management acceptance and integration documentation.
205
+
65
206
  ## 0.9.0 - 2026-10-07
66
207
 
67
208
  DoAnything interactions are now typed by what the user has to do, never by