@kaana.ai/contracts 8.15.0 → 8.17.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.
@@ -100,7 +100,7 @@
100
100
  * change to, say, the catalogue reject every in-flight inference request; the
101
101
  * per-shape `schemaVersion` is what a message is validated against.
102
102
  */
103
- export const INFERENCE_CONTRACT_VERSION = '8.15.0';
103
+ export const INFERENCE_CONTRACT_VERSION = '8.17.0';
104
104
  /**
105
105
  * Contract set 4.0.0 (Kaana ADR 0002) is the first published as
106
106
  * `@kaana.ai/contracts`. MAJOR because the set changed hands and split in two:
@@ -265,6 +265,26 @@ export const INFERENCE_CONTRACT_VERSION = '8.15.0';
265
265
  * `POST /v1/rerank` and emits the `rerank` operation for a model some deployment
266
266
  * can serve.
267
267
  */
268
+ /**
269
+ * Contract set 8.16.0 (Kaana ADR 0012) is additive: the realtime session kind
270
+ * `live`, a spoken conversation whose turns the caller's backend answers. Its
271
+ * `config.delegation` (`realtimeDelegationConfigSchema`), the commands
272
+ * `delegation.reply`, `delegation.context` and `delegation.cancel`, the events
273
+ * `delegation.requested` and `delegation.superseded`, and the catalogue's
274
+ * `capabilities.realtime.defaultKinds`, with at most one active default line per
275
+ * kind. Every 8.15.0 message parses the same; a consumer on 8.15.0 refuses a
276
+ * session, a command, an event or a catalogue carrying what is new, so Oxy reads
277
+ * them before Kaana serves a `live` line.
278
+ */
279
+ /**
280
+ * Contract set 8.17.0 publishes `CATALOGUE_ADDITIONS`: the catalogue values a
281
+ * reader on an earlier set refuses, each with the set that introduced it, and
282
+ * makes the request's `Kaana-Contract-Version` the set `GET /v1/models` is
283
+ * rendered in. No shape, field or member changes, and every 8.16.0 message
284
+ * parses the same; MINOR because Kaana now answers a caller by the set it
285
+ * states, which is what keeps a value added to the catalogue from refusing a
286
+ * deployed reader's whole list.
287
+ */
268
288
  /** The public API's one origin and version. */
269
289
  export const KAANA_API_BASE_URL = 'https://kaana.ai/v1';
270
290
  /** The response header that carries the request id. */
@@ -272,8 +292,9 @@ export const KAANA_REQUEST_ID_HEADER = 'Kaana-Request-Id';
272
292
  /**
273
293
  * The header that carries {@link INFERENCE_CONTRACT_VERSION}: on every
274
294
  * response, the set Kaana serves; on a request (`@kaana.ai/sdk` 2.0.0 and
275
- * later), the set the client parses. Every set since 4.0.0 parses the
276
- * catalogue Kaana serves.
295
+ * later), the set the client parses. `GET /v1/models` is rendered in the set
296
+ * a request states, without any value of {@link CATALOGUE_ADDITIONS} that set
297
+ * lacks; a request that states none receives none of them.
277
298
  */
278
299
  export const KAANA_CONTRACT_VERSION_HEADER = 'Kaana-Contract-Version';
