@origonai/web-sdk 0.1.1 → 0.1.2

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/docs/contract.md CHANGED
@@ -34,25 +34,26 @@ reciprocal cross-repository contract ledger.
34
34
 
35
35
  ## Release gate
36
36
 
37
- Run typecheck, unit tests, and the production build, then rebuild the linked
38
- `workspace/web/chat` consumer before publication. Publishing to npm remains an
39
- owner action and is never part of an implementation spin.
40
-
41
- ## Live-chat monitoring LCM-2 hardcut candidate
42
-
43
- - The unpublished candidate is generated from workspace wave base
44
- `a7a731d62cc938f8221d3749cbf7b05474f0f9b4` plus the coordinated dirty
45
- LCM-2 proto/golden inputs by
46
- `web/kit/scripts/ship-orpc.sh`; `src/orpc-gen/PROVENANCE` pins the candidate
47
- proto and both golden-fixture hashes. It remains unpublished and is consumed
48
- only through the exact local links recorded in the workspace artifact ledger;
49
- monitoring endpoint/lifecycle activation remains LCM-3.
50
- - `Message.metadata` and `TypingEvent.metadata` are required server outputs,
51
- with audience exactly `internal|all`; missing or unknown output metadata fails
52
- closed. Current ordinary calls inject `all`. CX additionally accepts an
53
- omitted `MessageRequest.metadata` or `TypingRequest.metadata` only from an
54
- authenticated participant-purpose legacy client and normalizes it to `all`;
55
- monitor-purpose omission remains invalid.
37
+ Run typecheck, unit tests, and the production build, then rebuild both linked
38
+ `workspace/web/chat` and `workspace/web/cx` consumers. Inspect the packed
39
+ declarations and artifact bytes before publication. Publishing to npm remains
40
+ an owner action and is never part of an implementation spin.
41
+
42
+ ## Live-chat monitoring and optional message metadata
43
+
44
+ - Version 0.1.2 exposes optional `Message.metadata` and optional
45
+ `MessageMetadata.audience`. ORPC messages plus REST directory/history rows
46
+ normalize missing/null containers to `undefined`, while a present object with
47
+ a missing/null/empty audience remains `{}`. Lowercase `internal|all` is
48
+ preserved and every other non-empty value fails without trimming. Received
49
+ `TypingEvent.metadata` remains required and known.
50
+ - Ordinary participant message and typing calls omit request metadata. CX
51
+ resolves participant-purpose omission to `all`; monitor-purpose omission is
52
+ invalid. Monitor consumers therefore validate and send an explicit
53
+ `internal|all` audience for every message and typing operation.
54
+ - CX remains the authorization and projection boundary. Optional parsing never
55
+ authorizes an internal row for an external consumer, and newly authored CX
56
+ storage/events/replay/history/directory values remain explicit.
56
57
  - `onTyping` receives exactly `{participantId, role, userId, userName, state,
57
58
  metadata}`. Inbound watchdogs are participant-keyed; one participant's off
58
59
  or message cannot clear an unrelated participant.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@origonai/web-sdk",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Origon Web SDK - chat and voice session client",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@11.5.1",