@kaana.ai/contracts 8.2.0 → 8.4.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.
@@ -284,8 +284,8 @@ export declare const realtimeConversationItemSchema: z.ZodDiscriminatedUnion<[z.
284
284
  type: z.ZodLiteral<"message">;
285
285
  itemId: z.ZodOptional<z.ZodString>;
286
286
  role: z.ZodEnum<{
287
- user: "user";
288
287
  system: "system";
288
+ user: "user";
289
289
  assistant: "assistant";
290
290
  }>;
291
291
  content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -401,8 +401,8 @@ export declare const realtimeItemCreateCommandSchema: z.ZodObject<{
401
401
  type: z.ZodLiteral<"message">;
402
402
  itemId: z.ZodOptional<z.ZodString>;
403
403
  role: z.ZodEnum<{
404
- user: "user";
405
404
  system: "system";
405
+ user: "user";
406
406
  assistant: "assistant";
407
407
  }>;
408
408
  content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -591,8 +591,8 @@ export declare const realtimeClientCommandSchema: z.ZodDiscriminatedUnion<[z.Zod
591
591
  type: z.ZodLiteral<"message">;
592
592
  itemId: z.ZodOptional<z.ZodString>;
593
593
  role: z.ZodEnum<{
594
- user: "user";
595
594
  system: "system";
595
+ user: "user";
596
596
  assistant: "assistant";
597
597
  }>;
598
598
  content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -796,8 +796,8 @@ export declare const realtimeItemAddedEventSchema: z.ZodObject<{
796
796
  type: z.ZodLiteral<"message">;
797
797
  itemId: z.ZodOptional<z.ZodString>;
798
798
  role: z.ZodEnum<{
799
- user: "user";
800
799
  system: "system";
800
+ user: "user";
801
801
  assistant: "assistant";
802
802
  }>;
803
803
  content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -848,8 +848,8 @@ export declare const realtimeItemDoneEventSchema: z.ZodObject<{
848
848
  type: z.ZodLiteral<"message">;
849
849
  itemId: z.ZodOptional<z.ZodString>;
850
850
  role: z.ZodEnum<{
851
- user: "user";
852
851
  system: "system";
852
+ user: "user";
853
853
  assistant: "assistant";
854
854
  }>;
855
855
  content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -1365,6 +1365,7 @@ export declare const realtimePublicResponseDoneEventSchema: z.ZodObject<{
1365
1365
  audio_output_tokens: "audio_output_tokens";
1366
1366
  session_milliseconds: "session_milliseconds";
1367
1367
  input_transcription_milliseconds: "input_transcription_milliseconds";
1368
+ cache_write_input_tokens: "cache_write_input_tokens";
1368
1369
  }>;
1369
1370
  quantity: z.ZodNumber;
1370
1371
  }, z.core.$strict>>;
@@ -1468,6 +1469,7 @@ export declare const realtimePublicSessionClosedEventSchema: z.ZodObject<{
1468
1469
  audio_output_tokens: "audio_output_tokens";
1469
1470
  session_milliseconds: "session_milliseconds";
1470
1471
  input_transcription_milliseconds: "input_transcription_milliseconds";
1472
+ cache_write_input_tokens: "cache_write_input_tokens";
1471
1473
  }>;
1472
1474
  quantity: z.ZodNumber;
1473
1475
  }, z.core.$strict>>;
@@ -1655,8 +1657,8 @@ export declare const realtimePublicServerEventSchema: z.ZodDiscriminatedUnion<[z
1655
1657
  type: z.ZodLiteral<"message">;
1656
1658
  itemId: z.ZodOptional<z.ZodString>;
1657
1659
  role: z.ZodEnum<{
1658
- user: "user";
1659
1660
  system: "system";
1661
+ user: "user";
1660
1662
  assistant: "assistant";
1661
1663
  }>;
1662
1664
  content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -1706,8 +1708,8 @@ export declare const realtimePublicServerEventSchema: z.ZodDiscriminatedUnion<[z
1706
1708
  type: z.ZodLiteral<"message">;
1707
1709
  itemId: z.ZodOptional<z.ZodString>;
1708
1710
  role: z.ZodEnum<{
1709
- user: "user";
1710
1711
  system: "system";
1712
+ user: "user";
1711
1713
  assistant: "assistant";
1712
1714
  }>;
1713
1715
  content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -1922,6 +1924,7 @@ export declare const realtimePublicServerEventSchema: z.ZodDiscriminatedUnion<[z
1922
1924
  audio_output_tokens: "audio_output_tokens";
1923
1925
  session_milliseconds: "session_milliseconds";
1924
1926
  input_transcription_milliseconds: "input_transcription_milliseconds";
1927
+ cache_write_input_tokens: "cache_write_input_tokens";
1925
1928
  }>;
1926
1929
  quantity: z.ZodNumber;
1927
1930
  }, z.core.$strict>>;
@@ -2018,6 +2021,7 @@ export declare const realtimePublicServerEventSchema: z.ZodDiscriminatedUnion<[z
2018
2021
  audio_output_tokens: "audio_output_tokens";
2019
2022
  session_milliseconds: "session_milliseconds";
2020
2023
  input_transcription_milliseconds: "input_transcription_milliseconds";
2024
+ cache_write_input_tokens: "cache_write_input_tokens";
2021
2025
  }>;
2022
2026
  quantity: z.ZodNumber;
2023
2027
  }, z.core.$strict>>;
@@ -44,9 +44,9 @@ export declare const responsesRequestSchema: z.ZodObject<{
44
44
  }>]>>;
45
45
  input: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodObject<{
46
46
  role: z.ZodEnum<{
47
- user: "user";
48
47
  system: "system";
49
48
  developer: "developer";
49
+ user: "user";
50
50
  assistant: "assistant";
51
51
  tool: "tool";
52
52
  }>;
@@ -164,9 +164,9 @@ export declare const responseSchema: z.ZodObject<{
164
164
  }>;
165
165
  output: z.ZodArray<z.ZodObject<{
166
166
  role: z.ZodEnum<{
167
- user: "user";
168
167
  system: "system";
169
168
  developer: "developer";
169
+ user: "user";
170
170
  assistant: "assistant";
171
171
  tool: "tool";
172
172
  }>;
@@ -239,6 +239,7 @@ export declare const responseSchema: z.ZodObject<{
239
239
  audio_output_tokens: "audio_output_tokens";
240
240
  session_milliseconds: "session_milliseconds";
241
241
  input_transcription_milliseconds: "input_transcription_milliseconds";
242
+ cache_write_input_tokens: "cache_write_input_tokens";
242
243
  }>;
243
244
  quantity: z.ZodNumber;
244
245
  }, z.core.$strict>>;
@@ -153,6 +153,7 @@ export declare const responseStreamUsageEventSchema: z.ZodObject<{
153
153
  audio_output_tokens: "audio_output_tokens";
154
154
  session_milliseconds: "session_milliseconds";
155
155
  input_transcription_milliseconds: "input_transcription_milliseconds";
156
+ cache_write_input_tokens: "cache_write_input_tokens";
156
157
  }>;
157
158
  quantity: z.ZodNumber;
158
159
  }, z.core.$strict>>;
@@ -284,6 +285,7 @@ export declare const responseStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodOb
284
285
  audio_output_tokens: "audio_output_tokens";
285
286
  session_milliseconds: "session_milliseconds";
286
287
  input_transcription_milliseconds: "input_transcription_milliseconds";
288
+ cache_write_input_tokens: "cache_write_input_tokens";
287
289
  }>;
288
290
  quantity: z.ZodNumber;
289
291
  }, z.core.$strict>>;