279
300
  /**
package/openapi.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.1.0",
3
3
  "info": {
4
4
  "title": "Kaana API",
5
- "version": "8.15.0",
5
+ "version": "8.17.0",
6
6
  "description": "Kaana inference API. Generated from @kaana.ai/contracts; the Zod source is the authority. Accounts, applications, oxy_sk_ keys, limits and billing are managed in Oxy Console: https://console.oxy.so"
7
7
  },
8
8
  "servers": [
@@ -5203,6 +5203,13 @@
5203
5203
  "$ref": "#/components/schemas/RealtimeSessionKind"
5204
5204
  }
5205
5205
  },
5206
+ "defaultKinds": {
5207
+ "minItems": 1,
5208
+ "type": "array",
5209
+ "items": {
5210
+ "$ref": "#/components/schemas/RealtimeSessionKind"
5211
+ }
5212
+ },
5206
5213
  "inputAudioTranscription": {
5207
5214
  "type": "boolean"
5208
5215
  },
@@ -5734,6 +5741,15 @@
5734
5741
  },
5735
5742
  {
5736
5743
  "$ref": "#/components/schemas/RealtimeSessionCloseCommand"
5744
+ },
5745
+ {
5746
+ "$ref": "#/components/schemas/RealtimeDelegationReplyCommand"
5747
+ },
5748
+ {
5749
+ "$ref": "#/components/schemas/RealtimeDelegationContextCommand"
5750
+ },
5751
+ {
5752
+ "$ref": "#/components/schemas/RealtimeDelegationCancelCommand"
5737
5753
  }
5738
5754
  ]
5739
5755
  },
@@ -5959,6 +5975,214 @@
5959
5975
  }
5960
5976
  ]
5961
5977
  },
5978
+ "RealtimeDelegationAcknowledgement": {
5979
+ "type": "string",
5980
+ "enum": [
5981
+ "auto",
5982
+ "none"
5983
+ ]
5984
+ },
5985
+ "RealtimeDelegationCancelCommand": {
5986
+ "type": "object",
5987
+ "properties": {
5988
+ "schemaVersion": {
5989
+ "type": "number",
5990
+ "const": 1
5991
+ },
5992
+ "requestId": {
5993
+ "$ref": "#/components/schemas/RequestId"
5994
+ },
5995
+ "commandId": {
5996
+ "$ref": "#/components/schemas/RealtimeCommandId"
5997
+ },
5998
+ "type": {
5999
+ "type": "string",
6000
+ "const": "delegation.cancel"
6001
+ },
6002
+ "delegationId": {
6003
+ "$ref": "#/components/schemas/RealtimeDelegationId"
6004
+ }
6005
+ },
6006
+ "required": [
6007
+ "schemaVersion",
6008
+ "requestId",
6009
+ "commandId",
6010
+ "type",
6011
+ "delegationId"
6012
+ ]
6013
+ },
6014
+ "RealtimeDelegationConfig": {
6015
+ "type": "object",
6016
+ "properties": {
6017
+ "acknowledgement": {
6018
+ "$ref": "#/components/schemas/RealtimeDelegationAcknowledgement"
6019
+ }
6020
+ },
6021
+ "required": [
6022
+ "acknowledgement"
6023
+ ],
6024
+ "additionalProperties": false
6025
+ },
6026
+ "RealtimeDelegationContextCommand": {
6027
+ "type": "object",
6028
+ "properties": {
6029
+ "schemaVersion": {
6030
+ "type": "number",
6031
+ "const": 1
6032
+ },
6033
+ "requestId": {
6034
+ "$ref": "#/components/schemas/RequestId"
6035
+ },
6036
+ "commandId": {
6037
+ "$ref": "#/components/schemas/RealtimeCommandId"
6038
+ },
6039
+ "type": {
6040
+ "type": "string",
6041
+ "const": "delegation.context"
6042
+ },
6043
+ "delegationId": {
6044
+ "$ref": "#/components/schemas/RealtimeDelegationId"
6045
+ },
6046
+ "text": {
6047
+ "type": "string",
6048
+ "minLength": 1,
6049
+ "maxLength": 8192
6050
+ }
6051
+ },
6052
+ "required": [
6053
+ "schemaVersion",
6054
+ "requestId",
6055
+ "commandId",
6056
+ "type",
6057
+ "delegationId",
6058
+ "text"
6059
+ ]
6060
+ },
6061
+ "RealtimeDelegationId": {
6062
+ "type": "string",
6063
+ "minLength": 1,
6064
+ "maxLength": 128
6065
+ },
6066
+ "RealtimeDelegationReplyCommand": {
6067
+ "type": "object",
6068
+ "properties": {
6069
+ "schemaVersion": {
6070
+ "type": "number",
6071
+ "const": 1
6072
+ },
6073
+ "requestId": {
6074
+ "$ref": "#/components/schemas/RequestId"
6075
+ },
6076
+ "commandId": {
6077
+ "$ref": "#/components/schemas/RealtimeCommandId"
6078
+ },
6079
+ "type": {
6080
+ "type": "string",
6081
+ "const": "delegation.reply"
6082
+ },
6083
+ "delegationId": {
6084
+ "$ref": "#/components/schemas/RealtimeDelegationId"
6085
+ },
6086
+ "text": {
6087
+ "type": "string",
6088
+ "minLength": 1,
6089
+ "maxLength": 8192
6090
+ },
6091
+ "verbatim": {
6092
+ "maxItems": 32,
6093
+ "type": "array",
6094
+ "items": {
6095
+ "type": "string",
6096
+ "minLength": 1,
6097
+ "maxLength": 256
6098
+ }
6099
+ },
6100
+ "final": {
6101
+ "type": "boolean"
6102
+ }
6103
+ },
6104
+ "required": [
6105
+ "schemaVersion",
6106
+ "requestId",
6107
+ "commandId",
6108
+ "type",
6109
+ "delegationId",
6110
+ "text",
6111
+ "final"
6112
+ ]
6113
+ },
6114
+ "RealtimeDelegationRequestedEvent": {
6115
+ "type": "object",
6116
+ "properties": {
6117
+ "schemaVersion": {
6118
+ "type": "number",
6119
+ "const": 1
6120
+ },
6121
+ "requestId": {
6122
+ "$ref": "#/components/schemas/RequestId"
6123
+ },
6124
+ "sequence": {
6125
+ "type": "integer",
6126
+ "minimum": 0,
6127
+ "maximum": 9007199254740991
6128
+ },
6129
+ "commandId": {
6130
+ "$ref": "#/components/schemas/RealtimeCommandId"
6131
+ },
6132
+ "type": {
6133
+ "type": "string",
6134
+ "const": "delegation.requested"
6135
+ },
6136
+ "delegationId": {
6137
+ "$ref": "#/components/schemas/RealtimeDelegationId"
6138
+ },
6139
+ "text": {
6140
+ "type": "string"
6141
+ }
6142
+ },
6143
+ "required": [
6144
+ "schemaVersion",
6145
+ "requestId",
6146
+ "sequence",
6147
+ "type",
6148
+ "delegationId",
6149
+ "text"
6150
+ ]
6151
+ },
6152
+ "RealtimeDelegationSupersededEvent": {
6153
+ "type": "object",
6154
+ "properties": {
6155
+ "schemaVersion": {
6156
+ "type": "number",
6157
+ "const": 1
6158
+ },
6159
+ "requestId": {
6160
+ "$ref": "#/components/schemas/RequestId"
6161
+ },
6162
+ "sequence": {
6163
+ "type": "integer",
6164
+ "minimum": 0,
6165
+ "maximum": 9007199254740991
6166
+ },
6167
+ "commandId": {
6168
+ "$ref": "#/components/schemas/RealtimeCommandId"
6169
+ },
6170
+ "type": {
6171
+ "type": "string",
6172
+ "const": "delegation.superseded"
6173
+ },
6174
+ "delegationId": {
6175
+ "$ref": "#/components/schemas/RealtimeDelegationId"
6176
+ }
6177
+ },
6178
+ "required": [
6179
+ "schemaVersion",
6180
+ "requestId",
6181
+ "sequence",
6182
+ "type",
6183
+ "delegationId"
6184
+ ]
6185
+ },
5962
6186
  "RealtimeInputAudioAppendCommand": {
5963
6187
  "type": "object",
5964
6188
  "properties": {
@@ -6681,6 +6905,12 @@
6681
6905
  {
6682
6906
  "$ref": "#/components/schemas/RealtimeToolCallEvent"
6683
6907
  },
6908
+ {
6909
+ "$ref": "#/components/schemas/RealtimeDelegationRequestedEvent"
6910
+ },
6911
+ {
6912
+ "$ref": "#/components/schemas/RealtimeDelegationSupersededEvent"
6913
+ },
6684
6914
  {
6685
6915
  "$ref": "#/components/schemas/RealtimePublicResponseDoneEvent"
6686
6916
  },
@@ -7019,6 +7249,9 @@
7019
7249
  "type": "integer",
7020
7250
  "exclusiveMinimum": 0,
7021
7251
  "maximum": 9007199254740991
7252
+ },
7253
+ "delegation": {
7254
+ "$ref": "#/components/schemas/RealtimeDelegationConfig"
7022
7255
  }
7023
7256
  },
7024
7257
  "required": [
@@ -7071,7 +7304,8 @@
7071
7304
  "enum": [
7072
7305
  "conversation",
7073
7306
  "transcription",
7074
- "translation"
7307
+ "translation",
7308
+ "live"
7075
7309
  ]
7076
7310
  },
7077
7311
  "RealtimeSessionLimits": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaana.ai/contracts",
3
- "version": "8.15.0",
3
+ "version": "8.17.0",
4
4
  "description": "Kaana inference contract: the Zod schemas of the public API at https://kaana.ai/v1 and, under /internal, of the Oxy-Kaana grant, settlement and signed lane.",
5
5
  "type": "module",
6
6
  "sideEffects": false,