@kaana.ai/contracts 8.16.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.
@@ -911,6 +911,38 @@ export declare const modelListSchema: z.ZodObject<{
911
911
  }>>;
912
912
  }, z.core.$strip>>;
913
913
  }, z.core.$strict>;
914
+ /**
915
+ * One value `GET /v1/models` gained after a contract set (contract set 8.17.0).
916
+ *
917
+ * The catalogue's leaves are strict and its enums closed, so a reader refuses
918
+ * the WHOLE list on the first field or member its own set lacks. Kaana
919
+ * therefore renders the catalogue in the set the caller states in
920
+ * `Kaana-Contract-Version` (`@kaana.ai/sdk` 2.0.0 and later send it on every
921
+ * request): a value listed here reaches only a caller whose set is `since` or
922
+ * later. A caller that states no set, or one that does not parse, receives
923
+ * none of them.
924
+ *
925
+ * - `path` names a field of a model; a list on the way is crossed, applying the
926
+ * rest of the path to each element.
927
+ * - Without `member`, the field is the addition and is left out.
928
+ * - With `member`, the value at `path` is an enum and `member` is the addition:
929
+ * the list element that holds it is left out (the member itself in a list of
930
+ * members; the object carrying it in a list of objects). When that empties
931
+ * the list, the field at `emptied` (the nearest optional field holding the
932
+ * list) is left out with it.
933
+ *
934
+ * Adding a member to an enum the catalogue reaches, or a field to one of its
935
+ * strict objects, appends an entry here in the same change; the
936
+ * `@kaana.ai/sdk` compatibility suite compares this list with the published
937
+ * releases deployed readers run.
938
+ */
939
+ export interface CatalogueAddition {
940
+ readonly since: string;
941
+ readonly path: readonly string[];
942
+ readonly member?: string;
943
+ readonly emptied?: readonly string[];
944
+ }
945
+ export declare const CATALOGUE_ADDITIONS: readonly CatalogueAddition[];
914
946
  /**
915
947
  * One power level as `GET /v1/power-levels` lists it for the calling
916
948
  * credential: the level, the class it draws from, the effort it asks for, and
@@ -572,6 +572,22 @@ export const modelSchema = z.object({
572
572
  });
573
573
  /** `GET /v1/models`. */
574
574
  export const modelListSchema = z.object({ data: z.array(modelSchema) }).strict();
575
+ export const CATALOGUE_ADDITIONS = [
576
+ { since: '8.4.0', path: ['capabilities', 'unreported'] },
577
+ {
578
+ since: '8.4.0',
579
+ path: ['pricing', 'unitPrices', 'unit'],
580
+ member: 'cache_write_input_tokens',
581
+ emptied: ['pricing'],
582
+ },
583
+ {
584
+ since: '8.16.0',
585
+ path: ['capabilities', 'realtime', 'sessionKinds'],
586
+ member: 'live',
587
+ emptied: ['capabilities', 'realtime'],
588
+ },
589
+ { since: '8.16.0', path: ['capabilities', 'realtime', 'defaultKinds'] },
590
+ ];
575
591
  /**
576
592
  * One power level as `GET /v1/power-levels` lists it for the calling
577
593
  * credential: the level, the class it draws from, the effort it asks for, and
@@ -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 declare const INFERENCE_CONTRACT_VERSION = "8.16.0";
103
+ export declare 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:
@@ -276,6 +276,15 @@ export declare const INFERENCE_CONTRACT_VERSION = "8.16.0";
276
276
  * session, a command, an event or a catalogue carrying what is new, so Oxy reads
277
277
  * them before Kaana serves a `live` line.
278
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
+ */
279
288
  /** The public API's one origin and version. */
280
289
  export declare const KAANA_API_BASE_URL = "https://kaana.ai/v1";
281
290
  /** The response header that carries the request id. */
@@ -283,8 +292,9 @@ export declare const KAANA_REQUEST_ID_HEADER = "Kaana-Request-Id";
283
292
  /**
284
293
  * The header that carries {@link INFERENCE_CONTRACT_VERSION}: on every
285
294
  * response, the set Kaana serves; on a request (`@kaana.ai/sdk` 2.0.0 and
286
- * later), the set the client parses. Every set since 4.0.0 parses the
287
- * 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.
288
298
  */
289
299
  export declare const KAANA_CONTRACT_VERSION_HEADER = "Kaana-Contract-Version";
290
300
  /**
@@ -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.16.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:
@@ -276,6 +276,15 @@ export const INFERENCE_CONTRACT_VERSION = '8.16.0';
276
276
  * session, a command, an event or a catalogue carrying what is new, so Oxy reads
277
277
  * them before Kaana serves a `live` line.
278
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
+ */
279
288
  /** The public API's one origin and version. */
280
289
  export const KAANA_API_BASE_URL = 'https://kaana.ai/v1';
281
290
  /** The response header that carries the request id. */
@@ -283,8 +292,9 @@ export const KAANA_REQUEST_ID_HEADER = 'Kaana-Request-Id';
283
292
  /**
284
293
  * The header that carries {@link INFERENCE_CONTRACT_VERSION}: on every
285
294
  * response, the set Kaana serves; on a request (`@kaana.ai/sdk` 2.0.0 and
286
- * later), the set the client parses. Every set since 4.0.0 parses the
287
- * 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.
288
298
  */
289
299
  export const KAANA_CONTRACT_VERSION_HEADER = 'Kaana-Contract-Version';
290
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.16.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": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaana.ai/contracts",
3
- "version": "8.16.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,