@@ -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.2.0";
103
+ export declare const INFERENCE_CONTRACT_VERSION = "8.4.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:
@@ -195,6 +195,19 @@ export declare const INFERENCE_CONTRACT_VERSION = "8.2.0";
195
195
  * grant fact `inputImages`. Every 8.1.0 message parses the same; a consumer on
196
196
  * 8.1.0 or earlier refuses a declared catalogue or an authorization carrying
197
197
  * what is new, so Oxy reads them before Kaana publishes them.
198
+ *
199
+ * Contract set 8.3.0 is additive: the Anthropic-Messages-compatible
200
+ * `POST /v1/messages` (`anthropicMessagesRequestSchema`,
201
+ * `anthropicMessageSchema`, `anthropicStreamEventSchema`,
202
+ * `anthropicErrorSchema`). Nothing in 8.2.0 changes, and the signed grant and
203
+ * envelope are untouched: the endpoint is served as the `responses` operation.
204
+ *
205
+ * Contract set 8.4.0 is additive: the usage unit `cache_write_input_tokens`
206
+ * (input tokens written to a prompt cache, a sibling under the partition rule,
207
+ * default TTL only) and the optional `capabilities.unreported` (the boolean
208
+ * capabilities whose `false` is not evidence). Nothing in 8.3.0 changes and
209
+ * nothing emits either yet: a consumer on 8.3.0 refuses a usage report carrying
210
+ * the unit and a catalogue carrying the field, so Oxy reads them first.
198
211
  */
199
212
  /** The public API's one origin and version. */
200
213
  export declare const KAANA_API_BASE_URL = "https://kaana.ai/v1";
@@ -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.2.0';
103
+ export const INFERENCE_CONTRACT_VERSION = '8.4.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:
@@ -195,6 +195,19 @@ export const INFERENCE_CONTRACT_VERSION = '8.2.0';
195
195
  * grant fact `inputImages`. Every 8.1.0 message parses the same; a consumer on
196
196
  * 8.1.0 or earlier refuses a declared catalogue or an authorization carrying
197
197
  * what is new, so Oxy reads them before Kaana publishes them.
198
+ *
199
+ * Contract set 8.3.0 is additive: the Anthropic-Messages-compatible
200
+ * `POST /v1/messages` (`anthropicMessagesRequestSchema`,
201
+ * `anthropicMessageSchema`, `anthropicStreamEventSchema`,
202
+ * `anthropicErrorSchema`). Nothing in 8.2.0 changes, and the signed grant and
203
+ * envelope are untouched: the endpoint is served as the `responses` operation.
204
+ *
205
+ * Contract set 8.4.0 is additive: the usage unit `cache_write_input_tokens`
206
+ * (input tokens written to a prompt cache, a sibling under the partition rule,
207
+ * default TTL only) and the optional `capabilities.unreported` (the boolean
208
+ * capabilities whose `false` is not evidence). Nothing in 8.3.0 changes and
209
+ * nothing emits either yet: a consumer on 8.3.0 refuses a usage report carrying
210
+ * the unit and a catalogue carrying the field, so Oxy reads them first.
198
211
  */
199
212
  /** The public API's one origin and version. */
200
213
  export const KAANA_API_BASE_URL = 'https://kaana.ai/v1';