@qoniai/qoni 0.8.0 → 0.9.1

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,6 +1,168 @@
1
1
  # Changelog
2
2
 
3
- ## 0.8.0 - Unreleased
3
+ ## Unreleased — GenAuth communication
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.
8
+
9
+
10
+ ## Unreleased
11
+
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.
18
+
19
+ ## Unreleased — next version: 0.10.0
20
+
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.
23
+
24
+ ### Breaking
25
+
26
+ - `track.create` requires an explicit schedule. Migrate to an integer
27
+ `{ kind: "interval", intervalSeconds: 600..2592000 }` or an explicit
28
+ `{ kind: "daily", at: "HH:MM", tz }`; daily starts up to 30 minutes early.
29
+ Cron is locally unsupported and is never automatically converted.
30
+ - Interval `tz` and old targetUrls/extractionSchema/triggerDsl/
31
+ stopConditionDsl/notifyChannel/url fields have no wire equivalent. Remove
32
+ them; put watched URLs explicitly in prompt instructions. Optional undefined
33
+ fields are still omitted; defined unsupported fields raise typed local errors.
34
+ - `refine` accepts title/schedule only. Create a new Track to change the original
35
+ prompt/intent; the raw updateMonitor wire API supports explicit instructions.
36
+ - `runNow` returns only `{ trackId, sessionId, runId }`, a 202 acceptance
37
+ reference. TrackTaskRef is a type alias and remains assignable to JsonObject.
38
+ Read the exact recent check for its real `done/failed/expired/canceled`
39
+ status; this differs from RunResult's `succeeded`. Create already starts a
40
+ first look: wait for the original lastTaskId before one explicit runNow.
41
+ - `runs` and `run(id)` search only the newest 50 checks; no extracted/diffs/
42
+ snapshot fields are synthesized. Replace old tick/snapshot consumers with
43
+ the actual check fields; a missing run raises local not_found with its range.
44
+ - Track events/interactionHandle/api.events/api.intervene and DoAnything
45
+ readArtifacts now raise local QoniUnsupportedError with zero HTTP. Their
46
+ deprecated exports remain; use Track checks, separately authorized DoAnything
47
+ interactions, real file artifacts(), or captured screenshot events instead.
48
+ - Pause/delete stop future scheduling and keep an in-flight check running.
49
+
50
+ ### Changed
51
+
52
+ - Track now maps supported operations to `/track/tracks`: prompt → instructions,
53
+ explicit integer intervals of 600–2592000 seconds or daily at/tz (starts
54
+ 0–30 minutes before target), real status PATCH, empty DELETE204, recent 50
55
+ checks with local pagination, and runNow task references. Refine is limited
56
+ to title/schedule. Deletion does not cancel a running task.
57
+ - Cron, old extraction/DSL/URL/channel options, Track events/intervene and
58
+ interactionHandle fail locally. Deprecated methods/types remain exported.
59
+ - `doAnything.api.readArtifacts` and snapshot types are deprecated with local
60
+ `QoniUnsupportedError` (`unsupported.operation`), zero HTTP. Use actual file
61
+ artifacts or captured screenshot events. File APIs are unchanged.
62
+ - Live coverage metadata retires old monitor/snapshot success claims; current
63
+ Track mapping is locally verified, with live acceptance pending.
64
+
65
+ ## 0.9.0 - 2026-10-07
66
+
67
+ DoAnything interactions are now typed by what the user has to do, never by
68
+ business: `site_login`, `take_control`, `ask_user`, `confirmation`, plus the
69
+ system `wait`.
70
+
71
+ ### Changed
72
+
73
+ - `Interaction` is a union distributed over `type`: `switch (interaction.type)`
74
+ narrows `payload` in each branch, including `handle.interaction` inside
75
+ `onInteraction`. `Interaction<"site_login">` still picks one member.
76
+ `TypedInteraction` names the union. Because it is now a type alias, not an
77
+ interface, `interface X extends Interaction` no longer compiles (TS2312):
78
+ use `type X = Interaction & { ... }`. Code that builds an `Interaction` from a
79
+ separate `type` and `payload` must narrow them together or cast the object.
80
+ - The wire's `clarification` is presented as `ask_user`, with payload
81
+ `{ question, answerType, options? }`. `answerType` is `text`, `number`,
82
+ `boolean`, `single_choice` or `multiple_choice`, and options are
83
+ `{ value, label }`. A clarification with choices becomes `single_choice`; one
84
+ without choices is `text`. A native `ask_user` keeps the `answer_type` it
85
+ sends, and every string option value is kept, including `""`.
86
+ Migration: compare `type` with `"ask_user"` instead of `"clarification"`
87
+ (TypeScript no longer compiles the old comparison); read
88
+ `payload.answerType` / `payload.options` instead of `payload.inputType`
89
+ (removed) or the answer action's `inputSchema` enum.
90
+ `InteractionTypes.Clarification` is deprecated and now equals
91
+ `InteractionTypes.AskUser`: it still matches interactions the SDK hands out,
92
+ but not a raw wire `type` or a `"clarification"` string you stored.
93
+ `ClarificationPayload` is a deprecated alias of `AskUserPayload`, which
94
+ requires `answerType`.
95
+ - `InteractionHandle.answer(value)` accepts the structured value its
96
+ `answerType` names (string, number, boolean, one option value, or an array of
97
+ option values) and throws `QoniValidationError` before sending a value that
98
+ does not fit.
99
+ - `InteractionHandle.confirmSignedIn()` saves the login opened by `openLogin()`
100
+ on the same interaction (`POST /profiles/{profileId}/confirm`, scope
101
+ `webagent.site_login:confirm`), then tells the agent to recheck. Sign-in is
102
+ `openLogin()` → `confirmSignedIn()`:
103
+ - It saves once and rechecks once per login session, however many handles
104
+ or concurrent calls ask; the deprecated `OpenLoginResult.confirm()` shares
105
+ the same save.
106
+ - A user who is not signed in yet, or 409 `no_pending_login`, still gets a
107
+ recheck: the agent raises a new `site_login` when needed.
108
+ - When the backend keeps the session but could not save it
109
+ (`probeResult: "release_failed"`), it throws a retryable `QoniError` coded
110
+ `site_login.save_failed` and does not tell the agent to go on; calling it
111
+ again saves again. Any other save failure is thrown as well.
112
+ - When `openLogin()` calls overlap, the latest call that succeeds owns the
113
+ session, whichever response arrives last.
114
+ - Reopening that returns the same backend session shares its save; when a
115
+ newer backend session replaces it, `confirm()` on the old result throws
116
+ `QoniValidationError` instead of saving. If the login is reopened while a
117
+ `confirmSignedIn()` is still saving, that call throws a retryable
118
+ `QoniError` coded `site_login.session_replaced` without telling the agent
119
+ to go on; call it again to save the newer login.
120
+ - Handles from the same `RunHandle` or `MonitorHandle` share the login
121
+ session, so a handle from a later callback saves it too. A RunHandle from
122
+ another `attach()` or process does not.
123
+ - `connectControl()` and `refreshControl()` resolve to a `ControlSession`
124
+ (`{ liveUrl, expiresAt?, status?, raw }`, the signed URL of the browser the
125
+ user now controls) instead of `void`. `await handle.connectControl()` is
126
+ unaffected; code that returns the call where `Promise<void>` is expected,
127
+ such as `const cb: () => Promise<void> = () => handle.connectControl()`, no
128
+ longer compiles (TS2322) — wrap it: `async () => { await handle.connectControl(); }`.
129
+ - `run.events()`, `wait({ onInteraction })` and `monitor.events()` keep an
130
+ interaction's type and content when the backend settles it with an empty
131
+ shell (a resolve labelled `clarification` with an empty question, or a
132
+ `site_login` with one empty site): only `status`, `resolvedAt` and `actions`
133
+ change. A settled update with content of its own, such as an expired
134
+ take-over with its reason, replaces the card as before. Run and monitor
135
+ handles keep about 256 interactions, forgetting settled cards first, and
136
+ logins once they are saved or their interaction ended; a pending card or a
137
+ login still in progress is never dropped.
138
+
139
+ ### Added
140
+
141
+ - `QoniScopes.USER_PROFILE_READ` (`user.profile:read`), `USER_PROFILE_WRITE`
142
+ (`user.profile:write`), `USER_PAYMENT_USE` (`user.payment:use`),
143
+ `AGENT_MAIL_READ` (`agent.mail:read`) and `AGENT_MAIL_SEND`
144
+ (`agent.mail:send`). They belong to no product bundle: request them
145
+ explicitly, and allow them in the AccessKey policy. The constants only name
146
+ the scopes; requesting them does not by itself enable Profile, payment or
147
+ mailbox access in a run.
148
+ - Exported types `AskUserPayload`, `AskUserOption`, `AskUserAnswer`,
149
+ `AskUserAnswerType`, `InteractionBase`, `TypedInteraction` and
150
+ `ControlSession`.
151
+
152
+ ### Fixed
153
+
154
+ - A scope written without its service prefix names every matching scope:
155
+ `profile:read` suggests both `gumem.profile:read` and `user.profile:read`.
156
+
157
+ ### Deprecated
158
+
159
+ - `user` / `userId` on interactive delegation input: the authorization page
160
+ identifies the signed-in user, and the delegation service ignores them.
161
+ - `DelegateTokenResponse.grantedScopes`: the delegation service does not return
162
+ it. Read `qoni.genauth.introspectDelegationToken({ token }).data.scope`.
163
+ - `OpenLoginResult.confirm()`: `confirmSignedIn()` saves the login itself.
164
+
165
+ ## 0.8.0 - 2026-10-04
4
166
 
5
167
  ### Added
6
168
 
@@ -150,7 +312,7 @@ compatible fixes.
150
312
  - Optional abort signals on product run-detail and artifact-list wire reads;
151
313
  existing calls without a signal remain compatible.
152
314
 
153
- ## Unreleased
315
+ ## Earlier changes
154
316
 
155
317
  ### Breaking
156
318