@oxy.so/contracts 4.4.0 → 4.5.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.
@@ -135,6 +135,18 @@ exports.moneySchema = zod_1.z
135
135
  * reported as tokens and as milliseconds is the double charge this rule exists
136
136
  * to prevent.
137
137
  *
138
+ * **`session_milliseconds` is session wall-clock time** (added in contract set
139
+ * 3.3.0): wall-clock milliseconds a realtime session was open with the upstream
140
+ * provider; reported only by a provider that bills session time, and never
141
+ * together with a per-audio reading of the same span. xAI's Voice Agent API
142
+ * bills a session using server-side voice activity detection for its whole
143
+ * duration, speech or silence, which is neither audio sent nor audio received:
144
+ * reporting that clock as `audio_input_milliseconds` would misdescribe the
145
+ * charge, and reporting both would bill the same span twice. It is measured by
146
+ * the data plane from the upstream session's open to its close, never
147
+ * estimated from the audio, and a provider billed by the audio it carries (or
148
+ * by tokens) never reports it.
149
+ *
138
150
  * No refinement in this package can enforce it, and saying so is part of the
139
151
  * rule: a nested report and a disjoint one are the same four non-negative
140
152
  * integers, so no predicate over a single report can tell them apart. The two
@@ -171,6 +183,7 @@ exports.USAGE_UNITS = [
171
183
  'audio_input_tokens',
172
184
  'cached_audio_input_tokens',
173
185
  'audio_output_tokens',
186
+ 'session_milliseconds',
174
187
  ];
175
188
  exports.usageUnitSchema = zod_1.z.enum(exports.USAGE_UNITS);
176
189
  /**
@@ -102,4 +102,4 @@ exports.INFERENCE_CONTRACT_VERSION = void 0;
102
102
  * change to, say, the catalogue reject every in-flight inference request; the
103
103
  * per-shape `schemaVersion` is what a message is validated against.
104
104
  */
105
- exports.INFERENCE_CONTRACT_VERSION = '3.2.0';
105
+ exports.INFERENCE_CONTRACT_VERSION = '3.3.0';