@origonai/web-sdk 0.1.3 → 0.1.5
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/README.md +11 -1
- package/dist/index.d.ts +82 -1
- package/dist/origon-web-sdk.js +2787 -2403
- package/dist/origon-web-sdk.js.map +1 -1
- package/docs/contract.md +51 -0
- package/package.json +1 -1
package/docs/contract.md
CHANGED
|
@@ -150,3 +150,54 @@ waits for a generation-correlated worklet acknowledgement, awaits
|
|
|
150
150
|
stops every microphone track, and nulls the stream. Permission, worklet, mute,
|
|
151
151
|
transport, terminal-event, and teardown races fail closed: late generations and
|
|
152
152
|
stale transport acknowledgements cannot reopen capture or resolve new requests.
|
|
153
|
+
|
|
154
|
+
## Explicit customer End wire
|
|
155
|
+
|
|
156
|
+
The generated `chat.v1.Session/End` request and response follow the canonical
|
|
157
|
+
`platform/cx/protos/chat.proto` via `web/kit/scripts/ship-orpc.sh`. CX authorizes
|
|
158
|
+
only the current external participant-purpose token and installation; monitors,
|
|
159
|
+
agents and replaced installations are refused. Success requires the durable
|
|
160
|
+
existing ended divider. Ambiguous persistence retains the same-session reopen
|
|
161
|
+
fence until identical-row reconciliation. Visitor Leave remains a detach operation.
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
## Customer End
|
|
165
|
+
|
|
166
|
+
`SessionManager.endChat(sessionId): Promise<void>` invokes the canonical
|
|
167
|
+
`chat.v1.Session/End` descriptor with the captured chat JWT and client routing
|
|
168
|
+
metadata. Unlike `endSession`/Leave cleanup, it terminates the conversation.
|
|
169
|
+
Only a successful End response or matching Attach terminal proves success.
|
|
170
|
+
A control-plane ended/absent verdict may retire presentation, but cannot confirm
|
|
171
|
+
an End command.
|
|
172
|
+
Repeated calls coalesce, pending calls block messages/typing/reopen/rename, and a timeout
|
|
173
|
+
is `ClientError` kind `chatEndUnconfirmed`, permitting explicit retry with the
|
|
174
|
+
original authority. End never refreshes credentials, takes over or starts a chat.
|
|
175
|
+
An absent room remains a typed refusal while retiring that local incarnation.
|
|
176
|
+
|
|
177
|
+
Attach remains open to receive the server's real ended divider. A response-first
|
|
178
|
+
End allows a bounded drain; history paging reconciles presentation without
|
|
179
|
+
manufacturing system messages or changing a refusal into success. Missing ended
|
|
180
|
+
rows/read failures surface as errors even if terminal authority is known. The
|
|
181
|
+
manager retains End ownership after actor expiry; explicit reopening or client
|
|
182
|
+
replacement invalidates the prior owner before new authority is acquired. Old
|
|
183
|
+
results and history reads cannot publish into the replacement owner.
|
|
184
|
+
|
|
185
|
+
Implementation/validation is tracked with the monorepo SDK's reviewed customer
|
|
186
|
+
End plan; no release compatibility is implied until matching artifacts and CX
|
|
187
|
+
are published. Existing provisioned monitor recovery and ordinary Leave contracts
|
|
188
|
+
remain in force; CX denies End to monitors and non-owner participants.
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
End attempts pass an AbortSignal through the shipped canonical kit unary client.
|
|
192
|
+
Timeout, authority invalidation, or a matching terminal event cancels the local
|
|
193
|
+
attempt; it prevents a request still waiting for connection/stream creation from
|
|
194
|
+
being sent later. Cancellation after transmission cannot undo server work and
|
|
195
|
+
is not evidence of success. A fresh explicit retry retains the original room
|
|
196
|
+
authority, and callbacks from an aborted attempt cannot settle that retry.
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
The shipped canonical kit constructs native WebTransport stream errors using
|
|
200
|
+
the browser's supported standard-revision constructor form (message/options,
|
|
201
|
+
or dictionary when the former throws TypeError). Both retain the cancellation
|
|
202
|
+
code and message; no alternate transport or synthesized End success is involved.
|
|
203
|
+
The canonical mapping and standards references are in web/kit CONTRACT.
|