@cimulate/copilot-widget 1.41.2 → 1.42.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/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  `@cimulate/copilot-widget` follows [Semantic Versioning](https://semver.org/). Each entry is a released `package.json` version (deployed on merge to `master`), newest first.
4
4
 
5
+ ## 1.42.0 — 2026-09-22
6
+
7
+ - Added a page-context API for Messaging integrations. PDP adapters can set, read, and clear the current product ID; each shopper turn snapshots that ID and sends it through the three SCRT2 page-context variables without changing the shopper's message text. Retry and session-recovery attempts reuse the original turn snapshot.
8
+
5
9
  ## 1.41.2 — 2026-09-21
6
10
 
7
11
  - Completed Copilot and Agentforce responses are now announced through dedicated polite live regions. Streaming fragments and restored conversation history are excluded so responses are announced once, after completion.
package/README.md CHANGED
@@ -150,6 +150,25 @@ Settings are in `public/index.html`. Example configurations you can modify:
150
150
  </script>
151
151
  ```
152
152
 
153
+ ### Messaging Page Context
154
+
155
+ Messaging integrations provide normalized storefront state through the generic page-context API. PDP is the first supported page type:
156
+
157
+ ```ts
158
+ import { eventHandlers } from "@cimulate/copilot-widget/messaging";
159
+
160
+ eventHandlers.pageContext.set({
161
+ type: "pdp",
162
+ id: "product-123",
163
+ });
164
+
165
+ const current = eventHandlers.pageContext.get();
166
+
167
+ eventHandlers.pageContext.clear();
168
+ ```
169
+
170
+ The widget snapshots the latest context immediately before a shopper turn is first sent. It reuses that snapshot for retries and session recovery, and sends the shopper's text unchanged.
171
+
153
172
  ## Linting and pre-commit hooks
154
173
 
155
174
  Lint and format locally with the npm scripts: