@cimulate/copilot-widget 1.50.1 → 1.50.3

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,15 @@
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.50.3 — 2026-10-15
6
+
7
+ - Fixes the Messaging script bundle (`messaging.umd.js`) failing to load on storefronts whose Content Security Policy does not allow `'unsafe-eval'`, which left `window.CimulateMessaging.injectMessagingWidget` undefined. Affected 1.45.0 through 1.50.2. No storefront action required.
8
+ - The telemetry SDK now ships as a separate `o11y-sdk.umd.js` next to the script bundles and loads only when telemetry is on and the page allows it, so `messaging.umd.js` is about 165KB smaller. Script-bundle pages that serve the bundles themselves should serve this file from the same directory.
9
+
10
+ ## 1.50.2 — 2026-10-14
11
+
12
+ - `cimulate:cart-update` now reports `action: "add"` (with empty `changes`) for the first cart the widget sees when the agent marks the cart summary `cartOperation: "add"` (case-insensitive), instead of `unknown`.
13
+
5
14
  ## 1.50.1 — 2026-10-14
6
15
 
7
16
  - Messaging telemetry (when enabled in a release) now reports each conversation ending once, with why it ended (reset, ended, closed by the server, expired session, or connection recovery) and how long it had been idle. It also reports when the widget session ends, and how many attempts a reconnect took. It no longer sends separate events for connection changes that the connection state already shows. Telemetry is not enabled in this release. No storefront action or configuration required.
@@ -236,21 +236,25 @@ declare type CartResponseData = {
236
236
  __action_execution_status__?: "success" | "failure";
237
237
  cartSummary: {
238
238
  cartDetails: CartDetails;
239
+ cartOperation?: string | null;
239
240
  };
240
241
  };
241
242
  };
242
243
 
243
244
  /**
244
- * Primary action for a settled cart mutation, derived purely by diffing the
245
- * previous cart snapshot against the newly settled one (self-contained — the
246
- * agent's cart block reports only success/failure, never the action itself):
245
+ * Primary action for a settled cart mutation, derived from the previous-vs-new
246
+ * cart diff, or from the agent's `cartSummary.cartOperation` (matched
247
+ * case-insensitively) when there is no previous snapshot to diff against:
247
248
  * - `add` / `remove` / `quantity` — a single line-level change of that kind
249
+ * - `add` with empty `changes` — the first cart the widget has seen (nothing to
250
+ * diff against), but the agent reported `cartOperation: "add"`
248
251
  * - `coupon` — only the applied-coupon set changed
249
252
  * - `mixed` — several distinct kinds of change in one turn
250
253
  * - `unknown` — a settled turn with nothing reliably diffable: no previous
251
- * snapshot, identical carts, or a cart-mutation reply that carried no cart
252
- * block (an emptied cart and a failed edit are indistinguishable, so the host
253
- * re-fetches rather than trust a fabricated delta)
254
+ * snapshot (and no agent-reported add), identical carts, or a cart-mutation
255
+ * reply that carried no cart block (an emptied cart and a failed edit are
256
+ * indistinguishable, so the host re-fetches rather than trust a fabricated
257
+ * delta)
254
258
  *
255
259
  * TODO(cart-events): reintroduce a `clear` action (and a distinct `error`
256
260
  * signal) once the agent returns a disambiguated response for an emptied cart