@xema/omni-protocol 0.1.79 → 0.1.80

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.
Files changed (2) hide show
  1. package/guide.md +20 -0
  2. package/package.json +1 -1
package/guide.md CHANGED
@@ -1454,6 +1454,26 @@ connection is up nothing has been lost, and when it comes back the adapter sends
1454
1454
 
1455
1455
  Request/response polling does not have those properties and is not a transport for this contract.
1456
1456
 
1457
+ ### 3. An adapter's memory is the platform's and the login's, never the connection's
1458
+
1459
+ Everything an adapter publishes about a task is derived from what the platform states, or kept in
1460
+ the login's store where the platform cannot hold it. Per offer, the `allocationId` comes from what
1461
+ the offer itself states; per call, the media follows `task-media-started` and `task-media-ended`,
1462
+ never a flag set when the audio was opened; per session, the phone the agent holds is what the
1463
+ platform restates on activation, not a mapping read once over HTTP. What the platform cannot hold
1464
+ -- a host's muted leg -- goes in `ConnectContext.store`, keyed by the task and gone with it.
1465
+
1466
+ A fact read once over a connection and kept in the adapter object dies with the client. A host
1467
+ reload is the first client dying and a second coming up for the same login, and the second
1468
+ publishes the same truth about the same task as the first did, or the first was publishing
1469
+ something it made up: an allocation minted for the connection, media remembered as a boolean, a
1470
+ phone the second never read. Three pieces of exactly that state were found in one adapter in an
1471
+ afternoon, and none of it was visible until the adapter was built twice. The drive's `rebuild` is the test of this
1472
+ principle: given a way to build the adapter again, the run hands the login over and holds the
1473
+ second to what the first published (`drive.reload.allocation`, `.history`, `.openMedia`, and the
1474
+ stream's own rules across the resync). An adapter that cannot be built twice against its platform
1475
+ and publish the same task is not a conformant adapter yet, whatever a single run says.
1476
+
1457
1477
  ## Package entry points
1458
1478
 
1459
1479
  | Import | Purpose |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xema/omni-protocol",
3
- "version": "0.1.79",
3
+ "version": "0.1.80",
4
4
  "description": "The Omni protocol: the contract every provider adapter implements",
5
5
  "type": "module",
6
6
  "license": "MIT",