@chatsystem/client 1.3.2 → 2.0.0

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 CHANGED
@@ -101,6 +101,18 @@ Normal customer installations must omit this property and continue through the
101
101
  standard public installation endpoints. New presentation behavior belongs in
102
102
  the client itself; it must never be reimplemented in a host-specific adapter.
103
103
 
104
+ ## Browser regression tests
105
+
106
+ The package has a Playwright suite under `e2e/identity-gate`. It builds this
107
+ library, mounts it inside a fictional customer website, and drives a real
108
+ headless Chromium through identity delegation, redirect/resume, shared-runtime
109
+ streaming and local interactive-widget preview scenarios.
110
+
111
+ Run it from this directory with `npm run test:identity-gate`. It uses only local
112
+ fixtures and fictional data. See
113
+ [`e2e/identity-gate/README.md`](e2e/identity-gate/README.md) for the browser
114
+ topology, safety boundary, failure artifacts and full-stack variant.
115
+
104
116
  ## Bundled JavaScript
105
117
 
106
118
  ```html
@@ -146,3 +158,23 @@ programmatic browser API so the provider functions remain JavaScript values:
146
158
 
147
159
  This passes the provider to the same internal `App` and identity session used
148
160
  by the npm package. Do not place callbacks or secrets in `data-*` attributes.
161
+
162
+ ## Completed AI answers per discussion
163
+
164
+ The API controls the discussion allowance through
165
+ `CompanySettingsDTO.api.settings.maxAiResponsesPerDiscussion`. Only completed,
166
+ persisted final AI answers consume it; user messages, Tool exchanges,
167
+ intermediate text and human support do not. This is not a context/token limit.
168
+ The widget disables AI input at the limit and offers a new conversation.
169
+
170
+ Shared chatbox/launcher views use the same absolute completion count. Validated
171
+ `ai.response.completed` receipts are discussion-scoped, replay-safe and retained
172
+ in local conversation history. Server admission remains authoritative if that
173
+ history or a receipt is missing. A busy discussion is not quota exhaustion.
174
+
175
+ This migration requires shared 2.0.0 and a compatible API; upgrade pinned widgets
176
+ explicitly. No React prop, script data attribute or `mount()` option changes.
177
+ Publish the npm component and standalone S3 bundle independently. Custom runtime
178
+ adapters must return the new required settings field, expose `discussionId` and
179
+ forward completion events through their existing NDJSON stream; `message_end`
180
+ alone does not prove durable completion.