@bli-cockpit/telemetry-core 0.1.87 → 0.1.88

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.
@@ -252,6 +252,11 @@ export declare const RawEvidenceUploadEncodingSchema: z.ZodEnum<{
252
252
  br: "br";
253
253
  }>;
254
254
  export type RawEvidenceUploadEncoding = z.infer<typeof RawEvidenceUploadEncodingSchema>;
255
+ /**
256
+ * Sent on `begin` by a collector that can encode more than gzip, listing what it can write
257
+ * (`zstd,br,gzip`). A server that knows the header answers with `accepted_encodings`.
258
+ */
259
+ export declare const EVIDENCE_CODECS_HEADER = "x-tower-evidence-codecs";
255
260
  export declare const RawEvidenceUploadBeginResponseObjectSchema: z.ZodObject<{
256
261
  object_key: z.ZodString;
257
262
  raw_evidence_pointer_id: z.ZodString;
@@ -269,6 +274,11 @@ export declare const RawEvidenceUploadBeginResponseObjectSchema: z.ZodObject<{
269
274
  signed_url: z.ZodString;
270
275
  }, z.core.$strict>>>;
271
276
  reason: z.ZodOptional<z.ZodString>;
277
+ accepted_encodings: z.ZodOptional<z.ZodArray<z.ZodEnum<{
278
+ gzip: "gzip";
279
+ zstd: "zstd";
280
+ br: "br";
281
+ }>>>;
272
282
  }, z.core.$strict>;
273
283
  export type RawEvidenceUploadBeginResponseObject = z.infer<typeof RawEvidenceUploadBeginResponseObjectSchema>;
274
284
  export declare const RawEvidenceUploadBeginResponseSchema: z.ZodObject<{
@@ -290,6 +300,11 @@ export declare const RawEvidenceUploadBeginResponseSchema: z.ZodObject<{
290
300
  signed_url: z.ZodString;
291
301
  }, z.core.$strict>>>;
292
302
  reason: z.ZodOptional<z.ZodString>;
303
+ accepted_encodings: z.ZodOptional<z.ZodArray<z.ZodEnum<{
304
+ gzip: "gzip";
305
+ zstd: "zstd";
306
+ br: "br";
307
+ }>>>;
293
308
  }, z.core.$strict>>;
294
309
  }, z.core.$strict>;
295
310
  export type RawEvidenceUploadBeginResponse = z.infer<typeof RawEvidenceUploadBeginResponseSchema>;
@@ -104,6 +104,11 @@ export const RawEvidenceUploadDispositionSchema = z.enum([
104
104
  ]);
105
105
  /** How a chunk's bytes are compressed on the wire (BLI-23334). `gzip` is what every collector speaks today; the door decodes all three. */
106
106
  export const RawEvidenceUploadEncodingSchema = z.enum(["gzip", "zstd", "br"]);
107
+ /**
108
+ * Sent on `begin` by a collector that can encode more than gzip, listing what it can write
109
+ * (`zstd,br,gzip`). A server that knows the header answers with `accepted_encodings`.
110
+ */
111
+ export const EVIDENCE_CODECS_HEADER = "x-tower-evidence-codecs";
107
112
  export const RawEvidenceUploadBeginResponseObjectSchema = z
108
113
  .object({
109
114
  object_key: NonEmptyStringSchema,
@@ -119,6 +124,10 @@ export const RawEvidenceUploadBeginResponseObjectSchema = z
119
124
  signed_url: z.string().url(),
120
125
  }).strict()).optional(),
121
126
  reason: SafeLabelSchema.optional(),
127
+ // BLI-23334: the codecs this server decodes. Sent only to a collector that asked with
128
+ // `EVIDENCE_CODECS_HEADER`; this schema is strict, so an old collector must never be shown the
129
+ // key. Absent means gzip only.
130
+ accepted_encodings: z.array(RawEvidenceUploadEncodingSchema).optional(),
122
131
  })
123
132
  .strict();
124
133
  export const RawEvidenceUploadBeginResponseSchema = z
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bli-cockpit/telemetry-core",
3
- "version": "0.1.87",
3
+ "version": "0.1.88",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",